Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
da16854
clang_tidy.cmake: added `run-clang-tidy-21` to binaries to look for
firewave Jan 30, 2025
ca7b699
updated CI to Clang 21
firewave Jan 30, 2025
459deca
clangimport.cpp: fixed `performance-move-const-arg` clang-tidy warning
firewave Mar 17, 2025
8d14347
processexecutor.cpp: fixed `bugprone-unintended-char-ostream-output` …
firewave Mar 27, 2025
5db41d7
clang_tidy.cmake: enabled `clang-analyzer-optin.cplusplus.Uninitializ…
firewave Mar 28, 2025
b8b5ef1
compileroptions.cmake: disabled `-Wnrvo` for Clang
firewave May 31, 2025
91074b1
disabled `-Wms-bitfield-padding` Clang warning for now
firewave May 31, 2025
600ec66
fixture.h: suppress acceptable `bugprone-unintended-char-ostream-outp…
firewave May 31, 2025
d04bbf3
configured `modernize-use-trailing-return-type` to report it for lamb…
firewave Jun 6, 2025
2604e2d
fixed `readability-math-missing-parentheses` clang-tidy warnings
firewave Jun 13, 2025
c5b74bb
disabled `portability-avoid-pragma-once` clang-tidy warning
firewave Jun 17, 2025
673e49f
disabled `readability-use-concise-preprocessor-directives` clang-tidy…
firewave Aug 4, 2025
0064865
disabled `modernize-use-scoped-lock` clang-tidy warning
firewave Aug 4, 2025
ff2f065
valueflow.cpp: fixed `readability-math-missing-parentheses` clang-tid…
firewave Aug 4, 2025
30b902f
fixed `-Wmissing-noreturn` Clang warnings
firewave Aug 4, 2025
b94e53f
fixed `misc-confusable-identifiers` clang-tidy warnings
firewave Aug 4, 2025
6625d34
cppchecklibrarydata.cpp: fixed `-Wunreachable-code` compiler warnings
firewave Aug 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ Checks: >
-modernize-type-traits,
-modernize-use-designated-initializers,
-modernize-use-nodiscard,
-modernize-use-scoped-lock,
-modernize-use-trailing-return-type,
-performance-avoid-endl,
-performance-inefficient-string-concatenation,
-performance-no-automatic-move,
-portability-avoid-pragma-once,
-portability-simd-intrinsics,
-portability-std-allocator-const,
-readability-avoid-nested-conditional-operator,
Expand All @@ -68,7 +70,8 @@ Checks: >
-readability-isolate-declaration,
-readability-magic-numbers,
-readability-suspicious-call-argument,
-readability-uppercase-literal-suffix
-readability-uppercase-literal-suffix,
-readability-use-concise-preprocessor-directives
WarningsAsErrors: '*'
HeaderFilterRegex: '(cli|gui|frontend|lib|oss-fuzz|test|triage)\/[a-z_]+\.h'
ExcludeHeaderFilterRegex: 'ui_.*.h'
Expand All @@ -77,3 +80,5 @@ CheckOptions:
value: '1'
- key: readability-simplify-boolean-expr.SimplifyDeMorgan
value: '0'
- key: modernize-use-trailing-return-type.TransformFunctions
value: false
6 changes: 3 additions & 3 deletions .github/workflows/asan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 20
sudo ./llvm.sh 21

- name: Install Qt ${{ env.QT_VERSION }}
uses: jurplel/install-qt-action@v4
Expand All @@ -76,8 +76,8 @@ jobs:
run: |
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
env:
CC: clang-20
CXX: clang++-20
CC: clang-21
CXX: clang++-21

- name: Build cppcheck
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 20
sudo apt-get install -y clang-tidy-20
sudo ./llvm.sh 21
sudo apt-get install -y clang-tidy-21

- name: Install Qt ${{ env.QT_VERSION }}
uses: jurplel/install-qt-action@v4
Expand All @@ -57,14 +57,14 @@ jobs:

- name: Verify clang-tidy configuration
run: |
clang-tidy-20 --verify-config
clang-tidy-21 --verify-config

- name: Prepare CMake
run: |
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
env:
CC: clang-20
CXX: clang++-20
CC: clang-21
CXX: clang++-21

- name: Prepare CMake dependencies
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/iwyu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,13 @@ jobs:
sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 20
sudo apt-get install -y clang-tools-20
sudo ./llvm.sh 21
sudo apt-get install -y clang-tools-21

