[clang-tools-extra] [clangd] Make it possible to enable misc-const-correctness clang-tidy check (PR #94920)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 9 15:04:00 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-tools-extra
Author: None (geza-herman)
<details>
<summary>Changes</summary>
Before this PR, it wasn't possible to enable misc-const-correctness: disableUnusableChecks() forcefully disabled it because the check is slow. It was implemented this way before clangd got the FastCheckFilter feature. As the default setting of FastCheckFilter also disables misc-const-correctness, it makes sense to remove misc-const-correctness from disableUnusableChecks()'s list, to make it possible to enable misc-const-correctness by setting FastCheckFilter to None. Fixes https://github.com/llvm/llvm-project/issues/89758.
---
Full diff: https://github.com/llvm/llvm-project/pull/94920.diff
1 Files Affected:
- (modified) clang-tools-extra/clangd/TidyProvider.cpp (+1-7)
``````````diff
diff --git a/clang-tools-extra/clangd/TidyProvider.cpp b/clang-tools-extra/clangd/TidyProvider.cpp
index b658a80559937..a4121df30d3df 100644
--- a/clang-tools-extra/clangd/TidyProvider.cpp
+++ b/clang-tools-extra/clangd/TidyProvider.cpp
@@ -221,13 +221,7 @@ TidyProvider disableUnusableChecks(llvm::ArrayRef<std::string> ExtraBadChecks) {
"-hicpp-invalid-access-moved",
// Check uses dataflow analysis, which might hang/crash unexpectedly on
// incomplete code.
- "-bugprone-unchecked-optional-access",
-
- // ----- Performance problems -----
-
- // This check runs expensive analysis for each variable.
- // It has been observed to increase reparse time by 10x.
- "-misc-const-correctness");
+ "-bugprone-unchecked-optional-access");
size_t Size = BadChecks.size();
for (const std::string &Str : ExtraBadChecks) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/94920
More information about the cfe-commits
mailing list