From 952eddef9aff85b1e92626e89baaf7a360e2ac85 Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 22 Dec 2013 00:07:40 +0000 Subject: Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3): https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841 --- test/SemaCXX/access.cpp | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'test/SemaCXX/access.cpp') diff --git a/test/SemaCXX/access.cpp b/test/SemaCXX/access.cpp index 50f2eff..5ccd418 100644 --- a/test/SemaCXX/access.cpp +++ b/test/SemaCXX/access.cpp @@ -26,9 +26,11 @@ private: namespace test1 { class A { private: - class X; // expected-note {{previously declared 'private' here}} + class X; // expected-note {{previously declared 'private' here}} \ + // expected-note {{previous declaration is here}} public: - class X; // expected-error {{'X' redeclared with 'public' access}} + class X; // expected-error {{'X' redeclared with 'public' access}} \ + // expected-warning {{class member cannot be redeclared}} class X {}; }; } @@ -106,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}} + }; + } +} -- cgit v1.1