Changeset 0a267c1 for src/InitTweak
- Timestamp:
- Oct 19, 2017, 11:13:12 AM (7 years ago)
- 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:
- 18ca28e
- Parents:
- b4748db
- git-author:
- Rob Schluntz <rschlunt@…> (10/13/17 12:38:26)
- git-committer:
- Rob Schluntz <rschlunt@…> (10/19/17 11:13:12)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cc
rb4748db r0a267c1 578 578 FunctionDecl * isCopyFunction( Declaration * decl, const std::string & fname ) { 579 579 FunctionDecl * function = dynamic_cast< FunctionDecl * >( decl ); 580 if ( ! function ) return 0;581 if ( function-> get_name() != fname ) return 0;582 FunctionType * ftype = function-> get_functionType();583 if ( ftype-> get_parameters().size() != 2 ) return 0;580 if ( ! function ) return nullptr; 581 if ( function->name != fname ) return nullptr; 582 FunctionType * ftype = function->type; 583 if ( ftype->parameters.size() != 2 ) return nullptr; 584 584 585 585 Type * t1 = getPointerBase( ftype->get_parameters().front()->get_type() ); 586 Type * t2 = ftype-> get_parameters().back()->get_type();586 Type * t2 = ftype->parameters.back()->get_type(); 587 587 assert( t1 ); 588 588 … … 604 604 } 605 605 FunctionDecl * isDefaultConstructor( Declaration * decl ) { 606 if ( isConstructor( decl-> get_name()) ) {606 if ( isConstructor( decl->name ) ) { 607 607 if ( FunctionDecl * func = dynamic_cast< FunctionDecl * >( decl ) ) { 608 if ( func-> get_functionType()->get_parameters().size() == 1 ) {608 if ( func->type->parameters.size() == 1 ) { 609 609 return func; 610 610 }
Note: See TracChangeset
for help on using the changeset viewer.