From 8b8870cb5e35456f7b76d51ae0b4a6f0bc23708f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 12 Oct 2015 08:33:53 +0200 Subject: [PATCH] Added noreturn attributes for methods that throws --- lib/tokenize.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tokenize.h b/lib/tokenize.h index 5425633c1..e5e148d6d 100644 --- a/lib/tokenize.h +++ b/lib/tokenize.h @@ -568,7 +568,7 @@ private: * Send error message to error logger about internal bug. * @param tok the token that this bug concerns. */ - void cppcheckError(const Token *tok) const; + void cppcheckError(const Token *tok) const __attribute__((noreturn)); /** * Setup links for tokens so that one can call Token::link(). @@ -583,10 +583,10 @@ private: public: /** Syntax error */ - void syntaxError(const Token *tok) const; + void syntaxError(const Token *tok) const __attribute__((noreturn)); /** Syntax error. Example: invalid number of ')' */ - void syntaxError(const Token *tok, char c) const; + void syntaxError(const Token *tok, char c) const __attribute__((noreturn)); private: