Commit Graph

11469 Commits

Author SHA1 Message Date
Paul Fultz II 45b4580554
Fix 10957: Crash on valid code () 2022-04-10 22:47:58 +02:00
chrchr-github bd9f5231b8
Fix FP divideSizeof with dereferenced pointer-to-pointer () 2022-04-10 22:47:27 +02:00
orbitcowboy aa7a1f25c1 Added regression test from Ticket #3929:comment18 2022-04-10 08:10:11 +02:00
chrchr-github c8936d04f6
Fix New Check : Return value of "new" ignored () 2022-04-09 19:06:32 +02:00
Oliver Stöneberg 25ef9eeb26
use std::string::empty() () 2022-04-09 19:02:37 +02:00
chrchr-github 0636018df3
Fix FP: unassignedVariable with structured binding () 2022-04-09 14:50:30 +02:00
chrchr-github 2bccde0e3b
Fix FP Logical condition considered always false () 2022-04-09 14:09:10 +02:00
chrchr-github 38bc0ad4c3
Fix regression: wrong member variable () 2022-04-08 08:23:10 +02:00
Paul Fultz II d2a0b0f78e
Fix 10951: FP knownEmptyContainer with east-const ()
* Fix 10951: FP knownEmptyContainer with east-const

* Format

* Use simpleMatch
2022-04-08 08:22:39 +02:00
chrchr-github ceb86afc22
Fix FP constStatement with cast in return () 2022-04-07 14:11:14 +02:00
Paul Fultz II 4c1aeb0cb1
Remove old pointer alias check () 2022-04-07 11:36:15 +02:00
chrchr-github 52b4aeb279
Fix FP knownConditionTrueFalse with double to int cast () 2022-04-07 10:42:57 +02:00
Paul Fultz II dad10f2ab7
Fix 7684: ValueFlow: function call 'X::GetSize()' ()
* Improve getting function to calculate the return

* Add test

* Format

* Move to cpp to avoid FP

* Format
2022-04-07 06:49:25 +02:00
Paul Fultz II 8986cf018f
Fix todo test that was using wrong function ()
* Fix todo test that was using wrong function

* Format
2022-04-07 06:48:51 +02:00
Paul Fultz II 74667d1e2a
Fix 10418: false negative: knownConditionTrueFalse ()
* Improve handling inverted condition

* Fix tests

* Rename variables for clarity

* Add initial test

* Add another test

* Format

* Fix FP
2022-04-07 06:48:13 +02:00
Paul Fultz II 09c8cfb2ae
Fix 6624: false negative: std::vector out of bounds access not detected ()
* Fix 6624: false negative: std::vector out of bounds access not detected

* Format

* Add test for auto

* Fix tests

* Format
2022-04-07 06:47:15 +02:00
Paul Fultz II bb640c4879
Fix 10950: Crash on function declaration ()
* Fix 10950: Crash on function declaration

* Format
2022-04-06 19:00:05 +02:00
chrchr-github b73aeeda0e
Fix FP constStatement with comma operator ()
* Fix FP constStatement with comma operator

* Format
2022-04-06 16:58:17 +02:00
orbitcowboy 64a7ba3c4c Added regression test for . 2022-04-06 08:12:41 +02:00
Paul Fultz II 4fde7f8b18
Fix 10449: Regression: knownConditionTrueFalse (strlen/wcslen) ()
* Refactor library function usage

* Evaluate library function in program memory

* Fix and add tests

* Format
2022-04-06 06:35:38 +02:00
Paul Fultz II 1d92665ad2
Fix 10867: false negative: containerOutOfBounds with std::array (regression) ()
* Fix 10867: false negative: containerOutOfBounds with std::array (regression)

* Format
2022-04-06 06:25:28 +02:00
chrchr-github 4c375e7224
Fix FP redundantInitialization with lambda / debug: valueFlowConditionExpressions bailout ()
* Fix  FP redundantInitialization with lambda

* Fix  debug: valueFlowConditionExpressions bailout

* Format
2022-04-05 23:19:17 +02:00
chrchr-github f5313dc519
Fix crash with defaulted destructor () 2022-04-05 23:18:08 +02:00
chrchr-github c4dcfef385
Fix debug: Executable scope 'x' with unknown function. ()
* Fix  debug: Executable scope 'x' with unknown function

* Format

* Add test for 

* Fix  debug: Executable scope 'x' with unknown function.
2022-04-05 15:52:16 +02:00
chrchr-github 3ba6914563
Add test for ()
* Fix  debug: Executable scope 'x' with unknown function

* Format

* Add test for 
2022-04-05 13:04:20 +02:00
chrchr-github cfbbeb4b1b
Partial fix for FN containerOutOfBounds with std::array ()
* Partial fix for  FN containerOutOfBounds with std::array

* Format

* Format

* Optimize
2022-04-05 07:34:20 +02:00
chrchr-github b79885c6af
Fix debug: Executable scope 'x' with unknown function ()
* Fix  debug: Executable scope 'x' with unknown function

* Format
2022-04-05 07:34:06 +02:00
chrchr-github aae810dd2c
Fix FP: duplicateValueTenary () 2022-04-04 06:33:54 +02:00
chrchr-github 955d6d8fc6
Fix internalAstError with brace-init in ternary ()
* Fix  internalAstError with brace-init in ternary

* Undo
2022-04-03 20:05:03 +02:00
Paul Fultz II 39265f8ce0
Fix 10931: Assert failure in setSymbolic() ()
* Fix 10931: Assert failure in setSymbolic()

* Format
2022-04-03 20:04:18 +02:00
Paul Fultz II 0547cbcd26
Fix 10647: FN knownConditionTrueFalse for impossible Boolean value ()
* Add impossible values for bool

* Fix valueflow tests

* Fix assertion failure

* Add test

* Format
2022-04-03 20:04:05 +02:00
chrchr-github 7a7b3e40eb
Fix regression FN constVariable with static arrays ()
* Fix regression FN constVariable with static arrays

* Fix test case
2022-04-02 20:39:45 +02:00
chrchr-github a9f29fbc09
Fix FP functionStatic with class template and east-const / FP constParameter with std::array and east-const () 2022-04-01 23:26:44 +02:00
chrchr-github 4bf8718dcb
Fix FP constStatement with pointers in lambda () 2022-04-01 19:50:40 +02:00
Paul Fultz II 5bea50cd36
Fix 10908: FP: uninitvar after for-loop () 2022-03-31 21:24:20 +02:00
chrchr-github 183969cd4b
Fix FP constStatement with extern declaration () 2022-03-31 21:08:04 +02:00
chrchr-github c85e7e7d2f
Fix FP constStatement with more complex expression () 2022-03-30 22:00:57 +02:00
Jens Yllman 34a11c1673
Fix unmatched suppression () () 2022-03-30 19:24:53 +02:00
chrchr-github 343a23135d
Fix FP constStatement with reference and direct initialization () 2022-03-30 19:22:01 +02:00
chrchr-github 47ba053054
Fix FP constVariable with static pointer () 2022-03-30 19:21:09 +02:00
chrchr-github 948bb8df94
Add test for , () 2022-03-30 15:49:45 +02:00
chrchr-github 86ff360946
Fix FP constStatement with immediately evaluated lambda () 2022-03-29 06:10:57 +02:00
chrchr-github 81bcbfa7fe
Fix FP missingOverride with friend () 2022-03-28 22:44:04 +02:00
chrchr-github 49147f95fe
Fix FP constStatement with dynamic_cast () 2022-03-28 22:15:40 +02:00
chrchr-github 8d49fc252c
Fix FP constStatement ',' with Eigen, OpenCV etc. () 2022-03-28 22:06:44 +02:00
chrchr-github 11cbb2eb00
Fix AST cyclic dependency [cppcheckError] 3 () 2022-03-28 22:05:41 +02:00
chrchr-github d57d536f01
Fix FP constStatement with negation and cast () 2022-03-28 21:52:08 +02:00
chrchr-github 7b97230dd2
Fix FP unreadVariable for lock_guard variable () 2022-03-28 21:45:49 +02:00
Paul Fultz II 54fbfd7c0f
Fix 10895: FP danglingTempReference with emplace() ()
* Fix 10895: FP danglingTempReference with emplace()

* Format
2022-03-27 10:02:30 +02:00
Paul Fultz II 21b8c36eb1
Fix 10916: FP: uninitvar () 2022-03-27 10:01:58 +02:00