Such as:
class X final {};
This no longer gives a syntax error.
This change has introduced one more shift-reduce conflict in the parser.
with a conflict with a C style variable declaration with name final:
class X final;
resulting in a syntax error (for C++ not C). This is an an unusual style
for C++ code and more typical declarations do work:
X final;
Closes#672
Fix parsing of C++11 identifiers with special meaning (final and override) when
they are used as part of the scope name of an identifier, such as a namespace name.
Closes#1679
PROBLEM:
There is a small ommission in parser.y, which will lead
to syntax errors in cases when non-empty throw declaration is
followed by `override`, `final` or both. E.g. in cases like:
void finalOverriden() throw(std::exception) final override;
SOLUTION:
- Add a `THROW LPAREN parms RPAREN virt_specifier_seq` to
exception_specification in Source/CParse/parser.y
- Add several methods in test-suite/cpp11_final_override.i
to verify the fix works.