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
diff --git a/clang/test/Sema/decl-invalid.c b/clang/test/Sema/decl-invalid.c
index e14bc98..051f0f7 100644
--- a/clang/test/Sema/decl-invalid.c
+++ b/clang/test/Sema/decl-invalid.c
@@ -20,3 +20,10 @@
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}}
+