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
PKEuS
1589841cb6
Fixed crash in clang test suite with member variable pointers
2015-11-11 18:26:59 +01:00
PKEuS
36c5815ddb
Fixed false positive about redundant variable assignment in try-scopes if the variable is read in catch block ( #6555 )
2015-11-11 17:21:55 +01:00
Alexander Mai
7d8b62e615
Add regression test for #6669 Return value of malloc is reported not stored, while it is.
2015-10-26 18:24:49 +01:00
PKEuS
ee58587706
Fixed false positive unreachableCode when ternary operator is used ( #6664 )
2015-10-26 08:29:43 +01:00
PKEuS
0a34b206e8
Refactorization: Reduced code duplication in test suite
2015-10-08 11:35:51 +02:00
PKEuS
07b661ef62
Refactorization: Improved handling of preprocessor in test suite
...
- Set Preprocessor::macroChar to '$' once in the beginning to avoid problems when changing the order of tests
- Removed Preprocessor usage from where it is not required
- Fixed a TODO in testuninitvar.cpp
2015-10-07 14:18:57 +02:00
Daniel Marjamäki
a574fda8a9
Fixed #6935 (Wrong duplicate expression)
2015-10-03 14:56:24 +02:00
PKEuS
c5a8ecb6f9
New check: Detect unused 'goto' labels ( #5124 )
2015-08-30 16:45:47 +02:00
Simon Martin
6fb19b02d0
Properly differentiate arrays of pointers and pointers to arrays.
2015-08-25 21:19:19 +02:00
PKEuS
128a926d9d
Collected some more garbage code tests in testgarbage.cpp; Avoid std::string creation in testgarbage.cpp
2015-08-16 19:12:12 +02:00
PKEuS
b77912a0b5
Support namespaces in CheckOther::checkIgnoredReturnValue()
2015-08-15 12:19:14 +02:00
Matthias Krüger
391194579c
CheckOther::checkComparisonFunctionIsAlwaysTrueOrFalseError: "evaluates always" -> "always evaluates"
2015-08-11 13:27:55 +02:00
Daniel Marjamäki
c9e239afbf
Fixed #6908 (False positive: Same expression on both sides of '+='.)
2015-08-07 20:28:25 +02:00
Daniel Marjamäki
ec3d76be5e
astyle formatting
2015-08-07 20:27:32 +02:00
amai2012
53feb88614
Merge pull request #630 from Dmitry-Me/detectRaceInInterlockedAccess
...
Prototype for detecting non-interlocked check after InterlockedDecrement()
2015-08-06 15:43:10 +02:00
Dmitry-Me
43800a9419
Detect non-interlocked check after InterlockedDecrement()
2015-08-05 12:20:28 +03:00
Daniel Marjamäki
67e9ed9294
ZeroDiv: Avoid constant folding in testcases
2015-08-02 18:56:26 +02:00
Alexander Mai
ea62ab337b
Add more testcases for zerodiv
2015-08-02 14:05:09 +02:00
Alexander Mai
965a034afd
Fix some more false positives on zerodiv: error should be issued if type of epxression is known to be integral
2015-08-01 18:42:17 +02:00
Alexander Mai
f91ad9bbf6
5402 false positive: (error) Division by zero -- with boost::format
2015-08-01 17:28:54 +02:00
Daniel Marjamäki
d4344bd859
cleanup testcases for div()
2015-07-30 14:05:53 +02:00
Daniel Marjamäki
6790d91fbb
Improve error messages for conditional values. make valueFlowSwitchVariable values conditional that depend on the case. Partial fix for #6884 .
2015-07-29 19:54:57 +02:00
PKEuS
738057229c
Improved astIsFloat(): Handle function calls and sizeof, fixed ordering of checks
...
Handle sizeof in isSameExpression() (#6851 )
2015-07-29 14:28:24 +02:00
Daniel Marjamäki
29fbbef001
TestOther: Added zeroDiv test to make sure there is not FN when there is cast
2015-07-26 22:23:37 +02:00
Daniel Marjamäki
bf921251e9
TestOther: code cleanup
2015-07-26 22:21:26 +02:00
Daniel Marjamäki
389aec51ae
Fixed #6598 (False positive zerodivcond - cast to double ignored)
2015-07-26 22:08:36 +02:00
Alexander Mai
473336f986
#6426 FP duplicateExpressionTernary - (expr) ? ~0u : ~0ul. Regression test added. That issue got fixed in 1.69 already
2015-07-26 06:28:23 +02:00
PKEuS
176b3925b3
Removed "verify" code in testrunner. Fixing its messages reduces the accuracy of the test suite.
2015-07-25 14:18:41 +02:00
Simon Shanks
9910c1fa0c
Fixed #6617 (preprocessor performance improvement)
2015-07-24 13:30:41 +02:00
orbitcowboy
48fed95942
Fixed wrong test case in testother: mathfunctionCall_atan2().
2015-07-16 10:55:58 +02:00
Martin Ettl
027bdd3370
Reverted cebc105856
.
2015-07-13 21:31:24 +02:00
orbitcowboy
08d6c244ee
Running astyle.
2015-07-13 16:50:48 +02:00
orbitcowboy
cebc105856
Changed test case from recent commit into a TODO test case. Since it is a FP.
2015-07-13 16:50:23 +02:00
orbitcowboy
d042151b62
Checkother:selfAssignment: Improved test coverage.
2015-07-13 16:39:21 +02:00
Alexander Mai
6e03e7dca2
Remove some code checking for invalid class hierarchy which got obsolete since 480a5672b0
. Run astyle
2015-07-01 07:50:13 +02:00
amai2012
108b035af2
Adjust two checks which have different results on Windows/Visual Studio than on Linux: one succeeds already, another fails. Analysis/fix is under development. Temporary repair allows to detect further regressions.
2015-06-30 21:21:26 +02:00
Daniel Marjamäki
63f39ea48f
Change unusedScopedObject severity from error to style. The checker does not determine that there is ub or wrong behaviour.
2015-06-20 11:22:15 +02:00
Simon Martin
519bd7007a
Ticket #6588 : Properly detect whether the condition in a ternary operator is constant on C input.
2015-05-31 22:40:13 +02:00
Simon Martin
764df4dd56
Ticket #6588 : Added test cases since the initial issue is fixed by some past commit.
2015-05-30 22:57:54 +02:00