diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-10-07 17:30:37 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-10-07 17:30:37 +0000 |
commit | 0a4074768a6ecd81513f0db02bfb0e96ab3e56a0 (patch) | |
tree | a5f624416a553d43f5d0d42f8cc3a533d2b2cad2 /test/CXX/temp/temp.spec/temp.expl.spec | |
parent | ca4fb04b5c43f866c095a3bcc14e02a150da2568 (diff) | |
download | clang-0a4074768a6ecd81513f0db02bfb0e96ab3e56a0.tar.gz |
Diagnose explicit instantiations and specializations that occur in class scope
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83473 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/temp/temp.spec/temp.expl.spec')
-rw-r--r-- | test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp index 7b50518605..77df60a25d 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp @@ -38,6 +38,12 @@ namespace N1 { template<> void N0::f0(double) { } // expected-error{{originally be declared}} +struct X1 { + template<typename T> void f(T); + + template<> void f(int); // expected-error{{in class scope}} +}; + // -- class template namespace N0 { |