[PATCH] D88470: [clangd] Extract options struct for ClangdLSPServer. NFC

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 29 01:39:56 PDT 2020


sammccall added inline comments.


================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.h:39
 public:
-  /// If \p CompileCommandsDir has a value, compile_commands.json will be
-  /// loaded only from \p CompileCommandsDir. Otherwise, clangd will look
-  /// for compile_commands.json in all parent directories of each file.
-  /// If UseDirBasedCDB is false, compile commands are not read from disk.
-  // FIXME: Clean up signature around CDBs.
+  struct Options : ClangdServer::Options {
+    /// Look for compilation databases, rather than using compile commands
----------------
One question here is whether the inheritance is too tricky.

The nice thing about it is that `Opts.CrossFileRename = true` is pretty natural at the configuration site, where `Opts.ServerOpts.CrossFileRename` isn't.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88470



More information about the cfe-commits mailing list