Improved Searchfox navigation behaviour in templated C++ code

19 views
Skip to first unread message

Botond Ballo

unread,
Jun 5, 2023, 8:14:52 PM6/5/23
to dev-pl...@mozilla.org, Sutherland, Andrew
As a side project over the last few months, I've been making improvements to Searchfox's navigation behaviour in templated C++ code.

Searchfox offers semantic navigation features, like clicking on a use of a symbol and selecting "go to definition" from the context menu to navigate to the definition of the symbol in question. In templated code, this can't always be done with full accuracy, but Searchfox does its best to still offer semantic results heuristically.

In bug 1781178 and its dependencies, I've made a series of improvements to these heuristics, and as a result, Searchfox now offers "go to definition" in a number of places in templated code where it previously didn't (some examples are listed in comment 0 in the bug).

My improvements so far have focused on "go to definition"; there are other known issues on file related to other navigation features like searching for references (e.g. bug 1453506).

Any feedback on these changes is welcome! In particular, if you come across remaining places in the codebase where you'd like "go to definition" in a template to work and it doesn't, I encourage you to file an issue and cc me.

I would also like to thank Andrew Sutherland who has been of tremendous help in getting me up to speed on Searchfox development!

Cheers,
Botond
Reply all
Reply to author
Forward
0 new messages