[all-commits] [llvm/llvm-project] 357e79: [clangd] Fix early selection for non-vardecl decla...

kadir çetinkaya via All-commits all-commits at lists.llvm.org
Wed Jun 10 04:46:01 PDT 2020


  Branch: refs/heads/release/10.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 357e79c2895736c9d202c79380e3e1f507080df3
      https://github.com/llvm/llvm-project/commit/357e79c2895736c9d202c79380e3e1f507080df3
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2020-06-10 (Wed, 10 Jun 2020)

  Changed paths:
    M clang-tools-extra/clangd/Selection.cpp
    M clang-tools-extra/clangd/unittests/HoverTests.cpp
    M clang-tools-extra/clangd/unittests/SelectionTests.cpp

  Log Message:
  -----------
  [clangd] Fix early selection for non-vardecl declarators

Summary:
Selection tree was performing an early claim only for VarDecls, but
there are other cases where we can have declarators, e.g. FieldDecls. This patch
extends the early claim logic to all types of declarators.

Fixes https://github.com/clangd/clangd/issues/292

Reviewers: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

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

(cherry picked from commit e6b8181895b96740dbe54aca036aa237e0a8363d)

Modified the cherry-picked test as diagnostics differ on the branch.

Fixes https://github.com/clangd/clangd/issues/421




More information about the All-commits mailing list