summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/test/CXX/drs/dr3xx.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/CXX/drs/dr3xx.cpp b/clang/test/CXX/drs/dr3xx.cpp
index 0de2d495a34..9a5e51a78c7 100644
--- a/clang/test/CXX/drs/dr3xx.cpp
+++ b/clang/test/CXX/drs/dr3xx.cpp
@@ -906,6 +906,25 @@ namespace dr372 { // dr372: no
};
};
}
+
+ // FIXME: This is valid: deriving from A gives D access to A::B
+ namespace std_example {
+ class A {
+ protected:
+ struct B {}; // expected-note {{here}}
+ };
+ struct D : A::B, A {}; // expected-error {{protected}}
+ }
+
+ // FIXME: This is valid: deriving from A::B gives access to A::B!
+ namespace badwolf {
+ class A {
+ protected:
+ struct B; // expected-note {{here}}
+ };
+ struct A::B : A {};
+ struct C : A::B {}; // expected-error {{protected}}
+ }
}
namespace dr373 { // dr373: 5
OpenPOWER on IntegriCloud