Commit Graph

84 Commits

Author SHA1 Message Date
Daniel Marjamäki 6eadbaae04 templates: better handling of templates with multiple type arguments 2009-03-14 21:26:32 +01:00
Daniel Marjamäki 01c39daa13 Merge branch 'ref' 2009-03-13 22:39:47 +01:00
Daniel Marjamäki daa911daeb refactoring: moved 'FindClassFunction' from CheckClass to Tokenizer 2009-03-13 22:28:44 +01:00
Reijo Tomperi 116e940214 Fixed ticket #169 (Add Token::link())
http://apps.sourceforge.net/trac/cppcheck/ticket/169
2009-03-13 23:25:56 +02: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 4c28882a12 expanding template classes 2009-03-12 22:17:42 +01:00
Daniel Marjamäki 1514e65464 astyle style fixes 2009-03-11 19:14:45 +01:00
Daniel Marjamäki 77cf2213fe templates: simplify template functions with 1 type argument 2009-03-11 18:50:24 +01:00
Daniel Marjamäki eac29d151c made the Tokenizer::simplifyCasts more generic 2009-03-10 21:26:08 +01:00
Daniel Marjamäki f8cd34198b simplify casts 2009-03-09 19:47:21 +01:00
Reijo Tomperi 42a9eb9e53 Fix ticket #133 (Segmentation fault when static_cast is in for loop) 2009-03-05 21:32:02 +02:00
Daniel Marjamäki 8b7a5dd494 fixed tokenizer problem when reading char constants 2009-03-04 17:02:45 +00:00
Daniel Marjamäki 5c1d4f2703 simplify calculations better 2009-03-04 06:24:03 +00:00
Daniel Marjamäki 547f120ee9 known variables: better handling of ++ and -- 2009-03-04 06:03:51 +00:00
Daniel Marjamäki fdaa1af694 removed deprecated flag 'firstMatch' 2009-03-01 20:02:24 +00:00
Reijo Tomperi fc8f47145a Copyrights updated 2009-03-01 19:52:33 +00:00
Daniel Marjamäki c7b068c174 variable id: fixed so that the variable ids are assigned correctly (ticket:126) 2009-03-01 16:37:02 +00:00
Daniel Marjamäki 4e465f7073 variable declarations: don't simplify when declaring and assigning array in the same statement 2009-02-28 20:40:37 +00:00
Daniel Marjamäki c3bbd603c0 variable id: handling 'return' and 'else' better 2009-02-28 20:21:48 +00:00
Daniel Marjamäki 7d9bf491ec sizeof: fixed a problem with 'sizeof(varname)' but there are more to fix with it 2009-02-28 08:34:02 +00:00
Daniel Marjamäki 6b7b27a2e8 simplify known variable: don't simplify this ';i++;' 2009-02-27 18:25:47 +00:00
Daniel Marjamäki f4a8bc85f2 simplify tokens: fixed bug when removing redundant parantheses around variable 2009-02-27 06:07:38 +00:00
Daniel Marjamäki c1da4ae57d simplify tokens: remove redundant parantheses around variable.. 'p = (q);' 2009-02-25 19:55:24 +00:00
Daniel Marjamäki 159332fde4 sizeof fix. classes and structs are always given the size 100. This removes false positives about mismatching size 2009-02-24 16:30:57 +00:00
Daniel Marjamäki 1e3047b9c2 simplify tokens: simplify known variable value handles ++ and -- better 2009-02-24 16:11:37 +00:00
Daniel Marjamäki d8927e720d constructors: don't warn about missing constructor if class only has static variable members 2009-02-21 13:35:55 +00:00
Daniel Marjamäki 439b8c4051 simplify known variables: variable used as array index 2009-02-20 17:27:57 +00:00
Daniel Marjamäki f30d7db1e8 activated the Tokenizer::elseif functionality 2009-02-17 20:03:08 +00:00
Daniel Marjamäki 1043b76d31 Added Tokenizer::elseif for breaking up 'else if' into 'else { if ..' 2009-02-17 19:18:26 +00:00
Daniel Marjamäki 4aef89c311 tokenizer: fixed issues related to variable ids
* use setVarId in simplifyTokenList
 * make sure function parameters and variables declared in for example for loops get variable ids
2009-02-16 17:41:33 +00:00
Reijo Tomperi ba28c07f9d astyle fix 2009-02-15 18:47:24 +00:00
Daniel Marjamäki b1982b2041 tokenizer: improved the simplification of '*(var+num)' => 'var[num]' 2009-02-15 14:02:57 +00:00
Daniel Marjamäki 56d685c179 tokenizer: Remove redundant parantheses around number. Ticket: #105 2009-02-15 13:28:54 +00:00
Daniel Marjamäki 265ef0f4a5 Tokenizer: Fixed bug in tokenizer that removed '\' from preprocessor lines
Ticket: #106
2009-02-15 11:42:04 +00:00
Reijo Tomperi 1e07847ecf Constant variable converting converted struct members (foo.a => foo.45) also, fixed that. 2009-02-14 21:33:28 +00:00
Reijo Tomperi fba8c54758 Fix ticket #107 (Convert + + into + and + - into -) and add test case for it 2009-02-14 20:56:08 +00:00
Reijo Tomperi 997cb071b7 astyle fix 2009-02-14 18:40:04 +00:00
Daniel Marjamäki 4a1488b1a9 tokenizer: tokenize '++', '--' and '>>' correctly 2009-02-14 10:13:50 +00:00
Daniel Marjamäki 17fbab018c simplify known value: insert known variable value into calculations 2009-02-14 06:11:37 +00:00
Leandro Penz 127a910516 Tokenizer: fixed ## tokenization. 2009-02-13 13:33:12 +00:00
Reijo Tomperi 5d3574bb03 Fix ticket #100 (Simplify constants simplifies leaks out from variable scope and simplifies whole file) 2009-02-12 19:26:42 +00:00
Reijo Tomperi 1373e14bc9 Fix ticket #93 (Write xml results into error stream instead of results.xml file.) and also refactor the
code to use ErrorLogger::reportErr() for all errors, for both xml and plain text. And move xml formatting 
from Cppcheck to CppcheckExecutor.
2009-02-09 20:51:04 +00:00
Reijo Tomperi cb5974e94e Fixed issue about 4+5 being made a single token, problem appeared in recent commits. 2009-02-08 10:56:20 +00:00
Reijo Tomperi c345fa6186 Fix ticket #89 (False positive, (style) Redundant code - begins with numeric constant (e-value)) 2009-02-08 10:39:55 +00:00
Reijo Tomperi da3efe8fa2 Improve fix made for Ticket #85 to handle strings that are in 3 parts also. 2009-02-08 10:25:33 +00:00
Reijo Tomperi 4305d749ff Fixed ticket #88 (False positive, (style) Redundant code - begins with numeric constant) 2009-02-08 09:51:45 +00:00
Reijo Tomperi 200a159c67 Fix ticket #85 (False positive (style) Redundant code, begins with string) 2009-02-08 08:52:03 +00:00
Reijo Tomperi d48671bdfb Fixed more of ticket #81 (getting rid of compiler warnings) 2009-02-07 20:55:25 +00:00
Reijo Tomperi 798d86216a Fix ticket #83 (cppcheck hangs) and add a test case for it 2009-02-07 19:15:10 +00:00
Daniel Marjamäki 3c289e52c5 memory allocation: check for mismatching size 2009-02-07 10:54:39 +00:00