PKEuS
c92230dfee
Fixed crash on garbage code introduced by recent commit.
2014-09-01 12:41:30 +02:00
PKEuS
20a066bb14
Run unreachableCode checking only on executable scopes ( #5789 )
2014-09-01 11:29:39 +02:00
PKEuS
b5e064e737
Fixed unreachableCode message if a lambda is returned ( #6008 ).
2014-09-01 11:10:42 +02:00
PKEuS
353a9e9a64
Bailout for duplicateBranch check if branches are empty ( #5354 )
2014-09-01 10:19:14 +02:00
PKEuS
e9fdfc6cd0
Fix on checking side for #6099
2014-08-30 11:18:48 +02:00
PKEuS
06a92e8981
Moved several condition checks from checkOther to checkCondition (former checkAssignIf)
2014-08-29 17:06:46 +02:00
PKEuS
eba8c6f6c5
Refactorization:
...
- Added missing separating comments between checks in checkother.cpp
- Moved checks related to strings into own file
2014-08-27 09:42:09 +02:00
PKEuS
7f2be2f57c
Fixed template bracket linkage in while loop simplification
...
Ran AStyle
2014-08-23 12:28:54 +02:00
amai2012
976966fe81
#5639 String literal compared with char buffer in a struct.
2014-08-23 09:41:40 +02:00
PKEuS
0bf7b03f96
Refactorization: Support :: in some places in checkother.cpp
2014-08-18 10:25:30 +02:00
Daniel Marjamäki
d44d6ad94a
incorrect logic operator: fixed crashes
2014-08-18 05:37:07 +02:00
Daniel Marjamäki
ebc0b6cd44
astIsFloat: Fix crash when there is no second operand for '.'
2014-08-17 14:28:31 +02:00
Daniel Marjamäki
f7f44f24c7
Fixed #5132 (False negative: incorrectLogicOperator in simple if-clause)
2014-08-17 14:04:40 +02:00
Daniel Marjamäki
364c975701
Fixed #5557 (astIsFloat: better handling of '.')
2014-08-15 16:48:53 +02:00
PKEuS
5d302716e7
Refactorized Variable::isIntegralType() and Variable::isFloatType():
...
- Cached property
- Make use of it in several checks
- float* is flagged as floating point type
2014-08-09 11:45:13 +02:00
PKEuS
c3577bc8dd
Fixed crash, simplified code in testassert.cpp
2014-08-06 12:24:21 +02:00
PKEuS
d3a567bf96
Fixed false positive #5824 : Variables that might be used for va_start() must not be passed by reference.
2014-08-06 12:06:36 +02:00
PKEuS
4a3d719386
Fixed recently introduced FP when C-Style casting nullpointers
2014-08-04 11:42:14 +02:00
PKEuS
4c80ca4e8e
Improved cstyleCast check:
...
- Detect casting of literals
- Check initializer lists (#3630 )
2014-08-04 11:21:25 +02:00
Daniel Marjamäki
8a1c5d6fce
Fixed #6011 (crash: libreoffice/binfilter svt_enhwmf.cxx)
2014-07-28 16:33:42 +02:00
Daniel Marjamäki
fdfea717c6
Suspicious string comparison: Refactoring using AST. Fixed FP in Lac.
2014-07-28 14:27:35 +02:00
Daniel Marjamäki
76020d2ad0
astIsFloat: expression 'floatvar ? 0x40 : 0' is not float
2014-07-26 09:09:58 +02:00
Dmitry-Me
07c120f1af
Cache option flags and check them first.
2014-07-23 17:06:27 +04:00
Daniel Marjamäki
2cc31acabb
Fixed #5922 (FP: passedByValue for std::string::value_type)
2014-07-18 15:51:59 +02:00
Daniel Marjamäki
bf5b4d9ece
astyle formatting
...
[ci skip]
2014-07-14 14:38:40 +02:00
Dmitry-Me
9829e0b48a
Clearer variable names, fix typo in comment.
2014-07-11 11:33:09 +04:00
Dmitry-Me
ba3757dfd3
Bring variables decalaration to where they are really needed.
2014-07-10 11:23:14 +04:00
Daniel Marjamäki
d40b77dce2
Removed special 'else if' handling. this is redundant since these are simplified.
2014-07-02 16:16:19 +02:00
Daniel Marjamäki
5e9e90b1c1
Fixed Token::Match pattern. In x|y|.. patterns, all %cmd% should be placed before plain-text operands.
2014-07-01 15:55:29 +02:00
Daniel Marjamäki
41baffdda1
Fixed #5850 (Wrong Message on self assignment)
2014-06-28 15:26:22 +02:00
orbitcowboy
16352ca674
Reverted fix 6d0f490138
, but keeping the testcase in the testsuite.
2014-06-06 14:44:22 +02:00
orbitcowboy
6d0f490138
#5895 - Fixed potential signed integer overflow in Checkother:getvalue. Added regression test.
2014-06-05 16:41:10 +02:00
orbitcowboy
e9144d1a78
Fixed #5890 - crash: wesnoth desktop_util.cpp / unicode.hpp.
2014-05-29 02:58:18 +02:00
Daniel Marjamäki
66ad3c97b9
Fixed #5857 (strPlusChar: Crash on invalid code 'int+;')
2014-05-31 10:34:00 +02:00
Daniel Marjamäki
70b4c945de
Fixed #5874 (False positive: 'opposite conditions in nested if' with arrays)
2014-05-30 19:19:24 +02:00
Daniel Marjamäki
bc2ba1706b
cleanup redundant valueflow check. if there are no values the getValue will return NULL.
2014-05-28 21:03:16 +02:00
PKEuS
8f79dc3ff8
Cleaned up includes and forward declarations in checkers:
...
- Removed definitely unnecessary forward declarations (e.g. "class Token"; token.h is already included by check.h, so a definition is unnecessary)
- Removed unused includes
2014-05-24 12:50:03 +02:00
PKEuS
b78131cfcf
Improved cast detection in AST:
...
-> Make use of it in checkother.cpp
Use tokenizer simplification instead of reimplementation for test suite
2014-05-24 11:29:32 +02:00
orbitcowboy
85496cfadc
Fixed CID 1192595: Dereference null return value in checkother.
2014-05-23 18:11:44 +02:00
PKEuS
bc0682d1e9
Enhancements related to duplicate expression checking:
...
- Fixed astIsFloat() for complex expressions
- Enhanced support for commutative operators (#5260 )
2014-05-22 21:46:48 +02:00
PKEuS
9dd4ac68c0
Refactorization in CheckNullPointer:
...
- Use AST to detect dereferences
- Added more unit tests
- Removed handling of unknown constructs in CheckNullPointer::isPointerDeRef()
Added link to verbose message cstyleCast.
2014-05-22 19:48:00 +02:00
PKEuS
f1c303d399
Fixed recently introduced verbose message for cstyleCast
...
[ci skip]
2014-05-22 15:46:28 +02:00
PKEuS
35528ca708
Added verbose message for "C-style pointer casting" ( #4140 )
2014-05-22 08:57:45 +02:00
PKEuS
4cad064c3c
Fixed false positive on C code introduced by last commit
2014-05-21 20:36:19 +02:00
PKEuS
d19eabde42
New Check: Compare pointer with '\0' ( #4070 )
2014-05-21 19:12:07 +02:00
PKEuS
cdfed32500
Merged checkSelfAssignment() into checkDuplicateExpression():
...
- Fixed false negatives on self assignments of more complex expressions like "a.b"
- New false negative on self assignment in initialization
- Support this->... pattern in isSameExpression()
- Fixed #5819 : Check type of operands
2014-05-21 18:19:42 +02:00
PKEuS
48c3d02fc3
Fixed false positives and false negatives in 'oppositeInnerCondition' (among others: #5808 )
2014-05-21 14:38:41 +02:00
PKEuS
5fbd58d98d
Fixed messages of CheckInternal, fixed a false positive.
2014-05-18 20:39:52 +02:00
PKEuS
e713ad45cb
Refactorizations:
...
- Simplified pattern ".|->" to "."
- Use nextArgument() where appropriate
2014-05-18 17:07:21 +02:00
PKEuS
780719665f
Fixed crash when checking tinyxml introduced by previous commit
2014-05-18 13:40:49 +02:00