From: Richard Smith Date: Tue, 11 Jun 2013 20:38:45 +0000 (+0000) Subject: Add a testcase for PR7434, which is a bug we no longer appear to have. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=edcf5112a571e622c88dbd1634867c386425718c;p=clang Add a testcase for PR7434, which is a bug we no longer appear to have. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183787 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaCXX/access.cpp b/test/SemaCXX/access.cpp index fa89ce6b13..5ccd418c1b 100644 --- a/test/SemaCXX/access.cpp +++ b/test/SemaCXX/access.cpp @@ -108,3 +108,31 @@ namespace PR15209 { } } } + +namespace PR7434 { + namespace comment0 { + template struct X; + namespace N { + class Y { + template friend struct X; + int t; // expected-note {{here}} + }; + } + template struct X { + X() { (void)N::Y().t; } // expected-error {{private}} + }; + X 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}} + }; + } +}