Commit Graph

163 Commits

Author SHA1 Message Date
Daniel Marjamäki b67fe861b8 Added testcase for #807 (cppcheck crashes scanning ruby 1.9.1) 2009-10-10 10:13:56 +02:00
Daniel Marjamäki 67f53661a9 Fixed #806 (cppcheck crashes scanning openssl) 2009-10-09 21:11:29 +02:00
Reijo Tomperi 13fbd616da Moved some test cases from testtokenize into testsimplifytokens and added one TODO case. 2009-10-06 12:40:50 +03:00
Reijo Tomperi 0a7da96cb6 Fix #765 (divsion by zero not detected in std::cout stream)
http://sourceforge.net/apps/trac/cppcheck/ticket/765
2009-10-06 09:14:59 +03:00
Daniel Marjamäki ee1bcb728c use '<' comparisons instead of '>' (#610) 2009-10-04 07:51:12 +02:00
Slava Semushin 9983066f62 Fixed #770 (Tokenizer: Var id not set for static variables in some cases)
http://sourceforge.net/apps/trac/cppcheck/ticket/770
2009-10-03 17:05:07 +07:00
Reijo Tomperi 107895e8cc TODO test cases TestTokenizer::vardec_static added 2009-10-02 17:28:30 +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 f9871c2d54 Fix #745 (false positive: possible null pointer dereference , while)
http://sourceforge.net/apps/trac/cppcheck/ticket/745
2009-09-30 21:42:14 +03:00
Reijo Tomperi 6ed727564c Fix #759 (Tokenizer: Incorrect var id when two variables with same name)
http://sourceforge.net/apps/trac/cppcheck/ticket/759
2009-09-30 14:40:10 +03:00
Reijo Tomperi ededbfb10e Fix comment in test case 2009-09-29 17:19:56 +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
Slava Semushin b9237db9a3 Fixed #753 (Tokenizer: don't simplify variables inside do {} while loop)
http://sourceforge.net/apps/trac/cppcheck/ticket/753
2009-09-28 22:15:31 +07:00
Reijo Tomperi fdde2182b9 Fix GPL comments in all files. ">." was missing from the end. 2009-09-27 18:08:31 +03:00
Slava Semushin a919f4541a Fixed #732 (Tokenizer: Incorrect simplification)
Regression since 58a9e05697 commit.

http://sourceforge.net/apps/trac/cppcheck/ticket/732
2009-09-26 17:02:13 +07:00
Reijo Tomperi 62ccda5677 Fix #713 (Tokenizer: Simplify 0L)
http://sourceforge.net/apps/trac/cppcheck/ticket/713
Use MathLib to handle other variations of 0.
2009-09-23 22:44:52 +03:00
Reijo Tomperi ef09f3475c Fix #713 (Tokenizer: Simplify 0L)
http://sourceforge.net/apps/trac/cppcheck/ticket/713
2009-09-23 00:23:11 +03:00
Daniel Marjamäki faac5bccd6 Fixed #702 (If you see this, there is a bug - varid was 0) 2009-09-22 17:49:13 +02:00
Reijo Tomperi 1c01dd64f3 Fix #703 (Tokenizer: Create links for [])
http://sourceforge.net/apps/trac/cppcheck/ticket/703
2009-09-20 23:13:06 +03:00
Slava Semushin 7236230228 Additional fix for better simplifying array declaration.
Pointed out by hyd_danmar@ in IRC.

Addressed to #696
2009-09-20 18:28:56 +07:00
Slava Semushin 58a9e05697 Fixed #696 (Tokenizer: Simplify array declaration)
http://sourceforge.net/apps/trac/cppcheck/ticket/696
2009-09-20 17:28:15 +07:00
Reijo Tomperi 661e4504cb astyle fix 2009-09-19 14:21:50 +03:00
Slava Semushin 7a07f9343f test/testtokenize.cpp: refactoring code.
- introduce and use simplifyKnownVariables() function
- don't append leading space to result string with tokens

No functional change.
2009-09-19 13:55:41 +07:00
Reijo Tomperi 2b6955dde5 Fix #670 (Tokenizer: Simplify '\0' into 0)
http://sourceforge.net/apps/trac/cppcheck/ticket/670
2009-09-14 21:42:56 +03:00
Slava Semushin 8cafaf2960 Fixed #603 (Tokenizer: Incorrect simplification of < >)
http://sourceforge.net/apps/trac/cppcheck/ticket/603
2009-08-23 13:26:16 +07: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
Daniel Marjamäki 94c49bc34e Fixed #608 (Tokenizer: simplifyKnownVariables doesn't handle 'while (--i)' correctly) 2009-08-22 10:23:55 +02:00
Slava Semushin cbeb45566b Fixed #609 (Tokenizer: don't add {} after do-while();)
http://sourceforge.net/apps/trac/cppcheck/ticket/609
2009-08-22 14:49:45 +07:00
Reijo Tomperi 4f8a06ed0d Initial work for class and member function/variable list in tokenizer. 2009-08-12 23:50:03 +03:00
Slava Semushin 6a7624054e Fixed ticket #584 (Tokenizer: don't set varId for class declaration)
http://sourceforge.net/apps/trac/cppcheck/ticket/584
2009-08-12 01:58:49 +07:00
Slava Semushin c66103f7bc Fixed ticket #574 (Tokenizer: not assign varId when variable first afer keyword and has long type)
http://sourceforge.net/apps/trac/cppcheck/ticket/574
2009-08-09 15:41:31 +07:00
Slava Semushin 50f7fa5828 Fixed ticket #565 (Tokenizer: simplify variable declaraion like 'int z = x >> 16')
http://sourceforge.net/apps/trac/cppcheck/ticket/565
2009-08-08 17:33:07 +07:00
Daniel Marjamäki e1beb70f80 Fixed #558 (Tokenizer: Bad simplification of 'for(unsigned i = 0; i < 100; ++i)') 2009-08-05 20:15:48 +02:00
Daniel Marjamäki 706ba34a6d Refactoring the unit testing 2009-08-04 21:32:14 +02:00
Slava Semushin 0445edf6fe Fixed #542 (Tokenizer: allow numbers in templates parameters)
http://sourceforge.net/apps/trac/cppcheck/ticket/542
2009-08-01 23:17:35 +07:00
Slava Semushin 0e2273833e Fixed ticket #539 (Tokenizer: don't replace constants variables with varid 0)
http://sourceforge.net/apps/trac/cppcheck/ticket/539
2009-08-01 20:57:54 +07:00
Slava Semushin 8588012df7 Fixed #521 (Tokenizer: improve static variable detection)
Also change cppcheck default behavior to don't show "If you see this,
there is a bug" message for each variable without varId. This feature
was very helpful for developers but may annoying users.

http://sourceforge.net/apps/trac/cppcheck/ticket/521
2009-08-01 00:40:36 +07:00
Daniel Marjamäki 2b26a320f0 astyle formatting 2009-07-31 14:01:50 +02:00
Slava Semushin 5db677bc30 Fixed ticket #523 (Tokenizer: set varId for types with long namespaces)
FIXME: skip namespaces by the best way.

http://sourceforge.net/apps/trac/cppcheck/ticket/533
2009-07-31 00:40:41 +07:00
Slava Semushin 681b836389 Fixed ticket #532 (Tokenizer: set varId for types which have comma in template parameter)
http://sourceforge.net/apps/trac/cppcheck/ticket/532
2009-07-31 00:25:26 +07:00
Slava Semushin 8b0c1daf98 Fixed ticket #522 (Tokenizer: recognize comma in container with STL type declaration)
http://sourceforge.net/apps/trac/cppcheck/ticket/522
2009-07-29 02:46:33 +07:00
Slava Semushin f50aa1e188 Fixed ticket #520 (Tokenizer: properly set varId for containers with STL types)
http://sourceforge.net/apps/trac/cppcheck/ticket/520
2009-07-29 00:54:13 +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
Slava Semushin 88d7c598e3 test/testtokenize.cpp: use tokenizeAndStringify() function.
Instead of self-written code.

No functional change.
2009-07-25 16:41:16 +07:00
Daniel Marjamäki ffac9281c4 astyle formatting 2009-07-18 20:35:22 +02:00
Slava Semushin 53c120c701 Fixed ticket #479 (varId not assigned to reference to standart container)
http://sourceforge.net/apps/trac/cppcheck/ticket/479
2009-07-18 17:41:46 +07:00
Daniel Marjamäki 17008879ac minor refactoring: header cleanup. use forward declarations instead of includes 2009-07-13 19:11:31 +02:00
Kimmo Varis 6393498966 Astyle fixes. 2009-07-13 16:51:35 +03:00
Daniel Marjamäki a6ac747830 tokenizer: Don't simplify declarations of static variables 2009-07-06 11:45:14 +02:00
Reijo Tomperi 8b0e481d46 Refactoring: Rename member functions to follow naming guidelines. 2009-07-05 23:16:43 +03:00