[all-commits] [llvm/llvm-project] e6d0ba: [clang-rename] Add the USR of incomplete decl to t...

Haojian Wu via All-commits all-commits at lists.llvm.org
Tue Feb 25 07:56:55 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e6d0bad843c4c84bb762cf93a56c5bdd5cc535c0
      https://github.com/llvm/llvm-project/commit/e6d0bad843c4c84bb762cf93a56c5bdd5cc535c0
  Author: Haojian Wu <hokein.wu at gmail.com>
  Date:   2020-02-25 (Tue, 25 Feb 2020)

  Changed paths:
    M clang-tools-extra/clangd/unittests/RenameTests.cpp
    M clang/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp

  Log Message:
  -----------
  [clang-rename] Add the USR of incomplete decl to the USRSet.

Summary:
This fixes a clangd rename issue, which is missing the reference of
an incomplete specialization.

Unfortunately, I didn't reproduce this issue in clang-rename, I guess
the input `FoundDecl` of AdditionalUSRFinder is different in clangd vs
clang-rename, clang-rename uses the underlying CXXRecordDecl of the
ClassTemplateDecl, which is fixed in https://github.com/llvm/llvm-project/commit/5d862c042b52ae2aad37471d0b83b6c678a520e3;
while clangd-rename uses the ClassTemplateDecl.

Reviewers: kbobyrev

Reviewed By: kbobyrev

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

Tags: #clang

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




More information about the All-commits mailing list