Ignore:
Timestamp:
Sep 13, 2017, 3:03:32 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
ed235b6
Parents:
b2e2e34 (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 plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    rb2e2e34 rc935c3a  
    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.