diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-06-11 20:38:45 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-06-11 20:38:45 +0000 |
commit | 389790a2700903c6fdc33a00fcfb5a2aa246a47c (patch) | |
tree | 5a7dd770c7a8f678d0eaa04ff38bad63d9b1c72f | |
parent | cf833e4c7c77a3968f278fe2eaf78305c656a19b (diff) | |
download | bcm5719-llvm-389790a2700903c6fdc33a00fcfb5a2aa246a47c.tar.gz bcm5719-llvm-389790a2700903c6fdc33a00fcfb5a2aa246a47c.zip |
Add a testcase for PR7434, which is a bug we no longer appear to have.
llvm-svn: 183787
-rw-r--r-- | clang/test/SemaCXX/access.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/access.cpp b/clang/test/SemaCXX/access.cpp index fa89ce6b13f..5ccd418c1b7 100644 --- a/clang/test/SemaCXX/access.cpp +++ b/clang/test/SemaCXX/access.cpp @@ -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}} + }; + } +} |