summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/CheckDeclaration.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2009-08-04 16:22:24 +0200
committerErik Verbruggen <erik.verbruggen@nokia.com>2009-08-04 16:22:24 +0200
commite53d23d55c7df81f47f3b8ee78ed2c5863acf083 (patch)
tree4552e25864eafba55d27e78106ca29d44e1a20fb /src/shared/cplusplus/CheckDeclaration.cpp
parent86ff16e58cac3e85ffe685053b4314c565ecdfb1 (diff)
downloadqt-creator-e53d23d55c7df81f47f3b8ee78ed2c5863acf083.tar.gz
Merged ObjCMethodDefinitionAST into ObjCMethodDeclarationAST.
Diffstat (limited to 'src/shared/cplusplus/CheckDeclaration.cpp')
-rw-r--r--src/shared/cplusplus/CheckDeclaration.cpp28
1 files changed, 1 insertions, 27 deletions
diff --git a/src/shared/cplusplus/CheckDeclaration.cpp b/src/shared/cplusplus/CheckDeclaration.cpp
index f3157e7bc6..f82394548c 100644
--- a/src/shared/cplusplus/CheckDeclaration.cpp
+++ b/src/shared/cplusplus/CheckDeclaration.cpp
@@ -595,33 +595,7 @@ bool CheckDeclaration::visit(ObjCMethodDeclarationAST *ast)
_scope->enterSymbol(symbol);
- return false;
-}
-
-bool CheckDeclaration::visit(ObjCMethodDefinitionAST *ast)
-{
- if (!ast->method_prototype)
- return false;
-
- FullySpecifiedType ty = semantic()->check(ast->method_prototype, _scope);
- Function *fun = ty.type()->asFunctionType();
- if (!fun)
- return false;
-
- Declaration *symbol = control()->newDeclaration(ast->firstToken(), fun->name());
- symbol->setStartOffset(tokenAt(ast->firstToken()).offset);
- symbol->setEndOffset(tokenAt(ast->lastToken()).offset);
-
- symbol->setType(fun->returnType());
-
- symbol->setVisibility(semantic()->currentVisibility());
-
- if (semantic()->isObjCClassMethod(ast->method_prototype->method_type_token))
- symbol->setStorage(Symbol::Static);
-
- _scope->enterSymbol(symbol);
-
- if (! semantic()->skipFunctionBodies()) {
+ if (ast->function_body && !semantic()->skipFunctionBodies()) {
semantic()->check(ast->function_body, fun->members());
}