summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/ASTClone.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2009-07-20 11:46:59 +0200
committerErik Verbruggen <erik.verbruggen@nokia.com>2009-07-20 11:46:59 +0200
commit336e1dc5fb596ff7ed84e3a405a1efd578ee4330 (patch)
treea9973006aa82733a3b5cad24f23fc35bf22ec49c /src/shared/cplusplus/ASTClone.cpp
parent0eef527746703c067dff7de84a90d71e4509c361 (diff)
downloadqt-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.cpp17
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;