summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/attr-nodebug.c
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2012-07-24 01:40:49 +0000
committerNick Lewycky <nicholas@mxc.ca>2012-07-24 01:40:49 +0000
commit085970736f7e7c12bf592da908db5d31c09aa8c9 (patch)
tree6c7d28ce696870c7198652627d6e69d11ced7df4 /clang/test/Sema/attr-nodebug.c
parentcfb4517cc0df43b61d3dff5f2286d568f25804a5 (diff)
downloadbcm5719-llvm-085970736f7e7c12bf592da908db5d31c09aa8c9.tar.gz
bcm5719-llvm-085970736f7e7c12bf592da908db5d31c09aa8c9.zip
Emit debug info for dynamic initializers. Permit __attribute__((nodebug)) on
variables that have static storage duration, it removes debug info on the emitted initializer function but not all debug info about this variable. llvm-svn: 160659
Diffstat (limited to 'clang/test/Sema/attr-nodebug.c')
-rw-r--r--clang/test/Sema/attr-nodebug.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/test/Sema/attr-nodebug.c b/clang/test/Sema/attr-nodebug.c
index a66e96168dd..3cc4088e4b3 100644
--- a/clang/test/Sema/attr-nodebug.c
+++ b/clang/test/Sema/attr-nodebug.c
@@ -1,8 +1,11 @@
// RUN: %clang_cc1 %s -verify -fsyntax-only
-int a __attribute__((nodebug)); // expected-warning {{'nodebug' attribute only applies to functions}}
+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}}
-
OpenPOWER on IntegriCloud