Commit Graph

117 Commits

Author SHA1 Message Date
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
Reijo Tomperi bdf1987cc4 Fix ticket #435 (False positive: Invalid number of character when ({}) is used in code)
http://sourceforge.net/apps/trac/cppcheck/ticket/435
2009-06-22 23:54:11 +03:00
Daniel Marjamäki 13b8f10906 refactoring testcases for Tokenizer::simplifyAddBraces 2009-06-20 13:20:51 +02:00
Reijo Tomperi 5f7d88b36c Fix ticket #416 (False positive: Redundant code)
http://sourceforge.net/apps/trac/cppcheck/ticket/416
2009-06-19 19:03:09 +03:00
Reijo Tomperi c28cd3f82e astyle fix 2009-06-18 21:05:42 +03:00
Slava Semushin fafc261611 Fixed ticket #278 (variable id: references are not handled correctly)
http://sourceforge.net/apps/trac/cppcheck/ticket/278
2009-06-18 23:30:04 +07:00
Slava Semushin 8c327f82b3 Fixed ticket #346 (adding a "const" token prevents detection of memory leak)
http://sourceforge.net/apps/trac/cppcheck/ticket/346
2009-06-15 00:32:34 +07:00
Daniel Marjamäki af7c63155e Fixed #387 (Templates: template functions that return a pointer are not simplified correctly)
* Fixed so that the tokenizer handle variable declarations better when the variable is assigned the return value of a template function
 * Fixed so that the simplifyTemplates detect that a template function is used when its return value is taken
2009-06-14 14:57:47 +02: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
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
Slava Semushin 52a8368b02 Strip redundant std::string usage from tests.
Second round: handle empty strings.

Done by command:
git grep -l ASSERT_EQUALS | xargs sed -i 's|ASSERT_EQUALS(std::string(\(".*"\)),|ASSERT_EQUALS(\1,|'

Should be no functional change.
2009-06-05 07:43:55 +07:00
Reijo Tomperi 3428584925 Fix ticket #351 (false positive::resource leak)
http://apps.sourceforge.net/trac/cppcheck/ticket/351
2009-06-03 22:02:16 +03:00
Slava Semushin e5c0383594 Strip redundant std::string usage from tests.
Done by command:
git grep -l ASSERT_EQUALS | xargs sed -i 's|ASSERT_EQUALS(std::string(\(".\+"\)),|ASSERT_EQUALS(\1,|'

