Changeset 19a9822 for src/InitTweak


Ignore:
Timestamp:
Aug 25, 2017, 11:17:08 AM (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:
07516b56
Parents:
f676b84
Message:

Handle ConstructorExpr? in InitTweak::getFunctionName [fixes #36]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/InitTweak.cc

    rf676b84 r19a9822  
    450450                        } else if ( ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( func ) ) {
    451451                                return handleDerefName( appExpr );
     452                        } else if ( ConstructorExpr * ctorExpr = dynamic_cast< ConstructorExpr * >( func ) ) {
     453                                return funcName( getCallArg( ctorExpr->get_callExpr(), 0 ) );
    452454                        } else {
    453                                 assertf( false, "Unexpected expression type being called as a function in call expression" );
     455                                assertf( false, "Unexpected expression type being called as a function in call expression: %s", toString( func ).c_str() );
    454456                        }
    455457                }
Note: See TracChangeset for help on using the changeset viewer.