Changeset ba54f7d for src/Parser/StatementNode.cc
- Timestamp:
- Sep 13, 2017, 3:11:24 PM (7 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:
- c57ded70, db70fe4
- Parents:
- d130fe8 (diff), 982832e (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
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/StatementNode.cc
rd130fe8 rba54f7d 14 14 // 15 15 16 #include <cassert> // for assert, s afe_dynamic_cast, assertf16 #include <cassert> // for assert, strict_dynamic_cast, assertf 17 17 #include <list> // for list 18 18 #include <memory> // for unique_ptr … … 57 57 // find end of list and maintain previous pointer 58 58 for ( StatementNode * curr = prev; curr != nullptr; curr = (StatementNode *)curr->get_next() ) { 59 StatementNode *node = s afe_dynamic_cast< StatementNode * >(curr);59 StatementNode *node = strict_dynamic_cast< StatementNode * >(curr); 60 60 assert( dynamic_cast< CaseStmt * >(node->stmt.get()) ); 61 61 prev = curr; … … 106 106 for ( Statement * stmt : init ) { 107 107 // build the && of all of the declared variables compared against 0 108 DeclStmt * declStmt = s afe_dynamic_cast< DeclStmt * >( stmt );109 DeclarationWithType * dwt = s afe_dynamic_cast< DeclarationWithType * >( declStmt->decl );108 DeclStmt * declStmt = strict_dynamic_cast< DeclStmt * >( stmt ); 109 DeclarationWithType * dwt = strict_dynamic_cast< DeclarationWithType * >( declStmt->decl ); 110 110 Expression * nze = notZeroExpr( new VariableExpr( dwt ) ); 111 111 cond = cond ? new LogicalExpr( cond, nze, true ) : nze; … … 202 202 std::list< CatchStmt * > branches; 203 203 buildMoveList< CatchStmt, StatementNode >( catch_stmt, branches ); 204 CompoundStmt *tryBlock = s afe_dynamic_cast< CompoundStmt * >(maybeMoveBuild< Statement >(try_stmt));204 CompoundStmt *tryBlock = strict_dynamic_cast< CompoundStmt * >(maybeMoveBuild< Statement >(try_stmt)); 205 205 FinallyStmt *finallyBlock = dynamic_cast< FinallyStmt * >(maybeMoveBuild< Statement >(finally_stmt) ); 206 206 return new TryStmt( noLabels, tryBlock, branches, finallyBlock );
Note: See TracChangeset
for help on using the changeset viewer.