[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 27 06:32:42 PDT 2018


ilya-biryukov added inline comments.


================
Comment at: clangd/Protocol.h:429
+  // The changes that happened to the compilation database.
+  llvm::Optional<std::map<std::string, std::vector<std::string>>>
+      compilationDatabaseChanges;
----------------
arphaman wrote:
> ilya-biryukov wrote:
> > - Maybe add a comment that the key of the map is a file name?
> > - The value does not contain the working directory at the time, but we need that for building `tooling::CompileCommand`, maybe add it?
> Could you please elaborate on the issue with the working directory? I didn't quite get that concern, sorry.
If arguments passed to clang contain relative paths, it's important to run compilation in the same working directory as the compiler.
E.g. `clang++  -Ideps/boost/include foo.cpp`

Even if that's a non-issue for your use-case (e.g. all paths are absolute or clangd runs in the same working dir as clang would), we should still allow passing custom working directories in this protocol extension.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D49758





More information about the cfe-commits mailing list