[all-commits] [llvm/llvm-project] 97fbc9: [clangd] Find definition of ClassTemplate without ...

Adam Czachorowski via All-commits all-commits at lists.llvm.org
Thu Nov 4 07:26:35 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 97fbc975fab19be68eb6a643ddac850ef71c2ecd
      https://github.com/llvm/llvm-project/commit/97fbc975fab19be68eb6a643ddac850ef71c2ecd
  Author: Adam Czachorowski <adamcz at google.com>
  Date:   2021-11-04 (Thu, 04 Nov 2021)

  Changed paths:
    M clang-tools-extra/clangd/XRefs.cpp
    M clang-tools-extra/clangd/unittests/XRefsTests.cpp

  Log Message:
  -----------
  [clangd] Find definition of ClassTemplate without going through index.

I noticed that, while go-to-def works on cases like:

namespace ns {
  template<typename T> struct Foo {};
}
using ::ns::Fo^o;

it only works because of the FileIndex. We can get definition location
directly from AST too.

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




More information about the All-commits mailing list