================
@@ -5112,6 +5118,19 @@ namespace {
return Result;
}
+ QualType TransformAtomicType(TypeLocBuilder &TLB, AtomicTypeLoc TL) {
+ // When building the function parameter for placeholder type deduction
+ // (Replacement is the invented template parameter), dig through _Atomic
+ // around an auto placeholder so deduction matches the non-atomic
+ // argument. The _Atomic wrapper is re-applied by the final substitution
+ // pass, which uses a concrete Replacement and falls through to the
+ // default transform.
+ if (!Replacement.isNull() && Replacement->isTemplateTypeParmType() &&
+ TL.getValueLoc().getType()->getContainedAutoType())
+ return getDerived().TransformType(TLB, TL.getValueLoc());
+ return inherited::TransformAtomicType(TLB, TL);
----------------
mkovacevic99 wrote:
thanks for this, I added a comment for future reference
https://github.com/llvm/llvm-project/pull/197874
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits