Boris Egorov
0154d39bf6
Show struct member in unsignedLessThanZeroError warning
...
Before:
[/tmp/test.c:8]: (style) Checking if unsigned variable '.' is less than zero.
[/tmp/test.c:12]: (style) Checking if unsigned variable '.' is less than zero.
After:
[/tmp/test.c:8]: (style) Checking if unsigned variable 'd.n' is less than zero.
[/tmp/test.c:12]: (style) Checking if unsigned variable 'd.n' is less than zero.
2016-09-22 08:03:30 +07:00
Matthias Krüger
2f39ed6f88
redundantPointerOpError: put pointer name into single quotes in the error message.
2016-09-16 22:18:24 +02:00
Daniel Marjamäki
939b42df06
Fixed #7134 (False positive redundantAssignment - assignment to local variable of unknown type)
2016-08-29 03:48:08 +02:00
Daniel Marjamäki
bd21cd7c85
Fixed #6309 (FP: checkRedundantAssignment should not warn for pointer alias)
2016-08-08 21:43:00 +02:00
Daniel Marjamäki
e784901303
Fixed #6971 (False positive duplicateExpressionTernary - cast ignored)
2016-08-01 21:53:43 +02:00
PKEuS
92e3e802fb
Attempt to fix travis build and testrunner failure
2016-07-28 20:59:09 +02:00
PKEuS
452ecc7ceb
Improved check: Detect passedByValue even for arguments that are not declared as "const"
2016-07-28 19:37:10 +02:00
Daniel Marjamäki
0767284ca1
Fixed #7630 (FP: dead store, modifying array, index var modified)
2016-07-25 07:35:33 +02:00
Daniel Marjamäki
ed4a47de45
Tokenizer: Improve syntax checking of switch,if,while
2016-07-22 16:54:24 +02:00
Daniel Marjamäki
03d2829fb9
Merge simplecpp branch
2016-07-20 12:21:00 +02:00
Daniel Marjamäki
0ddeac0429
refactor (use ast) and improve CheckOther::checkRedundantAssignment (warn about global variables unless they are volatile, handle arrays in lhs better)
2016-07-18 12:43:23 +02:00
Daniel Marjamäki
d1f06ff47c
Fixed #7175 (False positive performance warning (buffer overwritten before its old content has been used))
2016-06-13 15:46:43 +02:00
Daniel Marjamäki
710e066a9a
Fixed #6406 (VarId: struct member initialization)
2016-05-22 21:18:52 +02:00
PKEuS
0bf85f9aa5
ValueType: Support integers defined in libraries ( #7394 )
2016-05-04 15:39:56 +02:00
Robert Reif
100c4276ea
Fixed #7424 (value type: wrong sign)
2016-03-18 10:30:57 +01:00
amai2012
9700dfead0
Testcase succeeds on Win32-VC-32bit, only 64bit needs to be fixed.
2016-03-01 22:32:27 +01:00
PKEuS
b4b38fb7ce
Use ValueType in CheckOther::invalidPointerCast()
...
False negative: operator new is currently not supported by ValueType.
2016-02-05 20:28:43 +01:00
PKEuS
cc8c498ebb
Moved a few tests to testgarbage.cpp
2016-02-04 09:10:20 +01:00
PKEuS
841f17776b
Set ValueType for assignment operators, detect division by zero for %= and /= again ( #7322 )
2016-02-02 17:17:55 +01:00
PKEuS
9d2258677d
Improved CheckOther::checkUnusedLabel(): Write a warning instead of a style message if it happens inside a switch()
2016-01-31 12:07:24 +01:00
Daniel Marjamäki
79aec559d5
Fixed #7243 (False positive unknownEvaluationOrder - comma operator inside while-clause)
2016-01-18 16:10:51 +01:00
Matthias Krüger
7b1710a44f
redundantAssignment: change from severity 'performance' to 'style' since avoiding unneccessary stores is a basic optimization done by compilers.
2016-01-15 22:01:40 +01:00
Alexander Mai
7802517a69
#7285 wrong var name: memset() called to fill 0 bytes of '&' memset with pointer: remove var name from message. Correct some entries in posix.cfg.
2016-01-12 23:20:48 +01:00
Daniel Marjamäki
b3208fb4b3
Fixed #7211 (False positive: Finding the same expression on both sides of an operator (enumconstant == 0))
2016-01-10 11:21:43 +01:00
Daniel Marjamäki
79e663dd6f
Settings: Remove '_' prefix for public member variables
2016-01-03 16:18:17 +01:00
Lauri Nurmi
996c9244d8
Update copyright year to 2007-2016.
2016-01-01 15:34:45 +02:00
Daniel Marjamäki
bd1037e95b
Fixed #7242 (False positive unknownEvaluationOrder - comma expression in function argument)
2015-12-29 12:06:42 +01:00
Daniel Marjamäki
25a5ac1846
Split up TestOther::testEvaluationOrder()
2015-12-28 14:04:14 +01:00
Daniel Marjamäki
15ecb26a6c
Tokenizer: Moved simplifyAssignmentInFunctionCall from simplifyTokenList1 to simplifyTokenList2
2015-12-28 13:58:41 +01:00
Daniel Marjamäki
0ddb5c12ce
Fixed #7238 (False positive unknownEvaluationOrder for comma operator on C code)
2015-12-28 13:45:55 +01:00
Daniel Marjamäki
908bc664a4
Evaluation order: ignore usage in sizeof
2015-12-27 14:08:16 +01:00
Daniel Marjamäki
c672210e06
Evaluation order: don't warn for 'dostuff(expr++, &expr)'
2015-12-26 15:48:43 +01:00
Daniel Marjamäki
ab6809f3fa
Fixed testrunner
2015-12-25 19:01:32 +01:00
Daniel Marjamäki
24438c326e
Fixed #7233 (Fasle negative 'unknownEvaluationOrder in case of macro)
2015-12-25 18:31:21 +01:00
Daniel Marjamäki
27af1bcfd8
Fixed #7229 (Improve check; unknown evaluation order, write different message for self assignment)
2015-12-25 18:00:19 +01:00
Daniel Marjamäki
07b929e13f
Added TODO test case for unknown evaluation order
2015-12-25 17:48:15 +01:00
Daniel Marjamäki
90a54b1fae
Fixed #7232 (False positive unknownEvaluationOrder on id = Remap( id += 42 );)
2015-12-25 16:45:11 +01:00
Daniel Marjamäki
81f0597316
Fixed #3206 and #7226 (New check: Undefined execution order)
2015-12-24 09:13:20 +01:00
Daniel Marjamäki
0baad496f2
Fixed #6383 (FP shiftNegative - value converted to unsigned in function argument)
2015-12-14 10:55:23 +01:00
Alexander Mai
9d8dffbd79
#6269 false positives in case of overloaded standard library functions. Detect memset() with proper argument cound, using new function numberOfArguments()
2015-12-06 12:50:05 +01:00
Alexander Mai
98f2cd021e
#7199 SymbolDatabase::validate() should be run in debug mode and print debug messages. In turn correct some test examples with invalid code.
2015-12-06 08:14:04 +01:00
Dmitry-Me
8f8a0097fe
Detect more non-interlocked accesses
2015-12-02 10:58:57 +03:00
Daniel Marjamäki
fb8cce647c
invalidTestForOverflow: Refactor; move from checkother to checkcondition
2015-11-30 08:51:15 +01:00
Daniel Marjamäki
26a07265a8
Fixed #7184 (Invalid test for overflow 'p + x < p')
2015-11-29 20:59:50 +01:00
Daniel Marjamäki
4fa888ec44
Warn when shifting a negative value, it is UB. ( #4931 )
2015-11-29 16:28:55 +01:00
PKEuS
f516de8633
Moved a few checks from CheckOther to CheckFunctions
2015-11-22 13:49:10 +01:00
Daniel Marjamäki
0f9d90d2be
Changed Copyrights. Removed my name.
2015-11-18 20:04:50 +01:00
Alexander Mai
435a980ce2
Convert wrong test result for #7133 to TODO_ASSERT_EQUALS and add more test cases
2015-11-15 20:14:20 +01:00
Alexander Mai
65666a1ba4
Makefile: explicit list directories which should be used with ctags. Run astyle.
2015-11-15 19:03:18 +01:00
amai2012
f0bf749621
#7133 crash: Variable::declarationId().
2015-11-15 19:01:29 +01:00