diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2013-10-29 03:33:57 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2013-10-29 03:33:57 +0000 |
commit | d0604672d9c1dc04e54761bcbdab973efa69a4ab (patch) | |
tree | 72a192bcdc52544bfacb8015f3b35191a140fe4e /clang/test | |
parent | 451c8de2d89c55409bc8e11458fa65c2b8c796f6 (diff) | |
download | bcm5719-llvm-d0604672d9c1dc04e54761bcbdab973efa69a4ab.tar.gz bcm5719-llvm-d0604672d9c1dc04e54761bcbdab973efa69a4ab.zip |
Treat [[gnu::__const]] the same as [[gnu::const]]. GCC's tokenizer can't tell
the difference.
llvm-svn: 193582
Diffstat (limited to 'clang/test')
-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()); } +} |