Add test case from PR6952, which now works (thanks to Gabor).

llvm-svn: 112477
This commit is contained in:
Douglas Gregor 2010-08-30 14:37:53 +00:00
parent 2c7d9290ee
commit cfcb942267
1 changed files with 18 additions and 0 deletions

View File

@ -8,3 +8,21 @@ struct X1 {
X1<int> x1a;
X1<float> x1b; // expected-note {{in instantiation of}}
template<typename T>
struct X2 {
operator int();
friend void f(int x) { } // expected-error{{redefinition}} \
// expected-note{{previous definition}}
};
int array0[sizeof(X2<int>)];
int array1[sizeof(X2<float>)]; // expected-note{{instantiation of}}
void g() {
X2<int> xi;
f(xi);
X2<float> xf;
f(xf);
}