Next.is(tok::kw_throw) || Next.is(tok::kw_noexcept) ||
Next.is(tok::l_square) || isCXX0XVirtSpecifier(Next) ||
Next.is(tok::l_brace) || Next.is(tok::kw_try) ||
- Next.is(tok::equal))
+ Next.is(tok::equal) || Next.is(tok::arrow))
// The next token cannot appear after a constructor-style initializer,
// and can appear next in a function definition. This must be a function
// declarator.
struct S {
S(int);
- S *operator()() const;
+ S *operator()(...) const;
int n;
};
// This parses as a function declaration, but DR1223 makes the presence of
// 'auto' be used for disambiguation.
S(a)()->n; // ok, expression; expected-warning{{expression result unused}}
+ S(a)(int())->n; // ok, expression; expected-warning{{expression result unused}}
auto(a)()->n; // ok, function declaration
+ auto(b)(int())->n; // ok, function declaration
using T = decltype(a);
using T = auto() -> n;
}