From fc5335dd8ead65b7dc1dedd75ed32f9e74f229d0 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 20 Jun 2013 07:06:39 +0000 Subject: [PATCH] Add a regression test for PR16370 next to the dr7 test case since they seem closely related. (I'm happy to move this if others have a better idea of where to put it.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184402 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CXX/drs/dr0xx.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/CXX/drs/dr0xx.cpp b/test/CXX/drs/dr0xx.cpp index 967a2baaa3..7df3d7eb6c 100644 --- a/test/CXX/drs/dr0xx.cpp +++ b/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 -- 2.40.0