diff options
author | Orgad Shaneh <[email protected]> | 2015-04-20 17:42:34 +0300 |
---|---|---|
committer | Orgad Shaneh <[email protected]> | 2015-04-20 14:51:56 +0000 |
commit | cb350bfeb26afaa047f74232b7afc3f143684ef6 (patch) | |
tree | dba299523c5055505cfdc2dc299d092a13094f74 /src/plugins/cpptools/cppchecksymbols.cpp | |
parent | 9e1e11db60995bf4d826b1424802ce96a10e064f (diff) |
C++: Rename ClassOrNamespace -> LookupScope
Change-Id: Ide74482b133dd1fec40a725d9aa81bd749385f37
Reviewed-by: Nikolai Kosjar <[email protected]>
Diffstat (limited to 'src/plugins/cpptools/cppchecksymbols.cpp')
-rw-r--r-- | src/plugins/cpptools/cppchecksymbols.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/plugins/cpptools/cppchecksymbols.cpp b/src/plugins/cpptools/cppchecksymbols.cpp index d7bee2281d0..5ba8864b186 100644 --- a/src/plugins/cpptools/cppchecksymbols.cpp +++ b/src/plugins/cpptools/cppchecksymbols.cpp @@ -673,7 +673,7 @@ bool CheckSymbols::visit(NewExpressionAST *ast) if (highlightCtorDtorAsType) { accept(ast->new_type_id); } else { - ClassOrNamespace *binding = 0; + LookupScope *binding = 0; NameAST *nameAST = 0; if (ast->new_type_id) { for (SpecifierListAST *it = ast->new_type_id->type_specifier_list; it; it = it->next) { @@ -739,7 +739,7 @@ void CheckSymbols::checkNamespace(NameAST *name) unsigned line, column; getTokenStartPosition(name->firstToken(), &line, &column); - if (ClassOrNamespace *b = _context.lookupType(name->name, enclosingScope())) { + if (LookupScope *b = _context.lookupType(name->name, enclosingScope())) { foreach (Symbol *s, b->symbols()) { if (s->isNamespace()) return; @@ -772,14 +772,14 @@ bool CheckSymbols::hasVirtualDestructor(Class *klass) const return false; } -bool CheckSymbols::hasVirtualDestructor(ClassOrNamespace *binding) const +bool CheckSymbols::hasVirtualDestructor(LookupScope *binding) const { - QSet<ClassOrNamespace *> processed; - QList<ClassOrNamespace *> todo; + QSet<LookupScope *> processed; + QList<LookupScope *> todo; todo.append(binding); while (!todo.isEmpty()) { - ClassOrNamespace *b = todo.takeFirst(); + LookupScope *b = todo.takeFirst(); if (b && !processed.contains(b)) { processed.insert(b); foreach (Symbol *s, b->symbols()) { @@ -861,7 +861,7 @@ bool CheckSymbols::visit(QualifiedNameAST *ast) { if (ast->name) { - ClassOrNamespace *binding = checkNestedName(ast); + LookupScope *binding = checkNestedName(ast); if (binding && ast->unqualified_name) { if (ast->unqualified_name->asDestructorName() != 0) { @@ -890,9 +890,9 @@ bool CheckSymbols::visit(QualifiedNameAST *ast) return false; } -ClassOrNamespace *CheckSymbols::checkNestedName(QualifiedNameAST *ast) +LookupScope *CheckSymbols::checkNestedName(QualifiedNameAST *ast) { - ClassOrNamespace *binding = 0; + LookupScope *binding = 0; if (ast->name) { if (NestedNameSpecifierListAST *it = ast->nested_name_specifier_list) { @@ -958,7 +958,7 @@ bool CheckSymbols::visit(MemInitializerAST *ast) { if (FunctionDefinitionAST *enclosingFunction = enclosingFunctionDefinition()) { if (ast->name && enclosingFunction->symbol) { - if (ClassOrNamespace *binding = _context.lookupType(enclosingFunction->symbol)) { + if (LookupScope *binding = _context.lookupType(enclosingFunction->symbol)) { foreach (Symbol *s, binding->symbols()) { if (Class *klass = s->asClass()) { NameAST *nameAST = ast->name; @@ -1161,7 +1161,7 @@ void CheckSymbols::addUse(const Result &use) _usages.append(use); } -void CheckSymbols::addType(ClassOrNamespace *b, NameAST *ast) +void CheckSymbols::addType(LookupScope *b, NameAST *ast) { unsigned startToken; if (!b || !acceptName(ast, &startToken)) |