[libcxx-commits] [clang] [libcxx] [Clang] Normalize constraints before checking for satisfaction (PR #141776)

Younan Zhang via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 24 03:16:04 PDT 2025


================
@@ -1919,25 +1919,28 @@ void SubstituteParameterMappings::buildParameterMapping(
       cast<TemplateDecl>(N.getConstraintDecl())->getTemplateParameters();
 
   llvm::SmallBitVector OccurringIndices(TemplateParams->size());
+  llvm::SmallBitVector OccurringIndicesForSubsumption(TemplateParams->size());
 
   if (N.getKind() == NormalizedConstraint::ConstraintKind::Atomic) {
     SemaRef.MarkUsedTemplateParameters(
         static_cast<AtomicConstraint &>(N).getConstraintExpr(),
         /*OnlyDeduced=*/false,
         /*Depth=*/0, OccurringIndices);
+
+    SemaRef.MarkUsedTemplateParametersForSubsumptionParameterMapping(
+        static_cast<AtomicConstraint &>(N).getConstraintExpr(),
+        /*Depth=*/0, OccurringIndicesForSubsumption);
+
----------------
zyn0217 wrote:

Do you think this is applicable to FoldExprs?

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


More information about the libcxx-commits mailing list