Should be no functional change.
2009-06-01 02:50:25 +07:00
Daniel Marjamäki 2120edb89b Variable Id: structs must not have variable id 2009-05-31 18:46:32 +02:00
Reijo Tomperi 3fe1b50e60 Fix ticket #344 (Tokenizer crash in Windows)
http://apps.sourceforge.net/trac/cppcheck/ticket/344
2009-05-31 15:55:06 +03: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 8876f0ee57 Fix ticket #342 (Simplify "if( (true) == true )")
http://apps.sourceforge.net/trac/cppcheck/ticket/342
2009-05-30 00:04:01 +03:00
Reijo Tomperi a015704591 Changed expected result for test case TestTokenizer::removeParantheses3 to simplify it more 2009-05-28 23:13:15 +03:00
Reijo Tomperi a3be307c03 Fix bug related to ticket #330, cppcheck hanged with some files containing "(("
http://apps.sourceforge.net/trac/cppcheck/ticket/330
2009-05-28 23:03:36 +03:00
Daniel Marjamäki a3990648a9 Tokenizer: Simplifying redundant parantheses
http://apps.sourceforge.net/trac/cppcheck/ticket/330
2009-05-28 19:37:39 +02:00
Reijo Tomperi adb1ed4947 Fix ticket #319 (Function names are tagged as variables)
http://apps.sourceforge.net/trac/cppcheck/ticket/319
2009-05-27 23:34:08 +03:00
Reijo Tomperi d6a34dafb2 Added test case TestMemleak::dealloc_and_alloc_in_func 2009-05-27 22:16:54 +03:00
Daniel Marjamäki ca6d927dfa Fix ticket 330 (found memory leak when __builtin_expect uses) 2009-05-27 20:49:29 +02:00
Daniel Marjamäki e89c03da92 Fix ticket 308 (cppcheck msg:: invalid number of ((). Cant process file) 2009-05-27 20:07:18 +02:00
Reijo Tomperi ea4232fb06 Fix ticket #334 (segmentation fault on boost 1.39.0)
http://apps.sourceforge.net/trac/cppcheck/ticket/334
2009-05-26 23:22:00 +03:00
Daniel Marjamäki b9b542d05b Fixed ticket #333 (tokenizer: incorrect removal of decrement/increment) 2009-05-25 14:21:58 +02:00
Reijo Tomperi 24d96b188e Fix ticket #305 (Negative value passed to ASSERT_EQUALS)
http://apps.sourceforge.net/trac/cppcheck/ticket/305
Moved also test case from testtokenizer to testtoken.
2009-05-12 21:28:02 +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 f2a5527e60 Fix #289 (if() is not properly tokenized)
http://apps.sourceforge.net/trac/cppcheck/ticket/289
2009-05-09 23:12:14 +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
Reijo Tomperi 0f59ef9064 Fix #276 (simplification: Variable value)
http://apps.sourceforge.net/trac/cppcheck/ticket/276
2009-05-03 21:57:27 +03:00
Reijo Tomperi cb209bbd41 Fix #279 (Refactoring: replace and remove Token::aaaa , Token::aaaa0 and Token::aaaa1)
http://apps.sourceforge.net/trac/cppcheck/ticket/279
2009-05-03 21:10:59 +03:00
Daniel Marjamäki f6d6a3855e varid: updated handling of variable id for class variables (#26) 2009-05-03 13:50:26 +02:00
Daniel Marjamäki 6a009f7084 tokenizer: give class member variables varId (#26) 2009-05-02 22:57:18 +02:00
Daniel Marjamäki 6f4c5ab71c refactoring: Replaced 'aaaa' 2009-05-01 22:41:55 +02:00
Reijo Tomperi 26c193f9bc Fix ticket #204 (false positive::memory leak with --all when free is guarded by simple if)
http://apps.sourceforge.net/trac/cppcheck/ticket/204
2009-05-01 21:31:07 +03:00
Reijo Tomperi bc4fb21325 tokenizer: simplify assembler (#270), fix _asm also.
http://apps.sourceforge.net/trac/cppcheck/ticket/270
2009-05-01 20:53:08 +03:00
Daniel Marjamäki e37da13c26 tokenizer: simplify assembler (#270) 2009-05-01 12:39:14 +02:00
Reijo Tomperi 7e5c32b7f4 Fix ticket #269 (Incorrect variable id, when delete is used.)
http://apps.sourceforge.net/trac/cppcheck/ticket/269
2009-04-29 22:45:57 +03:00
Reijo Tomperi d4a7256686 Added test case TestTokenizer::varid_delete for ticket #269
http://apps.sourceforge.net/trac/cppcheck/ticket/269
2009-04-29 22:22:56 +03:00
Daniel Marjamäki 49430afabe varid: Set variable id for stl containers and iterators 2009-04-25 16:55:00 +02:00
Reijo Tomperi 14eff64194 Fix ticket #258 (segmentation fault)
http://apps.sourceforge.net/trac/cppcheck/ticket/258
2009-04-20 21:38:05 +03:00
Daniel Marjamäki 6f7f8c4b4f Tokenizer: Don't treat typedefs as variable declarations (#234) 2009-03-28 21:07:33 +01:00
Daniel Marjamäki 0cfa241abb variable id: enabled test case for function parameters 2009-03-25 18:15:49 +01:00
Daniel Marjamäki c74da7bab9 variable id: give std::string variables an id 2009-03-25 18:10:03 +01:00
Daniel Marjamäki 9f3634412e simplify tokens (known variable values in conditions) 2009-03-25 07:10:17 +01:00