[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)
via cfe-commits
cfe-commits at lists.llvm.org
Wed May 15 10:23:04 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 c5cd049566a795ba5de88dfbb2eb563cad4a9d8a b3cc457efc40a345d4b67c776edd470e35f73de2 -- clang/lib/Sema/SemaExpr.cpp clang/test/Sema/parentheses.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index b4c54a3da4..65c400637a 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -14879,7 +14879,8 @@ ExprResult Sema::CreateBuiltinBinOp(SourceLocation OpLoc,
ConvertHalfVec = true;
ResultTy = CheckCompareOperands(LHS, RHS, OpLoc, Opc);
- if (const auto *BI = dyn_cast<BinaryOperator>(LHSExpr); BI && BI->isComparisonOp())
+ if (const auto *BI = dyn_cast<BinaryOperator>(LHSExpr);
+ BI && BI->isComparisonOp())
Diag(OpLoc, diag::warn_consecutive_comparison);
break;
``````````
</details>
https://github.com/llvm/llvm-project/pull/92200
More information about the cfe-commits
mailing list