IOBYTE
ce50df8047
Fix override warnings. ( #1234 )
2018-05-15 16:37:40 +02:00
PKEuS
bbfcccf078
Refactorization: Replace several push_back-sequences by initializer lists
2018-04-09 09:41:24 +02:00
Daniel Marjamäki
7e4dba6a7e
Updated copyright year
2018-03-31 20:59:09 +02:00
Daniel Marjamäki
ec6133aea2
Fixed #8182 (False positive uninitvar - variable initialized in function in ternary expression)
2018-03-16 19:13:48 +01:00
Paul Fultz II
166e4cafcd
Check for functions calls in sizeof calculations ( #1111 )
...
* Check for functions calls in sizeof calculations
* Use seperate message and id for sizeofFunction
* Check for overloads
* Using decltype with a function should not be an error
* Fix warning
* Fix false positives when running pass the close paren
* Fix test error
* Try to fix more false positives
* Traverse using astOperand2
* Only check first argument
* Update fixes from feedback from PR
2018-03-15 10:24:17 +01:00
Daniel Marjamäki
c4caee6b18
Updated copyright year
2018-01-14 15:37:52 +01:00
Ayaz Salikhov
28aa939d69
iwyu - include what you use
2017-05-27 04:33:47 +02:00
Daniel Marjamäki
040d2f0012
Use simplecpp lexer in test cases
2017-05-18 21:52:31 +02:00
Daniel Marjamäki
91e38f3eb9
Fixed #7582 (false positive: Division by result of sizeof(). strncpy() expects a size in bytes)
2016-07-17 15:22:14 +02:00
PKEuS
00e4f70fe3
Fixed false positives in CheckSizeof::checkSizeofForPointerSize() ( #7518 )
2016-05-26 21:25:29 +02:00
PKEuS
4bb99a7887
Improved CheckSizeof::checkSizeofForPointerSize():
...
- Support cast in front of malloc() call
- Support sizeof(type) pattern (#4428 )
2016-05-22 22:29:52 +02:00
Lauri Nurmi
996c9244d8
Update copyright year to 2007-2016.
2016-01-01 15:34:45 +02:00
Daniel Marjamäki
8171154e12
Fixed #7230 (Confusing code snippet in error message)
2015-12-31 01:15:49 +01:00
Daniel Marjamäki
c0e8654649
Refactor void* checking. Use ValueType.
2015-12-30 11:48:20 +01:00
Daniel Marjamäki
0f9d90d2be
Changed Copyrights. Removed my name.
2015-11-18 20:04:50 +01:00
PKEuS
9a879fc828
Fixed false positives with pointerSize being shown even if no sizeof() is used ( #7100 ).
2015-11-07 13:19:06 +01:00
PKEuS
49f6231756
Fixed two issues in CheckSizeof::checkSizeofForPointerSize()
2015-11-07 09:35:30 +01:00
PKEuS
61b16909bd
Fixed false negative pointerSize with member variables.
...
Fixed wrong comment in testcppcheck.cpp
2015-11-06 21:48:56 +01:00
PKEuS
3a5cef8a7e
Refactorization: Improved usage of Settings instances in test suite
2015-10-07 18:40:03 +02:00
Thomas Otto
7ba69cfd0a
sizeofCalculation: skip if void-casted inside a macro ( #6888 )
2015-09-28 14:33:29 +02:00
PKEuS
fbbdfa85ca
Revert "Fixed false negative #5815 "
...
This reverts commit dc6c278d83
.
2015-09-09 14:46:47 +02:00
PKEuS
dc6c278d83
Fixed false negative #5815
2015-08-31 14:12:19 +02:00
Alexander Mai
1c5e9e47c5
#6671 false positive: incorrect sizeofwithsilentarraypointer with reference to array.
2015-05-06 07:38:26 +02:00
PKEuS
bc5132e0ac
Refactorization: Moved declaration of errout, ... to testsuite.h, uniformized style
2015-03-11 22:54:43 +01:00
Daniel Marjamäki
ff11ba9847
Updated copyright year to 2015
2015-01-03 12:14:58 +01:00
Thomas Jarosch
bac1dfce86
Add test cases when sizeof is used on struct members
2014-12-22 09:59:34 +01:00
Thomas Jarosch
dca65ce3da
Fix FP if sizeof is used without parentheses on struct members
...
Right now we only support checking basic pointer types.
Pointers inside structs are not supported yet.
Consider the tokens "foo@1 . bar@2",
Token::Match( "sizeof ( %varid% )" ) won't match it.
Token::Match( "sizeof %varid%" ) did match it -> FP.
2014-12-22 09:44:08 +01:00
Daniel Marjamäki
051d42ae6b
astyle formatting
2014-11-20 14:20:09 +01:00
orbitcowboy
f5d804f71a
running astyle
2014-11-20 10:13:03 +01:00
Alexander Mai
66d767b4b5
#6050 arithmetic on void** - fix false positive
2014-08-17 19:14:55 +02:00
PKEuS
5c238692e6
New check: Division by sizeof() as parameter to memset/memcpy/memmove/etc. as they expect a size in bytes ( #5698 )
...
Refactorizations in sizeof checking:
- Changed severity of sizeofwithsilentarraypointer to warning
- Made pointerSize message conclusive - there seems to be no reason for inconclusive
2014-08-08 09:49:09 +02:00
Alexander Mai
ad1662a201
#5875 fix 'lib/checksizeof.cpp:142:26: runtime error: member call on null pointer of type 'Token'. Improve error handling in CheckSizeof::checkSizeofForPointerSize()
2014-06-01 22:18:17 +02:00
PKEuS
5c566e838c
Fixed false positive "multiplySizeof" in TortoiseSVN
2014-05-19 20:57:13 +02:00
PKEuS
ecec4b0b46
Fixed false positive #5187 : arithOperationsOnVoidPointerError when referencing void*
2014-04-27 12:18:33 +02:00
Daniel Marjamäki
fd3a8a2a18
Update copyright
2014-02-15 07:45:39 +01:00
Daniel Marjamäki
742a6935ea
Calculation in sizeof: Fixed FP for sizeof(Fred**)
2013-12-26 13:52:58 +01:00
Daniel Marjamäki
29e74222fb
Sizeof calculation: Fixed FP for sizeof(int*[2])
2013-12-26 13:41:21 +01:00
Alexander Mai
14787cde99
Fixed #5129 (FP:arithOperationsOnVoidPointer on void**)
2013-10-31 06:04:51 +01:00
Daniel Marjamäki
c96586b2a9
"automatic conversion from iso-8859-1 formatting to utf-8"
2013-08-21 19:31:01 +00:00
Lucas Manuel Rodriguez
14d3886e19
Fixed #4965 (sizeof(void) check - error in message)
2013-08-20 06:20:52 +02:00
PKEuS
a9a5dc0354
Updated to AStyle 2.03, require this version
2013-08-07 16:27:37 +02:00
Daniel Marjamäki
37716fb8bb
Tokenizer: Set variable() pointer for array members
2013-07-20 17:46:39 +02:00
Lucas Manuel Rodriguez
59f448da8a
Fixed #4908 (False positive: void * calculation (struct member, cast))
2013-07-20 17:20:16 +02:00
Lucas Manuel Rodriguez
040c1e3a13
Fixed #4906 (False positive: void * calculation (cast))
2013-07-10 06:40:09 +02:00
Lucas Manuel Rodriguez
00886b4d06
Fixed #4876 (Checking for sizeof(void))
2013-07-05 21:07:07 +02:00
Daniel Marjamäki
1a35241aa2
testrunner: removed redundant ';'
2013-06-30 19:44:12 +02:00
Daniel Marjamäki
582e0ee7e7
testrunner: Added REGISTER_TEST. Thanks lucasmrod.
2013-06-30 19:42:26 +02:00
PKEuS
994c429b7d
Moved checks related to sizeof usage from checkother into new file
2013-04-10 09:49:38 -07:00