Changeset e3e16bc for src/Parser
- Timestamp:
- Sep 13, 2017, 2:34:55 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:
- 982832e
- Parents:
- 9f5ecf5
- Location:
- src/Parser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
r9f5ecf5 re3e16bc 14 14 // 15 15 16 #include <cassert> // for assert, assertf, s afe_dynamic_cast16 #include <cassert> // for assert, assertf, strict_dynamic_cast 17 17 #include <iterator> // for back_insert_iterator 18 18 #include <list> // for list … … 1027 1027 1028 1028 if ( asmStmt ) { 1029 return new AsmDecl( s afe_dynamic_cast<AsmStmt *>( asmStmt->build() ) );1029 return new AsmDecl( strict_dynamic_cast<AsmStmt *>( asmStmt->build() ) ); 1030 1030 } // if 1031 1031 -
src/Parser/StatementNode.cc
r9f5ecf5 re3e16bc 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.