It is not correct to let it consume the cxx_defaultarg_end token. I'm
starting to wonder if it makes more sense to stop SkipUntil from
consuming such tokens.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225615
91177308-0d34-0410-b5e6-
96231b3b80d8
// token.
if (P.Tok.isNot(tok::r_paren) && P.Tok.isNot(tok::r_brace) &&
P.Tok.isNot(tok::r_square) &&
- P.SkipUntil(Close, FinalToken,
+ P.SkipUntil(Close, FinalToken, tok::cxx_defaultarg_end,
Parser::StopAtSemi | Parser::StopBeforeMatch) &&
P.Tok.is(Close))
LClose = P.ConsumeAnyToken();
template <typename T>
void m (T x =[0); // expected-error{{expected variable name or 'this' in lambda capture list}}
} s;
+
+struct U {
+ template <typename T>
+ void m_fn1(T x = 0[0); // expected-error{{expected ']'}} expected-note{{to match this '['}}
+} *U;