Commit Graph

58 Commits

Author SHA1 Message Date
Reijo Tomperi f099796a10 Copyright 2007-2008 -> 2007-2009 2009-01-02 19:02:35 +00:00
Reijo Tomperi b9494c8081 removeReduntantConditions() can now handle if( true ) else if () conditions also. 2008-12-26 12:55:53 +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
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
Nicolas Le Cam fec777057d Formatting: uniformize end of lines. 2008-12-14 17:05:21 +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 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
Daniel Marjamäki 3619552e38 Variable Id : First simple implementation 2008-12-08 17:28:44 +00:00
Daniel Marjamäki 4f4a2391e0 Refactoring: Removed _settings member from the Tokenizer 2008-11-25 18:44:35 +00:00
Daniel Marjamäki 8845e8bc89 Refactoring: Tokenizer - renaming functions, moved the 'tokenizeCode' to the private section 2008-11-25 18:34:51 +00:00
Reijo Tomperi 29a1468523 Refactoring: Renamed some member variables: variable -> _variable 2008-11-23 11:08:07 +00:00
Daniel Marjamäki 0c9784fc0c Refactoring: The Tokenizer::FillFunctionList has no use of its parameter. Enabled the CheckFunctionUsage 2008-11-23 06:21:44 +00:00
Reijo Tomperi 3ba83b6620 Refactoring: token.* files added, Some functions from Tokenizer moved under TOKEN. Renamed few functions, like gettok() -> at(), combineWithNext() and deleteNext() are also new
names for old functions. Usage was gettok( tok, 2 ), but now it is tok->at( 2 ).
2008-11-22 22:49:14 +00:00
Daniel Marjamäki 0d3a99adb0 increased constness of member variable _tokenizer in the Check* classes 2008-11-22 20:00:36 +00:00
Daniel Marjamäki a60dad3562 CheckBufferOverrun: increased constness of _tokenizer member 2008-11-22 19:47:10 +00:00
Daniel Marjamäki 07b5ebe72b Check Function Usage: Removed much of the old checking and made some refactoring 2008-11-22 19:39:12 +00:00
Daniel Marjamäki d68e2ae966 tokenizer: simplifyConditions tries to simplify conditions.. those that are always true to '( true )' and those that are always false to '( false )' 2008-11-22 17:53:22 +00:00
Daniel Marjamäki 9ce8918895 tokenizer: Added functions "alwaysTrue" and "alwaysFalse" to check if a
condition is always true / false
2008-11-22 09:32:57 +00:00
Reijo Tomperi 125692bc65 Refactoring: CommonCheck.* files are removed. Rest of the global functions from there were moved to Tokenizer class 2008-11-21 21:14:24 +00:00
Reijo Tomperi 51e9d98a5f Refactoring: Errors are no longer logged via global functions to a global stream. Instead callback function is used via interface.
ErrorLogger interface was added and taken into use.
2008-11-20 22:19:26 +00:00
Reijo Tomperi 180e3b99e6 Refactoring: Some global functions moved to Tokenizer class 2008-11-20 20:54:52 +00:00
Daniel Marjamäki dd5abf2c05 cleanup 2008-11-20 19:23:05 +00:00
Daniel Marjamäki 63bc26d662 Function list: Remove functions with duplicate names to prevent false positives 2008-11-20 19:18:55 +00:00
Reijo Tomperi eb1b0abc1e Refactoring: tokens() changed to const and to return const pointer. 2008-11-16 16:13:38 +00:00
Reijo Tomperi aa579911ab Refactoring: Global variable tokenes is no more. 2008-11-16 15:58:52 +00:00
Reijo Tomperi ce08224547 Few static variables are now private members. ShowAll etc. global variables are now members of Settings class and given as a
parameter to the classes that need them.
2008-11-16 15:18:50 +00:00
Reijo Tomperi 08b25dc0d4 Refactoring: Global/Static variables, FunctionList, GlobalFunctions and UsedGlobalFunctions are now private members of Tokenizer class.
Class GlobalFunction is now private subclass of Tokenizer. 
Global functions CheckGlobalFunctionUsage, FillFunctionList and GetFunctionTokenByName are now member functions of Tokenizer.
2008-11-15 22:41:56 +00:00
Reijo Tomperi 1efb4c95a6 Refactoring: Global variable Files is no more. Use tokenizer->getFiles() to get a pointer to it. 2008-11-13 22:39:47 +00:00
Reijo Tomperi 0b1ee10353 Refactoring: tokens_back and TypeSize are no longer global variables 2008-11-12 22:50:40 +00:00
Reijo Tomperi 134985e410 Refactoring: Tokenizer object given as a parameter to most of the classes 2008-11-12 21:34:47 +00:00
Reijo Tomperi ef9f472188 Refactoring: Tokenizer class added, functions still mostly static and
using globals
2008-11-09 07:19:53 +00:00
Reijo Tomperi 459711ed00 - Fixed compiling on Debian with gcc ( missing includes and std:: )
- Removed c-style include for Borland compiler.
2008-11-07 20:25:07 +00:00
Daniel Marjamäki 789aac2ef4 cleanup the files 2008-11-07 16:25:29 +00:00
Daniel Marjamäki af5b1858aa Visual C++: Fixed compiler error for "strdup" 2008-11-07 16:20:22 +00:00
Daniel Marjamäki 53752c129d Borland C++: Fixed compiler error (couldn't find the function 'free') 2008-11-07 07:45:50 +00:00
Daniel Marjamäki c220b061dc Refactoring TOKEN: Changed from struct to class 2008-11-06 18:31:39 +00:00
Daniel Marjamäki a3a4d72082 preprocessor: Use the new preprocessor in cppcheck 2008-10-30 19:42:34 +00:00
Daniel Marjamäki 5b9aa96aba Licensing: Using the GPL 3 license 2008-10-26 07:55:15 +00:00
Daniel Marjamäki 59c1c16e03 Checking for memory leaks. Changed the handling of comments about
deleting
2008-04-12 06:33:45 +00:00
Daniel Marjamäki 1d258a55a4 Make it possible to disable memory leak checking for a variable. Usable to avoid false positives 2008-04-11 18:37:15 +00:00
Daniel Marjamäki 4691999ede Refactoring: Replaced deprecated "match" with the new "Match" 2008-03-28 07:18:03 +00:00