Ignore:
Timestamp:
Nov 13, 2017, 12:13:00 PM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
c0d00b6
Parents:
10dc6908
Message:

Update comment in getDtorFunc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInit.cc

    r10dc6908 r9d06142  
    655655                DeclarationWithType * getDtorFunc( ObjectDecl * objDecl, Statement * input, std::list< Statement * > & stmtsToAdd ) {
    656656                        // unwrap implicit statement wrapper
     657                        Statement * dtor = input;
     658                        if ( ImplicitCtorDtorStmt * implicit = dynamic_cast< ImplicitCtorDtorStmt * >( input ) ) {
     659                                // dtor = implicit->callStmt;
     660                                // implicit->callStmt = nullptr;
     661                        }
    657662                        assert( dtor );
    658663                        std::list< Expression * > matches;
     
    689694                        Type * base = replacement->result->stripReferences();
    690695                        if ( dynamic_cast< ArrayType * >( base ) || dynamic_cast< TupleType * > ( base ) ) {
    691                                 // need to cast away reference for array types, since the destructor is generated without the reference type
     696                                // need to cast away reference for array types, since the destructor is generated without the reference type,
     697                                // and for tuple types since tuple indexing does not work directly on a reference
    692698                                replacement = new CastExpr( replacement, base->clone() );
    693699                        }
Note: See TracChangeset for help on using the changeset viewer.