[PATCH] D84144: [clangd] Remove TokenBuffer usage in TypeHierarchy

Aleksandr Platonov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 20 03:28:38 PDT 2020


ArcsinX marked 2 inline comments as done.
ArcsinX added inline comments.


================
Comment at: clang-tools-extra/clangd/XRefs.cpp:1191
+  SourceLocation EndLoc = SM.getSpellingLoc(SM.getFileLoc(ND.getEndLoc()));
+  const auto NameRange =
+      toHalfOpenFileRange(SM, Ctx.getLangOpts(), {BeginLoc, EndLoc});
----------------
kadircet wrote:
> let's rename it to `DeclRange` rather than `NameRange`.
Renamed.


================
Comment at: clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp:550
+  // Type hierarchy for `Child`
+  auto Result = runTypeHierarchy(Server, FooCpp, SourceAnnotations.point(), 1,
+                                 TypeHierarchyDirection::Parents);
----------------
kadircet wrote:
> you can keep using the `TestTU`. just provide the header via `AdditionalFiles` and `TU.build` should first build a preamble and use it. That way you can get rid of additions to the SyncAPI and usage of ClangdServer in here.
Thanks, done.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84144/new/

https://reviews.llvm.org/D84144





More information about the cfe-commits mailing list