Changeset 05807e9


Ignore:
Timestamp:
Sep 22, 2017, 1:47:35 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
8b11840
Parents:
22bc276
Message:

Skip generating member constructors for unconstructable members.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInit.cc

    r22bc276 r05807e9  
    339339                                } else if ( DeclarationWithType * funcDecl = dynamic_cast< DeclarationWithType * > ( function->get_var() ) ) {
    340340                                        FunctionType * ftype = dynamic_cast< FunctionType * >( GenPoly::getFunctionType( funcDecl->get_type() ) );
    341                                         assert( ftype );
     341                                        assertf( ftype, "Function call without function type: %s", toString( funcDecl ).c_str() );
    342342                                        if ( CodeGen::isConstructor( funcDecl->get_name() ) && ftype->get_parameters().size() == 2 ) {
    343343                                                Type * t1 = getPointerBase( ftype->get_parameters().front()->get_type() );
     
    10141014                                        // skip non-DWT members
    10151015                                        if ( ! field ) continue;
     1016                                        // skip non-constructable members
     1017                                        if ( ! tryConstruct( field ) ) continue;
    10161018                                        // skip handled members
    10171019                                        if ( ! unhandled.count( field ) ) continue;
Note: See TracChangeset for help on using the changeset viewer.