Add a testcase for PR7434, which is a bug we no longer appear to have.

llvm-svn: 183787
This commit is contained in:
Richard Smith 2013-06-11 20:38:45 +00:00
parent cf833e4c7c
commit 389790a270
1 changed files with 28 additions and 0 deletions

View File

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