cleaned up includes based on `include-what-you-use` (#5855)

This commit is contained in:
Oliver Stöneberg 2024-01-07 11:07:51 +01:00 committed by GitHub
parent 81700b481d
commit bbd2b2aa83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 15 additions and 7 deletions

View File

@ -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

View File

@ -42,6 +42,7 @@
#include <algorithm>
#include <cassert>
#include <climits>
#include <cstdint>
#include <cstdio>
#include <cstdlib> // EXIT_FAILURE
#include <cstring>

View File

@ -50,6 +50,7 @@
#include <list>
#include <set>
#include <sstream> // IWYU pragma: keep
#include <unordered_set>
#include <utility>
#include <vector>

View File

@ -20,10 +20,10 @@
#include "color.h"
#include "errorlogger.h"
#include "library.h"
#include "settings.h"
#include "suppressions.h"
#include <algorithm>
#include <cassert>
#include <sstream> // IWYU pragma: keep
#include <utility>

View File

@ -32,6 +32,7 @@
#include "symboldatabase.h"
#include "token.h"
#include "tokenize.h"
#include "tokenlist.h"
#include "utils.h"
#include "vfvalue.h"

View File

@ -26,10 +26,12 @@
#include "settings.h"
#include "symboldatabase.h"
#include "token.h"
#include "utils.h"
#include "valueptr.h"
#include "vfvalue.h"
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <functional>
#include <list>

View File

@ -34,14 +34,13 @@
#include <cassert>
#include <cmath>
#include <functional>
#include <iterator>
#include <list>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include <iostream>
ExprIdToken::ExprIdToken(const Token* tok) : tok(tok), exprid(tok ? tok->exprId() : 0) {}
nonneg int ExprIdToken::getExpressionId() const {

View File

@ -43,11 +43,11 @@
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <sstream> // IWYU pragma: keep
#include <stack>
#include <string>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
//---------------------------------------------------------------------------

View File

@ -34,6 +34,7 @@
#include <map>
#include <memory>
#include <stack>
#include <type_traits>
#include <utility>
static Token *skipRequires(Token *tok)

View File

@ -42,6 +42,7 @@
#include <set>
#include <sstream> // IWYU pragma: keep
#include <stack>
#include <type_traits>
#include <unordered_set>
#include <utility>

View File

@ -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 <tinyxml2.h>
#include <tinyxml2.h> // IWYU pragma: export
SUPPRESS_WARNING_CLANG_POP
SUPPRESS_WARNING_CLANG_POP

View File

@ -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"

View File

@ -22,6 +22,7 @@
#include "filesettings.h"
#include "fixture.h"
#include "helpers.h"
#include "settings.h"
#include <algorithm>
#include <list>