Compare the instances when searching for the usages of a template parameter.

This commit is contained in:
Roberto Raggi
2010-08-12 12:51:54 +02:00
parent a478f3d2e2
commit 9b1a92426e

View File

@@ -209,10 +209,14 @@ bool FindUsages::checkCandidates(const QList<LookupItem> &candidates) const
const LookupItem &r = candidates.at(i);
if (Symbol *s = r.declaration()) {
if (_declSymbol->isTypenameArgument()) {
if (s != _declSymbol)
return false;
}
if (_declSymbol->scope() && (_declSymbol->scope()->isFunction() || _declSymbol->scope()->isBlock())) {
if (s->scope() != _declSymbol->scope())
return false;
}
if (compareFullyQualifiedName(LookupContext::fullyQualifiedName(s), _declSymbolFullyQualifiedName))