summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/array-bound-merge.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-07-14 20:08:49 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-07-14 20:08:49 +0000
commit38a50c0a1620bfee536d292207100678ce7ab471 (patch)
treea89fd4ec22a767891e535863da4c4d9d59663dcc /clang/test/SemaCXX/array-bound-merge.cpp
parentf69606b117c9f141469b164f306906485dad78f1 (diff)
downloadbcm5719-llvm-38a50c0a1620bfee536d292207100678ce7ab471.tar.gz
bcm5719-llvm-38a50c0a1620bfee536d292207100678ce7ab471.zip
[Sema] Emit a better diagnostic when variable redeclarations disagree
We referred to all declaration in definitions in our diagnostic messages which is can be inaccurate. Instead, classify the declaration and emit an appropriate diagnostic for the new declaration and an appropriate note pointing to the old one. This fixes PR24116. llvm-svn: 242190
Diffstat (limited to 'clang/test/SemaCXX/array-bound-merge.cpp')
-rw-r--r--clang/test/SemaCXX/array-bound-merge.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/array-bound-merge.cpp b/clang/test/SemaCXX/array-bound-merge.cpp
index c6085fb0a96..a360d007c3b 100644
--- a/clang/test/SemaCXX/array-bound-merge.cpp
+++ b/clang/test/SemaCXX/array-bound-merge.cpp
@@ -10,5 +10,5 @@ int c[] = {1,2}; // expected-error {{excess elements in array initializer}}
int d[1][]; // expected-error {{array has incomplete element type 'int []'}}
-extern const int e[2]; // expected-note {{previous definition is here}}
+extern const int e[2]; // expected-note {{previous declaration is here}}
int e[] = { 1 }; // expected-error {{redefinition of 'e' with a different type: 'int []' vs 'const int [2]'}}
OpenPOWER on IntegriCloud