cppcheck/lib
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
..
CMakeLists.txt CMake: Find header in externals, e.g. externals/picojson.h 2019-04-22 18:52:02 +02:00
analyzerinfo.cpp Update Copyright 2019-06-29 07:49:14 +02:00
analyzerinfo.h Updated copyright year 2018-10-13 18:20:31 +02:00
astutils.cpp Typos found by running "codespell" (#2072) 2019-08-08 21:05:28 +02:00
astutils.h Fix issue 9207: Not detected 'always true' and unreachable code 2019-08-08 07:46:47 +02:00
check.cpp Safe checks: Clarify a warning message 2019-07-25 17:19:51 +02:00
check.h Safe checks: Clarify a warning message 2019-07-25 17:19:51 +02:00
check64bit.cpp
check64bit.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checkassert.cpp Update copyright year 2019-02-09 07:24:06 +01:00
checkassert.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checkautovariables.cpp Fix issue 9275: False positive: Non-local object uses local variable (#2084) 2019-08-14 20:09:33 +02:00
checkautovariables.h Fix issue 3695: Handle class pointers 2019-07-07 10:16:19 +02:00
checkbool.cpp Update Copyright 2019-06-29 07:49:14 +02:00
checkbool.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checkboost.cpp
checkboost.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checkbufferoverrun.cpp Refactoring: Use enum class 2019-07-16 10:51:26 +02:00
checkbufferoverrun.h Fix Cppcheck warnings 2019-06-15 13:01:45 +02:00
checkclass.cpp Renamed safeClassRefMember => unsafeClassRefMember 2019-08-13 20:58:31 +02:00
checkclass.h Renamed safeClassRefMember => unsafeClassRefMember 2019-08-13 20:58:31 +02:00
checkcondition.cpp Replace 'unsigned' with 'nonneg' in checkcondition 2019-07-16 08:21:25 +02:00
checkcondition.h Replace 'unsigned' with 'nonneg' in checkcondition 2019-07-16 08:21:25 +02:00
checkexceptionsafety.cpp Refactoring; Use range for loops 2018-07-14 09:49:03 +02:00
checkexceptionsafety.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checkfunctions.cpp Replace 'unsigned' with 'nonneg' in checkfunctions 2019-07-16 08:49:02 +02:00
checkfunctions.h Replace 'unsigned' with 'nonneg' in checkfunctions 2019-07-16 08:49:02 +02:00
checkinternal.cpp CheckInternal: Extend redundant null pointer check before Token::Match() (#1789) 2019-04-06 07:44:44 +02:00
checkinternal.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checkio.cpp checkio.cpp: Fix forgotten "nonneg" change which breaks build 2019-07-16 09:30:36 +02:00
checkio.h replace 'unsigned' with 'nonneg' in checkio 2019-07-16 08:37:26 +02:00
checkleakautovar.cpp 8706 (#2066) 2019-08-07 08:04:10 +02:00
checkleakautovar.h Replace 'unsigned' with 'nonneg' in checkleakautovar 2019-07-16 08:54:21 +02:00
checkmemoryleak.cpp leakNoVarFunctionCall: Use AST more (fix #9252) (#2086) 2019-08-14 22:01:40 +02:00
checkmemoryleak.h Memleak: Refactor check to separate function (#2079) 2019-08-13 13:00:59 +02:00
checknullpointer.cpp Improve diagnostics with null smart pointers (#1805) 2019-04-26 11:30:09 +02:00
checknullpointer.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checkother.cpp Fix issue 9231: FP constParameter - argument passed parent ctor (#2032) 2019-07-24 20:59:58 +02:00
checkother.h Add check for const variables 2019-07-24 09:59:01 +02:00
checkpostfixoperator.cpp Refactoring: Use ranged for loop 2018-07-13 16:50:12 +02:00
checkpostfixoperator.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checksizeof.cpp Update Copyright 2019-06-29 07:49:14 +02:00
checksizeof.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checkstl.cpp Fix issue 8313 and 7326: Track values of pointer aliases in valueflow 2019-08-12 12:58:53 +02:00
checkstl.h Switch to use lifetime analysis for iterators and pointers to invalid containers 2019-07-18 10:56:44 +02:00
checkstring.cpp Overlapping sprintf, improve handling of casts (#1945) 2019-07-05 12:27:39 +02:00
checkstring.h Checkstring fixes (#1783) 2019-04-06 06:54:38 +02:00
checktype.cpp Clarify signConversion warning message 2019-08-05 12:41:08 +02:00
checktype.h Clarify signConversion warning message 2019-08-05 12:41:08 +02:00
checkuninitvar.cpp Refactoring: Convert enums to enum classes 2019-08-02 21:14:29 +02:00
checkuninitvar.h Mark members and arguments with 'nonneg' 2019-07-14 12:22:33 +02:00
checkunusedfunctions.cpp Fixed #8580 (False positive: unused function (lambda)) 2019-04-27 17:17:51 +02:00
checkunusedfunctions.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checkunusedvar.cpp Fixed #9234 (FP unreadVariable - assignment via iterator) 2019-08-04 10:21:16 +02:00
checkunusedvar.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
checkvaarg.cpp Update copyright year 2019-02-09 07:24:06 +01:00
checkvaarg.h Disable all simplified checks 2019-03-16 09:17:50 +01:00
config.h sync (#1835) 2019-05-17 09:31:41 +02:00
cppcheck.cpp CLI: error id from addon is <addon>-<id> 2019-08-10 07:43:47 +02:00
cppcheck.h test/cli: execute addon 2019-04-14 15:00:03 +02:00
cppcheck.natvis Fixed Visual Studio Natvis file after recent refactoring (#1299) 2018-07-09 08:27:26 +02:00
cppcheck.vcxproj Increase Windows stack size to 8M (#1998) 2019-07-15 12:39:58 +02:00
cppcheck.vcxproj.filters Add ctu sources to VS projects 2018-12-27 22:11:40 +01:00
ctu.cpp Mark members and arguments with 'nonneg' 2019-07-14 12:22:33 +02:00
ctu.h Convert InvalidValueType to enum class 2019-07-31 22:56:16 +02:00
errorlogger.cpp fix crash in daca gcc-avr from intentional bad instantiation test (#1994) 2019-07-15 12:41:06 +02:00
errorlogger.h fix crash in daca gcc-avr from intentional bad instantiation test (#1994) 2019-07-15 12:41:06 +02:00
importproject.cpp Refactor load/write of cppcheck project. Reuse same string constants in cli and gui. 2019-08-09 21:15:02 +02:00
importproject.h astyle formatting 2019-08-12 12:54:25 +02:00
lib.pri Dmake cleanups (#2077) 2019-08-14 20:53:51 +02:00
library.cpp Modernize: Use enum class for Library::Action and Library::Yield 2019-07-17 11:39:30 +02:00
library.h Refactoring: Convert enum Direction to enum class 2019-08-01 20:56:02 +02:00
matchcompiler.h
mathlib.cpp Modernize: use enum class 2019-07-17 10:43:18 +02:00
mathlib.h Update copyright year 2019-02-09 07:24:06 +01:00
path.cpp Fixed #error in self check when __CPPCHECK__ is defined 2019-04-30 20:31:46 +02:00
path.h Update copyright year 2019-02-09 07:24:06 +01:00
pathmatch.cpp Updated copyright year 2018-10-13 18:20:31 +02:00
pathmatch.h Updated copyright year 2018-10-13 18:20:31 +02:00
pcrerules.pri
platform.cpp
platform.h Mark members and arguments with 'nonneg' 2019-07-14 12:22:33 +02:00
preprocessor.cpp Add missing include 2019-05-09 06:55:36 +02:00
preprocessor.h Renamed private member file0 2018-06-17 09:06:16 +02:00
settings.cpp Convert SHOWTIME_MODES to enum class 2019-07-31 22:35:51 +02:00
settings.h GUI: Better settings for extended safe checks 2019-07-23 11:54:38 +02:00
standards.h Update Copyright 2019-06-29 07:49:14 +02:00
suppressions.cpp Fix Cppcheck warning: Suppressions::dump can be const 2019-06-29 07:53:32 +02:00
suppressions.h Fix Cppcheck warning: Suppressions::dump can be const 2019-06-29 07:53:32 +02:00
symboldatabase.cpp Fix issue 9207: Not detected 'always true' and unreachable code 2019-08-08 07:46:47 +02:00
symboldatabase.h Fix issue 9207: Not detected 'always true' and unreachable code 2019-08-08 07:46:47 +02:00
templatesimplifier.cpp template simplifier: refactor TemplateSimplifier::TokenAndName into a… (#2073) 2019-08-10 08:42:12 +02:00
templatesimplifier.h template simplifier: refactor TemplateSimplifier::TokenAndName into a… (#2073) 2019-08-10 08:42:12 +02:00
timer.cpp Convert SHOWTIME_MODES to enum class 2019-07-31 22:35:51 +02:00
timer.h Convert SHOWTIME_MODES to enum class 2019-07-31 22:35:51 +02:00
token.cpp template simplifier: refactor TemplateSimplifier::TokenAndName into a… (#2073) 2019-08-10 08:42:12 +02:00
token.h Use std::any_of in token.h (#2065) 2019-08-07 08:02:07 +02:00
tokenize.cpp Fix #9250 (Regression: crash in gcc testsuite) (#2067) 2019-08-07 08:05:02 +02:00
tokenize.h Calculate token scopes in advance rather than as the tokenlist is iterated (#2038) 2019-07-31 09:19:27 +02:00
tokenlist.cpp Replace 'unsigned' with 'nonneg' 2019-07-17 10:14:25 +02:00
tokenlist.h Replace 'unsigned' with 'nonneg' 2019-07-17 10:14:25 +02:00
utils.h Split up Cppcheck attribute. low and high values can be specified separately and they can be used for variables also. 2019-07-24 15:08:26 +02:00
valueflow.cpp Fix issue 9268: false negative: (style) Condition '...' is always true (#2080) 2019-08-14 06:34:27 +02:00
valueflow.h Safe checks: Clarify a warning message 2019-07-25 17:19:51 +02:00
version.h Set version to 1.88.99/1.89 dev 2019-07-02 20:59:52 +02:00
version.rc