Closed Bug 1435345 Opened 7 years ago Closed 7 years ago

Searchfox can't find uses of operator==

Categories

(Webtools :: Searchfox, enhancement)

enhancement
Not set
normal

Tracking

(firefox60 fixed)

RESOLVED FIXED
Tracking Status
firefox60 --- fixed

People

(Reporter: rhunt, Assigned: kats)

References

Details

Attachments

(2 files)

This might be more general to all types of operator, but I have seen it for sure with operator==. For example clicking on gfx::Matrix::operator== and searching for uses will show no results, but there definitely are uses of it. [1] [1] https://searchfox.org/mozilla-central/rev/eeb7190f9ad6f1a846cd6df09986325b3f2c3117/gfx/2d/Matrix.h#323
Apparently we bail out on generating use-site analysis for operators at [1]. Not really clear to me which consumers would trip up on this. I'll try removing it and seeing what happens. [1] https://searchfox.org/mozilla-central/source/build/clang-plugin/mozsearch-plugin/MozsearchIndexer.cpp#60
Assignee: nobody → bugmail
Hm, my patch was a little too liberal. It now indexes things like function mozilla::gfx::IntRectTyped::operator= [1] function RefPtr::operator-> [2] function std::operator<< [3] and many other operators. Although maybe this is desirable? Any thoughts? I'll put the patches up for now. [1] https://dev.searchfox.org/mozilla-central/search?q=symbol%3A_ZN7mozilla3gfx12IntRectTypedINS0_12UnknownUnitsEEaSERKS3_&path= [2] https://dev.searchfox.org/mozilla-central/search?q=symbol%3A_ZNK6RefPtrptEv&path= [3] https://dev.searchfox.org/mozilla-central/search?q=symbol%3A_ZStlsRSt13basic_ostreamIcT_Ec&path=
Attachment #8948081 - Flags: review?(emilio)
Attachment #8948082 - Flags: review?(emilio)
After some thought I figured all the extra operator indexing is probably fine. If it turns out to be a problem we can always undo it.
Attachment #8948081 - Flags: review?(emilio) → review+
Comment on attachment 8948082 [details] Bug 1435345 - Part 1: Index use sites of overloaded C++ operators. https://reviewboard.mozilla.org/r/217708/#review223488 Looks good, thanks!
Attachment #8948082 - Flags: review?(emilio) → review+
Pushed by kgupta@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9aced56a4405 Part 0: sync change from searchfox repo. r=emilio https://hg.mozilla.org/integration/autoland/rev/b9fd48f0b7d7 Part 1: Index use sites of overloaded C++ operators. r=emilio
Also merged to mozsearch repo, the indexing run today should pick it up and deploy.
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #3) > Hm, my patch was a little too liberal. It now indexes things like > function mozilla::gfx::IntRectTyped::operator= [1] > function RefPtr::operator-> [2] > function std::operator<< [3] > > and many other operators. Although maybe this is desirable? Any thoughts? Seems useful to me!
This is finally deployed after having to deal with a bunch of unrelated issues that caused searchfox indexing to fail over the weekend.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: