Changes in / [fe26fbf:b4d65c7]
- Location:
- src
- Files:
-
- 4 edited
-
GenPoly/Box.cc (modified) (1 diff)
-
ResolvExpr/AlternativeFinder.cc (modified) (1 diff)
-
SymTab/Mangler.cc (modified) (1 diff)
-
SymTab/Validate.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
rfe26fbf rb4d65c7 1307 1307 } 1308 1308 } 1309 // errors should have been caught by this point, remove initializers from parameters to allow correct codegen of default arguments1310 for ( Declaration * param : functionDecl->get_functionType()->get_parameters() ) {1311 if ( ObjectDecl * obj = dynamic_cast< ObjectDecl * >( param ) ) {1312 delete obj->get_init();1313 obj->set_init( nullptr );1314 }1315 }1316 1309 return functionDecl; 1317 1310 } -
src/ResolvExpr/AlternativeFinder.cc
rfe26fbf rb4d65c7 403 403 // End of actuals - Handle default values 404 404 if ( SingleInit *si = dynamic_cast<SingleInit *>( defaultValue )) { 405 if ( CastExpr * castExpr = dynamic_cast< CastExpr * >( si->get_value() ) ) { 406 // so far, only constant expressions are accepted as default values 407 if ( ConstantExpr *cnstexpr = dynamic_cast<ConstantExpr *>( castExpr->get_arg() ) ) { 408 if ( Constant *cnst = dynamic_cast<Constant *>( cnstexpr->get_constant() ) ) { 409 if ( unify( formalType, cnst->get_type(), resultEnv, resultNeed, resultHave, openVars, indexer ) ) { 410 *out++ = cnstexpr->clone(); 411 return true; 412 } // if 405 // so far, only constant expressions are accepted as default values 406 if ( ConstantExpr *cnstexpr = dynamic_cast<ConstantExpr *>( si->get_value()) ) { 407 if ( Constant *cnst = dynamic_cast<Constant *>( cnstexpr->get_constant() ) ) { 408 if ( unify( formalType, cnst->get_type(), resultEnv, resultNeed, resultHave, openVars, indexer ) ) { 409 // xxx - Don't know if this is right 410 *out++ = cnstexpr->clone(); 411 return true; 413 412 } // if 414 413 } // if 415 } 414 } // if 416 415 } // if 417 416 return false; -
src/SymTab/Mangler.cc
rfe26fbf rb4d65c7 172 172 for ( std::list< Expression* >::const_iterator param = params.begin(); param != params.end(); ++param ) { 173 173 TypeExpr *paramType = dynamic_cast< TypeExpr* >( *param ); 174 assert f(paramType, "Aggregate parameters should be type expressions: %s", toString(*param).c_str());174 assert(paramType && "Aggregate parameters should be type expressions"); 175 175 maybeAccept( paramType->get_type(), *this ); 176 176 } -
src/SymTab/Validate.cc
rfe26fbf rb4d65c7 696 696 FunctionDecl * newDecl = new FunctionDecl( ret->get_name(), ret->get_storageClass(), ret->get_linkage(), funtype, 0, ret->get_isInline(), ret->get_isNoreturn(), objDecl->get_attributes() ); 697 697 objDecl->get_attributes().clear(); 698 objDecl->set_type( nullptr );699 698 delete objDecl; 700 699 return newDecl;
Note:
See TracChangeset
for help on using the changeset viewer.