[clang] [Clang] Substitute non dependent concepts in constraints (PR #163827)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 16 19:50:04 PDT 2025
================
@@ -2249,8 +2287,14 @@ NormalizedConstraint *NormalizedConstraint::fromConstraintExpr(
// Use canonical declarations to merge ConceptDecls across
// different modules.
ConceptDecl *CD = CSE->getNamedConcept()->getCanonicalDecl();
+
+ ExprResult Res =
+ SubstituteConceptsInConstrainExpression(S, D, CSE, SubstIndex);
+ if (!Res.isUsable())
+ return nullptr;
+
----------------
zyn0217 wrote:
Note that a substitution in this function will risk resulting in an exponential time complexity, unless we can ensure that the substitution in SubstituteConceptsInConstrainExpression is not deeply recursive. (i.e. at most 1 level substitution)
https://github.com/llvm/llvm-project/pull/163827
More information about the cfe-commits
mailing list