[clang] [Clang] Fix atomic boolean compound assignment (#33210) (PR #178220)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 27 09:52:12 PST 2026
================
@@ -1591,6 +1591,13 @@ Value *ScalarExprEmitter::EmitScalarConversion(Value *Src, QualType SrcType,
if (DstType->isBooleanType())
return EmitConversionToBool(Src, SrcType);
+ // Also handle conversions to atomic bools
+ if (const AtomicType *atomicType = DstType->getAs<AtomicType>()) {
----------------
zwuis wrote:
Use `const auto *`.
https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable
---
`atomicType` should start with an upper-case letter.
https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
https://github.com/llvm/llvm-project/pull/178220
More information about the cfe-commits
mailing list