================
@@ -16538,6 +16538,27 @@ void Sema::DiagnoseAlwaysNonNullPointer(Expr *E,
}
}
+ // Complain if we are converting a lambda expression to a boolean value
+ if (auto *MCallExpr = dyn_cast<CXXMemberCallExpr>(E)) {
+ if (MCallExpr->getObjectType()->isRecordType()) {
+ if (auto *MRecordDecl = MCallExpr->getRecordDecl()) {
----------------
AaronBallman wrote:
```suggestion
if (const auto *MCallExpr = dyn_cast<CXXMemberCallExpr>(E)) {
if (MCallExpr->getObjectType()->isRecordType()) {
if (const auto *MRecordDecl = MCallExpr->getRecordDecl()) {
```
Aiming for better const correctness, but if this doesn't work, don't worry
about making the changes.
https://github.com/llvm/llvm-project/pull/83152
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits