diff --git a/.github/workflows/iwyu.yml b/.github/workflows/iwyu.yml index e796155c5..f52895e6f 100644 --- a/.github/workflows/iwyu.yml +++ b/.github/workflows/iwyu.yml @@ -63,7 +63,7 @@ jobs: # TODO: switch to Qt 6 after we enabled the Qt mappings again - name: Prepare CMake run: | - cmake -S . -B cmake.output -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCPPCHK_GLIBCXX_DEBUG=Off -DUSE_MATCHCOMPILER=Off + cmake -S . -B cmake.output -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCPPCHK_GLIBCXX_DEBUG=Off -DUSE_MATCHCOMPILER=Off -DEXTERNALS_AS_SYSTEM=On - name: Prepare CMake dependencies run: | @@ -140,7 +140,7 @@ jobs: - name: Prepare CMake run: | - cmake -S . -B cmake.output -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCPPCHK_GLIBCXX_DEBUG=Off -DUSE_MATCHCOMPILER=Off + cmake -S . -B cmake.output -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCPPCHK_GLIBCXX_DEBUG=Off -DUSE_MATCHCOMPILER=Off -DEXTERNALS_AS_SYSTEM=On env: CC: clang-17 CXX: clang++-17 diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 82ef08a41..79cf7e7f5 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #include // EXIT_FAILURE #include diff --git a/cli/cppcheckexecutor.cpp b/cli/cppcheckexecutor.cpp index a9bd31b62..40fa87842 100644 --- a/cli/cppcheckexecutor.cpp +++ b/cli/cppcheckexecutor.cpp @@ -50,6 +50,7 @@ #include #include #include // IWYU pragma: keep +#include #include #include diff --git a/cli/executor.cpp b/cli/executor.cpp index 5282376a7..b5e27643d 100644 --- a/cli/executor.cpp +++ b/cli/executor.cpp @@ -20,10 +20,10 @@ #include "color.h" #include "errorlogger.h" +#include "library.h" #include "settings.h" #include "suppressions.h" -#include #include #include // IWYU pragma: keep #include diff --git a/lib/checkleakautovar.cpp b/lib/checkleakautovar.cpp index d6d86a6f1..f58e05d66 100644 --- a/lib/checkleakautovar.cpp +++ b/lib/checkleakautovar.cpp @@ -32,6 +32,7 @@ #include "symboldatabase.h" #include "token.h" #include "tokenize.h" +#include "tokenlist.h" #include "utils.h" #include "vfvalue.h" diff --git a/lib/forwardanalyzer.cpp b/lib/forwardanalyzer.cpp index 61b9ee517..ee391b1a5 100644 --- a/lib/forwardanalyzer.cpp +++ b/lib/forwardanalyzer.cpp @@ -26,10 +26,12 @@ #include "settings.h" #include "symboldatabase.h" #include "token.h" +#include "utils.h" #include "valueptr.h" #include "vfvalue.h" #include +#include #include #include #include diff --git a/lib/programmemory.cpp b/lib/programmemory.cpp index b6ade0d98..96b79098a 100644 --- a/lib/programmemory.cpp +++ b/lib/programmemory.cpp @@ -34,14 +34,13 @@ #include #include #include +#include #include #include #include #include #include -#include - ExprIdToken::ExprIdToken(const Token* tok) : tok(tok), exprid(tok ? tok->exprId() : 0) {} nonneg int ExprIdToken::getExpressionId() const { diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index be63697ec..413a7684f 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -43,11 +43,11 @@ #include #include #include -#include #include // IWYU pragma: keep #include #include #include +#include #include #include //--------------------------------------------------------------------------- diff --git a/lib/templatesimplifier.cpp b/lib/templatesimplifier.cpp index b7e0b318b..d04a79769 100644 --- a/lib/templatesimplifier.cpp +++ b/lib/templatesimplifier.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include static Token *skipRequires(Token *tok) diff --git a/lib/token.cpp b/lib/token.cpp index 8ee4b0194..5be97b9b4 100644 --- a/lib/token.cpp +++ b/lib/token.cpp @@ -42,6 +42,7 @@ #include #include // IWYU pragma: keep #include +#include #include #include diff --git a/lib/xml.h b/lib/xml.h index b2c2c34fc..3620f0d99 100644 --- a/lib/xml.h +++ b/lib/xml.h @@ -26,7 +26,7 @@ SUPPRESS_WARNING_CLANG_PUSH("-Wextra-semi-stmt") SUPPRESS_WARNING_CLANG_PUSH("-Wsuggest-override") SUPPRESS_WARNING_CLANG_PUSH("-Wsuggest-destructor-override") -#include +#include // IWYU pragma: export SUPPRESS_WARNING_CLANG_POP SUPPRESS_WARNING_CLANG_POP diff --git a/test/testcmdlineparser.cpp b/test/testcmdlineparser.cpp index 2cb87695e..17ea65f6c 100644 --- a/test/testcmdlineparser.cpp +++ b/test/testcmdlineparser.cpp @@ -20,6 +20,7 @@ #include "cmdlineparser.h" #include "config.h" #include "cppcheckexecutor.h" +#include "errorlogger.h" #include "errortypes.h" #include "helpers.h" #include "path.h" diff --git a/test/testcppcheck.cpp b/test/testcppcheck.cpp index 36ca8d59d..8bcc1bee1 100644 --- a/test/testcppcheck.cpp +++ b/test/testcppcheck.cpp @@ -22,6 +22,7 @@ #include "filesettings.h" #include "fixture.h" #include "helpers.h" +#include "settings.h" #include #include