[clang] [Clang] Fix crash with implicit int-to-pointer conversion (PR #114218)

2024-12-18 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard closed https://github.com/llvm/llvm-project/pull/114218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix crash with implicit int-to-pointer conversion (PR #114218)

2024-12-18 Thread Oliver Stannard via cfe-commits
ostannard wrote: > 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. Looking at the code again, there's a separate system used to codegen most of the atomic builtins, so I've switched to using that. That

[clang] [Clang] Fix crash with implicit int-to-pointer conversion (PR #114218)

2024-10-30 Thread Eli Friedman via cfe-commits
@@ -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)->IgnoreImp

[clang] [Clang] Fix crash with implicit int-to-pointer conversion (PR #114218)

2024-10-30 Thread Eli Friedman via cfe-commits
@@ -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)->IgnoreImp

[clang] [Clang] Fix crash with implicit int-to-pointer conversion (PR #114218)

2024-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Stannard (ostannard) Changes If an integer is passed to the pointer argument of the __atomic_test_and_set or __atomic_clear builtins with the int-conversion error disabled or downgraded, we crashed in codegen due to assuming that t

[clang] [Clang] Fix crash with implicit int-to-pointer conversion (PR #114218)

2024-10-30 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard created https://github.com/llvm/llvm-project/pull/114218 If an integer is passed to the pointer argument of the __atomic_test_and_set or __atomic_clear builtins with the int-conversion error disabled or downgraded, we crashed in codegen due to assuming that the typ