summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/var-redecl.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/var-redecl.c')
-rw-r--r--clang/test/Sema/var-redecl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Sema/var-redecl.c b/clang/test/Sema/var-redecl.c
index 0e30aa27137..5ba6965f718 100644
--- a/clang/test/Sema/var-redecl.c
+++ b/clang/test/Sema/var-redecl.c
@@ -60,3 +60,7 @@ int *p=&g19; // expected-error{{use of undeclared identifier 'g19'}} \
static int a;
extern int a; // expected-note {{previous declaration is here}}
int a; // expected-error {{non-static declaration of 'a' follows static declaration}}
+
+void f(int x) { // expected-note {{previous definition is here}}
+ extern int x; // expected-error {{extern declaration of 'x' follows non-extern declaration}}
+}
OpenPOWER on IntegriCloud