aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/src')
-rw-r--r--toolsrc/src/vcpkg_Checks.cpp7
-rw-r--r--toolsrc/src/vcpkg_Enums.cpp3
2 files changed, 7 insertions, 3 deletions
diff --git a/toolsrc/src/vcpkg_Checks.cpp b/toolsrc/src/vcpkg_Checks.cpp
index b7fcb7077..acc15df99 100644
--- a/toolsrc/src/vcpkg_Checks.cpp
+++ b/toolsrc/src/vcpkg_Checks.cpp
@@ -5,7 +5,8 @@
namespace vcpkg::Checks
{
- __declspec(noreturn) void unreachable(const LineInfo& line_info)
+ [[noreturn]]
+ void unreachable(const LineInfo& line_info)
{
System::println(System::color::error, "Error: Unreachable code was reached");
System::println(System::color::error, line_info.toString()); // Always print line_info here
@@ -16,6 +17,7 @@ namespace vcpkg::Checks
#endif
}
+ [[noreturn]]
void exit_with_code(const LineInfo& line_info, const int exit_code)
{
if (g_debugging)
@@ -26,7 +28,8 @@ namespace vcpkg::Checks
::exit(exit_code);
}
- __declspec(noreturn) void exit_with_message(const LineInfo& line_info, const cstring_view errorMessage)
+ [[noreturn]]
+ void exit_with_message(const LineInfo& line_info, const cstring_view errorMessage)
{
System::println(System::color::error, errorMessage);
exit_fail(line_info);
diff --git a/toolsrc/src/vcpkg_Enums.cpp b/toolsrc/src/vcpkg_Enums.cpp
index 46e61db7b..49f21e0e6 100644
--- a/toolsrc/src/vcpkg_Enums.cpp
+++ b/toolsrc/src/vcpkg_Enums.cpp
@@ -9,7 +9,8 @@ namespace vcpkg::Enums
return Strings::format("%s_NULLVALUE", enum_name);
}
- __declspec(noreturn) void nullvalue_used(const LineInfo& line_info, const std::string& enum_name)
+ [[noreturn]]
+ void nullvalue_used(const LineInfo& line_info, const std::string& enum_name)
{
Checks::exit_with_message(line_info, "NULLVALUE of enum %s was used", enum_name);
}