summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/CheckDeclaration.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2010-02-08 09:34:51 +0100
committerErik Verbruggen <erik.verbruggen@nokia.com>2010-02-08 09:34:51 +0100
commitb58cb740e5e08f7a11a7b176a97351bf49b0d52a (patch)
treef6a7ffbed6dc2296b96bf229ffd054f5fce07771 /src/shared/cplusplus/CheckDeclaration.cpp
parent4a652f6eca84fc641afb922f99581a6a15802a69 (diff)
downloadqt-creator-b58cb740e5e08f7a11a7b176a97351bf49b0d52a.tar.gz
Changed ObjC message arguments to have SimpleName for the name part.
Diffstat (limited to 'src/shared/cplusplus/CheckDeclaration.cpp')
-rw-r--r--src/shared/cplusplus/CheckDeclaration.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/shared/cplusplus/CheckDeclaration.cpp b/src/shared/cplusplus/CheckDeclaration.cpp
index faeac37e10..7ad7662af3 100644
--- a/src/shared/cplusplus/CheckDeclaration.cpp
+++ b/src/shared/cplusplus/CheckDeclaration.cpp
@@ -319,18 +319,14 @@ bool CheckDeclaration::visit(FunctionDefinitionAST *ast)
const bool isQ_SLOT = ast->qt_invokable_token && tokenKind(ast->qt_invokable_token) == T_Q_SLOT;
const bool isQ_SIGNAL = ast->qt_invokable_token && tokenKind(ast->qt_invokable_token) == T_Q_SIGNAL;
-#ifdef ICHECK_BUILD
- const bool isQ_INVOKABLE = (ast->invoke_token > 0);
-#endif
+ const bool isQ_INVOKABLE = ast->qt_invokable_token && tokenKind(ast->qt_invokable_token) == T_Q_INVOKABLE;
if (isQ_SIGNAL)
fun->setMethodKey(Function::SignalMethod);
else if (isQ_SLOT)
fun->setMethodKey(Function::SlotMethod);
-#ifdef ICHECK_BUILD
else if (isQ_INVOKABLE)
- fun->setInvokable(true);
-#endif
+ fun->setMethodKey(Function::InvokableMethod);
checkFunctionArguments(fun);
@@ -672,10 +668,14 @@ bool CheckDeclaration::visit(ObjCClassDeclarationAST *ast)
bool CheckDeclaration::visit(ObjCMethodDeclarationAST *ast)
{
- if (!ast->method_prototype)
+ ObjCMethodPrototypeAST *methodProto = ast->method_prototype;
+ if (!methodProto)
+ return false;
+ ObjCSelectorAST *selector = methodProto->selector;
+ if (!selector)
return false;
- FullySpecifiedType ty = semantic()->check(ast->method_prototype, _scope);
+ FullySpecifiedType ty = semantic()->check(methodProto, _scope);
ObjCMethod *methodTy = ty.type()->asObjCMethodType();
if (!methodTy)
return false;
@@ -688,15 +688,15 @@ bool CheckDeclaration::visit(ObjCMethodDeclarationAST *ast)
symbol = methodTy;
} else {
- Declaration *decl = control()->newDeclaration(ast->firstToken(), methodTy->name());
+ Declaration *decl = control()->newDeclaration(selector->firstToken(), methodTy->name());
decl->setType(methodTy);
symbol = decl;
symbol->setStorage(methodTy->storage());
}
- symbol->setStartOffset(tokenAt(ast->firstToken()).offset);
- symbol->setEndOffset(tokenAt(ast->lastToken()).offset);
- symbol->setVisibility(semantic()->currentVisibility());
+ symbol->setStartOffset(tokenAt(selector->firstToken()).offset);
+ symbol->setEndOffset(tokenAt(selector->lastToken()).offset);
+ symbol->setVisibility(semantic()->currentObjCVisibility());
_scope->enterSymbol(symbol);