[PATCH] D92990: [clangd] Provide suggestions with invalid config keys

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 15 09:35:32 PST 2020


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

LG, thanks!



================
Comment at: clang-tools-extra/clangd/ConfigYAML.cpp:27
 
+static llvm::Optional<llvm::StringRef>
+bestGuess(llvm::StringRef Search,
----------------
(nit: no need for static in anon namespace)


================
Comment at: clang-tools-extra/clangd/ConfigYAML.cpp:292
+  // Report a "hard" error, reflecting a config file that can never be valid.
+  void error(const llvm::Twine &Msg, const Node &N) {
+    return error(Msg, N.getSourceRange());
----------------
optional nit: these node variants are now just convenience wrappers, I'd drop the comment from them and group them accordingly with whitespace, up to you.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92990



More information about the cfe-commits mailing list