]> granicus.if.org Git - clang/commit
[MS ABI] Detect and diagnose vftables which cannot be created
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 1 May 2015 21:35:45 +0000 (21:35 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 1 May 2015 21:35:45 +0000 (21:35 +0000)
commit9a9c87baad47937aaa1f6ca78fa799ab31e970af
treefe84279a4ab1dbfa17d988297be02e83ba77c97c
parent205632097d35d56fa911461686528ff91d46e259
[MS ABI] Detect and diagnose vftables which cannot be created

The MSVC ABI has a bug introduced by appending to the end of vftables
which come from virtual bases: covariant thunks introduces via
non-overlapping regions of the inheritance lattice both append to the
same slot in the vftable.

It is possible to generate correct vftables in cases where one node in
the lattice completely dominates the other on the way to the base with
the vfptr; in all other cases, we must raise a diagnostic in order to
prevent the illusion that we succeeded in laying out the vftable.

This fixes PR16759.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236354 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticASTKinds.td
include/clang/Basic/DiagnosticIDs.h
lib/AST/VTableBuilder.cpp