Commit Graph

648 Commits

Author SHA1 Message Date
Oliver Stöneberg 7c7ccdf7c0
Check: disallow more than one instance per check (#4749) 2023-01-29 17:23:03 +01:00
Oliver Stöneberg 1d3955bd92
renamed some files in the `test` folder (#4705) 2023-01-27 08:18:32 +01:00
Oliver Stöneberg bea6aec2b2
extracted `ValueFlow::Value` to `vfvalue.{cpp|h}` (#4642) 2023-01-26 22:23:22 +01:00
Oliver Stöneberg 38abeccd24
added command-line option `--disable=<id>` to disable individual checks (#4712) 2023-01-21 10:39:44 +01:00
Oliver Stöneberg 0ed98c8f29
removed unused test files (#4648) 2022-12-18 19:36:37 +01:00
Oliver Stöneberg e5721030ca
greatly sped up `dmake` (#4630)
* dmake.cpp: use `endsWith()` in `getCppFiles()`

* dmake.cpp: optimized string concatenation in `getDeps()`

* dmake.cpp: avoid duplicated `std::string::find()` in `getDeps()`

* dmake.cpp: no need to get dependencies of headers without `.h` extension in `getDeps()`

* dmake.cpp: do not try to look for file in `externals` folder which does not contain any headers in `getDeps()`
2022-12-17 09:13:31 +01:00
Oliver Stöneberg 29e0133cb5
extracted `FwdAnalysis` from `astutils.{cpp|h}` (#4637)
* added missing filtering offiles in Visual Studio project

* extracted `FwdAnalysis` from `astutils.{cpp|h}`
2022-12-13 22:29:23 +01:00
Oliver Stöneberg 01abf4c347
fixed macos build by manually installing `pcre` (#4597)
* 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
Oliver Stöneberg 0481edf9c3
return `SmallVector` from `followAllReferences()` (#3925) 2022-09-29 21:41:32 +02:00
Oliver Stöneberg 9542a7b3cc
Makefile: some cleanups / added `VERBOSE` option (#4438) 2022-09-09 15:06:40 +02:00
Oliver Stöneberg 467648bec6
fixed #11249 (potential hang with -j and --showtime= when using threads) - synchronized access to `TimerResults::mResults` / added TSAN to CI (#4355) 2022-08-23 20:30:45 +02:00
Oliver Stöneberg 1202efb438
some `--exception-handling` related improvements (#4368) 2022-08-20 20:54:31 +02:00
Oliver Stöneberg 1d95d1908d
refs #10663 - sped up `Library::detectContainerOrIterator()` by iterating the containers only once (#4380) 2022-08-20 12:14:55 +02:00
Oliver Stöneberg 32c0167eab
specify `-pipe` for GCC to use pipes instead of temporary files - greatly reduces I/O usage (#4360) 2022-08-16 22:12:01 +02:00
Oliver Stöneberg 31d704e4bc
cppcheckexecutor.cpp: extracted platform-dependent code into separate files (#4359) 2022-08-16 22:03:44 +02:00
Oliver Stöneberg 271213cbbd
added make target `validatePlatforms` to CMake (#4343)
* added missing `platforms/cppcheck-platforms.rng` validation

* added make target `validatePlatforms` to CMake
2022-08-06 19:56:32 +02:00
chrchr-github 21d992cc00
Fix crash on Windows with -j option (#4229)
* Fix crash on Windows with -j option

* Disable CI-cygwin workflow

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Try to fix Cygwin build

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Update CI-cygwin.yml

* Cygwin uses THREADING_MODEL_FORK

* Restore workflows

* Remove comment

* Fix dmake

* Fix #11179 FP invalidFunctionArgStr

* Revert "Fix #11179 FP invalidFunctionArgStr"

This reverts commit dd5d3e67c6.
2022-07-13 13:46:03 +02:00
Daniel Marjamäki b387ae80f1 Fixed whole program analysis 2022-07-12 22:58:52 +02:00
Oliver Stöneberg aea4fd1068
some `TestSuppressions` improvements and cleanups (#4271) 2022-07-12 17:36:36 +02:00
Oliver Stöneberg c36320747f
some `missingInclude`/`missingIncludeSystem` fixes and tests (#4027)
* do not emit `missingInclude` and `missingIncludeSystem` errors when not enabled / fixed and improved TestPreprocessor::inline_suppression_for_missing_include()

* testpreprocessor.cpp: added missing tests for `missingInclude` and `missingIncludeSystem`

* cppcheckexecutor.cpp: `missingIncludeSystem` was not emitted in normal analysis if `missingInclude` existed

* dmake

* added `run-dmake` as `testrunner` dependency
2022-07-09 23:21:11 +02:00
Oliver Stöneberg b51aea5531
separated process execution code into `ProcessExecutor` (#4249) 2022-07-08 16:42:57 +02:00
orbitcowboy 10c7c70970 Activated 'make validateRules' and improved rule XML file parsing. Now, it optionally accepts '<rules>...</rules>' tags to make xmllint happy. 2022-06-22 00:03:18 +02:00
orbitcowboy 49ffe80f75 Decativate 'make validateRules' 2022-06-21 17:14:53 +02:00
Paul Fultz II 46fcdca5ee
Add debug_valuetype intrinsic (#4210) 2022-06-15 21:25:55 +02:00
Paul Fultz II cee48e5e19
Add backtrace to valueflow in debug mode (#4195) 2022-06-12 07:13:42 +02:00
Oliver Stöneberg d299d22fa2
updated CI to latest ubuntu and clang (#4004) 2022-05-22 15:27:32 +02:00
Oliver Stöneberg 8f728cb4b6
added (partial) support for specifying C++23 and support more "-std" options (#3212) 2022-04-15 16:17:36 +02:00
Oliver Stöneberg 32978933b5
removed leftovers of generated cfg tests (#4008) 2022-04-13 12:24:17 +02:00
Daniel Marjamäki 8f386e15fd Remove bug hunting. This feature will be provided in Cppcheck premium. 2022-04-11 07:31:33 +02:00
Jens Yllman 34a11c1673
Fix unmatched suppression (#5704) (#3886) 2022-03-30 19:24:53 +02:00
chrchr-github e54ad24d2c
Fix #10870 FN constStatement with arrays (#3904) 2022-03-25 11:32:16 +01:00
chrchr-github 39567ea8c8
Fix #8541 FP variableScope (std::for_each with lambda) (#3924) 2022-03-22 21:50:46 +01:00
chrchr-github 2eed660b32
Fix #8496 Clarify warnings for uninitMemberVar (#3760) 2022-03-13 17:33:31 +01:00
Oliver Stöneberg de728f472c
removed ThreadExecutor::addFileContent() (#3865) 2022-03-02 11:10:29 +01:00
Oliver Stöneberg 51371f7929
added CMake option USE_THREADS to be able to use threads instead of fork() / cleanups (#3852) 2022-02-23 09:04:35 +01:00
Oliver Stöneberg aaa4425d90
added MinGW to CI and fixed local MinGW build (#3826) 2022-02-16 07:06:04 +01:00
Oliver Stöneberg 6e57cc4323
small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
chrchr-github 5f3ddabd56
Fix FP constParameter with std::map (#3823) 2022-02-11 19:40:11 +01:00
Oliver Stöneberg 04b2a6f1c5
use Python version provided by platform in CI / prefer python3 (#3776) 2022-02-11 19:37:32 +01:00
Daniel Marjamäki 3b1198988a Makefile: Set debug mode 2022-02-05 13:04:30 +01:00
Daniel Marjamäki 6ba6567ad8 2.7: Updated Makefile 2022-02-05 13:03:32 +01:00
Paul Fultz II 119ec0582a
Fix 10676: FP: Array index -1 is out of bounds. (#3670) 2022-01-04 10:21:54 +01:00
Oliver Stöneberg ba402f3e50
cleaned up includes based on include-what-you-use (#3627) 2021-12-15 19:47:27 +01:00
Paul Fultz II 33ad30f4da
Fix 10617, 9824: conditions in expanded macro (#3578) 2021-11-25 18:40:15 +01:00
Paul Fultz II 8c9c46835a
Fix for 6597: false negative: uninitialized variable usage not detected (ValueFlow , multi variables) (#3535) 2021-10-30 22:13:58 +02:00
Daniel Marjamäki b97426a886 run dmake 2021-10-14 10:19:17 +02:00
Paul Fultz II a1e0ef9b38
Refactor: Use interval analysis for symbolic values for inferCondtion (#3488) 2021-10-09 16:19:06 +02:00
Paul Fultz II 7621fee3d4
Refactor: Use ValueFlow::Value for ProgramMemory execute instead of integers (#3477) 2021-10-04 07:53:58 +02:00
Paul Fultz II 2ca2abdf0e
Remove duplicate uninit warnings (#3478) 2021-10-04 07:50:23 +02:00
Daniel Marjamäki 08bc21199e Make ci happy 2021-10-03 22:01:13 +02:00