@@ -54,9 +54,9 @@ attached to functions, blocks, function pointers, lambdas, and member functions.
54
54
The attribute applies only to the function itself. In particular, it does not apply to any nested
55
55
functions or declarations, such as blocks, lambdas, and local classes.
56
56
57
- This document uses the C++/C23 syntax ``[[clang::nonblocking]] ``, since it parallels the placement
57
+ This document uses the C++/C23 syntax ``[[clang::nonblocking]] ``, since it parallels the placement
58
58
of the ``noexcept `` specifier, and the attributes have other similarities to ``noexcept ``. The GNU
59
- ``__attribute__((nonblocking)) `` syntax is also supported. Note that it requires a different
59
+ ``__attribute__((nonblocking)) `` syntax is also supported. Note that it requires a different
60
60
placement on a C++ type alias.
61
61
62
62
Like ``noexcept ``, ``nonblocking `` and ``nonallocating `` have an optional argument, a compile-time
@@ -76,10 +76,10 @@ series of performance constraints. From weakest to strongest:
76
76
- ``nonblocking ``: The function type will never block on a lock, allocate memory on the heap,
77
77
or throw an exception.
78
78
79
- ``nonblocking `` includes the ``nonallocating `` guarantee.
79
+ ``nonblocking `` includes the ``nonallocating `` guarantee.
80
80
81
81
While ``nonblocking `` and ``nonallocating `` are conceptually a superset of ``noexcept ``, neither
82
- attribute implicitly specifies ``noexcept ``. Further, ``noexcept `` has a specified runtime behavior of
82
+ attribute implicitly specifies ``noexcept ``. Further, ``noexcept `` has a specified runtime behavior of
83
83
aborting if an exception is thrown, while the ``nonallocating `` and ``nonblocking `` attributes are
84
84
mainly for compile-time analysis and have no runtime behavior, except in code built
85
85
with Clang's :doc: `RealtimeSanitizer `. Nonetheless, Clang emits a
@@ -95,7 +95,7 @@ function, as described in the section "Analysis and warnings", below.
95
95
explicitly disable any potential inference of ``nonblocking `` or ``nonallocating `` during
96
96
verification. (Inference is described later in this document). ``nonblocking(false) `` and
97
97
``nonallocating(false) `` are legal, but superfluous when applied to a function *type *
98
- that is not part of a declarator: ``float (int) [[nonblocking(false)]] `` and
98
+ that is not part of a declarator: ``float (int) [[nonblocking(false)]] `` and
99
99
``float (int) `` are identical types.
100
100
101
101
For functions with no explicit performance constraint, the worst is assumed: the function
@@ -153,7 +153,7 @@ are comparable to that for ``noexcept`` in C++17 and later.
153
153
void (*fp_nonallocating)() [[clang::nonallocating]];
154
154
fp_nonallocating = nullptr;
155
155
fp_nonallocating = nonallocating;
156
- fp_nonallocating = nonblocking; // no warning because nonblocking includes nonallocating
156
+ fp_nonallocating = nonblocking; // no warning because nonblocking includes nonallocating
157
157
fp_nonallocating = unannotated;
158
158
// ^ warning: attribute 'nonallocating' should not be added via type conversion
159
159
}
@@ -274,7 +274,7 @@ following rules. Such functions:
274
274
from the analysis. (The reason for requiring ``noexcept `` in C++ is that a function declared
275
275
``noreturn `` could be a wrapper for ``throw ``.)
276
276
277
- 5. May not invoke or access an Objective-C method or property, since ``objc_msgSend() `` calls into
277
+ 5. May not invoke or access an Objective-C method or property, since ``objc_msgSend() `` calls into
278
278
the Objective-C runtime, which may allocate memory or otherwise block.
279
279
280
280
6. May not access thread-local variables. Typically, thread-local variables are allocated on the
0 commit comments