[clang] [clang][WebAssembly] Handle casted function pointers with different number of arguments (PR #153168)

Jorge Zapata via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 23 06:52:40 PDT 2025


turran wrote:

> OK, sorry for the delay in looking at this. I do have some general thoughts. I think this is worth working on; yes, it's a really annoying problem that real-world code takes advantage of laxness in existing calling conventions in so many cases, but it is what it is; that's why WebAssemblyFixFunctionBitcasts exists in the first place. 

Indeed. However, AFAIK, it no longer works after the opaque pointer change because the function type information is missing. It only works for the `main()` function as it is checked explicitly.

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


More information about the cfe-commits mailing list