Replace noreturn with macro
This commit is contained in:
parent
67e06c18a9
commit
c76c03c711
|
@ -37,6 +37,15 @@
|
||||||
# define NOEXCEPT
|
# define NOEXCEPT
|
||||||
#endif
|
#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
|
#define REQUIRES(msg, ...) class=typename std::enable_if<__VA_ARGS__::value>::type
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
@ -607,16 +607,16 @@ private:
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/** Syntax error */
|
/** 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. */
|
/** 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. */
|
/** 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 */
|
/** Warn about unknown macro(s), configuration is recommended */
|
||||||
[[noreturn]] void unknownMacroError(const Token *tok1) const;
|
NORETURN void unknownMacroError(const Token *tok1) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue