Commit Graph

826 Commits

Author SHA1 Message Date
Reijo Tomperi b9494c8081 removeReduntantConditions() can now handle if( true ) else if () conditions also. 2008-12-26 12:55:53 +00:00
Daniel Marjamäki 12a898c2fa Memory leak : Added TODO test case "class3". It currently fails 2008-12-26 09:13:49 +00:00
Daniel Marjamäki 586b28b063 refactoring : Removed unread variable 'staticfunc' 2008-12-25 20:09:32 +00:00
Daniel Marjamäki 709e2a4277 TOKEN::Match : Removed the parameter varnames2 because it's unused and deprecated 2008-12-25 18:27:49 +00:00
Daniel Marjamäki 8c08c4d66b uniformize files 2008-12-25 18:24:57 +00:00
Daniel Marjamäki 5cfa05e180 Makefile : Removed the .gprof makefile and added a CGLAGS variable so the normal Makefile can easily be changed 2008-12-25 17:11:01 +00:00
Daniel Marjamäki 492082f4f2 Memory leaks : Fixed false positive with return (Bug 2458436) 2008-12-25 08:27:07 +00:00
Daniel Marjamäki 1776fdcdcd Makefile : Reverted the Makefile changes in [763] because they were committed by mistake 2008-12-25 08:00:42 +00:00
Daniel Marjamäki 20ae03d0d0 Memory leak : Fixed false positive when using callbacks (Bug 2458510) 2008-12-25 07:50:25 +00:00
Reijo Tomperi 2692866694 Cleanup to removeReduntantConditions() 2008-12-24 15:43:05 +00:00
Daniel Marjamäki 3bcd14ebac added Makefile that can be used when profiling cppcheck with gprof 2008-12-24 11:52:07 +00:00
Reijo Tomperi 05e23b7606 Minor improvement to removeReduntantConditions() 2008-12-24 08:33:15 +00:00
Daniel Marjamäki 36f39aec22 tokenize : optimising "simplifyConditions" 2008-12-24 07:55:12 +00:00
Daniel Marjamäki a65a66bee0 Tokenizer::setVarId : small optimisations 2008-12-24 07:46:57 +00:00
Daniel Marjamäki 6472588ddd memory leaks : optimising 'simplifycode' 2008-12-24 07:36:18 +00:00
Daniel Marjamäki b16702144e checkclass : simple refactorings. Use Match pattern better. Use str() and simpleMatch instead of Match when possible 2008-12-24 07:03:27 +00:00
Reijo Tomperi 7c236d122a Some comments added 2008-12-23 21:51:54 +00:00
Nicolas Le Cam 14e89fa887 Formatting: demux simpleMatch for readability 2008-12-23 21:45:47 +00:00
Reijo Tomperi a303cf278d Optimization: isNotPattern() removed 2008-12-23 21:20:54 +00:00
Daniel Marjamäki d24913caf8 tokenize : small optimisations. Use simpleMatch and direct std::string comparisons instead of Match 2008-12-23 20:42:44 +00:00
Reijo Tomperi c4ecdf06f0 Optimization, improved Match(). The str[0] == '%' improvement 2008-12-23 20:17:05 +00:00
Nicolas Le Cam b32663324e Fix comparison between signed and unsigned integer expressions warning 2008-12-23 19:54:22 +00:00
Daniel Marjamäki 44b459a98c simplifyKnownVariables : optimisation 2008-12-23 19:39:06 +00:00
Daniel Marjamäki b8e0ea81a6 memory leaks : bug fix 2008-12-23 08:25:16 +00:00
Daniel Marjamäki 5a91a2ea12 simplifyIfAddBraces : Further fixes so that braces will be added to an "else" statement too 2008-12-23 08:11:33 +00:00
Daniel Marjamäki e7d6809cf4 checkbufferoverrun : a bug fix and a better use of Match 2008-12-23 07:50:44 +00:00
Nicolas Le Cam 85239c48a9 Minor optimizations: introduce use of simpleMatch, don't use [simple]Match on one word patterns;
Minor style formattings
2008-12-22 23:27:49 +00:00
Nicolas Le Cam d6ffc63230 Fix FileLister::RecursiveAddFiles on files without a base path. 2008-12-22 22:46:31 +00:00
Daniel Marjamäki 7fda68c662 simplifyIfAddBraces : Added check to cppcheck as it seems to work pretty good now 2008-12-22 20:49:56 +00:00
Daniel Marjamäki c3b9b3dfd5 simplifyIfAddBraces : Fixed a segmentation fault 2008-12-22 19:26:23 +00:00
Daniel Marjamäki 78f46c5848 simplifyIfAddBraces : Fixed minor bug that caused the closing brace to be put on the wrong place 2008-12-22 18:32:04 +00:00
Daniel Marjamäki 3a4e113f64 TestTokenizer : Split the test TestTokenizer::simplifyKnownVariables into 5 separate tests 2008-12-22 18:08:32 +00:00
Daniel Marjamäki 7a3fd268e1 TestTokenizer : Broke up TestTokenizer::ifAddBraces into a few separate tests 2008-12-22 18:05:22 +00:00
Daniel Marjamäki 30c86f7107 simplifyIfAddBraces : Fixed segmentation fault 2008-12-22 18:00:54 +00:00
Daniel Marjamäki a148e67168 Memory leaks : Reduce "if { dealloc ; return ; } if return ;" to "if return ;". Related with bug 2458532 2008-12-22 14:42:54 +00:00
Daniel Marjamäki a69ebc6664 Tokenizer : Added function 'simplifyIfAddBraces' 2008-12-22 09:20:46 +00:00
Nicolas Le Cam ad73e517a4 Fix simpleMatch when pattern only contain one word 2008-12-22 08:20:25 +00:00
Nicolas Le Cam 3234322758 Implement simpleMatch that should be use when pattern contains no flags 2008-12-21 23:28:09 +00:00
Reijo Tomperi 85e6ab5226 More improvement to removeReduntantConditions() and few tests for it also 2008-12-21 21:04:58 +00:00
Reijo Tomperi 496b09a377 Remove reduntant if sentences that are never executed. 2008-12-21 19:24:21 +00:00
Nicolas Le Cam 615095fca2 Optimization: Speed up typedef simplification. 2008-12-21 18:26:06 +00:00
Nicolas Le Cam 1c281662da Fix signed/unsigned warning (thanks Aggro) 2008-12-21 17:51:07 +00:00
Nicolas Le Cam 1f68dfa57e Refactoring: strdup also exists in MSVS 2008-12-21 17:45:05 +00:00
Nicolas Le Cam 1f141e4dc0 Opimization: Remove combineWithNext Member, use an array instead 2008-12-21 17:35:33 +00:00
Reijo Tomperi 56c1a91e67 Few tests added for checking simplify of if sentences 2008-12-21 15:10:44 +00:00
Reijo Tomperi bb198aed5e Fixed bug, varid was not assigned properly when bool use = false; was splitted into two statements in simplify code. 2008-12-21 14:27:07 +00:00
Reijo Tomperi b7db651ee2 Improving simplifyKnownVariables() to simplify bool variables used inside if() like int values are simplified. 2008-12-21 13:58:56 +00:00
Reijo Tomperi aec3584fce Fixed one compiler (gcc) warning. 2008-12-21 12:59:38 +00:00
Nicolas Le Cam 12aceca138 Fix bug I introduced in rv727 2008-12-21 12:22:30 +00:00
Nicolas Le Cam cbf9067de0 Minor optimizations and fixes 2008-12-21 11:43:05 +00:00