Commit Graph

373 Commits

Author SHA1 Message Date
PKEuS 97fa9e9d1b ValueFlow: Stop on inline assembly 2017-03-23 20:01:16 +01:00
Daniel Marjamäki ecc59859e1 Don't simplify _Bool in TokenList 2017-03-04 11:13:28 +01:00
Daniel Marjamäki d1c66edb03 ValueFlow: Known values in conditional code 2017-03-03 01:29:34 +01:00
Daniel Marjamäki 47d39d0a14 Revert "Fixed #7888 (1.77 false positive from knownConditionTrueFalse with sizeof(int) == sizeof(long))"
This reverts commit a762511067.
2017-01-10 13:22:48 +01:00
Daniel Marjamäki a762511067 Fixed #7888 (1.77 false positive from knownConditionTrueFalse with sizeof(int) == sizeof(long)) 2017-01-09 22:28:55 +01:00
Daniel Marjamäki b1f7e46491 Fixed #7323 (valueflow: global variables) 2017-01-09 15:53:08 +01:00
Daniel Marjamäki f40bdddbab ValueFlow: Better handling when casting calculation result 2016-12-20 23:09:50 +01:00
Daniel Marjamäki 44ccbdedec ValueFlow: Improved value for cast 2016-12-20 21:37:25 +01:00
Daniel Marjamäki 606bb78297 ValueFlow: Better handling of casts 2016-12-20 19:32:21 +01:00
Daniel Marjamäki e14e86c103 ValueFlow: only set values in conditional code in subfunctions when sure 2016-12-20 11:06:20 +01:00
Daniel Marjamäki 807b653739 ValueFlow: Fix FP in for loops when 2nd expression is 0 2016-12-20 07:54:38 +01:00
Daniel Marjamäki f1ad7368f6 ValueFlow: bool values 2016-12-19 21:21:18 +01:00
Daniel Marjamäki 17aaecbd6b ValueFlow: Improved handling of sizeof 2016-12-18 14:03:48 +01:00
Daniel Marjamäki 4ac5c78e0c Fix wrong iterator usage. Iterator that is erased must be non-const. 2016-12-17 22:20:50 +01:00
Daniel Marjamäki 72e4bc9d88 ValueFlow: skip values that cause false assertion condition 2016-12-17 21:23:14 +01:00
Daniel Marjamäki fd85b493bd astyle formatting
[ci skip]
2016-12-17 18:51:16 +01:00
Frank Zingsheim cb5a5e6a25 Improve Fix #6180 (Access of moved variable still allowed until function is called) 2016-12-17 16:42:46 +01:00
Frank Zingsheim 9a871d33f7 Improve Fix #6180 ("reset" and "clear" clears the move status) 2016-12-17 16:39:30 +01:00
Frank Zingsheim f4ab45f13b Improve Fix #6180 (Do not warn about move if it is part of a reassignment of the variable) 2016-12-17 16:39:30 +01:00
Daniel Marjamäki 31337dda27 ValueFlow: Better handling of && and || in for loop to avoid FP 2016-12-11 21:19:24 +01:00
Frank Zingsheim e0d4720e19 Fix #7829 (false-positive: knownConditionTrueFalse linked to virtual method)
Return values of virtual functions in valueflow are only possible values
since function might be overloaded.
2016-12-11 10:44:05 +01:00
Daniel Marjamäki b098d5fbd6 ValueFlow: We need better handling of casts 2016-12-10 22:09:01 +01:00
PKEuS 2f6350a0d0 Refactorized Library 2016-12-06 14:09:28 +01:00
PKEuS 6e8ac13325 Refactorization:
- Optimized std::string usage
- Replaced list by vector
- Moved iterator into loop head
- Ran AStyle
2016-12-05 17:45:34 +01:00
Daniel Marjamäki 5df8e7f50c Fixed #7596 (ValueFlow: better handling for 'x*(1-x-1)') 2016-12-04 22:39:59 +01:00
Stefan Weil 57b57428c2 Fix some typos in comments (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-27 11:40:42 +01:00
Matthias Krüger 213589ee68 ValueFlow: don't perform UB when a function returns shifts of/by negative values. Fixes #7814. 2016-11-24 23:23:47 +01:00
Daniel Marjamäki d40f4e4a55 Fixed #7778 (valueFlowAfterAssign: alias) 2016-11-21 17:26:36 +01:00
Frank Zingsheim c8ff96fe8f Fixed #6180 (Usage of variable after std::move or std::forward) 2016-11-20 15:14:49 +01:00
Matthias Krüger b6614d0aa4 valueflow: bail out earlier when encountering divisions by zero. Fixes #7819.
This caused valueflow to actually try to divide by zero, detected by UBSAN.
2016-11-20 14:38:35 +01:00
Daniel Marjamäki 3b57273ef1 Fix Cppcheck warnings 2016-11-14 07:21:10 +01:00
Daniel Marjamäki 1e31c6c01c ValueFlow: Extended handling of float values 2016-11-14 06:42:52 +01:00
Daniel Marjamäki e1e9eacccc ValueFlow: Added float type 2016-11-13 22:59:56 +01:00
Daniel Marjamäki 4732667488 ValueFlow: allow more value types 2016-11-13 22:33:39 +01:00
Daniel Marjamäki 7ebfb10edd Fixed #7806 (ValueFlow: better handling of subfunction with early return) 2016-11-13 18:19:51 +01:00
Daniel Marjamäki ac7b351d1e ValueFlow: Don't calculate x<<64 and x>>64 2016-11-06 20:40:58 +01:00
Daniel Marjamäki dd69d5eabe ValueFlow: Don't calculate result when there is UB 2016-11-06 17:42:01 +01:00
Alexander Mai ee11f0974a #7769 segmentation fault at setTokenValue() on invalid code. 2016-11-06 14:20:58 +01:00
Daniel Marjamäki ece4b1a06f Fix ValueFlow 2016-11-05 09:59:48 +01:00
Daniel Marjamäki 2885a75ea6 ValueFlow: handle ~ in setTokenValue 2016-11-05 09:29:22 +01:00
Frank Zingsheim d4f01583b6 Fixed TODO (check if function parameter is non-const reference etc..) by common function 2016-11-01 14:06:30 +01:00
Robert Reif 4216b26b8c Fixed #7775 (crash at valueFlowSetConstantValue) 2016-10-26 10:36:02 +02:00
Daniel Marjamäki 8a0f3009ff ValueFlow: inner and outer function return values 2016-10-22 17:22:57 +02:00
Daniel Marjamäki 77cd6c194f ValueFlow: Set 'known' property for function return values 2016-10-22 12:24:15 +02:00
Daniel Marjamäki 86a620a3b4 ValueFlow: Better handling of function return value when there are 0 parameters 2016-10-20 16:10:55 +02:00
Daniel Marjamäki efa3aba32a Remove Tokenizer::simplifyNull() 2016-10-18 21:44:02 +02:00
Daniel Marjamäki fae4a4dacf Fixed #7668 (ValueFlow: return value from abs) 2016-10-17 13:05:19 +02:00
Daniel Marjamäki 7fb812f415 Fixed #7752 (ValueFlow: no conditional value, probably because condition is in ternary operator and/or in function call.) 2016-10-16 07:15:28 +02:00
Daniel Marjamäki ad74421526 Fixed #7756 (ValueFlow: fix bug in valueAfterAssign, same variable in lhs and rhs) 2016-10-15 19:09:50 +02:00
Boris Egorov a32f61ae4a Fixed #7139 (ValueFlow: Missed shift operation in for expression) 2016-10-04 13:09:33 +07:00