- name: Install libc++
if: matrix.stdlib == 'libc++'
run: |
sudo apt-get install -y libc++-20-dev
sudo apt-get install -y libc++-21-dev

- name: Install Qt ${{ env.QT_VERSION }}
uses: jurplel/install-qt-action@v4
Expand All @@ -237,8 +237,8 @@ jobs:
# TODO: why does it build dmake in the next step?
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 }}
env:
CC: clang-20
CXX: clang++-20
CC: clang-21
CXX: clang++-21

- name: Prepare CMake dependencies
run: |
Expand All @@ -255,7 +255,7 @@ jobs:
- name: clang-include-cleaner
run: |
# TODO: run multi-threaded
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
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

- uses: actions/upload-artifact@v4
if: success() || failure()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tsan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 20
sudo ./llvm.sh 21

- name: Install Qt ${{ env.QT_VERSION }}
uses: jurplel/install-qt-action@v4
Expand All @@ -75,8 +75,8 @@ jobs:
run: |
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
env:
CC: clang-20
CXX: clang++-20
CC: clang-21
CXX: clang++-21

- name: Build cppcheck
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ubsan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 20
sudo ./llvm.sh 21

- name: Install Qt ${{ env.QT_VERSION }}
uses: jurplel/install-qt-action@v4
Expand All @@ -76,8 +76,8 @@ jobs:
run: |
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
env:
CC: clang-20
CXX: clang++-20
CC: clang-21
CXX: clang++-21

- name: Build cppcheck
run: |
Expand Down
13 changes: 11 additions & 2 deletions clang-tidy.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ These are coding guidelines we do not follow. Some of the checks might be explic

`readability-braces-around-statements`<br/>
`readability-isolate-declaration`<br/>
`modernize-use-trailing-return-type`<br/>
`readability-uppercase-literal-suffix`<br/>
`readability-identifier-length`<br/>

Expand Down Expand Up @@ -112,7 +111,11 @@ Also reports a false positive about templates which deduce the array length: htt

`misc-include-cleaner`<br/>

We run this separately via `clang-include-cleaner` in the `iwyu.yml` workflow as the findings of the include checkers still need to be reviewed manually before applying them.
We run this separately via `clang-include-cleaner` in the `iwyu.yml` workflow as the findings of the include checkers still need to be reviewed manually before applying them.

`readability-use-concise-preprocessor-directives`<br/>

Does not improve the readability.

`bugprone-branch-clone`<br/>
`modernize-return-braced-init-list`<br/>
Expand All @@ -126,6 +129,7 @@ We run this separately via `clang-include-cleaner` in the `iwyu.yml` workflow as
`readability-avoid-nested-conditional-operator`<br/>
`modernize-use-designated-initializers`<br/>
`readability-enum-initial-value`<br/>
`modernize-use-trailing-return-type`<br/>

To be evaluated (need to remove exclusion).

Expand All @@ -144,9 +148,14 @@ To be evaluated (need to enable explicitly).

`modernize-type-traits`<br/>
`modernize-use-nodiscard`<br/>
`modernize-use-scoped-lock`<br/>

These apply to codebases which use later standards then C++11 (C++17 is used when building with Qt6) so we cannot simply apply them.

`portability-avoid-pragma-once`<br/>

We are not interested in this.

### Disabled for performance reasons

