Changeset 307a732 for src/ResolvExpr


Ignore:
Timestamp:
Jul 4, 2017, 11:52:33 AM (8 years ago)
Author:
Andrew Beach <ajbeach@…>
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:
44f44617, 67fa9f9, ad0be81
Parents:
86f384b
Message:

The exception handling code compilers and translates, but the translation crashes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    r86f384b r307a732  
    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.