Codechange: Replace old non-standard attributes with C++17/20 standard attributes.

This commit is contained in:
frosch
2024-01-31 21:03:17 +01:00
committed by frosch
parent 8a4f0c4b02
commit b1718478c8
79 changed files with 169 additions and 206 deletions

View File

@@ -49,7 +49,7 @@ void StrgenErrorI(const std::string &msg)
_errors++;
}
void NORETURN StrgenFatalI(const std::string &msg)
[[noreturn]] void StrgenFatalI(const std::string &msg)
{
fmt::print(stderr, LINE_NUM_FMT("FATAL"), _file, _cur_line, msg);
#ifdef _MSC_VER
@@ -58,7 +58,7 @@ void NORETURN StrgenFatalI(const std::string &msg)
throw std::exception();
}
void NORETURN FatalErrorI(const std::string &msg)
[[noreturn]] void FatalErrorI(const std::string &msg)
{
fmt::print(stderr, LINE_NUM_FMT("FATAL"), _file, _cur_line, msg);
#ifdef _MSC_VER

View File

@@ -149,7 +149,7 @@ ParsedCommandStruct ExtractCommandString(const char *s, bool warnings);
void StrgenWarningI(const std::string &msg);
void StrgenErrorI(const std::string &msg);
void NORETURN StrgenFatalI(const std::string &msg);
[[noreturn]] void StrgenFatalI(const std::string &msg);
#define StrgenWarning(format_string, ...) StrgenWarningI(fmt::format(FMT_STRING(format_string), ## __VA_ARGS__))
#define StrgenError(format_string, ...) StrgenErrorI(fmt::format(FMT_STRING(format_string), ## __VA_ARGS__))
#define StrgenFatal(format_string, ...) StrgenFatalI(fmt::format(FMT_STRING(format_string), ## __VA_ARGS__))