Reijo Tomperi
8cae17fda8
Update year to 2012
2012-01-01 01:05:37 +02:00
Edoardo Prezioso
b9c796d9f8
- Re-elaborate 'using' keyword skipping in Tokenizer::setVarId and
...
Scope::getVariableList;
- Improve setVarId: add possible declaration: 'A f(&x);' and change from:
'if (...){}else{ continue; };' to: 'if (!...) continue;';
- Little refactoring of 'Tokenizer::removeTokens()'.
2011-12-31 21:36:19 +01:00
Reijo Tomperi
0e1fb5f75b
astyle fix
2011-12-30 21:01:33 +02:00
Edoardo Prezioso
0d3bf5340d
Improve varId and getVariableList filter, related to previous commit.
2011-12-30 18:13:42 +01:00
Edoardo Prezioso
8c68b811f3
Fix debug message "Scope::checkVariable found variable '%var%' with varid 0." in C# code with 'using %var%;'.
2011-12-30 13:01:09 +01:00
Daniel Marjamäki
a4dcf8feea
Fixed #3435 (False positive: (warning) Member variable 'A::m_Vec' is not initialized in the constructor.)
2011-12-25 11:05:06 +01:00
PKEuS
dca03c3ce2
Remove unnecessary includes
...
Also add a unit test related to #3427
Also improve the description text in checkclass and remove unused variable.
2011-12-23 23:31:48 +02:00
Marek Zmysłowski
4b4f201b79
Fixed #3437 (segmentation fault of cppcheck)
2011-12-22 07:28:28 +01:00
PKEuS
f306246c7f
Improved support for references and pointers in SymbolDatabase
...
Replaced several isPointer functions by Variable::isPointer function
Refactorizations & Make use of symbolDatabase more often
2011-12-17 19:04:03 +01:00
Edoardo Prezioso
4cad5d4df4
Workaround fixes to shut up some cppcheck '--inconclusive' whinings.
2011-12-13 00:24:34 +01:00
Edoardo Prezioso
42e369a4b4
Change every 'tokAt(..)->link()' to 'linkAt(..)'.
2011-11-20 14:24:27 +01:00
Edoardo Prezioso
2c64d299ca
Change every 'tokAt(...)->str()' to 'strAt(...)'.
2011-11-13 13:10:59 +01:00
Edoardo Prezioso
b28a44dc3b
Change: 'next()->next()'->'tokAt(2)', 'previous()->previous()'->'tokAt(-2)'.
2011-11-12 22:33:03 +01:00
Thomas Jarosch
54adb910ec
Use Token::simpleMatch instead of Token::Match for simple patterns
2011-10-27 15:59:22 +02:00
Edoardo Prezioso
12f6ce46f8
Add more warnings and fix the ones reported by them.
2011-10-22 15:05:43 +02:00
Benjamin Goose
3f25bd9530
Qualify fill_n properly.
...
Relying on ADL isn't a good idea as it's not always well implemented.
2011-10-20 09:02:20 +02:00
Daniel Marjamäki
1ec32e27db
Borland: Fixed compiler errors
2011-10-16 07:52:54 +02:00
Daniel Marjamäki
6f8e42a5af
changed the astyle formatting flags
2011-10-13 20:53:06 +02:00
Robert Reif
a1a839fadc
fix tokenizer and symbol database to not mistake goto statement for variable declaration
2011-10-07 08:11:48 -04:00
Robert Reif
092ba0b1de
fix symbol database bug where function variable type of a nested class was not found
2011-09-28 22:05:26 -04:00
Robert Reif
40009d091d
add multi-dimension array support to second checkScope and use it for member arrays
2011-09-11 20:42:57 -04:00
Robert Reif
7cb5c97e7d
move member variable lookup code from a check to the symbol database so it can be reused by other checks
2011-09-03 12:22:13 -04:00
Robert Reif
d749e28dc0
another partial fix for #3063 (false negative: multi dimensional arrays not well supported)
2011-09-02 21:07:29 -04:00
Robert Reif
7775934492
really fix multi-dimensional arrays with undefined size
2011-08-28 13:32:42 -04:00
Robert Reif
cf6d04de74
fix #3044 (Symbol database: handle multidim array with unknown dimension 'char a[][4]')
2011-08-28 11:40:55 -04:00
Robert Reif
dfe89f395a
fix #3049 (False Positive - Technically the member function 'VideoOutputNull::SetupDeinterlace' can be const.)
2011-08-25 19:13:53 -04:00
Robert Reif
6f3131da8c
fix a serious symbol database bug where parts of a function could be skipped
2011-08-23 20:12:29 -04:00
Robert Reif
88019658b4
fix #3013 (segmentation fault of cppcheck ( struct x : virtual y ))
2011-08-16 19:16:58 -04:00
Robert Reif
f7b9d4d726
fix #2991 (segmentation fault of cppcheck ( ::y(){x} ))
2011-08-11 17:57:54 -04:00
Robert Reif
54141f2e7f
fix #2943 (Symbol database: Wrong parsing of std::vector as base class.)
2011-07-27 11:23:22 -04:00
Robert Reif
5e1fd81ea7
add support for local variables with constructors to the symbol database
2011-07-23 15:12:30 -04:00
Robert Reif
d447e61b09
fix #2884 (Integer overflow warning in 64-bit build)
2011-07-01 16:59:17 -04:00
Robert Reif
c99a15516d
fix symbol database derived template class support
2011-06-29 19:52:07 -04:00
Robert Reif
18369ea6ac
add global namespace derived class support
2011-06-29 19:43:39 -04:00
Robert Reif
272eb445fb
fix #2865 (segmentation fault of cppcheck ( char a[1] ))
2011-06-27 07:31:10 -04:00
Robert Reif
93495613dd
replace some pattern matching with variable lookup in checkGlobalAndLocalVariable
2011-06-24 08:02:41 -04:00
Robert Reif
4656eba34c
set symbol database array variable dimensions specified by a variable to the maximum size that variable can hold
2011-06-23 22:35:15 -04:00
Robert Reif
0c46f44e3d
add array information to symbol database
2011-06-22 22:41:11 -04:00
Robert Reif
e8eb20c6ef
fix debug warning for function parameters with template with varid of 0
2011-04-28 20:53:31 -04:00
Robert Reif
6750c7b492
don't debug warn about class function definitions without body having missing varid on function parameters
2011-04-22 21:41:55 -04:00
Greg Hewgill
3fc1db51d1
Change symbol database such that the typestart token skips over type modifiers (const/static/mutable).
...
This fixes checking for the case of a memset() on a static variable.
2011-04-23 01:13:23 +12:00
Daniel Marjamäki
58dbbb0cab
Inconclusive checking: Report inconclusive errors with reportInconclusiveError. It takes the same parameters as reportError.
2011-04-14 18:02:01 +02:00
Robert Reif
64fa7bf8d4
symbol database: add support for anonymous struct and union
2011-03-31 20:54:23 -04:00
Robert Reif
faaff942d2
symbol database: improve function argument count and default argument count
2011-03-30 21:59:43 -04:00
Robert Reif
d17a204096
symbol database: get function argument count using argument list size rather than counting commas
2011-03-30 21:14:24 -04:00
Robert Reif
ce934f03a4
symbol database: handle default values for function arguments properly
2011-03-29 23:16:13 -04:00
Robert Reif
9612573d8e
add support for array of unnamed struct and union to symbol database
2011-03-29 19:48:12 -04:00
Robert Reif
b31da161a7
more support for anonymous struct to symbol database
2011-03-29 07:47:39 -04:00
Robert Reif
678486f0db
add support for anonymous struct to symbol database
2011-03-29 07:08:59 -04:00
Robert Reif
31f8ff723b
skip nested anonymous unions when searching for variables in symbol database
2011-03-27 18:37:31 -04:00