Commit Graph

26767 Commits

Author SHA1 Message Date
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 ()
* Add support for std::copy_n/merge/stable_sort

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

* Use function
2022-09-14 23:57:02 +02:00
chrchr-github 266174ddc4
Fix danglingTemporaryLifetime reported in two different locati… ()
* Fix  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 wrong usage of std::string in memcpy () 2022-09-13 15:14:25 +02:00
chrchr-github e904f7341e
Fix ValueFlow crash () 2022-09-13 12:25:15 +02:00
dzid26 3887d6dde1
Missing rule-text-file to not stop the analysis () 2022-09-12 12:55:07 +02:00
Paul Fultz II 43caa32abf
Fix 9755: false negative: access of moved variable in conditional code ()
* 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()` ()
* 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 ()
* 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 () 2022-09-09 23:07:58 +02:00
Oliver Stöneberg 433293b9ab
added missing version bumps to 2.10 () 2022-09-09 21:02:04 +02:00
Oliver Stöneberg a556cc3863
donate-cpu: collect some `--debug-warnings` () 2022-09-09 20:56:14 +02:00
Oliver Stöneberg 9542a7b3cc
Makefile: some cleanups / added `VERBOSE` option () 2022-09-09 15:06:40 +02:00
Paul Fultz II 117a753b10
Partial fix 11154: FN: knownConditionTrueFalse ()
* 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 () 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 () 2022-09-08 19:59:02 +02:00
Oliver Stöneberg 48874e3aaf
CI-windows.yml: untangle Qt and regular builds () 2022-09-08 19:38:28 +02:00
Paul Fultz II f83b8dd385
Fix 11194: FN: knownConditionTrueFalse ()
* 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()` () 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 ()
* 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 ()
* 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 ()
* 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 ()
* 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 FP arrayIndexOutOfBoundsCond with extra parentheses () 2022-09-06 21:21:06 +02:00
Oliver Stöneberg b3762cd76a
actually perform system tinyxml2 build on macos / fixed system tinyxml2 include ()
* 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) () 2022-09-06 07:31:48 +02:00
Paul Fultz II 016793f258
Fix 11295: Regression FP: knownConditionTrueFalse () 2022-09-06 07:31:38 +02:00
Oliver Stöneberg 3d10e67b3d
CI-unixish.yml: use `ccache` for some macos builds / cleanups () 2022-09-05 21:36:53 +02:00
Oliver Stöneberg 436b8bd3f1
optimized `isSameConstantValue()` a bit () 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 () 2022-09-04 16:04:31 +02:00
Oliver Stöneberg c433f906bc
use `ccache` for Linux gcc CMake CI builds ()
* 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() ()
* 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 ()
* 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 () 2022-09-04 10:25:16 +02:00
Paul Fultz II 6ce5c24f21
Refactor knownConditionTrueFalse check and isUsedAsBool function ()
* Refactor knownConditionTrueFalse check and isUsedAsBool function

* Format1

* Format

* Skip assign
2022-09-04 10:24:45 +02:00
Maksim Derbasov f93b588603
New check: use memcpy/memset instead of loop () 2022-09-03 23:29:06 +02:00
Oliver Stöneberg 070bae871a
use `ccache` for Linux gcc make CI builds () 2022-09-03 21:21:24 +02:00
Daniel Marjamäki 253c764a0c runformat 2022-09-03 17:30:17 +02:00
Daniel Marjamäki 01b3b4cd0c cmdlineparser: fixed append of premium options 2022-09-03 12:21:55 +02:00
Daniel Marjamäki 9306c6f329 dump: Add Function::isAttributeNoreturn info 2022-09-03 12:09:20 +02:00
Daniel Marjamäki 77e32f457a manual: point at open source / premium manual 2022-09-02 18:10:23 +02:00