]> granicus.if.org Git - clang/commitdiff
Add a testcase for PR7434, which is a bug we no longer appear to have.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 11 Jun 2013 20:38:45 +0000 (20:38 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 11 Jun 2013 20:38:45 +0000 (20:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183787 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/access.cpp

index fa89ce6b13f4c0b9ce9a8700a2f7775164e5251c..5ccd418c1b767320a17c47ab91d3b7dfc1e5f381 100644 (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}}
+    };
+  }
+}