Changeset a5de33e for src/ResolvExpr


Ignore:
Timestamp:
Jul 5, 2017, 5:00:46 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
55a68c3, 5805d15
Parents:
f7cb0bc (diff), 1ce2189 (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:/u/cforall/software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    rf7cb0bc ra5de33e  
    7070                virtual void visit( BranchStmt *branchStmt ) override;
    7171                virtual void visit( ReturnStmt *returnStmt ) override;
     72                virtual void visit( ThrowStmt *throwStmt ) override;
    7273
    7374                virtual void visit( SingleInit *singleInit ) override;
     
    366367        }
    367368
     369        void Resolver::visit( ThrowStmt *throwStmt ) {
     370                if ( throwStmt->get_expr() ) {
     371                        Expression * wrapped = new CastExpr( throwStmt->get_expr(), new BasicType( Type::Qualifiers(), BasicType::SignedInt ) );
     372                        Expression * newExpr = findSingleExpression( wrapped, *this );
     373                        throwStmt->set_expr( newExpr );
     374                }
     375        }
     376
    368377        template< typename T >
    369378        bool isCharType( T t ) {
Note: See TracChangeset for help on using the changeset viewer.