[clang] [Clang] Fix the normalization of fold constraints (PR #177531)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 22 23:13:48 PST 2026
================
@@ -2000,14 +2009,20 @@ class SubstituteParameterMappings {
const MultiLevelTemplateArgumentList *MLTAL;
const ASTTemplateArgumentListInfo *ArgsAsWritten;
- bool InFoldExpr;
+ // When normalizing a fold constraint, e.g.
+ // C<Pack1, Pack2...> && ...
+ // we want the TreeTransform to expand only Pack2 but not Pack1,
+ // since Pack1 will be expanded during the evaluation of C.
----------------
cor3ntin wrote:
```suggestion
// since Pack1 will be expanded during the evaluation of the fold expression.
```
https://github.com/llvm/llvm-project/pull/177531
More information about the cfe-commits
mailing list