Changeset 86ad276 for src/SymTab/Autogen.cc
- Timestamp:
- Dec 5, 2017, 1:36:23 PM (6 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:
- 12d2dc8
- Parents:
- f3b9efc (diff), 5da9d6a (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/SymTab/Autogen.cc
rf3b9efc r86ad276 264 264 Type::StorageClasses scs = functionNesting > 0 ? Type::StorageClasses() : Type::StorageClasses( Type::Static ); 265 265 LinkageSpec::Spec spec = isIntrinsic ? LinkageSpec::Intrinsic : LinkageSpec::AutoGen; 266 FunctionDecl * decl = new FunctionDecl( fname, scs, spec, ftype, new CompoundStmt( noLabels),266 FunctionDecl * decl = new FunctionDecl( fname, scs, spec, ftype, new CompoundStmt(), 267 267 std::list< Attribute * >(), Type::FuncSpecifiers( Type::Inline ) ); 268 268 decl->fixUniqueId(); … … 299 299 assert( assignType->returnVals.size() == 1 ); 300 300 ObjectDecl * dstParam = strict_dynamic_cast< ObjectDecl * >( assignType->parameters.front() ); 301 dcl->statements->push_back( new ReturnStmt( n oLabels, new VariableExpr( dstParam ) ) );301 dcl->statements->push_back( new ReturnStmt( new VariableExpr( dstParam ) ) ); 302 302 } 303 303 resolve( dcl ); … … 468 468 copy->args.push_back( new AddressExpr( new VariableExpr( srcParam ) ) ); 469 469 copy->args.push_back( new SizeofExpr( srcParam->get_type()->clone() ) ); 470 *out++ = new ExprStmt( noLabels,copy );470 *out++ = new ExprStmt( copy ); 471 471 } 472 472 … … 544 544 callExpr->get_args().push_back( new VariableExpr( dstParam ) ); 545 545 callExpr->get_args().push_back( new VariableExpr( srcParam ) ); 546 funcDecl->statements->push_back( new ExprStmt( noLabels,callExpr ) );546 funcDecl->statements->push_back( new ExprStmt( callExpr ) ); 547 547 } else { 548 548 // default ctor/dtor body is empty - add unused attribute to parameter to silence warnings … … 569 569 expr->args.push_back( new CastExpr( new VariableExpr( dst ), new ReferenceType( Type::Qualifiers(), typeDecl->base->clone() ) ) ); 570 570 if ( src ) expr->args.push_back( new CastExpr( new VariableExpr( src ), typeDecl->base->clone() ) ); 571 dcl->statements->kids.push_back( new ExprStmt( noLabels,expr ) );571 dcl->statements->kids.push_back( new ExprStmt( expr ) ); 572 572 }; 573 573 … … 664 664 untyped->get_args().push_back( new VariableExpr( ftype->get_parameters().back() ) ); 665 665 } 666 function->get_statements()->get_kids().push_back( new ExprStmt( noLabels,untyped ) );667 function->get_statements()->get_kids().push_back( new ReturnStmt( noLabels,UntypedExpr::createDeref( new VariableExpr( ftype->get_parameters().front() ) ) ) );666 function->get_statements()->get_kids().push_back( new ExprStmt( untyped ) ); 667 function->get_statements()->get_kids().push_back( new ReturnStmt( UntypedExpr::createDeref( new VariableExpr( ftype->get_parameters().front() ) ) ) ); 668 668 } 669 669
Note: See TracChangeset
for help on using the changeset viewer.