[PATCH] MS ABI: Downgrade inheritance model mismatches to a warning sometimes
David Majnemer
david.majnemer at gmail.com
Sat Jul 26 19:55:05 PDT 2014
Hi rnk, rsmith,
A polymorphic class with a single base class uses a multiple inheritance
model, not a single inheritance model. However, a pointer-to-member
field may appear before we know that there are any virtual methods.
We will, wrongly, assign the class a single-inheritance
pointer-to-member representation. Later on, we will check to see what
representation it actually got and issue a diagnostic.
Downgrade this diagnostic to a warning *if* the selection of inheritance
model is implicit.
This fixes PR20464.
tl;dr
A derived class, a base class, a virtual method and a pointer-to-member
walk into a bar. The pointer-to-member ruins the experience for
everyone.
http://reviews.llvm.org/D4687
Files:
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclAttr.cpp
test/SemaCXX/member-pointer-ms.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4687.11921.patch
Type: text/x-patch
Size: 6123 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140727/fe991bdf/attachment.bin>
More information about the cfe-commits
mailing list