Daniel Marjamäki
d7de46f50e
ValueFlow: Fix false positive for container size
2018-09-08 10:43:08 +02:00
Daniel Marjamäki
c6d43506b6
ValueFlow: Fix FP in switch
2018-09-04 20:28:48 +02:00
Daniel Marjamäki
cc402869a6
Fixed #8689 (False positive: containerOutOfBounds after function call)
2018-09-02 14:08:34 +02:00
Daniel Marjamäki
6223204a06
Fixed #8708 (FP: Accessing an item in container that is empty)
2018-08-27 13:49:47 +02:00
Daniel Marjamäki
2f834c3c3b
Fixed #8688 (False positive: containerOutOfBounds)
2018-08-13 21:27:29 +02:00
Daniel Marjamäki
55ab842083
valueFlowSizeForward: Bailout when function calls modify the container size
2018-08-13 06:54:18 +02:00
Daniel Marjamäki
183345a939
valueFlowContainerSize: Fix FP when container size is changed
2018-08-12 22:23:19 +02:00
Daniel Marjamäki
7074eeb869
valueFlowContainerSize: assignment of string-like containers
2018-08-12 22:01:58 +02:00
Daniel Marjamäki
189ea5003a
valueFlowContainerSize: empty container variables
2018-08-12 14:41:00 +02:00
Daniel Marjamäki
811a71aa06
valueFlowContainerSize: Handle guard logic
2018-08-11 15:08:54 +02:00
Daniel Marjamäki
6008bbdfb4
valueFlowContainerSize: Fix wrong value after condition if conditional code escapes
2018-08-11 13:49:42 +02:00
Daniel Marjamäki
10461e5429
valueFlowContainerSize: forward analysis inside conditional code
2018-08-10 22:18:38 +02:00
Daniel Marjamäki
4a502a7f6b
valueFlowContainerSize: add simple forward analysis
2018-08-10 22:06:23 +02:00
Daniel Marjamäki
2b10e38eec
valueFlowContainerSize: handling of 'v.size() == 10'
2018-08-10 21:43:47 +02:00
Paul Fultz II
3947c23290
Fix issue 8369: False negative: Condition 'condition' is always true ( #1325 )
...
* Fix issue 8369: False negative: Condition 'condition' is always true
* Use simpleMatch
* Add iterator header
* Cleanup
* Remove unused variable
2018-08-10 18:05:23 +02:00
Daniel Marjamäki
3805af18a2
valueFlowContainerSize: Fix crash when container pointer is null
2018-08-10 12:53:16 +02:00
Daniel Marjamäki
f37434cd1d
valueFlowContainerReverse: Fix FPs when there is assignment
2018-08-10 12:26:53 +02:00
Daniel Marjamäki
907f81d059
ValueFlow: Improved analysis of container size
2018-08-10 11:53:56 +02:00
Daniel Marjamäki
81f54f7094
Fixed #8681 (ValueFlow: Container size)
2018-08-10 11:29:16 +02:00
Daniel Marjamäki
c666f74755
astyle formatting
...
[ci skip]
2018-07-25 23:02:16 +02:00
Paul Fultz II
f093692551
ValueFlow: Set values in else branch even when the first branch modifies the value ( #1309 )
...
* Set values in else branch even when the first branch modifies the value
* Move tests
* Add check for goto
* Remvoe todo
* Also check scope is noreturn
* Use isEscapeScope when variables are changed
2018-07-25 22:59:54 +02:00
Paul Fultz II
9895ea5ff2
Fix issue 470: Condition is always true or false on logical operators ( #1294 )
...
* Fix issue 470: Condition is always true or false on logical operators
* Dont warn on literals
* Compute logical operators using valueflow
* Fix FP when using literals
* Always warn on subconditions that are always true
* Use percent matches first
* Add test for logical operators
* Check if parent is null
2018-07-23 08:51:59 +02:00
Daniel Marjamäki
991300ac54
Clarify code with Token::isUnaryOp()
2018-07-14 22:36:08 +02:00
Daniel Marjamäki
1e824330c0
Refactoring: Use range for loops
2018-07-14 22:26:22 +02:00
Daniel Marjamäki
0f3cc56c59
Refactoring: Use range for loops
2018-07-14 13:19:41 +02:00
Daniel Marjamäki
d603a811bb
Clarify code with Token::hasKnownValue()
2018-07-14 13:09:53 +02:00
orbitcowboy
de66eedd54
Improved const correctness of local variables.
2018-05-29 17:33:43 +02:00
Daniel Marjamäki
8e8919e906
Fix comment
2018-05-07 22:06:23 +02:00
Daniel Marjamäki
8c2a5c9813
astyle formatting
...
[ci skip]
2018-05-06 09:50:53 +02:00
Paul Fultz II
0561877182
Fix false positive with negative array index in issue 8536 ( #1202 )
...
* Fix FP with negative array index in valueflow
* Remove values when valueflow fails
* Add valueflow test
2018-05-06 08:35:29 +02:00
Daniel Marjamäki
858e055c0e
ValueFlow: Wrote a few basic comments
2018-05-05 23:03:04 +02:00
Daniel Marjamäki
f336c2efe7
Refactoring; Renamed Scope::classStart and Scope::classEnd
2018-04-27 22:36:30 +02:00
Daniel Marjamäki
dbcdb19b73
Refactoring; Use range for
2018-04-24 18:02:36 +02:00
Daniel Marjamäki
7ee636b934
Refactoring: Reuse isLikelyStreamRead in isVariableChanged
2018-04-18 17:46:10 +02:00
Daniel Marjamäki
7825eb8670
Refactoring; reuse isLikelyStreamRead
2018-04-17 19:51:27 +02:00
Daniel Marjamäki
c84628c28a
Fixed #8494 (False positive: serialization class overloads operator)
2018-04-17 14:23:04 +02:00
PKEuS
d2146844dd
Refactorizations:
...
- Replace several push_back-calls by emplace_back
- Replace some x = x.substr(0, y) calls by x.erase(y)
2018-04-11 09:44:35 +02:00
Daniel Marjamäki
c5923fbdd3
astyle formatting
2018-04-09 22:21:17 +02:00
Paul Fultz II
d8b3fa5c70
Fix #8482 : Regression with valueflow ( #1159 )
...
* Fix regression with valueflow
* Simplify test case
2018-04-09 16:13:17 +02:00
PKEuS
b15cc3f236
Refactorization: Replace several push_back-sequences by initializer lists
2018-04-09 09:54:39 +02:00
Daniel Marjamäki
ee5c60e8f6
Refactoring, use early continue
2018-04-08 09:30:13 +02:00
Daniel Marjamäki
795b9f5e0f
astyle formatting
2018-04-08 09:25:59 +02:00
Paul Fultz II
aed84abfd5
Extend valueflow comparison ops ( #1153 )
...
* Handle else clause when doing a compare
* Break early
* Fix bug in checking no return else
* Escape quotes
* Add equal sign
* Simplify the logic
2018-04-08 09:24:01 +02:00
Matthias Krüger
5a104cab6e
remove weird "#line 2" from valueflow.cpp
2018-04-06 23:26:08 +02:00
Daniel Marjamäki
3ad6c7ebce
Refactoring, use early continue
2018-04-05 08:21:43 +02:00
Paul Fultz II
b871c85b67
Improve valeflow analysis with comparison operators ( #1131 )
...
* Improve valeflow analysis with comparison operators
* Use simple match
* Dont add 0 on comparisons
* Check reverse comparisons
* Use nullptr
* Remove duplicate code tests
2018-04-05 06:51:31 +02:00
jrp2014
b6504c70ca
Improve constness
2018-04-04 21:51:31 +02:00
IOBYTE
5bc039b7da
Fix #6367 and #8439 (improve sizeof value flow support) ( #1132 )
2018-03-23 08:28:12 +01:00
Daniel Marjamäki
7699f6432b
Fixed #8288 (valueFlowGlobalVar: compound assignments)
2018-03-18 19:53:33 +01:00
Daniel Marjamäki
ec6133aea2
Fixed #8182 (False positive uninitvar - variable initialized in function in ternary expression)
2018-03-16 19:13:48 +01:00