r190531 - Added regression tests.
Serge Pavlov
sepavloff at gmail.com
Wed Sep 11 10:04:24 PDT 2013
Author: sepavloff
Date: Wed Sep 11 12:04:24 2013
New Revision: 190531
URL: http://llvm.org/viewvc/llvm-project?rev=190531&view=rev
Log:
Added regression tests.
Modified:
cfe/trunk/test/SemaTemplate/explicit-instantiation.cpp
Modified: cfe/trunk/test/SemaTemplate/explicit-instantiation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/explicit-instantiation.cpp?rev=190531&r1=190530&r2=190531&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/explicit-instantiation.cpp (original)
+++ cfe/trunk/test/SemaTemplate/explicit-instantiation.cpp Wed Sep 11 12:04:24 2013
@@ -106,3 +106,16 @@ class TC1 {
void foo() { }
};
};
+
+namespace PR8020 {
+ template <typename T> struct X { X() {} };
+ template<> struct X<int> { X(); };
+ template X<int>::X() {} // expected-error{{function cannot be defined in an explicit instantiation}}
+}
+
+namespace PR10086 {
+ template void foobar(int i) {} // expected-error{{function cannot be defined in an explicit instantiation}}
+ int func() {
+ foobar(5);
+ }
+}
More information about the cfe-commits
mailing list