Commit Graph

5545 Commits

Author SHA1 Message Date
PKEuS a16d631813 Further improvements to setVarId and function/array pointer detection in SymbolDatabase (#2872) 2014-03-28 17:43:40 +01:00
PKEuS 1c58628223 Handle pointer/reference to array in setVarId (#2645) 2014-03-28 16:10:27 +01:00
PKEuS 50a94885ce Fixed oppositeInnerCondition check:
- Resolved false positives #4170 and #4186, as well as numerous other potential false positives
- Improved message to point to both locations
- Inner condition could also be a while loop; Outer if could also be 'else if'
- Made the check non-experimental again (#3645)
2014-03-28 14:55:17 +01:00
PKEuS a6ca3cf2cf Throw syntaxError when encounter one in symboldatabase (fixes #5572) 2014-03-27 19:06:13 +01:00
PKEuS efe3f834be Refactorized handling of syntaxError: Print debug output, removed a few return values that are no longer required 2014-03-27 18:41:52 +01:00
Daniel Marjamäki ab25741fee Merge pull request #277 from Dmitry-Me/getridofassertinisdigit
Get rid of assert in isdigit
2014-03-27 17:18:06 +01:00
Daniel Marjamäki 581886636d CheckBool::checkComparisonOfBoolExpressionWithInt: Rewrite the check using AST instead of token list 2014-03-27 16:10:43 +01:00
PKEuS 9b307cf8e0 Improved readability of testsuite output when ASSERT_EQUALS_MSG fails.
Fixed another true positive in checkbufferoverrun.cpp
AStyle
2014-03-27 16:06:30 +01:00
PKEuS e8c7a723f5 Fixed five new true positives in cppcheck, silenced one new false positive (see #5618) 2014-03-27 15:50:30 +01:00
PKEuS 7e4081f7f5 Treat syntaxError and cppcheckError as InternalErrors (throw as exception, #4268) 2014-03-27 13:15:21 +01:00
PKEuS b23aebf2f0 Show redundantCopyLocalConst for STL types (#4331) 2014-03-27 11:15:17 +01:00
PKEuS 379807a8ea Fixed TODO_ASSERT_EQUAL and #5614 caused by bad simplification of return values. 2014-03-27 11:04:31 +01:00
Dmitry-Me d0b3728328 Get rid of assert in isdigit() when processing cyrillic characters. 2014-03-27 10:23:47 +04:00
Daniel Marjamäki 2248cdfea0 CheckBool::checkAssignBoolToPointer: Refactor to use AST. 2014-03-27 05:39:48 +01:00
Dmitry-Me d0e51fb5f0 Make use of Visual C++ runtime memory leak tracing 2014-03-26 19:43:12 +04:00
PKEuS f71a4ad216 Improved information message on missing headers when included with <> (#4772) 2014-03-26 15:22:22 +01:00
PKEuS 6c4e8761c8 Fixed false positive "unused function" #5113. 2014-03-26 12:34:21 +01:00
PKEuS 848d079c71 Refactorized detection of function usage in CheckUnusedFunction, fixed #5358 2014-03-26 09:12:41 +01:00
PKEuS 02f38772cc Refactorization: Use SymbolDatabase to find functions in CheckUnusedFunctions 2014-03-26 08:54:56 +01:00
Daniel Marjamäki d22da5e683 astyle formatting
[ci skip]
2014-03-26 06:56:13 +01:00
Daniel Marjamäki fa7ae1ae5b Fixed segfault when checking libusbx (daca2) 2014-03-26 06:51:56 +01:00
Daniel Marjamäki 8eeda150cf ValueFlow: Improved simplification inside for-loops 2014-03-25 21:40:36 +01:00
Daniel Marjamäki 87daf5783e buffer overflow: clean up old checking for negative index 2014-03-25 20:37:32 +01:00
Troshin V.S 840fba7672 CLI: Add -l command line option 2014-03-25 18:35:59 +01:00
Daniel Marjamäki c8004a8d31 Buffer overruns: Use ValueFlow to detect negative index 2014-03-25 18:22:22 +01:00
PKEuS 5083dd4273 Fixed two visual studio warnings 2014-03-24 18:14:23 +01:00
Daniel Marjamäki aa05bf0f16 ValueFlow: Improved abstract interpretation 2014-03-24 06:48:06 +01:00
Daniel Marjamäki 2a0716449f Fixed #5498 (C++0x11 default values for class fields and missing constructor) 2014-03-24 06:15:51 +01:00
Daniel Marjamäki dbc8273cb7 ValueFlow: improved abstract interpretation of for loops 2014-03-24 00:16:02 +01:00
Daniel Marjamäki c14a3d67bb ValueFlow: Handle division by zero better in abstract interpretation 2014-03-23 20:37:56 +01:00
PKEuS 1be7bfa7fe Fixed crash on invalid code (#5603) 2014-03-23 20:08:16 +01:00
Daniel Marjamäki 30fa187b30 Fixed #5549 (ValueFlow: Handle static variables better in valueFlowAfterAssign) 2014-03-23 17:57:27 +01:00
PKEuS 5f2067e401 Refactorized dead code elimination:
- Use library to get noreturn functions
- Fixed do-while simplification (#4940)
2014-03-23 10:59:41 +01:00
PKEuS 77c17100ec Bailout in private function usage checking for operators (#5059). 2014-03-23 10:06:14 +01:00
PKEuS 8d5be8c4a4 Fixed related issues to #5601 2014-03-22 22:35:20 +01:00
PKEuS 58c2f372b9 Fixed false positive when noreturn function is defined (#5601, second attempt) 2014-03-22 19:55:13 +01:00
PKEuS 6395cb9b95 Syntax error on invalid enum (#5600) 2014-03-22 19:31:01 +01:00
Daniel Marjamäki b6276058da Value Flow: Improved abstract interpretation of arithmetical expressions 2014-03-22 19:02:33 +01:00
PKEuS 77c871035b Fixed false positive when noreturn function is defined (#5601) 2014-03-22 18:57:19 +01:00
Daniel Marjamäki 7d2357de8d Refactoring. Use astIsFloat() 2014-03-22 18:42:29 +01:00
PKEuS 560cf397d3 Fixed C++11 right angle bracket issue #5150 2014-03-22 13:34:15 +01:00
Alexander Mai 6a08c27183 Fix segfault in variableIsUsedInScope() - loop variable not check against NULL 2014-03-22 11:14:11 +01:00
Alexander Mai e1c565357a Invalid code cause SIGSEGV since loop variable tok2 was not checked properly 2014-03-22 10:32:24 +01:00
Alexander Mai cdd6d4df27 Removing a useless variable to fix cppcheck warning in its own code 2014-03-21 22:11:10 +01:00
Alexander Mai 37befc75ef In case of a loop within the class hierarchie Function::isImplicitlyVirtual_rec() was entering an endless loop. Tracking the previously analyzed types shall prevent this. 2014-03-22 08:49:28 +01:00
PKEuS 49b25b05d9 Fixed crash in CheckBufferOverrun on garbage code (#5595) 2014-03-21 13:20:44 +01:00
Daniel Marjamäki 045e9e692b ValueFlow: restricted bailouts in for loops 2014-03-21 08:48:49 +01:00
Daniel Marjamäki fc014f055f ValueFlow: Removed wrong bailout 2014-03-21 08:33:45 +01:00
Daniel Marjamäki 54e7f34f4a Fixed #5584 (FP: Division by zero when function not declared) 2014-03-20 16:12:58 +01:00
XhmikosR be0fcefe1d Tabs to spaces.
[ci skip]
2014-03-20 09:02:14 +02:00