Changes in src/ResolvExpr/Resolver.cc [cbce272:307a732]
- File:
-
- 1 edited
-
src/ResolvExpr/Resolver.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Resolver.cc
rcbce272 r307a732 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 12:17:01 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : T us Aug 8 16:06:00201713 // Update Count : 21 211 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 23 17:23:14 2017 13 // Update Count : 211 14 14 // 15 15 … … 71 71 virtual void visit( ReturnStmt *returnStmt ) override; 72 72 virtual void visit( ThrowStmt *throwStmt ) override; 73 virtual void visit( CatchStmt *catchStmt ) override;74 73 75 74 virtual void visit( SingleInit *singleInit ) override; … … 369 368 370 369 void Resolver::visit( ThrowStmt *throwStmt ) { 371 // TODO: Replace *exception type with &exception type.372 370 if ( throwStmt->get_expr() ) { 373 StructDecl * exception_decl = 374 lookupStruct( "__cfaehm__base_exception_t" ); 375 assert( exception_decl ); 376 Expression * wrapped = new CastExpr( 377 throwStmt->get_expr(), 378 new PointerType( 379 noQualifiers, 380 new StructInstType( 381 noQualifiers, 382 exception_decl 383 ) 384 ) 385 ); 371 Expression * wrapped = new CastExpr( throwStmt->get_expr(), new BasicType( Type::Qualifiers(), BasicType::SignedInt ) ); 386 372 Expression * newExpr = findSingleExpression( wrapped, *this ); 387 373 throwStmt->set_expr( newExpr ); 388 }389 }390 391 void Resolver::visit( CatchStmt *catchStmt ) {392 if ( catchStmt->get_cond() ) {393 Expression * wrapped = new CastExpr(394 catchStmt->get_cond(),395 new BasicType( noQualifiers, BasicType::Bool )396 );397 catchStmt->set_cond( findSingleExpression( wrapped, *this ) );398 374 } 399 375 }
Note:
See TracChangeset
for help on using the changeset viewer.