r185453 - Add regression test for PR12331.
Richard Smith
richard-llvm at metafoo.co.uk
Tue Jul 2 11:08:50 PDT 2013
Author: rsmith
Date: Tue Jul 2 13:08:50 2013
New Revision: 185453
URL: http://llvm.org/viewvc/llvm-project?rev=185453&view=rev
Log:
Add regression test for PR12331.
Modified:
cfe/trunk/test/SemaTemplate/explicit-specialization-member.cpp
Modified: cfe/trunk/test/SemaTemplate/explicit-specialization-member.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/explicit-specialization-member.cpp?rev=185453&r1=185452&r2=185453&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/explicit-specialization-member.cpp (original)
+++ cfe/trunk/test/SemaTemplate/explicit-specialization-member.cpp Tue Jul 2 13:08:50 2013
@@ -19,3 +19,12 @@ namespace PR6161 {
};
numpunct<char>::~numpunct(); // expected-error{{expected the class name after '~' to name a destructor}}
}
+
+namespace PR12331 {
+ template<typename T> struct S {
+ struct U { static const int n = 5; };
+ enum E { e = U::n }; // expected-note {{implicit instantiation first required here}}
+ int arr[e];
+ };
+ template<> struct S<int>::U { static const int n = sizeof(int); }; // expected-error {{explicit specialization of 'U' after instantiation}}
+}
More information about the cfe-commits
mailing list