[clang] [Clang][Sema] Fix an assertion crash when instantiating a nested requirement (PR #213660)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 3 08:34:25 PDT 2026
================
@@ -2832,6 +2832,13 @@ TemplateInstantiator::TransformNestedRequirement(
ASTContext &C = SemaRef.Context;
+ if (Req->hasInvalidConstraint()) {
+ if (AlwaysRebuild())
+ return RebuildNestedRequirement(Req->getInvalidConstraintEntity(),
+ Req->getConstraintSatisfaction());
+ return Req;
+ }
+
Expr *Constraint = Req->getConstraintExpr();
----------------
zyn0217 wrote:
Can we instead move line 2842 down to where Constraint is actually used, i.e. to the line after ~2854? We would have less changes then.
https://github.com/llvm/llvm-project/pull/213660
More information about the cfe-commits
mailing list