`portability-std-allocator-const`<br/>
Expand Down
4 changes: 2 additions & 2 deletions cli/processexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ namespace {
const ssize_t bytes_written = write(mWpipe, data, to_write);
if (bytes_written <= 0) {
const int err = errno;
std::cerr << "#### ThreadExecutor::writeToPipeInternal() error for type " << type << ": " << std::strerror(err) << std::endl;
std::cerr << "#### ThreadExecutor::writeToPipeInternal() error for type " << static_cast<unsigned char>(type) << ": " << std::strerror(err) << std::endl;
std::exit(EXIT_FAILURE);
}
// TODO: write until everything is written
if (bytes_written != to_write) {
std::cerr << "#### ThreadExecutor::writeToPipeInternal() error for type " << type << ": insufficient data written (expected: " << to_write << " / got: " << bytes_written << ")" << std::endl;
std::cerr << "#### ThreadExecutor::writeToPipeInternal() error for type " << static_cast<unsigned char>(type) << ": insufficient data written (expected: " << to_write << " / got: " << bytes_written << ")" << std::endl;
std::exit(EXIT_FAILURE);
}
}
Expand Down
2 changes: 1 addition & 1 deletion cli/signalhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
#ifdef __USE_DYNAMIC_STACK_SIZE
static constexpr size_t MYSTACKSIZE = (16*1024)+32768; // wild guess about a reasonable buffer
#else
static constexpr size_t MYSTACKSIZE = 16*1024+SIGSTKSZ; // wild guess about a reasonable buffer
static constexpr size_t MYSTACKSIZE = (16*1024)+SIGSTKSZ; // wild guess about a reasonable buffer
#endif
static char mytstack[MYSTACKSIZE]= {0}; // alternative stack for signal handler
static bool bStackBelowHeap=false; // lame attempt to locate heap vs. stack address space. See CppCheckExecutor::check_wrapper()
Expand Down
5 changes: 2 additions & 3 deletions cmake/clang_tidy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if(NOT CMAKE_DISABLE_PRECOMPILE_HEADERS)
message(STATUS "Cannot use non-Clang compiler with clang-tidy when precompiled headers are enabled - skipping 'run-clang-tidy'/'run-clang-tidy-csa' target generation")
endif()
else()
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)
set(RUN_CLANG_TIDY_NAMES run-clang-tidy run-clang-tidy-21 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)
endif()

if(RUN_CLANG_TIDY_NAMES)
Expand All @@ -32,10 +32,9 @@ if(RUN_CLANG_TIDY_NAMES)
# clang-analyzer-cplusplus.NewDelete
# clang-analyzer-core.NullDereference
# clang-analyzer-unix.Stream
# clang-analyzer-optin.cplusplus.UninitializedObject - false positives with unnamed fields - see https://github.com/llvm/llvm-project/issues/132001
# clang-analyzer-alpha.clone.CloneChecker
# clang-analyzer-alpha.webkit.* - we are not interested in these
set(CLANG_TIDY_CSA_CONFIG "-config={InheritParentConfig: true, Checks: '-*,clang-analyzer-*,-clang-analyzer-core.CallAndMessage,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-cplusplus.NewDelete,-clang-analyzer-core.NullDereference,-clang-analyzer-unix.Stream,-clang-analyzer-optin.cplusplus.UninitializedObject,-clang-analyzer-alpha.clone.CloneChecker,-clang-analyzer-alpha.webkit.*'}")
set(CLANG_TIDY_CSA_CONFIG "-config={InheritParentConfig: true, Checks: '-*,clang-analyzer-*,-clang-analyzer-core.CallAndMessage,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-cplusplus.NewDelete,-clang-analyzer-core.NullDereference,-clang-analyzer-unix.Stream,-clang-analyzer-alpha.clone.CloneChecker,-clang-analyzer-alpha.webkit.*'}")
if (ENABLE_CSA_ALPHA)
set(CLANG_TIDY_CSA_ALPHA_OPTS "-allow-enabling-alpha-checkers" "-extra-arg=-Xclang" "-extra-arg=-analyzer-config" "-extra-arg=-Xclang" "-extra-arg=aggressive-binary-operation-simplification=true")
endif()
Expand Down
2 changes: 2 additions & 0 deletions cmake/compileroptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wno-disabled-macro-expansion)
add_compile_options_safe(-Wno-bitwise-instead-of-logical)
add_compile_options(-Wno-sign-compare)
add_compile_options_safe(-Wno-ms-bitfield-padding) # TODO: fix this

# these cannot be fixed properly without adopting later C++ standards
add_compile_options_safe(-Wno-unsafe-buffer-usage)
Expand All @@ -130,6 +131,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")

# can only be partially addressed
add_compile_options(-Wno-padded)
add_compile_options_safe(-Wno-nrvo)

# no need for C++98 compatibility
add_compile_options(-Wno-c++98-compat)
Expand Down
4 changes: 2 additions & 2 deletions gui/cppchecklibrarydata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
const unsigned int CppcheckLibraryData::Function::Arg::ANY = ~0U;
const unsigned int CppcheckLibraryData::Function::Arg::VARIADIC = ~1U;

static std::string unhandledElement(const QXmlStreamReader &xmlReader)
NORETURN static void unhandledElement(const QXmlStreamReader &xmlReader)
{
throw std::runtime_error(QObject::tr("line %1: Unhandled element %2").arg(xmlReader.lineNumber()).arg(xmlReader.name().toString()).toStdString());
}

