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
9fedeb5b99
manual: minor tweaks
2015-07-28 14:50:51 +02:00
Daniel Marjamäki
339fbd4be3
addons/naming.py: some refactoring and write a comment that says how it is used
2015-07-28 14:50:30 +02:00
Daniel Marjamäki
0e82730ee4
addons/naming.py: fixed error report for function name
2015-07-28 14:34:37 +02:00
Daniel Marjamäki
8b8d898b96
Addons/naming.py: verify variable/function names against regular expressions
2015-07-28 14:20:38 +02:00
Daniel Marjamäki
5a57e4030a
dump: Add Function name attribute
2015-07-28 14:18:58 +02:00
Daniel Marjamäki
a1dfd6cf73
astyle formatting
2015-07-28 12:47:08 +02:00
Daniel Marjamäki
a17f4d0a2d
CLI: Added --debug-normal option that will show --debug output after 1st simplifications. This output is relevant for the 'normal' checkers.
2015-07-28 12:46:32 +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
f449e91d43
made valueFlowSwitchVariable faster when there are many 'case %num%:'
2015-07-27 14:57:02 +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
5cc744b941
Fixed #6872 (Major performance regression - valueFlowSwitchVariable)
2015-07-27 06:45:06 +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
Daniel Marjamäki
ae124cb365
ValueFlow: Attempt to make --debug output easier to understand by using words
2015-07-26 16:32:31 +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
Daniel Marjamäki
9197e70a8d
ValueFlow: Changed --debug output so we can see if a variable is known or possible
2015-07-26 15:36:09 +02:00
PKEuS
7f9a313b94
Fixed hang in VS10 debug mode (AppVeyor)
2015-07-26 14:20:18 +02:00
Daniel Marjamäki
7f1af06df0
Preprocessor: fixed gcc -Wreorder warning
2015-07-26 13:48:01 +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
Daniel Marjamäki
8d3b5bb95e
generate_and_run_more_tests: Add testuninitvar
2015-07-26 11:29:02 +02:00
Daniel Marjamäki
4e293d47c5
CheckMemoryLeak: Fix handling of comparisons after simplifyIfNotNull is removed, detected problem with run_more_tests
2015-07-26 11:27:52 +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
PKEuS
cfde690bb2
Fixed two comments and GUI build
2015-07-25 19:17:40 +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
Alexander Mai
a36b544995
#3991 false positive: Memory leak (allocation function returns success/failed code). Add testcase. Issue had been fixed in 1.69 already
2015-07-25 18:50:27 +02:00
PKEuS
92b867dd2c
Fixed behaviour of --quiet/-q and its description
2015-07-25 17:55:12 +02:00
Daniel Marjamäki
acc1566f64
uninitvar: Improved condition handling. Fixes one problem when running 'tools/run_more_tests.sh test/testuninitvar.cpp'
2015-07-25 17:55:01 +02:00
PKEuS
8ed0180279
Use C++11 string.back() instead of string[string.length()-1]
2015-07-25 17:19:53 +02:00
PKEuS
40a6941577
Warn about usage of --suppressions or --exitcode-suppressions (they are deprecated)
...
Removed two redundant strncmp calls
2015-07-25 17:17:52 +02:00
PKEuS
176b3925b3
Removed "verify" code in testrunner. Fixing its messages reduces the accuracy of the test suite.
2015-07-25 14:18:41 +02:00
Daniel Marjamäki
b0df668975
fix VS warning
2015-07-25 13:23:48 +02:00
Daniel Marjamäki
e5151a13ab
Fixed #6867 (False positive memleak)
2015-07-25 11:37:03 +02:00
PKEuS
53d7620b1a
VS solution: Use check.h as precompiled header (reduces build time for core by 50%)
2015-07-25 11:13:19 +02:00
Daniel Marjamäki
f939381673
Preprocessor: Fix buffer overflow if line is empty
2015-07-24 19:19:07 +02:00