[PATCH] Fix an assertion failure trying to emit a trivial destructor in ObjC++

Ben Langmuir blangmuir at apple.com
Mon Sep 15 09:47:34 PDT 2014


Hi John,

This patch fixes the assertion failure I talked to you about in Objective C++ codegen.  It turned out to have nothing to do with templates.

    Fix an assertion failure trying to emit a trivial destructor in ObjC++
    
    If a base class declares a destructor, we will add the implicit
    destructor for the subclass in
    ActOnFields -> AddImplicitlyDeclaredMembersToClass
    
    But in Objective C++, we did not compute whether we have a trivial
    destructor until after that in
    CXXRecordDecl::completeDefinition()
    
    This was leading to a mismatch between the class, which thought it had
    no trivial destructor, and the CXXDestructorDecl, which considered
    itself trivial.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: rdar18249673.patch
Type: application/octet-stream
Size: 2970 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140915/03393509/attachment.obj>


More information about the cfe-commits mailing list