Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/StatementNode.cc

    rab57786 r837a17c  
    4444                        agg = decl;
    4545                } // if
    46                 stmt.reset( new DeclStmt( noLabels, maybeBuild< Declaration >(agg) ) );
     46                stmt.reset( new DeclStmt( noLabels, maybeMoveBuild< Declaration >(agg) ) );
    4747        } else {
    4848                assert( false );
     
    5454        // find end of list and maintain previous pointer
    5555        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);
    5857                assert( dynamic_cast< CaseStmt * >(node->stmt.get()) );
    5958                prev = curr;
     
    166165        std::list< Statement * > branches;
    167166        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));
    170168        FinallyStmt *finallyBlock = dynamic_cast< FinallyStmt * >(maybeMoveBuild< Statement >(finally_stmt) );
    171169        return new TryStmt( noLabels, tryBlock, branches, finallyBlock );
Note: See TracChangeset for help on using the changeset viewer.