forked from qt-creator/qt-creator
Rename the given enumerator.
This commit is contained in:
@@ -188,10 +188,10 @@ protected:
|
||||
|
||||
bool isDeclSymbol(Symbol *symbol) const
|
||||
{
|
||||
if (! symbol)
|
||||
if (! symbol) {
|
||||
return false;
|
||||
|
||||
else if (symbol == _declSymbol) {
|
||||
} else if (symbol == _declSymbol) {
|
||||
return true;
|
||||
|
||||
} else if (symbol->line() == _declSymbol->line() && symbol->column() == _declSymbol->column()) {
|
||||
@@ -369,6 +369,20 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(EnumeratorAST *ast)
|
||||
{
|
||||
Identifier *id = identifier(ast->identifier_token);
|
||||
if (id == _id) {
|
||||
LookupContext context = currentContext(ast);
|
||||
const QList<Symbol *> candidates = context.resolve(control()->nameId(id));
|
||||
reportResult(ast->identifier_token, candidates);
|
||||
}
|
||||
|
||||
accept(ast->expression);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(SimpleNameAST *ast)
|
||||
{
|
||||
Identifier *id = identifier(ast->identifier_token);
|
||||
|
Reference in New Issue
Block a user