cppcheck/lib
Paul Fultz II ba037837c9 Track lifetime across multiple returns
This will now warn when doing something like this:

```cpp
template <class T, class K, class V>
const V& get_default(const T& t, const K& k, const V& v) {
    auto it = t.find(k);
    if (it == t.end()) return v;
    return it->second;
}
const int& bar(const std::unordered_map<int, int>& m, int k) {
    auto x = 0;
    return get_default(m, k, x);
}
```

The lifetime warning is considered inconclusive in this case.

I also updated valueflow to no tinject inconclusive values unless `--inconclusive` flag is passed. This creates some false negatives because library functions are not configured to not modify their input parameters, and there are some checks that do not check if the value is inconclusive or not.
2019-09-11 19:25:09 +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 Track lifetime across multiple returns 2019-09-11 19:25:09 +02:00
astutils.h Track lifetime across multiple returns 2019-09-11 19:25:09 +02:00
check.cpp Updated copyright year 2019-09-01 11:49:43 +02:00
check.h Safe checks: Clarify a warning message 2019-07-25 17:19:51 +02:00
check64bit.cpp Rename _tokenizer, _settings, _errorLogger 2018-06-16 16:10:28 +02:00
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 Track lifetime across multiple returns 2019-09-11 19:25:09 +02:00
checkautovariables.h Track lifetime across multiple returns 2019-09-11 19:25:09 +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 Rename _tokenizer, _settings, _errorLogger 2018-06-16 16:10:28 +02:00
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 Remove useless check introduced by 717aa826d8 (#2130) 2019-09-01 09:53:45 +02:00
checkclass.h Renamed safeClassRefMember => unsafeClassRefMember 2019-08-13 20:58:31 +02:00
checkcondition.cpp Fix issue 9277: FP: Dont warn for knwon conditions in if constexpr (#2085) 2019-08-16 07:56:39 +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 memleak: Fixed false negative for sample 2019-08-18 19:45:39 +02:00
checkleakautovar.h Replace 'unsigned' with 'nonneg' in checkleakautovar 2019-07-16 08:54:21 +02:00
checkmemoryleak.cpp leakNoReturnVar: Don't break early (#2095) 2019-08-23 06:33:00 +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 Fixed a typo in lib/checkother.cpp. Corrected spelling errors found by codespell. (#2170) 2019-09-11 19:21:38 +02:00
checkother.h Created redundantInitialization id 2019-08-25 09:45:39 +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 Track lifetime across multiple returns 2019-09-11 19:25:09 +02:00
checkstl.h Fix issue 4845: alias to vector element invalid after vector is changed (#2113) 2019-09-02 06:58:09 +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 Fix issue 9306: Adjust shiftTooManyBitsSigned for C++14 (#2127) 2019-08-31 07:40:57 +02:00
checktype.h Clarify signConversion warning message 2019-08-05 12:41:08 +02:00
checkuninitvar.cpp Fix issue 8785: ValueFlow: Track pointer alias 2019-09-03 17:16:15 +02:00
checkuninitvar.h Fix issue 8785: ValueFlow: Track pointer alias 2019-09-03 17:16:15 +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 Fixed #9260 (--template=gcc does not work correctly with -j) 2019-08-18 16:33:32 +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 Refactoring: Rename variables. Do not use leading _. Renamed 'col' to 'column' 2019-08-18 12:19:05 +02:00
ctu.h Convert InvalidValueType to enum class 2019-07-31 22:56:16 +02:00
errorlogger.cpp Fixed #9260 (--template=gcc does not work correctly with -j) 2019-08-18 16:33:32 +02:00
errorlogger.h Fixed #9260 (--template=gcc does not work correctly with -j) 2019-08-18 16:33:32 +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 Compiling/Installing : The CFGDIR parameter was removed. Use FILESDIR instead. 2019-08-17 10:53:07 +02:00
library.h Use library to track container lifetimes 2019-08-15 21:14:54 +02:00
matchcompiler.h Update copyright year to 2007-2016. 2016-01-01 15:34:45 +02:00
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 Updated copyright year 2019-09-01 11:49:43 +02:00
platform.h Updated copyright year 2019-09-01 11:49:43 +02:00
preprocessor.cpp Refactoring: Rename variables. Do not use leading _. Renamed 'col' to 'column' 2019-08-18 12:19:05 +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 Fixed linker errors on Windows 2019-09-01 14:44:03 +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 Track lifetime across multiple returns 2019-09-11 19:25:09 +02:00
symboldatabase.h Fix issue 9207: Not detected 'always true' and unreachable code 2019-08-08 07:46:47 +02:00
templatesimplifier.cpp Fix #9338 (Regression: Syntax error on valid C++) (#2156) 2019-09-09 21:46:21 +02:00
templatesimplifier.h template simplifier: ignore friend templates (#2122) 2019-09-01 09:56:33 +02:00
timer.cpp Updated copyright year 2019-09-01 11:49:43 +02:00
timer.h Convert SHOWTIME_MODES to enum class 2019-07-31 22:35:51 +02:00
token.cpp Fix issue 9311: False positive duplicateCondition "same if condition" with pointer inside array of struct (#2166) 2019-09-10 19:41:35 +02:00
token.h make ellipsis ... a single token (#2143) 2019-09-04 08:07:30 +02:00
tokenize.cpp make ellipsis ... a single token (#2143) 2019-09-04 08:07:30 +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 Fix issue 9340: AST broken: endless recursion from '{' (#2161) 2019-09-09 21:35:49 +02:00
tokenlist.h template simplifier: fix new daca crashes (#2093) 2019-08-17 07:38:07 +02:00
utils.h Updated copyright year 2019-09-01 11:49:43 +02:00
valueflow.cpp Track lifetime across multiple returns 2019-09-11 19:25:09 +02:00
valueflow.h Track lifetime across multiple returns 2019-09-11 19:25:09 +02:00
version.h Set version to 1.89.99/1.90 dev 2019-09-02 15:44:40 +02:00
version.rc