Skip to content

Commit b8bd740

Browse files
committed
Merge
2 parents c645209 + 9ef0910 commit b8bd740

124 files changed

Lines changed: 1803 additions & 803 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-tidy

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ Checks: >
5050
-modernize-type-traits,
5151
-modernize-use-designated-initializers,
5252
-modernize-use-nodiscard,
53+
-modernize-use-scoped-lock,
5354
-modernize-use-trailing-return-type,
5455
-performance-avoid-endl,
5556
-performance-inefficient-string-concatenation,
5657
-performance-no-automatic-move,
58+
-portability-avoid-pragma-once,
5759
-portability-simd-intrinsics,
5860
-portability-std-allocator-const,
5961
-readability-avoid-nested-conditional-operator,
@@ -68,7 +70,8 @@ Checks: >
6870
-readability-isolate-declaration,
6971
-readability-magic-numbers,
7072
-readability-suspicious-call-argument,
71-
-readability-uppercase-literal-suffix
73+
-readability-uppercase-literal-suffix,
74+
-readability-use-concise-preprocessor-directives
7275
WarningsAsErrors: '*'
7376
HeaderFilterRegex: '(cli|gui|frontend|lib|oss-fuzz|test|triage)\/[a-z_]+\.h'
7477
ExcludeHeaderFilterRegex: 'ui_.*.h'
@@ -77,3 +80,5 @@ CheckOptions:
7780
value: '1'
7881
- key: readability-simplify-boolean-expr.SimplifyDeMorgan
7982
value: '0'
83+
- key: modernize-use-trailing-return-type.TransformFunctions
84+
value: false

.github/workflows/CI-mingw.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,19 @@ jobs:
5858
run: |
5959
export PATH="/mingw64/lib/ccache/bin:$PATH"
6060
# set RDYNAMIC to work around broken MinGW detection
61-
make VERBOSE=1 RDYNAMIC=-lshlwapi -j$(nproc) cppcheck
62-
env:
63-
LDFLAGS: -fuse-ld=lld # use lld for faster linking
61+
# use lld for faster linking
62+
make VERBOSE=1 RDYNAMIC=-lshlwapi LDOPTS=-fuse-ld=lld -j$(nproc) cppcheck
6463
6564
- name: Build test
6665
run: |
6766
export PATH="/mingw64/lib/ccache/bin:$PATH"
6867
# set RDYNAMIC to work around broken MinGW detection
69-
make VERBOSE=1 RDYNAMIC=-lshlwapi -j$(nproc) testrunner
70-
env:
71-
LDFLAGS: -fuse-ld=lld # use lld for faster linking
68+
# use lld for faster linking
69+
make VERBOSE=1 RDYNAMIC=-lshlwapi LDOPTS=-fuse-ld=lld -j$(nproc) testrunner
7270
7371
- name: Run test
7472
run: |
7573
export PATH="/mingw64/lib/ccache/bin:$PATH"
7674
# set RDYNAMIC to work around broken MinGW detection
77-
make VERBOSE=1 RDYNAMIC=-lshlwapi -j$(nproc) check
78-
env:
79-
LDFLAGS: -fuse-ld=lld # use lld for faster linking
75+
# use lld for faster linking
76+
make VERBOSE=1 RDYNAMIC=-lshlwapi LDOPTS=-fuse-ld=lld -j$(nproc) check

.github/workflows/CI-unixish-docker.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@ jobs:
2020

2121
strategy:
2222
matrix:
23-
image: ["ubuntu:24.04", "ubuntu:24.10"]
23+
image: ["ubuntu:24.04"]
2424
include:
2525
- build_gui: false
2626
- image: "ubuntu:24.04"
2727
build_gui: true
28-
- image: "ubuntu:24.10"
29-
build_gui: true
3028
fail-fast: false # Prefer quick result
3129

3230
runs-on: ubuntu-22.04
@@ -84,7 +82,7 @@ jobs:
8482

8583
strategy:
8684
matrix:
87-
image: ["ubuntu:24.04", "ubuntu:24.10"]
85+
image: ["ubuntu:24.04"]
8886
fail-fast: false # Prefer quick result
8987

