diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-23 23:12:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-23 23:12:31 +0000 |
commit | 0369c57ac6794c82ef3b35f2e6cae9e46debc4f7 (patch) | |
tree | 8045f39374ddfcbefd84641a38bbe9021cecaf51 /clang/test/Sema/tentative-decls.c | |
parent | e6447ef98952cb38c8fcde42523406bb9dd7359a (diff) | |
download | bcm5719-llvm-0369c57ac6794c82ef3b35f2e6cae9e46debc4f7.tar.gz bcm5719-llvm-0369c57ac6794c82ef3b35f2e6cae9e46debc4f7.zip |
Make all the 'redefinition' diagnostics more consistent, and make the
"previously defined here" diagnostics all notes.
llvm-svn: 59920
Diffstat (limited to 'clang/test/Sema/tentative-decls.c')
-rw-r--r-- | clang/test/Sema/tentative-decls.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/Sema/tentative-decls.c b/clang/test/Sema/tentative-decls.c index 3a2fd5a235d..0e4b13a8434 100644 --- a/clang/test/Sema/tentative-decls.c +++ b/clang/test/Sema/tentative-decls.c @@ -9,12 +9,12 @@ const int b [1] = {1}; extern const int c[] = {1}; // expected-warning{{'extern' variable has an initializer}} const int c[]; -int i1 = 1; // expected-error{{previous definition is here}} -int i1 = 2; // expected-error{{redefinition of 'i1'}} // expected-error{{previous definition is here}} +int i1 = 1; // expected-note {{previous definition is here}} +int i1 = 2; // expected-error {{redefinition of 'i1'}} // expected-note {{previous definition is here}} int i1; int i1; -extern int i1; // expected-error{{previous definition is here}} -static int i1; // expected-error{{static declaration of 'i1' follows non-static declaration}} expected-error{{previous definition is here}} +extern int i1; // expected-note {{previous definition is here}} +static int i1; // expected-error{{static declaration of 'i1' follows non-static declaration}} expected-note {{previous definition is here}} int i1 = 3; // expected-error{{redefinition of 'i1'}} expected-error{{non-static declaration of 'i1' follows static declaration}} __private_extern__ int pExtern; @@ -28,11 +28,11 @@ int (*pToArray)[]; int (*pToArray)[8]; int redef[10]; -int redef[]; // expected-error{{previous definition is here}} +int redef[]; // expected-note {{previous definition is here}} int redef[11]; // expected-error{{redefinition of 'redef'}} void func() { - extern int i1; // expected-error{{previous definition is here}} + extern int i1; // expected-note {{previous definition is here}} static int i1; // expected-error{{static declaration of 'i1' follows non-static declaration}} } |