[clang-tools-extra] [clang-tidy] Improved readability redundant casting with enums (PR #111424)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 7 12:41:15 PDT 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 971b579bc6669a0898e47d6702c4b99cb757bb26 9c28fc517238c157a20307bcb5fd39201d0edc9d --extensions cpp -- clang-tools-extra/clang-tidy/readability/RedundantCastingCheck.cpp clang-tools-extra/test/clang-tidy/checkers/readability/redundant-casting.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang-tools-extra/clang-tidy/readability/RedundantCastingCheck.cpp b/clang-tools-extra/clang-tidy/readability/RedundantCastingCheck.cpp
index ce0b32439c..612a5a9159 100644
--- a/clang-tools-extra/clang-tidy/readability/RedundantCastingCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/RedundantCastingCheck.cpp
@@ -44,7 +44,7 @@ static bool areTypesEqual(QualType TypeS, QualType TypeD,
QualType CTypeS;
const auto *const EnumTypeS = TypeS->getAs<EnumType>();
- if(EnumTypeS != nullptr && !EnumTypeS->getDecl()->isScoped())
+ if (EnumTypeS != nullptr && !EnumTypeS->getDecl()->isScoped())
CTypeS = EnumTypeS->getDecl()->getIntegerType();
else
CTypeS = TypeS.getCanonicalType();
``````````
</details>
https://github.com/llvm/llvm-project/pull/111424
More information about the cfe-commits
mailing list