Ignore:
Timestamp:
Sep 9, 2020, 3:04:55 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:
1c01c58
Parents:
14d8a9b (diff), e6b42e7 (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/ResolvExpr/Resolver.cc

    r14d8a9b r2b7f6f0  
    965965                /// Finds deleted expressions in an expression tree
    966966                struct DeleteFinder_new final : public ast::WithShortCircuiting {
    967                         const ast::DeletedExpr * delExpr = nullptr;
     967                        const ast::DeletedExpr * result = nullptr;
    968968
    969969                        void previsit( const ast::DeletedExpr * expr ) {
    970                                 if ( delExpr ) { visit_children = false; }
    971                                 else { delExpr = expr; }
     970                                if ( result ) { visit_children = false; }
     971                                else { result = expr; }
    972972                        }
    973973
    974974                        void previsit( const ast::Expr * ) {
    975                                 if ( delExpr ) { visit_children = false; }
     975                                if ( result ) { visit_children = false; }
    976976                        }
    977977                };
     
    980980        /// Check if this expression is or includes a deleted expression
    981981        const ast::DeletedExpr * findDeletedExpr( const ast::Expr * expr ) {
    982                 ast::Pass<DeleteFinder_new> finder;
    983                 expr->accept( finder );
    984                 return finder.core.delExpr;
     982                return ast::Pass<DeleteFinder_new>::read( expr );
    985983        }
    986984
Note: See TracChangeset for help on using the changeset viewer.