diff options
Diffstat (limited to 'clang/test/CXX/temp/temp.spec/temp.explicit/p4.cpp')
-rw-r--r-- | clang/test/CXX/temp/temp.spec/temp.explicit/p4.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/clang/test/CXX/temp/temp.spec/temp.explicit/p4.cpp b/clang/test/CXX/temp/temp.spec/temp.explicit/p4.cpp index 09c428e01df..0a8a0ce9ff1 100644 --- a/clang/test/CXX/temp/temp.spec/temp.explicit/p4.cpp +++ b/clang/test/CXX/temp/temp.spec/temp.explicit/p4.cpp @@ -1,4 +1,5 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s template<typename T> void f0(T); // expected-note{{here}} template void f0(int); // expected-error{{explicit instantiation of undefined function template}} @@ -17,19 +18,19 @@ template void X0<int>::f1(); // expected-error{{explicit instantiation of undefi template int X0<int>::value; // expected-error{{explicit instantiation of undefined static data member}} template<> void f0(long); // expected-note{{previous template specialization is here}} -template void f0(long); // expected-warning{{explicit instantiation of 'f0<long>' that occurs after an explicit specialization will be ignored}} +template void f0(long); // expected-warning{{explicit instantiation of 'f0<long>' that occurs after an explicit specialization has no effect}} template<> void X0<long>::f1(); // expected-note{{previous template specialization is here}} -template void X0<long>::f1(); // expected-warning{{explicit instantiation of 'f1' that occurs after an explicit specialization will be ignored}} +template void X0<long>::f1(); // expected-warning{{explicit instantiation of 'f1' that occurs after an explicit specialization has no effect}} template<> struct X0<long>::Inner; // expected-note{{previous template specialization is here}} -template struct X0<long>::Inner; // expected-warning{{explicit instantiation of 'Inner' that occurs after an explicit specialization will be ignored}} +template struct X0<long>::Inner; // expected-warning{{explicit instantiation of 'Inner' that occurs after an explicit specialization has no effect}} template<> long X0<long>::value; // expected-note{{previous template specialization is here}} -template long X0<long>::value; // expected-warning{{explicit instantiation of 'value' that occurs after an explicit specialization will be ignored}} +template long X0<long>::value; // expected-warning{{explicit instantiation of 'value' that occurs after an explicit specialization has no effect}} template<> struct X0<double>; // expected-note{{previous template specialization is here}} -template struct X0<double>; // expected-warning{{explicit instantiation of 'X0<double>' that occurs after an explicit specialization will be ignored}} +template struct X0<double>; // expected-warning{{explicit instantiation of 'X0<double>' that occurs after an explicit specialization has no effect}} // PR 6458 namespace test0 { @@ -43,6 +44,6 @@ namespace test0 { // inappropriately instantiating this template. void *ptr = x; } - extern template class foo<char>; // expected-warning {{extern templates are a C++11 extension}} + extern template class foo<char>; // expected-warning 0-1{{extern templates are a C++11 extension}} template class foo<char>; } |