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 | f411196d15a92f415d6a042b787f8fccc1ffec42 (patch) | |
| tree | 03b3ddd2a53ca2cf004ac0fc21b0bfb52371cce7 /clang/test/SemaCXX/cxx98-compat-pedantic.cpp | |
| parent | f4ef4d2ec5394c5d0967489b9ebdc033f00be321 (diff) | |
| download | bcm5719-llvm-f411196d15a92f415d6a042b787f8fccc1ffec42.tar.gz bcm5719-llvm-f411196d15a92f415d6a042b787f8fccc1ffec42.zip | |
'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.
llvm-svn: 142597
Diffstat (limited to 'clang/test/SemaCXX/cxx98-compat-pedantic.cpp')
| -rw-r--r-- | clang/test/SemaCXX/cxx98-compat-pedantic.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/cxx98-compat-pedantic.cpp b/clang/test/SemaCXX/cxx98-compat-pedantic.cpp index 28fc23a0a76..00532d5ac07 100644 --- a/clang/test/SemaCXX/cxx98-compat-pedantic.cpp +++ b/clang/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}} |

