[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 28 21:05:23 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 14d8c4563e045fc3da82cb7268b1066cfd1bb6f0 60620d14509b4d097a56d0b61177dfe9c5a72b63 -- clang/lib/Sema/SemaChecking.cpp clang/test/CXX/drs/dr18xx.cpp clang/test/SemaCXX/warn-bool-conversion.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 2926a81fe7..35d453e013 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -16549,7 +16549,7 @@ void Sema::DiagnoseAlwaysNonNullPointer(Expr *E,
if (const auto *MRecordDecl = MCallExpr->getRecordDecl();
MRecordDecl && MRecordDecl->isLambda()) {
Diag(E->getExprLoc(), diag::warn_impcast_pointer_to_bool)
- << /*LambdaPointerConversionOperatorType=*/ 3
+ << /*LambdaPointerConversionOperatorType=*/3
<< MRecordDecl->getSourceRange() << Range << IsEqual;
return;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/83152
More information about the cfe-commits
mailing list