Changeset d3e4d6c for src/InitTweak/InitTweak.cc
- Timestamp:
- Aug 23, 2017, 6:22:07 PM (8 years ago)
- 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:
- 87e08e24, cb811ac
- Parents:
- 9f07232 (diff), bd37119 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cc
r9f07232 rd3e4d6c 187 187 188 188 UntypedExpr * increment = new UntypedExpr( new NameExpr( "++?" ) ); 189 increment->get_args().push_back( new AddressExpr( index->clone()) );189 increment->get_args().push_back( index->clone() ); 190 190 *out++ = new ExprStmt( noLabels, increment ); 191 191 } … … 397 397 template<typename CallExpr> 398 398 Expression *& callArg( CallExpr * callExpr, unsigned int pos ) { 399 if ( pos >= callExpr->get_args().size() ) assertf( false, " asking for argument that doesn't exist. Return NULL/throw exception?");399 if ( pos >= callExpr->get_args().size() ) assertf( false, "getCallArg for argument that doesn't exist: (%u); %s.", pos, toString( callExpr ).c_str() ); 400 400 for ( Expression *& arg : callExpr->get_args() ) { 401 401 if ( pos == 0 ) return arg; … … 475 475 } else if ( ArrayType * arrayType = dynamic_cast< ArrayType * >( type ) ) { 476 476 return arrayType->get_base(); 477 } else if ( ReferenceType * refType = dynamic_cast< ReferenceType * >( type ) ) { 478 return refType->get_base(); 477 479 } else { 478 480 return NULL; … … 560 562 if ( ftype->get_parameters().size() != 2 ) return 0; 561 563 562 Type * t1 = ftype->get_parameters().front()->get_type();564 Type * t1 = getPointerBase( ftype->get_parameters().front()->get_type() ); 563 565 Type * t2 = ftype->get_parameters().back()->get_type(); 564 PointerType * ptrType = dynamic_cast< PointerType * > ( t1 ); 565 assert( ptrType ); 566 567 if ( ResolvExpr::typesCompatibleIgnoreQualifiers( ptrType->get_base(), t2, SymTab::Indexer() ) ) { 566 assert( t1 ); 567 568 if ( ResolvExpr::typesCompatibleIgnoreQualifiers( t1, t2, SymTab::Indexer() ) ) { 568 569 return function; 569 570 } else {
Note:
See TracChangeset
for help on using the changeset viewer.