Ignore:
Timestamp:
Sep 13, 2017, 3:11:24 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/StatementNode.cc

    rd130fe8 rba54f7d  
    1414//
    1515
    16 #include <cassert>                 // for assert, safe_dynamic_cast, assertf
     16#include <cassert>                 // for assert, strict_dynamic_cast, assertf
    1717#include <list>                    // for list
    1818#include <memory>                  // for unique_ptr
     
    5757        // find end of list and maintain previous pointer
    5858        for ( StatementNode * curr = prev; curr != nullptr; curr = (StatementNode *)curr->get_next() ) {
    59                 StatementNode *node = safe_dynamic_cast< StatementNode * >(curr);
     59                StatementNode *node = strict_dynamic_cast< StatementNode * >(curr);
    6060                assert( dynamic_cast< CaseStmt * >(node->stmt.get()) );
    6161                prev = curr;
     
    106106                for ( Statement * stmt : init ) {
    107107                        // build the && of all of the declared variables compared against 0
    108                         DeclStmt * declStmt = safe_dynamic_cast< DeclStmt * >( stmt );
    109                         DeclarationWithType * dwt = safe_dynamic_cast< DeclarationWithType * >( declStmt->decl );
     108                        DeclStmt * declStmt = strict_dynamic_cast< DeclStmt * >( stmt );
     109                        DeclarationWithType * dwt = strict_dynamic_cast< DeclarationWithType * >( declStmt->decl );
    110110                        Expression * nze = notZeroExpr( new VariableExpr( dwt ) );
    111111                        cond = cond ? new LogicalExpr( cond, nze, true ) : nze;
     
    202202        std::list< CatchStmt * > branches;
    203203        buildMoveList< CatchStmt, StatementNode >( catch_stmt, branches );
    204         CompoundStmt *tryBlock = safe_dynamic_cast< CompoundStmt * >(maybeMoveBuild< Statement >(try_stmt));
     204        CompoundStmt *tryBlock = strict_dynamic_cast< CompoundStmt * >(maybeMoveBuild< Statement >(try_stmt));
    205205        FinallyStmt *finallyBlock = dynamic_cast< FinallyStmt * >(maybeMoveBuild< Statement >(finally_stmt) );
    206206        return new TryStmt( noLabels, tryBlock, branches, finallyBlock );
Note: See TracChangeset for help on using the changeset viewer.