Changeset 207c7e1d for src/InitTweak
- Timestamp:
- Jan 23, 2017, 11:42:09 AM (8 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:
- 092528b
- Parents:
- bd98b58
- Location:
- src/InitTweak
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cc
rbd98b58 r207c7e1d 547 547 } 548 548 549 FunctionDecl * isAssignment( Declaration * decl ) { 550 return isCopyFunction( decl, "?=?" ); 551 } 552 FunctionDecl * isDestructor( Declaration * decl ) { 553 if ( isDestructor( decl->get_name() ) ) { 554 return dynamic_cast< FunctionDecl * >( decl ); 555 } 556 return nullptr; 557 } 558 FunctionDecl * isDefaultConstructor( Declaration * decl ) { 559 if ( isConstructor( decl->get_name() ) ) { 560 if ( FunctionDecl * func = dynamic_cast< FunctionDecl * >( decl ) ) { 561 if ( func->get_functionType()->get_parameters().size() == 1 ) { 562 return func; 563 } 564 } 565 } 566 return nullptr; 567 } 549 568 FunctionDecl * isCopyConstructor( Declaration * decl ) { 550 569 return isCopyFunction( decl, "?{}" ); -
src/InitTweak/InitTweak.h
rbd98b58 r207c7e1d 32 32 bool isCtorDtorAssign( const std::string & ); 33 33 34 FunctionDecl * isAssignment( Declaration * decl ); 35 FunctionDecl * isDestructor( Declaration * decl ); 36 FunctionDecl * isDefaultConstructor( Declaration * decl ); 34 37 FunctionDecl * isCopyConstructor( Declaration * decl ); 35 38 FunctionDecl * isCopyFunction( Declaration * decl, const std::string & fname );
Note: See TracChangeset
for help on using the changeset viewer.