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
2db69e6072
tokenizer: Added DeallocateTokens to the destructor so it's not necessary to cleanup manually
2008-11-22 09:44:02 +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
0a638a57d0
Bug fix: Missing include from previous commit, didn't compile on Debian.
2008-11-15 22:54:39 +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
Daniel Marjamäki
adad786d75
SimplifyTokens: Replace 'sizeof(*abc)' with '100'. This prevents false positives in checks
2008-11-15 17:21:35 +00:00
Daniel Marjamäki
1801f25bce
Simplify Tokens: Replace NULL with 0 and '(char *)0' with '0'
2008-11-15 16:27:09 +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
ef9f472188
Refactoring: Tokenizer class added, functions still mostly static and
...
using globals
2008-11-09 07:19:53 +00:00
Daniel Marjamäki
c220b061dc
Refactoring TOKEN: Changed from struct to class
2008-11-06 18:31:39 +00:00
Daniel Marjamäki
69a3595f19
cleanup of UTF-8. Updated the Makefile
2008-11-06 00:11:37 +00:00
Daniel Marjamäki
eb86a0fc34
Tokenizer: Skip inline assembly (Bug 2220727)
2008-11-05 07:28:40 +00:00
Daniel Marjamäki
5e4a7fefe5
Tokenize: Changed the array CurrentToken to a std::string
2008-11-04 19:09:31 +00:00
Daniel Marjamäki
375801f51e
Tokenizer: Handle '\' in preprocessor lines
2008-11-03 07:53:30 +00:00
Daniel Marjamäki
f1330c3db0
memleak: fixed false positives for assignment in return statement (bug
...
2205568)
2008-11-02 10:33:38 +00:00
Daniel Marjamäki
8d2cdbc09f
fixed compilation warnings generated by visual c++. Nothing serious
2008-10-31 08:29:59 +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
0658d65a7b
tokenize: Fixed possible endless loop problem when handling typedefs
2008-10-19 06:21:01 +00:00
Daniel Marjamäki
815dd364ed
Incomplete statement: Check for statements that begin with a constant
2008-09-20 17:34:37 +00:00
Daniel Marjamäki
259e0ce238
tokenize: Fixed a bug in the tokenizer
2008-09-11 18:37:36 +00:00
Daniel Marjamäki
5e9f1010ff
compilation: Various cross compilation fixes. The "--recursive" option doesn't work on VC now.
2008-09-11 17:03:58 +00:00
Daniel Marjamäki
ae322b5f45
made cppcheck compile with g++ 4.3
2008-08-30 18:29:37 +00:00
Daniel Marjamäki
0e267441de
djgpp: Fixed compiler warnings/errors when compiling with DJGPP
2008-08-30 16:38:56 +00:00
Daniel Marjamäki
3daf128c0f
tokenize: handle simple typedefs
2008-08-28 06:37:11 +00:00
Daniel Marjamäki
81bcde9ed0
cleanup: removed spaces
2008-08-12 06:40:55 +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
a938b4ed39
Fixing bug 1935006 - Compile problems on cygwin
2008-04-06 06:26:11 +00:00
Daniel Marjamäki
69d33444d4
Added style checks to check for unused global functions
2008-03-29 09:44:23 +00:00
Daniel Marjamäki
4691999ede
Refactoring: Replaced deprecated "match" with the new "Match"
2008-03-28 07:18:03 +00:00
Daniel Marjamäki
44bee90d82
Refactoring (Replace '->' with '.', use matching function when possible)
2008-03-23 14:15:44 +00:00
Daniel Marjamäki
ab7cb379af
In the checks, use const pointers
2008-03-22 11:46:06 +00:00
Daniel Marjamäki
506fc0e16d
tokenize: Fixed two bugs
...
* don't hang if we can't find the ending of a string.
* don't divide by zero
2008-03-19 17:09:51 +00:00
Daniel Marjamäki
d0cffeaa8c
Updated tokenizer. To handle "#define f1(a,b) (a+b)" better
2008-03-18 07:45:35 +00:00
Daniel Marjamäki
a9524b9207
Added test 'CheckVariableScope'. Increased constness.
2008-03-16 13:17:43 +00:00
Daniel Marjamäki
08b3b2ab63
CheckUnsignedDivision: Added check. Not very accurate yet.
2008-02-20 18:20:59 +00:00
Daniel Marjamäki
72d9e43f92
Made it compilable by borland c++
2008-02-18 17:11:34 +00:00
Daniel Marjamäki
4cb3c7b96b
Unit Testing: Start
2008-02-16 15:46:32 +00:00
Daniel Marjamäki
5070bfd87d
tokenizer: removed some preprocessing => less false positives
2007-10-23 06:36:29 +00:00