[PATCH] D83224: [clangd] Move clang-tidy check modifications into ClangdServer

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 12 07:36:10 PDT 2020


aaron.ballman added inline comments.


================
Comment at: clang-tools-extra/clangd/ClangdServer.cpp:115
+// either due to crashes or false positives.
+const char *getClangTidyBlacklist() {
+  static const std::string FalsePositives =
----------------
njames93 wrote:
> Return by StringRef?
How about `getDisabledClangTidyChecks()` (or literally any other name than blacklist)?


================
Comment at: clang-tools-extra/clangd/ClangdServer.cpp:120
+                       // clangd doesn't replay those when using a preamble.
+                       "-llvm-header-guard");
+  static const std::string CrashingChecks =
----------------
I suspect there are more checks that should be added here. For instance, much of `modernize-` is purely stylistic so it's easy to view as being false positives (like `modernize-use-trailing-return-types` or whatever it's called).


================
Comment at: clang-tools-extra/clangd/ClangdServer.cpp:127
+                       "-bugprone-use-after-move");
+  static const std::string BlackList =
+      llvm::join_items(", ", FalsePositives, CrashingChecks);
----------------
Similarly, rename this. I'd suggest `DisabledChecks`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83224



More information about the cfe-commits mailing list