зеркало из https://github.com/microsoft/clang-1.git
Check in a motivating test for the revised access semantics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100159 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
db73c684ba
Коммит
7bbe5f6bfc
|
@ -56,4 +56,20 @@ namespace test2 {
|
|||
};
|
||||
}
|
||||
|
||||
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче