From 42d44f02a21369b514da719b2ff0e18a9dbce7f9 Mon Sep 17 00:00:00 2001 From: Paul Fultz II Date: Wed, 25 Dec 2019 02:32:50 -0600 Subject: [PATCH] Use lifetime analysis for checking mismatching containers (#2456) * Use lifetimes to check for mismatching containers * Fix error messages * Format * Remove unused variables * Fix configuration and track iterators through algorithms * Fix iterator value types in qt config * Fix library issue with QStringList * Remove unused functions * Fix cppcheck errors --- cfg/qt.cfg | 11 +- lib/checkstl.cpp | 226 ++++++++++++----------------------------- lib/checkstl.h | 12 +-- lib/valueflow.cpp | 15 ++- test/cfg/qt.cpp | 20 ++-- test/cfg/wxwidgets.cpp | 2 +- test/teststl.cpp | 177 ++++++++++++++++++-------------- 7 files changed, 200 insertions(+), 263 deletions(-) diff --git a/cfg/qt.cfg b/cfg/qt.cfg index ea8cf3a0f..9122ac607 100644 --- a/cfg/qt.cfg +++ b/cfg/qt.cfg @@ -4839,7 +4839,7 @@ - + @@ -4873,6 +4873,7 @@ + @@ -5000,12 +5001,8 @@ - - - - - - + +