]> granicus.if.org Git - clang/commit
[MS ABI] Fix a crash in vptr path calculation
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 4 May 2015 18:47:54 +0000 (18:47 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 4 May 2015 18:47:54 +0000 (18:47 +0000)
commitc5f7de04898737ece33958489ba4a54552b91794
tree341b0214b702189a94ef34958057e6f0a27f78c2
parent717ef180f73198cc71fb15236a1f1666da9edbc6
[MS ABI] Fix a crash in vptr path calculation

I discovered a case where the old algorithm would crash.  Instead of
trying to patch the algorithm, rewrite it.  The new algorithm operates
in three phases:
1. Find all paths to the subobject with the vptr.
2. Remove paths which are subsets of other paths.
3. Select the best path where 'best' is defined as introducing the most
   covariant overriders.  If two paths introduce different overriders,
   raise a diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236444 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/VTableBuilder.cpp
test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp
test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp