Commit Graph

74 Commits

Author SHA1 Message Date
Reijo Tomperi 8472e58413 Refactored sizeof simplification and fixed one TODO assert. 2009-10-07 10:54:34 +03:00
Reijo Tomperi 50d9bc78ef Refactoring: Remove findClosing(). It is replaced by Token::link(). 2009-10-05 15:06:50 +03:00
Daniel Marjamäki e894e37131 Fixed #679 (False positive: Unused private function produced by exception specification) 2009-10-01 19:45:48 +02:00
Reijo Tomperi 7852d38f54 Fix #761 (Tokenizer: typedef inside class is incorrectly simplified)
http://sourceforge.net/apps/trac/cppcheck/ticket/761
2009-09-30 14:35:00 +03:00
Reijo Tomperi 2d4404f030 Fix #754 (Tokenizer: transform modifier "signed" to "int")
http://sourceforge.net/apps/trac/cppcheck/ticket/754
Also fix int unsigned -> unsigned int
2009-09-28 21:25:05 +03:00
Reijo Tomperi fdde2182b9 Fix GPL comments in all files. ">." was missing from the end. 2009-09-27 18:08:31 +03:00
Reijo Tomperi d1f3953cce Fix #720 (String length for strings like this "\x61" is calculated wrong)
http://sourceforge.net/apps/trac/cppcheck/ticket/720
2009-09-27 17:04:10 +03:00
Daniel Marjamäki 36c838c0e2 Replaced UNIT_TESTING ifdef with _MSC_VER 2009-09-23 22:16:46 +02:00
Daniel Marjamäki e3119235e0 Tokenizer: Added a simple validation function that we can use during debugging 2009-09-13 15:35:37 +02:00
Slava Semushin eb6b5cfce6 Tokenizer::simplifyMathFunctions(): change return type to void.
Correction for 241f585d34 commit.

No functional change.
2009-09-13 14:53:15 +07:00
Daniel Marjamäki c0ca375ef7 Fixed #478 (Warnings in Visual Studio build with -W4) 2009-09-13 09:03:48 +02:00
Reijo Tomperi 241f585d34 Fix #594 (division by zero not detected when using atol or atof)
http://sourceforge.net/apps/trac/cppcheck/ticket/594
Simplify atol("0") into 0 (and other atol() calls also)
2009-09-12 23:54:47 +03:00
Reijo Tomperi a6c809226e Fix #656 (Improve const-correctness)
http://sourceforge.net/apps/trac/cppcheck/ticket/656
Applied slightly modified patch from elfring
2009-09-10 00:25:58 +03:00
Slava Semushin 572c206755 Refactoring: move code for sizeof() simplification to method.
Introduce and use Tokenizer::simplifySizeof() method.

No functional change.
2009-09-06 18:23:17 +07:00
Slava Semushin a9273c9d39 Fixed #629 (Tokenizer: expand nested strcat() calls)
http://sourceforge.net/apps/trac/cppcheck/ticket/629
2009-09-05 23:46:27 +07:00
Slava Semushin 18fd2528f8 Tokenizer::simplifyFunctionParameters(): change return type to void.
No functional change.
2009-08-30 02:37:15 +07:00
Slava Semushin 19e327607f Tokenizer::simplifyConditionOperator(): change return type to void.
No functional change.
2009-08-30 02:33:21 +07:00
Slava Semushin 33ee1b8d98 Tokenizer::elseif(): change return type to void.
No functional change.
2009-08-30 02:33:14 +07:00
Slava Semushin 8efacf5dc3 Tokenizer::simplifyDoWhileAddBraces(): change return type to void.
No functional change.
2009-08-30 02:33:03 +07:00
Slava Semushin a1f40f3c17 Tokenizer::simplifyIfAddBraces(): change return type to void.
No functional change.
2009-08-30 02:32:45 +07:00
Slava Semushin ea45d985c7 Tokenizer::simplifyComma(): change return type to void.
No functional change.
2009-08-30 02:23:39 +07:00
Slava Semushin 80a305a2ce Tokenizer::simplifyIfNotNull(): change return type to void.
No functional change.
2009-08-30 02:21:06 +07:00
Slava Semushin 3f905da9c6 Tokenizer::simplifyIfNot(): change return type to void.
No functional change.
2009-08-30 02:19:45 +07:00
Slava Semushin b435764083 Tokenizer::simplifyIfAssign(): change return type to void.
No functional change.
2009-08-30 02:17:17 +07:00
Slava Semushin 030a0c19df Tokenizer::simplifyVarDecl(): change return type to void.
No functional change.
2009-08-30 02:07:09 +07:00
Slava Semushin 1cb1709d7c Tokenizer::simplifyCasts(): change return type to void.
No functional change.
2009-08-30 02:06:14 +07:00
Slava Semushin 6f93182580 Tokenizer::simplifyLogicalOperators(): change return type to void.
No functional change.
2009-08-30 02:03:37 +07:00
Slava Semushin 085187b445 Tokenizer: enhance simplifyNot() and rename to simplifyLogicalOperators().
Don't replace "and" everything becuse it may be used as variable name.

