r281136 - Add missing test coverage for an inheritance model attrib merge diag.

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 10 06:04:01 PDT 2016


Author: nico
Date: Sat Sep 10 08:03:59 2016
New Revision: 281136

URL: http://llvm.org/viewvc/llvm-project?rev=281136&view=rev
Log:
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().

Modified:
    cfe/trunk/test/SemaCXX/member-pointer-ms.cpp

Modified: cfe/trunk/test/SemaCXX/member-pointer-ms.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/member-pointer-ms.cpp?rev=281136&r1=281135&r2=281136&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/member-pointer-ms.cpp (original)
+++ cfe/trunk/test/SemaCXX/member-pointer-ms.cpp Sat Sep 10 08:03:59 2016
@@ -291,3 +291,11 @@ static_assert(sizeof(int SingleInheritan
 
 #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}}
+}




More information about the cfe-commits mailing list