diff --git a/clang/test/CXX/drs/dr0xx.cpp b/clang/test/CXX/drs/dr0xx.cpp index 967a2baaa3052f553dab401b9242e79465caf645..7df3d7eb6c82792b2ab100260b146bf8601e2a5e 100644 --- a/clang/test/CXX/drs/dr0xx.cpp +++ b/clang/test/CXX/drs/dr0xx.cpp @@ -66,6 +66,18 @@ namespace dr7 { // dr7: no class X { ~X(); }; // expected-note {{here}} class Y : X { ~Y() {} }; // expected-error {{private destructor}} + + namespace PR16370 { // This regressed the first time DR7 was fixed. + struct S1 { virtual ~S1(); }; + struct S2 : S1 {}; + struct S3 : S2 {}; + struct S4 : virtual S2 {}; + struct S5 : S3, S4 { + S5(); + ~S5(); + }; + S5::S5() {} + } } namespace dr8 { // dr8: dup 45