mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 06:09:19 +00:00
Bug 1931631 - C++ indexer should treat constructor member initializer list field uses as having a contextsym of the constructor
This is propagating the upstream https://github.com/mozsearch/mozsearch/pull/835 which was reviewed by :arai. Differential Revision: https://phabricator.services.mozilla.com/D229242
This commit is contained in:
parent
a484f2eaab
commit
bb9798ff28
@ -2393,8 +2393,13 @@ public:
|
||||
|
||||
FieldDecl *Member = Ci->getMember();
|
||||
std::string Mangled = getMangledName(CurMangleContext, Member);
|
||||
// We want the constructor to be the context of the field use and
|
||||
// `getContext(D)` would skip the current context. An alternate approach
|
||||
// would be `getContext(Loc)` but the heuristic to omit a context if we're
|
||||
// in a macro body expansion seems incorrect for field initializations; if
|
||||
// code is using macros to initialize the fields, we still care.
|
||||
visitIdentifier("use", "field", getQualifiedName(Member), Loc, Mangled,
|
||||
Member->getType(), getContext(D));
|
||||
Member->getType(), translateContext(D));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user