diff options
Diffstat (limited to 'clang/test')
4 files changed, 6 insertions, 5 deletions
diff --git a/clang/test/CXX/temp/temp.spec/cxx1y-variable-template-no-body.cpp b/clang/test/CXX/temp/temp.spec/cxx1y-variable-template-no-body.cpp index 4cff1e2e9df..edaae9f49d0 100644 --- a/clang/test/CXX/temp/temp.spec/cxx1y-variable-template-no-body.cpp +++ b/clang/test/CXX/temp/temp.spec/cxx1y-variable-template-no-body.cpp @@ -20,7 +20,7 @@ template<typename T> T pi0 = T(3.1415926535897932385); // expected-note {{previous definition is here}} template int pi0 = 10; // expected-error {{variable cannot be defined in an explicit instantiation; if this declaration is meant to be a variable definition, remove the 'template' keyword}} \ - expected-error{{redefinition of 'pi0' with a different type: 'int' vs 'T'}} + expected-error{{redefinition of 'pi0' as different kind of symbol}} #endif template<typename T> diff --git a/clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp b/clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp index 3844ec99458..d12feeff0bb 100644 --- a/clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp +++ b/clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp @@ -163,8 +163,7 @@ namespace PR9877 { template<> struct X<1>::Y { static const int Z = 1; }; const int X<0>::Y::Z; - template<> const int X<1>::Y::Z; // expected-error{{extraneous 'template<>' in declaration of variable 'Z'}} \ - // expected-error{{forward declaration of variable template cannot have a nested name specifier}} + template<> const int X<1>::Y::Z; // expected-error{{extraneous 'template<>' in declaration of variable 'Z'}} } namespace PR9913 { diff --git a/clang/test/PCH/cxx1y-variable-templates.cpp b/clang/test/PCH/cxx1y-variable-templates.cpp index 8bc2129ebd5..0c600b29d39 100644 --- a/clang/test/PCH/cxx1y-variable-templates.cpp +++ b/clang/test/PCH/cxx1y-variable-templates.cpp @@ -168,5 +168,4 @@ namespace spec_join1 { int* intpb = vd<int>; } - #endif diff --git a/clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp b/clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp index dc721ce10fd..82e3c116aad 100644 --- a/clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp +++ b/clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp @@ -72,7 +72,7 @@ namespace odr_tmpl { } namespace pvt_cv { template<typename T> T v; // expected-note {{previous definition is here}} - int v; // expected-error {{redefinition of 'v' with a different type: 'int' vs 'T'}} + int v; // expected-error {{redefinition of 'v' as different kind of symbol}} } namespace pvt_cvt { template<typename T> T v0; // expected-note {{previous definition is here}} @@ -107,6 +107,9 @@ namespace odr_tmpl { #ifdef CXX11 template<typename T> extern auto v; // expected-error {{declaration of variable 'v' with type 'auto' requires an initializer}} #endif + + template<typename T> T var = T(); // expected-note {{previous definition is here}} + extern int var; // expected-error {{redefinition of 'var' as different kind of symbol}} } #ifdef CXX11 |