Commit Graph

12462 Commits

Author SHA1 Message Date
chrchr-github cc38ef4168
Fix FP constParameterReference / FP stlcstrConstructor / FP unknownMacro () 2023-07-07 15:54:07 +02:00
chrchr-github c738627d15
Fix uselessOverride FPs () 2023-07-07 13:18:00 +02:00
chrchr-github fa03f49d2b
Fix nullptr deref in compilePrecedence2() (II) () 2023-07-07 10:42:11 +02:00
chrchr-github dde45455bf
uselessOverride: Detect code duplication in overriding function () 2023-07-05 22:58:01 +02:00
chrchr-github ee5cf0f141
Fix nullptr deref in compilePrecedence2() () 2023-07-05 22:34:25 +02:00
chrchr-github db49687ae5
Fix getOverriddenFunction(), add test () 2023-07-01 17:23:26 +02:00
chrchr-github b99931c59c
Fix FP uselessOverride - grandchildren calling grandfather () 2023-07-01 14:11:28 +02:00
Daniel Marjamäki 96955ccfe9
Tokenizer: detect unknown macro 'if (x) MACRO }' () 2023-07-01 13:17:41 +02:00
Paul Fultz II 59a8944e30
Fix 11656: FP: containerOutOfBounds std::array () 2023-07-01 09:43:57 +02:00
chrchr-github 6d9fa6f10a
Fix FP uselessOverride - overloaded virtual member function () 2023-06-30 15:21:08 +02:00
chrchr-github e9feeef81d
Fix FPs: uselessOverride () 2023-06-29 20:46:12 +02:00
chrchr-github a40e5817bf
Fix Detect useless overriding functions () 2023-06-29 07:43:35 +02:00
chrchr-github 818ebb8d7e
Fix autovarInvalidDeallocation regression () 2023-06-29 07:42:53 +02:00
Daniel Marjamäki 55af68aaf7
Update type for Settings::checksMaxTime. ()
It's a time offset not a size. It should not have value SIZE_MAX that
makes it ineffective (overflow in calculation of stop time).
2023-06-28 19:52:33 +02:00
chrchr-github 4f71bbe986
Detect lambda with template argument () 2023-06-27 16:19:12 +02:00
chrchr-github 0a72cd3b72
Fix debug: simplifyUsing: unmatched body end () 2023-06-27 15:45:25 +02:00
chrchr-github e063656173
checkLibraryCheckType: handle global scope operator / Fix FN unreadVariable () 2023-06-27 14:28:14 +02:00
Paul Fultz II 63b7e6a283
Fix 11088: False positive: Array index out of bounds (function pointer parameter is array) () 2023-06-27 10:44:11 +02:00
chrchr-github a0c4e20e2d
Add tests for , () 2023-06-26 13:37:33 +02:00
Anton Lindqvist 4ebb8eaf0c
Ignore zero valued enum entries from badBitmaskCheck ()
Usage of zero valued enum entries can be used for documenting purposes
and should be ignored just like zeroes expanded from macros.
2023-06-26 10:43:20 +02:00
chrchr-github 7507d400de
Fix regression: wrong array size () 2023-06-26 06:51:01 +02:00
chrchr-github 9dc38f80c0
Fix FP functionConst with template function () 2023-06-25 20:38:54 +02:00
Paul Fultz II a2ee32695f
Fix 11530: FP arrayIndexOutOfBounds with array of functions () 2023-06-25 20:38:44 +02:00
Paul Fultz II 4f466a5961
Fix 11505: FP zerodivcond with modulo () 2023-06-25 20:38:32 +02:00
chrchr-github 9b892f3239
Partial fix for Handle lambda return types () 2023-06-25 12:01:59 +02:00
Paul Fultz II 60321edd0d
Fix 11784: FP arrayIndexOutOfBounds when increment is counted twice () 2023-06-24 20:08:55 +02:00
chrchr-github 6c750d9ae9
Fix FP knownConditionTrueFalse with std::vector::size() ()
There is special handling for `size_t` in
`ValueType::fromLibraryType()`, which gets preempted if it is also
configured as a podtype.
2023-06-23 20:31:25 +02:00
chrchr-github 55581fc2e9
Fix FP deallocuse () 2023-06-23 18:21:53 +02:00
chrchr-github b80460f3ae
Fix False positive: memory leak () 2023-06-22 23:03:55 +02:00
chrchr-github fe56b0c42a
LeakAutoVar: Handle C++ casts in function calls () 2023-06-22 16:01:21 +02:00
chrchr-github 4eebf2e733
Fix uninitdata regression () 2023-06-21 21:19:22 +02:00
Daniel Marjamäki 3abe8eeca5 Update copyright year 2023-06-21 19:58:11 +02:00
chrchr-github 9a95d4fe67
Fix Syntax error: typedef not first keyword in statement () 2023-06-21 18:26:28 +02:00
chrchr-github b26bfc9b4f
Use getAllocFuncInfo() () 2023-06-21 17:35:15 +02:00
Daniel Marjamäki f2510228cb
Fix (FP: unusedStructMember) () 2023-06-20 22:34:54 +02:00
chrchr-github bb962e2bc3
Enable and mitigate readability-else-after-return () 2023-06-20 18:43:21 +02:00
chrchr-github f96e3c9d84
Fix FP uninitdata with cast () 2023-06-20 18:06:57 +02:00
chrchr-github 78c7e3351f
Fix FP negativeContainerIndex after index is validated () 2023-06-20 10:55:14 +02:00
Daniel Marjamäki 38b2c5ee3f
Fix (False positive: uninitialized variable, handling 'false ||' in valueflow) () 2023-06-17 21:08:22 +02:00
chrchr-github 082331c210
Fix cppcheckError for unknown macro after else () 2023-06-17 18:39:23 +02:00
chrchr-github 8f6b0b41e7
Simplify qt.cfg, wxwidgets.cfg () 2023-06-17 17:04:14 +02:00
chrchr-github 53cab34484
Fix cppcheckError for function with lambda as default parameter () 2023-06-17 17:03:19 +02:00
orbitcowboy fd3befe60a
Added a regression test for FP uninitvar. ()
Test case is from: https://trac.cppcheck.net/ticket/10681#comment:10
2023-06-17 15:45:28 +02:00
Paul Fultz II d6e3182441
Fix 11721: False positive: constParameterReference with overloaded template function () 2023-06-17 11:31:47 +02:00
chrchr-github 7075b6e61d
Fix internalAstError caused by parameter pack simplification () 2023-06-17 11:31:02 +02:00
Daniel Marjamäki 9a290c959f
Fix (False positive: uninitialized variable, struct array member initialized in function) () 2023-06-17 10:20:20 +02:00
chrchr-github 58dd92dd1b
Merge pull request from chrchr-github/chr_Fix11189
Partial fix for  checkLibraryNoReturn with std::function parameter
2023-06-16 23:59:17 +02:00
chrchr-github 8761e6b8fc
Merge pull request from chrchr-github/chr_Fix11764
Fix  checkLibraryFunction/NoReturn when inheriting from container
2023-06-16 23:33:08 +02:00
chrchr-github 62dfa8877c
Merge pull request from chrchr-github/chr_astregr
Fix AST regression
2023-06-16 22:47:47 +02:00
chrchr-github 3f0f9e4476
Merge pull request from chrchr-github/chr_Fix11770
Partial fix for  cppcheckError with unknown macro
2023-06-16 22:40:56 +02:00