Open Bug 1880327 Opened 11 months ago Updated 6 months ago

Emit structured records for EnumConstantDecl and EnumDecl to enable macro-style expansions in the context menu for C++ enum values

Categories

(Webtools :: Searchfox, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: asuth, Unassigned)

References

Details

:Gijs requested in the #searchfox chat.mozilla.org an ability to see the int value of enums. Right now we don't emit this data, but it's available via clang's EnumConstantDecl and when doing so it makes sense to also handle EnumDecl which would provide a conceptual understanding of the relation which would be useful for bug 1783014.

In terms of UI implementation, the lowest hanging fruit is to do the same thing the WIP for macros does (bug 1583635), as this can potentially express both the int value and the init expression. If that's landed, this would be much easier. (If we populate the init expression, we might potentially want to encode that the same was as we encode the macro expansions.) For search results, the "query" endpoint is probably a more natural place to surface this.

You need to log in before you can comment on or make changes to this bug.