Skip to content

Commit

Permalink
Add support for clang_format options version 16.
Browse files Browse the repository at this point in the history
  • Loading branch information
asuessenbach committed Feb 5, 2025
1 parent 8672aa4 commit a789e66
Show file tree
Hide file tree
Showing 9 changed files with 142 additions and 4 deletions.
1 change: 1 addition & 0 deletions .clang-format_12
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ BraceWrapping :
SplitEmptyNamespace : true
BreakBeforeBinaryOperators : None
BreakBeforeBraces : Custom
BreakBeforeConceptDeclarations : Always
BreakBeforeTernaryOperators : true
BreakConstructorInitializers : BeforeComma
BreakInheritanceList : BeforeComma
Expand Down
1 change: 1 addition & 0 deletions .clang-format_13
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ BraceWrapping :
SplitEmptyNamespace : true
BreakBeforeBinaryOperators : None
BreakBeforeBraces : Custom
BreakBeforeConceptDeclarations : Always
BreakBeforeTernaryOperators : true
BreakConstructorInitializers : BeforeComma
BreakInheritanceList : BeforeComma
Expand Down
1 change: 1 addition & 0 deletions .clang-format_14
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ BraceWrapping :
SplitEmptyNamespace : true
BreakBeforeBinaryOperators : None
BreakBeforeBraces : Custom
BreakBeforeConceptDeclarations : Always
BreakBeforeTernaryOperators : true
BreakConstructorInitializers : BeforeComma
BreakInheritanceList : BeforeComma
Expand Down
1 change: 1 addition & 0 deletions .clang-format_15
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ BraceWrapping :
SplitEmptyNamespace : true
BreakBeforeBinaryOperators : None
BreakBeforeBraces : Custom
BreakBeforeConceptDeclarations : Always
BreakBeforeTernaryOperators : true
BreakConstructorInitializers : BeforeComma
BreakInheritanceList : BeforeComma
Expand Down
123 changes: 123 additions & 0 deletions .clang-format_16
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
AccessModifierOffset : -2
AlignAfterOpenBracket : Align
AlignArrayOfStructures : None
AlignConsecutiveAssignments : Consecutive
AlignConsecutiveBitFields : Consecutive
AlignConsecutiveDeclarations : Consecutive
AlignConsecutiveMacros : Consecutive
AlignEscapedNewlines : Left
AlignOperands : AlignAfterOperator
AlignTrailingComments :
Kind : Always
OverEmptyLines : 0
AllowAllArgumentsOnNextLine : true
AllowAllParametersOfDeclarationOnNextLine : true
AllowShortBlocksOnASingleLine : Empty
AllowShortCaseLabelsOnASingleLine : true
AllowShortEnumsOnASingleLine : true
AllowShortFunctionsOnASingleLine : Empty
AllowShortIfStatementsOnASingleLine : Never
AllowShortLambdasOnASingleLine : All
AllowShortLoopsOnASingleLine : false
AlwaysBreakAfterReturnType : None
AlwaysBreakBeforeMultilineStrings : true
AlwaysBreakTemplateDeclarations : Yes
BinPackArguments : false
BinPackParameters : false
BitFieldColonSpacing : Both
BraceWrapping :
AfterCaseLabel : true
AfterClass : true
AfterControlStatement : Always
AfterEnum : true
AfterFunction : true
AfterNamespace : true
AfterStruct : true
AfterUnion : true
AfterExternBlock : true
BeforeCatch : true
BeforeElse : true
BeforeLambdaBody : true
BeforeWhile : false
IndentBraces : false
SplitEmptyFunction : true
SplitEmptyRecord : true
SplitEmptyNamespace : true
BreakAfterAttributes: Leave
BreakBeforeBinaryOperators : None
BreakBeforeBraces : Custom
BreakBeforeConceptDeclarations : Always
BreakBeforeInlineASMColon : OnlyMultiline
BreakBeforeTernaryOperators : true
BreakConstructorInitializers : BeforeComma
BreakInheritanceList : BeforeComma
BreakStringLiterals : false
ColumnLimit : 160
CompactNamespaces : false
ConstructorInitializerIndentWidth : 2
ContinuationIndentWidth : 2
Cpp11BracedListStyle : false
EmptyLineAfterAccessModifier : Never
EmptyLineBeforeAccessModifier : LogicalBlock
FixNamespaceComments : true
IncludeBlocks : Regroup
IndentAccessModifiers : false
IndentCaseBlocks : true
IndentCaseLabels : true
IndentExternBlock : true
IndentPPDirectives : AfterHash
IndentRequiresClause : false
IndentWidth : 2
IndentWrappedFunctionNames : true
InsertBraces : false
InsertNewlineAtEOF : true
IntegerLiteralSeparator :
Binary : 4
Decimal : 0
Hex : 2
HexMinDigits : 6
KeepEmptyLinesAtTheStartOfBlocks : false
LambdaBodyIndentation : Signature
MaxEmptyLinesToKeep : 1
NamespaceIndentation : All
PackConstructorInitializers : NextLine
PPIndentWidth : -1
PointerAlignment : Middle
ReferenceAlignment : Pointer
ReflowComments : true
RemoveBracesLLVM : false
RequiresClausePosition : OwnLine
RequiresExpressionIndentation : Keyword
SeparateDefinitionBlocks : Always
ShortNamespaceLines : 0
SortIncludes : true
SortUsingDeclarations : true
SpaceAfterCStyleCast : false
SpaceAfterLogicalNot : false
SpaceAfterTemplateKeyword : true
SpaceAroundPointerQualifiers : Both
SpaceBeforeAssignmentOperators : true
SpaceBeforeCaseColon : false
SpaceBeforeCpp11BracedList : false
SpaceBeforeCtorInitializerColon : true
SpaceBeforeInheritanceColon : true
SpaceBeforeParens : ControlStatements
SpaceBeforeRangeBasedForLoopColon : true
SpaceBeforeSquareBrackets : false
SpaceInEmptyBlock : false
SpaceInEmptyParentheses : false
SpacesBeforeTrailingComments : 2
SpacesInAngles : false
SpacesInCStyleCastParentheses : false
SpacesInConditionalStatement : true
SpacesInContainerLiterals : false
SpacesInLineCommentPrefix :
Minimum : 1
Maximum : -1
SpacesInParentheses : true
SpacesInSquareBrackets : false
Standard : Latest
UseCRLF : true
UseTab : Never
...
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,12 @@ if ( VULKAN_HPP_GENERATOR_BUILD )
elseif( clangFormatVersion VERSION_LESS 15.0.0 )
message( STATUS " Using .clang-format version 14." )
file( READ ".clang-format_14" clangFormat )
else()
message(STATUS " Using .clang-format version 15." )
elseif( clangFormatVersion VERSION_LESS 16.0.0 )
message( STATUS " Using .clang-format version 15." )
file( READ ".clang-format_15" clangFormat )
else()
message(STATUS " Using .clang-format version 16." )
file( READ ".clang-format_16" clangFormat )
endif()
file( WRITE ".clang-format" ${clangFormat} )
endif()
Expand Down
8 changes: 8 additions & 0 deletions vulkan/vulkan.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -8483,6 +8483,14 @@ export namespace std
template <>
struct hash<VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeRobustnessFeaturesEXT>;

//===============================================
//=== Required exports for vk::StructureChain ===
//===============================================

#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
using std::tuple_element;
using std::tuple_size;
#endif
} // namespace std

// This VkFlags type is used as part of a bitfield in some structure.
Expand Down
2 changes: 1 addition & 1 deletion vulkan/vulkan_hash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ namespace std

# if !defined( VULKAN_HPP_HASH_COMBINE )
# define VULKAN_HPP_HASH_COMBINE( seed, value ) \
seed ^= std::hash<std::decay<decltype( value )>::type>{}( value ) + 0x9e3779b9 + ( seed << 6 ) + ( seed >> 2 )
seed ^= std::hash<std::decay<decltype( value )>::type>{}( value ) + 0x9e'37'79'b9 + ( seed << 6 ) + ( seed >> 2 )
# endif

template <>
Expand Down
2 changes: 1 addition & 1 deletion vulkan/vulkan_hpp_macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,4 +323,4 @@ namespace VULKAN_HPP_NAMESPACE
# define VULKAN_HPP_RAII_CREATE_NOEXCEPT
#endif

#endif
#endif

0 comments on commit a789e66

Please sign in to comment.