diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-07-14 20:08:49 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-07-14 20:08:49 +0000 |
commit | 38a50c0a1620bfee536d292207100678ce7ab471 (patch) | |
tree | a89fd4ec22a767891e535863da4c4d9d59663dcc /clang/test/PCH/cxx1y-variable-templates.cpp | |
parent | f69606b117c9f141469b164f306906485dad78f1 (diff) | |
download | bcm5719-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/PCH/cxx1y-variable-templates.cpp')
-rw-r--r-- | clang/test/PCH/cxx1y-variable-templates.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/PCH/cxx1y-variable-templates.cpp b/clang/test/PCH/cxx1y-variable-templates.cpp index 77eeea22a23..29b66a11e8c 100644 --- a/clang/test/PCH/cxx1y-variable-templates.cpp +++ b/clang/test/PCH/cxx1y-variable-templates.cpp @@ -89,8 +89,8 @@ namespace join { namespace diff_types { #ifdef ERROR - template<typename T> extern T err0; // expected-error {{redefinition of 'err0' with a different type: 'T' vs 'float'}} // expected-note@42 {{previous definition is here}} - template<typename T> extern float err1; // expected-error {{redefinition of 'err1' with a different type: 'float' vs 'T'}} // expected-note@43 {{previous definition is here}} + template<typename T> extern T err0; // expected-error {{redeclaration of 'err0' with a different type: 'T' vs 'float'}} // expected-note@42 {{previous declaration is here}} + template<typename T> extern float err1; // expected-error {{redeclaration of 'err1' with a different type: 'float' vs 'T'}} // expected-note@43 {{previous declaration is here}} #endif template<typename T> extern T def; } |