Changeset 97392b69 for src/ControlStruct/ExceptTranslate.cc
- Timestamp:
- Jun 10, 2020, 4:19:30 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- ab8a023
- Parents:
- a5873bd (diff), ee06db5c (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. - File:
-
- 1 edited
-
src/ControlStruct/ExceptTranslate.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ControlStruct/ExceptTranslate.cc
ra5873bd r97392b69 10 10 // Created On : Wed Jun 14 16:49:00 2017 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : T hr May 21 13:18:00 202013 // Update Count : 1 512 // Last Modified On : Tue May 26 10:56:00 2020 13 // Update Count : 16 14 14 // 15 15 … … 107 107 nameOf( terminate_handler_except ), 108 108 new ConstantExpr( Constant::null( 109 //new PointerType( 110 // noQualifiers, 111 terminate_handler_except->get_type()->clone() 112 // ) 109 terminate_handler_except->get_type()->clone() 113 110 ) ) 114 111 ) ) ); … … 137 134 ObjectDecl * decl = dynamic_cast<ObjectDecl *>( catchStmt->get_decl() ); 138 135 // Also checking the type would be nice. 139 if ( decl ) { 140 // Pass. 141 } else if ( CatchStmt::Terminate == catchStmt->get_kind() ) { 142 SemanticError(catchStmt->location, "catch must have exception type"); 143 } else { 144 SemanticError(catchStmt->location, "catchResume must have exception type"); 136 if ( !decl || !dynamic_cast<PointerType *>( decl->type ) ) { 137 std::string kind = (CatchStmt::Terminate == catchStmt->kind) ? "catch" : "catchResume"; 138 SemanticError( catchStmt->location, kind + " must have pointer to an exception type" ); 145 139 } 146 140 … … 232 226 233 227 void premutate( StructDecl *structDecl ); 234 Statement * postmutate( ThrowStmt *throwStmt );235 228 Statement * postmutate( TryStmt *tryStmt ); 236 229 }; … … 621 614 } 622 615 623 Statement * TryMutatorCore::postmutate( ThrowStmt * ) {624 // All throws should be removed by this point.625 assert( false );626 }627 628 616 Statement * TryMutatorCore::postmutate( TryStmt *tryStmt ) { 629 617 assert( except_decl );
Note:
See TracChangeset
for help on using the changeset viewer.