Sprinkle some [[noreturn]] where possible

This commit is contained in:
jvoisin 2021-04-29 21:30:25 +02:00
parent 00c41e55a4
commit aec3c74fa5
13 changed files with 18 additions and 20 deletions

View file

@ -10,7 +10,7 @@ namespace Compiler
{
// Report the error and throw an exception.
void Parser::reportSeriousError (const std::string& message, const TokenLoc& loc)
[[noreturn]] void Parser::reportSeriousError (const std::string& message, const TokenLoc& loc)
{
mErrorHandler.error (message, loc);
throw SourceException();
@ -25,7 +25,7 @@ namespace Compiler
// Report an unexpected EOF condition.
void Parser::reportEOF()
[[noreturn]] void Parser::reportEOF()
{
mErrorHandler.endOfFile();
throw EOFException();