Commit Graph

6542 Commits

Author SHA1 Message Date
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
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
PKEuS 8ed0180279 Use C++11 string.back() instead of string[string.length()-1] 2015-07-25 17:19:53 +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 e5151a13ab Fixed #6867 (False positive memleak) 2015-07-25 11:37:03 +02:00
Simon Shanks 9910c1fa0c Fixed #6617 (preprocessor performance improvement) 2015-07-24 13:30:41 +02:00
Daniel Marjamäki 8ffa917fa2 Fixed #6863 (AST: wrong handling of assignment between ? and :) 2015-07-24 13:02:00 +02:00
Daniel Marjamäki 234669b02b Removed the UninitVar::analyseFunctions(). This was written for multifile checking however it did not work as it should => no multifile errors can be detected. 2015-07-24 08:30:38 +02:00
Alexander Mai ed74a3dcc6 Testcase for #4683 added (which got fixed already) 2015-07-24 06:06:31 +02:00
PKEuS e95800bed4 Added regression test for #4816
Ran AStyle
2015-07-23 20:53:50 +02:00
PKEuS 795e5de903 Refactorization: Cleaned up after ExecutionPath removal 2015-07-23 20:37:09 +02:00
Daniel Marjamäki 3dbf290220 Refactor CheckStl::erase so it doesn't use ExecutionPath 2015-07-23 18:53:31 +02:00
Daniel Marjamäki ea933e9873 CheckUninitVar: Removed ExecutionPath based checker 2015-07-23 17:28:18 +02:00
Daniel Marjamäki 995c4196b5 testuninitvar: use new checking instead of executionpath 2015-07-23 17:20:11 +02:00
Daniel Marjamäki 0b81a267f4 uninitvar: handling arrays in non-executionpath checker 2015-07-23 14:51:38 +02:00
PKEuS ce9272a4ed Refactorized file listing code (CLI):
- Apply PathMatch in FileLister::recursiveAddFiles() already to avoid touching directories that are ignored (#5775)
- Simplified code to warn about header exclusion; use Path::isHeader() instead of custom header filename detection
2015-07-23 14:28:17 +02:00
Daniel Marjamäki 28fd6ce2f0 testuninitvar: use new checking instead of executionpath in 2 more testcases 2015-07-23 13:50:02 +02:00
Daniel Marjamäki c4f9a2a160 testuninitvar: update testcase 2015-07-23 12:58:38 +02:00
Frank Zingsheim 6485339d66 Support lambdas in "else if" simplification (#6860) 2015-07-23 09:41:35 +02:00
Daniel Marjamäki 79067ac031 uninitvar: use new checking instead of executionpath in more tests. small improvements in new checking to fix testcases. 2015-07-23 08:46:59 +02:00
Daniel Marjamäki 239f0d4ab4 testuninitvar: use new checking instead of executionpath in various testcases 2015-07-22 22:53:59 +02:00
Daniel Marjamäki 1de1aaa2f4 CheckUninitVar: Fix crash when AST is not created properly 2015-07-22 22:17:12 +02:00
Daniel Marjamäki 1f5eea98b5 CheckUninitVar: Fix a FP reported for invalid code 2015-07-22 21:58:06 +02:00
Daniel Marjamäki 42ed436e9d Tweaks in uninitvar, small steps to make it possible to remove the ExecutionPath 2015-07-22 20:31:58 +02:00
Robert Reif 4e693f1620 Fixed #6827 2015-07-22 13:57:51 +02:00
PKEuS ab1113fb16 Fixed crash on garbage code #6859 2015-07-22 13:33:24 +02:00
Daniel Marjamäki f711520892 Fixed #6852 (false negative: logical conjunction 'x == 0') 2015-07-21 22:26:22 +02:00
Daniel Marjamäki f9d22f70db Removed simplifyIfNot simplification (#6072) 2015-07-21 20:56:47 +02:00
Daniel Marjamäki 1b8252181d Tokenizer: Removed Tokenizer::simplifyIfNotNull (#6072) 2015-07-21 17:58:44 +02:00