[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 20 11:06:08 PST 2024


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 e4384149b58f7c3d19c5d38bc46038c660b77ca9 732b59209f68ef98f414697ab5b62ce6c3b51c61 -- clang-tools-extra/clang-tidy/bugprone/UnsafeCrtpCheck.cpp clang-tools-extra/clang-tidy/bugprone/UnsafeCrtpCheck.h clang-tools-extra/test/clang-tidy/checkers/bugprone/unsafe-crtp.cpp clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
``````````

</details>

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

``````````diff
diff --git a/clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp b/clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
index 50b791ae10f..177ef74e620 100644
--- a/clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
@@ -234,8 +234,7 @@ public:
         "bugprone-unhandled-exception-at-new");
     CheckFactories.registerCheck<UniquePtrArrayMismatchCheck>(
         "bugprone-unique-ptr-array-mismatch");
-    CheckFactories.registerCheck<UnsafeCrtpCheck>(
-        "bugprone-unsafe-crtp");
+    CheckFactories.registerCheck<UnsafeCrtpCheck>("bugprone-unsafe-crtp");
     CheckFactories.registerCheck<UnsafeFunctionsCheck>(
         "bugprone-unsafe-functions");
     CheckFactories.registerCheck<UnusedRaiiCheck>("bugprone-unused-raii");

``````````

</details>


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


More information about the cfe-commits mailing list