[all-commits] [llvm/llvm-project] ac2193: [clangd] Fix rename for symbol introduced by Using...

Tom Praschan via All-commits all-commits at lists.llvm.org
Sun Oct 9 03:16:39 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ac21938fbdfa75f1eb4ca399dac4fbf3e90d472d
      https://github.com/llvm/llvm-project/commit/ac21938fbdfa75f1eb4ca399dac4fbf3e90d472d
  Author: Tom Praschan <13141438+tom-anders at users.noreply.github.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M clang-tools-extra/clangd/refactor/Rename.cpp
    M clang-tools-extra/clangd/unittests/RenameTests.cpp

  Log Message:
  -----------
  [clangd] Fix rename for symbol introduced by UsingDecl

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

This patch actually consists of 2 fixes:

1) Add handling for UsingShadowDecl to canonicalRenameDecl().
   This fixes the issue described in https://github.com/clangd/clangd/issues/170.

2) Avoid the "there are multiple symbols under the cursor error" by applying similar
   logic as in https://reviews.llvm.org/D133664.
   This also partly fixes https://github.com/clangd/clangd/issues/586.

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




More information about the All-commits mailing list