File tree 10 files changed +31
-20
lines changed
10 files changed +31
-20
lines changed Original file line number Diff line number Diff line change 53
53
sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14
54
54
wget https://apt.llvm.org/llvm.sh
55
55
chmod +x llvm.sh
56
- sudo ./llvm.sh 19
56
+ sudo ./llvm.sh 20
57
57
58
58
- name : Install Qt ${{ env.QT_VERSION }}
59
59
uses : jurplel/install-qt-action@v4
75
75
run : |
76
76
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
77
env :
78
- CC : clang-19
79
- CXX : clang++-19
78
+ CC : clang-20
79
+ CXX : clang++-20
80
80
81
81
- name : Build cppcheck
82
82
run : |
Original file line number Diff line number Diff line change 40
40
sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14
41
41
wget https://apt.llvm.org/llvm.sh
42
42
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
45
45
46
46
- name : Install Qt ${{ env.QT_VERSION }}
47
47
uses : jurplel/install-qt-action@v4
@@ -53,14 +53,14 @@ jobs:
53
53
54
54
- name : Verify clang-tidy configuration
55
55
run : |
56
- clang-tidy-19 --verify-config
56
+ clang-tidy-20 --verify-config
57
57
58
58
- name : Prepare CMake
59
59
run : |
60
60
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
61
61
env :
62
- CC : clang-19
63
- CXX : clang++-19
62
+ CC : clang-20
63
+ CXX : clang++-20
64
64
65
65
- name : Prepare CMake dependencies
66
66
run : |
Original file line number Diff line number Diff line change @@ -182,8 +182,8 @@ jobs:
182
182
sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14
183
183
wget https://apt.llvm.org/llvm.sh
184
184
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
187
187
188
188
- name : Install libc++
189
189
if : matrix.stdlib == 'libc++'
@@ -203,8 +203,8 @@ jobs:
203
203
# TODO: why does it build dmake in the next step?
204
204
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 }}
205
205
env :
206
- CC : clang-19
207
- CXX : clang++-19
206
+ CC : clang-20
207
+ CXX : clang++-20
208
208
209
209
- name : Prepare CMake dependencies
210
210
run : |
@@ -221,7 +221,7 @@ jobs:
221
221
- name : clang-include-cleaner
222
222
run : |
223
223
# 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
225
225
226
226
- uses : actions/upload-artifact@v4
227
227
if : success() || failure()
Original file line number Diff line number Diff line change 53
53
sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14
54
54
wget https://apt.llvm.org/llvm.sh
55
55
chmod +x llvm.sh
56
- sudo ./llvm.sh 19
56
+ sudo ./llvm.sh 20
57
57
58
58
- name : Install Qt ${{ env.QT_VERSION }}
59
59
uses : jurplel/install-qt-action@v4
74
74
run : |
75
75
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
76
76
env :
77
- CC : clang-19
78
- CXX : clang++-19
77
+ CC : clang-20
78
+ CXX : clang++-20
79
79
80
80
- name : Build cppcheck
81
81
run : |
Original file line number Diff line number Diff line change 53
53
sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14
54
54
wget https://apt.llvm.org/llvm.sh
55
55
chmod +x llvm.sh
56
- sudo ./llvm.sh 19
56
+ sudo ./llvm.sh 20
57
57
58
58
- name : Install Qt ${{ env.QT_VERSION }}
59
59
uses : jurplel/install-qt-action@v4
75
75
run : |
76
76
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
77
77
env :
78
- CC : clang-19
79
- CXX : clang++-19
78
+ CC : clang-20
79
+ CXX : clang++-20
80
80
81
81
- name : Build cppcheck
82
82
run : |
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ if(NOT CMAKE_DISABLE_PRECOMPILE_HEADERS)
11
11
message (STATUS "Cannot use non-Clang compiler with clang-tidy when precompiled headers are enabled - skipping 'run-clang-tidy' target generation" )
12
12
endif ()
13
13
else ()
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)
15
15
endif ()
16
16
17
17
if (RUN_CLANG_TIDY_NAMES)
Original file line number Diff line number Diff line change @@ -31,3 +31,9 @@ if(ANALYZE_UNDEFINED)
31
31
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=nullability" )
32
32
endif ()
33
33
endif ()
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()
20
20
option (ANALYZE_ADDRESS "Build with AddressSanitzer to detect memory error" OFF )
21
21
option (ANALYZE_THREAD "Build with ThreadSanitizer to detect data races" OFF )
22
22
option (ANALYZE_UNDEFINED "Build with UndefinedBehaviorSanitizer to detect undefined behavior" OFF )
23
+ option (ANALYZE_TYPE "Build with TypeSanitizer to detect aliasing issues" OFF )
23
24
24
25
option (WARNINGS_ARE_ERRORS "Treat warnings as errors" OFF )
25
26
if (WARNINGS_ARE_ERRORS)
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ message(STATUS "ANALYZE_MEMORY = ${ANALYZE_MEMORY}")
30
30
message (STATUS "ANALYZE_ADDRESS = ${ANALYZE_ADDRESS} " )
31
31
message (STATUS "ANALYZE_THREAD = ${ANALYZE_THREAD} " )
32
32
message (STATUS "ANALYZE_UNDEFINED = ${ANALYZE_UNDEFINED} " )
33
+ message (STATUS "ANALYZE_TYPE = ${ANALYZE_TYPE} " )
33
34
message (STATUS )
34
35
message (STATUS "WARNINGS_ARE_ERRORS = ${WARNINGS_ARE_ERRORS} " )
35
36
message (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)
157
157
158
158
Library& Library::operator =(const Library& other) &
159
159
{
160
+ if (this == &other)
161
+ return *this ;
162
+
160
163
mData .reset (new LibraryData (*other.mData ));
161
164
return *this ;
162
165
}
You can’t perform that action at this time.
0 commit comments