Commit 083ea37eb0f44c31f2ecc1011a3a0c99f0c94971

  • avatar
  • con <qtc-committer @no…a.com> (Committer)
  • Tue Oct 13 14:49:12 CEST 2009
  • avatar
  • Roberto Raggi (Author)
  • Tue Oct 13 14:38:37 CEST 2009
Rename the given enumerator.
(cherry picked from commit c33a8e94981f6b1acf2b11aaf04c3e86f6ceea12)
  
168168
169169 bool isDeclSymbol(Symbol *symbol) const
170170 {
171 if (! symbol)
171 if (! symbol) {
172172 return false;
173173
174 else if (symbol == _declSymbol) {
174 } else if (symbol == _declSymbol) {
175175 return true;
176176
177177 } else if (symbol->line() == _declSymbol->line() && symbol->column() == _declSymbol->column()) {
345345 if (identifier_token && identifier(identifier_token) == _id)
346346 checkExpression(ast->firstToken(), identifier_token);
347347 }
348
349 return false;
350 }
351
352 virtual bool visit(EnumeratorAST *ast)
353 {
354 Identifier *id = identifier(ast->identifier_token);
355 if (id == _id) {
356 LookupContext context = currentContext(ast);
357 const QList<Symbol *> candidates = context.resolve(control()->nameId(id));
358 reportResult(ast->identifier_token, candidates);
359 }
360
361 accept(ast->expression);
348362
349363 return false;
350364 }