9088
runs-on: ubuntu-22.04
@@ -113,12 +111,12 @@ jobs:
113111
- name: Build cppcheck
114112
run: |
115113
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
116-
make -j$(nproc) HAVE_RULES=yes CXXFLAGS="-w"
114+
make -j$(nproc) HAVE_RULES=yes CXXOPTS="-w"
117115
118116
- name: Build test
119117
run: |
120118
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
121-
make -j$(nproc) testrunner HAVE_RULES=yes CXXFLAGS="-w"
119+
make -j$(nproc) testrunner HAVE_RULES=yes CXXOPTS="-w"
122120
123121
- name: Run test
124122
run: |

.github/workflows/CI-unixish.yml

Lines changed: 50 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,46 @@ jobs:
151151
run: |
152152
cmake --build cmake.output --target install
153153
154+
- name: Run CMake on ubuntu (no CLI)
155+
if: matrix.os == 'ubuntu-22.04'
156+
run: |
157+
cmake -S . -B cmake.output_nocli -G "Unix Makefiles" -DBUILD_CLI=Off
158+
159+
- name: Run CMake on ubuntu (no CLI / with tests)
160+
if: matrix.os == 'ubuntu-22.04'
161+
run: |
162+
# the test and CLI code are too intertwined so for now we need to reject that
163+
if cmake -S . -B cmake.output_nocli_tests -G "Unix Makefiles" -DBUILD_TESTS=On -DBUILD_CLI=Off; then
164+
exit 1
165+
else
166+
exit 0
167+
fi
168+
169+
- name: Run CMake on ubuntu (no CLI / with GUI)
170+
if: matrix.os == 'ubuntu-22.04'
171+
run: |
172+
cmake -S . -B cmake.output_nocli_gui -G "Unix Makefiles" -DBUILD_CLI=Off -DBUILD_GUI=On
173+
174+
- name: Run CMake on ubuntu (no GUI)
175+
if: matrix.os == 'ubuntu-22.04'
176+
run: |
177+
cmake -S . -B cmake.output_nogui -G "Unix Makefiles" -DBUILD_GUI=Off
178+
179+
- name: Run CMake on ubuntu (no GUI / with triage)
180+
if: matrix.os == 'ubuntu-22.04'
181+
run: |
182+
# cannot build triage without GUI
183+
if cmake -S . -B cmake.output_nogui_triage -G "Unix Makefiles" -DBUILD_GUI=Off -DBUILD_TRIAGE=On; then
184+
exit 1
185+
else
186+
exit 0
187+
fi
188+
189+
- name: Run CMake on ubuntu (no CLI / no GUI)
190+
if: matrix.os == 'ubuntu-22.04'
191+
run: |
192+
cmake -S . -B cmake.output_nocli_nogui -G "Unix Makefiles" -DBUILD_GUI=Off
193+
154194
build_uchar:
155195

156196
strategy:
@@ -179,11 +219,11 @@ jobs:
179219
- name: Build with Unsigned char
180220
run: |
181221
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
182-
make -j$(nproc) CXXFLAGS=-funsigned-char testrunner
222+
make -j$(nproc) CXXOPTS=-funsigned-char testrunner
183223
184224
- name: Test with Unsigned char
185225
run: |
186-
./testrunner TestSymbolDatabase
226+
./testrunner
187227
188228
build_mathlib:
189229

@@ -213,11 +253,11 @@ jobs:
213253
- name: Build with TEST_MATHLIB_VALUE
214254
run: |
215255
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
216-
make -j$(nproc) CPPFLAGS=-DTEST_MATHLIB_VALUE all
256+
make -j$(nproc) CPPOPTS=-DTEST_MATHLIB_VALUE all
217257
218258
- name: Test with TEST_MATHLIB_VALUE
219259
run: |
220-
make -j$(nproc) CPPFLAGS=-DTEST_MATHLIB_VALUE check
260+
make -j$(nproc) CPPOPTS=-DTEST_MATHLIB_VALUE check
221261
222262
check_nonneg:
223263

