Ignore:
Timestamp:
Sep 9, 2016, 9:20:33 AM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
b6fe7e6
Parents:
4563a95
Message:

check that assignment routines have a reasonable signature, add noreturn attribute to assert_fail_f to silence warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/InitTweak.cc

    r4563a95 rd1969a6  
    358358                template<typename CallExpr>
    359359                Expression *& callArg( CallExpr * callExpr, unsigned int pos ) {
    360                         if ( pos >= callExpr->get_args().size() ) assert( false && "asking for argument that doesn't exist. Return NULL/throw exception?" );
     360                        if ( pos >= callExpr->get_args().size() ) assertf( false, "asking for argument that doesn't exist. Return NULL/throw exception?" );
    361361                        for ( Expression *& arg : callExpr->get_args() ) {
    362362                                if ( pos == 0 ) return arg;
     
    373373                        return callArg( untypedExpr, pos );
    374374                } else {
    375                         assert( false && "Unexpected expression type passed to getCallArg" );
     375                        assertf( false, "Unexpected expression type passed to getCallArg" );
    376376                }
    377377        }
     
    388388                                return memberExpr->get_member()->get_name();
    389389                        } else {
    390                                 assert( false && "Unexpected expression type being called as a function in call expression" );
     390                                assertf( false, "Unexpected expression type being called as a function in call expression" );
    391391                        }
    392392                }
     
    400400                } else {
    401401                        std::cerr << expr << std::endl;
    402                         assert( false && "Unexpected expression type passed to getFunctionName" );
     402                        assertf( false, "Unexpected expression type passed to getFunctionName" );
    403403                }
    404404        }
Note: See TracChangeset for help on using the changeset viewer.