[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 6 06:39:09 PST 2025


================
@@ -1255,8 +1264,13 @@ bool Sema::AttachTypeConstraint(AutoTypeLoc TL,
       },
       EllipsisLoc);
   if (ImmediatelyDeclaredConstraint.isInvalid() ||
-      !ImmediatelyDeclaredConstraint.isUsable())
+      !ImmediatelyDeclaredConstraint.isUsable()) {
+    NewConstrainedParm->setPlaceholderTypeConstraint(
+        RecoveryExpr::Create(Context, OrigConstrainedParm->getType(),
+                             OrigConstrainedParm->getBeginLoc(),
+                             OrigConstrainedParm->getEndLoc(), {}));
----------------
cor3ntin wrote:

Same here

https://github.com/llvm/llvm-project/pull/121768


More information about the cfe-commits mailing list