[PATCH] D84144: [clangd] Remove TokenBuffer usage in TypeHierarchy
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 20 02:42:43 PDT 2020
kadircet added a comment.
ah embarrassing :/ thanks for catching this! It should've been obvious from the fact that there's a "FilePath" and a "TUPath" going on ..
================
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});
----------------
let's rename it to `DeclRange` rather than `NameRange`.
================
Comment at: clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp:550
+ // Type hierarchy for `Child`
+ auto Result = runTypeHierarchy(Server, FooCpp, SourceAnnotations.point(), 1,
+ TypeHierarchyDirection::Parents);
----------------
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.
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