From d0604672d9c1dc04e54761bcbdab973efa69a4ab Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Tue, 29 Oct 2013 03:33:57 +0000 Subject: Treat [[gnu::__const]] the same as [[gnu::const]]. GCC's tokenizer can't tell the difference. llvm-svn: 193582 --- clang/test/Parser/cxx0x-attributes.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'clang/test/Parser/cxx0x-attributes.cpp') 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()); } +} -- cgit v1.2.3