[PATCH] D96123: [clangd] Expose actOnAllPArentDirectories helper

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 15 12:49:32 PST 2021


sammccall accepted this revision.
sammccall added a comment.

Thanks!



================
Comment at: clang-tools-extra/clangd/ConfigProvider.cpp:101
       // Compute absolute paths to all ancestors (substrings of P.Path).
       llvm::StringRef Parent = path::parent_path(P.Path);
       llvm::SmallVector<llvm::StringRef, 8> Ancestors;
----------------
absoluteParent?

I think this can be moved into the loop init now, it's not used anywhere else


================
Comment at: clang-tools-extra/clangd/support/Path.h:31
 
+/// Variant of parent_path that operates only on absolute paths.
+PathRef absoluteParent(PathRef Path);
----------------
Maybe add a hint why we use this...

"unlike sys::parent_path, does not consider C: a parent of C:\"


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96123



More information about the cfe-commits mailing list