forked from OSchip/llvm-project
Add test case from PR6952, which now works (thanks to Gabor).
llvm-svn: 112477
This commit is contained in:
parent
2c7d9290ee
commit
cfcb942267
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue