forked from OSchip/llvm-project
Add a testcase for PR7434, which is a bug we no longer appear to have.
llvm-svn: 183787
This commit is contained in:
parent
cf833e4c7c
commit
389790a270
|
@ -108,3 +108,31 @@ namespace PR15209 {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace PR7434 {
|
||||
namespace comment0 {
|
||||
template <typename T> struct X;
|
||||
namespace N {
|
||||
class Y {
|
||||
template<typename T> friend struct X;
|
||||
int t; // expected-note {{here}}
|
||||
};
|
||||
}
|
||||
template<typename T> struct X {
|
||||
X() { (void)N::Y().t; } // expected-error {{private}}
|
||||
};
|
||||
X<char> x;
|
||||
}
|
||||
namespace comment2 {
|
||||
struct X;
|
||||
namespace N {
|
||||
class Y {
|
||||
friend struct X;
|
||||
int t; // expected-note {{here}}
|
||||
};
|
||||
}
|
||||
struct X {
|
||||
X() { (void)N::Y().t; } // expected-error {{private}}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue