Ignore:
Timestamp:
Nov 3, 2020, 8:48:53 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
a3f5208a
Parents:
3c80ccc (diff), 293dc1c (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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInitNew.cpp

    r3c80ccc r4406887  
    179179        /// expand each object declaration to use its constructor after it is declared.
    180180        struct FixInit : public ast::WithStmtsToAdd<> {
    181                 static void fixInitializers( std::list< ast::ptr<ast::Decl> > &translationUnit );
     181                static void fixInitializers( ast::TranslationUnit &translationUnit );
    182182
    183183                const ast::DeclWithType * postvisit( const ast::ObjectDecl *objDecl );
     
    225225} // namespace
    226226
    227 void fix( std::list< ast::ptr<ast::Decl> > & translationUnit, bool inLibrary ) {
     227void fix( ast::TranslationUnit & translationUnit, bool inLibrary ) {
    228228        ast::Pass<SelfAssignChecker>::run( translationUnit );
    229229
     
    308308        }
    309309
    310         void FixInit::fixInitializers( std::list< ast::ptr<ast::Decl> > & translationUnit ) {
     310        void FixInit::fixInitializers( ast::TranslationUnit & translationUnit ) {
    311311                ast::Pass<FixInit> fixer;
    312312
     
    314314                // can't use DeclMutator, because sometimes need to insert IfStmt, etc.
    315315                SemanticErrorException errors;
    316                 for ( auto i = translationUnit.begin(); i != translationUnit.end(); ++i ) {
     316                for ( auto i = translationUnit.decls.begin(); i != translationUnit.decls.end(); ++i ) {
    317317                        try {
    318318                                // maybeAccept( *i, fixer ); translationUnit should never contain null
    319319                                *i = (*i)->accept(fixer);
    320                                 translationUnit.splice( i, fixer.core.staticDtorDecls );
     320                                translationUnit.decls.splice( i, fixer.core.staticDtorDecls );
    321321                        } catch( SemanticErrorException &e ) {
    322322                                errors.append( e );
Note: See TracChangeset for help on using the changeset viewer.