summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/decl-invalid.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-05-12 21:44:00 +0000
committerChris Lattner <sabre@nondot.org>2009-05-12 21:44:00 +0000
commitd98e7cf7c10d3569b6d95af2d2f2ce11cd8ef5ba (patch)
tree7d41245f1bdef7e107241b60e876d8a50e0ada5e /clang/test/Sema/decl-invalid.c
parent36312bb5ee3afe2b71c6a678929184c2962b8d41 (diff)
downloadbcm5719-llvm-d98e7cf7c10d3569b6d95af2d2f2ce11cd8ef5ba.tar.gz
bcm5719-llvm-d98e7cf7c10d3569b6d95af2d2f2ce11cd8ef5ba.zip
improve the diagnostic for uses of the GCC "global variable in a register" extension.
This implements rdar://6880449 - improve diagnostic for usage of "global register variable" GCC extension llvm-svn: 71599
Diffstat (limited to 'clang/test/Sema/decl-invalid.c')
-rw-r--r--clang/test/Sema/decl-invalid.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Sema/decl-invalid.c b/clang/test/Sema/decl-invalid.c
index e14bc9891a4..051f0f7ffbc 100644
--- a/clang/test/Sema/decl-invalid.c
+++ b/clang/test/Sema/decl-invalid.c
@@ -20,3 +20,10 @@ const int; // expected-error {{declaration does not declare anything}}
struct; // expected-error {{declaration of anonymous struct must be a definition}} // expected-error {{declaration does not declare anything}}
typedef int I;
I; // expected-error {{declaration does not declare anything}}
+
+
+
+// rdar://6880449
+register int test1; // expected-error {{illegal storage class on file-scoped variable}}
+register int test2 __asm__("edi"); // expected-error {{global register variables are not supported}}
+
OpenPOWER on IntegriCloud