Commit Graph

26323 Commits

Author SHA1 Message Date
Oliver Stöneberg 888721ea12
disabled some clang-tidy checks which are not necessary and slow down the analysis / documented disabled checks (#4468)
* added `clang-tidy.md` to document our `.clang-tidy` configuration

* disabled some clang-tidy checks which are not necessary and slow down the analysis
2022-09-16 07:16:35 +02:00
Oliver Stöneberg b3ec225480
iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466)
* iwyu.yml: use debian:unstable to always get latest include-what-you-use

* cleaned up includes based on include-what-you-use

* mitigated include-what-you-use false positives
2022-09-16 07:15:49 +02:00
chrchr-github d6aab96734
Add support for std::unordered_set::count(), std::push_heap (#4469)
* Add support for std::copy_n/merge/stable_sort

* Format

* Add support for std::unordered_set::count(), std::push_heap

* Missing include
2022-09-16 07:12:36 +02:00
Oliver Stöneberg a536d53d62
CI-unixish.yml: actually perform qmake build on macos (#4418) 2022-09-15 20:26:21 +02:00
Oliver Stöneberg 76244de640
daca: add checkLibraryCheckType report / bumped client version (#4457) 2022-09-15 20:21:40 +02:00
chrchr-github c9ade33298
Fix memsetClass FP (#4465) 2022-09-15 20:20:49 +02:00
Daniel Marjamäki f1aa9eb48f dump: add externLang attribute for tokens 2022-09-15 19:57:42 +02:00
chrchr-github 7111270d5f
Add support for std::copy_n/merge/stable_sort (#4467)
* Add support for std::copy_n/merge/stable_sort

* Format
2022-09-15 19:56:45 +02:00
chrchr-github d1386a842a
Fix #11301 debug: constStatementError not handled. (#4463)
* Fix #11301 debug: constStatementError not handled.

* Use function
2022-09-14 23:57:02 +02:00
chrchr-github 266174ddc4
Fix #10993 danglingTemporaryLifetime reported in two different locati… (#4462)
* Fix #10993 danglingTemporaryLifetime reported in two different locations for std::string_view usage

* Missing include

* Add test
2022-09-14 07:28:04 +02:00
chrchr-github 07caf17eb3
Fix #1655 wrong usage of std::string in memcpy (#4460) 2022-09-13 15:14:25 +02:00
chrchr-github e904f7341e
Fix ValueFlow crash (#4461) 2022-09-13 12:25:15 +02:00
dzid26 3887d6dde1
Missing rule-text-file to not stop the analysis (#4458) 2022-09-12 12:55:07 +02:00
Paul Fultz II 43caa32abf
Fix 9755: false negative: access of moved variable in conditional code (#4459)
* Fix 9755: false negative: access of moved variable in conditional code

* Format
2022-09-11 12:32:01 +02:00
Oliver Stöneberg 76d1b9f31a
avoid unnecessary copies with `emplace_back()` (#4450)
* avoid unnecessary copies with `emplace_back()`

* cmdlineparser.cpp: suppress `accessMoved` selfcheck false positives
2022-09-10 11:25:15 +02:00
Paul Fultz II 53820515c9
Set valueflow for container elements (#4455)
* Track elements to containers

* Format

* Handle other access methods

* Format
2022-09-10 09:26:44 +02:00
bzgec 909e9ca359
Denote 'python xxx/donate-cpu.py' line as code (#4456) 2022-09-09 23:07:58 +02:00
Oliver Stöneberg 433293b9ab
added missing version bumps to 2.10 (#4420) 2022-09-09 21:02:04 +02:00
Oliver Stöneberg a556cc3863
donate-cpu: collect some `--debug-warnings` (#4422) 2022-09-09 20:56:14 +02:00
Oliver Stöneberg 9542a7b3cc
Makefile: some cleanups / added `VERBOSE` option (#4438) 2022-09-09 15:06:40 +02:00
Paul Fultz II 117a753b10
Partial fix 11154: FN: knownConditionTrueFalse (#4453)
* Partial fix 11154: FN: knownConditionTrueFalse

* Formay

* Add more tests

* FOrmat

* Fix FP

* Add test

* Check for side effects

* Format

* Update tests

* Format
2022-09-08 22:08:38 +02:00
Oliver Stöneberg dbc05da356
fixed some clang-tidy warnings (#4435) 2022-09-08 20:01:41 +02:00
Paul Fultz II 7c986fbef1
Fix 11203: false positive: knownConditionTrueFalse 'always false' when comparing integer with floating-point (#4350) 2022-09-08 19:59:02 +02:00
Oliver Stöneberg 48874e3aaf
CI-windows.yml: untangle Qt and regular builds (#4454) 2022-09-08 19:38:28 +02:00
Paul Fultz II f83b8dd385
Fix 11194: FN: knownConditionTrueFalse (#4452)
* Fix 11194: FN: knownConditionTrueFalse

* Format
2022-09-08 18:51:44 +02:00
Daniel Marjamäki 92845295b8 Fix broken CI caused by my qt fix 2022-09-08 11:12:38 +02:00
Oliver Stöneberg d46ea7ba86
avoid unnecessary copies with `push_back()` and `push_front()` (#4451) 2022-09-08 09:21:35 +02:00
Daniel Marjamäki 2e8d855b35 Tokenizer: Skip qt simplification if qt library is not loaded 2022-09-08 07:47:58 +02:00
Daniel Marjamäki b99474fe13 Tokenizer: Remove redundant setVarId call 2022-09-08 07:46:19 +02:00
Oliver Stöneberg 847391ea2d
some minor optimizations (#4449)
* cppcheck.cpp: reduced scope of a variable

* cppcheck.cpp: removed unnecessary severity checks

* cppcheck.cpp: avoid unnecessary copy

* templatesimplifier.cpp: perform early exit in loop in `expandTemplate()`
2022-09-07 19:19:04 +02:00
Paul Fultz II 32d96104d6
Fix 6370: ValueFlow: array element with known value (#4447)
* Fix 6370: ValueFlow: array element with known value

* Format

* Move comment
2022-09-07 19:16:07 +02:00
Paul Fultz II 6543b429c5
Fix 11285: FN: zerodiv (#4448)
* Fix 11285: FN: zerodiv

* Format
2022-09-07 19:15:37 +02:00
Oliver Stöneberg 54771306c5
selfcheck : cleaned up some suppressions, fixed warnings and some cleanups (#4436)
* cleaned up triage.pro and pass all triage files to selfcheck

* CI-unixish.yml: factored out redundant selfcheck flags

* CI-unixish.yml: cleaned up selfcheck suppressions and fixed warnings

* added explicit `missingInclude` checks to selfcheck to work around current issues/limitations / fixed selfcheck includes / added some unit tests for `missingInclude`

* applied the selfcheck changes to the sanitizer jobs

* only fail TSAN CI build in case of TSAN error / updated sanitizer CI build TODOs
2022-09-06 23:11:39 +02:00
chrchr-github 6960332f8a
Fix #11294 FP arrayIndexOutOfBoundsCond with extra parentheses (#4442) 2022-09-06 21:21:06 +02:00
Oliver Stöneberg b3762cd76a
actually perform system tinyxml2 build on macos / fixed system tinyxml2 include (#4445)
* lib/CMakeLists.txt: removed unnecessary external include

* look up tinyxml2 include dir when using system one and specify it

* lib/CMakeLists.txt: do not treat bundled headers as system ones

* CI-unixish.yml: actually perform system tinyxml2 build on macos
2022-09-06 18:30:59 +02:00
Paul Fultz II 2d37a77281
Fix 11296: FN: knownConditionTrueFalse ( a !=0 && b != 0 && a == 0) (#4444) 2022-09-06 07:31:48 +02:00
Paul Fultz II 016793f258
Fix 11295: Regression FP: knownConditionTrueFalse (#4443) 2022-09-06 07:31:38 +02:00
Oliver Stöneberg 3d10e67b3d
CI-unixish.yml: use `ccache` for some macos builds / cleanups (#4439) 2022-09-05 21:36:53 +02:00
Oliver Stöneberg 436b8bd3f1
optimized `isSameConstantValue()` a bit (#4441) 2022-09-05 21:36:26 +02:00
Daniel Marjamäki 251de269ec test-my-pr: fix syntax error 2022-09-05 20:55:55 +02:00
Daniel Marjamäki cf334100b6 test-my-pr: fix syntax error 2022-09-05 20:21:26 +02:00
Daniel Marjamäki 2e7babbc8d test-my-pr: if there are crashes then dont compare results and timings 2022-09-05 20:17:38 +02:00
Daniel Marjamäki 4401eba3fa test-my-pr: show libraries in log output 2022-09-05 16:27:07 +02:00
Daniel Marjamäki 7bb2bd3ca0 test-my-pr: add option --c-only 2022-09-05 11:33:32 +02:00
Oliver Stöneberg 363dd309fd
CI-unixish-docker.yml: fixed missing ubuntu 16.04 build (#4437) 2022-09-04 16:04:31 +02:00
Oliver Stöneberg c433f906bc
use `ccache` for Linux gcc CMake CI builds (#4426)
* modernized some CMake invocations

* CI-unixish.yml: use `ccache` for Linux gcc CMake builds

* CI-unixish-docker.yml: use `ccache` for Linux gcc CMake builds

* CI-unixish-docker.yml: enabled CMake build with tests for more images

* CI-unixish-docker.yml: adjusted some step checks
2022-09-04 10:27:20 +02:00
chrchr-github 31118fdce5
Fix noreturn FP with while() (#4429)
* Fix checkLibraryFunction FPs

* Fix FP with fclose()

* Format

* Fix FP with reinterpret_cast

* Fix noreturn FP with while()
2022-09-04 10:26:31 +02:00
Oliver Stöneberg 0f5d2a31b3
coverage.yml: avoid unnecessary test execution and package installation / come cleanups (#4434)
* coverage.yml: avoid duplicated test execution

* coverage.yml: split test execution and report generation into separate steps

* coverage.yml: split software and Python package installation into separate steps

* coverage.yml: removed unnecessary `libcppunit-dev` installation - library headers are only needed when performing syntax checking
2022-09-04 10:25:59 +02:00
Oliver Stöneberg 4d767d821e
use same output folder for GUI tests qmake builds to leverage existing output files from regular build (#4433) 2022-09-04 10:25:16 +02:00
Paul Fultz II 6ce5c24f21
Refactor knownConditionTrueFalse check and isUsedAsBool function (#4432)
* Refactor knownConditionTrueFalse check and isUsedAsBool function

* Format1

* Format

* Skip assign
2022-09-04 10:24:45 +02:00