r220297 - The nodebug attribute has a C++11-style spelling supported by GCC as well. This modifies it so we support that spelling as well.
Aaron Ballman
aaron at aaronballman.com
Tue Oct 21 08:46:57 PDT 2014
Author: aaronballman
Date: Tue Oct 21 10:46:57 2014
New Revision: 220297
URL: http://llvm.org/viewvc/llvm-project?rev=220297&view=rev
Log:
The nodebug attribute has a C++11-style spelling supported by GCC as well. This modifies it so we support that spelling as well.
Modified:
cfe/trunk/include/clang/Basic/Attr.td
cfe/trunk/test/SemaCXX/attr-nodebug.cpp
Modified: cfe/trunk/include/clang/Basic/Attr.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=220297&r1=220296&r2=220297&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Attr.td (original)
+++ cfe/trunk/include/clang/Basic/Attr.td Tue Oct 21 10:46:57 2014
@@ -835,7 +835,7 @@ def NoCommon : InheritableAttr {
}
def NoDebug : InheritableAttr {
- let Spellings = [GNU<"nodebug">];
+ let Spellings = [GCC<"nodebug">];
let Documentation = [Undocumented];
}
Modified: cfe/trunk/test/SemaCXX/attr-nodebug.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/attr-nodebug.cpp?rev=220297&r1=220296&r2=220297&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/attr-nodebug.cpp (original)
+++ cfe/trunk/test/SemaCXX/attr-nodebug.cpp Tue Oct 21 10:46:57 2014
@@ -1,7 +1,9 @@
-// RUN: %clang_cc1 %s -verify -fsyntax-only
+// RUN: %clang_cc1 %s -std=c++11 -verify -fsyntax-only
// Note: most of the 'nodebug' tests are in attr-nodebug.c.
// expected-no-diagnostics
class c {
void t3() __attribute__((nodebug));
};
+
+[[gnu::nodebug]] void f() {}
More information about the cfe-commits
mailing list