diff --git a/toolsrc/include/vcpkg_Enums.h b/toolsrc/include/vcpkg_Enums.h index b1ecc311bf..ef41155d99 100644 --- a/toolsrc/include/vcpkg_Enums.h +++ b/toolsrc/include/vcpkg_Enums.h @@ -1,9 +1,10 @@ #pragma once #include +#include "LineInfo.h" namespace vcpkg::Enums { std::string nullvalue_toString(const std::string& enum_name); - __declspec(noreturn) void nullvalue_used(const std::string& enum_name); + __declspec(noreturn) void nullvalue_used(const LineInfo& line_info, const std::string& enum_name); } diff --git a/toolsrc/src/PostBuildLint_BuildPolicies.cpp b/toolsrc/src/PostBuildLint_BuildPolicies.cpp index 07464bb4e2..b7ebf53809 100644 --- a/toolsrc/src/PostBuildLint_BuildPolicies.cpp +++ b/toolsrc/src/PostBuildLint_BuildPolicies.cpp @@ -43,7 +43,7 @@ namespace vcpkg::PostBuildLint::BuildPolicies case ONLY_RELEASE_CRT: return CMAKE_VARIABLE_ONLY_RELEASE_CRT; case NULLVALUE: - Enums::nullvalue_used(ENUM_NAME); + Enums::nullvalue_used(VCPKG_LINE_INFO, ENUM_NAME); default: Checks::unreachable(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg_Enums.cpp b/toolsrc/src/vcpkg_Enums.cpp index 0a66628948..c8925fc639 100644 --- a/toolsrc/src/vcpkg_Enums.cpp +++ b/toolsrc/src/vcpkg_Enums.cpp @@ -9,7 +9,7 @@ namespace vcpkg::Enums return Strings::format("%s_NULLVALUE", enum_name); } - __declspec(noreturn) void nullvalue_used(const std::string& enum_name) + __declspec(noreturn) void nullvalue_used(const LineInfo& line_info, const std::string& enum_name) { Checks::exit_with_message("NULLVALUE of enum %s was used", enum_name); }