Frank Zingsheim
54e7c8f6a2
Implemented support for move constructors:
...
Adapt code to Function::eMoveConstructor
introduced in commit eb2962792f
2013-04-10 21:57:22 +02:00
Daniel Marjamäki
7fdaba43ed
Uninitialized variables: Fixed fp when initializing struct with function in loop body
2013-04-10 20:46:44 +02:00
Daniel Marjamäki
96a5429cee
Uninitialized variables: Assume that function initializes struct if it is unknown if it does
2013-04-10 20:04:32 +02:00
PKEuS
994c429b7d
Moved checks related to sizeof usage from checkother into new file
2013-04-10 09:49:38 -07:00
PKEuS
42fcb04d0c
Moved checks related to boolean type (not condition checking!) from checkother into new file
2013-04-10 09:25:50 -07:00
PKEuS
4e6d105cbd
Added support for complex patterns to CheckOther::checkIncorrectStringCompare()
2013-04-09 09:16:35 -07:00
XhmikosR
8ac9b8e7a9
remove duplicate ";" and fours dots
2013-04-09 17:49:09 +02:00
XhmikosR
700512a53f
use spaces in strings
2013-04-09 17:49:09 +02:00
PKEuS
c487ea843d
Better fix for #4706 : Use Token::nextArgument() properly. Removed redundant ' in message
2013-04-09 08:30:53 -07:00
Daniel Marjamäki
4c8b17c040
Fixed #4717 (False positive: Uninitialized variable inside ({..}))
2013-04-09 17:02:11 +02:00
Daniel Marjamäki
894a2435ae
Fixed #4718 (False positive: unititialized variable (value flow))
2013-04-08 19:34:39 +02:00
Alexander Mai
14fc140592
Fixed memory leaks in teststl
2013-04-07 18:43:18 +02:00
Daniel Marjamki
cd770fb106
Fixed #4310 (False positive 'boolean result in bitwise' message in template class (was #3818 ))
2013-04-07 16:48:42 +02:00
Daniel Marjamäki
f43d732f33
Fixed #4691 (False positive: Mismatching bitmasks in switch())
2013-04-07 04:25:10 +02:00
Daniel Marjamäki
38680e3440
Fixed #4677 (Message for 'possible null pointer dereference, otherwise it is redundant to check..' is warning but says error)
2013-04-07 03:41:02 +02:00
zblair
ecfe4eb5be
Fixed #3372 (New check: dereference iterator and then checking it)
2013-04-04 21:14:59 -07:00
PKEuS
eb2962792f
Implemented support for move constructors:
...
- Changed behaviour of Token::function - is now also set for declarations
- Resolved TODO in testclass.cpp
- removed redundant code in Scope::findFunction - it is safe to call nextArgument() on functions without arguments
- Use Token::function in checkother.cpp
2013-04-04 10:53:55 -07:00
PKEuS
188096665c
Implemented support for rvalue references (C++11):
...
- Split up && when it is part of an rvalue reference declaration
- Added support into symbol database
- Current implementation sets Variable::isReference() to true also for rvalue references - they can probably be treated like normal references in many checks.
Changed behaviour of symbol database: Insert argument Variable of functions that are not implemented into SymbolDatabase::_variableList
2013-04-04 09:47:44 -07:00
Ettl Martin
ba8cca8fa9
#4706 fix crash when a struct member is used as first argument. Replaced Token::nexArgument with %any% in Token::Match call. Added unittests in testing Token::nexArgument.
2013-04-04 15:12:18 +02:00
PKEuS
51685f24c5
Improved expression parsing in CheckNullPointer::isPointerDeRef() - fixed #4692
2013-04-03 01:27:08 -07:00
Ettl Martin
3e8eddc69e
cleanup testcases: moved testcases from #3888 into allocfunc13 which contains similar testcases already.
2013-04-03 10:12:36 +02:00
Ettl Martin
08ac48199e
#3103 added testcases.
2013-04-03 09:33:33 +02:00
Ettl Martin
9f25b618dc
#3888 added a testcase
2013-04-03 08:57:26 +02:00
PKEuS
7596282cba
Improved test coverage: Ensure that passing multiple <id> to --enable works. Check settings.isEnabled("warning").
2013-04-01 04:15:05 -07:00
PKEuS
fbe997ca80
Use global Settings instance in TestCmdlineParser, since most tests just need it to pass something to CmdlineParser class.
...
This change implies that we do not rely on any default state of the Settings class - as it should be, since CmdlineParser is tested, not Settings.
2013-04-01 04:12:56 -07:00
Frank Zingsheim
395a474ec2
Fixed #4695 : Infinite recursion inside isRecordTypeWithoutSideEffects()
2013-04-01 12:41:14 +02:00
PKEuS
12f5ccfb4e
Refactorized postfix operator check:
...
- Support class members
- Support references (removed wrong bailout)
- Removed wrong unit tests and wrong messages for std::cout << k-- << std::endl;
2013-03-31 04:17:23 -07:00
XhmikosR
a9955cce8e
run astyle
2013-03-30 19:06:13 +01:00
Frank Zingsheim
5d55d40361
Fixed #4656 (New check: Detect pure virtual function calls)
2013-03-30 15:09:22 +01:00
Robert Reif
a3f9b5c07d
Fixed #4686 (Prefer prefix ++/-- operators for non-primitive types with template iterator)
2013-03-30 13:49:56 +01:00
Alexander Mai
b9c27699b3
Fixed #4684 (cppcheck crash in template function call.)
2013-03-29 19:29:23 +01:00
Daniel Marjamäki
3301728c50
astyle formatting
2013-03-29 17:55:09 +01:00
Alexander Mai
7902cd0123
Fixed #4447 (false positive: (style) Variable 'X' is assigned a value that is never used (goto))
2013-03-28 06:44:37 +01:00
Robert Reif
3f57b5a6ca
Fixed #4682 (using 'struct' disables checking)
2013-03-28 06:36:49 +01:00
Daniel Marjamäki
2d70af2c82
Reverted fix. It might be possible to make a better fix
2013-03-25 19:55:35 +01:00
Daniel Marjamäki
2b02013fa7
Fixed #4668 (False positive: uninitialized Variable after unknown macro)
2013-03-25 19:52:33 +01:00
PKEuS
37ac86dec9
Fixed #4666 : Implemented proper variable scope checking for switch statements
2013-03-23 03:28:33 -07:00
Daniel Marjamäki
c9469993e2
Uninitialized variables: Fixed false positives when using sizeof inside loop
2013-03-22 08:10:46 +01:00
Daniel Marjamäki
a79354d51c
Uninitialized variables: Fixed false positive when taking address of uninitialized array that is a struct member
2013-03-20 16:59:45 +01:00
Ettl Martin
1b9c1c03fa
unittests: removed not needed '\n' at the end of testcases.
2013-03-20 15:36:16 +01:00
Daniel Marjamäki
dd155b57e4
Fixed #4487 (False positive: variable is not assigned a value (pointer alias))
2013-03-20 06:38:53 +01:00
Ettl Martin
54d398c7dd
unittests: removed not needed '\n' at the end of testcases.
2013-03-19 09:18:58 +01:00
Ettl Martin
7c0905cd4e
#4665 added todo unittest
2013-03-19 08:47:05 +01:00
Ettl Martin
ff826d7c62
#4664 : new check: (POSIX) write outside buffer size.
2013-03-19 08:22:48 +01:00
Daniel Marjamäki
1b18bfc93c
Fixed #3585 (errors not recognized when class has extra specification)
2013-03-18 19:09:04 +01:00
PKEuS
d9f7042992
Fixed false negative #4663
2013-03-18 08:17:53 -07:00
Daniel Marjamäki
a4a2f78a7a
Fixed #4659 (portability: address value / integer false positive)
2013-03-17 17:25:57 +01:00
PKEuS
1e66e0b931
Fixed false negative #4657
2013-03-15 05:00:51 -07:00
kchrist
740e790bf1
Fixed #4649 (false positive: Used file that is not opened; variables in struct)
2013-03-15 06:42:46 +01:00
Daniel Marjamäki
c0a34649c4
fixed 'duplicate expression' false positives for float-float. Ticket: #4639
2013-03-14 19:11:29 +01:00