mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1621789 - Handle DependentScopeDeclRefExpr in MozsearchIndexer. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D179326
This commit is contained in:
parent
a3c41c4d0c
commit
11e68ffe93
@ -2028,7 +2028,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// Alsoo record this location so that if we have instantiations, we can
|
||||
// Also record this location so that if we have instantiations, we can
|
||||
// gather more accurate results from them.
|
||||
if (TemplateStack) {
|
||||
TemplateStack->visitDependent(Loc);
|
||||
@ -2036,6 +2036,23 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool VisitDependentScopeDeclRefExpr(DependentScopeDeclRefExpr *E) {
|
||||
SourceLocation Loc = E->getLocation();
|
||||
normalizeLocation(&Loc);
|
||||
if (!isInterestingLocation(Loc)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (const NamedDecl *D : Resolver->resolveDeclRefExpr(E)) {
|
||||
if (const EnumConstantDecl *E = dyn_cast<EnumConstantDecl>(D)) {
|
||||
std::string Mangled = getMangledName(CurMangleContext, E);
|
||||
visitIdentifier("use", "enum", getQualifiedName(E), Loc, Mangled,
|
||||
E->getType(), getContext(Loc));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void enterSourceFile(SourceLocation Loc) {
|
||||
normalizeLocation(&Loc);
|
||||
FileInfo* newFile = getFileInfo(Loc);
|
||||
|
Loading…
Reference in New Issue
Block a user