Commit Graph

26486 Commits

Author SHA1 Message Date
chrchr-github 7d6683fb78
Fix FP knownConditionTrueFalse with container and brace init ()
* Fix  FP knownConditionTrueFalse with container and brace init

* Format

* Format

* Move to getInitListSize()
2022-12-02 22:07:08 +01:00
chrchr-github e4ee7cd59c
Get type from 'auto p = new ...' ()
* Fix  checkLibraryFunction treats "auto" as type

* Use utility function

* Get type from 'auto p = new ...'

* Fix merge
2022-12-02 20:28:14 +01:00
chrchr-github 9efedd6be9
Fix checkLibraryFunction treats "auto" as type ()
* Fix  checkLibraryFunction treats "auto" as type

* Use utility function
2022-12-02 07:21:33 +01:00
Daniel Marjamäki 883908b439 triage tool: handle reports when cppcheck is run on local packages 2022-12-01 06:34:23 +01:00
Oliver Stöneberg 67f46b7353
donate-cpu: avoid unnecessary build invocation for `main` () 2022-11-28 20:49:05 +01:00
chrchr-github 428f5016d4
Partial fix for (iscpp11init) ()
* Partial fix for  (iscpp11init)

* Improve fix

* Add fix
2022-11-27 09:26:46 +01:00
chrchr-github 665e4230f2
Fix FP returnDanglingLifetime, std::unique_ptr and implicit conversion to bool () 2022-11-27 09:24:19 +01:00
chrchr-github 4cb49013a7
Fix FP danglingTemporaryLifetime with std::string_view () 2022-11-27 09:22:55 +01:00
Rikard Falkeborn 52264b9c26
Fix nullpointer dereference with alignof ()
* checknullpointer: Don't report dereference with alignof

* Refactor unevaluating operator check in checknullpointer

Unifying these ensures the different checks treat the operators the
same.

* Fix FP with _Alignof and null pointer

Just like alignof, _Alignof does not evaluate its operand.

* CheckNullPointer: Also support compiler specific alignof

This fixes  which is about __alignof__. For good measure, also add
the microsoft extensions __alignof and _alignof.
2022-11-27 09:20:19 +01:00
Rikard Falkeborn 8465d901c8
Fix 11396, doublefree on munmap in if-statement () 2022-11-26 15:45:27 +01:00
Oliver Stöneberg 926bab9aba
CI-cygwin.yml: removed `x86` since it is no longer supported () 2022-11-25 23:13:28 +01:00
Oliver Stöneberg 01abf4c347
fixed macos build by manually installing `pcre` ()
* Makefile: bail out if `pcre-config` is missing

* CI-unixish.yml: install `pcre` for `macos` via `brew` since it suddenly disappeared from the runner images
2022-11-25 15:11:57 +01:00
Daniel Marjamäki c26a8fb4ce Fixed (Cant exclude file) 2022-11-24 13:45:57 +01:00
Stefan van Kessel a5c16af16d
Fix lambda capture template syntax error () 2022-11-23 20:15:10 +01:00
Oliver Stöneberg f6c2afa2ea
fix - donate-cpu: collect and avoid packages with no files to process () 2022-11-23 19:13:54 +01:00
chrchr-github 68acd77053
Fix FP ctuPointerArith with unknown buffer size () 2022-11-23 19:11:47 +01:00
DavidKorczynski 9e09ccca86
CI: Add CIFuzz integration () 2022-11-20 22:36:28 +01:00
Oliver Stöneberg a7dde5d470
donate-cpu: improved client stability by consistently re-trying remote calls / cleanups () 2022-11-20 14:47:19 +01:00
Oliver Stöneberg e235297a14
donate-cpu-server.py: improved error handling and reporting / some cleanups () 2022-11-20 13:10:43 +01:00
Daniel Marjamäki ad8c1e26f0 dump: output language to dumpfile 2022-11-20 12:30:09 +01:00
chrchr-github 9f50611a44
Fix FP doubleFree with goto () 2022-11-19 16:49:34 +01:00
Daniel Marjamäki 50241224d0 GUI: better exclude of files. the canonical Qt method might return absolute paths from relative input paths. 2022-11-19 14:11:40 +01:00
chrchr-github 80aa6dc1d9
Fix FP mismatchAllocDealloc with std::unique_ptr and custom deleter () 2022-11-18 19:45:25 +01:00
gerboengels 3fdba645a6
Improve fix for FP selfAssignment: lambda capture () 2022-11-18 19:44:32 +01:00
chrchr-github 4ce76d0b58
Fix debug: SymbolDatabase::findFunction found '>' without link. () 2022-11-14 21:08:15 +01:00
Paul Fultz II 436c5c8efc
Update version check in ccache.cmake so ccache can work on older cmake versions ()
* Remove ccache.cmake so ccache can work on older cmake versions

