cppcheck/test
Rikard Falkeborn fc1d5b187f leakNoVarFunctionCall: Use AST more (fix #9252) (#2086)
Use the AST a little bit more to improve the check. In order to do so,
rewrite the check to work from the outer function first and then check
the arguments, instead of the other way around.

It also fixes Trac ticket #9252, no warning is now given for

	void* malloc1() {
		return(malloc1(1));
	}

This FP seems to be common in daca results.

It also makes it possible to improve handling of casts, for example
cppcheck now warns about

	void f() {
		strcpy(a, (void*) strdup(p));
	}

But not for

	char* f() {
		char* ret = (char*)strcpy(malloc(10), "abc");
		return ret;
	}

These FP/FN were introduced when the check was switched to use the
simplified token list.
2019-08-14 22:01:40 +02:00
..
cfg gnu.cfg: Add more __builtin_* functions and some tests 2019-08-02 12:27:46 +02:00
cli appveyor: check that cmake builds work also. run test/cli tests. 2019-07-09 07:46:53 +02:00
synthetic Improve Python code 2017-06-05 13:23:00 +02:00
testsuites Typos found by running "codespell" (#1804) 2019-04-23 13:26:48 +02:00
CMakeLists.txt appveyor: check that cmake builds work also. run test/cli tests. 2019-07-09 07:46:53 +02:00
options.cpp Update Copyright 2019-06-29 07:49:14 +02:00
options.h Update Copyright 2019-06-29 07:49:14 +02:00
redirect.h Updated copyright year 2018-01-14 15:37:52 +01:00
test.cxx test: tabs to spaces, remove trailing spaces and extra empty lines at the end of files 2012-09-17 13:51:40 +02:00
test64bit.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testassert.cpp Moved CheckAssert::assertWithSideEffects to normal checking 2019-03-09 16:50:50 +01:00
testastutils.cpp Fix issue 9235: new crash in astutils isVariableChanged from endless recursion (#2040) 2019-07-26 07:03:21 +02:00
testautovariables.cpp Fix issue 9275: False positive: Non-local object uses local variable (#2084) 2019-08-14 20:09:33 +02:00
testbool.cpp Remove debug printout (#1933) 2019-06-28 22:08:32 +02:00
testboost.cpp CheckBoost: Use 'normal' checking 2019-03-09 20:00:31 +01:00
testbufferoverrun.cpp Activate a TODO test case 2019-07-29 08:06:57 +02:00
testcharvar.cpp Remove test case, ValueFlow will truncate and sign-extend values 2019-05-01 19:33:47 +02:00
testclass.cpp Renamed safeClassRefMember => unsafeClassRefMember 2019-08-13 20:58:31 +02:00
testcmdlineparser.cpp Convert SHOWTIME_MODES to enum class 2019-07-31 22:35:51 +02:00
testcondition.cpp Fix issue 9268: false negative: (style) Condition '...' is always true (#2080) 2019-08-14 06:34:27 +02:00
testconstructors.cpp Run more tests on full token list (#2020) 2019-07-22 10:26:55 +02:00
testcppcheck.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testerrorlogger.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testexceptionsafety.cpp Use 'normal' checking instead of 'simplified' 2019-03-16 07:19:48 +01:00
testfilelister.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testfiles.pri Fixed #8960 ("(debug) Unknown type 'x'." with alias in template class alias) (#1643) 2019-02-05 08:52:23 +01:00
testfunctions.cpp Fix false positive with ignoredReturnValue with std::move (#1809) 2019-04-26 12:22:31 +02:00
testgarbage.cpp Fix #9225 (Crash on valid C++14 code) (#2031) 2019-07-24 19:20:19 +02:00
testimportproject.cpp astyle formatting 2019-04-16 19:07:44 +02:00
testincompletestatement.cpp astyle formatting 2019-05-21 10:43:33 +02:00
testinternal.cpp CheckInternal: Extend redundant null pointer check before Token::Match() (#1789) 2019-04-06 07:44:44 +02:00
testio.cpp Fix #8992: Add originalTypeToken to auto (#1701) 2019-02-27 06:44:31 +01:00
testleakautovar.cpp astyle formatting 2019-08-07 08:05:46 +02:00
testlibrary.cpp Refactoring: Convert enum Direction to enum class 2019-08-01 20:56:02 +02:00
testmathlib.cpp MathLib: Added robustness tests for 'MathLib::divide()'. 2019-05-25 23:06:50 +02:00
testmemleak.cpp leakNoVarFunctionCall: Use AST more (fix #9252) (#2086) 2019-08-14 22:01:40 +02:00
testnullpointer.cpp Fix issue 8296: ValueFlow: value not set in conditional scope in subfunction (#2071) 2019-08-11 15:39:37 +02:00
testoptions.cpp Allow multiple test case arguments to testrunner (#1755) 2019-03-26 20:28:40 +01:00
testother.cpp Re-enable valueFlowSubFunction (#2063) 2019-08-05 16:26:32 +02:00
testpath.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testpathmatch.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testplatform.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testpostfixoperator.cpp Fixed #9042 (Another `using BOOL` type breach) (#1765) 2019-03-27 21:42:50 +01:00
testpreprocessor.cpp Removed casts 2019-07-16 09:14:44 +02:00
testrunner.cpp Update Copyright 2019-06-29 07:49:14 +02:00
testrunner.vcxproj Increase Windows stack size to 8M (#1998) 2019-07-15 12:39:58 +02:00
testrunner.vcxproj.filters Updated to Visual Studio 2019 2019-07-06 12:11:19 +02:00
testsamples.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testsimplifytemplate.cpp Fix #9250 (Regression: crash in gcc testsuite) (#2067) 2019-08-07 08:05:02 +02:00
testsimplifytokens.cpp Fix ternary operator simplification to accept template parameters. (#2048) 2019-07-28 21:52:52 +02:00
testsimplifytypedef.cpp Fix issue 8924: Re-enable valueFlowTerminatingCondition 2019-08-05 07:18:06 +02:00
testsimplifyusing.cpp Partial fix for #9191 (simplifyTypedef: Problem when namespace is used) (#1952) 2019-07-06 20:22:13 +02:00
testsizeof.cpp sizeof: write inconclusive warning if calculation in sizeof is done indirectly by macro 2019-02-26 21:06:44 +01:00
teststl.cpp Fix FP with negative index and negated condition (#2081) 2019-08-14 06:32:31 +02:00
teststring.cpp Re-enable valueFlowSubFunction (#2063) 2019-08-05 16:26:32 +02:00
testsuite.cpp Fixed Cppcheck shadowVar warnings 2019-04-30 21:01:18 +02:00
testsuite.h Add help to testrunner (#1704) 2019-03-02 08:06:23 +01:00
testsuppressions.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testsymboldatabase.cpp Fix issue 8924: Re-enable valueFlowTerminatingCondition 2019-08-05 07:18:06 +02:00
testthreadexecutor.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testtimer.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testtoken.cpp Try to fix Cppcheck warning to make Cppcheck happy 2019-08-02 07:57:34 +02:00
testtokenize.cpp Fixed #9137 (Tokenizer: Wrong handling of volatile pointer) 2019-08-03 12:28:50 +02:00
testtokenlist.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testtype.cpp Re-enable valueFlowSubFunction (#2063) 2019-08-05 16:26:32 +02:00
testuninitvar.cpp Fixed #7758 (Function array is seen as Uninitialized) 2019-07-24 18:20:23 +02:00
testunusedfunctions.cpp fixed tests, unused templates are removed by default 2019-05-05 19:40:58 +02:00
testunusedprivfunc.cpp Run more tests on full token list (#2020) 2019-07-22 10:26:55 +02:00
testunusedvar.cpp Fixed #9234 (FP unreadVariable - assignment via iterator) 2019-08-04 10:21:16 +02:00
testutils.h Correct Zero/Null as pointer constant (#1938) 2019-06-30 21:39:22 +02:00
testvaarg.cpp Disable all simplified checks 2019-03-16 09:17:50 +01:00
testvalueflow.cpp Fix issue 8313 and 7326: Track values of pointer aliases in valueflow 2019-08-12 12:58:53 +02:00
testvarid.cpp token simplifier: fix namespace, token link and syntax error support for template type aliases (#1863) 2019-06-01 10:52:29 +02:00