Commit Graph

126 Commits

Author SHA1 Message Date
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 30c86f7107 simplifyIfAddBraces : Fixed segmentation fault 2008-12-22 18:00:54 +00:00
Daniel Marjamäki a69ebc6664 Tokenizer : Added function 'simplifyIfAddBraces' 2008-12-22 09:20:46 +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 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
Nicolas Le Cam cbf9067de0 Minor optimizations and fixes 2008-12-21 11:43:05 +00:00
Daniel Marjamäki d44523144a simplifyKnownVariables: fixed a segmentation fault 2008-12-21 09:12:00 +00:00
Reijo Tomperi e272630604 Copyright and app name changed in each file 2008-12-19 21:15:06 +00:00
Nicolas Le Cam a5fa323a0b Formatting: uniformize end of lines. 2008-12-18 21:28:57 +00:00
Daniel Marjamäki c56779c9ae variable id : set variable ids for struct members 2008-12-18 18:56:25 +00:00
Daniel Marjamäki 69137597f5 tokenizer : using the simplifyKnownVariables 2008-12-18 07:19:35 +00:00
Daniel Marjamäki dd853f0d59 token : fixed so that TOKEN::_previous is updated when deleting tokens 2008-12-17 19:20:11 +00:00
Nicolas Le Cam 883282ba16 Fix compilation 2008-12-14 23:06:37 +00:00
Nicolas Le Cam 24c978d5d2 Formatting: uniformize end of lines. 2008-12-14 22:03:49 +00:00
Reijo Tomperi 3851c0f019 Refactoring: Renamed all files to lower case. Also added testfilelister.cpp which was forgotted from previous commit. 2008-12-14 20:49:55 +00:00
Reijo Tomperi a15381dcbe Fixed bug, paths like "/path/../index.h" created duplicate warnings with files like "/index.h". Relative paths are now simplified to
look a like. Test cases added.
2008-12-14 19:03:34 +00:00
Nicolas Le Cam fec777057d Formatting: uniformize end of lines. 2008-12-14 17:05:21 +00:00
Nicolas Le Cam 81185af7f9 Add the last c++ cast operator 2008-12-14 16:35:51 +00:00
Daniel Marjamäki 6269c3cbbd tokenizer : updated simplifyKnownVariables 2008-12-13 20:22:45 +00:00
Reijo Tomperi 538f259911 Started making simplifyKnownVariables(), but it is very much unfinished. Two test cases added for it. 2008-12-13 19:44:56 +00:00
Reijo Tomperi 02d6e367e7 Refactoring, simplifyConditions(), simplifyCasts() and simplifyFunctionReturn() now return the opposite of their boolean return value. 2008-12-13 18:54:48 +00:00
Daniel Marjamäki 1e9863d671 Tokenizer : Simplify function calls for functions that only returns a constant value 2008-12-13 17:57:36 +00:00
Daniel Marjamäki 3a1196e5f9 Tokenizer : Added function for simplifying casts 2008-12-13 16:42:39 +00:00
Nicolas Le Cam 661068bcd4 Formatting: uniformize end of lines. 2008-12-13 11:39:36 +00:00
Daniel Marjamäki 0cfec3c89c Tokenizer::SetVarId : Fixed segmentation fault 2008-12-12 20:25:08 +00:00
Reijo Tomperi 2ef955eb65 Refactoring: Moved token creation and token deletion into TOKEN class. Added previous() (not tested yet) 2008-12-09 17:31:04 +00:00
Nicolas Le Cam aaabacfe87 Formatting: uniformize end of lines. 2008-12-09 00:49:32 +00:00
Nicolas Le Cam eb80c9786f Revert revisions 627 and 628 2008-12-08 23:41:34 +00:00
Nicolas Le Cam e8d2c7cfb3 Formatting: uniformize end of lines (part 2) 2008-12-08 23:10:13 +00:00
Nicolas Le Cam 625b77ec33 Formatting: uniformize end of lines. 2008-12-08 23:06:19 +00:00
Reijo Tomperi 440203bd5c Refactoring: Rest of the public variables in TOKEN moved to private area. 2008-12-08 22:02:37 +00:00
Reijo Tomperi 51024235a3 Refactoring: TOKEN::next renamed to _next, getter and setter functions for it added next() and next(TOKEN*). 2008-12-08 21:49:05 +00:00
Reijo Tomperi 25847fdec4 Refactoring: TOKEN::varId was moved from public to private 2008-12-08 17:45:55 +00:00
Daniel Marjamäki 3619552e38 Variable Id : First simple implementation 2008-12-08 17:28:44 +00:00
Daniel Marjamäki c907589deb Fixed a bug in Tokenizer::simplifyTokenList. The keyword operator is
never used in a variable declaration
2008-12-07 08:47:56 +00:00
Daniel Marjamäki 93c04efc95 tokenize: "~Base" should generate two tokens. "~" and "Base" 2008-12-06 17:53:30 +00:00
Daniel Marjamäki 7196b8a028 Tokenizer: Remove "volatile" keyword to simplify checking 2008-12-06 13:10:38 +00:00
Daniel Marjamäki f7a846e31e tokenize: Replace a complicated condition with a "Match" 2008-12-05 19:17:25 +00:00
Daniel Marjamäki b029163cdc tokenize: Replace "aaaa" and "strcmp" with "str" and "Match" 2008-12-05 19:04:41 +00:00
Daniel Marjamäki 09f7c07a4d tokenize: Minor refactorings 2008-12-05 18:25:08 +00:00
Reijo Tomperi c958482196 TOKEN: Match() function improved, %any% and const|volatile kind of patterns are now accepted. Simplified comparing on tokenize.cpp. 2008-12-04 21:48:15 +00:00
Daniel Marjamäki 3820a26e1c Tokenizer: Simplify numeric comparisons 2008-12-04 19:32:26 +00:00