]> granicus.if.org Git - clang/commitdiff
Add missing test coverage for an inheritance model attrib merge diag.
authorNico Weber <nicolasweber@gmx.de>
Sat, 10 Sep 2016 13:03:59 +0000 (13:03 +0000)
committerNico Weber <nicolasweber@gmx.de>
Sat, 10 Sep 2016 13:03:59 +0000 (13:03 +0000)
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

test/SemaCXX/member-pointer-ms.cpp

index 83aeb019ca81becf6128af94b17eea0398c4c334..c8059acd6737bdac3328022ad50a959d6e495c79 100644 (file)
@@ -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}}
+}