Replace noreturn with macro
This commit is contained in:
parent
67e06c18a9
commit
c76c03c711
|
@ -37,6 +37,15 @@
|
|||
# define NOEXCEPT
|
||||
#endif
|
||||
|
||||
// C++11 noreturn
|
||||
#if (defined(__GNUC__) && (__GNUC__ >= 5)) \
|
||||
|| (defined(__clang__) && (defined (__cplusplus)) && (__cplusplus >= 201103L)) \
|
||||
|| defined(__CPPCHECK__)
|
||||
# define NORETURN [[noreturn]]
|
||||
#else
|
||||
# define NORETURN
|
||||
#endif
|
||||
|
||||
#define REQUIRES(msg, ...) class=typename std::enable_if<__VA_ARGS__::value>::type
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -607,16 +607,16 @@ private:
|
|||
public:
|
||||
|
||||
/** Syntax error */
|
||||
[[noreturn]] 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. */
|
||||
[[noreturn]] void unmatchedToken(const Token *tok) const;
|
||||
NORETURN void unmatchedToken(const Token *tok) const;
|
||||
|
||||
/** Syntax error. C++ code in C file. */
|
||||
[[noreturn]] 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 */
|
||||
[[noreturn]] void unknownMacroError(const Token *tok1) const;
|
||||
NORETURN void unknownMacroError(const Token *tok1) const;
|
||||
|
||||
private:
|
||||
|
||||
|
|
Loading…
Reference in New Issue