Update clang-format to v20

closes https://github.com/official-stockfish/Stockfish/pull/6085

No functional change
This commit is contained in:
Disservin
2025-05-22 21:19:46 +02:00
committed by Joost VandeVondele
parent c13c1d2c30
commit 2662d6bf35
5 changed files with 11 additions and 13 deletions

View File

@@ -9,7 +9,7 @@ AllowAllParametersOfDeclarationOnNextLine: true
AllowShortCaseLabelsOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false AllowShortEnumsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false AllowShortIfStatementsOnASingleLine: false
AlwaysBreakTemplateDeclarations: Yes BreakTemplateDeclarations: Yes
BasedOnStyle: WebKit BasedOnStyle: WebKit
BitFieldColonSpacing: After BitFieldColonSpacing: After
BinPackParameters: false BinPackParameters: false

View File

@@ -25,11 +25,11 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
- name: Run clang-format style check - name: Run clang-format style check
uses: jidicula/clang-format-action@f62da5e3d3a2d88ff364771d9d938773a618ab5e # @v4.11.0 uses: jidicula/clang-format-action@4726374d1aa3c6aecf132e5197e498979588ebc8 # @v4.15.0
id: clang-format id: clang-format
continue-on-error: true continue-on-error: true
with: with:
clang-format-version: "18" clang-format-version: "20"
exclude-regex: "incbin" exclude-regex: "incbin"
- name: Comment on PR - name: Comment on PR
@@ -37,9 +37,9 @@ jobs:
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # @v2.5.0 uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # @v2.5.0
with: with:
message: | message: |
clang-format 18 needs to be run on this PR. clang-format 20 needs to be run on this PR.
If you do not have clang-format installed, the maintainer will run it when merging. If you do not have clang-format installed, the maintainer will run it when merging.
For the exact version please see https://packages.ubuntu.com/noble/clang-format-18. For the exact version please see https://packages.ubuntu.com/plucky/clang-format-20.
_(execution **${{ github.run_id }}** / attempt **${{ github.run_attempt }}**)_ _(execution **${{ github.run_id }}** / attempt **${{ github.run_attempt }}**)_
comment_tag: execution comment_tag: execution

View File

@@ -163,8 +163,8 @@ lsx = no
lasx = no lasx = no
STRIP = strip STRIP = strip
ifneq ($(shell which clang-format-18 2> /dev/null),) ifneq ($(shell which clang-format-20 2> /dev/null),)
CLANG-FORMAT = clang-format-18 CLANG-FORMAT = clang-format-20
else else
CLANG-FORMAT = clang-format CLANG-FORMAT = clang-format
endif endif

View File

@@ -122,8 +122,7 @@ using psqt_vec_t = int32x4_t;
#define vec_add_16(a, b) vaddq_s16(a, b) #define vec_add_16(a, b) vaddq_s16(a, b)
#define vec_sub_16(a, b) vsubq_s16(a, b) #define vec_sub_16(a, b) vsubq_s16(a, b)
#define vec_mulhi_16(a, b) vqdmulhq_s16(a, b) #define vec_mulhi_16(a, b) vqdmulhq_s16(a, b)
#define vec_zero() \ #define vec_zero() vec_t{0}
vec_t { 0 }
#define vec_set_16(a) vdupq_n_s16(a) #define vec_set_16(a) vdupq_n_s16(a)
#define vec_max_16(a, b) vmaxq_s16(a, b) #define vec_max_16(a, b) vmaxq_s16(a, b)
#define vec_min_16(a, b) vminq_s16(a, b) #define vec_min_16(a, b) vminq_s16(a, b)
@@ -133,8 +132,7 @@ using psqt_vec_t = int32x4_t;
#define vec_store_psqt(a, b) *(a) = (b) #define vec_store_psqt(a, b) *(a) = (b)
#define vec_add_psqt_32(a, b) vaddq_s32(a, b) #define vec_add_psqt_32(a, b) vaddq_s32(a, b)
#define vec_sub_psqt_32(a, b) vsubq_s32(a, b) #define vec_sub_psqt_32(a, b) vsubq_s32(a, b)
#define vec_zero_psqt() \ #define vec_zero_psqt() psqt_vec_t{0}
psqt_vec_t { 0 }
#define NumRegistersSIMD 16 #define NumRegistersSIMD 16
#define MaxChunkSize 16 #define MaxChunkSize 16