[clang] [clang][Sema] Don't assert non-empty unexpanded packs following Colle… (PR #69224)

via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 16 09:51:45 PDT 2023


================
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -std=c++17 %s -fsyntax-only -verify
+// expected-no-diagnostics
+template <typename... Ts> void g(Ts... p1s) {
+  (void)[&](auto... p2s) { ([&] { p1s; p2s; }, ...); };
+}                                                       
----------------
cor3ntin wrote:

can you add a test that
```cpp
template <typename... Ts> void g(Ts... p1s) {
  (void)[&](auto... p2s) { [&] { p1s; p2s; }; };
}                                                       
```
 does produce a diagnostic?


https://github.com/llvm/llvm-project/pull/69224


More information about the cfe-commits mailing list