aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Parser/cxx-variadic-func.cpp
blob: 73124b8b1b05b08bca45d616221ac6a031abbcc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// RUN: %clang_cc1 -fsyntax-only -verify %s

void f(...) {
  // FIXME: There's no disambiguation here; this is unambiguous.
  int g(int(...)); // expected-warning {{disambiguated}} expected-note {{paren}}
}

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 = {}...) {}
}


template <typename ...T>
constexpr int a() {return 1;}

struct S2 {
  template <typename ...Ts>
  void f(int = a<Ts...>()...);
};