Skip to content

[LangRef] Try to clarify mustprogress wording. #90510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions llvm/docs/LangRef.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2447,12 +2447,14 @@ example:
memory access, I/O, or other synchronization. The ``mustprogress``
attribute is intended to model the requirements of the first section of
[intro.progress] of the C++ Standard. As a consequence, a loop in a
function with the `mustprogress` attribute can be assumed to terminate if
function with the ``mustprogress`` attribute can be assumed to terminate if
it does not interact with the environment in an observable way, and
terminating loops without side-effects can be removed. If a `mustprogress`
function does not satisfy this contract, the behavior is undefined. This
attribute does not apply transitively to callees, but does apply to call
sites within the function. Note that `willreturn` implies `mustprogress`.
terminating loops without side-effects can be removed. If a ``mustprogress``
function does not satisfy this contract, the behavior is undefined. If a
``mustprogress`` function calls a function not marked ``mustprogress``,
and that function never returns, the program is well-defined even if there
isn't any other observable progress. Note that ``willreturn`` implies
``mustprogress``.
``"warn-stack-size"="<threshold>"``
This attribute sets a threshold to emit diagnostics once the frame size is
known should the frame size exceed the specified value. It takes one
Expand Down