Commit Graph

82 Commits

Author SHA1 Message Date
Daniel Marjamäki 140e086206 Fixed #7738 (False positive deallocret - delete and return NULL pointer) 2017-04-24 22:05:16 +02:00
Daniel Marjamäki 50da7d4919 Tokenizer: Write syntax error if there is C++ code in C file. 2017-04-06 08:50:35 +02:00
Daniel Marjamäki b5f2fd3c55 Fixed #7738 (False positive deallocret - delete and return NULL pointer) 2017-03-03 18:36:06 +01:00
Daniel Marjamäki 99544069d1 CheckLeakAutoVar: better handling of noreturn functions. Partial fix for #7918. 2017-02-25 11:36:48 +01:00
Simon Martin f43431408b Ticket #7685: Properly handle function calls as argument to a dealloc function. (#853)
Add an optional extended description…
2016-12-29 13:17:46 +01:00
Daniel Marjamäki 74fa69fe5e Fixed #7821 (syntax error, first token is &) 2016-11-20 17:59:50 +01:00
PKEuS 54959d1932 CheckLeakAutoVar: Distinguish between new and new[] (#888) 2016-10-09 10:28:19 +02:00
Daniel Marjamäki 4b903a838f Fixed #5522 (CheckLeakAutoVar: Don't treat 'x==p' as dereference of p) 2016-05-26 19:22:38 +02:00
Daniel Marjamäki 38741868b5 Fixed #3989 (false positive: memory leak (inline function)) 2016-05-26 17:42:27 +02:00
PKEuS 64d2fd2f57 Added new attribute "arg" to <alloc> and <dealloc> to specify the argument that is allocated/deallocated.
This fixes several issues with allocation functions in windows.cfg, such as HeapAlloc() and VirtualAllocEx() (#7503)
2016-05-22 17:19:14 +02:00
Daniel Marjamäki c23c1f245c Fixed #6989 (incorrect memleak error) 2016-05-21 14:03:28 +02:00
Daniel Marjamäki 2668cee3cf Fixed #6397 (FP deallocuse - conditional deallocation and conditional return) 2016-05-15 20:27:44 +02:00
Kamil Dudka efe98883ab checkleakautovar: do not miss 'throw' followed by :: 2016-05-13 21:37:49 +02:00
PKEuS f23668dfcc Fixed false positive doubleFree (#7401) 2016-05-04 12:14:42 +02:00
Lauri Nurmi 996c9244d8 Update copyright year to 2007-2016. 2016-01-01 15:34:45 +02:00
Daniel Marjamäki 0f9d90d2be Changed Copyrights. Removed my name. 2015-11-18 20:04:50 +01:00
PKEuS 3a5cef8a7e Refactorization: Improved usage of Settings instances in test suite 2015-10-07 18:40:03 +02:00
PKEuS 93dbfb72d1 Improved REGISTER_TEST() macro to support several occurrences within a single file 2015-10-07 14:30:01 +02:00
Daniel Marjamäki 501ab0b6da CheckLeakAutoVar: updated handling of unknown types in C++ 2015-08-11 12:41:42 +02:00
Daniel Marjamäki e5151a13ab Fixed #6867 (False positive memleak) 2015-07-25 11:37:03 +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
Alexander Mai 7416d6add9 Another fix for handling of final/override specifiers in Tokenizer::simplifyKeyword() including a testcase. Ran astyle 2015-05-23 20:51:15 +02:00
Pierre Schweitzer 5a68e352df Add various tests targeting Windows platform to show the current troubles cppcheck has to distinguish two different source of allocation used together. 2015-05-19 21:23:09 +02:00
PKEuS bc5132e0ac Refactorization: Moved declaration of errout, ... to testsuite.h, uniformized style 2015-03-11 22:54:43 +01:00
Daniel Marjamäki c2b85d1032 Fixed testrunner 2015-02-03 18:35:52 +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 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
Daniel Marjamäki ff11ba9847 Updated copyright year to 2015 2015-01-03 12:14:58 +01:00
Daniel Marjamäki 051d42ae6b astyle formatting 2014-11-20 14:20:09 +01:00
orbitcowboy f5d804f71a running astyle 2014-11-20 10:13:03 +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
Daniel Marjamäki 1ae6531c4c Fixed #5923 (false positive: (error) Resource leak: fp (static file pointer)) 2014-06-23 16:05:28 +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 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
PKEuS 4f0121ee2f Splitted simplification out of tokenize() 2013-12-30 17:45:28 +01:00
PKEuS a9a5dc0354 Updated to AStyle 2.03, require this version 2013-08-07 16:27:37 +02: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 0c5e39a813 Library: Added configuration file std.cfg that clients should load. 2013-07-20 17:12:56 +02:00
Daniel Marjamäki 7eb1f36200 astyle formatting 2013-07-19 09:28:45 +02:00
Daniel Marjamäki 6fe1b92a47 Improved --check-library messages 2013-07-16 18:50:25 +02:00