================ @@ -4397,6 +4397,9 @@ def ext_ms_impcast_fn_obj : ExtWarn< "implicit conversion between pointer-to-function and pointer-to-object is a " "Microsoft extension">, InGroup<MicrosoftCast>; +def warn_imp_constructor_pointer_to_bool : Warning< + "implicit conversion from %0 to %1 calls %q2; did you intend to dereference ?">, ---------------- AaronBallman wrote:
```suggestion "implicit conversion from %0 to %1 calls %q2; did you intend to dereference instead?">, ``` @erichkeane do you think we should have fixits attached to notes? Something like: `implicit conversion from %0 to %1 calls %q2` -- warning on the code `did you intend to dereference?` -- with fixit to insert `*` `did you intend the bool conversion?` -- with fixit to insert a (`static_`)cast or the `!!` trick My concern is: if the user intended this behavior, it'd be nice for them to have a way to silence the diagnostic. And if they didn't intend this behavior, giving them a fix-it helps them correct their code. https://github.com/llvm/llvm-project/pull/143990 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits