Enums::nullvalue_used() now requires LineInfo as first arg

This commit is contained in:
Alexander Karatarakis 2017-03-13 17:15:39 -07:00
parent 8e8debc848
commit 98ea6780e7
3 changed files with 4 additions and 3 deletions

View File

@ -1,9 +1,10 @@
#pragma once
#include <string>
#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);
}

View File

@ -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);
}

View File

@ -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);
}