diff options
Diffstat (limited to 'clang/test/Parser/cxx0x-attributes.cpp')
-rw-r--r-- | clang/test/Parser/cxx0x-attributes.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Parser/cxx0x-attributes.cpp b/clang/test/Parser/cxx0x-attributes.cpp index 7f41be80514..824aeae06d6 100644 --- a/clang/test/Parser/cxx0x-attributes.cpp +++ b/clang/test/Parser/cxx0x-attributes.cpp @@ -304,3 +304,11 @@ class A { A([[gnu::unused]] int a); }; A::A([[gnu::unused]] int a) {} + +namespace GccConst { + // GCC's tokenizer treats const and __const as the same token. + [[gnu::const]] int *f1(); + [[gnu::__const]] int *f2(); + void f(const int *); + void g() { f(f1()); f(f2()); } +} |