diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td index b96fbddd51154..3c58256c77201 100644 --- a/clang/include/clang/Basic/AttrDocs.td +++ b/clang/include/clang/Basic/AttrDocs.td @@ -2486,6 +2486,9 @@ Example "subtarget features" from the x86 backend include: "mmx", "sse", "sse4.2 "avx", "xop" and largely correspond to the machine specific options handled by the front end. +Note that this attribute does not apply transitively to nested functions such +as blocks or C++ lambdas. + Additionally, this attribute supports function multiversioning for ELF based x86/x86-64 targets, which can be used to create multiple implementations of the same function that will be resolved at runtime based on the priority of their @@ -3714,6 +3717,12 @@ for that function. This attribute is incompatible with the ``always_inline`` and ``minsize`` attributes. + +Note that this attribute does not apply recursively to nested functions such as +lambdas or blocks when using declaration-specific attribute syntaxes such as double +square brackets (``[[]]``) or ``__attribute__``. The ``#pragma`` syntax can be +used to apply the attribute to all functions, including nested functions, in a +range of source code. }]; }