Changeset 4e2f1b2 for src/InitTweak
- Timestamp:
- Feb 23, 2024, 3:59:35 PM (8 months ago)
- Branches:
- master
- Children:
- 1761046
- Parents:
- d06273c
- Location:
- src/InitTweak
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixInit.cpp
rd06273c r4e2f1b2 1134 1134 ast::Expr * thisExpr = new ast::CastExpr(funcDecl->location, new ast::VariableExpr(funcDecl->location, thisParam ), thisParam->get_type()->stripReferences()); 1135 1135 ast::Expr * memberDest = new ast::MemberExpr(funcDecl->location, field, thisExpr ); 1136 ast::ptr<ast::Stmt>callStmt = SymTab::genImplicitCall( srcParam, memberDest, loc, function->name, field, static_cast<SymTab::LoopDirection>(isCtor) );1136 const ast::Stmt * callStmt = SymTab::genImplicitCall( srcParam, memberDest, loc, function->name, field, static_cast<SymTab::LoopDirection>(isCtor) ); 1137 1137 1138 1138 if ( callStmt ) { -
src/InitTweak/GenInit.cc
rd06273c r4e2f1b2 239 239 if ( varExpr->var == retVal ) return stmt; 240 240 } 241 ast::ptr<ast::Stmt>ctorStmt = genCtorDtor(241 const ast::Stmt * ctorStmt = genCtorDtor( 242 242 retVal->location, "?{}", retVal, stmt->expr ); 243 243 assertf( ctorStmt, … … 327 327 void ManagedTypes::endScope() { managedTypes.endScope(); } 328 328 329 ast::ptr<ast::Stmt> genCtorDtor (const CodeLocation & loc, const std::string & fname, const ast::ObjectDecl * objDecl, const ast::Expr * arg) {329 const ast::Stmt * genCtorDtor( const CodeLocation & loc, const std::string & fname, const ast::ObjectDecl * objDecl, const ast::Expr * arg ) { 330 330 assertf(objDecl, "genCtorDtor passed null objDecl"); 331 331 InitExpander srcParam(arg); -
src/InitTweak/GenInit.h
rd06273c r4e2f1b2 33 33 34 34 /// generates a single ctor/dtor statement using objDecl as the 'this' parameter and arg as the optional argument 35 ast::ptr<ast::Stmt> genCtorDtor (const CodeLocation & loc, const std::string & fname, const ast::ObjectDecl * objDecl, const ast::Expr * arg = nullptr);35 const ast::Stmt * genCtorDtor( const CodeLocation & loc, const std::string & fname, const ast::ObjectDecl * objDecl, const ast::Expr * arg = nullptr ); 36 36 37 37 /// creates an appropriate ConstructorInit node which contains a constructor, destructor, and C-initializer
Note: See TracChangeset
for help on using the changeset viewer.