diff options
Diffstat (limited to 'clang/test/CXX/class.access/p4.cpp')
-rw-r--r-- | clang/test/CXX/class.access/p4.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/clang/test/CXX/class.access/p4.cpp b/clang/test/CXX/class.access/p4.cpp index a2d0da1a832..6d452d8199e 100644 --- a/clang/test/CXX/class.access/p4.cpp +++ b/clang/test/CXX/class.access/p4.cpp @@ -514,12 +514,16 @@ namespace test17 { } namespace test18 { - template <class T> class A {}; // expected-note {{member is declared here}} - class B : A<int> { // expected-note {{constrained by implicitly private inheritance here}} + template <class T> class A {}; + class B : A<int> { A<int> member; }; + + // FIXME: this access to A should be forbidden (because C++ is dumb), + // but LookupResult can't express the necessary information to do + // the check, so we aggressively suppress access control. class C : B { - A<int> member; // expected-error {{'A' is a private member of 'test18::A<int>'}} + A<int> member; }; } |