[clang] [Clang][AArch64] Fix crash with large arguments to MTE built-ins (PR #197620)

Igor Kudrin via cfe-commits cfe-commits at lists.llvm.org
Fri May 22 08:31:09 PDT 2026


igorkudrin wrote:

> If we think the argument is always supposed to fit into 64 bits, we should do the truncation in Sema, as a conversion to uint64_t or something like that. The generated code is basically the same, but the implicit conversion in Sema will generate a -Wconversion warning. (Which is not on by default, but better than nothing.)

Are you suggesting calling `Sema::CheckImplicitConversion()` explicitly? It seems `Sema::ImpCastExprToType()` does not produce the diagnostic.

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


More information about the cfe-commits mailing list