[clang] [Clang] Do not consider a variadic function ellipsis part of a default arg (PR #153496)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 14 00:29:51 PDT 2025
================
@@ -6,3 +6,15 @@ void f(...) {
}
void h(int n..., int m); // expected-error {{expected ')'}} expected-note {{to match}}
+
+
+namespace GH153445 {
+void f(int = {}...);
+
+struct S {
+ void f(int = {}...);
+ void g(int...);
+};
+
+void S::g(int = {}...) {}
----------------
Fznamznon wrote:
Does something like this
```
template <typename ...T>
constexpr int a() {return 1;}
struct S {
template <typename ...Ts>
void f(int = a<Ts...>()...);
};
```
work too?
https://github.com/llvm/llvm-project/pull/153496
More information about the cfe-commits
mailing list