diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-04-05 21:49:20 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-04-05 21:49:20 +0000 |
| commit | c9c3a004ae06cbbf4a8bd9724ccf0a6272e83ac6 (patch) | |
| tree | 556578722a7006234ca3933546a9d3b372146e9d /clang/test | |
| parent | 4cc3827791c8b9c17ca821fcdec9083ae0c6ebbe (diff) | |
| download | bcm5719-llvm-c9c3a004ae06cbbf4a8bd9724ccf0a6272e83ac6.tar.gz bcm5719-llvm-c9c3a004ae06cbbf4a8bd9724ccf0a6272e83ac6.zip | |
Add a couple more tests for DR372.
llvm-svn: 329352
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CXX/drs/dr3xx.cpp | 19 |
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 |

