Closed Bug 1931631 Opened 1 year ago Closed 1 year ago

C++ indexer should treat constructor member initializer list field uses as having a contextsym of the constructor

Categories

(Webtools :: Searchfox, enhancement)

enhancement

Tracking

(firefox134 fixed)

RESOLVED FIXED
Tracking Status
firefox134 --- fixed

People

(Reporter: asuth, Assigned: asuth)

Details

Attachments

(2 files)

Currently field uses that are part of a constructor member initializer list end up having a context/contextsym of the constructor declaration because getContext(<the-constructor-decl>) is used which explicitly skips over the constructor decl. This means that field initializations either end up attributed as uses by the class if the constructor was defined inside the class definition or top-level uses if the constructor was defined outside of the class. This is easily addressed by making sure we use the constructor as the context decl.

I noticed this when the uses diagram for a field did not include the constructor. example field search.

Attached file mozsearch PR
Pushed by bugmail@asutherland.org: https://hg.mozilla.org/integration/autoland/rev/00a3e992ba4f C++ indexer should treat constructor member initializer list field uses as having a contextsym of the constructor
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: