Ignore:
Timestamp:
Dec 22, 2020, 3:16:47 PM (2 years ago)
Author:
Fangren Yu <f37yu@…>
Branches:
arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
2daea42
Parents:
797a193
Message:

smart pointer memory safety

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    r797a193 r302ef2a  
    13111311        }
    13121312
    1313         ast::ptr< ast::Expr > resolveStmtExpr(
     1313        const ast::Expr * resolveStmtExpr(
    13141314                const ast::StmtExpr * stmtExpr, const ast::SymbolTable & symtab
    13151315        ) {
    13161316                assert( stmtExpr );
    13171317                ast::Pass< Resolver_new > resolver{ symtab };
    1318                 ast::ptr< ast::Expr > ret = stmtExpr;
    1319                 ret = ret->accept( resolver );
    1320                 strict_dynamic_cast< ast::StmtExpr * >( ret.get_and_mutate() )->computeResult();
     1318                auto ret = mutate(stmtExpr->accept(resolver));
     1319                strict_dynamic_cast< ast::StmtExpr * >( ret )->computeResult();
    13211320                return ret;
    13221321        }
Note: See TracChangeset for help on using the changeset viewer.