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
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