Ignore:
Timestamp:
Dec 1, 2017, 2:55:41 PM (6 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:
a40d503
Parents:
882ad37 (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.
Message:

Merge branch 'master' into with-statement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Autogen.cc

    r882ad37 r3ca540f  
    264264                Type::StorageClasses scs = functionNesting > 0 ? Type::StorageClasses() : Type::StorageClasses( Type::Static );
    265265                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(),
    267267                                                                                                std::list< Attribute * >(), Type::FuncSpecifiers( Type::Inline ) );
    268268                decl->fixUniqueId();
     
    299299                                assert( assignType->returnVals.size() == 1 );
    300300                                ObjectDecl * dstParam = strict_dynamic_cast< ObjectDecl * >( assignType->parameters.front() );
    301                                 dcl->statements->push_back( new ReturnStmt( noLabels, new VariableExpr( dstParam ) ) );
     301                                dcl->statements->push_back( new ReturnStmt( new VariableExpr( dstParam ) ) );
    302302                        }
    303303                        resolve( dcl );
     
    468468                copy->args.push_back( new AddressExpr( new VariableExpr( srcParam ) ) );
    469469                copy->args.push_back( new SizeofExpr( srcParam->get_type()->clone() ) );
    470                 *out++ = new ExprStmt( noLabels, copy );
     470                *out++ = new ExprStmt( copy );
    471471        }
    472472
     
    544544                        callExpr->get_args().push_back( new VariableExpr( dstParam ) );
    545545                        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 ) );
    547547                } else {
    548548                        // default ctor/dtor body is empty - add unused attribute to parameter to silence warnings
     
    569569                expr->args.push_back( new CastExpr( new VariableExpr( dst ), new ReferenceType( Type::Qualifiers(), typeDecl->base->clone() ) ) );
    570570                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 ) );
    572572        };
    573573
     
    664664                        untyped->get_args().push_back( new VariableExpr( ftype->get_parameters().back() ) );
    665665                }
    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() ) ) ) );
    668668        }
    669669
Note: See TracChangeset for help on using the changeset viewer.