Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================
@@ -1235,15 +1235,24 @@ bool Sema::AttachTypeConstraint(AutoTypeLoc TL,
<< NewConstrainedParm->getTypeSourceInfo()
->getTypeLoc()
.getSourceRange();
+ NewConstrainedParm->setPlaceholderTypeConstraint(
+ RecoveryExpr::Create(Context, OrigConstrainedParm->getType(),
+ OrigConstrainedParm->getBeginLoc(),
+ OrigConstrainedParm->getEndLoc(), {}));
return true;
}
// FIXME: Concepts: This should be the type of the placeholder, but this is
// unclear in the wording right now.
DeclRefExpr *Ref =
BuildDeclRefExpr(OrigConstrainedParm, OrigConstrainedParm->getType(),
VK_PRValue, OrigConstrainedParm->getLocation());
- if (!Ref)
+ if (!Ref) {
+ NewConstrainedParm->setPlaceholderTypeConstraint(
+ RecoveryExpr::Create(Context, OrigConstrainedParm->getType(),
+ OrigConstrainedParm->getBeginLoc(),
+ OrigConstrainedParm->getEndLoc(), {}));
----------------
cor3ntin wrote:
After chatting with @erichkeane, the recovery expression is probably fine.
However maybe we could find a way (lambda?) to avoid the repetition here and
line 1263
https://github.com/llvm/llvm-project/pull/121768
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits