[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 28 09:02:37 PST 2024
================
@@ -4127,8 +4127,8 @@ def ext_ms_impcast_fn_obj : ExtWarn<
"Microsoft extension">, InGroup<MicrosoftCast>;
def warn_impcast_pointer_to_bool : Warning<
- "address of%select{| function| array}0 '%1' will always evaluate to "
- "'true'">,
+ "address of%select{| function| array| lambda function pointer conversion operator}0 '%1' "
+ "will always evaluate to 'true'">,
----------------
AaronBallman wrote:
```suggestion
"address of %select{'%1'|function '%1'|array '%1'|lambda function pointer "
"conversion operator}0 will always evaluate to 'true'">,
```
Wrapping to 80-col limits, moves %1 so it's not used for lambda conversion operators.
https://github.com/llvm/llvm-project/pull/83152
More information about the cfe-commits
mailing list