[clang] [clang] Add diagnostic for usage of implicit constructor with pointer to bool convertion (PR #143990)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 26 11:33:47 PDT 2025


================
@@ -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; maybe you intended to dereference">,
----------------
Ralender wrote:

Tell me if the new syntax + fixit is good.

https://github.com/llvm/llvm-project/pull/143990


More information about the cfe-commits mailing list