Changeset 10a9479d for src/InitTweak


Ignore:
Timestamp:
Nov 23, 2024, 8:28:37 PM (14 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master, stuck-waitfor-destruct
Children:
956b389
Parents:
b006c51e (diff), de7b7a5 (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' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/InitTweak
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInit.cpp

    rb006c51e r10a9479d  
    105105/// generate/resolve copy construction expressions for each, and generate/resolve destructors for both
    106106/// arguments and return value temporaries
    107 struct ResolveCopyCtors final : public ast::WithGuards, public ast::WithStmtsToAdd<>, public ast::WithSymbolTable, public ast::WithShortCircuiting, public ast::WithVisitorRef<ResolveCopyCtors>, public ast::WithConstTranslationUnit {
     107struct ResolveCopyCtors final : public ast::WithGuards, public ast::WithStmtsToAdd, public ast::WithSymbolTable, public ast::WithShortCircuiting, public ast::WithVisitorRef<ResolveCopyCtors>, public ast::WithConstTranslationUnit {
    108108        const ast::Expr * postvisit( const ast::ImplicitCopyCtorExpr * impCpCtorExpr );
    109109        const ast::StmtExpr * previsit( const ast::StmtExpr * stmtExpr );
     
    177177/// insert destructor calls at the appropriate places.  must happen before CtorInit nodes are removed
    178178/// (currently by FixInit)
    179 struct InsertDtors final : public ObjDeclCollector, public ast::WithStmtsToAdd<> {
     179struct InsertDtors final : public ObjDeclCollector, public ast::WithStmtsToAdd {
    180180        InsertDtors( ast::Pass<LabelFinder> & finder ) : finder( finder ), labelVars( finder.core.vars ) {}
    181181
     
    194194
    195195/// expand each object declaration to use its constructor after it is declared.
    196 struct FixInit : public ast::WithStmtsToAdd<> {
     196struct FixInit : public ast::WithStmtsToAdd {
    197197        static void fixInitializers( ast::TranslationUnit &translationUnit );
    198198
     
    230230
    231231/// expands ConstructorExpr nodes into comma expressions, using a temporary for the first argument
    232 struct FixCtorExprs final : public ast::WithDeclsToAdd<>, public ast::WithSymbolTable, public ast::WithShortCircuiting, public ast::WithConstTranslationUnit {
     232struct FixCtorExprs final : public ast::WithDeclsToAdd, public ast::WithSymbolTable, public ast::WithShortCircuiting, public ast::WithConstTranslationUnit {
    233233        const ast::Expr * postvisit( const ast::ConstructorExpr * ctorExpr );
    234234};
  • src/InitTweak/GenInit.cpp

    rb006c51e r10a9479d  
    4646        // Outer pass finds declarations, for their type could wrap a type that needs hoisting
    4747        struct HoistArrayDimension_NoResolve final :
    48                         public ast::WithDeclsToAdd<>, public ast::WithShortCircuiting,
     48                        public ast::WithDeclsToAdd, public ast::WithShortCircuiting,
    4949                        public ast::WithGuards, public ast::WithConstTranslationUnit,
    5050                        public ast::WithVisitorRef<HoistArrayDimension_NoResolve>,
     
    205205
    206206        struct ReturnFixer final :
    207                         public ast::WithStmtsToAdd<>, ast::WithGuards, ast::WithShortCircuiting {
     207                        public ast::WithStmtsToAdd, ast::WithGuards, ast::WithShortCircuiting {
    208208                void previsit( const ast::FunctionDecl * decl );
    209209                const ast::ReturnStmt * previsit( const ast::ReturnStmt * stmt );
Note: See TracChangeset for help on using the changeset viewer.