From 06b5ef1e4ddf36dfa1c7fc91b99472993eab2908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Mon, 9 Oct 2023 10:07:20 +0200 Subject: [PATCH] cleaned up includes based on include-what-you-use (#5532) --- Makefile | 30 ++++++++++++------------ cli/cmdlineparser.cpp | 1 - cli/cppcheckexecutor.cpp | 6 ++--- cli/filelister.cpp | 1 - cli/processexecutor.cpp | 2 -- cli/threadexecutor.cpp | 2 -- gui/checkstatistics.h | 2 +- gui/checkthread.cpp | 1 - gui/compliancereportdialog.cpp | 1 + gui/mainwindow.cpp | 3 ++- gui/resultstree.cpp | 1 - gui/resultsview.cpp | 7 ++++++ gui/statsdialog.cpp | 2 ++ gui/test/projectfile/testprojectfile.cpp | 5 +--- lib/addoninfo.cpp | 2 +- lib/astutils.h | 1 + lib/checkclass.cpp | 1 - lib/checkersreport.cpp | 8 +++++++ lib/checkersreport.h | 5 +++- lib/checkmemoryleak.cpp | 2 ++ lib/checktype.cpp | 4 ++++ lib/checkvaarg.cpp | 2 ++ lib/cppcheck.cpp | 6 ++--- lib/cppcheck.h | 1 + lib/errorlogger.cpp | 2 +- lib/importproject.cpp | 2 -- lib/library.cpp | 1 + lib/library.h | 1 - lib/path.cpp | 1 - lib/settings.cpp | 1 - lib/suppressions.cpp | 2 +- lib/tokenlist.cpp | 1 - test/fixture.cpp | 1 + test/helpers.h | 2 ++ test/testbufferoverrun.cpp | 4 ---- test/testcheck.cpp | 3 +++ test/testclass.cpp | 4 ---- test/testcmdlineparser.cpp | 1 - test/testcondition.cpp | 6 +---- test/testerrorlogger.cpp | 1 - test/testfilelister.cpp | 1 + test/testgarbage.cpp | 1 - test/testincompletestatement.cpp | 4 ---- test/testleakautovar.cpp | 6 ----- test/testmathlib.cpp | 4 +--- test/testnullpointer.cpp | 3 --- test/testother.cpp | 7 ------ test/testprocessexecutor.cpp | 3 +++ test/testsimplifytypedef.cpp | 5 ---- test/testsimplifyusing.cpp | 5 ---- test/testsingleexecutor.cpp | 2 +- test/testsizeof.cpp | 4 ---- test/teststring.cpp | 5 ++-- test/testsuppressions.cpp | 1 - test/testthreadexecutor.cpp | 3 +++ test/testtokenize.cpp | 4 ---- test/testunusedfunctions.cpp | 1 + test/testunusedprivfunc.cpp | 4 ---- test/testunusedvar.cpp | 4 ---- test/testutils.cpp | 2 -- test/testvalueflow.cpp | 5 ---- test/testvarid.cpp | 2 -- 62 files changed, 81 insertions(+), 124 deletions(-) diff --git a/Makefile b/Makefile index 17e88b02a7d..75a849bbd0e 100644 --- a/Makefile +++ b/Makefile @@ -584,7 +584,7 @@ $(libcppdir)/forwardanalyzer.o: lib/forwardanalyzer.cpp lib/addoninfo.h lib/anal $(libcppdir)/fwdanalysis.o: lib/fwdanalysis.cpp lib/astutils.h lib/config.h lib/errortypes.h lib/fwdanalysis.h lib/library.h lib/mathlib.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/vfvalue.h $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/fwdanalysis.cpp -$(libcppdir)/importproject.o: lib/importproject.cpp externals/picojson/picojson.h externals/simplecpp/simplecpp.h externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/config.h lib/errortypes.h lib/importproject.h lib/json.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h +$(libcppdir)/importproject.o: lib/importproject.cpp externals/picojson/picojson.h externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/config.h lib/errortypes.h lib/importproject.h lib/json.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/importproject.cpp $(libcppdir)/infer.o: lib/infer.cpp lib/calculate.h lib/config.h lib/errortypes.h lib/infer.h lib/mathlib.h lib/valueptr.h lib/vfvalue.h @@ -620,7 +620,7 @@ $(libcppdir)/programmemory.o: lib/programmemory.cpp lib/addoninfo.h lib/astutils $(libcppdir)/reverseanalyzer.o: lib/reverseanalyzer.cpp lib/addoninfo.h lib/analyzer.h lib/astutils.h lib/config.h lib/errortypes.h lib/forwardanalyzer.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/reverseanalyzer.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/valueptr.h lib/vfvalue.h $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/reverseanalyzer.cpp -$(libcppdir)/settings.o: lib/settings.cpp externals/picojson/picojson.h lib/addoninfo.h lib/config.h lib/errortypes.h lib/importproject.h lib/json.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/summaries.h lib/suppressions.h lib/timer.h lib/utils.h lib/vfvalue.h +$(libcppdir)/settings.o: lib/settings.cpp externals/picojson/picojson.h lib/addoninfo.h lib/config.h lib/errortypes.h lib/importproject.h lib/json.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/summaries.h lib/suppressions.h lib/utils.h lib/vfvalue.h $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/settings.cpp $(libcppdir)/summaries.o: lib/summaries.cpp lib/addoninfo.h lib/analyzerinfo.h lib/config.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/summaries.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h @@ -647,10 +647,10 @@ $(libcppdir)/utils.o: lib/utils.cpp lib/config.h lib/utils.h $(libcppdir)/vfvalue.o: lib/vfvalue.cpp lib/config.h lib/errortypes.h lib/mathlib.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/vfvalue.h $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/vfvalue.cpp -cli/cmdlineparser.o: cli/cmdlineparser.cpp cli/cmdlinelogger.h cli/cmdlineparser.h cli/cppcheckexecutor.h cli/filelister.h externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h +cli/cmdlineparser.o: cli/cmdlineparser.cpp cli/cmdlinelogger.h cli/cmdlineparser.h cli/cppcheckexecutor.h externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h $(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/cmdlineparser.cpp -cli/cppcheckexecutor.o: cli/cppcheckexecutor.cpp cli/cmdlinelogger.h cli/cmdlineparser.h cli/cppcheckexecutor.h cli/cppcheckexecutorseh.h cli/cppcheckexecutorsig.h cli/executor.h cli/filelister.h cli/processexecutor.h cli/singleexecutor.h cli/threadexecutor.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/checkers.h lib/checkersreport.h lib/checkunusedfunctions.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/pathmatch.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h +cli/cppcheckexecutor.o: cli/cppcheckexecutor.cpp cli/cmdlinelogger.h cli/cmdlineparser.h cli/cppcheckexecutor.h cli/cppcheckexecutorseh.h cli/cppcheckexecutorsig.h cli/executor.h cli/filelister.h cli/processexecutor.h cli/singleexecutor.h cli/threadexecutor.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/checkersreport.h lib/checkunusedfunctions.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/pathmatch.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h $(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/cppcheckexecutor.cpp cli/cppcheckexecutorseh.o: cli/cppcheckexecutorseh.cpp cli/cppcheckexecutor.h cli/cppcheckexecutorseh.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/utils.h @@ -668,7 +668,7 @@ cli/filelister.o: cli/filelister.cpp cli/filelister.h lib/config.h lib/path.h li cli/main.o: cli/main.cpp cli/cppcheckexecutor.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h $(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/main.cpp -cli/processexecutor.o: cli/processexecutor.cpp cli/cppcheckexecutor.h cli/executor.h cli/processexecutor.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h +cli/processexecutor.o: cli/processexecutor.cpp cli/executor.h cli/processexecutor.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h $(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/processexecutor.cpp cli/singleexecutor.o: cli/singleexecutor.cpp cli/executor.h cli/singleexecutor.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h @@ -677,7 +677,7 @@ cli/singleexecutor.o: cli/singleexecutor.cpp cli/executor.h cli/singleexecutor.h cli/stacktrace.o: cli/stacktrace.cpp cli/stacktrace.h lib/config.h lib/utils.h $(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/stacktrace.cpp -cli/threadexecutor.o: cli/threadexecutor.cpp cli/cppcheckexecutor.h cli/executor.h cli/threadexecutor.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h +cli/threadexecutor.o: cli/threadexecutor.cpp cli/executor.h cli/threadexecutor.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h $(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/threadexecutor.cpp test/fixture.o: test/fixture.cpp externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h test/fixture.h test/options.h test/redirect.h @@ -713,7 +713,7 @@ test/testbool.o: test/testbool.cpp lib/addoninfo.h lib/check.h lib/checkbool.h l test/testboost.o: test/testboost.cpp lib/addoninfo.h lib/check.h lib/checkboost.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testboost.cpp -test/testbufferoverrun.o: test/testbufferoverrun.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkbufferoverrun.h lib/color.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testbufferoverrun.o: test/testbufferoverrun.cpp lib/addoninfo.h lib/check.h lib/checkbufferoverrun.h lib/color.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testbufferoverrun.cpp test/testcharvar.o: test/testcharvar.cpp lib/addoninfo.h lib/check.h lib/checkother.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h @@ -761,7 +761,7 @@ test/testgarbage.o: test/testgarbage.cpp externals/simplecpp/simplecpp.h lib/add test/testimportproject.o: test/testimportproject.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h test/fixture.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testimportproject.cpp -test/testincompletestatement.o: test/testincompletestatement.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkother.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testincompletestatement.o: test/testincompletestatement.cpp lib/addoninfo.h lib/check.h lib/checkother.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testincompletestatement.cpp test/testinternal.o: test/testinternal.cpp lib/addoninfo.h lib/check.h lib/checkinternal.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h @@ -770,7 +770,7 @@ test/testinternal.o: test/testinternal.cpp lib/addoninfo.h lib/check.h lib/check test/testio.o: test/testio.cpp lib/addoninfo.h lib/check.h lib/checkio.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testio.cpp -test/testleakautovar.o: test/testleakautovar.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkleakautovar.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testleakautovar.o: test/testleakautovar.cpp lib/addoninfo.h lib/check.h lib/checkleakautovar.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testleakautovar.cpp test/testlibrary.o: test/testlibrary.cpp externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h @@ -782,7 +782,7 @@ test/testmathlib.o: test/testmathlib.cpp lib/addoninfo.h lib/check.h lib/color.h test/testmemleak.o: test/testmemleak.cpp lib/addoninfo.h lib/check.h lib/checkmemoryleak.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testmemleak.cpp -test/testnullpointer.o: test/testnullpointer.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checknullpointer.h lib/color.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testnullpointer.o: test/testnullpointer.cpp lib/addoninfo.h lib/check.h lib/checknullpointer.h lib/color.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testnullpointer.cpp test/testoptions.o: test/testoptions.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h test/fixture.h test/options.h @@ -818,16 +818,16 @@ test/testsimplifytemplate.o: test/testsimplifytemplate.cpp lib/addoninfo.h lib/c test/testsimplifytokens.o: test/testsimplifytokens.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsimplifytokens.cpp -test/testsimplifytypedef.o: test/testsimplifytypedef.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testsimplifytypedef.o: test/testsimplifytypedef.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsimplifytypedef.cpp -test/testsimplifyusing.o: test/testsimplifyusing.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testsimplifyusing.o: test/testsimplifyusing.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsimplifyusing.cpp test/testsingleexecutor.o: test/testsingleexecutor.cpp cli/executor.h cli/singleexecutor.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h test/redirect.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsingleexecutor.cpp -test/testsizeof.o: test/testsizeof.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checksizeof.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testsizeof.o: test/testsizeof.cpp lib/addoninfo.h lib/check.h lib/checksizeof.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsizeof.cpp test/teststl.o: test/teststl.cpp lib/addoninfo.h lib/check.h lib/checkstl.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h @@ -872,7 +872,7 @@ test/testuninitvar.o: test/testuninitvar.cpp lib/addoninfo.h lib/check.h lib/che test/testunusedfunctions.o: test/testunusedfunctions.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkunusedfunctions.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testunusedfunctions.cpp -test/testunusedprivfunc.o: test/testunusedprivfunc.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkclass.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testunusedprivfunc.o: test/testunusedprivfunc.cpp lib/addoninfo.h lib/check.h lib/checkclass.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testunusedprivfunc.cpp test/testunusedvar.o: test/testunusedvar.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkunusedvar.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h @@ -884,7 +884,7 @@ test/testutils.o: test/testutils.cpp lib/addoninfo.h lib/check.h lib/color.h lib test/testvaarg.o: test/testvaarg.cpp lib/addoninfo.h lib/check.h lib/checkvaarg.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testvaarg.cpp -test/testvalueflow.o: test/testvalueflow.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testvalueflow.o: test/testvalueflow.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testvalueflow.cpp test/testvarid.o: test/testvarid.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 4754bf4b4c2..e36e2421c0b 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -23,7 +23,6 @@ #include "cppcheckexecutor.h" #include "errorlogger.h" #include "errortypes.h" -#include "filelister.h" #include "importproject.h" #include "path.h" #include "platform.h" diff --git a/cli/cppcheckexecutor.cpp b/cli/cppcheckexecutor.cpp index c74d22e595c..2b78baa0cc1 100644 --- a/cli/cppcheckexecutor.cpp +++ b/cli/cppcheckexecutor.cpp @@ -18,9 +18,10 @@ #include "cppcheckexecutor.h" +#include "addoninfo.h" #include "analyzerinfo.h" -#include "checkers.h" #include "checkersreport.h" +#include "cmdlinelogger.h" #include "cmdlineparser.h" #include "color.h" #include "config.h" @@ -48,12 +49,11 @@ #include #include #include // EXIT_SUCCESS and EXIT_FAILURE -#include #include #include #include -#include #include // IWYU pragma: keep +#include #include #include diff --git a/cli/filelister.cpp b/cli/filelister.cpp index e25e9a6b478..29c41659214 100644 --- a/cli/filelister.cpp +++ b/cli/filelister.cpp @@ -18,7 +18,6 @@ #include "filelister.h" -#include "config.h" #include "path.h" #include "pathmatch.h" #include "utils.h" diff --git a/cli/processexecutor.cpp b/cli/processexecutor.cpp index 2e940928636..09cec0f2d02 100644 --- a/cli/processexecutor.cpp +++ b/cli/processexecutor.cpp @@ -22,7 +22,6 @@ #include "config.h" #include "cppcheck.h" -#include "cppcheckexecutor.h" #include "errorlogger.h" #include "errortypes.h" #include "importproject.h" @@ -37,7 +36,6 @@ #include #include #include -#include #include #include #include // IWYU pragma: keep diff --git a/cli/threadexecutor.cpp b/cli/threadexecutor.cpp index a52b535c72c..9cd8dcae176 100644 --- a/cli/threadexecutor.cpp +++ b/cli/threadexecutor.cpp @@ -20,7 +20,6 @@ #include "config.h" #include "cppcheck.h" -#include "cppcheckexecutor.h" #include "errorlogger.h" #include "importproject.h" #include "settings.h" @@ -29,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/gui/checkstatistics.h b/gui/checkstatistics.h index d53be128834..65fa7783b2f 100644 --- a/gui/checkstatistics.h +++ b/gui/checkstatistics.h @@ -23,12 +23,12 @@ #include #include -#include #include #include #include #include +#include /// @addtogroup GUI /// @{ diff --git a/gui/checkthread.cpp b/gui/checkthread.cpp index 21b05c85462..2f79d1b7b31 100644 --- a/gui/checkthread.cpp +++ b/gui/checkthread.cpp @@ -31,7 +31,6 @@ #include #include -#include #include #include #include diff --git a/gui/compliancereportdialog.cpp b/gui/compliancereportdialog.cpp index bde0a5a0a86..c7c654ad395 100644 --- a/gui/compliancereportdialog.cpp +++ b/gui/compliancereportdialog.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index c6a94702a3a..d9a09da0651 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -18,6 +18,7 @@ #include "mainwindow.h" +#include "addoninfo.h" #include "applicationlist.h" #include "aboutdialog.h" #include "analyzerinfo.h" @@ -48,12 +49,12 @@ #include "ui_mainwindow.h" #include -#include #include #include #include #include #include +#include #include #include diff --git a/gui/resultstree.cpp b/gui/resultstree.cpp index f0cfdab78d9..ca4b6ec0bc1 100644 --- a/gui/resultstree.cpp +++ b/gui/resultstree.cpp @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include diff --git a/gui/resultsview.cpp b/gui/resultsview.cpp index 891d80a4973..2b5baa5fb09 100644 --- a/gui/resultsview.cpp +++ b/gui/resultsview.cpp @@ -25,15 +25,21 @@ #include "common.h" #include "csvreport.h" #include "erroritem.h" +#include "errorlogger.h" +#include "errortypes.h" #include "path.h" #include "printablereport.h" #include "resultstree.h" +#include "settings.h" #include "txtreport.h" #include "xmlreport.h" #include "xmlreportv2.h" #include "ui_resultsview.h" +#include +#include + #include #include #include @@ -45,6 +51,7 @@ #include #include #include +#include #include #include #include diff --git a/gui/statsdialog.cpp b/gui/statsdialog.cpp index 5dfd8a589e0..1cb8464ef5c 100644 --- a/gui/statsdialog.cpp +++ b/gui/statsdialog.cpp @@ -29,10 +29,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include diff --git a/gui/test/projectfile/testprojectfile.cpp b/gui/test/projectfile/testprojectfile.cpp index 572219710d0..37624e986d3 100644 --- a/gui/test/projectfile/testprojectfile.cpp +++ b/gui/test/projectfile/testprojectfile.cpp @@ -18,16 +18,13 @@ #include "testprojectfile.h" +#include "addoninfo.h" #include "importproject.h" -#include "library.h" #include "platform.h" #include "projectfile.h" #include "settings.h" -#include #include -#include -#include #include #include diff --git a/lib/addoninfo.cpp b/lib/addoninfo.cpp index f3db25a048b..cfe720b81e7 100644 --- a/lib/addoninfo.cpp +++ b/lib/addoninfo.cpp @@ -22,8 +22,8 @@ #include "utils.h" #include -#include #include +#include #include "json.h" diff --git a/lib/astutils.h b/lib/astutils.h index fb621ea81ad..111c2a61d86 100644 --- a/lib/astutils.h +++ b/lib/astutils.h @@ -31,6 +31,7 @@ #include "config.h" #include "errortypes.h" #include "library.h" +#include "mathlib.h" #include "smallvector.h" #include "symboldatabase.h" #include "token.h" diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index d3a84229ac6..6d2ba5e41f5 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -26,7 +26,6 @@ #include "symboldatabase.h" #include "errorlogger.h" #include "errortypes.h" -#include "mathlib.h" #include "token.h" #include "tokenize.h" #include "tokenlist.h" diff --git a/lib/checkersreport.cpp b/lib/checkersreport.cpp index f3649503efb..bff22361d5f 100644 --- a/lib/checkersreport.cpp +++ b/lib/checkersreport.cpp @@ -17,8 +17,16 @@ */ #include "checkersreport.h" + #include "checkers.h" +#include "errortypes.h" +#include "settings.h" + +#include #include +#include +#include +#include static bool isCppcheckPremium(const Settings& settings) { return (settings.cppcheckCfgProductName.compare(0, 16, "Cppcheck Premium") == 0); diff --git a/lib/checkersreport.h b/lib/checkersreport.h index b6acab8800b..5353f74b930 100644 --- a/lib/checkersreport.h +++ b/lib/checkersreport.h @@ -18,10 +18,13 @@ #pragma once -#include "settings.h" +#include "config.h" + #include #include +class Settings; + class CPPCHECKLIB CheckersReport { public: CheckersReport(const Settings& settings, const std::set& activeCheckers); diff --git a/lib/checkmemoryleak.cpp b/lib/checkmemoryleak.cpp index 2026e18d681..553e91bc13a 100644 --- a/lib/checkmemoryleak.cpp +++ b/lib/checkmemoryleak.cpp @@ -22,6 +22,8 @@ #include "astutils.h" #include "errorlogger.h" #include "library.h" +#include "mathlib.h" +#include "platform.h" #include "settings.h" #include "symboldatabase.h" #include "token.h" diff --git a/lib/checktype.cpp b/lib/checktype.cpp index d321cb69cad..5ed81eb3213 100644 --- a/lib/checktype.cpp +++ b/lib/checktype.cpp @@ -30,9 +30,13 @@ #include "tokenize.h" #include "valueflow.h" +#include #include +#include +#include #include #include +#include #include //--------------------------------------------------------------------------- diff --git a/lib/checkvaarg.cpp b/lib/checkvaarg.cpp index 446c8731e86..3606a4f3432 100644 --- a/lib/checkvaarg.cpp +++ b/lib/checkvaarg.cpp @@ -26,6 +26,8 @@ #include "tokenize.h" #include +#include +#include #include //--------------------------------------------------------------------------- diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index 8dbd515addb..35fa7363dd3 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -26,21 +26,21 @@ #include "ctu.h" #include "errortypes.h" #include "library.h" -#include "mathlib.h" #include "path.h" #include "platform.h" -#include "preprocessor.h" // Preprocessor +#include "preprocessor.h" #include "standards.h" #include "suppressions.h" #include "timer.h" #include "token.h" -#include "tokenize.h" // Tokenizer +#include "tokenize.h" #include "tokenlist.h" #include "utils.h" #include "valueflow.h" #include "version.h" #include +#include #include #include #include diff --git a/lib/cppcheck.h b/lib/cppcheck.h index 785c6690069..78d40c3aa20 100644 --- a/lib/cppcheck.h +++ b/lib/cppcheck.h @@ -38,6 +38,7 @@ #include class Tokenizer; +enum class SHOWTIME_MODES; /// @addtogroup Core /// @{ diff --git a/lib/errorlogger.cpp b/lib/errorlogger.cpp index c13dee7e7d9..91be7c24dc1 100644 --- a/lib/errorlogger.cpp +++ b/lib/errorlogger.cpp @@ -20,8 +20,8 @@ #include "color.h" #include "cppcheck.h" -#include "mathlib.h" #include "path.h" +#include "suppressions.h" #include "token.h" #include "tokenlist.h" #include "utils.h" diff --git a/lib/importproject.cpp b/lib/importproject.cpp index e212f9dbfce..9c4d2783e96 100644 --- a/lib/importproject.cpp +++ b/lib/importproject.cpp @@ -38,8 +38,6 @@ #include -#include - #include "json.h" void ImportProject::ignorePaths(const std::vector &ipaths) diff --git a/lib/library.cpp b/lib/library.cpp index d8786660382..b5699ff41d7 100644 --- a/lib/library.cpp +++ b/lib/library.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/library.h b/lib/library.h index 11be46e8c83..7cd68a8f679 100644 --- a/lib/library.h +++ b/lib/library.h @@ -26,7 +26,6 @@ #include "errortypes.h" #include "standards.h" -#include #include #include #include diff --git a/lib/path.cpp b/lib/path.cpp index 74e6f3f468d..16e366fec79 100644 --- a/lib/path.cpp +++ b/lib/path.cpp @@ -25,7 +25,6 @@ #include #include -#include #include #include diff --git a/lib/settings.cpp b/lib/settings.cpp index ef38d6d6dd5..18519bad216 100644 --- a/lib/settings.cpp +++ b/lib/settings.cpp @@ -19,7 +19,6 @@ #include "settings.h" #include "path.h" #include "summaries.h" -#include "timer.h" #include "vfvalue.h" #include diff --git a/lib/suppressions.cpp b/lib/suppressions.cpp index 10b5fa7a021..e86c4ee7465 100644 --- a/lib/suppressions.cpp +++ b/lib/suppressions.cpp @@ -19,7 +19,7 @@ #include "suppressions.h" #include "errorlogger.h" -#include "mathlib.h" +#include "errortypes.h" #include "path.h" #include "utils.h" #include "token.h" diff --git a/lib/tokenlist.cpp b/lib/tokenlist.cpp index 34dbc2e0ec5..6cfebb4558a 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -24,7 +24,6 @@ #include "errortypes.h" #include "keywords.h" #include "library.h" -#include "mathlib.h" #include "path.h" #include "platform.h" #include "settings.h" diff --git a/test/fixture.cpp b/test/fixture.cpp index ad7c8371481..8b714dd5308 100644 --- a/test/fixture.cpp +++ b/test/fixture.cpp @@ -23,6 +23,7 @@ #include "options.h" #include "redirect.h" +#include #include #include #include diff --git a/test/helpers.h b/test/helpers.h index 36f53c357f8..65e9d4dfe24 100644 --- a/test/helpers.h +++ b/test/helpers.h @@ -23,8 +23,10 @@ #include "tokenize.h" #include "tokenlist.h" +#include #include // IWYU pragma: keep #include +#include class Token; class Preprocessor; diff --git a/test/testbufferoverrun.cpp b/test/testbufferoverrun.cpp index d4d03dc0f9b..dd21618fb79 100644 --- a/test/testbufferoverrun.cpp +++ b/test/testbufferoverrun.cpp @@ -28,15 +28,11 @@ #include "fixture.h" #include "tokenize.h" -#include #include #include // IWYU pragma: keep #include -#include #include -#include - class TestBufferOverrun : public TestFixture { public: TestBufferOverrun() : TestFixture("TestBufferOverrun") {} diff --git a/test/testcheck.cpp b/test/testcheck.cpp index 192189781a7..e05c5e8650f 100644 --- a/test/testcheck.cpp +++ b/test/testcheck.cpp @@ -19,6 +19,9 @@ #include "check.h" #include "fixture.h" +#include +#include + class TestCheck : public TestFixture { public: TestCheck() : TestFixture("TestCheck") {} diff --git a/test/testclass.cpp b/test/testclass.cpp index 1f3962c404a..e8ca03ddfd2 100644 --- a/test/testclass.cpp +++ b/test/testclass.cpp @@ -26,14 +26,10 @@ #include "tokenize.h" #include -#include #include // IWYU pragma: keep #include -#include #include -#include - class TestClass : public TestFixture { public: TestClass() : TestFixture("TestClass") {} diff --git a/test/testcmdlineparser.cpp b/test/testcmdlineparser.cpp index a2ba2b15c85..3d3c2694604 100644 --- a/test/testcmdlineparser.cpp +++ b/test/testcmdlineparser.cpp @@ -32,7 +32,6 @@ #include #include -#include #include #include #include diff --git a/test/testcondition.cpp b/test/testcondition.cpp index 888bc29cb05..2ca5b71c05b 100644 --- a/test/testcondition.cpp +++ b/test/testcondition.cpp @@ -19,21 +19,17 @@ #include "checkcondition.h" #include "errortypes.h" #include "helpers.h" -#include "library.h" #include "platform.h" #include "preprocessor.h" #include "settings.h" #include "fixture.h" #include "tokenize.h" -#include +#include #include // IWYU pragma: keep #include -#include #include -#include - class TestCondition : public TestFixture { public: TestCondition() : TestFixture("TestCondition") {} diff --git a/test/testerrorlogger.cpp b/test/testerrorlogger.cpp index 97d94dcd2a0..78a7ae47425 100644 --- a/test/testerrorlogger.cpp +++ b/test/testerrorlogger.cpp @@ -20,7 +20,6 @@ #include "cppcheck.h" #include "errorlogger.h" #include "errortypes.h" -#include "suppressions.h" #include "fixture.h" #include diff --git a/test/testfilelister.cpp b/test/testfilelister.cpp index d4c5122dae9..5bd84379d34 100644 --- a/test/testfilelister.cpp +++ b/test/testfilelister.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/test/testgarbage.cpp b/test/testgarbage.cpp index b4d68c79212..88387d4a425 100644 --- a/test/testgarbage.cpp +++ b/test/testgarbage.cpp @@ -18,7 +18,6 @@ #include "check.h" #include "errortypes.h" -#include "mathlib.h" #include "preprocessor.h" #include "settings.h" #include "fixture.h" diff --git a/test/testincompletestatement.cpp b/test/testincompletestatement.cpp index 51cf3702cef..e360c40b9a9 100644 --- a/test/testincompletestatement.cpp +++ b/test/testincompletestatement.cpp @@ -23,14 +23,10 @@ #include "fixture.h" #include "tokenize.h" -#include #include // IWYU pragma: keep #include -#include #include -#include - class TestIncompleteStatement : public TestFixture { public: TestIncompleteStatement() : TestFixture("TestIncompleteStatement") {} diff --git a/test/testleakautovar.cpp b/test/testleakautovar.cpp index 167a7bf9576..ccb623bdb6b 100644 --- a/test/testleakautovar.cpp +++ b/test/testleakautovar.cpp @@ -20,20 +20,14 @@ #include "checkleakautovar.h" #include "errortypes.h" #include "helpers.h" -#include "library.h" #include "settings.h" #include "fixture.h" #include "tokenize.h" -#include #include // IWYU pragma: keep #include -#include -#include #include -#include - class TestLeakAutoVarStrcpy; class TestLeakAutoVarWindows; diff --git a/test/testmathlib.cpp b/test/testmathlib.cpp index 72021454123..71ca373795d 100644 --- a/test/testmathlib.cpp +++ b/test/testmathlib.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ - +#include "config.h" #include "errortypes.h" #include "mathlib.h" #include "fixture.h" @@ -24,8 +24,6 @@ #include #include - - class TestMathLib : public TestFixture { public: TestMathLib() : TestFixture("TestMathLib") {} diff --git a/test/testnullpointer.cpp b/test/testnullpointer.cpp index f6e886c62c8..645ef3f4ef1 100644 --- a/test/testnullpointer.cpp +++ b/test/testnullpointer.cpp @@ -32,11 +32,8 @@ #include // IWYU pragma: keep #include #include -#include #include -#include - class TestNullPointer : public TestFixture { public: TestNullPointer() : TestFixture("TestNullPointer") {} diff --git a/test/testother.cpp b/test/testother.cpp index 1802800bb38..60ab9c4801c 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -19,7 +19,6 @@ #include "checkother.h" #include "errortypes.h" #include "helpers.h" -#include "library.h" #include "platform.h" #include "preprocessor.h" #include "settings.h" @@ -27,16 +26,10 @@ #include "fixture.h" #include "tokenize.h" -#include #include // IWYU pragma: keep #include -#include -#include #include -#include - - class TestOther : public TestFixture { public: TestOther() : TestFixture("TestOther") {} diff --git a/test/testprocessexecutor.cpp b/test/testprocessexecutor.cpp index e47938caba1..94fe7ee8d7b 100644 --- a/test/testprocessexecutor.cpp +++ b/test/testprocessexecutor.cpp @@ -21,11 +21,14 @@ #include "settings.h" #include "fixture.h" #include "helpers.h" +#include "importproject.h" #include "timer.h" #include "library.h" #include #include +#include +#include #include #include #include diff --git a/test/testsimplifytypedef.cpp b/test/testsimplifytypedef.cpp index 6d65d2d3453..68468addd46 100644 --- a/test/testsimplifytypedef.cpp +++ b/test/testsimplifytypedef.cpp @@ -26,15 +26,10 @@ #include "tokenize.h" #include "tokenlist.h" -#include #include #include -#include #include -#include - - class TestSimplifyTypedef : public TestFixture { public: TestSimplifyTypedef() : TestFixture("TestSimplifyTypedef") {} diff --git a/test/testsimplifyusing.cpp b/test/testsimplifyusing.cpp index f4d3e6363b2..4208b128f29 100644 --- a/test/testsimplifyusing.cpp +++ b/test/testsimplifyusing.cpp @@ -26,15 +26,10 @@ #include "tokenize.h" #include "utils.h" -#include - -#include #include // IWYU pragma: keep #include -#include #include - class TestSimplifyUsing : public TestFixture { public: TestSimplifyUsing() : TestFixture("TestSimplifyUsing") {} diff --git a/test/testsingleexecutor.cpp b/test/testsingleexecutor.cpp index 01adac87797..a5f6a519e22 100644 --- a/test/testsingleexecutor.cpp +++ b/test/testsingleexecutor.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/testsizeof.cpp b/test/testsizeof.cpp index e71ff8d5d2a..22bd7e7ed42 100644 --- a/test/testsizeof.cpp +++ b/test/testsizeof.cpp @@ -23,14 +23,10 @@ #include "fixture.h" #include "tokenize.h" -#include #include // IWYU pragma: keep #include -#include #include -#include - class TestSizeof : public TestFixture { public: TestSizeof() : TestFixture("TestSizeof") {} diff --git a/test/teststring.cpp b/test/teststring.cpp index 57a8232d2ea..57cea1b9773 100644 --- a/test/teststring.cpp +++ b/test/teststring.cpp @@ -24,10 +24,11 @@ #include "fixture.h" #include "tokenize.h" -#include - #include // IWYU pragma: keep +#include +#include +#include class TestString : public TestFixture { public: diff --git a/test/testsuppressions.cpp b/test/testsuppressions.cpp index bfcc121d781..ddb4c686059 100644 --- a/test/testsuppressions.cpp +++ b/test/testsuppressions.cpp @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/test/testthreadexecutor.cpp b/test/testthreadexecutor.cpp index 2c36f274b49..49d2160b3a9 100644 --- a/test/testthreadexecutor.cpp +++ b/test/testthreadexecutor.cpp @@ -20,12 +20,15 @@ #include "settings.h" #include "fixture.h" #include "helpers.h" +#include "importproject.h" #include "library.h" #include "threadexecutor.h" #include "timer.h" #include #include +#include +#include #include #include #include diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index e235a0b76d3..3ca170c8e75 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -30,15 +30,11 @@ #include #include -#include #include #include #include -#include #include -#include - class TestTokenizer : public TestFixture { public: TestTokenizer() : TestFixture("TestTokenizer") {} diff --git a/test/testunusedfunctions.cpp b/test/testunusedfunctions.cpp index 1e7ca4334b3..c38c453b17b 100644 --- a/test/testunusedfunctions.cpp +++ b/test/testunusedfunctions.cpp @@ -26,6 +26,7 @@ #include "tokenize.h" #include +#include class TestUnusedFunctions : public TestFixture { public: diff --git a/test/testunusedprivfunc.cpp b/test/testunusedprivfunc.cpp index 8ecdc804fc6..81936efc55b 100644 --- a/test/testunusedprivfunc.cpp +++ b/test/testunusedprivfunc.cpp @@ -24,14 +24,10 @@ #include "fixture.h" #include "tokenize.h" -#include #include // IWYU pragma: keep #include -#include #include -#include - class TestUnusedPrivateFunction : public TestFixture { public: TestUnusedPrivateFunction() : TestFixture("TestUnusedPrivateFunction") {} diff --git a/test/testunusedvar.cpp b/test/testunusedvar.cpp index 81ba99a545d..28a98c3e9ee 100644 --- a/test/testunusedvar.cpp +++ b/test/testunusedvar.cpp @@ -25,14 +25,10 @@ #include "tokenize.h" #include -#include #include // IWYU pragma: keep #include -#include #include -#include - class TestUnusedVar : public TestFixture { public: TestUnusedVar() : TestFixture("TestUnusedVar") {} diff --git a/test/testutils.cpp b/test/testutils.cpp index 3c2a7a960f7..af04a91cbbc 100644 --- a/test/testutils.cpp +++ b/test/testutils.cpp @@ -22,8 +22,6 @@ #include #include #include -#include -#include #include #include diff --git a/test/testvalueflow.cpp b/test/testvalueflow.cpp index a718c97f38d..a316ea10176 100644 --- a/test/testvalueflow.cpp +++ b/test/testvalueflow.cpp @@ -17,7 +17,6 @@ */ #include "helpers.h" -#include "library.h" #include "mathlib.h" #include "platform.h" #include "settings.h" @@ -33,15 +32,11 @@ #include #include #include -#include #include #include #include -#include #include -#include - class TestValueFlow : public TestFixture { public: TestValueFlow() : TestFixture("TestValueFlow") {} diff --git a/test/testvarid.cpp b/test/testvarid.cpp index a4d709b69f8..dd30bf3fe2d 100644 --- a/test/testvarid.cpp +++ b/test/testvarid.cpp @@ -17,7 +17,6 @@ */ #include "errortypes.h" -#include "mathlib.h" #include "platform.h" #include "settings.h" #include "standards.h" @@ -28,7 +27,6 @@ #include // IWYU pragma: keep #include - class TestVarID : public TestFixture { public: TestVarID() : TestFixture("TestVarID") {}