aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-03-31 17:19:03 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-03-31 17:19:03 -0700
commit31e55704f5854b27d80e93576f182342f6e73707 (patch)
tree2295064549018b2077d5b90a518c46d2c9cf00eb /toolsrc/src
parent095d3294d583b4fb2f72d69f9e8f67c3582715ef (diff)
downloadvcpkg-31e55704f5854b27d80e93576f182342f6e73707.tar.gz
vcpkg-31e55704f5854b27d80e93576f182342f6e73707.zip
Use [[noreturn]] instead of declspec(noreturn)
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);
}