This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Use enumMember instead of enumConstant
ClosedPublic

Authored by njames93 on Dec 11 2020, 5:58 AM.

Details

Summary

We should be using enumMember as thats defined in LSP, enumConstant is non standard so clients aren't likely to support it
Fixes https://github.com/clangd/clangd/issues/622

Diff Detail

Event Timeline

njames93 created this revision.Dec 11 2020, 5:58 AM
njames93 requested review of this revision.Dec 11 2020, 5:58 AM

Thanks! Most of the changes in this patch are to the internal infrastructure, which predates LSP semanticTokens and doesn't need to have names that match (in many cases the names don't closely match C++ convention).
I think only the toSemanticTokenType change is needed.

clang-tools-extra/clangd/SemanticHighlighting.h
51 ↗(On Diff #311203)

HighlightingKind is an internal enum that doesn't match LSP naming, so no need for changes there.

njames93 added inline comments.Dec 11 2020, 6:25 AM
clang-tools-extra/clangd/SemanticHighlighting.h
51 ↗(On Diff #311203)

It doesn't strictly need it, But I do like the consistency of it being EnumMember throughout. I'll revert though as its not essential.

njames93 updated this revision to Diff 311215.Dec 11 2020, 6:29 AM
njames93 marked an inline comment as done.

Remove changes to internal infrastructure.

sammccall accepted this revision.Dec 11 2020, 6:41 AM
This revision is now accepted and ready to land.Dec 11 2020, 6:41 AM
This revision was landed with ongoing or failed builds.Dec 11 2020, 6:46 AM
This revision was automatically updated to reflect the committed changes.
njames93 edited the summary of this revision. (Show Details)Dec 11 2020, 8:33 AM