Dmitry-Me
9c0e6986da
Passing string literals into printf as %p is fine
2017-10-08 11:14:10 +03:00
Ayaz Salikhov
be2c65eb58
Simplify int vs bool
2017-10-08 07:54:39 +02:00
Daniel Marjamäki
92673afc8f
fixed 'make checkcfg'
2017-10-06 15:16:25 +02:00
Daniel Marjamäki
e4676b70dd
Remove wrong testcase test/cfg/windows.cpp, there is missing configuration for that given code
2017-10-06 14:42:19 +02: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
Dmitry-Me
d170b496ba
Improve test coverage for wide string literals passed into printf
2017-10-05 17:45:06 +03:00
orbitcowboy
00bff02e13
Formatted the code. There are no functional changes [ci skip].
2017-10-05 09:02:55 +02:00
Dmitry-Me
da0185387f
Improve coverage for %j used with printf
2017-10-04 17:51:35 +03:00
Alexey Eryomenko
22483baf72
missed simplification in parsing of std function declaration resulted in ( #967 )
...
wrong type detection
2017-10-03 22:10:13 +02:00
Dmitry-Me
9564442167
Improve test coverage for detecting wrong file mode
2017-10-03 18:25:15 +03:00
Dmitry-Me
2b7ef7156a
Improve test coverage for accessing closed files
2017-09-29 17:12:50 +03:00
Daniel Marjamäki
04c2be33a6
Unit testing visual studio import
2017-09-24 22:57:24 +02:00
Daniel Marjamäki
5993c40d5b
Improve 'opposite inner condition' check
2017-09-22 14:01:20 +02:00
Daniel Marjamäki
411c5e5f7e
Fixed #8190 (False positive constStatement - return (struct media_frames_per_second) {0};)
2017-09-21 22:50:46 +02:00
Daniel Marjamäki
71d207c034
Fixed #8226 (Tokenizer: Wrong handling of string literal u"abc")
2017-09-21 13:33:14 +02:00
Daniel Marjamäki
e61222126f
Fixed #8176 (ValueFlow: variable might be changed if it's passed by reference to method)
2017-09-20 22:09:09 +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
b73f5fec7d
Fix invalid code in TestStl test case
2017-09-19 23:22:17 +02:00
Daniel Marjamäki
1a057bc23a
Revert "Remove redundant safety logic (CID 1368511)"
...
This reverts commit d892031f28
.
2017-09-19 23:13:31 +02:00
Daniel Marjamäki
d892031f28
Remove redundant safety logic (CID 1368511)
2017-09-19 23:07:02 +02:00
Daniel Marjamäki
840c7eb258
checkFloatToIntegerOverflow: check all calculations, not only in function bodies
2017-09-19 19:30:24 +02:00
Daniel Marjamäki
9268c2034a
checkSignConversion: check all calculations, not only in function bodies
2017-09-19 19:25:33 +02:00
Daniel Marjamäki
f6e30eee19
checkIntegerOverflow: handle long and long long also
2017-09-19 19:14:29 +02:00
Daniel Marjamäki
cac7146cac
checkIntegerOverflow: check all calculations, not only in function bodies
2017-09-19 14:43:48 +02:00
Daniel Marjamäki
6bc0df2908
checkTooBigBitwiseShift: Separate id for signed shift overflow
2017-09-19 09:21:20 +02:00
Daniel Marjamäki
be0ad20a04
checkTooBigBitwiseShift: bitshift overflow when lhs is signed
2017-09-19 09:08:44 +02:00
Daniel Marjamäki
fe0a514a7c
Fix testrunner
2017-09-16 02:13:48 +02:00
Daniel Marjamäki
2e6d78bd08
Fixed #8184 (Syntax error: case outside switch)
2017-09-15 22:37:31 +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
d79762cfc3
Fixed #7449 (reademptycontainer (inconclusive) when variable changed in function )
2017-09-15 10:49:58 +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
927b14b60f
Fixed #8217 (Crash in isVariableChanged())
2017-09-14 15:45:15 +02:00
Dmitry-Me
6cfcf8610d
Improve coverage for operator= return type detection.
...
This adds a testcase with parameter being a reference to non-const.
2017-09-14 00:12:10 +03:00
Daniel Marjamäki
bb20c0504e
CheckCondition: Fix FP in daca (iqtree) 'in >> ch'
2017-09-13 22:46:36 +02:00
Daniel Marjamäki
8f6c98e3d6
Remove TestGarbage testcase with unhandled characters
2017-09-12 22:48:30 +02:00
Daniel Marjamäki
5c7cf584ef
bump simplecpp
2017-09-12 22:42:10 +02:00
Daniel Marjamäki
56544ac936
Fixed #8211 (Crash on incomplete code in isVariableChanged ())
2017-09-11 13:45:36 +02:00
Daniel Marjamäki
9f4fc7b323
Rename sameConditionAfterEarlyExit to identicalConditionAfterEarlyExit
2017-09-10 22:59:39 +02:00
Daniel Marjamäki
db321c2617
CheckCondition: Fix FP when there is increment/decrement in condition (daca icu)
2017-09-10 22:58:05 +02:00
Daniel Marjamäki
c34fdd1905
CheckCondition: Fix FP for undeclared variables (daca)
2017-09-10 22:30:41 +02:00
Daniel Marjamäki
b9b47809f9
Fixed #8197 (iscast: '(b)&1' is not a cast)
2017-09-08 22:52:16 +02:00
Daniel Marjamäki
899ad8479d
CheckCondition: Fixed FP when condition contains global static variable
2017-09-08 15:44:56 +02:00
Daniel Marjamäki
d9adb5432a
astyle formatting
...
[ci skip]
2017-09-08 15:41:14 +02:00
Nekto89
9cbfa0e383
Fix #7803 : false negative: condition is always true 'if (flags & A)' ( #938 )
2017-09-08 14:30:42 +02:00
Daniel Marjamäki
58db814d72
Rephraze /Same/Identical/
2017-09-08 12:41:33 +02:00
Daniel Marjamäki
97125acabd
Fixed #7365 (False positive: Use of erased iterator)
2017-09-08 09:45:30 +02:00
Daniel Marjamäki
57004ed533
Fixed #7663 (False positive: uninitialized variable (multi variables in inner scopes))
2017-09-07 23:08:55 +02:00
Daniel Marjamäki
120d0f86d0
CheckCondition: Fix FP about same condition when switch case is used (daca)
2017-09-07 22:05:01 +02:00