[libcxx-commits] [clang] [libcxx] [Clang][WIP] Normalize constraints before checking for satisfaction (PR #141776)
Younan Zhang via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Sep 9 09:31:11 PDT 2025
================
@@ -1631,20 +2143,23 @@ NormalizedConstraint::fromConstraintExpr(Sema &S, const NamedDecl *D,
// constraint. If any such substitution results in an invalid type or
// expression, the program is ill-formed; no diagnostic is required.
// [...]
- ConceptDecl *CD = CSE->getNamedConcept();
- SubNF = S.getNormalizedAssociatedConstraints(
- CD, AssociatedConstraint(CD->getConstraintExpr()));
+
+ // Use canonical declarations to merge ConceptDecls across
+ // different modules.
+ ConceptDecl *CD = CSE->getNamedConcept()->getCanonicalDecl();
+ SubNF = NormalizedConstraint::fromAssociatedConstraints(
+ S, CD, AssociatedConstraint(CD->getConstraintExpr(), SubstIndex));
+
if (!SubNF)
- return std::nullopt;
+ return nullptr;
}
+ // if (substituteParameterMappings(S, *SubNF, CSE))
+ // return nullptr;
----------------
zyn0217 wrote:
leftovers
https://github.com/llvm/llvm-project/pull/141776
More information about the libcxx-commits
mailing list