I renamed test/Sema/attr-nodebug.c to *.cpp and added a method with
__attribute__((nodebug)) to verify the attribute is accepted on a method.
I was going to modify test/CodeGen/attr-nodebug.c in a similar way, but
doing that exposed a bug, which I filed as PR14146.
--paulr
Index: test/Sema/attr-nodebug.c
===================================================================
--- test/Sema/attr-nodebug.c (revision 166444)
+++ test/Sema/attr-nodebug.c (working copy)
@@ -1,11 +0,0 @@
-// RUN: %clang_cc1 %s -verify -fsyntax-only
-
-int a __attribute__((nodebug));
-
-void b() {
- int b __attribute__((nodebug)); // expected-warning {{'nodebug' only applies
to variables with static storage duration and functions}}
-}
-
-void t1() __attribute__((nodebug));
-
-void t2() __attribute__((nodebug(2))); // expected-error {{attribute takes no
arguments}}
Index: test/Sema/attr-nodebug.cpp
===================================================================
--- test/Sema/attr-nodebug.cpp (revision 165815)
+++ test/Sema/attr-nodebug.cpp (working copy)
@@ -9,3 +9,7 @@
void t1() __attribute__((nodebug));
void t2() __attribute__((nodebug(2))); // expected-error {{attribute takes no
arguments}}
+
+class c {
+ void t3() __attribute__((nodebug));
+};
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits