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

    rd130fe8 rba54f7d  
    1515
    1616#include <stddef.h>                      // for NULL
    17 #include <cassert>                       // for safe_dynamic_cast, assert
     17#include <cassert>                       // for strict_dynamic_cast, assert
    1818#include <memory>                        // for allocator, allocator_traits<...
    1919#include <tuple>                         // for get
     
    342342                        CastExpr * castExpr = new CastExpr( caseStmt->get_condition(), initAlts.front().type->clone() );
    343343                        Expression * newExpr = findSingleExpression( castExpr, *this );
    344                         castExpr = safe_dynamic_cast< CastExpr * >( newExpr );
     344                        castExpr = strict_dynamic_cast< CastExpr * >( newExpr );
    345345                        caseStmt->set_condition( castExpr->get_arg() );
    346346                        castExpr->set_arg( nullptr );
     
    398398                Parent::enterScope();
    399399                Visitor::visit( catchStmt );
    400                
     400
    401401                if ( catchStmt->get_cond() ) {
    402402                        Expression * wrapped = new CastExpr(
     
    423423                UntypedInitExpr * untyped = new UntypedInitExpr( singleInit->get_value(), currentObject.getOptions() );
    424424                Expression * newExpr = findSingleExpression( untyped, *this );
    425                 InitExpr * initExpr = safe_dynamic_cast< InitExpr * >( newExpr );
     425                InitExpr * initExpr = strict_dynamic_cast< InitExpr * >( newExpr );
    426426
    427427                // move cursor to the object that is actually initialized
     
    445445                                        if ( isCharType( pt->get_base() ) ) {
    446446                                                // strip cast if we're initializing a char[] with a char *, e.g.  char x[] = "hello";
    447                                                 CastExpr *ce = safe_dynamic_cast< CastExpr * >( newExpr );
     447                                                CastExpr *ce = strict_dynamic_cast< CastExpr * >( newExpr );
    448448                                                newExpr = ce->get_arg();
    449449                                                ce->set_arg( nullptr );
Note: See TracChangeset for help on using the changeset viewer.