Changeset 21ae786 for src/ResolvExpr


Ignore:
Timestamp:
Apr 27, 2016, 5:17:36 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
1ad1c99
Parents:
4ffdd63
Message:

remove fallback to C style initializer if overridable constructor is found during expression resolution

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    r4ffdd63 r21ae786  
    1010// Created On       : Sun May 17 12:17:01 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu Apr 14 11:18:12 2016
     12// Last Modified On : Tue Apr 26 16:08:21 2016
    1313// Update Count     : 203
    1414//
     
    496496                }
    497497
    498                 if ( ExprStmt * exprStmt = dynamic_cast< ExprStmt * > ( ctorInit->get_ctor() ) ) {
    499                         ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( exprStmt->get_expr() );
    500                         assert( appExpr );
    501                         VariableExpr * function = dynamic_cast< VariableExpr * > ( appExpr->get_function() );
    502                         assert( function );
    503                         if ( LinkageSpec::isOverridable( function->get_var()->get_linkage() ) ) {
    504                                 // if the constructor that was found is intrinsic or autogenerated, reset to C-style
    505                                 // initializer so that code generation is easy to handle
    506                                 fallbackInit( ctorInit );
    507                                 return;
    508                         }
    509                 }
    510498                // found a constructor - can get rid of C-style initializer
    511499                delete ctorInit->get_init();
Note: See TracChangeset for help on using the changeset viewer.