diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-20 18:35:58 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-20 18:35:58 +0000 |
commit | 9324583ad2afd09db8c9967cd05c4fa44bac9555 (patch) | |
tree | db3dc524af9e6041c57f4f87432733a1a5574f10 /test/SemaCXX/cxx98-compat-pedantic.cpp | |
parent | cb8f951deacd251d9b3a73dc65f341477e039de1 (diff) | |
download | clang-9324583ad2afd09db8c9967cd05c4fa44bac9555.tar.gz |
'extern template' is a C++11 feature. Add an Extension for C++98 (this matches
gcc's behaviour), and a -Wc++98-compat-pedantic warning for C++11.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142597 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/cxx98-compat-pedantic.cpp')
-rw-r--r-- | test/SemaCXX/cxx98-compat-pedantic.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/SemaCXX/cxx98-compat-pedantic.cpp b/test/SemaCXX/cxx98-compat-pedantic.cpp index 28fc23a0a7..00532d5ac0 100644 --- a/test/SemaCXX/cxx98-compat-pedantic.cpp +++ b/test/SemaCXX/cxx98-compat-pedantic.cpp @@ -29,3 +29,6 @@ struct ConvertToInt { operator int(); }; int *ArraySizeConversion = new int[ConvertToInt()]; // expected-warning {{implicit conversion from array size expression of type 'ConvertToInt' to integral type 'int' is incompatible with C++98}} + +template<typename T> class ExternTemplate {}; +extern template class ExternTemplate<int>; // expected-warning {{extern templates are incompatible with C++98}} |