Commit Graph

62 Commits

Author SHA1 Message Date
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
Reijo Tomperi e83db8ac7b Fix ticket #288 (Tokenizer::syntaxError should use error logger instead of std::cout)
http://apps.sourceforge.net/trac/cppcheck/ticket/288
2009-05-11 22:52:04 +03:00
Reijo Tomperi 63da926ed2 Fix ticket #294 (### Error: Invalid number of character ()
http://apps.sourceforge.net/trac/cppcheck/ticket/294
2009-05-09 22:32:29 +03:00
Reijo Tomperi dd8b738f7f Initial fix for ticket #283 (segmentation fault when checking xterm sources)
http://apps.sourceforge.net/trac/cppcheck/ticket/283
It should print out error message now instead of crashing. Cleanup is needed.
2009-05-07 23:17:29 +03:00
Daniel Marjamäki 7a8b980627 templates: extracted the template simplification into a separate function 2009-05-03 21:23:47 +02:00
Daniel Marjamäki 65070cc067 Simplify if conditions more.. simplifyIfAssign + simplifyIfNot 2009-03-24 18:23:21 +01:00
Daniel Marjamäki 7905cbc5e7 simplify tokens: move assignment out from condition (Ticket #201) 2009-03-23 18:20:56 +01:00
Daniel Marjamäki f37dd4f143 Fixed ticket 184 (Tokenizer - Simplification: Split up variable declarations) 2009-03-18 20:32:05 +01:00
Reijo Tomperi b3dd9e699b --debug flag can be used to printout token list (for development purposes) 2009-03-16 23:31:52 +02:00
Reijo Tomperi c385b3e045 Improve creation of link() for Token class. Tokenizer::simplifyTokenList() should now return
code where Token::link() actually works.
2009-03-15 01:39:45 +02:00
Daniel Marjamäki daa911daeb refactoring: moved 'FindClassFunction' from CheckClass to Tokenizer 2009-03-13 22:28:44 +01:00
Reijo Tomperi 3c4704a00c Fix ticket #151 (Handling of namespaces)
http://apps.sourceforge.net/trac/cppcheck/ticket/151
2009-03-13 01:07:05 +02:00
Daniel Marjamäki 5c1d4f2703 simplify calculations better 2009-03-04 06:24:03 +00:00