This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Expose value of enumerators to Hover API. (not UI yet)
ClosedPublic

Authored by sammccall on Nov 13 2019, 2:34 PM.

Diff Detail

Event Timeline

sammccall created this revision.Nov 13 2019, 2:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 13 2019, 2:34 PM

Build result: pass - 59972 tests passed, 0 failed and 763 were skipped.
Log files: console-log.txt, CMakeCache.txt

kadircet accepted this revision.Nov 13 2019, 11:44 PM

LGTM, thanks!

clang-tools-extra/clangd/unittests/XRefsTests.cpp
984

could you also add a case checking references to enumconstdecl?
i.e.

Color x = GRE^EN;
This revision is now accepted and ready to land.Nov 13 2019, 11:44 PM
sammccall marked 2 inline comments as done.Nov 14 2019, 6:27 AM
sammccall added inline comments.
clang-tools-extra/clangd/unittests/XRefsTests.cpp
984

Done, this is consistent with the other tests.

I would like to go in the other direction actually, as this is really testing lots of cases of targetDecl. I think we should verify the types of references there, and simplify these cases. But that should probably be done across the board rather than piecemeal.

This revision was automatically updated to reflect the committed changes.
sammccall marked an inline comment as done.