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,14 +9,14 @@ AllowAllParametersOfDeclarationOnNextLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AlwaysBreakTemplateDeclarations: Yes
BreakTemplateDeclarations: Yes
BasedOnStyle: WebKit
BitFieldColonSpacing: After
BinPackParameters: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BraceWrapping:
AfterFunction: false
AfterFunction: false
AfterClass: false
AfterControlStatement: true
BeforeElse: true

View File

@@ -25,11 +25,11 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
- 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
continue-on-error: true
with:
clang-format-version: "18"
clang-format-version: "20"
exclude-regex: "incbin"
- name: Comment on PR
@@ -37,9 +37,9 @@ jobs:
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # @v2.5.0
with:
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.
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 }}**)_
comment_tag: execution

View File

@@ -163,8 +163,8 @@ lsx = no
lasx = no
STRIP = strip
ifneq ($(shell which clang-format-18 2> /dev/null),)
CLANG-FORMAT = clang-format-18
ifneq ($(shell which clang-format-20 2> /dev/null),)
CLANG-FORMAT = clang-format-20
else
CLANG-FORMAT = clang-format
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_sub_16(a, b) vsubq_s16(a, b)
#define vec_mulhi_16(a, b) vqdmulhq_s16(a, b)
#define vec_zero() \
vec_t { 0 }
#define vec_zero() vec_t{0}
#define vec_set_16(a) vdupq_n_s16(a)
#define vec_max_16(a, b) vmaxq_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_add_psqt_32(a, b) vaddq_s32(a, b)
#define vec_sub_psqt_32(a, b) vsubq_s32(a, b)
#define vec_zero_psqt() \
psqt_vec_t { 0 }
#define vec_zero_psqt() psqt_vec_t{0}
#define NumRegistersSIMD 16
#define MaxChunkSize 16

View File

@@ -164,7 +164,7 @@ class ThreadPool {
std::vector<std::unique_ptr<Thread>> threads;
std::vector<NumaIndex> boundThreadToNumaNode;
uint64_t accumulate(std::atomic<uint64_t> Search::Worker::*member) const {
uint64_t accumulate(std::atomic<uint64_t> Search::Worker::* member) const {
uint64_t sum = 0;
for (auto&& th : threads)