]> granicus.if.org Git - clang/commitdiff
add a slight variation of test3, where
authorGabor Greif <ggreif@gmail.com>
Fri, 26 Mar 2010 08:26:30 +0000 (08:26 +0000)
committerGabor Greif <ggreif@gmail.com>
Fri, 26 Mar 2010 08:26:30 +0000 (08:26 +0000)
argument list seems to be different, but in fact
is semantically equivalent; check that we do not error here

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99617 91177308-0d34-0410-b5e6-96231b3b80d8

test/CXX/class.access/class.friend/p1.cpp

index 1dea44f7d934b4c261065ac76346418ebd914975..22266cd8f8fcdb8ff1644762638919ab92dbc873 100644 (file)
@@ -166,6 +166,18 @@ namespace test3 {
   }
 }
 
+namespace test3a {
+  class A { protected: int x; };
+
+  class B : public A {
+    friend int foo(B*);
+  };
+
+  int foo(B * const p) {
+    return p->x;
+  }
+}
+
 namespace test4 {
   template <class T> class Holder {
     T object;