diff --git a/cli/cmdlineparser.h b/cli/cmdlineparser.h index f7d240b55cc..fcdd2157ecc 100644 --- a/cli/cmdlineparser.h +++ b/cli/cmdlineparser.h @@ -22,7 +22,6 @@ #include #include #include -#include #include #include "cmdlinelogger.h" diff --git a/cli/cppcheckexecutor.h b/cli/cppcheckexecutor.h index 86d938c58b9..8a740cffee0 100644 --- a/cli/cppcheckexecutor.h +++ b/cli/cppcheckexecutor.h @@ -25,13 +25,11 @@ #include #include #include -#include #include class Settings; class ErrorLogger; class SuppressionList; -class FileWithDetails; /** * This class works as an example of how CppCheck can be used in external diff --git a/cli/filelister.cpp b/cli/filelister.cpp index a960f592fb0..98bb6e855b5 100644 --- a/cli/filelister.cpp +++ b/cli/filelister.cpp @@ -23,7 +23,6 @@ #include "pathmatch.h" #include "utils.h" -#include #include #include #include diff --git a/cli/filelister.h b/cli/filelister.h index 81f6d6ff8fa..92479a730e5 100644 --- a/cli/filelister.h +++ b/cli/filelister.h @@ -19,11 +19,9 @@ #ifndef filelisterH #define filelisterH -#include #include #include #include -#include class PathMatch; class FileWithDetails; diff --git a/cli/processexecutor.h b/cli/processexecutor.h index 9e94557c5b8..675b7c429b9 100644 --- a/cli/processexecutor.h +++ b/cli/processexecutor.h @@ -25,7 +25,6 @@ #include #include #include -#include class Settings; class ErrorLogger; diff --git a/cli/singleexecutor.cpp b/cli/singleexecutor.cpp index da3e0fcc34a..9979a7baa4c 100644 --- a/cli/singleexecutor.cpp +++ b/cli/singleexecutor.cpp @@ -24,9 +24,9 @@ #include "timer.h" #include +#include #include #include -#include class ErrorLogger; diff --git a/cli/threadexecutor.cpp b/cli/threadexecutor.cpp index 4525166d508..ea96d8dfc85 100644 --- a/cli/threadexecutor.cpp +++ b/cli/threadexecutor.cpp @@ -25,14 +25,15 @@ #include "settings.h" #include "timer.h" -#include #include +#include #include #include #include #include #include #include +#include #include #include #include diff --git a/cli/threadexecutor.h b/cli/threadexecutor.h index c2233783951..1706cfffa4d 100644 --- a/cli/threadexecutor.h +++ b/cli/threadexecutor.h @@ -22,10 +22,7 @@ #include "cppcheck.h" #include "executor.h" -#include #include -#include -#include class Settings; class ErrorLogger; diff --git a/gui/resultstree.cpp b/gui/resultstree.cpp index 2ee74f67e44..a822be0b3d1 100644 --- a/gui/resultstree.cpp +++ b/gui/resultstree.cpp @@ -21,7 +21,6 @@ #include "application.h" #include "applicationlist.h" #include "common.h" -#include "config.h" #include "erroritem.h" #include "errorlogger.h" #include "errortypes.h" diff --git a/lib/checkassert.cpp b/lib/checkassert.cpp index b6ad58b3510..26d0c93b8cc 100644 --- a/lib/checkassert.cpp +++ b/lib/checkassert.cpp @@ -24,12 +24,16 @@ #include "astutils.h" #include "errortypes.h" +#include "library.h" #include "settings.h" #include "symboldatabase.h" #include "token.h" #include "tokenize.h" #include "tokenlist.h" +#include +#include + //--------------------------------------------------------------------------- // CWE ids used diff --git a/lib/checkstl.cpp b/lib/checkstl.cpp index 54da256288c..07453a26f49 100644 --- a/lib/checkstl.cpp +++ b/lib/checkstl.cpp @@ -34,7 +34,6 @@ #include "checknullpointer.h" #include -#include #include #include #include diff --git a/lib/tokenize.h b/lib/tokenize.h index 801cae8637c..c1145a3c781 100644 --- a/lib/tokenize.h +++ b/lib/tokenize.h @@ -36,7 +36,7 @@ class TimerResults; class Token; class TemplateSimplifier; class ErrorLogger; -struct Directive; // IWYU pragma: keep +struct Directive; enum class Severity; /// @addtogroup Core diff --git a/test/test64bit.cpp b/test/test64bit.cpp index 0b04ee6146a..a33df481384 100644 --- a/test/test64bit.cpp +++ b/test/test64bit.cpp @@ -22,6 +22,8 @@ #include "helpers.h" #include "settings.h" +#include + class Test64BitPortability : public TestFixture { public: Test64BitPortability() : TestFixture("Test64BitPortability") {} diff --git a/test/testastutils.cpp b/test/testastutils.cpp index 01d66d01614..8ec39c4eb35 100644 --- a/test/testastutils.cpp +++ b/test/testastutils.cpp @@ -19,7 +19,6 @@ #include "astutils.h" #include "fixture.h" #include "helpers.h" -#include "library.h" #include "settings.h" #include "symboldatabase.h" #include "token.h" diff --git a/test/testautovariables.cpp b/test/testautovariables.cpp index dabc9ec3380..80205c2f9b6 100644 --- a/test/testautovariables.cpp +++ b/test/testautovariables.cpp @@ -22,6 +22,8 @@ #include "helpers.h" #include "settings.h" +#include + class TestAutoVariables : public TestFixture { public: TestAutoVariables() : TestFixture("TestAutoVariables") {} diff --git a/test/testbool.cpp b/test/testbool.cpp index f1de81d942e..a6cf31dd832 100644 --- a/test/testbool.cpp +++ b/test/testbool.cpp @@ -22,6 +22,8 @@ #include "helpers.h" #include "settings.h" +#include + class TestBool : public TestFixture { public: TestBool() : TestFixture("TestBool") {} diff --git a/test/testboost.cpp b/test/testboost.cpp index b52d5c7330d..ff8b2a44655 100644 --- a/test/testboost.cpp +++ b/test/testboost.cpp @@ -22,6 +22,8 @@ #include "helpers.h" #include "settings.h" +#include + class TestBoost : public TestFixture { public: TestBoost() : TestFixture("TestBoost") {} diff --git a/test/testbufferoverrun.cpp b/test/testbufferoverrun.cpp index f0ee3128010..7d557c8b85b 100644 --- a/test/testbufferoverrun.cpp +++ b/test/testbufferoverrun.cpp @@ -28,6 +28,7 @@ #include "fixture.h" #include "tokenize.h" +#include #include #include #include diff --git a/test/testcharvar.cpp b/test/testcharvar.cpp index bbb10b81218..dcbe49cca26 100644 --- a/test/testcharvar.cpp +++ b/test/testcharvar.cpp @@ -23,6 +23,8 @@ #include "platform.h" #include "settings.h" +#include + class TestCharVar : public TestFixture { public: TestCharVar() : TestFixture("TestCharVar") {} diff --git a/test/testclass.cpp b/test/testclass.cpp index f8713702e41..00408e24993 100644 --- a/test/testclass.cpp +++ b/test/testclass.cpp @@ -25,6 +25,7 @@ #include "tokenize.h" #include "tokenlist.h" +#include #include #include #include diff --git a/test/testcondition.cpp b/test/testcondition.cpp index 8005c400e50..2f634d843fd 100644 --- a/test/testcondition.cpp +++ b/test/testcondition.cpp @@ -24,6 +24,7 @@ #include "settings.h" #include "tokenize.h" +#include #include #include #include diff --git a/test/testconstructors.cpp b/test/testconstructors.cpp index 6b265f6fe84..28cbf206711 100644 --- a/test/testconstructors.cpp +++ b/test/testconstructors.cpp @@ -23,6 +23,8 @@ #include "standards.h" #include "settings.h" +#include + class TestConstructors : public TestFixture { public: TestConstructors() : TestFixture("TestConstructors") {} diff --git a/test/testexceptionsafety.cpp b/test/testexceptionsafety.cpp index 9e10e1e2290..03f7c6a6815 100644 --- a/test/testexceptionsafety.cpp +++ b/test/testexceptionsafety.cpp @@ -22,6 +22,8 @@ #include "helpers.h" #include "settings.h" +#include + class TestExceptionSafety : public TestFixture { public: TestExceptionSafety() : TestFixture("TestExceptionSafety") {} diff --git a/test/testfilelister.cpp b/test/testfilelister.cpp index 7eb5bb4e09b..092ac86a3b6 100644 --- a/test/testfilelister.cpp +++ b/test/testfilelister.cpp @@ -23,7 +23,6 @@ #include "fixture.h" #include -#include #include #include #include diff --git a/test/testfunctions.cpp b/test/testfunctions.cpp index b622207f1e2..a6758087622 100644 --- a/test/testfunctions.cpp +++ b/test/testfunctions.cpp @@ -23,6 +23,7 @@ #include "settings.h" #include "standards.h" +#include #include class TestFunctions : public TestFixture { diff --git a/test/testgarbage.cpp b/test/testgarbage.cpp index 93b2d12ee78..f022b64ac61 100644 --- a/test/testgarbage.cpp +++ b/test/testgarbage.cpp @@ -23,6 +23,7 @@ #include "settings.h" #include "token.h" +#include #include #include diff --git a/test/testinternal.cpp b/test/testinternal.cpp index 519e1aca892..5dc59aad9f4 100644 --- a/test/testinternal.cpp +++ b/test/testinternal.cpp @@ -23,6 +23,8 @@ #include "helpers.h" #include "settings.h" +#include + class TestInternal : public TestFixture { public: TestInternal() : TestFixture("TestInternal") {} diff --git a/test/testio.cpp b/test/testio.cpp index 5c70a4deac8..0f21343ff16 100644 --- a/test/testio.cpp +++ b/test/testio.cpp @@ -24,6 +24,7 @@ #include "platform.h" #include "settings.h" +#include #include class TestIO : public TestFixture { diff --git a/test/testmemleak.cpp b/test/testmemleak.cpp index a9c8c34c465..b6be95bd8be 100644 --- a/test/testmemleak.cpp +++ b/test/testmemleak.cpp @@ -24,6 +24,7 @@ #include "symboldatabase.h" #include "token.h" +#include #include class TestMemleak : private TestFixture { diff --git a/test/testnullpointer.cpp b/test/testnullpointer.cpp index e2bf2c82dc3..05502dbf980 100644 --- a/test/testnullpointer.cpp +++ b/test/testnullpointer.cpp @@ -27,6 +27,7 @@ #include "token.h" #include "tokenize.h" +#include #include #include #include diff --git a/test/testother.cpp b/test/testother.cpp index 9b9584cd3dd..ff151fdad05 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -25,6 +25,7 @@ #include "standards.h" #include "tokenize.h" +#include #include #include diff --git a/test/testpostfixoperator.cpp b/test/testpostfixoperator.cpp index b33f33b5e41..d2d3dbf84a8 100644 --- a/test/testpostfixoperator.cpp +++ b/test/testpostfixoperator.cpp @@ -22,6 +22,8 @@ #include "helpers.h" #include "settings.h" +#include + class TestPostfixOperator : public TestFixture { public: TestPostfixOperator() : TestFixture("TestPostfixOperator") {} diff --git a/test/testsimplifytokens.cpp b/test/testsimplifytokens.cpp index 6af24e798af..b034e617a9e 100644 --- a/test/testsimplifytokens.cpp +++ b/test/testsimplifytokens.cpp @@ -24,9 +24,9 @@ #include "fixture.h" #include "token.h" +#include #include - class TestSimplifyTokens : public TestFixture { public: TestSimplifyTokens() : TestFixture("TestSimplifyTokens") {} diff --git a/test/testsimplifyusing.cpp b/test/testsimplifyusing.cpp index e39214e88ab..9cc79f6eb6a 100644 --- a/test/testsimplifyusing.cpp +++ b/test/testsimplifyusing.cpp @@ -26,6 +26,7 @@ #include "tokenlist.h" #include "utils.h" +#include #include #include #include diff --git a/test/testsizeof.cpp b/test/testsizeof.cpp index ba11c1ff6af..f0e05c8de44 100644 --- a/test/testsizeof.cpp +++ b/test/testsizeof.cpp @@ -23,6 +23,7 @@ #include "settings.h" #include "tokenize.h" +#include #include #include diff --git a/test/testsummaries.cpp b/test/testsummaries.cpp index fde4e51f5a8..8939731f95b 100644 --- a/test/testsummaries.cpp +++ b/test/testsummaries.cpp @@ -20,6 +20,7 @@ #include "helpers.h" #include "summaries.h" +#include #include class TestSummaries : public TestFixture { diff --git a/test/testsuppressions.cpp b/test/testsuppressions.cpp index 5e31520ce96..d2dcfb26eac 100644 --- a/test/testsuppressions.cpp +++ b/test/testsuppressions.cpp @@ -29,7 +29,6 @@ #include "threadexecutor.h" #include "singleexecutor.h" -#include #include #include #include diff --git a/test/testtokenlist.cpp b/test/testtokenlist.cpp index ec4058cfe9c..80b16002482 100644 --- a/test/testtokenlist.cpp +++ b/test/testtokenlist.cpp @@ -28,6 +28,8 @@ #include #include #include +#include +#include #include diff --git a/test/testtype.cpp b/test/testtype.cpp index d00b52dd52d..fb9f6fee71a 100644 --- a/test/testtype.cpp +++ b/test/testtype.cpp @@ -25,6 +25,7 @@ #include "standards.h" #include "tokenize.h" +#include #include #include #include diff --git a/test/testunusedfunctions.cpp b/test/testunusedfunctions.cpp index f18f0953045..91f1c1e11bf 100644 --- a/test/testunusedfunctions.cpp +++ b/test/testunusedfunctions.cpp @@ -25,6 +25,7 @@ #include "tokenize.h" #include "tokenlist.h" +#include #include #include diff --git a/test/testvaarg.cpp b/test/testvaarg.cpp index aab291c405f..f4a42a4a111 100644 --- a/test/testvaarg.cpp +++ b/test/testvaarg.cpp @@ -22,6 +22,8 @@ #include "helpers.h" #include "settings.h" +#include + class TestVaarg : public TestFixture { public: TestVaarg() : TestFixture("TestVaarg") {} diff --git a/test/testvarid.cpp b/test/testvarid.cpp index e35f9af0379..126cb791f44 100644 --- a/test/testvarid.cpp +++ b/test/testvarid.cpp @@ -25,6 +25,7 @@ #include "tokenize.h" #include "tokenlist.h" +#include #include #include #include