Skip to content

Commit bbd2b2a

Browse files
authored
cleaned up includes based on include-what-you-use (cppcheck-opensource#5855)
1 parent 81700b4 commit bbd2b2a

13 files changed

Lines changed: 15 additions & 7 deletions

.github/workflows/iwyu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
# TODO: switch to Qt 6 after we enabled the Qt mappings again
6464
- name: Prepare CMake
6565
run: |
66-
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
66+
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
6767
6868
- name: Prepare CMake dependencies
6969
run: |
@@ -140,7 +140,7 @@ jobs:
140140

141141
- name: Prepare CMake
142142
run: |
143-
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
143+
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
144144
env:
145145
CC: clang-17
146146
CXX: clang++-17

cli/cmdlineparser.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include <algorithm>
4343
#include <cassert>
4444
#include <climits>
45+
#include <cstdint>
4546
#include <cstdio>
4647
#include <cstdlib> // EXIT_FAILURE
4748
#include <cstring>

cli/cppcheckexecutor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
#include <list>
5151
#include <set>
5252
#include <sstream> // IWYU pragma: keep
53+
#include <unordered_set>
5354
#include <utility>
5455
#include <vector>
5556

cli/executor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020

2121
#include "color.h"
2222
#include "errorlogger.h"
23+
#include "library.h"
2324
#include "settings.h"
2425
#include "suppressions.h"
2526

26-
#include <algorithm>
2727
#include <cassert>
2828
#include <sstream> // IWYU pragma: keep
2929
#include <utility>

lib/checkleakautovar.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "symboldatabase.h"
3333
#include "token.h"
3434
#include "tokenize.h"
35+
#include "tokenlist.h"
3536
#include "utils.h"
3637
#include "vfvalue.h"
3738

lib/forwardanalyzer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@
2626
#include "settings.h"
2727
#include "symboldatabase.h"
2828
#include "token.h"
29+
#include "utils.h"
2930
#include "valueptr.h"
3031
#include "vfvalue.h"
3132

3233
#include <algorithm>
34+
#include <cassert>
3335
#include <cstdio>
3436
#include <functional>
3537
#include <list>

lib/programmemory.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,13 @@
3434
#include <cassert>
3535
#include <cmath>
3636
#include <functional>
37+
#include <iterator>
3738
#include <list>
3839
#include <memory>
3940
#include <string>
4041
#include <utility>
4142
#include <vector>
4243

43-
#include <iostream>
44-
4544
ExprIdToken::ExprIdToken(const Token* tok) : tok(tok), exprid(tok ? tok->exprId() : 0) {}
4645

4746
nonneg int ExprIdToken::getExpressionId() const {

lib/symboldatabase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
#include <iomanip>
4444
#include <iostream>
4545
#include <iterator>
46-
#include <limits>
4746
#include <sstream> // IWYU pragma: keep
4847
#include <stack>
4948
#include <string>
5049
#include <tuple>
50+
#include <type_traits>
5151
#include <unordered_map>
5252
#include <unordered_set>
5353
//---------------------------------------------------------------------------

lib/templatesimplifier.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <map>
3535
#include <memory>
3636
#include <stack>
37+
#include <type_traits>
3738
#include <utility>
3839

3940
static Token *skipRequires(Token *tok)

lib/token.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include <set>
4343
#include <sstream> // IWYU pragma: keep
4444
#include <stack>
45+
#include <type_traits>
4546
#include <unordered_set>
4647
#include <utility>
4748

0 commit comments

Comments
 (0)