[clang] [clang][Sema] Handle function parameter packs in `PackDeductionScope::addPacks` (PR #215235)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 11 21:04:24 PDT 2026
================
@@ -177,3 +177,19 @@ namespace GH177545 {
template<decltype(auto)()() volatile throw() -> char> // expected-error {{'decltype(auto)' can only be used as a return type in a function declaration}}
struct T2; // expected-error@* {{function cannot return function type 'auto () volatile throw() -> decltype(auto)'}}
}
+
+namespace GH28877 {
+template <typename...> struct S;
+template <typename... Ts> auto f(Ts... args) -> S<decltype(args)...>;
+extern template auto f() -> S<>;
+}
+
+namespace GH46548 {
+template <typename... Ts> void a(Ts... args1, char... args2[][sizeof args1]);
+extern template void a();
+}
+
+namespace GH213760 {
+template <typename... Ts> void f(Ts... args, decltype(args)...);
+void g() { f(); }
----------------
zyn0217 wrote:
Also, can you please add tests for
```cpp
f<int>(1, 2);
f(1, 2);
f<int, int>(1, 2);
```
?
https://github.com/llvm/llvm-project/pull/215235
More information about the cfe-commits
mailing list