This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Replace HighlightingKind::NumKinds with LastKind. NFC
ClosedPublic

Authored by ilya-biryukov on Sep 6 2019, 7:26 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

ilya-biryukov created this revision.Sep 6 2019, 7:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 6 2019, 7:26 AM
nridge added a subscriber: nridge.Sep 6 2019, 9:07 PM
hokein accepted this revision.Sep 9 2019, 1:35 AM

LGTM, though I think the current implementation is a common pattern.

This revision is now accepted and ready to land.Sep 9 2019, 1:35 AM

LGTM, though I think the current implementation is a common pattern.

Thanks.

It's indeed a common pattern. The problem is that it forces clients to handle this extra case in every switch statement (otherwise we get compiler warnings).
LastKind avoids this, therefore it's arguably a little better for the clients.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 9 2019, 1:57 AM