File tree Expand file tree Collapse file tree 10 files changed +31
-20
lines changed Expand file tree Collapse file tree 10 files changed +31
-20
lines changed Original file line number Diff line number Diff line change 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 19
56+ sudo ./llvm.sh 20
5757
5858 - name : Install Qt ${{ env.QT_VERSION }}
5959 uses : jurplel/install-qt-action@v4
7575 run : |
7676 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
7777 env :
78- CC : clang-19
79- CXX : clang++-19
78+ CC : clang-20
79+ CXX : clang++-20
8080
8181 - name : Build cppcheck
8282 run : |
Original file line number Diff line number Diff line change 4040 sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14
4141 wget https://apt.llvm.org/llvm.sh
4242 chmod +x llvm.sh
43- sudo ./llvm.sh 19
44- sudo apt-get install -y clang-tidy-19
43+ sudo ./llvm.sh 20
44+ sudo apt-get install -y clang-tidy-20
4545
4646 - name : Install Qt ${{ env.QT_VERSION }}
4747 uses : jurplel/install-qt-action@v4
@@ -53,14 +53,14 @@ jobs:
5353
5454 - name : Verify clang-tidy configuration
5555 run : |
56- clang-tidy-19 --verify-config
56+ clang-tidy-20 --verify-config
5757
5858 - name : Prepare CMake
5959 run : |
6060 cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCPPCHK_GLIBCXX_DEBUG=Off -DWARNINGS_ARE_ERRORS=On
6161 env :
62- CC : clang-19
63- CXX : clang++-19
62+ CC : clang-20
63+ CXX : clang++-20
6464
6565 - name : Prepare CMake dependencies
6666 run : |
Original file line number Diff line number Diff line change @@ -182,8 +182,8 @@ jobs:
182182 sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14
183183 wget https://apt.llvm.org/llvm.sh
184184 chmod +x llvm.sh
185- sudo ./llvm.sh 19
186- sudo apt-get install -y clang-tools-19
185+ sudo ./llvm.sh 20
186+ sudo apt-get install -y clang-tools-20
187187
188188 - name : Install libc++
189189 if : matrix.stdlib == 'libc++'
@@ -203,8 +203,8 @@ jobs:
203203 # TODO: why does it build dmake in the next step?
204204 cmake -S . -B cmake.output -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=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 }}
205205 env :
206- CC : clang-19
207- CXX : clang++-19
206+ CC : clang-20
207+ CXX : clang++-20
208208
209209 - name : Prepare CMake dependencies
210210 run : |
@@ -221,7 +221,7 @@ jobs:
221221 - name : clang-include-cleaner
222222 run : |
223223 # TODO: run multi-threaded
224- find $PWD/cli $PWD/lib $PWD/test $PWD/gui -maxdepth 1 -name "*.cpp" | xargs -t -n 1 clang-include-cleaner-19 --print=changes --extra-arg=-w --extra-arg=-stdlib=${{ matrix.stdlib }} -p cmake.output > clang-include-cleaner.log 2>&1
224+ 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
225225
226226 - uses : actions/upload-artifact@v4
227227 if : success() || failure()
Original file line number Diff line number Diff line change 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 19
56+ sudo ./llvm.sh 20
5757
5858 - name : Install Qt ${{ env.QT_VERSION }}
5959 uses : jurplel/install-qt-action@v4
7474 run : |
7575 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_THREAD=On -DENABLE_CHECK_INTERNAL=On -DUSE_BOOST=On -DCPPCHK_GLIBCXX_DEBUG=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=Off -DDISABLE_DMAKE=On -DFILESDIR= -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
7676 env :
77- CC : clang-19
78- CXX : clang++-19
77+ CC : clang-20
78+ CXX : clang++-20
7979
8080 - name : Build cppcheck
8181 run : |
Original file line number Diff line number Diff line change 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 19
56+ sudo ./llvm.sh 20
5757
5858 - name : Install Qt ${{ env.QT_VERSION }}
5959 uses : jurplel/install-qt-action@v4
7575 run : |
7676 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_UNDEFINED=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
7777 env :
78- CC : clang-19
79- CXX : clang++-19
78+ CC : clang-20
79+ CXX : clang++-20
8080
8181 - name : Build cppcheck
8282 run : |
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ if(NOT CMAKE_DISABLE_PRECOMPILE_HEADERS)
1111 message (STATUS "Cannot use non-Clang compiler with clang-tidy when precompiled headers are enabled - skipping 'run-clang-tidy' target generation" )
1212 endif ()
1313else ()
14- set (RUN_CLANG_TIDY_NAMES run-clang-tidy run-clang-tidy-19 run-clang-tidy-18 run-clang-tidy-17 run-clang-tidy-16 run-clang-tidy-15 run-clang-tidy-14 run-clang-tidy-13 run-clang-tidy-12 run-clang-tidy-11 run-clang-tidy-10 run-clang-tidy-9 run-clang-tidy-8)
14+ set (RUN_CLANG_TIDY_NAMES run-clang-tidy run-clang-tidy-20 run-clang-tidy- 19 run-clang-tidy-18 run-clang-tidy-17 run-clang-tidy-16 run-clang-tidy-15 run-clang-tidy-14 run-clang-tidy-13 run-clang-tidy-12 run-clang-tidy-11 run-clang-tidy-10 run-clang-tidy-9 run-clang-tidy-8)
1515endif ()
1616
1717if (RUN_CLANG_TIDY_NAMES)
Original file line number Diff line number Diff line change @@ -31,3 +31,9 @@ if(ANALYZE_UNDEFINED)
3131 set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=nullability" )
3232 endif ()
3333endif ()
34+
35+ if (ANALYZE_TYPE)
36+ add_compile_options (-fsanitize=type )
37+
38+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=type" )
39+ endif ()
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ endif()
2020option (ANALYZE_ADDRESS "Build with AddressSanitzer to detect memory error" OFF )
2121option (ANALYZE_THREAD "Build with ThreadSanitizer to detect data races" OFF )
2222option (ANALYZE_UNDEFINED "Build with UndefinedBehaviorSanitizer to detect undefined behavior" OFF )
23+ option (ANALYZE_TYPE "Build with TypeSanitizer to detect aliasing issues" OFF )
2324
2425option (WARNINGS_ARE_ERRORS "Treat warnings as errors" OFF )
2526if (WARNINGS_ARE_ERRORS)
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ message(STATUS "ANALYZE_MEMORY = ${ANALYZE_MEMORY}")
3030message (STATUS "ANALYZE_ADDRESS = ${ANALYZE_ADDRESS} " )
3131message (STATUS "ANALYZE_THREAD = ${ANALYZE_THREAD} " )
3232message (STATUS "ANALYZE_UNDEFINED = ${ANALYZE_UNDEFINED} " )
33+ message (STATUS "ANALYZE_TYPE = ${ANALYZE_TYPE} " )
3334message (STATUS )
3435message (STATUS "WARNINGS_ARE_ERRORS = ${WARNINGS_ARE_ERRORS} " )
3536message (STATUS "EXTERNALS_AS_SYSTEM = ${EXTERNALS_AS_SYSTEM} " )
Original file line number Diff line number Diff line change @@ -157,6 +157,9 @@ Library::Library(const Library& other)
157157
158158Library& Library::operator =(const Library& other) &
159159{
160+ if (this == &other)
161+ return *this ;
162+
160163 mData .reset (new LibraryData (*other.mData ));
161164 return *this ;
162165}
You can’t perform that action at this time.
0 commit comments