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

* iwyu.yml: include internal check sources

* cleaned up includes based on include-what-you-use
This commit is contained in:
Oliver Stöneberg 2022-09-25 09:20:34 +02:00 committed by GitHub
parent b973a86ee1
commit 657d9143f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 4 deletions

View File

@ -28,7 +28,7 @@ jobs:
- name: Prepare CMake - name: Prepare CMake
run: | 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 -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
- name: Prepare CMake dependencies - name: Prepare CMake dependencies
run: | run: |

View File

@ -24,10 +24,15 @@
#include "check.h" #include "check.h"
#include "config.h" #include "config.h"
#include "errortypes.h"
#include "settings.h" #include "settings.h"
#include <string> #include <string>
class ErrorLogger;
class Token;
class Tokenizer;
/// @addtogroup Checks /// @addtogroup Checks
/// @{ /// @{

View File

@ -32,7 +32,7 @@
#include <cstddef> #include <cstddef>
#include <fstream> // IWYU pragma: keep #include <fstream> // IWYU pragma: keep
#include <functional> #include <functional>
#include <istream> #include <iosfwd>
#include <list> #include <list>
#include <map> #include <map>
#include <string> #include <string>

View File

@ -29,6 +29,7 @@ static constexpr std::size_t DefaultSmallVectorSize = 0;
template<typename T, std::size_t N = DefaultSmallVectorSize> template<typename T, std::size_t N = DefaultSmallVectorSize>
using SmallVector = boost::container::small_vector<T, N>; using SmallVector = boost::container::small_vector<T, N>;
#else #else
#include <utility>
#include <vector> #include <vector>
template<class T, std::size_t N> template<class T, std::size_t N>

View File

@ -23,6 +23,12 @@
#include "config.h" #include "config.h"
#include <cstddef>
#include <iterator>
#include <type_traits>
class Token;
template<typename T, REQUIRES("T must be a Token class", std::is_convertible<T*, const Token*> )> template<typename T, REQUIRES("T must be a Token class", std::is_convertible<T*, const Token*> )>
class TokenRangeBase { class TokenRangeBase {
T* mFront; T* mFront;

View File

@ -24,7 +24,6 @@
#include "config.h" #include "config.h"
#include "mathlib.h" #include "mathlib.h"
#include <algorithm>
#include <cassert> #include <cassert>
#include <cstdlib> #include <cstdlib>
#include <functional> #include <functional>

View File

@ -22,7 +22,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "config.h" #include "config.h"
#include <functional>
#include <memory> #include <memory>
template<class T> template<class T>