Changes in src/Parser/StatementNode.cc [ab57786:837a17c]
- File:
-
- 1 edited
-
src/Parser/StatementNode.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/StatementNode.cc
rab57786 r837a17c 44 44 agg = decl; 45 45 } // if 46 stmt.reset( new DeclStmt( noLabels, maybe Build< Declaration >(agg) ) );46 stmt.reset( new DeclStmt( noLabels, maybeMoveBuild< Declaration >(agg) ) ); 47 47 } else { 48 48 assert( false ); … … 54 54 // find end of list and maintain previous pointer 55 55 for ( StatementNode * curr = prev; curr != nullptr; curr = (StatementNode *)curr->get_next() ) { 56 StatementNode *node = dynamic_cast< StatementNode * >(curr); 57 assert( node ); 56 StatementNode *node = safe_dynamic_cast< StatementNode * >(curr); 58 57 assert( dynamic_cast< CaseStmt * >(node->stmt.get()) ); 59 58 prev = curr; … … 166 165 std::list< Statement * > branches; 167 166 buildMoveList< Statement, StatementNode >( catch_stmt, branches ); 168 CompoundStmt *tryBlock = dynamic_cast< CompoundStmt * >(maybeMoveBuild< Statement >(try_stmt)); 169 assert( tryBlock ); 167 CompoundStmt *tryBlock = safe_dynamic_cast< CompoundStmt * >(maybeMoveBuild< Statement >(try_stmt)); 170 168 FinallyStmt *finallyBlock = dynamic_cast< FinallyStmt * >(maybeMoveBuild< Statement >(finally_stmt) ); 171 169 return new TryStmt( noLabels, tryBlock, branches, finallyBlock );
Note:
See TracChangeset
for help on using the changeset viewer.