[PATCH] D143436: [clangd] Move standard options adaptor to CommandMangler

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 13 05:05:33 PDT 2023


kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.

thanks, lgtm!



================
Comment at: clang-tools-extra/clangd/CompileCommands.cpp:199
+  // use/change working directory, which ExpandResponseFiles doesn't).
+  FS = llvm::vfs::getRealFileSystem();
+}
----------------
DmitryPolukhin wrote:
> kadircet wrote:
> > getting real filesystem is cheap, no need to make this part of the state, just inline it into `tooling::addExpandedResponseFiles` call.
> We need version of `tooling::addExpandedResponseFiles` with FS as an argument for testing at least, see https://github.com/llvm/llvm-project/blob/main/clang/unittests/Tooling/CompilationDatabaseTest.cpp#L968 switching it to using real filesystem IMHO makes things worse. So moved this code to the call site.
> So moved this code to the call site.

I was also trying to say that. so all good.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143436



More information about the cfe-commits mailing list