Commit Graph

77 Commits

Author SHA1 Message Date
Daniel Marjamäki 501ab0b6da CheckLeakAutoVar: updated handling of unknown types in C++ 2015-08-11 12:41:42 +02:00
Daniel Marjamäki 57aec12f34 Fixed #5622 (Allow class methods to be referenced in library XML configuration files) 2015-08-10 18:51:51 +02:00
Daniel Marjamäki e598b07a6d Moved functions to astutils 2015-08-03 09:20:50 +02:00
Daniel Marjamäki e5151a13ab Fixed #6867 (False positive memleak) 2015-07-25 11:37:03 +02:00
Daniel Marjamäki b2b4bb49fa Refactoring handling of comparisons 2015-07-22 12:31:18 +02:00
Daniel Marjamäki c67776c04d Testing: extract testcases, edit comparisons, run cppcheck, compare results 2015-07-22 09:52:24 +02:00
Daniel Marjamäki 6313304f77 Fix Travis build 2015-07-22 01:52:24 +02:00
Daniel Marjamäki c6cadf5252 Fix Travis build 2015-07-22 01:41:01 +02:00
Daniel Marjamäki 350cba1c59 CheckLeakAutoVar: updated handling of comparisons after Tokenizer::simplifyIfNot was removed 2015-07-22 01:24:07 +02:00
Simon Martin fa94f2e0f4 Ticket #6648: Properly handle variables that have been deallocated and whose _address_ is taken after in CheckLeakAutoVar. 2015-07-19 17:37:50 +02:00
amai2012 4a47b8b3ae Refactoring: Better distinguish between C and C++ in a few checks. 2015-06-28 16:49:16 +02:00
Alexander Mai 70ba6c4340 #6767 False positive: memory leak when variable name is 'new'. Fix handling of new in C code. Move some tests for TokenList to new testtokenlist.cpp 2015-06-14 15:49:49 +02:00
Simon Martin 27e88fdc47 Ticket #6666: Don't crash upon garbage code in CheckLeakAutoVar::checkScope. 2015-05-10 11:35:33 +02:00
Daniel Marjamäki 5888b65bd4 fixed --check-library information message 2015-02-03 17:50:32 +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 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 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 bdae9064ea Support throw in checkleakautovar.cpp 2015-01-22 11:12:26 +01:00
Thomas Jarosch 059f9d056c Move to global variables to file scope
Putting them in the anonymous namespace
is the same effect as making them "static".
2015-01-11 12:37:11 +01:00
Daniel Marjamäki ff11ba9847 Updated copyright year to 2015 2015-01-03 12:14:58 +01:00
Daniel Marjamäki 24ecaf8b0a leakautovar: handling of unknown/non-pod types in c++ 2014-10-14 16:40:30 +02:00
PKEuS ccb5384645 Fixed false positive memoryLeak #6013 2014-09-30 13:02:02 +02:00
Jonathan Thackray 2b3ef83f26 Fixed #5747 (When socket() returns -1 on error, this shouldn't be marked as a resource leak) 2014-09-17 18:37:41 +02:00
Dmitry-Me ba3757dfd3 Bring variables decalaration to where they are really needed. 2014-07-10 11:23:14 +04:00
Daniel Marjamäki 1ae6531c4c Fixed #5923 (false positive: (error) Resource leak: fp (static file pointer)) 2014-06-23 16:05:28 +02:00
PKEuS dcc646735d Made static local variable non-static (thread-safety, #5934) 2014-06-18 17:57:31 +02:00
PKEuS 1fc1ff1993 Moved implementation of two functions to new file check.cpp -> Don't include <iostream> everywhere 2014-05-24 12:50:04 +02:00
PKEuS 8f79dc3ff8 Cleaned up includes and forward declarations in checkers:
- Removed definitely unnecessary forward declarations (e.g. "class Token"; token.h is already included by check.h, so a definition is unnecessary)
 - Removed unused includes
2014-05-24 12:50:03 +02:00
Daniel Marjamäki 42b85088c5 Double free: Improved handling of noreturn functions. Partial revert of previous fix. 2014-05-04 13:11:21 +02:00
Daniel Marjamäki 636a15ac55 Doublefree: Fixed FP when exit() is called 2014-05-04 12:02:55 +02:00
Daniel Marjamäki 01d14d0388 Library: Refactoring alloc/dealloc functions. Normally the token should be passed so extra validation can be made 2014-04-20 14:59:16 +02:00
Daniel Marjamäki 2d645f57b9 Fixed #5576 (false positive: (POSIX) (error) Resource leak: sockfd) 2014-04-18 18:18:47 +02:00
Daniel Marjamäki fd3a8a2a18 Update copyright 2014-02-15 07:45:39 +01:00
Daniel Marjamäki 36ef34a2cf astyle formatting 2013-07-28 11:53:49 +02:00
Simon Martin 470a9a6c71 Take into account break and continue statements in CheckLeakAutoVar. 2013-07-28 10:26:46 +02:00
Daniel Marjamäki be5e4ccfd5 Library: Renamed <ignore> to <leak-ignore> 2013-07-20 13:12:24 +02:00
Daniel Marjamäki 6fe1b92a47 Improved --check-library messages 2013-07-16 18:50:25 +02:00
Daniel Marjamäki 7d47fd65a2 Renamed --environment to --library. Added --check-library. Renamed Environment to Library 2013-07-08 18:26:18 +02:00
Daniel Marjamäki 61e1dd5096 Environment: Refactoring and cleanup 2013-07-05 20:55:31 +02:00
Daniel Marjamäki d96fb577cd CLI: Added --environment flag 2013-07-02 07:18:19 +02:00
PKEuS c2664a063e Use existing Standards object instead of creating new one
Made const dummy variable static
2013-04-18 04:24:09 -07:00
PKEuS d78c06dc3f Replaced _settings->isEnabled("style") by _settings->isEnabled("warning") wherever warnings are issued 2013-03-03 02:41:59 -08:00
PKEuS 0105f8223c Simplified several Token::Match/simpleMatch calls when match string consists of a single pattern
Fixed two CheckInternal error messages
2013-03-01 03:42:04 -08:00
Robert Reif 42588e9729 Fixed #4535 (Simplify checks by caching symbol database Variable pointer in Token) 2013-02-06 06:39:58 +01:00
Reijo Tomperi 5d5f7085bf Updating year 2012 -> 2013 to .cpp and .h files and man page. 2013-01-01 18:29:08 +02:00
Daniel Marjamäki 38213f1f2f Fixed #4237 (False positive: (error) Memory Leak: data (assign reference variable value to a shadow variable in inner scope)) 2012-10-27 16:36:14 +02:00