This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Added highlightings for template parameters and specializations.
ClosedPublic

Authored by jvikstrom on Jul 17 2019, 1:59 AM.

Event Timeline

jvikstrom created this revision.Jul 17 2019, 1:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 17 2019, 1:59 AM
hokein added inline comments.Jul 18 2019, 1:02 AM
clang-tools-extra/clangd/SemanticHighlighting.cpp
141

nit: clang-format

clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp
179

could you add some more test cases?

  • for unnamed template parameter, template <typename> class Foo {};
  • for partial template specialization
jvikstrom updated this revision to Diff 210503.Jul 18 2019, 2:18 AM

Added testcases and made highlighting work for template template parameters as well.

jvikstrom marked 2 inline comments as done.Jul 18 2019, 2:19 AM
hokein accepted this revision.Jul 18 2019, 2:24 AM
hokein added inline comments.
clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp
179

Looks like you are still missing the unnamed template parameter template <typename> class Foo {}; case

This revision is now accepted and ready to land.Jul 18 2019, 2:24 AM
jvikstrom marked 2 inline comments as done.Jul 18 2019, 2:56 AM
jvikstrom added inline comments.
clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp
179

Oh sorry, added it and landed.

This revision was automatically updated to reflect the committed changes.
jvikstrom marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2019, 2:58 AM