Throw on clang_format failure; fix comment (#2070)

This commit is contained in:
Andreas Süßenbach 2025-02-11 09:35:35 +01:00 committed by GitHub
parent a854add3d8
commit 0ff63e9dc6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 29 additions and 26 deletions

View File

@ -44,7 +44,8 @@ BraceWrapping :
SplitEmptyNamespace : true
BreakBeforeBinaryOperators : None
BreakBeforeBraces : Custom
BreakBeforeConceptDeclarations : true # This flag seems to be a boolean with clang-format 14 ?!?
# BreakBeforeConceptDeclarations seems to be a boolean with clang-format 14 ?!?
BreakBeforeConceptDeclarations : true
BreakBeforeTernaryOperators : true
BreakConstructorInitializers : BeforeComma
BreakInheritanceList : BeforeComma

View File

@ -7435,7 +7435,8 @@ std::string VulkanHppGenerator::generateEnum( std::pair<std::string, EnumData> c
typeTraits = generateLayerSettingTypeTraits();
}
const std::string enumTemplate = R"( // wrapper class for enum Vk${enumName}, see https://registry.khronos.org/vulkan/specs/latest/man/html/Vk${enumName}.html
const std::string enumTemplate =
R"( // wrapper class for enum Vk${enumName}, see https://registry.khronos.org/vulkan/specs/latest/man/html/Vk${enumName}.html
enum class ${enumName}${baseType}{${enumValues}};
${typeTraits}
${enumUsing}
@ -12257,7 +12258,8 @@ ${deprecatedConstructors}
compareOperators += generateStructCompareOperators( structure );
}
static const std::string structureTemplate = R"( // wrapper struct for struct Vk${structureType}, see https://registry.khronos.org/vulkan/specs/latest/man/html/Vk${structureType}.html
static const std::string structureTemplate =
R"( // wrapper struct for struct Vk${structureType}, see https://registry.khronos.org/vulkan/specs/latest/man/html/Vk${structureType}.html
struct ${structureType}
{
using NativeType = Vk${structureType};

View File

@ -570,7 +570,7 @@ void writeToFile( std::string const & str, std::string const & fileName )
const int ret = std::system( commandString.c_str() );
if ( ret != 0 )
{
messager.message( "VulkanHppGenerator: failed to format file " + fileName + " with error <" + std::to_string( ret ) + ">\n" );
throw std::runtime_error( "VulkanHppGenerator: failed to format file " + fileName + " with error <" + std::to_string( ret ) + ">" );
}
#endif
}