it. Diagnose with recovery if it appears after a function parameter that was obviously supposed to be a parameter pack. Otherwise, warn if it immediately follows a function parameter pack, because the user most likely didn't intend to write a parameter pack followed by a C-style varargs ellipsis. This warning can be syntactically disabled by using ", ..." instead of "...". llvm-svn: 215408
9 lines
295 B
C++
9 lines
295 B
C++
// 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}}
|