Commit Graph

6629 Commits

Author SHA1 Message Date
PKEuS a4cc4c3e3f Refactorization: Use SymbolDatabase scope information in ValueFlow 2015-02-01 12:10:20 +01:00
PKEuS 54b6b8e571 Fixed false positive #6481 2015-01-31 20:34:06 +01:00
PKEuS 21cb0cfd60 Take simplifyIfNotNull and simplifyIfNot out of simplifyTokenList1 (first step for #6072) 2015-01-31 20:12:02 +01:00
PKEuS 1f97e3001b Fixed calculation of array size (#6487) 2015-01-31 19:06:44 +01:00
PKEuS ae4b86c231 Several improvements to CheckMemoryLeakNoVar::checkForUnusedReturnValue():
- Support user defined functions (solves TODO tests)
- Print message if return value is not stored properly (adapted message text, #6458)
2015-01-31 17:28:03 +01:00
Daniel Marjamäki 73113c67e7 Fixed #6480 (False positive unreachableCode - member function exit called instead of ::exit()) 2015-01-31 16:55:55 +01:00
PKEuS 789665dadf Fixed #6455: Show uninitvar even for const variables 2015-01-31 13:21:22 +01:00
PKEuS 27924d4ae2 Improved detection of array dimensions (#6430) 2015-01-31 13:12:06 +01:00
PKEuS f771a79738 Removed obsolete internal check. The underlying but in Token::Match should be fixed since b4f0869a71 2015-01-31 12:56:54 +01:00
PKEuS 18b0e14590 Refactorizations: Fixed a pattern in checkbufferoverrun.cpp, simplified one in checkclass.cpp 2015-01-31 12:32:05 +01:00
PKEuS b2835051df Refactorization: Renamed Token::Match pattern %var% to %name%, implement new pattern %var% which is true if varId > 0. 2015-01-31 12:32:04 +01:00
PKEuS 33f5d27b53 Fixed varId0 message #6443. 2015-01-31 10:33:32 +01:00
Daniel Marjamäki 57ec1aea91 Library: Don't rely on ast in isNotLibraryFunction since it's used in tokenizer 2015-01-31 10:24:10 +01:00
PKEuS 36841cfa41 Better support for stream operator in CheckAutoVariables::returnReference() (#6423) 2015-01-31 10:12:49 +01:00
PKEuS 3a1bd4a5ad Fixed gcc shadowing warnings 2015-01-30 22:04:26 +01:00
PKEuS dcc1362890 SymbolDatabase: Support std::array (fixes #6401) 2015-01-30 21:56:27 +01:00
PKEuS 03e44d4aa0 CheckMemoryLeakInFunction: Don't treat delete as delete operator for C code
Fixed GCC message in checkbufferoverrun.cpp
2015-01-30 20:55:53 +01:00
PKEuS 98e33a189f Enhanced CheckBufferOverrun:
- Fixed bug in library: manual and existing libraries use "size", but library.cpp reads "sizeof" as podtype attribute
- Fixed a couple of bugs in handling unknown size in checkbufferoverrun.cpp, get size from library if available.
2015-01-30 20:27:48 +01:00
PKEuS b69528eb80 Bailout in Token::getValueTokenDeadPointer() if reference is used (#6399) 2015-01-30 19:29:37 +01:00
PKEuS 0d151b45b5 Better support for funciton pointers in checkuninitvar.cpp (#6404) 2015-01-30 19:16:25 +01:00
PKEuS 80feb8697d Fixed false positives #6473 and #6469 2015-01-29 21:26:06 +01:00
PKEuS 71379616e7 Fixed false positive #6467 2015-01-29 10:18:21 +01:00
PKEuS 9ada111045 Fixed false positive #6466 2015-01-29 09:50:48 +01:00
PKEuS 8225b12763 Fixed some cppcheck messages 2015-01-28 22:29:07 +01:00
PKEuS 3342ea4c54 CheckInternal: Complain about Token::Match pattern if %or% or %oror% is the only "complex" pattern 2015-01-28 19:48:36 +01:00
PKEuS 21bd1d080e Refactorization: Rearranged some code in checkleakautovar.cpp 2015-01-28 19:44:59 +01:00
PKEuS 0488f45a5f Removed standalone check CheckOther::checkDoubleFree(), integrated (most of) the functionality into CheckLeakAutoVar. Added support for new/delete to checkLeakAutoVar. 2015-01-28 17:38:43 +01:00
PKEuS 5c56e63996 Fixed false positive #6452: Handle member functions in CheckIO::checkFileUsage() 2015-01-27 21:52:52 +01:00
PKEuS e82d2b3c8d Fixed false positive #6453: Skip over inner class if checking outer function 2015-01-27 21:21:17 +01:00
Daniel Marjamäki 3285f85ebf Fixed #6460 (Library: better function/type matching) 2015-01-27 17:55:18 +01:00
PKEuS bfa16ec258 Set /LARGEADDRESSAWARE flag for Win32 builds
Idea from Kosta-Github (pull-request #501)
2015-01-27 15:43:40 +01:00
Dmitry-Me e7bb43fc6b Cache and reuse token pointer 2015-01-27 10:23:58 +03:00
Dmitry-Me c79bfdce2c CheckClass: Better checking of what operator= returns 2015-01-24 11:18:33 +01:00
PKEuS ee046af20c Fixed false positives #6450 and #6451 2015-01-23 19:38:39 +01:00
PKEuS da35a74589 Fixed false negative: Passing uninitialized variable to stream (#4673) 2015-01-22 22:56:41 +01:00
PKEuS da5a04f071 Fixed recently introduced FP in checkuninitvar.cpp if address of variable is passed to a function 2015-01-22 21:22:02 +01:00
PKEuS 4c76f71499 Reactivated old uninitialized variable checker which I accidentially disabled in previous commit 2015-01-22 17:34:22 +01:00
PKEuS f4d11a4209 Fixed false negatives on try and non-executable scopes in checkUninitVar, removed unnecessary function parameters 2015-01-22 13:55:19 +01:00
PKEuS bdae9064ea Support throw in checkleakautovar.cpp 2015-01-22 11:12:26 +01:00
PKEuS 331a6b66be Fixed internal message 2015-01-22 10:53:53 +01:00
PKEuS 7c60fe4aef Fixed crash introduced by last commit. 2015-01-22 10:51:06 +01:00
PKEuS 7364cc8040 Fixed false positive in fityk: operator new calling constructor 2015-01-22 10:37:31 +01:00
PKEuS 60b2b655df Support new/delete in new uninitialized variable checking; realloc() requires an initialized first argument. 2015-01-21 23:46:52 +01:00
PKEuS c3e47f7eaa Fixed false positive in CheckUninitVar and internal message 2015-01-21 22:26:44 +01:00
PKEuS 94c3c45350 CheckUninitVar: Use function information from library, bailout for '?' 2015-01-21 22:02:25 +01:00
PKEuS ecb9d87e42 Fixed false positive: Bailout in checkuninitvar.cpp if setjmp is found 2015-01-21 16:49:34 +01:00
PKEuS 5334aaa25f Refactorization:
- Removed a few unit tests of old uninitialized variable checking expecting other results than same test for new checking
- A few tweaks to new uninitvar checking to improve results when run on tests for old check
- switched some (TODO) tests to new check if the TODO is fixed
2015-01-21 16:17:58 +01:00
PKEuS d8e282fe76 Refactorization: Made checkUninitVar::isVariableUsage() non-static 2015-01-21 13:52:03 +01:00
PKEuS 346532d312 Fixed false positives in CheckUninitVar::checkStruct() 2015-01-21 13:11:48 +01:00
PKEuS 54de731cac Refactorized CheckUninitVar::checkScope(), fixed false negative 2015-01-21 12:20:03 +01:00