[clang] [Clang] Re-write codegen for atomic_test_and_set and atomic_clear (PR #121943)
James Y Knight via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 7 07:06:33 PST 2025
================
@@ -3963,8 +3995,8 @@ ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange,
return ExprError();
}
- if (!IsC11 && !AtomTy.isTriviallyCopyableType(Context) &&
- !AtomTy->isScalarType()) {
+ if (!IsC11 && Form != TestAndSet && Form != Clear &&
+ !AtomTy.isTriviallyCopyableType(Context) && !AtomTy->isScalarType()) {
----------------
jyknight wrote:
And then you can remove this diff, because the `AtomTy` will be (correctly) `char`.
https://github.com/llvm/llvm-project/pull/121943
More information about the cfe-commits
mailing list