Ignore:
Timestamp:
Aug 23, 2017, 6:22:07 PM (8 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:
87e08e24, cb811ac
Parents:
9f07232 (diff), bd37119 (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/InitTweak/InitTweak.cc

    r9f07232 rd3e4d6c  
    187187
    188188                        UntypedExpr * increment = new UntypedExpr( new NameExpr( "++?" ) );
    189                         increment->get_args().push_back( new AddressExpr( index->clone() ) );
     189                        increment->get_args().push_back( index->clone() );
    190190                        *out++ = new ExprStmt( noLabels, increment );
    191191                }
     
    397397                template<typename CallExpr>
    398398                Expression *& callArg( CallExpr * callExpr, unsigned int pos ) {
    399                         if ( pos >= callExpr->get_args().size() ) assertf( false, "asking for argument that doesn't exist. Return NULL/throw exception?" );
     399                        if ( pos >= callExpr->get_args().size() ) assertf( false, "getCallArg for argument that doesn't exist: (%u); %s.", pos, toString( callExpr ).c_str() );
    400400                        for ( Expression *& arg : callExpr->get_args() ) {
    401401                                if ( pos == 0 ) return arg;
     
    475475                } else if ( ArrayType * arrayType = dynamic_cast< ArrayType * >( type ) ) {
    476476                        return arrayType->get_base();
     477                } else if ( ReferenceType * refType = dynamic_cast< ReferenceType * >( type ) ) {
     478                        return refType->get_base();
    477479                } else {
    478480                        return NULL;
     
    560562                if ( ftype->get_parameters().size() != 2 ) return 0;
    561563
    562                 Type * t1 = ftype->get_parameters().front()->get_type();
     564                Type * t1 = getPointerBase( ftype->get_parameters().front()->get_type() );
    563565                Type * t2 = ftype->get_parameters().back()->get_type();
    564                 PointerType * ptrType = dynamic_cast< PointerType * > ( t1 );
    565                 assert( ptrType );
    566 
    567                 if ( ResolvExpr::typesCompatibleIgnoreQualifiers( ptrType->get_base(), t2, SymTab::Indexer() ) ) {
     566                assert( t1 );
     567
     568                if ( ResolvExpr::typesCompatibleIgnoreQualifiers( t1, t2, SymTab::Indexer() ) ) {
    568569                        return function;
    569570                } else {
Note: See TracChangeset for help on using the changeset viewer.