[PATCH] D90270: [clangd] Handle absolute/relative path specifications in Config

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 29 03:09:03 PDT 2020


sammccall added inline comments.


================
Comment at: clang-tools-extra/clangd/ConfigCompile.cpp:51
+    return llvm::StringRef();
+  return Path;
+}
----------------
not that if Path == FragmentDir you're going to return "" which means "not under".
I don't think this can happen yet, but it's a trap for the future...

You might want the last line to be "return FragmentDir.empty() ? "." : Path".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90270



More information about the cfe-commits mailing list