[clang] [Clang] Allow -Wcast-function-type for same-width pointer-integer conversions (PR #178390)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 28 08:44:33 PST 2026


================
@@ -1145,6 +1145,17 @@ static bool argTypeIsABIEquivalent(QualType SrcType, QualType DestType,
         Context.getTypeSizeInChars(DestType))
       return true;
 
+  // Allow pointer-to-integral and integral-to-pointer conversions if sizes
+  // match. On platforms where pointers and certain integer types (like
----------------
AaronBallman wrote:

Are we sure that all the targets we support pass pointers and integers (of the same width) the same way in all cases? I'm not certain of that, but I've not done the investigation to be sure.

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


More information about the cfe-commits mailing list