From b3ec225480b64e546854f8de246e652c8f96eed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Fri, 16 Sep 2022 07:15:49 +0200 Subject: [PATCH] iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466) * iwyu.yml: use debian:unstable to always get latest include-what-you-use * cleaned up includes based on include-what-you-use * mitigated include-what-you-use false positives --- .github/workflows/iwyu.yml | 2 +- cli/cmdlineparser.cpp | 2 +- cli/cppcheckexecutor.cpp | 2 +- cli/cppcheckexecutorseh.h | 2 +- cli/processexecutor.cpp | 2 +- gui/application.cpp | 2 ++ gui/cppchecklibrarydata.cpp | 1 + gui/erroritem.h | 1 + gui/projectfile.h | 1 + gui/report.cpp | 2 ++ gui/resultstree.cpp | 1 + lib/astutils.cpp | 1 + lib/check.cpp | 1 + lib/checkcondition.cpp | 1 - lib/checkfunctions.cpp | 1 - lib/checkio.cpp | 2 +- lib/checkother.cpp | 1 - lib/checktype.cpp | 1 - lib/checkunusedfunctions.cpp | 3 +-- lib/checkvaarg.cpp | 1 - lib/clangimport.cpp | 2 +- lib/cppcheck.cpp | 2 +- lib/ctu.cpp | 1 - lib/errorlogger.cpp | 2 +- lib/importproject.cpp | 2 +- lib/library.cpp | 3 +-- lib/path.cpp | 2 ++ lib/preprocessor.cpp | 2 +- lib/summaries.cpp | 5 +++-- lib/suppressions.cpp | 3 ++- lib/symboldatabase.cpp | 2 +- lib/templatesimplifier.cpp | 2 +- lib/token.cpp | 2 +- lib/tokenize.cpp | 2 +- lib/tokenlist.cpp | 1 - lib/valueflow.cpp | 1 - test/test64bit.cpp | 3 +-- test/testassert.cpp | 3 +-- test/testastutils.cpp | 3 +-- test/testautovariables.cpp | 3 +-- test/testbool.cpp | 3 +-- test/testboost.cpp | 3 +-- test/testbufferoverrun.cpp | 3 +-- test/testcharvar.cpp | 3 +-- test/testclangimport.cpp | 3 +-- test/testclass.cpp | 3 +-- test/testcmdlineparser.cpp | 1 + test/testcondition.cpp | 3 +-- test/testconstructors.cpp | 3 +-- test/testexceptionsafety.cpp | 3 +-- test/testfunctions.cpp | 3 +-- test/testgarbage.cpp | 3 +-- test/testimportproject.cpp | 3 +-- test/testincompletestatement.cpp | 3 +-- test/testio.cpp | 3 +-- test/testleakautovar.cpp | 3 +-- test/testlibrary.cpp | 3 +-- test/testmemleak.cpp | 3 +-- test/testnullpointer.cpp | 3 +-- test/testother.cpp | 3 +-- test/testpostfixoperator.cpp | 3 +-- test/testpreprocessor.cpp | 3 +-- test/testprocessexecutor.cpp | 2 +- test/testsimplifytemplate.cpp | 3 +-- test/testsimplifytokens.cpp | 3 +-- test/testsimplifyusing.cpp | 3 +-- test/testsizeof.cpp | 3 +-- test/teststl.cpp | 3 +-- test/teststring.cpp | 3 +-- test/testsummaries.cpp | 3 +-- test/testsuppressions.cpp | 3 +-- test/testthreadexecutor.cpp | 2 +- test/testtoken.cpp | 3 +-- test/testtokenlist.cpp | 3 +-- test/testtokenrange.cpp | 1 - test/testtype.cpp | 3 +-- test/testunusedprivfunc.cpp | 3 +-- test/testunusedvar.cpp | 3 +-- test/testutils.h | 4 +--- test/testvaarg.cpp | 3 +-- test/testvalueflow.cpp | 1 - test/testvarid.cpp | 3 +-- 82 files changed, 78 insertions(+), 117 deletions(-) diff --git a/.github/workflows/iwyu.yml b/.github/workflows/iwyu.yml index 080c8a8e4..667c0ee3f 100644 --- a/.github/workflows/iwyu.yml +++ b/.github/workflows/iwyu.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-22.04 container: - image: "kalilinux/kali-rolling" + image: "debian:unstable" # use latest debian image to get latest include-what-you-get steps: - uses: actions/checkout@v2 diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index b16af080c..a18c29bce 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -40,7 +40,7 @@ #include #include #include -#include +#include // IWYU pragma: keep #include #ifdef HAVE_RULES diff --git a/cli/cppcheckexecutor.cpp b/cli/cppcheckexecutor.cpp index 0630eb29f..570571f14 100644 --- a/cli/cppcheckexecutor.cpp +++ b/cli/cppcheckexecutor.cpp @@ -48,7 +48,7 @@ #include #include #include -#include +#include // IWYU pragma: keep #include #include diff --git a/cli/cppcheckexecutorseh.h b/cli/cppcheckexecutorseh.h index 487cc9221..5f6d41aeb 100644 --- a/cli/cppcheckexecutorseh.h +++ b/cli/cppcheckexecutorseh.h @@ -19,7 +19,7 @@ #ifndef CPPCHECKEXECUTORSEH_H #define CPPCHECKEXECUTORSEH_H -#include "config.h" +#include "config.h" // IWYU pragma: keep #ifdef USE_WINDOWS_SEH diff --git a/cli/processexecutor.cpp b/cli/processexecutor.cpp index ed11ee731..10d7a2146 100644 --- a/cli/processexecutor.cpp +++ b/cli/processexecutor.cpp @@ -39,7 +39,7 @@ #include #include #include -#include +#include // IWYU pragma: keep #include #include #include diff --git a/gui/application.cpp b/gui/application.cpp index 84ce0fdf9..af68f98bb 100644 --- a/gui/application.cpp +++ b/gui/application.cpp @@ -18,6 +18,8 @@ #include "application.h" +#include + Application::Application(QString name, QString path, QString params) : mName(std::move(name)) diff --git a/gui/cppchecklibrarydata.cpp b/gui/cppchecklibrarydata.cpp index 7c6bf8636..37b0179ed 100644 --- a/gui/cppchecklibrarydata.cpp +++ b/gui/cppchecklibrarydata.cpp @@ -19,6 +19,7 @@ #include "cppchecklibrarydata.h" #include +#include #include #include diff --git a/gui/erroritem.h b/gui/erroritem.h index cd550dfcd..7bebde0dc 100644 --- a/gui/erroritem.h +++ b/gui/erroritem.h @@ -20,6 +20,7 @@ #define ERRORITEM_H #include "errorlogger.h" +#include "errortypes.h" #include #include diff --git a/gui/projectfile.h b/gui/projectfile.h index 0e60ddbb9..fea4546ff 100644 --- a/gui/projectfile.h +++ b/gui/projectfile.h @@ -24,6 +24,7 @@ #include #include +#include #include #include diff --git a/gui/report.cpp b/gui/report.cpp index 45890ab43..f6d757b9d 100644 --- a/gui/report.cpp +++ b/gui/report.cpp @@ -18,6 +18,8 @@ #include "report.h" +#include + Report::Report(QString filename) : QObject(), mFilename(std::move(filename)) diff --git a/gui/resultstree.cpp b/gui/resultstree.cpp index 7eada6f4c..5ca7862ea 100644 --- a/gui/resultstree.cpp +++ b/gui/resultstree.cpp @@ -21,6 +21,7 @@ #include "application.h" #include "applicationlist.h" #include "common.h" +#include "config.h" #include "erroritem.h" #include "path.h" #include "projectfile.h" diff --git a/lib/astutils.cpp b/lib/astutils.cpp index baf6e1c15..8b8bf9085 100644 --- a/lib/astutils.cpp +++ b/lib/astutils.cpp @@ -34,6 +34,7 @@ #include "checkclass.h" #include +#include #include #include #include diff --git a/lib/check.cpp b/lib/check.cpp index af899c4f8..3a648b28d 100644 --- a/lib/check.cpp +++ b/lib/check.cpp @@ -28,6 +28,7 @@ #include #include +#include //--------------------------------------------------------------------------- diff --git a/lib/checkcondition.cpp b/lib/checkcondition.cpp index f9da0661d..7637689c8 100644 --- a/lib/checkcondition.cpp +++ b/lib/checkcondition.cpp @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/lib/checkfunctions.cpp b/lib/checkfunctions.cpp index aad634181..bd18f6b98 100644 --- a/lib/checkfunctions.cpp +++ b/lib/checkfunctions.cpp @@ -31,7 +31,6 @@ #include "valueflow.h" #include -#include #include #include #include diff --git a/lib/checkio.cpp b/lib/checkio.cpp index 8541ef549..0623c714f 100644 --- a/lib/checkio.cpp +++ b/lib/checkio.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include // IWYU pragma: keep #include #include #include diff --git a/lib/checkother.cpp b/lib/checkother.cpp index b351ad406..2eb06413b 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/lib/checktype.cpp b/lib/checktype.cpp index 0254a7cc2..a016a0080 100644 --- a/lib/checktype.cpp +++ b/lib/checktype.cpp @@ -31,7 +31,6 @@ #include #include -#include #include #include diff --git a/lib/checkunusedfunctions.cpp b/lib/checkunusedfunctions.cpp index ce201750c..444086031 100644 --- a/lib/checkunusedfunctions.cpp +++ b/lib/checkunusedfunctions.cpp @@ -34,9 +34,8 @@ #include #include #include -#include #include -#include +#include // IWYU pragma: keep #include #include diff --git a/lib/checkvaarg.cpp b/lib/checkvaarg.cpp index 2a2381488..8dfbea4a1 100644 --- a/lib/checkvaarg.cpp +++ b/lib/checkvaarg.cpp @@ -26,7 +26,6 @@ #include "tokenize.h" #include -#include #include //--------------------------------------------------------------------------- diff --git a/lib/clangimport.cpp b/lib/clangimport.cpp index 7ece09c63..671cb2e44 100644 --- a/lib/clangimport.cpp +++ b/lib/clangimport.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include // IWYU pragma: keep #include #include #include diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index 9aafd11e5..ac900dd7b 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -49,7 +49,7 @@ #include #include #include -#include +#include // IWYU pragma: keep #include #include #include diff --git a/lib/ctu.cpp b/lib/ctu.cpp index d569d51f7..ad04bbd52 100644 --- a/lib/ctu.cpp +++ b/lib/ctu.cpp @@ -33,7 +33,6 @@ #include #include #include // back_inserter -#include #include #include diff --git a/lib/errorlogger.cpp b/lib/errorlogger.cpp index e6124ed9f..3b4150a5c 100644 --- a/lib/errorlogger.cpp +++ b/lib/errorlogger.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include // IWYU pragma: keep #include #include diff --git a/lib/importproject.cpp b/lib/importproject.cpp index 76ebb0aa6..cc0da48b7 100644 --- a/lib/importproject.cpp +++ b/lib/importproject.cpp @@ -32,7 +32,7 @@ #include // IWYU pragma: keep #include #include -#include +#include // IWYU pragma: keep #include #include diff --git a/lib/library.cpp b/lib/library.cpp index 16e0655b2..ed902c9fe 100644 --- a/lib/library.cpp +++ b/lib/library.cpp @@ -31,10 +31,9 @@ #include #include #include -#include #include #include -#include +#include // IWYU pragma: keep #include #include diff --git a/lib/path.cpp b/lib/path.cpp index 5a382a28f..69674ad34 100644 --- a/lib/path.cpp +++ b/lib/path.cpp @@ -19,12 +19,14 @@ #if defined(__GNUC__) && (defined(_WIN32) || defined(__CYGWIN__)) #undef __STRICT_ANSI__ #endif + #include "path.h" #include "utils.h" #include #include #include +#include #ifndef _WIN32 #include diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index adc704fde..860402ef1 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -31,7 +31,7 @@ #include #include // back_inserter #include -#include +#include // IWYU pragma: keep #include #include diff --git a/lib/summaries.cpp b/lib/summaries.cpp index 3f847c94f..d0c561977 100644 --- a/lib/summaries.cpp +++ b/lib/summaries.cpp @@ -26,9 +26,10 @@ #include "tokenlist.h" #include -#include +#include // IWYU pragma: keep #include -#include +#include // IWYU pragma: keep +#include #include diff --git a/lib/suppressions.cpp b/lib/suppressions.cpp index e721807f3..b1cde0c4f 100644 --- a/lib/suppressions.cpp +++ b/lib/suppressions.cpp @@ -31,7 +31,8 @@ #include #include #include // std::bind, std::placeholders -#include +#include // IWYU pragma: keep +#include #include diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 75029ccf6..55feedf1a 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -41,7 +41,7 @@ #include #include #include -#include +#include // IWYU pragma: keep #include #include #include diff --git a/lib/templatesimplifier.cpp b/lib/templatesimplifier.cpp index 3b12a742b..f10b3bc69 100644 --- a/lib/templatesimplifier.cpp +++ b/lib/templatesimplifier.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include // IWYU pragma: keep #include #include diff --git a/lib/token.cpp b/lib/token.cpp index c0362a35e..50bd41945 100644 --- a/lib/token.cpp +++ b/lib/token.cpp @@ -40,7 +40,7 @@ #include #include #include -#include +#include // IWYU pragma: keep #include #include #include diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 992e2f51d..ab6219551 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -44,7 +44,7 @@ #include #include #include -#include +#include // IWYU pragma: keep #include #include #include diff --git a/lib/tokenlist.cpp b/lib/tokenlist.cpp index 1d90e230c..33f867d7d 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -31,7 +31,6 @@ #include #include -#include #include #include #include diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index 73e295c9a..a02fde18d 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -105,7 +105,6 @@ #include #include #include -#include #include #include #include diff --git a/test/test64bit.cpp b/test/test64bit.cpp index fbe40c57a..c6d560259 100644 --- a/test/test64bit.cpp +++ b/test/test64bit.cpp @@ -23,8 +23,7 @@ #include "testsuite.h" #include "tokenize.h" -#include -#include +#include // IWYU pragma: keep class Test64BitPortability : public TestFixture { public: diff --git a/test/testassert.cpp b/test/testassert.cpp index 699d773ae..07fa34d05 100644 --- a/test/testassert.cpp +++ b/test/testassert.cpp @@ -23,8 +23,7 @@ #include "testsuite.h" #include "tokenize.h" -#include -#include +#include // IWYU pragma: keep class TestAssert : public TestFixture { diff --git a/test/testastutils.cpp b/test/testastutils.cpp index 029eff8e0..a47ca1d10 100644 --- a/test/testastutils.cpp +++ b/test/testastutils.cpp @@ -26,8 +26,7 @@ #include "tokenlist.h" #include -#include -#include +#include // IWYU pragma: keep class TestAstUtils : public TestFixture { public: diff --git a/test/testautovariables.cpp b/test/testautovariables.cpp index 367a12f32..9a97dafb8 100644 --- a/test/testautovariables.cpp +++ b/test/testautovariables.cpp @@ -23,8 +23,7 @@ #include "testsuite.h" #include "tokenize.h" -#include -#include +#include // IWYU pragma: keep class TestAutoVariables : public TestFixture { public: diff --git a/test/testbool.cpp b/test/testbool.cpp index 9e2c880e4..f278bce2d 100644 --- a/test/testbool.cpp +++ b/test/testbool.cpp @@ -23,8 +23,7 @@ #include "testsuite.h" #include "tokenize.h" -#include -#include +#include // IWYU pragma: keep class TestBool : public TestFixture { public: diff --git a/test/testboost.cpp b/test/testboost.cpp index 5e0d9952a..4b95a2ea8 100644 --- a/test/testboost.cpp +++ b/test/testboost.cpp @@ -23,8 +23,7 @@ #include "testsuite.h" #include "tokenize.h" -#include -#include +#include // IWYU pragma: keep class TestBoost : public TestFixture { public: diff --git a/test/testbufferoverrun.cpp b/test/testbufferoverrun.cpp index aafeb3eaa..e3d84320e 100644 --- a/test/testbufferoverrun.cpp +++ b/test/testbufferoverrun.cpp @@ -28,10 +28,9 @@ #include "testsuite.h" #include "tokenize.h" -#include #include #include -#include +#include // IWYU pragma: keep #include #include #include diff --git a/test/testcharvar.cpp b/test/testcharvar.cpp index 2b0f09fd3..ff60e93c5 100644 --- a/test/testcharvar.cpp +++ b/test/testcharvar.cpp @@ -24,8 +24,7 @@ #include "testsuite.h" #include "tokenize.h" -#include -#include +#include // IWYU pragma: keep class TestCharVar : public TestFixture { public: diff --git a/test/testclangimport.cpp b/test/testclangimport.cpp index 713af04e0..0d62da7ee 100644 --- a/test/testclangimport.cpp +++ b/test/testclangimport.cpp @@ -23,10 +23,9 @@ #include "testsuite.h" #include -#include #include #include -#include +#include // IWYU pragma: keep #include #include diff --git a/test/testclass.cpp b/test/testclass.cpp index ca950e27b..010bd1b4f 100644 --- a/test/testclass.cpp +++ b/test/testclass.cpp @@ -24,9 +24,8 @@ #include "testsuite.h" #include "tokenize.h" -#include #include -#include +#include // IWYU pragma: keep #include #include diff --git a/test/testcmdlineparser.cpp b/test/testcmdlineparser.cpp index efaa0b4d1..de30f3629 100644 --- a/test/testcmdlineparser.cpp +++ b/test/testcmdlineparser.cpp @@ -27,6 +27,7 @@ #include "testsuite.h" #include "timer.h" +#include #include #include #include diff --git a/test/testcondition.cpp b/test/testcondition.cpp index 8adfbf054..f810d55ea 100644 --- a/test/testcondition.cpp +++ b/test/testcondition.cpp @@ -25,9 +25,8 @@ #include "testsuite.h" #include "tokenize.h" -#include #include -#include +#include // IWYU pragma: keep #include #include #include diff --git a/test/testconstructors.cpp b/test/testconstructors.cpp index 88516f2da..41c475a97 100644 --- a/test/testconstructors.cpp +++ b/test/testconstructors.cpp @@ -24,9 +24,8 @@ #include "testsuite.h" #include "tokenize.h" -#include #include -#include +#include // IWYU pragma: keep #include diff --git a/test/testexceptionsafety.cpp b/test/testexceptionsafety.cpp index d8f2074d9..964da3775 100644 --- a/test/testexceptionsafety.cpp +++ b/test/testexceptionsafety.cpp @@ -23,8 +23,7 @@ #include "testsuite.h" #include "tokenize.h" -#include -#include +#include // IWYU pragma: keep class TestExceptionSafety : public TestFixture { public: diff --git a/test/testfunctions.cpp b/test/testfunctions.cpp index 458198a7b..9d0d4ee49 100644 --- a/test/testfunctions.cpp +++ b/test/testfunctions.cpp @@ -24,9 +24,8 @@ #include "testsuite.h" #include "tokenize.h" -#include #include -#include +#include // IWYU pragma: keep #include #include diff --git a/test/testgarbage.cpp b/test/testgarbage.cpp index 5d50e584e..8a112a074 100644 --- a/test/testgarbage.cpp +++ b/test/testgarbage.cpp @@ -24,9 +24,8 @@ #include "token.h" #include "tokenize.h" -#include #include -#include +#include // IWYU pragma: keep #include diff --git a/test/testimportproject.cpp b/test/testimportproject.cpp index afbd0bea7..1d7bb8039 100644 --- a/test/testimportproject.cpp +++ b/test/testimportproject.cpp @@ -20,11 +20,10 @@ #include "settings.h" #include "testsuite.h" -#include #include #include #include -#include +#include // IWYU pragma: keep #include #include diff --git a/test/testincompletestatement.cpp b/test/testincompletestatement.cpp index 0a037d4c9..c124c49f4 100644 --- a/test/testincompletestatement.cpp +++ b/test/testincompletestatement.cpp @@ -22,9 +22,8 @@ #include "testsuite.h" #include "tokenize.h" -#include #include -#include +#include // IWYU pragma: keep #include #include #include diff --git a/test/testio.cpp b/test/testio.cpp index 5bc7f7524..ab200834a 100644 --- a/test/testio.cpp +++ b/test/testio.cpp @@ -25,8 +25,7 @@ #include "testsuite.h" #include "tokenize.h" -#include -#include +#include // IWYU pragma: keep class TestIO : public TestFixture { diff --git a/test/testleakautovar.cpp b/test/testleakautovar.cpp index 6703a6a1c..dcbc11732 100644 --- a/test/testleakautovar.cpp +++ b/test/testleakautovar.cpp @@ -24,9 +24,8 @@ #include "testsuite.h" #include "tokenize.h" -#include #include -#include +#include // IWYU pragma: keep #include #include #include diff --git a/test/testlibrary.cpp b/test/testlibrary.cpp index 6d5ca08c5..5e7cd8153 100644 --- a/test/testlibrary.cpp +++ b/test/testlibrary.cpp @@ -26,9 +26,8 @@ #include "tokenize.h" #include "tokenlist.h" -#include #include -#include +#include // IWYU pragma: keep #include #include #include diff --git a/test/testmemleak.cpp b/test/testmemleak.cpp index 1dd2b8d22..a7a6640b3 100644 --- a/test/testmemleak.cpp +++ b/test/testmemleak.cpp @@ -24,10 +24,9 @@ #include "token.h" #include "tokenize.h" -#include #include #include -#include +#include // IWYU pragma: keep #include class TestMemleakInClass; diff --git a/test/testnullpointer.cpp b/test/testnullpointer.cpp index 40f6e1d30..e0475c95b 100644 --- a/test/testnullpointer.cpp +++ b/test/testnullpointer.cpp @@ -26,10 +26,9 @@ #include "token.h" #include "tokenize.h" -#include #include #include -#include +#include // IWYU pragma: keep #include #include #include diff --git a/test/testother.cpp b/test/testother.cpp index 3f5062645..844c6117c 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -26,9 +26,8 @@ #include "testsuite.h" #include "tokenize.h" -#include #include -#include +#include // IWYU pragma: keep #include #include #include diff --git a/test/testpostfixoperator.cpp b/test/testpostfixoperator.cpp index 60a06615d..e4a890dd8 100644 --- a/test/testpostfixoperator.cpp +++ b/test/testpostfixoperator.cpp @@ -23,8 +23,7 @@ #include "testsuite.h" #include "tokenize.h" -#include -#include +#include // IWYU pragma: keep class TestPostfixOperator : public TestFixture { public: diff --git a/test/testpreprocessor.cpp b/test/testpreprocessor.cpp index 1b19770bb..887c0a4f6 100644 --- a/test/testpreprocessor.cpp +++ b/test/testpreprocessor.cpp @@ -30,12 +30,11 @@ #include #include -#include #include #include #include #include -#include +#include // IWYU pragma: keep #include #include diff --git a/test/testprocessexecutor.cpp b/test/testprocessexecutor.cpp index ccb5cf078..7030c540c 100644 --- a/test/testprocessexecutor.cpp +++ b/test/testprocessexecutor.cpp @@ -21,11 +21,11 @@ #include "settings.h" #include "testsuite.h" #include "testutils.h" +#include "timer.h" #include #include #include -#include #include #include #include diff --git a/test/testsimplifytemplate.cpp b/test/testsimplifytemplate.cpp index 52c4f58f9..a995c8a48 100644 --- a/test/testsimplifytemplate.cpp +++ b/test/testsimplifytemplate.cpp @@ -27,8 +27,7 @@ #include "tokenlist.h" #include -#include -#include +#include // IWYU pragma: keep #include #include diff --git a/test/testsimplifytokens.cpp b/test/testsimplifytokens.cpp index e6cab9321..efe16cc4b 100644 --- a/test/testsimplifytokens.cpp +++ b/test/testsimplifytokens.cpp @@ -24,8 +24,7 @@ #include "token.h" #include "tokenize.h" -#include -#include +#include // IWYU pragma: keep #include diff --git a/test/testsimplifyusing.cpp b/test/testsimplifyusing.cpp index 775daf39b..02cc510e4 100644 --- a/test/testsimplifyusing.cpp +++ b/test/testsimplifyusing.cpp @@ -24,8 +24,7 @@ #include "token.h" #include "tokenize.h" -#include -#include +#include // IWYU pragma: keep #include diff --git a/test/testsizeof.cpp b/test/testsizeof.cpp index 9f9b6d0b1..cc832ccaf 100644 --- a/test/testsizeof.cpp +++ b/test/testsizeof.cpp @@ -22,9 +22,8 @@ #include "testsuite.h" #include "tokenize.h" -#include #include -#include +#include // IWYU pragma: keep #include #include #include diff --git a/test/teststl.cpp b/test/teststl.cpp index 88bdfa89d..1b560132a 100644 --- a/test/teststl.cpp +++ b/test/teststl.cpp @@ -24,8 +24,7 @@ #include "tokenize.h" #include -#include -#include +#include // IWYU pragma: keep #include diff --git a/test/teststring.cpp b/test/teststring.cpp index f1347c8aa..f7ddeb128 100644 --- a/test/teststring.cpp +++ b/test/teststring.cpp @@ -23,8 +23,7 @@ #include "testsuite.h" #include "tokenize.h" -#include -#include +#include // IWYU pragma: keep class TestString : public TestFixture { diff --git a/test/testsummaries.cpp b/test/testsummaries.cpp index a26636562..91b07c173 100644 --- a/test/testsummaries.cpp +++ b/test/testsummaries.cpp @@ -22,8 +22,7 @@ #include "testsuite.h" #include "tokenize.h" -#include -#include +#include // IWYU pragma: keep #include diff --git a/test/testsuppressions.cpp b/test/testsuppressions.cpp index 40b8be72f..86590d859 100644 --- a/test/testsuppressions.cpp +++ b/test/testsuppressions.cpp @@ -31,11 +31,10 @@ #include #include #include -#include #include #include #include -#include +#include // IWYU pragma: keep #include #include #include diff --git a/test/testthreadexecutor.cpp b/test/testthreadexecutor.cpp index ac98b0da3..85a477e8b 100644 --- a/test/testthreadexecutor.cpp +++ b/test/testthreadexecutor.cpp @@ -21,11 +21,11 @@ #include "testsuite.h" #include "testutils.h" #include "threadexecutor.h" +#include "timer.h" #include #include #include -#include #include #include #include diff --git a/test/testtoken.cpp b/test/testtoken.cpp index ea94f140d..81dc56f7f 100644 --- a/test/testtoken.cpp +++ b/test/testtoken.cpp @@ -25,8 +25,7 @@ #include "valueflow.h" #include -#include -#include +#include // IWYU pragma: keep #include #include diff --git a/test/testtokenlist.cpp b/test/testtokenlist.cpp index 314d34b7a..229d5baa3 100644 --- a/test/testtokenlist.cpp +++ b/test/testtokenlist.cpp @@ -21,8 +21,7 @@ #include "token.h" #include "tokenlist.h" -#include -#include +#include // IWYU pragma: keep #include class TestTokenList : public TestFixture { diff --git a/test/testtokenrange.cpp b/test/testtokenrange.cpp index 6cdda8c19..0a30f778a 100644 --- a/test/testtokenrange.cpp +++ b/test/testtokenrange.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/test/testtype.cpp b/test/testtype.cpp index cdd0307ce..820a9d49e 100644 --- a/test/testtype.cpp +++ b/test/testtype.cpp @@ -24,8 +24,7 @@ #include "testsuite.h" #include "tokenize.h" -#include -#include +#include // IWYU pragma: keep #include class TestType : public TestFixture { diff --git a/test/testunusedprivfunc.cpp b/test/testunusedprivfunc.cpp index 837b8869f..02c1dec08 100644 --- a/test/testunusedprivfunc.cpp +++ b/test/testunusedprivfunc.cpp @@ -23,9 +23,8 @@ #include "testsuite.h" #include "tokenize.h" -#include #include -#include +#include // IWYU pragma: keep #include #include #include diff --git a/test/testunusedvar.cpp b/test/testunusedvar.cpp index c020684f7..ac9acbbc3 100644 --- a/test/testunusedvar.cpp +++ b/test/testunusedvar.cpp @@ -23,9 +23,8 @@ #include "testsuite.h" #include "tokenize.h" -#include #include -#include +#include // IWYU pragma: keep #include class TestUnusedVar : public TestFixture { diff --git a/test/testutils.h b/test/testutils.h index 0c87f7236..b7eb9b58b 100644 --- a/test/testutils.h +++ b/test/testutils.h @@ -27,10 +27,8 @@ #include "tokenlist.h" #include -#include #include -#include -#include +#include // IWYU pragma: keep #include class Token; diff --git a/test/testvaarg.cpp b/test/testvaarg.cpp index 0b57e1357..a59d08972 100644 --- a/test/testvaarg.cpp +++ b/test/testvaarg.cpp @@ -23,8 +23,7 @@ #include "testsuite.h" #include "tokenize.h" -#include -#include +#include // IWYU pragma: keep class TestVaarg : public TestFixture { public: diff --git a/test/testvalueflow.cpp b/test/testvalueflow.cpp index 429b1fa99..11ab7e6aa 100644 --- a/test/testvalueflow.cpp +++ b/test/testvalueflow.cpp @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/test/testvarid.cpp b/test/testvarid.cpp index 992d8ec3e..ca589b050 100644 --- a/test/testvarid.cpp +++ b/test/testvarid.cpp @@ -24,8 +24,7 @@ #include "token.h" #include "tokenize.h" -#include -#include +#include // IWYU pragma: keep #include struct InternalError;