[clang] [clang] Remember which concept-ids are known to be satisfied (PR #227398)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 6 23:02:33 PDT 2026


================
@@ -1131,11 +1153,11 @@ ExprResult ConstraintSatisfactionChecker::Evaluate(
   // ConceptIdConstraint is only relevant for diagnostics,
   // so if the normalized constraint is satisfied, we should not
   // substitute into the constraint.
-  if (Satisfaction.IsSatisfied)
+  if (Satisfaction.IsSatisfied) {
+    if (!BuildExpression && !Satisfaction.ContainsErrors)
+      PMCache.cacheSatisfied();
     return E;
-
-  ParameterMappingInstantiationCache PMCache(
-      *this, Constraint, MLTAL, getOuterPackIndex(Constraint), Size);
+  }
----------------
shafik wrote:

This seems worth adding a comment for.

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


More information about the cfe-commits mailing list