summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/CheckExpression.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/cplusplus/CheckExpression.cpp')
-rw-r--r--src/shared/cplusplus/CheckExpression.cpp35
1 files changed, 12 insertions, 23 deletions
diff --git a/src/shared/cplusplus/CheckExpression.cpp b/src/shared/cplusplus/CheckExpression.cpp
index 6700b229b8..805975b625 100644
--- a/src/shared/cplusplus/CheckExpression.cpp
+++ b/src/shared/cplusplus/CheckExpression.cpp
@@ -168,43 +168,37 @@ bool CheckExpression::visit(ArrayInitializerAST *ast)
bool CheckExpression::visit(QualifiedNameAST *ast)
{
- Name *name = semantic()->check(ast, _scope);
- _scope->addUse(ast->firstToken(), name);
+ (void) semantic()->check(ast, _scope);
return false;
}
bool CheckExpression::visit(OperatorFunctionIdAST *ast)
{
- Name *name = semantic()->check(ast, _scope);
- _scope->addUse(ast->firstToken(), name);
+ (void) semantic()->check(ast, _scope);
return false;
}
bool CheckExpression::visit(ConversionFunctionIdAST *ast)
{
- Name *name = semantic()->check(ast, _scope);
- _scope->addUse(ast->firstToken(), name);
+ (void) semantic()->check(ast, _scope);
return false;
}
bool CheckExpression::visit(SimpleNameAST *ast)
{
- Name *name = semantic()->check(ast, _scope);
- _scope->addUse(ast->firstToken(), name);
+ (void) semantic()->check(ast, _scope);
return false;
}
bool CheckExpression::visit(DestructorNameAST *ast)
{
- Name *name = semantic()->check(ast, _scope);
- _scope->addUse(ast->firstToken(), name);
+ (void) semantic()->check(ast, _scope);
return false;
}
bool CheckExpression::visit(TemplateIdAST *ast)
{
- Name *name = semantic()->check(ast, _scope);
- _scope->addUse(ast->firstToken(), name);
+ (void) semantic()->check(ast, _scope);
return false;
}
@@ -246,11 +240,11 @@ bool CheckExpression::visit(TypeidExpressionAST *ast)
bool CheckExpression::visit(TypenameCallExpressionAST *ast)
{
- if (Name *name = semantic()->check(ast->name, _scope)) {
- _scope->addUse(ast->name->firstToken(), name);
- }
+ (void) semantic()->check(ast->name, _scope);
+
for (ExpressionListAST *it = ast->expression_list; it; it = it->next) {
FullySpecifiedType exprTy = semantic()->check(it->expression, _scope);
+ (void) exprTy;
}
return false;
}
@@ -378,17 +372,14 @@ bool CheckExpression::visit(PostIncrDecrAST *)
bool CheckExpression::visit(MemberAccessAST *ast)
{
- if (Name *name = semantic()->check(ast->member_name, _scope))
- _scope->addUse(ast->member_name->firstToken(), name);
+ (void) semantic()->check(ast->member_name, _scope);
return false;
}
bool CheckExpression::visit(ObjCMessageExpressionAST *ast)
{
semantic()->check(ast->receiver_expression, _scope);
-
- if (Name *name = semantic()->check(ast->selector, _scope))
- _scope->addUse(ast->selector->firstToken(), name);
+ (void) semantic()->check(ast->selector, _scope);
accept(ast->argument_list);
return false;
@@ -402,9 +393,7 @@ bool CheckExpression::visit(ObjCEncodeExpressionAST * /*ast*/)
bool CheckExpression::visit(ObjCSelectorExpressionAST *ast)
{
- if (Name *name = semantic()->check(ast->selector, _scope))
- _scope->addUse(ast->selector->firstToken(), name);
-
+ (void) semantic()->check(ast->selector, _scope);
return false;
}