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

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 30 02:44:30 PDT 2020


kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/ConfigCompile.cpp:51
+    return llvm::StringRef();
+  return Path;
+}
----------------
sammccall wrote:
> 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".
i think you meant `Path.empty() ? "." : Path`, right?


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