Mark syntax error functions as noreturn
This commit is contained in:
parent
600919f624
commit
a412e3e1f1
|
@ -3560,7 +3560,6 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s
|
|||
typeTok = typeTok->next();
|
||||
if (Token::Match(typeTok, ",|)")) { // #8333
|
||||
symbolDatabase->mTokenizer->syntaxError(typeTok);
|
||||
return;
|
||||
}
|
||||
// skip over qualification
|
||||
while (Token::Match(typeTok, "%type% ::"))
|
||||
|
|
|
@ -607,16 +607,16 @@ private:
|
|||
public:
|
||||
|
||||
/** Syntax error */
|
||||
void syntaxError(const Token *tok, const std::string &code = "") const;
|
||||
[[noreturn]] void syntaxError(const Token *tok, const std::string &code = "") const;
|
||||
|
||||
/** Syntax error. Unmatched character. */
|
||||
void unmatchedToken(const Token *tok) const;
|
||||
[[noreturn]] void unmatchedToken(const Token *tok) const;
|
||||
|
||||
/** Syntax error. C++ code in C file. */
|
||||
void syntaxErrorC(const Token *tok, const std::string &what) const;
|
||||
[[noreturn]] void syntaxErrorC(const Token *tok, const std::string &what) const;
|
||||
|
||||
/** Warn about unknown macro(s), configuration is recommended */
|
||||
void unknownMacroError(const Token *tok1) const;
|
||||
[[noreturn]] void unknownMacroError(const Token *tok1) const;
|
||||
|
||||
private:
|
||||
|
||||
|
|
Loading…
Reference in New Issue