1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
4 int foo1(int case, int throw, int y
) { // expected-error {{invalid parameter name: 'case' is a keyword}} \
5 expected
-error
{{invalid
}}
6 // Trailing parameters should be recovered.
10 int foo2(int case = 1); // expected-error {{invalid parameter}}
11 int foo3(int const); // ok: without parameter name.
12 // ok: override has special meaning when used after method functions. it can be
14 int foo4(int override
);
15 int foo5(int x
const); // expected-error {{expected ')'}} expected-note {{to match this '('}}
16 // FIXME: bad recovery on the case below, "invalid parameter" is desired, the
17 // followon diagnostics should be suppressed.
18 int foo6(int case __attribute((weak
))); // expected-error {{invalid parameter}} \
19 // expected-error {{expected ')'}} expected-note {{to match this '('}}
22 // FIXME: we shoud improve the dianostics for the following cases.
23 int case; // expected-error {{expected unqualified-id}}
25 int case; // expected-error {{expected member name or ';'}}
29 void bar(*decltype(1) aux
); // expected-error {{a type specifier is required for all declarations}}. \
30 // expected-error {{expected ')'}} expected-note {{to match this '('}}