Added scope calculation for Objective-C classes.

This commit is contained in:
Erik Verbruggen
2009-11-11 09:21:06 +01:00
parent 7938f9def9
commit 72d4493fc2
17 changed files with 513 additions and 28 deletions

View File

@@ -662,15 +662,13 @@ bool CheckDeclaration::visit(ObjCMethodDeclarationAST *ast)
Declaration *decl = control()->newDeclaration(ast->firstToken(), methodType->name());
decl->setType(methodType);
symbol = decl;
symbol->setStorage(methodType->storage());
}
symbol->setStartOffset(tokenAt(ast->firstToken()).offset);
symbol->setEndOffset(tokenAt(ast->lastToken()).offset);
symbol->setVisibility(semantic()->currentVisibility());
if (semantic()->isObjCClassMethod(ast->method_prototype->method_type_token))
symbol->setStorage(Symbol::Static);
_scope->enterSymbol(symbol);
return false;