Merge pull request #522 from asuessenbach/check

Extend check for attributes "deprecatedby" and "obsoletedby" to include features as well
This commit is contained in:
Andreas Süßenbach 2020-02-25 14:06:13 +01:00 committed by GitHub
commit c1de6026b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3310,16 +3310,18 @@ void VulkanHppGenerator::checkCorrectness()
{
if (!extension.second.deprecatedBy.empty())
{
check(m_extensions.find(extension.second.deprecatedBy) != m_extensions.end(), extension.second.xmlLine, "extension deprecated by unknown extension <" + extension.second.deprecatedBy + ">");
check((m_extensions.find(extension.second.deprecatedBy) != m_extensions.end()) || (m_features.find(extension.second.deprecatedBy) != m_features.end())
, extension.second.xmlLine, "extension deprecated by to unknown extension/version <" + extension.second.promotedTo + ">");
}
if (!extension.second.obsoletedBy.empty())
{
check(m_extensions.find(extension.second.obsoletedBy) != m_extensions.end(), extension.second.xmlLine, "extension obsoleted by unknown extension <" + extension.second.obsoletedBy + ">");
check((m_extensions.find(extension.second.obsoletedBy) != m_extensions.end()) || (m_features.find(extension.second.obsoletedBy) != m_features.end())
, extension.second.xmlLine, "extension obsoleted by unknown extension/version <" + extension.second.promotedTo + ">");
}
if (!extension.second.promotedTo.empty())
{
check((m_extensions.find(extension.second.promotedTo) != m_extensions.end()) || (m_features.find(extension.second.promotedTo) != m_features.end())
, extension.second.xmlLine, "extension promoted to unknown extension <" + extension.second.promotedTo + ">");
, extension.second.xmlLine, "extension promoted to unknown extension/version <" + extension.second.promotedTo + ">");
}
for (auto const& require : extension.second.requires)
{