summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/cplusplus')
-rw-r--r--src/shared/cplusplus/CheckExpression.cpp35
-rw-r--r--src/shared/cplusplus/Scope.cpp3
-rw-r--r--src/shared/cplusplus/Scope.h30
3 files changed, 12 insertions, 56 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;
}
diff --git a/src/shared/cplusplus/Scope.cpp b/src/shared/cplusplus/Scope.cpp
index 5f5e6d5ca7..6c910c072c 100644
--- a/src/shared/cplusplus/Scope.cpp
+++ b/src/shared/cplusplus/Scope.cpp
@@ -297,7 +297,4 @@ Scope::iterator Scope::firstSymbol() const
Scope::iterator Scope::lastSymbol() const
{ return _symbols + _symbolCount + 1; }
-void Scope::addUse(unsigned, Name *)
-{ }
-
CPLUSPLUS_END_NAMESPACE
diff --git a/src/shared/cplusplus/Scope.h b/src/shared/cplusplus/Scope.h
index 0daf7751c0..5fb9eb3ac7 100644
--- a/src/shared/cplusplus/Scope.h
+++ b/src/shared/cplusplus/Scope.h
@@ -54,34 +54,6 @@
CPLUSPLUS_BEGIN_HEADER
CPLUSPLUS_BEGIN_NAMESPACE
-class CPLUSPLUS_EXPORT Use
-{
-public:
- inline Name *name() const
- { return _name; }
-
- inline unsigned sourceOffset() const
- { return _sourceOffset; }
-
- inline Symbol *lastVisibleSymbol() const
- { return _lastVisibleSymbol; }
-
-private:
- void init(unsigned sourceOffset, Name *name, Symbol *lastVisibleSymbol)
- {
- _sourceOffset = sourceOffset;
- _name = name;
- _lastVisibleSymbol = lastVisibleSymbol;
- }
-
- unsigned _sourceOffset;
-
- Name *_name;
- Symbol *_lastVisibleSymbol;
-
- friend class Scope;
-};
-
class CPLUSPLUS_EXPORT Scope
{
Scope(const Scope &other);
@@ -160,8 +132,6 @@ public:
Symbol *lookat(Identifier *id) const;
Symbol *lookat(int operatorId) const;
- void addUse(unsigned sourceOffset, Name *name);
-
private:
/// Returns the hash value for the given Symbol.
unsigned hashValue(Symbol *symbol) const;