diff options
author | Erik Verbruggen <erik.verbruggen@nokia.com> | 2009-09-21 18:26:37 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@nokia.com> | 2009-09-21 18:26:37 +0200 |
commit | b92e1a0abf9896e2b2154ab36c84e89dd9a029f8 (patch) | |
tree | 70f23bad568b13f0944fa56ca566fee33f811c79 /src/shared/cplusplus/CheckDeclaration.cpp | |
parent | 5c8e6e9f7c32dfa79068a037a728956f0319a881 (diff) | |
download | qt-creator-b92e1a0abf9896e2b2154ab36c84e89dd9a029f8.tar.gz |
Wee little cleanup.
Diffstat (limited to 'src/shared/cplusplus/CheckDeclaration.cpp')
-rw-r--r-- | src/shared/cplusplus/CheckDeclaration.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shared/cplusplus/CheckDeclaration.cpp b/src/shared/cplusplus/CheckDeclaration.cpp index ab359d9c05..65d66be020 100644 --- a/src/shared/cplusplus/CheckDeclaration.cpp +++ b/src/shared/cplusplus/CheckDeclaration.cpp @@ -594,16 +594,16 @@ bool CheckDeclaration::visit(ObjCMethodDeclarationAST *ast) return false; Symbol *symbol; - if (!ast->function_body) { - Declaration *decl = control()->newDeclaration(ast->firstToken(), methodType->name()); - decl->setType(methodType); - symbol = decl; - } else { + if (ast->function_body) { if (!semantic()->skipFunctionBodies()) { semantic()->check(ast->function_body, methodType->members()); } symbol = methodType; + } else { + Declaration *decl = control()->newDeclaration(ast->firstToken(), methodType->name()); + decl->setType(methodType); + symbol = decl; } symbol->setStartOffset(tokenAt(ast->firstToken()).offset); |