From: Nico Weber Date: Sat, 10 Sep 2016 13:03:59 +0000 (+0000) Subject: Add missing test coverage for an inheritance model attrib merge diag. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=081569d9a29c7bc827b2d41f8e62891bbc895e2f;p=clang Add missing test coverage for an inheritance model attrib merge diag. Without this, no tests fail if I remove the Diag() in the first if in Sema::mergeMSInheritanceAttr(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281136 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaCXX/member-pointer-ms.cpp b/test/SemaCXX/member-pointer-ms.cpp index 83aeb019ca..c8059acd67 100644 --- a/test/SemaCXX/member-pointer-ms.cpp +++ b/test/SemaCXX/member-pointer-ms.cpp @@ -291,3 +291,11 @@ static_assert(sizeof(int SingleInheritanceAsVirtualBeforePragma::*) == 12, ""); #pragma pointers_to_members(single) // expected-error{{unexpected 'single'}} #endif + +namespace merging { +struct __single_inheritance S; +struct __single_inheritance S; + +struct __single_inheritance M; // expected-note{{previous inheritance model specified here}} +struct __multiple_inheritance M; // expected-error{{inheritance model does not match previous declaration}} +}