diff options
author | Erik Pilkington <erik.pilkington@gmail.com> | 2019-01-07 21:54:00 +0000 |
---|---|---|
committer | Erik Pilkington <erik.pilkington@gmail.com> | 2019-01-07 21:54:00 +0000 |
commit | b460f1624cd57698a8cd94912a50890f01e2ed4d (patch) | |
tree | b517b82081a18384315eb61f3e534991fc8ee81e /clang/docs | |
parent | 7bb3353f6ab94326a79e2e5bdb8f77675666ba84 (diff) |
Add a __has_feature check for namespaces on #pragma clang attribute.
Support for this was added in r349845.
llvm-svn: 350572
Diffstat (limited to 'clang/docs')
-rw-r--r-- | clang/docs/LanguageExtensions.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst index c800a96e6dc8..574bb77345a8 100644 --- a/clang/docs/LanguageExtensions.rst +++ b/clang/docs/LanguageExtensions.rst @@ -2725,7 +2725,9 @@ same namespace. For instance: Without the namespaces on the macros, ``other_function`` will be annotated with ``[[noreturn]]`` instead of ``__attribute__((unavailable))``. This may seem like a contrived example, but its very possible for this kind of situation to appear -in real code if the pragmas are spread out across a large file. +in real code if the pragmas are spread out across a large file. You can test if +your version of clang supports namespaces on ``#pragma clang attribute`` with +``__has_feature(pragma_clang_attribute_namespaces)``. Subject Match Rules ------------------- |