summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/CheckDeclaration.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2010-03-23 12:04:44 +0100
committerErik Verbruggen <erik.verbruggen@nokia.com>2010-03-23 14:15:45 +0100
commit9efa5d940acd0d000cc76515d5dbafa519c3d33f (patch)
tree4a78bba8dd1b74998f929af44fb3415089fef6eb /src/shared/cplusplus/CheckDeclaration.cpp
parentf45ff92c28817558509aaca6a5e2f56bcb14bbef (diff)
downloadqt-creator-9efa5d940acd0d000cc76515d5dbafa519c3d33f.tar.gz
Added __attribute__ visiting, and storing of the deprecated attr.
Diffstat (limited to 'src/shared/cplusplus/CheckDeclaration.cpp')
-rw-r--r--src/shared/cplusplus/CheckDeclaration.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/shared/cplusplus/CheckDeclaration.cpp b/src/shared/cplusplus/CheckDeclaration.cpp
index a53161245c..dcb2364b11 100644
--- a/src/shared/cplusplus/CheckDeclaration.cpp
+++ b/src/shared/cplusplus/CheckDeclaration.cpp
@@ -167,6 +167,8 @@ bool CheckDeclaration::visit(SimpleDeclarationAST *ast)
symbol->setTemplateParameters(_templateParameters);
_templateParameters = 0;
}
+ if (ty.isDeprecated())
+ symbol->setDeprecated(true);
_scope->enterSymbol(symbol);
return false;
@@ -198,6 +200,8 @@ bool CheckDeclaration::visit(SimpleDeclarationAST *ast)
fun->setName(name);
fun->setMethodKey(semantic()->currentMethodKey());
fun->setVirtual(ty.isVirtual());
+ if (ty.isDeprecated())
+ fun->setDeprecated(true);
if (isQ_SIGNAL)
fun->setMethodKey(Function::SignalMethod);
else if (isQ_SLOT)
@@ -215,6 +219,8 @@ bool CheckDeclaration::visit(SimpleDeclarationAST *ast)
symbol->setEndOffset(tokenAt(ast->lastToken()).offset);
symbol->setType(declTy);
+ if (declTy.isDeprecated())
+ symbol->setDeprecated(true);
if (_templateParameters && it == ast->declarator_list) {
symbol->setTemplateParameters(_templateParameters);
@@ -235,6 +241,8 @@ bool CheckDeclaration::visit(SimpleDeclarationAST *ast)
symbol->setStorage(Symbol::Mutable);
else if (ty.isTypedef())
symbol->setStorage(Symbol::Typedef);
+ else if (ty.isDeprecated())
+ symbol->setDeprecated(true);
if (it->value && it->value->initializer) {
FullySpecifiedType initTy = semantic()->check(it->value->initializer, _scope);
@@ -314,6 +322,8 @@ bool CheckDeclaration::visit(FunctionDefinitionAST *ast)
Function *fun = funTy->asFunctionType();
fun->setVirtual(ty.isVirtual());
+ if (ty.isDeprecated())
+ fun->setDeprecated(true);
fun->setStartOffset(tokenAt(ast->firstToken()).offset);
fun->setEndOffset(tokenAt(ast->lastToken()).offset);
if (ast->declarator)
@@ -703,6 +713,8 @@ bool CheckDeclaration::visit(ObjCMethodDeclarationAST *ast)
symbol->setStartOffset(tokenAt(ast->firstToken()).offset);
symbol->setEndOffset(tokenAt(ast->lastToken()).offset);
symbol->setVisibility(semantic()->currentObjCVisibility());
+ if (ty.isDeprecated())
+ symbol->setDeprecated(true);
_scope->enterSymbol(symbol);