Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9b9dd99
Update tokenize.cpp
chrchr-github Oct 22, 2026
aa91b3a
Update testtokenize.cpp
chrchr-github Oct 22, 2026
b410241
Update testtokenize.cpp [skip ci]
chrchr-github Oct 26, 2026
cf6eb15
Update tokenlist.cpp [skip ci]
chrchr-github Oct 26, 2026
bb851af
Update tokenize.cpp
chrchr-github Oct 26, 2026
33f15a2
Update tokenize.cpp
chrchr-github Oct 26, 2026
c10d38f
Update tokenize.cpp
chrchr-github Oct 26, 2026
796e592
Fix #15132 build dir: cached results are discarded on the second run …
wjakobsson Oct 23, 2026
bccafc8
Fix #14893 recheck removes unselected files results (#8699)
wjakobsson Oct 23, 2026
5a6c769
Fix #15063 FP knownArgument when there is function pointer call (#8935)
chrchr-github Oct 23, 2026
992ed7e
Fix #15134 (gui: tests through AT-SPI) (#8958)
danmar Oct 25, 2026
1bcfdab
Fix #15136 (gui: rewrite the online help) (#8959)
danmar Oct 25, 2026
9c049ac
Fix #12282 (Internal error: fail to parse 1.0e4931L) (#8952)
pduchi Oct 25, 2026
82b2d36
Fix #15133 (MSBuild System.Math: out-of-range double to long long cas…
Nussu06 Oct 25, 2026
ffb2670
Fix #15094 SymbolDatabase: Variable::isReference() is true for functi…
autoantwort Oct 25, 2026
4095821
htmlreport: escape message and file name in generated pages (#8920)
Nussu06 Oct 25, 2026
a41a173
Fix #15080 FP uninitMemberVarNoCtor for const and reference members (…
autoantwort Oct 25, 2026
722ef6a
Fix #15123: clang import: reject AST nodes without the ext tokens the…
Nussu06 Oct 25, 2026
15fafef
Fix #15124 FN bufferAccessOutOfBounds with wmemcpy() (#8951)
chrchr-github Oct 26, 2026
ee25fb2
strerror is now thread safe (#8648)
andrew-aitchison Oct 26, 2026
e922c9f
Fix #15114 FP shadowVariable (global variable prior to declaration) (…
chrchr-github Oct 26, 2026
2a82c2d
Fix #14769 FP unreadVariable with address in chained assignment of un…
chrchr-github Oct 26, 2026
2283e2a
Partial fix for #15048: shiftNegative for conditional value (#8884)
chrchr-github Oct 26, 2026
958534b
Remove valueFlowArrayBool() (redundancy with valueFlowImpossibleValue…
chrchr-github Oct 26, 2026
a777da7
Fix #15086 syntaxError for ternary with two inequalities (#8913)
chrchr-github Oct 26, 2026
ea886b2
Fix 15102: Make copy-constructible classes copyable (#8705)
pfultz2 Oct 27, 2026
03bb21e
Follow up 15102 Fix compilation error with RefThunk (#8972)
pfultz2 Oct 28, 2026
99a4e0d
Fix #15129: Improve matching performance for hash based suppressions …
ludviggunne Oct 28, 2026
6a3faa9
Fix #15105: False negative: uninitMemberVar with inherited constructo…
ludviggunne Oct 29, 2026
23ebc5e
Add test for #12468 (#8978)
chrchr-github Oct 29, 2026
761d613
Fix #15107: Exporting XML via GUI escapes special characters twice. (…
ludviggunne Oct 29, 2026
a05c30b
Fix
web-flow Nov 7, 2026
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
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Checks: >
-objc-*,
-openmp-*,
-zircon-*,
cppcoreguidelines-avoid-const-or-ref-data-members,
cppcoreguidelines-pro-type-static-cast-downcast,
cppcoreguidelines-rvalue-reference-param-not-moved,
google-explicit-constructor,
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
config: |
paths-ignore:
- gui/manualtest

- name: Build cppcheck
if: matrix.language == 'cpp'
Expand Down
270 changes: 137 additions & 133 deletions Makefile

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions addons/threadsafety.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
'race:stdin',
'race:stdout',
'race:streams',
'race:strerror',
'race:strsignal',
'race:strtok',
'race:tmbuf',
Expand Down Expand Up @@ -261,7 +260,6 @@
'siginterrupt',
'sleep',
'srand48',
'strerror',
'strsignal',
'strtok',
'tmpnam',
Expand Down
6 changes: 3 additions & 3 deletions cfg/gnu.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@
<not-bool/>
</arg>
</function>
<!-- https://man7.org/linux/man-pages/man3/mempcpy.3.html-->
<!-- https://man7.org/linux/man-pages/man3/wmempcpy.3.html -->
<!-- wchar_t *wmempcpy(wchar_t *restrict dest, const wchar_t *restrict src, size_t n);-->
<function name="wmempcpy">
<returnValue type="wchar_t *"/>
Expand All @@ -659,12 +659,12 @@
<not-overlapping-data ptr1-arg="1" ptr2-arg="2" size-arg="3"/>
<arg nr="1" direction="out">
<not-null/>
<minsize type="argvalue" arg="3"/>
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
</arg>
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<minsize type="argvalue" arg="3"/>
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
Expand Down
16 changes: 8 additions & 8 deletions cfg/std.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3928,7 +3928,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
<arg nr="1">
<not-null/>
<not-uninit/>
<minsize type="argvalue" arg="3"/>
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
Expand Down Expand Up @@ -3974,12 +3974,12 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<minsize type="argvalue" arg="3"/>
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
</arg>
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<minsize type="argvalue" arg="3"/>
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
Expand Down Expand Up @@ -4016,12 +4016,12 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
<not-overlapping-data ptr1-arg="1" ptr2-arg="2" count-arg="3"/>
<arg nr="1" direction="out">
<not-null/>
<minsize type="argvalue" arg="3"/>
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
</arg>
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<minsize type="argvalue" arg="3"/>
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
Expand Down Expand Up @@ -4081,13 +4081,13 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
<leak-ignore/>
<arg nr="1" direction="out">
<not-null/>
<minsize type="argvalue" arg="3"/>
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
</arg>
<arg nr="2">
<!-- TODO: direction? memory could be overwritten -->
<not-null/>
<not-uninit/>
<minsize type="argvalue" arg="3"/>
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
Expand Down Expand Up @@ -4141,7 +4141,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
<leak-ignore/>
<arg nr="1" direction="out">
<not-null/>
<minsize type="argvalue" arg="3"/>
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
Expand Down
1 change: 0 additions & 1 deletion clang-tidy.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ Does not improve the readability.
To be evaluated (need to remove exclusion).

`cppcoreguidelines-missing-std-forward`<br/>
`cppcoreguidelines-avoid-const-or-ref-data-members`<br/>
`cppcoreguidelines-macro-usage`<br/>
`cppcoreguidelines-pro-type-member-init`<br/>
`cppcoreguidelines-prefer-member-initializer`<br/>
Expand Down
8 changes: 5 additions & 3 deletions cli/cmdlineparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ class CmdLineParser {
* @param suppressions Suppressions instance that keeps the suppressions
*/
CmdLineParser(CmdLineLogger &logger, Settings &settings, Suppressions &suppressions);
CmdLineParser(const CmdLineParser &) = delete;
CmdLineParser &operator=(const CmdLineParser &) = delete;

enum class Result : std::uint8_t { Success, Exit, Fail };

Expand Down Expand Up @@ -152,10 +154,10 @@ class CmdLineParser {

void outputFormatOptionMixingError() const;

CmdLineLogger &mLogger;
CmdLineLogger& mLogger;

Settings &mSettings;
Suppressions &mSuppressions;
Settings& mSettings;
Suppressions& mSuppressions;

protected:
std::vector<std::string> mPathNames;
Expand Down
6 changes: 3 additions & 3 deletions cli/processexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ namespace {
{
if (suppr.isInline)
writeToPipe(REPORT_SUPPR_INLINE, suppressionToString(suppr));
else if (suppr.checked)
else if (suppr.checked && suppr.hash == 0)
writeToPipe(REPORT_SUPPR, suppressionToString(suppr));
}
}
Expand Down Expand Up @@ -172,8 +172,8 @@ namespace {
writeToPipeInternal(type, data.c_str(), len);
}

const int mWpipe;
const bool mDebug;
int mWpipe;
bool mDebug;
};
}

Expand Down
7 changes: 5 additions & 2 deletions gui/checkthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,15 @@ CheckThread::CheckThread(ThreadResult &result, int threadIndex)
void CheckThread::setSettings(const Settings &settings, std::shared_ptr<Suppressions> supprs)
{
mFiles.clear();
mFileSettings.clear();
mSettings = settings; // this is a copy
mSuppressions = std::move(supprs);
}

void CheckThread::analyseWholeProgram(const std::list<FileWithDetails> &files, const std::string& ctuInfo)
void CheckThread::analyseWholeProgram(const std::list<FileWithDetails> &files, const std::list<FileSettings> &fileSettings, const std::string& ctuInfo)
{
mFiles = files;
mFileSettings = fileSettings;
mAnalyseWholeProgram = true;
mCtuInfo = ctuInfo;
start();
Expand All @@ -136,8 +138,9 @@ void CheckThread::run()
std::string ctuInfo;
ctuInfo.swap(mCtuInfo);
qDebug() << "Whole program analysis";
cppcheck.analyseWholeProgram(mSettings.buildDir, mFiles, {}, ctuInfo);
cppcheck.analyseWholeProgram(mSettings.buildDir, mFiles, mFileSettings, ctuInfo);
mFiles.clear();
mFileSettings.clear();
emit done();
return;
}
Expand Down
8 changes: 5 additions & 3 deletions gui/checkthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ class CheckThread : public QThread {

/**
* @brief Run whole program analysis
* @param files All files
* @param ctuInfo Ctu info for addons
* @param files All files
* @param fileSettings All files of the project
* @param ctuInfo Ctu info for addons
*/
void analyseWholeProgram(const std::list<FileWithDetails> &files, const std::string& ctuInfo);
void analyseWholeProgram(const std::list<FileWithDetails> &files, const std::list<FileSettings> &fileSettings, const std::string& ctuInfo);

void setAddonsAndTools(const QStringList &addonsAndTools) {
mAddonsAndTools = addonsAndTools;
Expand Down Expand Up @@ -153,6 +154,7 @@ class CheckThread : public QThread {
bool isSuppressed(const SuppressionList::ErrorMessage &errorMessage) const;

std::list<FileWithDetails> mFiles;
std::list<FileSettings> mFileSettings;
bool mAnalyseWholeProgram{};
std::string mCtuInfo;
QStringList mAddonsAndTools;
Expand Down
Loading