[PATCH] D95706: [clangd] Expose more dependent-name detail via semanticTokens

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 29 16:22:28 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.

This change makes dependentName a modifier, rather than a token type.
It can be combined with:

- type (new, standard) - this combination replaces dependentType like T::typename Foo
- unknown (new, nonstandard) - for general dependent names
- Field, etc - when the name is dependent but we heuristically resolve it

While here, fix cases where template-template-parameter cases were
incorrectly flagged as type-dependent.
And the merging of modifiers when resolving conflicts accidentally
happens to work around a bug that showed up in a test.

The behavior observed through the pre-standard protocol should be mostly
unchanged (it'll see the bugfixes only). This is done in a somehat
fragile way but it's not expected to live long.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95706

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/unittests/SemanticHighlightingTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95706.320234.patch
Type: text/x-patch
Size: 14624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210130/6c515aa7/attachment.bin>


More information about the cfe-commits mailing list