Changeset a4da45e for src/Validate


Ignore:
Timestamp:
Feb 26, 2024, 3:53:42 AM (7 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
3f9a8d0
Parents:
0522ebe (diff), 022bce0 (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:

Resolve conflict

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Validate/Autogen.cpp

    r0522ebe ra4da45e  
    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,
     
    525524}
    526525
    527 ast::ptr<ast::Stmt> StructFuncGenerator::makeMemberOp(
     526const ast::Stmt * StructFuncGenerator::makeMemberOp(
    528527                const CodeLocation& location, const ast::ObjectDecl * dstParam,
    529528                const ast::Expr * src, const ast::ObjectDecl * field,
     
    540539                )
    541540        );
    542         auto stmt = genImplicitCall(
     541        const ast::Stmt * stmt = genImplicitCall(
    543542                srcParam, dstSelect, location, func->name,
    544543                field, direction
     
    598597                        location, field, new ast::VariableExpr( location, srcParam )
    599598                ) : nullptr;
    600                 ast::ptr<ast::Stmt> stmt =
     599                const ast::Stmt * stmt =
    601600                        makeMemberOp( location, dstParam, srcSelect, field, func, direction );
    602601
    603602                if ( nullptr != stmt ) {
    604                         stmts->kids.push_back( stmt );
     603                        stmts->kids.emplace_back( stmt );
    605604                }
    606605        }
     
    623622        for ( auto param = params.begin() + 1 ; current != end ; ++current ) {
    624623                const ast::ptr<ast::Decl> & member = *current;
    625                 ast::ptr<ast::Stmt> stmt = nullptr;
     624                const ast::Stmt * stmt = nullptr;
    626625                auto field = member.as<ast::ObjectDecl>();
    627626                // Not sure why it could be null.
     
    641640
    642641                if ( nullptr != stmt ) {
    643                         stmts->kids.push_back( stmt );
     642                        stmts->kids.emplace_back( stmt );
    644643                }
    645644        }
Note: See TracChangeset for help on using the changeset viewer.