summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-08-13 16:52:59 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2010-08-13 16:55:43 +0200
commitd21de8c621c4bdbc25fa662de58a77704953edba (patch)
tree53cc031f7f2085c3ea902e4a33437f25877be97e /src/shared/cplusplus
parentae5db839e18ea25aab7266b12b76f766b5e78074 (diff)
downloadqt-creator-d21de8c621c4bdbc25fa662de58a77704953edba.tar.gz
Fixed the objc auto tests
Diffstat (limited to 'src/shared/cplusplus')
-rw-r--r--src/shared/cplusplus/Bind.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/shared/cplusplus/Bind.cpp b/src/shared/cplusplus/Bind.cpp
index 436f68ebc1..9b5fe050ec 100644
--- a/src/shared/cplusplus/Bind.cpp
+++ b/src/shared/cplusplus/Bind.cpp
@@ -953,7 +953,6 @@ ObjCMethod *Bind::objCMethodPrototype(ObjCMethodPrototypeAST *ast)
if (isObjCClassMethod(tokenKind(ast->method_type_token)))
method->setStorage(Symbol::Static);
method->setVisibility(_objcVisibility);
- _scope->addMember(method);
ast->symbol = method;
Scope *previousScope = switchScope(method);
@@ -969,7 +968,7 @@ ObjCMethod *Bind::objCMethodPrototype(ObjCMethodPrototypeAST *ast)
for (SpecifierListAST *it = ast->attribute_list; it; it = it->next) {
specifiers = this->specifier(it->value, specifiers);
}
- setDeclSpecifiers(method, specifiers);
+ //setDeclSpecifiers(method, specifiers);
return method;
}
@@ -2285,10 +2284,17 @@ bool Bind::visit(ObjCMethodDeclarationAST *ast)
{
ObjCMethod *method = this->objCMethodPrototype(ast->method_prototype);
- if (! _skipFunctionBodies && ast->function_body) {
+ if (! ast->function_body) {
+ const Name *name = method->name();
+ unsigned sourceLocation = ast->firstToken();
+ Declaration *decl = control()->newDeclaration(sourceLocation, name);
+ decl->setType(method);
+ _scope->addMember(decl);
+ } else if (! _skipFunctionBodies && ast->function_body) {
Scope *previousScope = switchScope(method);
this->statement(ast->function_body);
(void) switchScope(previousScope);
+ _scope->addMember(method);
}
return false;