From 38a50c0a1620bfee536d292207100678ce7ab471 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Tue, 14 Jul 2015 20:08:49 +0000 Subject: [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 --- clang/test/SemaCXX/array-bound-merge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/test/SemaCXX/array-bound-merge.cpp') 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]'}} -- cgit v1.2.3