Add regression test for PR12331.

llvm-svn: 185453
This commit is contained in:
Richard Smith 2013-07-02 18:08:50 +00:00
parent 3fc9ef22b3
commit 5001ec9190
1 changed files with 9 additions and 0 deletions

View File

@ -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}}
}