[PATCH] D95701: [clangd] Add semanticTokens modifiers for function/class/file/global scope

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 29 14:41:18 PST 2021


sammccall created this revision.
sammccall added a reviewer: nridge.
Herald added subscribers: usaxena95, kadircet, arphaman.
sammccall requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang.

These allow (function-) local variables to be distinguished, but also a
bunch more cases.
It's not quite independent with existing information (e.g. the
field/variable distinction is redundant if you have class-scope + static
attributes) but I don't think this is terribly important.

Depends on D77811 <https://reviews.llvm.org/D77811>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95701

Files:
  clang-tools-extra/clangd/SemanticHighlighting.cpp
  clang-tools-extra/clangd/SemanticHighlighting.h
  clang-tools-extra/clangd/test/initialize-params.test
  clang-tools-extra/clangd/test/semantic-tokens.test
  clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp
  clang-tools-extra/clangd/unittests/tweaks/AnnotateHighlightingsTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95701.320221.patch
Type: text/x-patch
Size: 15379 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210129/44dbb5f3/attachment.bin>


More information about the cfe-commits mailing list