Suggest fix-it for missing '{' after base-clause, and try to recover.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Is this sufficiently high-confidence for a fix-it? Maybe the problem is a missing ,, or someone put virtual after the type, or similar. Maybe we failed to parse a base class template specialization and we're lost in the middle of a template-argument-list?
Let's try a bit harder to be sure here. How about checking for the next token being at the start of a line, and one of the following:
- the next token is public, protected, or private, followed by a :
- the next token is static_assert
- the next tokens are a valid simple-declaration (see Parser::isCXXSimpleDeclaration)
Comment Actions
To increase confidence when suggesting fix-it:
- Expect certain keywords at the start of line, and maybe followed by ':'
- Expect '}'
- Expect a constructor declaration