diff options
author | Erik Verbruggen <erik.verbruggen@nokia.com> | 2009-07-20 11:46:59 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@nokia.com> | 2009-07-20 11:46:59 +0200 |
commit | 336e1dc5fb596ff7ed84e3a405a1efd578ee4330 (patch) | |
tree | a9973006aa82733a3b5cad24f23fc35bf22ec49c /src/shared/cplusplus/ASTClone.cpp | |
parent | 0eef527746703c067dff7de84a90d71e4509c361 (diff) | |
download | qt-creator-336e1dc5fb596ff7ed84e3a405a1efd578ee4330.tar.gz |
Fixes for the ObjC AST. Now it should be complete.
Diffstat (limited to 'src/shared/cplusplus/ASTClone.cpp')
-rw-r--r-- | src/shared/cplusplus/ASTClone.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/shared/cplusplus/ASTClone.cpp b/src/shared/cplusplus/ASTClone.cpp index 1e160ae274..3340a39f25 100644 --- a/src/shared/cplusplus/ASTClone.cpp +++ b/src/shared/cplusplus/ASTClone.cpp @@ -1246,6 +1246,7 @@ ObjCCategoryInterfaceDeclarationAST *ObjCCategoryInterfaceDeclarationAST::clone( ObjCCategoryInterfaceDeclarationAST *ast = new (pool) ObjCCategoryInterfaceDeclarationAST; // copy DeclarationAST // copy ObjCCategoryInterfaceDeclarationAST + if (attributes) ast->attributes = attributes->clone(pool); ast->interface_token = interface_token; ast->class_identifier_token = class_identifier_token; if (protocol_refs) ast->protocol_refs = protocol_refs->clone(pool); @@ -1420,6 +1421,22 @@ ObjCMethodPrototypeAST *ObjCMethodPrototypeAST::clone(MemoryPool *pool) const return ast; } +ObjCMethodDeclarationAST *ObjCMethodDeclarationAST::clone(MemoryPool *pool) const +{ + ObjCMethodDeclarationAST *ast = new (pool) ObjCMethodDeclarationAST; + if (method_prototype) ast->method_prototype = method_prototype->clone(pool); + ast->semicolon_token = semicolon_token; + return ast; +} + +ObjCMethodDefinitionAST *ObjCMethodDefinitionAST::clone(MemoryPool *pool) const +{ + ObjCMethodDefinitionAST *ast = new (pool) ObjCMethodDefinitionAST; + if (method_prototype) ast->method_prototype = method_prototype->clone(pool); + if (function_body) ast->function_body = function_body->clone(pool); + return ast; +} + ObjCClassImplementationAST *ObjCClassImplementationAST::clone(MemoryPool *pool) const { ObjCClassImplementationAST *ast = new (pool) ObjCClassImplementationAST; |