[clang] [Clang] Don't assert on substituted-but-yet-expanded packs for nested lambdas (PR #112896)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 18 09:40:09 PDT 2024
================
@@ -94,3 +94,45 @@ template <typename... Ts> void g2(Ts... p1s) {
void f1() { g(); }
} // namespace GH61460
+
+namespace GH112352 {
+
+template <class>
+constexpr bool foo = false;
+
+template <int>
+constexpr bool bar = false;
+
+template <template<class> class>
+constexpr bool baz = false;
+
+struct S {
+ template <typename... Types, int... Values> void foldExpr1() {
+ (void)[]<int... Is> {
+ ([] {
+ Is;
+ // Propagate up the flag ContainsUnexpandedParameterPack from VarDecl.
+ S var(foo<Types>);
+ foo<Types>;
+ bar<Values>;
+ } &&
+ ...);
+ };
+ }
+
+ template <template<class> class... TTPs> void foldExpr2() {
+ (void)[]<int... Is> {
+ ([] {
+ Is;
+ baz<TTPs>;
----------------
cor3ntin wrote:
How about `TTPs<int>`
https://github.com/llvm/llvm-project/pull/112896
More information about the cfe-commits
mailing list