[cfe-commits] r99617 - /cfe/trunk/test/CXX/class.access/class.friend/p1.cpp

Gabor Greif ggreif at gmail.com
Fri Mar 26 01:26:31 PDT 2010


Author: ggreif
Date: Fri Mar 26 03:26:30 2010
New Revision: 99617

URL: http://llvm.org/viewvc/llvm-project?rev=99617&view=rev
Log:
add a slight variation of test3, where
argument list seems to be different, but in fact
is semantically equivalent; check that we do not error here

Modified:
    cfe/trunk/test/CXX/class.access/class.friend/p1.cpp

Modified: cfe/trunk/test/CXX/class.access/class.friend/p1.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/class.access/class.friend/p1.cpp?rev=99617&r1=99616&r2=99617&view=diff
==============================================================================
--- cfe/trunk/test/CXX/class.access/class.friend/p1.cpp (original)
+++ cfe/trunk/test/CXX/class.access/class.friend/p1.cpp Fri Mar 26 03:26:30 2010
@@ -166,6 +166,18 @@
   }
 }
 
+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;





More information about the cfe-commits mailing list