[cfe-commits] r100159 - /cfe/trunk/test/CXX/class.access/class.access.base/p5.cpp
John McCall
rjmccall at apple.com
Thu Apr 1 17:11:49 PDT 2010
Author: rjmccall
Date: Thu Apr 1 19:11:49 2010
New Revision: 100159
URL: http://llvm.org/viewvc/llvm-project?rev=100159&view=rev
Log:
Check in a motivating test for the revised access semantics.
Modified:
cfe/trunk/test/CXX/class.access/class.access.base/p5.cpp
Modified: cfe/trunk/test/CXX/class.access/class.access.base/p5.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/class.access/class.access.base/p5.cpp?rev=100159&r1=100158&r2=100159&view=diff
==============================================================================
--- cfe/trunk/test/CXX/class.access/class.access.base/p5.cpp (original)
+++ cfe/trunk/test/CXX/class.access/class.access.base/p5.cpp Thu Apr 1 19:11:49 2010
@@ -56,4 +56,20 @@
};
}
+namespace test3 {
+ class A {
+ protected: static int x;
+ };
+
+ class B : public A {};
+ class C : private A {
+ int test(B *b) {
+ // x is accessible at C when named in A.
+ // A is an accessible base of B at C.
+ // Therefore this succeeds.
+ return b->x;
+ }
+ };
+}
+
// TODO: flesh out these cases
More information about the cfe-commits
mailing list