]> granicus.if.org Git - clang/commitdiff
The nodebug attribute has a C++11-style spelling supported by GCC as well. This modif...
authorAaron Ballman <aaron@aaronballman.com>
Tue, 21 Oct 2014 15:46:57 +0000 (15:46 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 21 Oct 2014 15:46:57 +0000 (15:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220297 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/Attr.td
test/SemaCXX/attr-nodebug.cpp

index cc9629334c3302c5ea6575144b0fcec38c17b97a..012988b9327af8883d7265e05d178d7b3f0c6d4b 100644 (file)
@@ -835,7 +835,7 @@ def NoCommon : InheritableAttr {
 }
 
 def NoDebug : InheritableAttr {
-  let Spellings = [GNU<"nodebug">];
+  let Spellings = [GCC<"nodebug">];
   let Documentation = [Undocumented];
 }
 
index b441da21f8e7a6f9adb1bd1ce2befa7f81803672..fd35722f62b1cc659ca30b978e02e2dbfbe41610 100644 (file)
@@ -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() {}