* Revert "Remove ccache.cmake so ccache can work on older cmake versions"

This reverts commit 22301d41d31e72f7d1bbb68dfa601b0e3bf79b22.

* Update version
2022-11-14 12:11:31 +01:00
chrchr-github e3939d32d0
Fix crash on nullptr ()
* Update tokenlist.cpp

* Update testincompletestatement.cpp

* Fix  FP constStatement with lambda

* Format

* Fix crash on nullptr

* Emit syntax error

* Fix test

* Use strAt()

* Fix another crash on nullptr

* Update testconstructors.cpp

* Fix crash on nullptr

* Fix test
2022-11-13 23:04:51 +01:00
chrchr-github 701d381895
Fix FP selfAssignment: lambda capture / FP operatorEqRetRefThis ()
* Fix   FP selfAssignment: lambda capture /  
FP operatorEqRetRefThis

* Format
2022-11-13 21:20:44 +01:00
Daniel Marjamäki 8aec886450 runformat 2022-11-12 22:36:26 +01:00
chrchr-github e8b37235d6
Fix internalAstError regressions (iscpp11init) () 2022-11-12 22:25:05 +01:00
Daniel Marjamäki 8fb8e06003 SymbolDatabase: Set valuetype for this 2022-11-12 22:23:42 +01:00
Daniel Marjamäki 15d3e510e1 ValueFlow: throw TerminateException in valueFlowGenericForward in case analysis is terminated 2022-11-12 12:47:54 +01:00
chrchr-github 4e75c08f58
Respect [[maybe_unused]] in unusedPrivateFunction () 2022-11-10 20:58:39 +01:00
Armin Müller 7f74aad8e2
Typos found by running "codespell" () 2022-11-09 22:52:03 +01:00
chrchr-github ffc0c57562
Fix crashes on nullptr () 2022-11-09 21:56:16 +01:00
Daniel Marjamäki 0d2993408a GUI: Install link when new version is available 2022-11-08 13:33:57 +01:00
gerboengels bd95efc987
Fix internal error "Unexpected tokens in initializer" with anonymous namespace ()
Co-authored-by: Gerbo Engels <gerbo.engels@ortec-finance.com>
2022-11-05 22:41:13 +01:00
Daniel Marjamäki e45e5f9f15 SymbolDatabase: fix ValueType for '&array[x]' 2022-11-05 21:22:08 +01:00
Daniel Marjamäki ecb2938e7e SymbolDatabase: Set correct ValueType when there is array-to-pointer decay 2022-11-05 17:38:31 +01:00
gerboengels d7a8f7f297
Fix couple issues with missing operatorEqVarError () 2022-11-05 10:48:34 +01:00
omarandlorraine 6488650d24
use python3 on debians too ()
* use python3 on debians too

in Debian 11 which is Bullseye, /usr/bin/python is a Python2
interpreter, which means that cppcheck-htmlreport fails to run here.
So I've chenged the shebang to use python3

* change all shebangs from python to python3

Co-authored-by: Sam M W <smw@alertergroup.co.uk>
2022-11-03 22:14:30 +01:00
Daniel Marjamäki 2c53b73e1b GUI: only run misra addon in premium version. remove misra rule texts configuration that is not needed in premium. 2022-11-03 18:20:13 +01:00
Rikard Falkeborn 3c21b9cc53
Fix , FP memory leak in if-statement in realloc with cast () 2022-11-03 10:37:43 +01:00
chrchr-github e4c5f36af0
Fix typedef: not simplified after inline keyword () 2022-11-02 15:15:33 +01:00
Daniel Marjamäki d19bb758bd win_installer: copy openssl from Qt tools folder 2022-11-02 12:11:13 +01:00
chrchr-github ccf2176664
Fix FP constStatement with lambda ()
* Update tokenlist.cpp

* Update testincompletestatement.cpp

* Fix  FP constStatement with lambda

* Format
2022-11-01 11:50:08 +01:00
chrchr-github d717e62ec3
Fix Detect assignment to temporary ()
* Fix  Detect assignment to temporary

* Use AST

* Warn if type definition is not seen
2022-11-01 11:46:42 +01:00
chrchr-github cf8051b7e2
Fix FP "Same value in both branches of ternary operator" on plus and minus zero ()
Fix  FP "Same value in both branches of ternary operator" on plus and minus zero
2022-10-31 15:18:25 +01:00
Daniel Marjamäki e8606a5e5a let --premium=misra-c-2012 also set --addon=misra. changed addons container to a set 2022-10-31 15:04:16 +01:00
Daniel Marjamäki 5c10cfd59e GUI: fix path issue with backslashes. hide non-premium setting in premium settings dialog. 2022-10-30 10:59:43 +01:00