Ignore:
Timestamp:
Feb 23, 2024, 11:41:10 PM (5 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
0a9b5c1, 1e93617
Parents:
3d5a8cb (diff), 1761046 (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.
git-author:
Peter A. Buhr <pabuhr@…> (02/23/24 18:54:24)
git-committer:
Peter A. Buhr <pabuhr@…> (02/23/24 23:41:10)
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Validate/Autogen.cpp

    r3d5a8cb r46aa60e  
    133133        /// Generates a single struct member operation.
    134134        /// (constructor call, destructor call, assignment call)
    135         // This is managed because it uses another helper that returns a ast::ptr.
    136         ast::ptr<ast::Stmt> makeMemberOp(
     135        const ast::Stmt * makeMemberOp(
    137136                const CodeLocation& location,
    138137                const ast::ObjectDecl * dstParam, const ast::Expr * src,
     
    524523}
    525524
    526 ast::ptr<ast::Stmt> StructFuncGenerator::makeMemberOp(
     525const ast::Stmt * StructFuncGenerator::makeMemberOp(
    527526                const CodeLocation& location, const ast::ObjectDecl * dstParam,
    528527                const ast::Expr * src, const ast::ObjectDecl * field,
     
    539538                )
    540539        );
    541         auto stmt = genImplicitCall(
     540        const ast::Stmt * stmt = genImplicitCall(
    542541                srcParam, dstSelect, location, func->name,
    543542                field, direction
     
    597596                        location, field, new ast::VariableExpr( location, srcParam )
    598597                ) : nullptr;
    599                 ast::ptr<ast::Stmt> stmt =
     598                const ast::Stmt * stmt =
    600599                        makeMemberOp( location, dstParam, srcSelect, field, func, direction );
    601600
    602601                if ( nullptr != stmt ) {
    603                         stmts->kids.push_back( stmt );
     602                        stmts->kids.emplace_back( stmt );
    604603                }
    605604        }
     
    622621        for ( auto param = params.begin() + 1 ; current != end ; ++current ) {
    623622                const ast::ptr<ast::Decl> & member = *current;
    624                 ast::ptr<ast::Stmt> stmt = nullptr;
     623                const ast::Stmt * stmt = nullptr;
    625624                auto field = member.as<ast::ObjectDecl>();
    626625                // Not sure why it could be null.
     
    640639
    641640                if ( nullptr != stmt ) {
    642                         stmts->kids.push_back( stmt );
     641                        stmts->kids.emplace_back( stmt );
    643642                }
    644643        }
Note: See TracChangeset for help on using the changeset viewer.