From 31e55704f5854b27d80e93576f182342f6e73707 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 31 Mar 2017 17:19:03 -0700 Subject: Use [[noreturn]] instead of declspec(noreturn) --- toolsrc/src/vcpkg_Checks.cpp | 7 +++++-- toolsrc/src/vcpkg_Enums.cpp | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'toolsrc/src') 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); } -- cgit v1.2.3