summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/CheckDeclarator.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2009-08-05 18:30:18 +0200
committerErik Verbruggen <erik.verbruggen@nokia.com>2009-08-05 18:30:18 +0200
commit86a7b26fcd09c5c0510410631421956b877db840 (patch)
tree8b116f47776c64b60d182c246f9ddeab534403a7 /src/shared/cplusplus/CheckDeclarator.cpp
parentca34b0ca1c57a0ec0f8f61ad1b0dd4f8bfc9b554 (diff)
downloadqt-creator-86a7b26fcd09c5c0510410631421956b877db840.tar.gz
Fixed semantic checks for Objective-C methods and fast-enumeration.
Diffstat (limited to 'src/shared/cplusplus/CheckDeclarator.cpp')
-rw-r--r--src/shared/cplusplus/CheckDeclarator.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/shared/cplusplus/CheckDeclarator.cpp b/src/shared/cplusplus/CheckDeclarator.cpp
index f7dd1b624b..7319506f96 100644
--- a/src/shared/cplusplus/CheckDeclarator.cpp
+++ b/src/shared/cplusplus/CheckDeclarator.cpp
@@ -254,14 +254,12 @@ bool CheckDeclarator::visit(ObjCMethodPrototypeAST *ast)
Name *name = semantic()->check(ast->selector, _scope);
- Function *fun = control()->newFunction(location, name);
- ast->symbol = fun;
- fun->setSourceLocation(location);
- fun->setScope(_scope);
- fun->setMethodKey(Function::NormalMethod);
- fun->setVisibility(semantic()->currentVisibility());
- fun->setPureVirtual(false);
- fun->setReturnType(returnType);
+ ObjCMethod *method = control()->newObjCMethod(location, name);
+ ast->symbol = method;
+ method->setSourceLocation(location);
+ method->setScope(_scope);
+ method->setVisibility(semantic()->currentVisibility());
+ method->setReturnType(returnType);
if (ast->selector && ast->selector->asObjCSelectorWithArguments()) {
// TODO: check the parameters (EV)
@@ -270,11 +268,11 @@ bool CheckDeclarator::visit(ObjCMethodPrototypeAST *ast)
for (ObjCMessageArgumentDeclarationListAST *it = ast->arguments; it; it = it->next) {
ObjCMessageArgumentDeclarationAST *argDecl = it->argument_declaration;
- semantic()->check(argDecl, fun->arguments());
+ semantic()->check(argDecl, method->arguments());
}
}
- _fullySpecifiedType = FullySpecifiedType(fun);
+ _fullySpecifiedType = FullySpecifiedType(method);
// TODO: check which specifiers are allowed here (EV)