[PATCH] D77348: [clangd] Enable some nice clang-tidy checks by default.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 3 01:02:30 PDT 2020


hokein accepted this revision.
hokein added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:695
+    auto EmptyDefaults = tidy::ClangTidyOptions::getDefaults();
+    EmptyDefaults.Checks.reset(); // So we can tell if checks were ever set.
+    tidy::ClangTidyOptions OverrideClangTidyOptions;
----------------
`EmptyDefaults.Checks` is not none, but it is an empty string I think , we could even assign our default checks to `EmptyDefaults.Checks` (instead of setting it in `GetCalngTidyOptions`).


================
Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:724
+            "readability-deleted-default", "bugprone-integer-division",
+            "bugprone-sizeof-expression", "bugprone-suspicious-include",
+            "bugprone-suspicious-missing-comma", "bugprone-unused-raii",
----------------
`bugprone-suspicious-include` is a fairly new check, and hasn't been run internally, so I'd be conservative, not enable it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77348





More information about the cfe-commits mailing list