Commit Graph

24759 Commits

Author SHA1 Message Date
Daniel Marjamäki acd54e24b6 cppcheck.cbp : Added testclass.cpp 2008-12-07 12:04:16 +00:00
Daniel Marjamäki 0b35581d44 Virtual destructors : Don't check base classes when inheritance is
non-public
2008-12-07 10:13:51 +00:00
Daniel Marjamäki 5ea2844b85 Constructors : Refactoring + Added checking of 'operator=' 2008-12-07 08:49:35 +00:00
Daniel Marjamäki c907589deb Fixed a bug in Tokenizer::simplifyTokenList. The keyword operator is
never used in a variable declaration
2008-12-07 08:47:56 +00:00
Daniel Marjamäki ea57f2b820 Memory leaks : Handle assignments better - bug 2395524 2008-12-07 07:32:02 +00:00
Daniel Marjamäki f01cb905f7 Check constructors: Minor optimisation 2008-12-07 07:02:00 +00:00
Daniel Marjamäki f8087b1f3f Constructors : Fixed so the test that kush_eplus added works 2008-12-07 06:58:23 +00:00
Daniel Marjamäki f63f223976 Refactoring. Use "str" instead of "aaaa0" 2008-12-07 06:44:36 +00:00
Daniel Marjamäki 774ca2c350 Refactoring: use "findmatch" instead of "findtoken" 2008-12-07 06:37:50 +00:00
Daniel Marjamäki 057d6f1f18 Virtual destructors : Handle inheritance where
"private|protected|public" is not defined
2008-12-07 06:31:54 +00:00
Nicolas Le Cam 5a80bcc352 Add a test case that currently fail 2008-12-07 01:47:24 +00:00
Nicolas Le Cam d77956f63f Fix bug when calling cppcheck without --recursive flag 2008-12-07 00:56:24 +00:00
Daniel Marjamäki 3962bb7ae0 Virtual destructors : Minor fix to a test to handle a private inheritance 2008-12-06 19:57:33 +00:00
Daniel Marjamäki b560215bc6 Virtual Destructors : pattern for declaring a derived class... "class %var% : public|protected|private %var% .." 2008-12-06 19:56:33 +00:00
Daniel Marjamäki 984cd47aac virtual destructor : iterate through base classes for a derived class to check that the destructor in each base class i virtual 2008-12-06 19:26:13 +00:00
Daniel Marjamäki 8a06b71949 Uninitialized member variables : Don't give false positives for private constructors 2008-12-06 19:14:04 +00:00
Daniel Marjamäki 1a5d694834 testclass : Added a new unit testing file 2008-12-06 18:31:26 +00:00
Daniel Marjamäki b71adda8b5 Minor optimisation. Don't do redundant checking 2008-12-06 17:54:27 +00:00
Daniel Marjamäki 93c04efc95 tokenize: "~Base" should generate two tokens. "~" and "Base" 2008-12-06 17:53:30 +00:00
Daniel Marjamäki 4493400c49 Class checking : Check that base class destructors are virtual. Experimental 2008-12-06 17:34:34 +00:00
Daniel Marjamäki bcccb4bc91 CheckClass : Refactoring - Removed include and moved struct VAR into the class 2008-12-06 17:00:14 +00:00
Daniel Marjamäki d3f68a9a5d Unreachable code : minor bug fixes 2008-12-06 16:54:45 +00:00
Daniel Marjamäki 4ef7839d6a Unreachable code : Fixed false positives for label 2008-12-06 16:34:44 +00:00
Daniel Marjamäki 4d070f04e5 Added check that detects unreachable code below a 'return' statement 2008-12-06 16:25:24 +00:00
Daniel Marjamäki 7c32b7b2bb Memory leaks: Better handling of "realloc". Fixing bug [ 2395262 ] 2008-12-06 13:33:22 +00:00
Daniel Marjamäki 202c613e70 TODO: Added a todo for refactoring TOKEN::Match 2008-12-06 13:21:33 +00:00
Daniel Marjamäki 7196b8a028 Tokenizer: Remove "volatile" keyword to simplify checking 2008-12-06 13:10:38 +00:00
Daniel Marjamäki 2cc7dbda67 Fixed so that the expected and actual values in asserts are not mixed 2008-12-06 12:57:06 +00:00
Daniel Marjamäki 4c92c8e6e7 testtokenize: Added TestTokenize::match1 that makes sure the old
matching of "|" and "||" still works
2008-12-06 12:54:40 +00:00
Reijo Tomperi d307b999e0 CheckMemoryLeak.cpp, g_renew and g_try_renew also removed 2008-12-06 12:45:54 +00:00
Reijo Tomperi 0ea34d4705 Memory leak: False positive with g_realloc(). Removed g_realloc() and g_try_realloc() for now. See feature request [ 2395262 ] Check leaks with realloc, g_realloc and
g_try_realloc()
2008-12-06 11:41:08 +00:00
Reijo Tomperi 2f27bf09b8 cppcheck and executor, fixed compiling error 2008-12-06 09:27:28 +00:00
Daniel Marjamäki 6d7a0e65b3 refactoring: Increased constness of function parameters 2008-12-06 07:40:13 +00:00
Reijo Tomperi 345a7f2c9b Preprocessor: Fixed bug, read() didn't handle correctly string constants like this: "\"" 2008-12-05 22:18:13 +00:00
Reijo Tomperi a669d020cf Token: Fixed bug in match function, simplified CheckBufferOverrun code 2008-12-05 20:37:05 +00:00
Daniel Marjamäki 48dd250796 Memory leak: refactoring - changed "aaaa" to "str" 2008-12-05 19:37:11 +00:00
Daniel Marjamäki f7a846e31e tokenize: Replace a complicated condition with a "Match" 2008-12-05 19:17:25 +00:00
Daniel Marjamäki b029163cdc tokenize: Replace "aaaa" and "strcmp" with "str" and "Match" 2008-12-05 19:04:41 +00:00
Daniel Marjamäki e385bcd83b CheckHeaders: Refactoring so str and Match is used instead of aaaa and
strcmp etc
2008-12-05 18:46:05 +00:00
Daniel Marjamäki 62e363daa5 Memory leak: Replaced a few "strcmp" with "==" 2008-12-05 18:39:23 +00:00
Daniel Marjamäki 963760b59f Buffer overrun: Minor refactoring. Use the Match function better. 2008-12-05 18:35:36 +00:00
Daniel Marjamäki 09f7c07a4d tokenize: Minor refactorings 2008-12-05 18:25:08 +00:00
Daniel Marjamäki 89663bef0a CheckOther: Fixed a compiler warning 2008-12-05 18:17:51 +00:00
Reijo Tomperi a4d4305919 Bug fix: Minor bug in previous commit, test added to catch that bug also. 2008-12-04 21:52:40 +00:00
Reijo Tomperi c958482196 TOKEN: Match() function improved, %any% and const|volatile kind of patterns are now accepted. Simplified comparing on tokenize.cpp. 2008-12-04 21:48:15 +00:00
Daniel Marjamäki 3820a26e1c Tokenizer: Simplify numeric comparisons 2008-12-04 19:32:26 +00:00
Daniel Marjamäki c6ed868009 testsuite: show diffing strings better when they are not equal 2008-12-04 19:31:30 +00:00
Daniel Marjamäki e9a533fb32 TestTokenize: Use TOKEN::str() instead of TOKEN::aaaa() where possible 2008-12-04 07:35:48 +00:00
Daniel Marjamäki 5ce5c7ab63 Preprocessor: Minor refactoring and improved testing 2008-12-04 07:34:31 +00:00
Reijo Tomperi 5eb653911e Tokenizer: Fixed bug, const and volatile functions were not recogniced
by fillFunctionList()
2008-12-03 20:22:48 +00:00