a sequence equivalent to "movs pc, lr" will be used.\r
\r
\r
+acquire_capability (acquire_shared_capability, clang::acquire_capability, clang::acquire_shared_capability)\r
+-----------------------------------------------------------------------------------------------------------\r
+.. csv-table:: Supported Syntaxes\r
+ :header: "GNU", "C++11", "__declspec", "Keyword"\r
+\r
+ "X","X","",""\r
+\r
+Marks a function as acquiring a capability.\r
+\r
+\r
+assert_capability (assert_shared_capability, clang::assert_capability, clang::assert_shared_capability)\r
+-------------------------------------------------------------------------------------------------------\r
+.. csv-table:: Supported Syntaxes\r
+ :header: "GNU", "C++11", "__declspec", "Keyword"\r
+\r
+ "X","X","",""\r
+\r
+Marks a function that dynamically tests whether a capability is held, and halts\r
+the program if it is not held.\r
+\r
+\r
availability\r
------------\r
.. csv-table:: Supported Syntaxes\r
incorrect, the caller of ``foo`` will receive a warning.\r
\r
\r
+noduplicate (clang::noduplicate)\r
+--------------------------------\r
+.. csv-table:: Supported Syntaxes\r
+ :header: "GNU", "C++11", "__declspec", "Keyword"\r
+\r
+ "X","X","",""\r
+\r
+The ``noduplicate`` attribute can be placed on function declarations to control\r
+whether function calls to this function can be duplicated \r
+or not as a result of optimizations. This is required for the implementation\r
+of functions with certain special requirements, like the OpenCL "barrier", \r
+function that, depending on the hardware, might require to be run concurrently\r
+by all the threads that are currently executing in lockstep on the hardware.\r
+For example this attribute applied on the function "nodupfunc" \r
+avoids that this code:\r
+\r
+.. code-block:: c\r
+\r
+ void nodupfunc() __attribute__((noduplicate));\r
+ // Setting it as a C++11 attribute is also valid\r
+ // void nodupfunc() [[clang::noduplicate]];\r
+ void foo();\r
+ void bar();\r
+\r
+ nodupfunc();\r
+ if (a > n) {\r
+ foo();\r
+ } else {\r
+ bar();\r
+ }\r
+\r
+gets possibly modified by some optimization into code similar to this:\r
+\r
+.. code-block:: c\r
+\r
+ if (a > n) {\r
+ nodupfunc();\r
+ foo();\r
+ } else {\r
+ nodupfunc();\r
+ bar();\r
+ }\r
+\r
+where the barrier call is duplicated and sunk into the two branches of the condition.\r
+\r
+\r
no_sanitize_address (no_address_safety_analysis, gnu::no_address_safety_analysis, gnu::no_sanitize_address)\r
-----------------------------------------------------------------------------------------------------------\r
.. csv-table:: Supported Syntaxes\r
\r
Query for this feature with ``__has_extension(attribute_overloadable)``.\r
\r
-noduplicate\r
------------\r
+\r
+release_capability (release_shared_capability, clang::release_capability, clang::release_shared_capability)\r
+-----------------------------------------------------------------------------------------------------------\r
.. csv-table:: Supported Syntaxes\r
:header: "GNU", "C++11", "__declspec", "Keyword"\r
\r
"X","X","",""\r
\r
-The ``noduplicate`` attribute can be placed on function declarations to control\r
-whether function calls to this function can be duplicated \r
-or not as a result of optimizations. This is required for the implementation\r
-of functions with certain special requirements, like the OpenCL "barrier", \r
-function that, depending on the hardware, might require to be run concurrently\r
-by all the threads that are currently executing in lockstep on the hardware.\r
-For example this attribute applied on the function "nodupfunc" \r
-avoids that this code:\r
-\r
-.. code-block:: c\r
-\r
- void nodupfunc() __attribute__((noduplicate));\r
- // Setting it as a C++11 attribute is also valid\r
- // void nodupfunc() [[clang::noduplicate]];\r
- void foo();\r
- void bar();\r
+Marks a function as releasing a capability.\r
\r
- nodupfunc();\r
- if (a > n) {\r
- foo();\r
- } else {\r
- bar();\r
- }\r
\r
-gets possibly modified by some optimization into code similar to this:\r
+try_acquire_capability (try_acquire_shared_capability, clang::try_acquire_capability, clang::try_acquire_shared_capability)\r
+---------------------------------------------------------------------------------------------------------------------------\r
+.. csv-table:: Supported Syntaxes\r
+ :header: "GNU", "C++11", "__declspec", "Keyword"\r
\r
-.. code-block:: c\r
+ "X","X","",""\r
\r
- if (a > n) {\r
- nodupfunc();\r
- foo();\r
- } else {\r
- nodupfunc();\r
- bar();\r
- }\r
+Marks a function that attemps to aquire a capability. This function may fail to\r
+actually acquire the capability; they accept a Boolean value determining\r
+whether acquiring the capability means success (true), or failing to acquire\r
+the capability means success (false).\r
\r
-where the barrier call is duplicated and sunk into the two branches of the condition.\r
\r
Variable Attributes\r
===================\r
def AssertCapabilityDocs : Documentation {
let Category = DocCatFunction;
+ let Heading = "assert_capability (assert_shared_capability, clang::assert_capability, clang::assert_shared_capability)";
let Content = [{
Marks a function that dynamically tests whether a capability is held, and halts
the program if it is not held.
def AcquireCapabilityDocs : Documentation {
let Category = DocCatFunction;
+ let Heading = "acquire_capability (acquire_shared_capability, clang::acquire_capability, clang::acquire_shared_capability)";
let Content = [{
Marks a function as acquiring a capability.
}];
def TryAcquireCapabilityDocs : Documentation {
let Category = DocCatFunction;
+ let Heading = "try_acquire_capability (try_acquire_shared_capability, clang::try_acquire_capability, clang::try_acquire_shared_capability)";
let Content = [{
Marks a function that attemps to aquire a capability. This function may fail to
actually acquire the capability; they accept a Boolean value determining
def ReleaseCapabilityDocs : Documentation {
let Category = DocCatFunction;
+ let Heading = "release_capability (release_shared_capability, clang::release_capability, clang::release_shared_capability)";
let Content = [{
Marks a function as releasing a capability.
}];