Changeset d76c588 for src/InitTweak
- Timestamp:
- May 30, 2019, 4:10:24 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 8d70648
- Parents:
- eba615c
- Location:
- src/InitTweak
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cc
reba615c rd76c588 756 756 } 757 757 758 bool isCopyFunction( const ast::FunctionDecl * decl ) { 759 const ast::FunctionType * ftype = decl->type; 760 if ( ftype->params.size() != 2 ) return false; 761 762 const ast::Type * t1 = getPointerBase( ftype->params.front()->get_type() ); 763 if ( ! t1 ) return false; 764 const ast::Type * t2 = ftype->params.back()->get_type(); 765 766 return ResolvExpr::typesCompatibleIgnoreQualifiers( t1, t2, ast::SymbolTable{} ); 767 } 768 758 769 FunctionDecl * isAssignment( Declaration * decl ) { 759 770 return isCopyFunction( decl, "?=?" ); -
src/InitTweak/InitTweak.h
reba615c rd76c588 30 30 FunctionDecl * isCopyConstructor( Declaration * decl ); 31 31 FunctionDecl * isCopyFunction( Declaration * decl, const std::string & fname ); 32 bool isCopyFunction( const ast::FunctionDecl * decl ); 32 33 33 34 /// returns the base type of the first parameter to a constructor/destructor/assignment function
Note:
See TracChangeset
for help on using the changeset viewer.