Ignore:
Timestamp:
Dec 13, 2016, 4:13:08 PM (5 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
7933351
Parents:
f7e749f
Message:

fixed StmtExpr? code in PolyMutator?, added missing copy constructor, misc documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/CompoundStmt.cc

    rf7e749f rfc638d2  
    4949                Statement * origStmt = *origit++;
    5050                if ( DeclStmt * declStmt = dynamic_cast< DeclStmt * >( s ) ) {
    51                         DeclStmt * origDeclStmt = dynamic_cast< DeclStmt * >( origStmt );
    52                         assert( origDeclStmt );
     51                        DeclStmt * origDeclStmt = safe_dynamic_cast< DeclStmt * >( origStmt );
    5352                        if ( DeclarationWithType * dwt = dynamic_cast< DeclarationWithType * > ( declStmt->get_decl() ) ) {
    54                                 DeclarationWithType * origdwt = dynamic_cast< DeclarationWithType * > ( origDeclStmt->get_decl() );
    55                                 assert( origdwt );
     53                                DeclarationWithType * origdwt = safe_dynamic_cast< DeclarationWithType * > ( origDeclStmt->get_decl() );
    5654                                assert( dwt->get_name() == origdwt->get_name() );
    5755                                declMap[ origdwt ] = dwt;
    58                         }
    59                 }
     56                        } else assert( ! dynamic_cast< DeclarationWithType * > ( origDeclStmt->get_decl() ) );
     57                } else assert( ! dynamic_cast< DeclStmt * > ( s ) );
    6058        }
    6159        if ( ! declMap.empty() ) {
Note: See TracChangeset for help on using the changeset viewer.