Commit 40153a83 authored by Adrian Negreanu's avatar Adrian Negreanu

consider currentFile when searching for global symbols

Signed-off-by: 's avatarAdrian Negreanu <adrian.m.negreanu@intel.com>
parent 1e373422
......@@ -4307,7 +4307,20 @@ bool getDefs(const QCString &scName,
//printf("found %d candidate members\n",members.count());
if (members.count()>0) // at least one match
{
md=members.last();
if (currentFile)
{
//printf("multiple results; pick one from file:%s\n", currentFile->name().data());
md = members.first();
while (md) {
if (md->getFileDef()->name() == currentFile->name())
break;
md=members.next();
}
if (!md)
md=members.last();
} else {
md=members.last();
}
}
if (md && (md->getEnumScope()==0 || !md->getEnumScope()->isStrong()))
// found a matching global member, that is not a scoped enum value (or uniquely matches)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment