Paul Fultz II
0b63e7273d
Fix 11162: FP: knownConditionTrueFalse ( #4254 )
...
* Fix 11162: FP: knownConditionTrueFalse
* Format
2022-07-09 00:57:25 +02:00
Paul Fultz II
9cecc8468e
Fix 10570: Improve check; condition then pointer dereference, different pointers ( #4216 )
...
* Try to use after assign in loop
* Update valueflow forward to handle init tokens
* Fix tests
* Make test TODO
* Format
* Add tests
* Format
* Fix ubsan error
* Use simpleMatch
2022-06-16 19:26:23 +02:00
Paul Fultz II
d4fb5652c0
Fix 10619: Valueflow: Library function in subfunction does not propagate all values ( #4209 )
2022-06-12 07:17:28 +02:00
Paul Fultz II
c9b85010f9
Fix 11096: FP knownConditionTrueFalse in do while loop ( #4192 )
...
* Check for loop
* Improve handling of exit values
* Add more checks to test
* Simplify
* Remove unnecessary test
* Fix typo
* Format
* Use simpleMatch
2022-06-10 20:42:02 +02:00
Paul Fultz II
72342de0da
Fix 11114: FP knownConditionTrueFalse across functions ( #4163 )
...
* Fix 11114: FP knownConditionTrueFalse across functions
* Format
2022-06-02 23:24:11 +02:00
Paul Fultz II
d7c914bd3e
Handle subfunction values in valueflow conditions ( #4128 )
2022-05-29 19:57:10 +02:00
Paul Fultz II
5999b35130
Fix 10944: FN: knownConditionTrueFalse ( #4124 )
...
* Fix 10944: FN: knownConditionTrueFalse
* Use or
* Format
2022-05-23 23:22:08 +02:00
Paul Fultz II
feaef46436
Fix 11076: Assert failure / crash with loop over init list ( #4119 )
2022-05-21 08:25:09 +02:00
Paul Fultz II
90e6c10c12
Fix 11072: FP arrayIndexOutOfBounds, nullPointer with nested loops ( #4113 )
...
* Fix 11072: FP arrayIndexOutOfBounds, nullPointer with nested loops
* Format
* Remove print statement
2022-05-18 08:29:30 +02:00
Paul Fultz II
fbba72ab5a
Fix 11057: FP danglingTemporaryLifetime with reference member ( #4103 )
...
* Fix 11057: FP danglingTemporaryLifetime with reference member
* Add test
* Format
* Use ast for number of arguments
* Get number of arguments using ast
* Skip aggregate constructor when there are too many arguments
* Format
2022-05-13 06:51:07 +02:00
Paul Fultz II
5f9bee9b91
Fix 11056: FP uninitvar with known condition in loop ( #4107 )
...
* Fix 11056: FP uninitvar with known condition in loop
* Format
2022-05-12 06:37:48 +02:00
Paul Fultz II
be6daa94bb
Fix 11053: Integer division by zero in calculate.h ( #4092 )
...
* Fix 11053: Integer division by zero in calculate.h
* Format
2022-05-09 20:27:32 +02:00
Paul Fultz II
69f09da63e
Fix 11044: FP knownConditionTrueFalse after early return ( #4091 )
...
* Fix 11044: FP knownConditionTrueFalse after early return
* Format
2022-05-09 20:26:52 +02:00
Paul Fultz II
474c7fe5cc
Fix 10953: False positive: Possible null pointer dereference when calling derived function ( #4044 )
2022-04-26 17:57:06 +02:00
Paul Fultz II
5d5562266d
ValueFlow: Assume constant is nonzero when its negated ( #4041 )
...
* ValueFlow: Assume constant is nonzero when its negated
* Format
* Format
2022-04-23 06:19:07 +02:00
Paul Fultz II
4eed29502c
ValueFlow: Set values to parameters to longjmp and setjmp ( #4040 )
...
* ValueFlow: Set values to parameters to longjmp and setjmp
* Format
2022-04-23 06:18:55 +02:00
Paul Fultz II
6deb8068fa
Fix 10981: ValueFlow: multiplication with 0 should have known value 0 ( #4023 )
2022-04-14 18:13:04 +02:00
Paul Fultz II
09597bc7e8
Fix 10956: ValueFlow: Incorrect value when assigned to two variables ( #4019 )
...
* Fix 10956: ValueFlow: Incorrect value when assigned to two variables
* Format
2022-04-14 07:35:07 +02:00
chrchr-github
5ac4afa5b8
Fix cppcheckError with spaceship operator ( #10251 ) ( #4001 )
...
* Fix cppcheckError with starship operator (#10251 )
* Fix test case
* Return result
2022-04-13 12:23:38 +02:00
Paul Fultz II
99757c6d06
ValueFlow: Set values to parameters to escape functions ( #3994 )
...
* ValueFlow: Set values to parameters to escape functions
* Format
2022-04-11 07:23:58 +02:00
Paul Fultz II
45b4580554
Fix 10957: Crash on valid code ( #3991 )
2022-04-10 22:47:58 +02:00
Paul Fultz II
74667d1e2a
Fix 10418: false negative: knownConditionTrueFalse ( #3981 )
...
* 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
bb640c4879
Fix 10950: Crash on function declaration ( #3979 )
...
* Fix 10950: Crash on function declaration
* Format
2022-04-06 19:00:05 +02:00
Paul Fultz II
1d92665ad2
Fix 10867: false negative: containerOutOfBounds with std::array (regression) ( #3976 )
...
* Fix 10867: false negative: containerOutOfBounds with std::array (regression)
* Format
2022-04-06 06:25:28 +02:00
Paul Fultz II
39265f8ce0
Fix 10931: Assert failure in setSymbolic() ( #3967 )
...
* 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 ( #3968 )
...
* Add impossible values for bool
* Fix valueflow tests
* Fix assertion failure
* Add test
* Format
2022-04-03 20:04:05 +02:00
Paul Fultz II
ff902369e0
Fix 10851: False positive: known variable value below for loop ( #3891 )
...
* Fix 10851: False positive: known variable value below for loop
* Format
* Add test for 10863
* Format
2022-03-12 06:15:35 +01:00
chrchr-github
27baa20f38
Fix #10779 FN: stlOutOfBounds (off by one) ( #3872 )
...
* Fix #10779 FN: stlOutOfBounds (off by one)
* Format
* Simplify
2022-03-04 17:13:13 +01:00
chrchr-github
2dd6c75b35
Fix #10838 Crash/nullptr deref in getEndOfExprScope() ( #3870 )
...
* Fix #10838 Crash/nullptr deref in getEndOfExprScope()
* Format
2022-03-03 17:08:23 +01:00
Daniel Marjamäki
915ae4b845
ValueFlow: Fix crash
2022-03-02 21:12:37 +01:00
chrchr-github
d79d6e60db
Fix #10828 Internal error. Token::Match called with varid 0 ( #3859 )
...
* Fix #10828 Internal error. Token::Match called with varid 0
* Fix test
2022-02-26 23:48:29 +01:00
Paul Fultz II
dbc80787e1
Fix 10821: FN: containerOutOfBounds ( #3856 )
...
* Fix 10821: FN: containerOutOfBounds
* Format
* Fix cppcheck warning
* Add valueflow tests
* Format
* Fix some bugs
* Format
2022-02-25 05:53:51 +01:00
Paul Fultz II
1ac16413ea
Another fix for 10800: Hang / memory exhaustion on numerical code ( #3851 )
...
* Another fix for 10800: Hang / memory exhaustion on numerical code
* Format
2022-02-22 07:21:26 +01:00
chrchr-github
734e3ac6da
Fix cppcheckError with for loop ( #3847 )
2022-02-21 18:14:20 +01:00
chrchr-github
18e00bb4fd
Fix #10817 Crash in checkPassByReference() / #10810 Stack overflow with decltype / #10763 Crash on invalid code ( #3840 )
...
* Fix #10817 Crash in checkPassByReference()
* Format
* Fix #10810 Stack overflow with decltype
* Fix #10763 Crash on invalid code in TemplateSimplifier::templateParameters
2022-02-18 12:59:21 +01:00
chrchr-github
6635e6cc07
Fix #10795 cppcheckError with for loop ( #3841 )
2022-02-17 22:12:19 +01:00
Paul Fultz II
78228599da
Fix 10800: Hang / memory exhaustion on numerical code ( #3822 )
...
* Fix 10800: Hang / memory exhaustion on numerical code
* Format
* Add another test
* Format
2022-02-11 06:52:28 +01:00
Oliver Stöneberg
f32583e097
removed OVERRIDE and FINAL defines and use the keywords directly ( #3767 )
2022-02-10 23:02:24 +01:00
Paul Fultz II
5d25050b06
Fix 10788: False positive: zerodivcond when using an assert ( #3816 )
2022-02-10 20:22:14 +01:00
Paul Fultz II
a50452517d
Fix 10794: Crash in MultiValueFlowAnalyzer::getProgramState() ( #3815 )
...
* Fix 10794: Crash in MultiValueFlowAnalyzer::getProgramState()
* Format
2022-02-10 07:43:27 +01:00
Paul Fultz II
569332a50a
Fix 10786: False positive: arrayIndexOutOfBoundsCond ( #3803 )
2022-02-06 20:14:13 +01:00
Paul Fultz II
a639c59780
Fix 10787: False positive: knownConditionTrueFalse with a conditional exit ( #3804 )
2022-02-06 20:13:44 +01:00
Daniel Marjamäki
3989408738
Update copyright year
2022-02-05 11:45:17 +01:00
Oliver Stöneberg
171da2e6f9
avoid dependency on transitive includes - based on include-what-you-use ( #3757 )
2022-01-27 19:03:20 +01:00
Paul Fultz II
40147c1e4b
Fix 10719: Crash in valueFlowIterators() ( #3756 )
...
* Fix 10719: Crash in valueFlowIterators()
* Format
2022-01-26 06:42:41 +01:00
Paul Fultz II
1a949c00b0
Fix 10723: Assertion 'tok && tok->exprId() > 0 && "Missing expr id for symbolic value"' in valueFlowSmartPointer() ( #3755 )
...
* Fix 10723: Assertion 'tok && tok->exprId() > 0 && "Missing expr id for symbolic value"' in valueFlowSmartPointer()
* Format
2022-01-26 06:28:13 +01:00
Paul Fultz II
01e14a12f1
Fix 10755: Assertion "!maxValue->isKnown()" from valueFlowInferCondition ( #3739 )
...
* Fix 10755: Assertion "!maxValue->isKnown()" from valueFlowInferCondition
* Format
2022-01-22 12:25:20 +01:00
Paul Fultz II
0737cc4d8c
Fix 10708: Assertion "!maxValue->isKnown()" from valueFlowInferCondition ( #3736 )
...
* Fix 10708: Assertion "!maxValue->isKnown()" from valueFlowInferCondition
* Format
2022-01-21 09:56:24 +01:00
Oliver Stöneberg
55ff684f34
added unusedFunction self check to CI / cleanups ( #3526 )
2022-01-18 22:02:25 +01:00
Paul Fultz II
4af98f21d6
Fix 10588: crash ( #3691 )
2022-01-16 12:33:31 +01:00