Philipp Kloke
776ad32a0b
Refactorized CheckStl::redundantCondition():
...
- Use symboldatabase
- Support erase() method
2014-04-12 23:41:46 +02:00
PKEuS
8cb3b13e56
Support "else if" and do-loop in CheckStl::checkDereferenceInvalidIterator()
2014-04-12 20:03:07 +02:00
PKEuS
e8ac355b39
Refactorized iterator checking:
...
- Fixed false positive #5669
- Use symboldatabase in CheckStl::pushback()
- Improved support for erase on std::vector and find
2014-04-12 20:03:07 +02:00
Martin Ettl
82092e412a
MathLib::isNullValue(): Fixed bug in detecting zero values. Improved test coverage of MathLib::IsNullValue().
2014-04-12 02:14:50 +02:00
Daniel Marjamäki
9d51bfd015
Fixed #5397 (False positive: Same expression on both sides of '&')
2014-04-12 16:06:31 +02:00
PKEuS
7ffc313748
Save "->" in Token::originalName if simplified to "."; Fix false positive #4890 .
2014-04-12 12:04:56 +02:00
PKEuS
9c921ab657
Fixed handling of member function pointers in setVarId and SymbolDatabase ( #4577 )
2014-04-12 12:04:55 +02:00
PKEuS
83f4657e69
Fixed remaining issue in #3503 : Member function taking a function pointer must not be "simplified" to a variable initialization
2014-04-12 12:04:55 +02:00
PKEuS
92839ab4d2
Refactorizations:
...
- Rearranged members of Value to reduce structures size
- Removed redundant ctor of Value
- Fixed VS warning in tokenize.cpp
2014-04-12 12:04:55 +02:00
Alexander Mai
718e42f5ca
Fix some clang warnings about type conversions
2014-04-11 23:35:53 +02:00
Alexander Mai
6da6508913
Extract new function MathLib::isDec() our of isInt()
2014-04-11 22:15:25 +02:00
orbitcowboy
6be53376f4
MathLib:IsNullValue(): removed commented out code.
2014-04-11 01:28:16 +02:00
orbitcowboy
9c08885caf
MathLib:IsNullValue(): using a Finite State Machine to determine a string value contains a numeric NULL value. The NULL value can be Integer, Binary, Hex, Octal. The corresponding unit test cases are also included.
2014-04-11 01:27:05 +02:00
Philipp Kloke
1fafc7f4dc
Refactorization: use MathLib::isNullValue in CheckOther::checkMemsetInvalid2ndParam(); Fixed it to support also float literals like "0.f"
2014-04-11 14:17:36 +02:00
Philipp Kloke
cf30fab413
Refactorized inefficient usage of Token::findmatch in two checks in checkother.cpp
2014-04-11 14:17:35 +02:00
Philipp Kloke
20c3a5baf0
Refactorized switchCaseFallThrough: Removed lots of obsolete code
2014-04-11 14:17:35 +02:00
Robert Reif
7eb3988415
Fixed #5659 (False negative: mismatching allocation / deallocation whith using namespace)
2014-04-11 05:40:37 +02:00
Alexander Mai
ab2f8bfba3
Tidy up MathLib::isInt() - using a state machine approach
2014-04-10 22:46:55 +02:00
PKEuS
b10fce304e
Don't suggestInitializationList for arrays used as initializer ( #5640 )
2014-04-10 22:28:02 +02:00
PKEuS
2aaae741dd
Fixed cppcheck message
2014-04-10 21:58:53 +02:00
PKEuS
c33498fa0b
Fixed false positive redundantAssignment when operator() is called ( #5568 )
2014-04-10 21:56:30 +02:00
Alexander Mai
559a2bc2c8
Avoid FP exceptThrowInNoThrowFunction and exceptThrowInNoexecptFunction
2014-04-10 21:55:49 +02:00
PKEuS
e39b89efc3
Throw more syntaxErrors from SymbolDatabase, fixing #5663
2014-04-10 20:11:03 +02:00
PKEuS
25b1f2f541
Fixed #5643 (crash on address-of-operator& in condition) as suggested by serval2412
2014-04-10 19:49:21 +02:00
Alexander Mai
e19129a409
Fix #4724 (Error in calculation shift operation: wrong sign: 1UL << 63)
2014-04-10 19:22:14 +02:00
Robert Reif
b0af67f369
Fixed #5486 (false positive: (warning) %zd in format string (no. 1) requires 'ssize_t' but the argument type is 'ssize_t {aka long}'.)
2014-04-10 17:25:11 +02:00
Robert Reif
847d28d283
Fixed #5638 (is there any plan to check noexcept correctness?)
2014-04-10 16:17:10 +02:00
Robert Reif
4ae204e46b
Fixed #5659 (False negative: mismatching allocation / deallocation whith using namespace)
2014-04-10 16:11:11 +02:00
Daniel Marjamäki
c8ae1e4751
Fixed #5658 (false positive: (error) Uninitialized variable: s)
2014-04-10 15:59:37 +02:00
Daniel Marjamäki
9b1d058410
Fixed #5660 (false positive: (error) Uninitialized variable: result)
2014-04-10 06:40:53 +02:00
Daniel Marjamäki
59cd1879db
Fixed #5467 (False positive incorrectly claiming use after erase)
2014-04-09 10:32:56 +02:00
Alexander Mai
89dc652af9
#5631 Typo and misleading error message in negativeMemoryAllocationSize
2014-04-08 20:23:00 +02:00
Daniel Marjamäki
d7e2e3bd5e
Fixed #5502 (FP: Dereferencing 'b' after it is deallocated / released)
2014-04-06 18:45:24 +02:00
Daniel Marjamäki
456e33fc7b
Code cleanup
...
[ci skip]
2014-04-05 08:27:52 +02:00
Daniel Marjamäki
049d68ae7d
AST: Fixed bad syntax tree for 'if (x()[0]==1);'
2014-04-05 08:03:24 +02:00
Alexander Mai
173a2e9ea2
#5641 fix crash within CheckClass::initializeVarList()
2014-04-04 22:13:51 +02:00
Daniel Marjamäki
0788e64eb8
Removed unused function expressionsHasSideEffects()
2014-04-04 07:04:19 +02:00
Daniel Marjamäki
8dcb3bae47
Refactoring checks of overlapping conditions in if and else-if
2014-04-03 19:35:50 +02:00
Daniel Marjamäki
1a83338faf
Refactoring. Created utility function isOppositeCond()
2014-04-03 17:08:42 +02:00
Daniel Marjamäki
110f956029
code cleanup for invertOperatorForOperandSwap()
2014-04-03 16:22:07 +02:00
Daniel Marjamäki
ffac614f7e
Fix Cppcheck warning. Use reference to avoid redundant data-copy
2014-04-03 16:16:39 +02:00
PKEuS
d9358de8b4
Refactorization: Use templates and rValue references
...
-> Performance gain of up to 15% on entire checking time (depends on setup; Result was checked with VS12 (x64), matchcompiled version, ran on tinyxml and cppcheck itself)
2014-04-03 15:03:37 +02:00
Daniel Marjamäki
dcc245be9e
Merge pull request #283 from Dmitry-Me/bracemacroparameter
...
Macro parameter was not braced.
2014-04-03 07:22:34 +02:00
Daniel Marjamäki
9f80f3a4e8
Small cleanups in the code
2014-04-03 06:37:02 +02:00
Daniel Marjamäki
a115bbbbb5
Refactoring CheckOther::checkCharVariable() using AST
2014-04-03 06:27:29 +02:00
Daniel Marjamäki
a6557f8c74
Null pointer: Fixed false positive discovered by Travis when self-checking cppcheck
2014-04-02 19:39:42 +02:00
Daniel Marjamäki
189360ae20
ValueFlow: changed back bailout message
2014-04-02 19:22:40 +02:00
Daniel Marjamäki
f13be7fb6c
Travis: Fixed possible null pointer dereference reported by travis
2014-04-02 19:08:44 +02:00
PKEuS
a6e134e811
Removed compatibility code for Borland and Sun compilers which should not be necessary for a compiler supporting C++11 (as required by cppcheck).
2014-04-02 17:26:59 +02:00
Dmitry-Me
3244a61cac
Macro parameter was not braced.
2014-04-02 09:25:13 +04:00