[templates] Find references in dependent contexts
Categories
(Webtools :: Searchfox, defect)
Tracking
(Not tracked)
People
(Reporter: botond, Assigned: nicolas.guichard)
References
(Blocks 1 open bug)
Details
STR:
Search for the callers of the AsyncTransform
constructor declared on this line.
Expected results:
The call site on this line is found.
Actual results:
The call site in question is not found.
Reporter | ||
Comment 1•6 years ago
|
||
The omission is understandable, as the call site is dependent. Nonetheless, clang knows about the call sites in the template instantiations, and one could imagine Searchfox offering up the corresponding dependent calls as "potential callers", or something like that.
Reporter | ||
Comment 2•6 years ago
|
||
(To put this in context with bug 1453506: that's a situation where the dependent call is not useful as a search result, but the callers of that particular instantiation are. I think that's orthogonal, though; it would be fine if the dependent call showed up as a "potential result" in the bug 1453506 case as a result of a fix here.)
Updated•5 years ago
|
Assignee | ||
Comment 3•3 months ago
|
||
Your example isn't valid anymore (since you made the calling code non-dependent here).
I'm wondering if that was an instance of bug 1856762? If I search for mozilla::dom::WorkerPrivate::UpdateContextOptions for instance I do find a reference in a dependent context (a templated lambda in that case).
Reporter | ||
Comment 4•3 months ago
•
|
||
Indeed, it looks like this has significantly improved since the time of filing!
I looked around for some similar examples, and e.g. searching for callers of TestAsyncPanZoomController::ReceiveInputEvent
does find dependent call sites like this one.
One case I found that still doesn't work is: a search for callers of DesktopFlingPhysics::Init
should ideally find the dependent call site here. (This one doesn't work in the go-to-definition direction either, so it could be an issue specific to this form of call.)
Reporter | ||
Comment 5•3 months ago
|
||
(In reply to Botond Ballo [:botond] from comment #4)
One case I found that still doesn't work is: a search for callers of
DesktopFlingPhysics::Init
should ideally find the dependent call site here. (This one doesn't work in the go-to-definition direction either, so it could be an issue specific to this form of call.)
I had a quick look at the AST and the node type we have here is DependentScopeDeclRefExpr
, so I suspect this would likely be fixed by bug 1835692.
Assignee | ||
Comment 6•2 months ago
|
||
Fixing bug 1835692 apparently wasn't enough, because the search for DesktopFlingPhysics::Init
still doesn't return the call from GenericFlingAnimation::GenericFlingAnimation
on searchfox.org.
But my other template-related changes seem to have fixed it: it is returned when searching on kdab.searchfox.org. Those changes landed on m-c last night, so are going to make their way to the main searchfox.org soon.
Assignee | ||
Comment 7•2 months ago
|
||
Oh that was probably because GenericFlingAnimation has a forward declaration here. So that was fixed by this commit.
Description
•