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
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
Daniel Marjamäki
f9a5a114bb
astyle formatting
...
[ci skip]
2018-07-25 07:44:06 +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
IOBYTE
ce50df8047
Fix override warnings. ( #1234 )
2018-05-15 16:37:40 +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
c84628c28a
Fixed #8494 (False positive: serialization class overloads operator)
2018-04-17 14:23:04 +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
bbfcccf078
Refactorization: Replace several push_back-sequences by initializer lists
2018-04-09 09:41:24 +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
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
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
Daniel Marjamäki
7701e4594a
ValueFlowBeforeCondition: Fix wrong value in do-while condition when there is a break in the loop body
2018-02-24 22:07:34 +01:00
Daniel Marjamäki
e62b9bdc77
Fixed #8348 (ValueFlow: wrong Uninit value with abort() in else-branch)
2018-02-11 22:14:44 +01:00
Daniel Marjamäki
c4caee6b18
Updated copyright year
2018-01-14 15:37:52 +01:00
Daniel Marjamäki
1b13490ac1
Move code
2018-01-11 14:27:41 +01:00
Daniel Marjamäki
6fd157e93b
ValueFlow: Template arguments have 'possible' values
2018-01-11 14:22:27 +01:00
Daniel Marjamäki
9191e6f112
Fixed #8246 (ValueFlow: known value, function pointer argument)
2017-11-17 23:04:54 +01:00
Daniel Marjamäki
4a9984d73b
Fixed #8233 (FP uninitvar found in bash:lib/readline/display.c)
2017-11-06 10:28:07 +01:00
Daniel Marjamäki
1d5e3e4f0c
Fixed #8247 (False positive knownConditionTrueFalse)
2017-10-20 17:31:58 +02:00
Daniel Marjamäki
ad1749738e
Fixed #6153 (ValueFlowBeforeCondition: Handle global variables)
2017-10-17 16:55:37 +02:00
Daniel Marjamäki
6d59290858
Fixed #10 (ValueFlow: condition variable has known value in switch case)
2017-10-16 21:51:30 +02:00
Dmitry-Me
2a6f63d995
Resolve C4305 - double constant truncated to float
2017-10-11 23:36:51 +03:00
Daniel Marjamäki
2a6fbe2e3c
astyle formatting
...
[ci skip]
2017-10-05 23:01:42 +02:00
hexcoder
051a18b120
pull request for ticket 8180 (better diagnostic output for bailouts) ( #964 )
...
* sync build instructions from readme.txt
* refactored the patch from ticket 8180. Moved logic from macros to the bailoutInternal function
* adapt to new bailout message format
* adapt to new bailout message format
* adapt to new bailout message format
* compile fix for Microsoft platform
* remove directory part from file locations in bailout message (normalize)
* remove directory part from valueflow message filter
* adapt tests to file format without directory part
* adapt tests to file format without directory part
* new line number agnostic assert_equals methods
* new line number agnostic assert_equals methods
* adapt to new method assertEqualsWithoutLineNumbers()
* adapt to new method assertEqualsWithoutLineNumbers()
* Bugfix: do not replace line number with spaces, remove it
* review changes: const char * -> std::string, size_t -> int, std::to_string() -> MathLib::toString()
* set #line at the beginning to guard against insertions from match compiler
* Bugfix: counting lines can be difficult :-) #line 1 -> #line 2
* added method stripDirectoryPart()
* added method stripDirectoryPart()
* used new method Path::stripDirectoryPart()
* new dependency path.h in lib/valueFlow.cpp
* code cleanup, removing redundant temporary objects and casts
2017-10-05 23:03:13 +02:00
Daniel Marjamäki
5f4b06c0f4
isVariableChangedByFunctionCall: Fix FN when constructor argument is const reference
2017-09-20 14:03:56 +02:00
Daniel Marjamäki
4318521fc1
Fixed #8187 (isVariableChangedByFunctionCall: Constructor reference argument)
2017-09-20 12:53:25 +02:00
Daniel Marjamäki
1dbcba4dd6
Fixed #8221 (ValueFlow: value for static variable that is not written)
2017-09-15 15:58:19 +02:00
Daniel Marjamäki
ef1f3fbee6
Fixed #8173 (ValueFlow: use AST when setting values in assignment RHS ((n=42) && n=='A'))
2017-09-14 22:49:47 +02:00
Daniel Marjamäki
a02fd54a69
ValueFlow: Avoid FPs for aliased variables
2017-09-03 23:24:55 +02:00
Daniel Marjamäki
30f04a5a96
Fixed #8195 (False positive uninitvar (regression) - valueflow misses variable initialization via istringstream >>)
2017-09-02 21:53:51 +02:00
Daniel Marjamäki
9c99bc43c2
ValueFlow: Skip wrong handling of lambda functions. TODO: handle lambda functions properly.
2017-08-28 22:39:12 +02:00
Daniel Marjamäki
02a1b7cd2d
Fixed #7965 (valueFlowForward: Improved handling of correlated variables)
2017-08-27 19:50:44 +02:00
Daniel Marjamäki
529b255e99
ValueFlow: Better errorpath for increment/decrement
2017-08-25 23:07:26 +02:00
Daniel Marjamäki
b1b8e5270a
ValueFlow: Better errorpath for increment/decrement
2017-08-25 22:15:52 +02:00