From 265c902d9bfa0c2b32b1667771b96197994694d0 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.) llvm-svn: 184402 --- clang/test/CXX/drs/dr0xx.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/clang/test/CXX/drs/dr0xx.cpp b/clang/test/CXX/drs/dr0xx.cpp index 967a2baaa305..7df3d7eb6c82 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 -- GitLab