Extend error check on exports of a required command being in the api list of a feature (#2221)

This commit is contained in:
Andreas Süßenbach 2025-07-18 08:58:15 +02:00 committed by GitHub
parent 8e34112311
commit d3a3c6321f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14795,7 +14795,8 @@ void VulkanHppGenerator::readFeatureRequire( tinyxml2::XMLElement const * elemen
checkForError( ( std::stoi( m_version ) < 319 ) || !commandIt->second.exports.empty(),
commandIt->second.xmlLine,
"command <" + commandIt->first + "> is required by feature <" + featureData.name + "> but is not marked as exported" );
checkForError( std::ranges::includes( featureData.api, commandIt->second.exports ),
checkForError( std::ranges::any_of( commandIt->second.exports,
[&featureData]( auto const & api ) { return std::ranges::find( featureData.api, api ) != featureData.api.end(); } ),
commandIt->second.xmlLine,
"command <" + commandIt->first + "> is required by feature <" + featureData.name + "> but is not exported for the feature's api" );
}