Frank Zingsheim
7021cb2c6b
Fixed #6284 (Token::Match called with varid 0. Constants)
2015-08-02 09:11:51 +02:00
Simon Martin
0009ceee59
Ticket #6793 : Added basic unit test showing that basic integer shift length check is run even for templates.
2015-08-02 00:03:09 +02:00
Alexander Mai
965a034afd
Fix some more false positives on zerodiv: error should be issued if type of epxression is known to be integral
2015-08-01 18:42:17 +02:00
Alexander Mai
f91ad9bbf6
5402 false positive: (error) Division by zero -- with boost::format
2015-08-01 17:28:54 +02:00
Martin Ettl
1741af497f
Added test case for #6858 .
2015-08-01 17:26:23 +02:00
Martin Ettl
b7ea311123
Running astyle. No functional changes.
2015-08-01 12:31:16 +02:00
amai2012
b182edddda
#6909 segmentation fault (invalid code) in Tokenizer::simplifyEnum
2015-08-01 12:24:22 +02:00
Alexander Mai
acf050793e
#6907 segmentation fault (invalid code) in Tokenizer::simplifyTokenList1
2015-08-01 07:39:56 +02:00
Alexander Mai
0b96b9d984
#6505 ValueFlow: handle 2 related if in valueFlowSubFunction. Regression test. Bug got fixed before
2015-07-31 21:15:43 +02:00
Alexander Mai
4400f2ac85
#6900 segmentation fault (invalid code) in CheckStl::runSimplifiedChecks.
2015-07-31 20:24:06 +02:00
Matthias Krüger
73eefa46fc
testcondition: update testcase that was added since I did the changes.
2015-07-31 15:31:43 +02:00
Matthias Krüger
8bfbb5d09c
CheckMemoryLeakNoVar::returnValueNotUsedError: put function name into singlequotes
2015-07-31 15:29:07 +02:00
Matthias Krüger
83ee640977
Tokenizer::syntaxError: put the character that we have an invalid number of into singlequotes instead of parentheses.
2015-07-31 15:28:59 +02:00
Matthias Krüger
87891b4128
CheckCondition::checkIncorrectLogicOperator put conditions in single quotes
2015-07-31 15:28:48 +02:00
Matthias Krüger
21ed807f8d
CheckCondition::alwaysTrueFalseError: put condition in single quotes.
2015-07-31 15:28:37 +02:00
Daniel Marjamäki
251f6d2a15
Fixed #6898 (Token::expressionString: wrong output when first token is post-incremented)
2015-07-31 07:03:52 +02:00
Martin Ettl
42a406ac5f
testbufferoverrun: Removed duplicate test case.
2015-07-30 22:42:45 +02:00
amai2012
249a05126b
#6895 segmentation fault (invalid code) in CheckCondition::isOppositeCond
2015-07-30 17:19:19 +02:00
Daniel Marjamäki
d4344bd859
cleanup testcases for div()
2015-07-30 14:05:53 +02:00
Daniel Marjamäki
1752c4f4f0
Avoid 'Condition always true/false' FP when part of the condition is an expanded macro
2015-07-30 13:30:16 +02:00
amai2012
c5673612e2
#6069 False positive incorrectLogicOperator due to dynamic_cast. Run CheckCondition::checkIncorrectLogicOperator on non-simplified tokenlist.
2015-07-30 10:30:30 +02:00
Daniel Marjamäki
9085fdc156
Fixed #6887 (False positive eraseDereference - container is member of member variable)
2015-07-30 10:13:49 +02:00
Daniel Marjamäki
6790d91fbb
Improve error messages for conditional values. make valueFlowSwitchVariable values conditional that depend on the case. Partial fix for #6884 .
2015-07-29 19:54:57 +02:00
PKEuS
738057229c
Improved astIsFloat(): Handle function calls and sizeof, fixed ordering of checks
...
Handle sizeof in isSameExpression() (#6851 )
2015-07-29 14:28:24 +02:00
Daniel Marjamäki
120f3072eb
alwaysTrueFalse: Dont write warning when comparison is made in macro
2015-07-29 12:51:00 +02:00
Daniel Marjamäki
fc25ed8c86
Fixed #6879 (valueflow in do-while(++i))
2015-07-29 11:55:07 +02:00
Daniel Marjamäki
bf75ee9aed
Fixed #6885 (valueflow ignores assignment of variable via function call)
2015-07-29 10:49:17 +02:00
amai2012
1f43550688
#6880 , 6881 Crashes on invalid code. Fix null pointer access
2015-07-28 18:41:50 +02:00
Dmitry-Me
544932734f
VS: Disable 4482 warning
2015-07-28 18:33:45 +02:00
Daniel Marjamäki
e759710198
Fixed #6743 (valueFlowAfterCondition: wrong value when variable is changed in conditional code)
2015-07-28 08:58:05 +02:00
Daniel Marjamäki
c5bbea2994
Fixed #6816 (FP: buffer overflow, checkminsizes of array with string value)
2015-07-27 16:39:41 +02:00
Daniel Marjamäki
b50f554b28
TestValueFlow::valueFlowArrayElement: Refactoring tests
2015-07-27 16:25:14 +02:00
Daniel Marjamäki
05a21d45eb
Fixed #6670 (Analysis failed when there are {} in LHS in compound assignment)
2015-07-27 13:44:35 +02:00
Daniel Marjamäki
35eb1a393d
AST: handle concatening of strings better. this is not ideal but better.
2015-07-27 13:13:30 +02:00
Daniel Marjamäki
64b72bd6e5
Fixed #6227 (False positive (oppositeInnerCondition) - if (!dynamic_cast<>))
2015-07-27 10:43:52 +02:00
Daniel Marjamäki
29fbbef001
TestOther: Added zeroDiv test to make sure there is not FN when there is cast
2015-07-26 22:23:37 +02:00
Daniel Marjamäki
bf921251e9
TestOther: code cleanup
2015-07-26 22:21:26 +02:00
Daniel Marjamäki
389aec51ae
Fixed #6598 (False positive zerodivcond - cast to double ignored)
2015-07-26 22:08:36 +02:00
Alexander Mai
7cdeb70efa
Fix some glitches from previous commit to TestMathLib
2015-07-26 19:47:27 +02:00
Daniel Marjamäki
ed1c6e41d9
Fixed #6876 (valueFlowForward: lambda function)
2015-07-26 19:28:42 +02:00
Alexander Mai
7c48bf3ca5
MathLib::isFloat now detects C99 hexadecimal float literals. MathLib::isDecimalFloat was added for C++ and pre-C99 compatibility.
2015-07-26 19:21:53 +02:00
Daniel Marjamäki
190550f9f9
Fixed #6877 (ValueFlow: valueFlowForward, after goto label the value is not known)
2015-07-26 17:05:21 +02:00
Alexander Mai
bc28b252bf
#6048 syntax error in enum - value set to member of template class. Add test case, issue got fixed before
2015-07-26 15:42:40 +02:00
PKEuS
2342b604b0
Refactorized preprocessor (speedup of preprocessing time by ~10%):
...
- Reduced memory usage of PreprocessorMacro by 87,5% (removed redundant or unused members)
- Use char overload of std::string::find where possible
- Reordered conditions
2015-07-26 12:03:40 +02:00
Daniel Marjamäki
f3b5857b96
improved testing of calculations in valueflow
2015-07-26 12:00:42 +02:00
Alexander Mai
bbec54db8e
Implement MathLib::isFloatHex to detect C99 hexadecimal floating pointer literals. Rename MathLib::isHex to MathLib::isIntHex
2015-07-26 08:06:56 +02:00
Alexander Mai
12eb3ae716
#6628 False positive: The extra qualification 'namespace::' is unnecessary and is considered an error by many compilers. Add regression test since that issue has been fixed in 1.69 already
2015-07-26 06:54:46 +02:00
Alexander Mai
473336f986
#6426 FP duplicateExpressionTernary - (expr) ? ~0u : ~0ul. Regression test added. That issue got fixed in 1.69 already
2015-07-26 06:28:23 +02:00
Daniel Marjamäki
afd9f071c0
simplified the code for ValueFlow Known/Possible values
2015-07-25 19:36:29 +02:00
Alexander Mai
6548f20d9a
#4871 "Uninitialized variable" when try/catch on an if branch. Regression test, issue got fixed since 1.69
2015-07-25 19:02:20 +02:00