[PATCH] D65943: [clangd] Added semantic highlighting support for primitives.

Johan Vikström via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 8 05:34:49 PDT 2019


jvikstrom created this revision.
jvikstrom added reviewers: hokein, ilya-biryukov.
Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay.
Herald added a project: clang.

Adds a new HighlightingKind "Primitive". Adds a special case for TypeLocs that have an underlying TypePtr that is are builtin types, adding them as primitives.
The primary reason for this change is because otherwise typedefs that typedef primitives `typedef int A` would not get highlighted (so in the example `A` would not get any highlightings.)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65943

Files:
  clang-tools-extra/clangd/SemanticHighlighting.cpp
  clang-tools-extra/clangd/SemanticHighlighting.h
  clang-tools-extra/clangd/test/semantic-highlighting.test
  clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp
  clang-tools-extra/clangd/unittests/TweakTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65943.214121.patch
Type: text/x-patch
Size: 10523 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190808/b822b3f6/attachment.bin>


More information about the cfe-commits mailing list