[clang-tools-extra] [clang-tidy] introduce a must use check (PR #76101)

via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 20 13:19:45 PST 2023


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 8bbeed05c4da832a2abf532fee8665c0d6576cbc f7f94494372c4e9b42d027b6fc100e90f2bfe1e0 -- clang-tools-extra/clang-tidy/misc/MustUseCheck.cpp clang-tools-extra/clang-tidy/misc/MustUseCheck.h clang-tools-extra/test/clang-tidy/checkers/misc/must-use.cpp clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
``````````

</details>

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

``````````diff
diff --git a/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp b/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
index 9f7cf912fb..651c859c15 100644
--- a/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
@@ -55,8 +55,7 @@ public:
     CheckFactories.registerCheck<MisleadingIdentifierCheck>(
         "misc-misleading-identifier");
     CheckFactories.registerCheck<MisplacedConstCheck>("misc-misplaced-const");
-    CheckFactories.registerCheck<MustUseCheck>(
-        "misc-must-use");
+    CheckFactories.registerCheck<MustUseCheck>("misc-must-use");
     CheckFactories.registerCheck<NewDeleteOverloadsCheck>(
         "misc-new-delete-overloads");
     CheckFactories.registerCheck<NoRecursionCheck>("misc-no-recursion");

``````````

</details>


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


More information about the cfe-commits mailing list