]> granicus.if.org Git - clang/commitdiff
Test case for r102578.
authorJohn McCall <rjmccall@apple.com>
Thu, 29 Apr 2010 01:20:45 +0000 (01:20 +0000)
committerJohn McCall <rjmccall@apple.com>
Thu, 29 Apr 2010 01:20:45 +0000 (01:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102580 91177308-0d34-0410-b5e6-96231b3b80d8

test/CXX/class.access/p6.cpp

index 814265d0b049d463f9fe02807162421af7ba60da..734a4d8c486922b7679c9e27737ec6faaa07df88 100644 (file)
@@ -105,3 +105,17 @@ namespace test3 {
     Outer::A<B, Blue>::foo(); // expected-error {{no member named 'foo'}}
   }
 }
+
+namespace test4 {
+  template <class T> class A {
+  private: typedef int type;
+    template <class U> friend void foo(U &, typename U::type);
+  };
+
+  template <class U> void foo(U &, typename U::type) {}
+  
+  void test() {
+    A<int> a;
+    foo(a, 0);
+  }
+}