diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2018-11-09 17:19:45 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2018-11-09 17:19:45 +0000 |
commit | c44c174246280dc7614b6591f48010858f482eb9 (patch) | |
tree | ee0b46581c0d7149fdf74e5c5943b534b7fec331 /clang/test/FixIt/fixit-cxx11-attributes.cpp | |
parent | 21e7f5e24eb1fef1676d70eb013b1346482a7bac (diff) | |
download | bcm5719-llvm-c44c174246280dc7614b6591f48010858f482eb9.tar.gz bcm5719-llvm-c44c174246280dc7614b6591f48010858f482eb9.zip |
Introduce the _Clang scoped attribute token.
Currently, we only accept clang as the scoped attribute identifier for double square bracket attributes provided by Clang, but this has the potential to conflict with user-defined macros. To help alleviate these concerns, this introduces the _Clang scoped attribute identifier as an alias for clang. It also introduces a warning with a fixit on the off chance someone attempts to use __clang__ as the scoped attribute (which is a predefined compiler identification macro).
llvm-svn: 346521
Diffstat (limited to 'clang/test/FixIt/fixit-cxx11-attributes.cpp')
-rw-r--r-- | clang/test/FixIt/fixit-cxx11-attributes.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/FixIt/fixit-cxx11-attributes.cpp b/clang/test/FixIt/fixit-cxx11-attributes.cpp index 30697a90002..996fd185c37 100644 --- a/clang/test/FixIt/fixit-cxx11-attributes.cpp +++ b/clang/test/FixIt/fixit-cxx11-attributes.cpp @@ -49,3 +49,6 @@ namespace BaseSpecifier { // CHECK: fix-it:"{{.*}}":{[[@LINE-4]]:26-[[@LINE-4]]:26}:"[{{\[}}d]]" // CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:33-[[@LINE-2]]:39}:"" } + +[[__clang__::annotate("test")]] void annotate3(); // expected-warning {{'__clang__' is a predefined macro name, not an attribute scope specifier; did you mean '_Clang' instead?}} +// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:3-[[@LINE-1]]:12}:"_Clang" |