[all-commits] [llvm/llvm-project] 9b2501: [Clang] Fix the normalization of fold constraints ...
Younan Zhang via All-commits
all-commits at lists.llvm.org
Mon Feb 23 23:09:00 PST 2026
Branch: refs/heads/release/22.x
Home: https://github.com/llvm/llvm-project
Commit: 9b25011745b90d6a911fb87a0a0b85b1ba88ead5
https://github.com/llvm/llvm-project/commit/9b25011745b90d6a911fb87a0a0b85b1ba88ead5
Author: Younan Zhang <zyn7109 at gmail.com>
Date: 2026-02-24 (Tue, 24 Feb 2026)
Changed paths:
M clang/include/clang/Sema/Sema.h
M clang/lib/Sema/SemaConcept.cpp
M clang/lib/Sema/SemaTemplateInstantiate.cpp
M clang/lib/Sema/TreeTransform.h
M clang/test/SemaCXX/cxx2c-fold-exprs.cpp
Log Message:
-----------
[Clang] Fix the normalization of fold constraints (#177531)
Fold constraints can contain packs expanded from different locations.
For `C<Ps...>`, where the ellipsis immediately follows the argument, the
pack should be expanded in place regardless of the fold expression. For
`C<Ps> && ...`, the fold expression itself is responsible for expanding
Ps.
Previously, both kinds of packs were expanded by the fold expression,
which broke assumptions within concept caching. This patch fixes that by
preserving PackExpansionTypes for the first kind of pack while rewriting
them to non-packs for the second kind.
This patch also removes an unused function and performs some cleanup of
the evaluation contexts. Hopefully it is viable for backporting.
No release note, as this issue was a regression.
Fixes https://github.com/llvm/llvm-project/issues/177245
(cherry picked from commit adc64c6e1745a14896efa48d23fc541e4efe5a53)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list