Changeset f95634e for src


Ignore:
Timestamp:
Nov 10, 2021, 7:23:12 PM (3 years ago)
Author:
Fangren Yu <f37yu@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
b7fd9daf
Parents:
bb9924c
Message:

fix unique expr pass

Location:
src/AST
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Copy.hpp

    rbb9924c rf95634e  
    8888        }
    8989
     90        void postvisit( const StmtExpr * node ) {
     91                readonlyInsert( &node->resultExpr );
     92        }
     93
    9094        void postvisit( const MemberExpr * node ) {
    9195                readonlyInsert( &node->member );
     
    122126node_t * deepCopy( const node_t * localRoot ) {
    123127        Pass< DeepCopyCore > dc;
    124         node_t const * newRoot = localRoot->accept( dc );
     128        node_t const * newRoot = strict_dynamic_cast<node_t const*>(localRoot->accept( dc ));
    125129        dc.core.readonlyUpdates();
    126130        return const_cast< node_t * >( newRoot );
  • src/AST/Expr.hpp

    rbb9924c rf95634e  
    767767
    768768/// An expression which must only be evaluated once
    769 class UniqueExpr final : public Expr {
     769class
     770UniqueExpr final : public Expr {
    770771        static unsigned long long nextId;
    771772public:
Note: See TracChangeset for help on using the changeset viewer.