diff --git a/.clang-format b/.clang-format index 6493bd0b2..1cfead996 100644 --- a/.clang-format +++ b/.clang-format @@ -6,7 +6,6 @@ AlignConsecutiveMacros: AcrossEmptyLines: true AcrossComments: true AlignCompound: false - AlignFunctionPointers: false PadOperators: false IndentCaseBlocks: true IndentCaseLabels: true @@ -22,27 +21,19 @@ AlignConsecutiveAssignments: AcrossEmptyLines: false AcrossComments: false AlignCompound: false - AlignFunctionPointers: false PadOperators: true AlignConsecutiveBitFields: Enabled: false AcrossEmptyLines: false AcrossComments: false AlignCompound: false - AlignFunctionPointers: false PadOperators: false AlignConsecutiveDeclarations: Enabled: false AcrossEmptyLines: false AcrossComments: false AlignCompound: false - AlignFunctionPointers: false PadOperators: false -AlignConsecutiveShortCaseStatements: - Enabled: false - AcrossEmptyLines: false - AcrossComments: false - AlignCaseColons: false AlignEscapedNewlines: Right AlignOperands: Align AlignTrailingComments: @@ -50,10 +41,8 @@ AlignTrailingComments: OverEmptyLines: 0 AllowAllArgumentsOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: true -AllowBreakBeforeNoexceptSpecifier: Never AllowShortBlocksOnASingleLine: Never AllowShortCaseLabelsOnASingleLine: false -AllowShortCompoundRequirementOnASingleLine: true AllowShortEnumsOnASingleLine: false AllowShortFunctionsOnASingleLine: None AllowShortIfStatementsOnASingleLine: Never @@ -85,7 +74,6 @@ BraceWrapping: SplitEmptyFunction: true SplitEmptyRecord: true SplitEmptyNamespace: true -BreakAdjacentStringLiterals: true BreakAfterAttributes: Leave BreakAfterJavaFieldAnnotations: false BreakArrays: true @@ -98,7 +86,6 @@ BreakConstructorInitializers: BeforeColon BreakInheritanceList: BeforeColon BreakStringLiterals: true ColumnLimit: 120 -CommentPragmas: '^ IWYU pragma:' CompactNamespaces: false ConstructorInitializerIndentWidth: 4 Cpp11BracedListStyle: true @@ -130,7 +117,6 @@ IntegerLiteralSeparator: JavaScriptQuotes: Leave JavaScriptWrapImports: true KeepEmptyLinesAtTheStartOfBlocks: true -KeepEmptyLinesAtEOF: false LambdaBodyIndentation: Signature LineEnding: DeriveLF MacroBlockBegin: '' @@ -148,7 +134,6 @@ PenaltyBreakBeforeFirstCallParameter: 19 PenaltyBreakComment: 300 PenaltyBreakFirstLessLess: 120 PenaltyBreakOpenParenthesis: 0 -PenaltyBreakScopeResolution: 500 PenaltyBreakString: 1000 PenaltyBreakTemplateDeclaration: 10 PenaltyExcessCharacter: 1000000 @@ -160,13 +145,11 @@ QualifierAlignment: Leave ReferenceAlignment: Pointer ReflowComments: true RemoveBracesLLVM: false -RemoveParentheses: Leave RemoveSemicolon: false RequiresClausePosition: OwnLine RequiresExpressionIndentation: OuterScope SeparateDefinitionBlocks: Leave ShortNamespaceLines: 1 -SkipMacroDefinitionBody: false SortJavaStaticImport: Before SortUsingDeclarations: LexicographicNumeric SpaceAfterCStyleCast: false @@ -178,7 +161,6 @@ SpaceBeforeCaseColon: false SpaceBeforeCpp11BracedList: false SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true -SpaceBeforeJsonColon: false SpaceBeforeParens: ControlStatements SpaceBeforeParensOptions: AfterControlStatements: true @@ -187,7 +169,6 @@ SpaceBeforeParensOptions: AfterFunctionDeclarationName: false AfterIfMacros: true AfterOverloadedOperator: false - AfterPlacementOperator: true AfterRequiresInClause: false AfterRequiresInExpression: false BeforeNonEmptyParentheses: false @@ -197,14 +178,6 @@ SpaceInEmptyBlock: false SpacesBeforeTrailingComments: 1 SpacesInAngles: Never SpacesInContainerLiterals: true -SpacesInParens: Never -SpacesInParensOptions: - InCStyleCasts: false - InConditionalStatements: false - InEmptyParentheses: false - Other: false SpacesInSquareBrackets: false Standard: Latest UseTab: Never -VerilogBreakBetweenInstancePorts: true - diff --git a/Tools/clang-format-helper.sh b/Tools/clang-format-helper.sh index 7b4324d65..576566abf 100644 --- a/Tools/clang-format-helper.sh +++ b/Tools/clang-format-helper.sh @@ -15,7 +15,7 @@ CLANG_FORMAT_STYLE="$(realpath "${CLANG_FORMAT_STYLE}")" # Let's think that script will be used on Linux and Windows (msys or cygwin env only) if [[ "$OSTYPE" == "linux-gnu"* ]]; then # Linux - clang_format="$(which clang-format)" + clang_format="$(which clang-format-16)" else # Windows # Load clang-format from the EWDK 24H2 diff --git a/VirtIO/VirtIORing.c b/VirtIO/VirtIORing.c index d29469a08..8fe44afca 100644 --- a/VirtIO/VirtIORing.c +++ b/VirtIO/VirtIORing.c @@ -36,7 +36,7 @@ #include "virtio_ring.h" #include "windows\virtio_ring_allocation.h" -#define DESC_INDEX(num, i) ((i) & ((num) - 1)) +#define DESC_INDEX(num, i) ((i) & ((num)-1)) /* This marks a buffer as continuing via the next field. */ #define VIRTQ_DESC_F_NEXT 1 diff --git a/fwcfg64/driver.h b/fwcfg64/driver.h index 990278e64..096bd5d14 100644 --- a/fwcfg64/driver.h +++ b/fwcfg64/driver.h @@ -26,7 +26,7 @@ #define MINIDUMP_BUFFER_SIZE 0x40000 -#define ROUND_UP(x, n) (((x) + (n) - 1) & (-(n))) +#define ROUND_UP(x, n) (((x) + (n)-1) & (-(n))) #pragma pack(push, 1) typedef struct VMCOREINFO