Better fix for #620
Corrections for commit eb05cf904d
2009-08-29 20:42:14 +07:00
Daniel Marjamäki c25e1963b1 Fixed #498 (Tokenizer: simplify 'goto') 2009-08-24 23:10:12 +02:00
Slava Semushin acc38a8bbf Fixed #592 (Tokenizer: improve the tokenization of do .. while)
http://sourceforge.net/apps/trac/cppcheck/ticket/592
2009-08-22 17:49:42 +07:00
danmar dfa8a2e67c Visual C++: Fixed testrunner compilation problems 2009-08-14 12:46:55 +02:00
Reijo Tomperi 4f8a06ed0d Initial work for class and member function/variable list in tokenizer. 2009-08-12 23:50:03 +03:00
Daniel Marjamäki 706ba34a6d Refactoring the unit testing 2009-08-04 21:32:14 +02:00
Slava Semushin a73346e889 Fixed ticket #496 (Tokenizer: simplify statements with "," better)
https://sourceforge.net/apps/trac/cppcheck/ticket/496
2009-07-26 18:03:11 +07:00
Slava Semushin 8643936e0c Fixed ticket #500 (Tokenizer: simplify the "(p != NULL)" conditions)
Also teach simplifyIfNot() to handle variables like Foo::var.

https://sourceforge.net/apps/trac/cppcheck/ticket/500
2009-07-25 18:23:03 +07:00
Kimmo Varis 180a04316d Fix couple of doxygen errors and warnings. 2009-07-18 11:25:22 +03:00
Daniel Marjamäki 7df3670128 doc: updated doxygen comments. three groups where created - 'GUI', 'Core' and 'Checks' 2009-07-17 10:49:01 +02:00
Daniel Marjamäki 69b1df3bb8 tokenizer: simplify the '?:' operator 2009-07-14 12:06:38 +02:00
Daniel Marjamäki 17008879ac minor refactoring: header cleanup. use forward declarations instead of includes 2009-07-13 19:11:31 +02:00
Reijo Tomperi 8b0e481d46 Refactoring: Rename member functions to follow naming guidelines. 2009-07-05 23:16:43 +03:00
Reijo Tomperi f676deb208 Test case improvement, unused function removed from tokenizer. 2009-07-05 22:37:53 +03:00
Reijo Tomperi e858ab2f0d Fix ticket #457 (False positive: Member variable not assigned a value in copy constructor)
http://sourceforge.net/apps/trac/cppcheck/ticket/457
Simplify "a = 0, b = 0;" into "a = 0; b = 0;"
2009-07-05 21:29:09 +03:00
Reijo Tomperi ac6e7b40e5 Fix ticket #426 (Problem with include)
http://sourceforge.net/apps/trac/cppcheck/ticket/426
2009-06-20 23:13:19 +03:00
Slava Semushin cba0d9e130 Fixed ticket #392 (false positive and wrong allocation and deallocation not detected)
http://sourceforge.net/apps/trac/cppcheck/ticket/392
2009-06-12 21:14:01 +07:00
Slava Semushin 7bee0cd2df Fixed ticket #390 (wrong allocation and deallocation not detected)
http://sourceforge.net/apps/trac/cppcheck/ticket/390
2009-06-12 20:04:58 +07:00
Reijo Tomperi 092bd79ec4 Fix ticket #386 (False positive (memory leak) with comma)
http://apps.sourceforge.net/trac/cppcheck/ticket/386
2009-06-11 00:12:26 +03:00
Daniel Marjamäki dd473b074a Fix #153 (Unsigned divide)
The "unsigned i" variable declaration wasn't handled well. So I added an "int" token.
2009-06-06 10:40:48 +02:00
Reijo Tomperi 9cd5558f5e Fix ticket #364 (false positive:: division by zero)
http://apps.sourceforge.net/trac/cppcheck/ticket/364
2009-06-06 00:33:13 +03:00
Daniel Marjamäki aba7518aeb Fixed ticket #345 ('!' and 'not' tokens interpreted differently even though they mean the same) 2009-05-31 10:42:27 +02:00
Reijo Tomperi 58eda6e978 Fix ticket #325 (Replace developer names in source files with AUTHORS file)
http://apps.sourceforge.net/trac/cppcheck/ticket/325
2009-05-30 08:48:12 +03:00