Changeset e3e16bc for src/ResolvExpr/Resolver.cc
- Timestamp:
- Sep 13, 2017, 2:34:55 PM (8 years ago)
- 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:
- 982832e
- Parents:
- 9f5ecf5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Resolver.cc
r9f5ecf5 re3e16bc 15 15 16 16 #include <stddef.h> // for NULL 17 #include <cassert> // for s afe_dynamic_cast, assert17 #include <cassert> // for strict_dynamic_cast, assert 18 18 #include <memory> // for allocator, allocator_traits<... 19 19 #include <tuple> // for get … … 342 342 CastExpr * castExpr = new CastExpr( caseStmt->get_condition(), initAlts.front().type->clone() ); 343 343 Expression * newExpr = findSingleExpression( castExpr, *this ); 344 castExpr = s afe_dynamic_cast< CastExpr * >( newExpr );344 castExpr = strict_dynamic_cast< CastExpr * >( newExpr ); 345 345 caseStmt->set_condition( castExpr->get_arg() ); 346 346 castExpr->set_arg( nullptr ); … … 398 398 Parent::enterScope(); 399 399 Visitor::visit( catchStmt ); 400 400 401 401 if ( catchStmt->get_cond() ) { 402 402 Expression * wrapped = new CastExpr( … … 423 423 UntypedInitExpr * untyped = new UntypedInitExpr( singleInit->get_value(), currentObject.getOptions() ); 424 424 Expression * newExpr = findSingleExpression( untyped, *this ); 425 InitExpr * initExpr = s afe_dynamic_cast< InitExpr * >( newExpr );425 InitExpr * initExpr = strict_dynamic_cast< InitExpr * >( newExpr ); 426 426 427 427 // move cursor to the object that is actually initialized … … 445 445 if ( isCharType( pt->get_base() ) ) { 446 446 // strip cast if we're initializing a char[] with a char *, e.g. char x[] = "hello"; 447 CastExpr *ce = s afe_dynamic_cast< CastExpr * >( newExpr );447 CastExpr *ce = strict_dynamic_cast< CastExpr * >( newExpr ); 448 448 newExpr = ce->get_arg(); 449 449 ce->set_arg( nullptr );
Note: See TracChangeset
for help on using the changeset viewer.