[all-commits] [llvm/llvm-project] 59c113: [clangd] Expose more dependent-name detail via sem...

Sam McCall via All-commits all-commits at lists.llvm.org
Tue Feb 9 11:41:22 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 59c1139d3ee127a2049de5c711f81d46d8ec4e41
      https://github.com/llvm/llvm-project/commit/59c1139d3ee127a2049de5c711f81d46d8ec4e41
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2021-02-09 (Tue, 09 Feb 2021)

  Changed paths:
    M clang-tools-extra/clangd/SemanticHighlighting.cpp
    M clang-tools-extra/clangd/SemanticHighlighting.h
    M clang-tools-extra/clangd/test/initialize-params.test
    M clang-tools-extra/clangd/test/semantic-tokens.test
    M clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp

  Log Message:
  -----------
  [clangd] Expose more dependent-name detail via semanticTokens

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.

Differential Revision: https://reviews.llvm.org/D95706




More information about the All-commits mailing list