[PATCH] D26559: Insert a type check before reading vtable.

Ivan Krasin via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 15 17:03:35 PST 2016


krasin marked 2 inline comments as done.
krasin added inline comments.


================
Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1820-1833
+  ASTContext &Context = getContext();
+  SourceLocation CallLoc = CE ? CE->getLocStart() : SourceLocation();
+  CGF.EmitTypeCheck(CodeGenFunction::TCK_MemberCall,
+                    CallLoc, This.getPointer(),
+                    Context.getRecordType(Dtor->getParent()));
+
   // We have only one destructor in the vftable but can get both behaviors
----------------
pcc wrote:
> If you undo this part do the tests still pass?
Thank you for the catch. Yes, the other check covers this case too. Reverted this file.


https://reviews.llvm.org/D26559





More information about the cfe-commits mailing list