[clang] [Clang] Fix crash with implicit int-to-pointer conversion (PR #114218)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 30 13:51:44 PDT 2024
================
@@ -4928,8 +4928,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
// Look at the argument type to determine whether this is a volatile
// operation. The parameter type is always volatile.
QualType PtrTy = E->getArg(0)->IgnoreImpCasts()->getType();
----------------
efriedma-quic wrote:
IgnoreImpCasts is usually wrong; in general, it's going to find an unrelated type.
If __atomic_test_and_set is overloaded to have both a volatile and non-volatile variant, it should be using custom type-checking in Sema.
https://github.com/llvm/llvm-project/pull/114218
More information about the cfe-commits
mailing list