@@ -241,7 +281,7 @@ jobs:
241281
242282
- name: Check syntax with NONNEG
243283
run: |
244-
ls lib/*.cpp | xargs -n 1 -P $(nproc) g++ -fsyntax-only -std=c++0x -Ilib -Iexternals -Iexternals/picojson -Iexternals/simplecpp -Iexternals/tinyxml2 -DNONNEG
284+
make check-nonneg
245285
246286
build_cmake_boost:
247287

@@ -311,9 +351,11 @@ jobs:
311351
os: [ubuntu-22.04, macos-13, macos-15]
312352
include:
313353
- xdist_n: auto
314-
# FIXME: test_color_tty fails with xdist
354+
# FIXME: test_color_tty fails with xdist - see #13278
315355
- os: macos-13
316356
xdist_n: '1'
357+
- os: macos-15
358+
xdist_n: '1'
317359
fail-fast: false # Prefer quick result
318360

319361
runs-on: ${{ matrix.os }}
@@ -569,11 +611,11 @@ jobs:
569611
run: |
570612
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
571613
# compile with verification and ast matchers
572-
make -j$(nproc) -s CPPFLAGS="-DCHECK_INTERNAL" CXXFLAGS="-g -O2 -w -DHAVE_BOOST" MATCHCOMPILER=yes VERIFY=1
614+
make -j$(nproc) -s CXXOPTS="-g -O2 -w" CPPOPTS="-DCHECK_INTERNAL -DHAVE_BOOST" MATCHCOMPILER=yes VERIFY=1
573615
574616
- name: CMake
575617
run: |
576-
cmake -S . -B cmake.output -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DUSE_MATCHCOMPILER=Verify -DENABLE_CHECK_INTERNAL=On -DCPPCHK_GLIBCXX_DEBUG=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DDISABLE_DMAKE=On
618+
cmake -S . -B cmake.output -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DUSE_MATCHCOMPILER=Verify -DENABLE_CHECK_INTERNAL=On -DCPPCHK_GLIBCXX_DEBUG=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DDISABLE_DMAKE=On
577619
578620
- name: Generate dependencies
579621
run: |

.github/workflows/asan.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14
5454
wget https://apt.llvm.org/llvm.sh
5555
chmod +x llvm.sh
56-
sudo ./llvm.sh 20
56+
sudo ./llvm.sh 21
5757
5858
- name: Install Qt ${{ env.QT_VERSION }}
5959
uses: jurplel/install-qt-action@v4
@@ -74,10 +74,10 @@ jobs:
7474
# TODO: disable all warnings
7575
- name: CMake
7676
run: |
77-
cmake -S . -B cmake.output -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DUSE_MATCHCOMPILER=Verify -DANALYZE_ADDRESS=On -DENABLE_CHECK_INTERNAL=On -DUSE_BOOST=On -DCPPCHK_GLIBCXX_DEBUG=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DDISABLE_DMAKE=On -DFILESDIR= -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
77+
cmake -S . -B cmake.output -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DUSE_MATCHCOMPILER=Verify -DANALYZE_ADDRESS=On -DENABLE_CHECK_INTERNAL=On -DUSE_BOOST=On -DCPPCHK_GLIBCXX_DEBUG=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DDISABLE_DMAKE=On -DFILESDIR= -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
7878
env:
79-
CC: clang-20
80-
CXX: clang++-20
79+
CC: clang-21
80+
CXX: clang++-21
8181

8282
- name: Build cppcheck
8383
run: |

.github/workflows/clang-tidy.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ jobs:
4343
sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14
4444
wget https://apt.llvm.org/llvm.sh
4545
chmod +x llvm.sh
46-
sudo ./llvm.sh 20
47-
sudo apt-get install -y clang-tidy-20
46+
sudo ./llvm.sh 21
47+
sudo apt-get install -y clang-tidy-21
4848
4949
- name: Install Qt ${{ env.QT_VERSION }}
5050
uses: jurplel/install-qt-action@v4
@@ -57,14 +57,14 @@ jobs:
5757

5858
- name: Verify clang-tidy configuration
5959
run: |
60-
clang-tidy-20 --verify-config
60+
clang-tidy-21 --verify-config
6161
6262
- name: Prepare CMake
6363
run: |
6464
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCPPCHK_GLIBCXX_DEBUG=Off -DWARNINGS_ARE_ERRORS=On
6565
env:
66-
CC: clang-20
67-
CXX: clang++-20
66+
CC: clang-21
67+
CXX: clang++-21
6868

6969
- name: Prepare CMake dependencies
7070
run: |

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Compile instrumented
4444
run: |
4545
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
46-
make -j$(nproc) all CXXFLAGS="-g -fprofile-arcs -ftest-coverage" HAVE_RULES=yes
46+
make -j$(nproc) all CXXOPTS="-g -fprofile-arcs -ftest-coverage" HAVE_RULES=yes
4747
4848
- name: Run instrumented tests
4949
run: |

.github/workflows/cppcheck-premium.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
tar xzvf cppcheckpremium.tar.gz
5050
mv cppcheckpremium-devdrop-20250713 cppcheckpremium
5151
# Overwrite cppcheck binary
52-
make -j$(nproc) CXXFLAGS=-O2 MATCHCOMPILER=yes
52+
make -j$(nproc) CXXOPTS=-O2 MATCHCOMPILER=yes
5353
cp cppcheck cppcheckpremium/
5454
5555
- name: Generate a license file

.github/workflows/iwyu.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,13 @@ jobs:
215215
sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14
216216
wget https://apt.llvm.org/llvm.sh
217217
chmod +x llvm.sh
218-
sudo ./llvm.sh 20
219-
sudo apt-get install -y clang-tools-20
218+
sudo ./llvm.sh 21
219+
sudo apt-get install -y clang-tools-21
220220
221221
- name: Install libc++
222222
if: matrix.stdlib == 'libc++'
223223
run: |
224-
sudo apt-get install -y libc++-20-dev
224+
sudo apt-get install -y libc++-21-dev
225225
226226
- name: Install Qt ${{ env.QT_VERSION }}
227227
uses: jurplel/install-qt-action@v4
@@ -237,8 +237,8 @@ jobs:
237237
# TODO: why does it build dmake in the next step?
238238
cmake -S . -B cmake.output -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCPPCHK_GLIBCXX_DEBUG=Off -DUSE_MATCHCOMPILER=Off -DEXTERNALS_AS_SYSTEM=On -DUSE_LIBCXX=${{ matrix.use_libcxx }}
239239
env:
240-
CC: clang-20
241-
CXX: clang++-20
240+
CC: clang-21
241+
CXX: clang++-21
242242

243243
- name: Prepare CMake dependencies
244244
run: |
@@ -255,7 +255,7 @@ jobs:
255255
- name: clang-include-cleaner
256256
run: |
257257
# TODO: run multi-threaded
258-
find $PWD/cli $PWD/lib $PWD/test $PWD/gui -maxdepth 1 -name "*.cpp" | xargs -t -n 1 clang-include-cleaner-20 --print=changes --extra-arg=-w --extra-arg=-stdlib=${{ matrix.stdlib }} -p cmake.output > clang-include-cleaner.log 2>&1
258+
find $PWD/cli $PWD/lib $PWD/test $PWD/gui -maxdepth 1 -name "*.cpp" | xargs -t -n 1 clang-include-cleaner-21 --print=changes --extra-arg=-w --extra-arg=-stdlib=${{ matrix.stdlib }} -p cmake.output > clang-include-cleaner.log 2>&1
259259
260260
- uses: actions/upload-artifact@v4
261261
if: success() || failure()

.github/workflows/release-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
run: |
6969
:: TODO: enable rules?
7070
:: specify Release build so matchcompiler is used
71-
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DBUILD_ONLINE_HELP=On || exit /b !errorlevel!
71+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_ONLINE_HELP=On || exit /b !errorlevel!
7272
cmake --build build --target cppcheck-gui --config Release || exit /b !errorlevel!
7373
7474
# TODO: package PDBs

0 commit comments

Comments
 (0)