static std::string mandatoryAttibuteMissing(const QXmlStreamReader &xmlReader, const QString& attributeName)
NORETURN static void mandatoryAttibuteMissing(const QXmlStreamReader &xmlReader, const QString& attributeName)
Comment on lines -36 to +41
Copy link
Copy Markdown
Collaborator Author

@firewave firewave Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return values were never used and now also caused a confusing -Wunreachable-code warning in each invocation - see llvm/llvm-project#152477.

{
throw std::runtime_error(QObject::tr("line %1: Mandatory attribute '%2' missing in '%3'")
.arg(xmlReader.lineNumber())
Expand Down
6 changes: 3 additions & 3 deletions gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2244,12 +2244,12 @@ static int getVersion(const QString& nameWithVersion) {
}
else if (c == '.') {
++dot;
ret = ret * 1000 + v;
ret = (ret * 1000) + v;
v = 0;
} else if (c >= '0' && c <= '9')
v = v * 10 + (c.toLatin1() - '0');
v = (v * 10) + (c.toLatin1() - '0');
}
ret = ret * 1000 + v;
ret = (ret * 1000) + v;
while (dot < 2) {
++dot;
ret *= 1000;
Expand Down
2 changes: 1 addition & 1 deletion lib/clangimport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ Token *clangimport::AstNode::createTokens(TokenList &tokenList)
--addrIndex;
const std::string addr = mExtTokens[addrIndex];
std::string name = unquote(getSpelling());
Token *reftok = addtoken(tokenList, name.empty() ? "<NoName>" : std::move(name));
Token *reftok = addtoken(tokenList, name.empty() ? "<NoName>" : name);
mData->ref(addr, reftok);
return reftok;
}
Expand Down
6 changes: 3 additions & 3 deletions lib/valueflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ size_t ValueFlow::getSizeOf(const ValueType &vt, const Settings &settings, Accur
if (currentBitfieldAlloc == 0) {
bits = n * charBit;
} else {
bits = currentBitfieldAlloc * charBit - currentBitCount;
bits = (currentBitfieldAlloc * charBit) - currentBitCount;
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ludviggunne This was introduced in 326a930.

}
}
if (bits > 0) {
Expand All @@ -570,7 +570,7 @@ size_t ValueFlow::getSizeOf(const ValueType &vt, const Settings &settings, Accur
n *= dim;
size_t padding = (a - (total % a)) % a;
if (currentBitCount > 0) {
bool fitsInBitfield = currentBitCount + n * charBit <= currentBitfieldAlloc * charBit;
bool fitsInBitfield = currentBitCount + (n * charBit) <= currentBitfieldAlloc * charBit;
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ludviggunne This was introduced in 7504064.

bool isAligned = currentBitCount % (charBit * a) == 0;
if (vt2.isIntegral() && fitsInBitfield && isAligned) {
currentBitCount += charBit * n;
Expand Down Expand Up @@ -5857,7 +5857,7 @@ static void valueFlowSubFunction(const TokenList& tokenlist,
v.errorPath.emplace_back(argtok,
"Calling function '" + calledFunction->name() + "', " + nr + " argument '" +
argtok->expressionString() + "' value is " + v.infoString());
v.path = 256 * v.path + id % 256;
v.path = (256 * v.path) + (id % 256);
// Change scope of lifetime values
if (v.isLifetimeValue())
v.lifetimeScope = ValueFlow::Value::LifetimeScope::SubFunction;
Expand Down
2 changes: 2 additions & 0 deletions test/fixture.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ class TestFixture : public ErrorLogger {
void assertEquals(const char* const filename, const unsigned int linenr, const T& expected, const T& actual, const std::string& msg = "") const {
if (expected != actual) {
std::ostringstream expectedStr;
// NOLINTNEXTLINE(bugprone-unintended-char-ostream-output) - chars being treated as integers is acceptable here
expectedStr << expected;
std::ostringstream actualStr;
// NOLINTNEXTLINE(bugprone-unintended-char-ostream-output) - chars being treated as integers is acceptable here
actualStr << actual;

assertFailure(filename, linenr, expectedStr.str(), actualStr.str(), msg);
Expand Down
2 changes: 1 addition & 1 deletion test/testexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class DummyExecutor : public Executor
: Executor(files, fileSettings, settings, suppressions, errorLogger)
{}

unsigned int check() override
NORETURN unsigned int check() override
{
throw std::runtime_error("not implemented");
}
Expand Down
Loading