[clang-tools-extra] [clang-tidy] Add UnusedIncludes/MissingIncludes options to misc-include-cleaner (PR #140600)

via cfe-commits cfe-commits at lists.llvm.org
Tue May 20 02:53:22 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions h,cpp -- clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.cpp clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.h clang-tools-extra/unittests/clang-tidy/IncludeCleanerTest.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.cpp b/clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.cpp
index b59b15e46..52a94f3c0 100644
--- a/clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.cpp
@@ -72,10 +72,9 @@ IncludeCleanerCheck::IncludeCleanerCheck(StringRef Name,
   }
 
   if (UnusedIncludes == false && MissingIncludes == false)
-    this->configurationDiag(
-      "The check 'misc-include-cleaner' will not "
-      "perform any analysis because 'UnusedIncludes' and "
-      "'MissingIncludes' are both false.");
+    this->configurationDiag("The check 'misc-include-cleaner' will not "
+                            "perform any analysis because 'UnusedIncludes' and "
+                            "'MissingIncludes' are both false.");
 }
 
 void IncludeCleanerCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/140600


More information about the cfe-commits mailing list