Skip to content

Commit

Permalink
cleaned up includes based on include-what-you-use
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed May 21, 2024
1 parent c9a726c commit cc429d3
Show file tree
Hide file tree
Showing 42 changed files with 46 additions and 19 deletions.
1 change: 0 additions & 1 deletion cli/cmdlineparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <cstddef>
#include <list>
#include <string>
#include <utility>
#include <vector>

#include "cmdlinelogger.h"
Expand Down
2 changes: 0 additions & 2 deletions cli/cppcheckexecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@
#include <cstdio>
#include <list>
#include <string>
#include <utility>
#include <vector>

class Settings;
class ErrorLogger;
class SuppressionList;
class FileWithDetails;

/**
* This class works as an example of how CppCheck can be used in external
Expand Down
1 change: 0 additions & 1 deletion cli/filelister.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "pathmatch.h"
#include "utils.h"

#include <cstddef>
#include <cstring>
#include <iterator>
#include <memory>
Expand Down
2 changes: 0 additions & 2 deletions cli/filelister.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@
#ifndef filelisterH
#define filelisterH

#include <cstddef>
#include <list>
#include <set>
#include <string>
#include <utility>

class PathMatch;
class FileWithDetails;
Expand Down
1 change: 0 additions & 1 deletion cli/processexecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <cstddef>
#include <list>
#include <string>
#include <utility>

class Settings;
class ErrorLogger;
Expand Down
2 changes: 1 addition & 1 deletion cli/singleexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
#include "timer.h"

#include <cassert>
#include <cstddef>
#include <list>
#include <numeric>
#include <utility>

class ErrorLogger;

Expand Down
3 changes: 2 additions & 1 deletion cli/threadexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@
#include "settings.h"
#include "timer.h"

#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdlib>
#include <future>
#include <iostream>
#include <list>
#include <numeric>
#include <mutex>
#include <string>
#include <system_error>
#include <utility>
#include <vector>
Expand Down
3 changes: 0 additions & 3 deletions cli/threadexecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
#include "cppcheck.h"
#include "executor.h"

#include <cstddef>
#include <list>
#include <string>
#include <utility>

class Settings;
class ErrorLogger;
Expand Down
1 change: 0 additions & 1 deletion gui/resultstree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions lib/checkassert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <algorithm>
#include <utility>

//---------------------------------------------------------------------------

// CWE ids used
Expand Down
1 change: 0 additions & 1 deletion lib/checkstl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "checknullpointer.h"

#include <algorithm>
#include <cassert>
#include <iterator>
#include <list>
#include <map>
Expand Down
2 changes: 1 addition & 1 deletion lib/tokenize.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class TimerResults;
class Token;
class TemplateSimplifier;
class ErrorLogger;
struct Directive; // IWYU pragma: keep
struct Directive;
enum class Severity;

/// @addtogroup Core
Expand Down
2 changes: 2 additions & 0 deletions test/test64bit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "helpers.h"
#include "settings.h"

#include <cstddef>

class Test64BitPortability : public TestFixture {
public:
Test64BitPortability() : TestFixture("Test64BitPortability") {}
Expand Down
1 change: 0 additions & 1 deletion test/testastutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions test/testautovariables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "helpers.h"
#include "settings.h"

#include <cstddef>

class TestAutoVariables : public TestFixture {
public:
TestAutoVariables() : TestFixture("TestAutoVariables") {}
Expand Down
2 changes: 2 additions & 0 deletions test/testbool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "helpers.h"
#include "settings.h"

#include <cstddef>

class TestBool : public TestFixture {
public:
TestBool() : TestFixture("TestBool") {}
Expand Down
2 changes: 2 additions & 0 deletions test/testboost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "helpers.h"
#include "settings.h"

#include <cstddef>

class TestBoost : public TestFixture {
public:
TestBoost() : TestFixture("TestBoost") {}
Expand Down
1 change: 1 addition & 0 deletions test/testbufferoverrun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "fixture.h"
#include "tokenize.h"

#include <cstddef>
#include <list>
#include <string>
#include <vector>
Expand Down
2 changes: 2 additions & 0 deletions test/testcharvar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include "platform.h"
#include "settings.h"

#include <cstddef>

class TestCharVar : public TestFixture {
public:
TestCharVar() : TestFixture("TestCharVar") {}
Expand Down
1 change: 1 addition & 0 deletions test/testclass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "tokenize.h"
#include "tokenlist.h"

#include <cstddef>
#include <list>
#include <sstream>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions test/testcondition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "settings.h"
#include "tokenize.h"

#include <cstddef>
#include <limits>
#include <string>
#include <vector>
Expand Down
2 changes: 2 additions & 0 deletions test/testconstructors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include "standards.h"
#include "settings.h"

#include <cstddef>

class TestConstructors : public TestFixture {
public:
TestConstructors() : TestFixture("TestConstructors") {}
Expand Down
2 changes: 2 additions & 0 deletions test/testexceptionsafety.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "helpers.h"
#include "settings.h"

#include <cstddef>

class TestExceptionSafety : public TestFixture {
public:
TestExceptionSafety() : TestFixture("TestExceptionSafety") {}
Expand Down
1 change: 0 additions & 1 deletion test/testfilelister.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "fixture.h"

#include <algorithm>
#include <cstddef>
#include <list>
#include <stdexcept>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions test/testfunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "settings.h"
#include "standards.h"

#include <cstddef>
#include <string>

class TestFunctions : public TestFixture {
Expand Down
1 change: 1 addition & 0 deletions test/testgarbage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "settings.h"
#include "token.h"

#include <cstddef>
#include <list>
#include <string>

Expand Down
2 changes: 2 additions & 0 deletions test/testinternal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include "helpers.h"
#include "settings.h"

#include <cstddef>

class TestInternal : public TestFixture {
public:
TestInternal() : TestFixture("TestInternal") {}
Expand Down
1 change: 1 addition & 0 deletions test/testio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "platform.h"
#include "settings.h"

#include <cstddef>
#include <string>

class TestIO : public TestFixture {
Expand Down
1 change: 1 addition & 0 deletions test/testmemleak.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "symboldatabase.h"
#include "token.h"

#include <cstddef>
#include <list>

class TestMemleak : private TestFixture {
Expand Down
1 change: 1 addition & 0 deletions test/testnullpointer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "token.h"
#include "tokenize.h"

#include <cstddef>
#include <list>
#include <map>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions test/testother.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "standards.h"
#include "tokenize.h"

#include <cstddef>
#include <string>
#include <vector>

Expand Down
2 changes: 2 additions & 0 deletions test/testpostfixoperator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "helpers.h"
#include "settings.h"

#include <cstddef>

class TestPostfixOperator : public TestFixture {
public:
TestPostfixOperator() : TestFixture("TestPostfixOperator") {}
Expand Down
2 changes: 1 addition & 1 deletion test/testsimplifytokens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
#include "fixture.h"
#include "token.h"

#include <cstddef>
#include <string>


class TestSimplifyTokens : public TestFixture {
public:
TestSimplifyTokens() : TestFixture("TestSimplifyTokens") {}
Expand Down
1 change: 1 addition & 0 deletions test/testsimplifyusing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "tokenlist.h"
#include "utils.h"

#include <cstddef>
#include <sstream>
#include <string>
#include <vector>
Expand Down
1 change: 1 addition & 0 deletions test/testsizeof.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "settings.h"
#include "tokenize.h"

#include <cstddef>
#include <string>
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions test/testsummaries.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "helpers.h"
#include "summaries.h"

#include <cstddef>
#include <string>

class TestSummaries : public TestFixture {
Expand Down
1 change: 0 additions & 1 deletion test/testsuppressions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "threadexecutor.h"
#include "singleexecutor.h"

#include <cstddef>
#include <cstring>
#include <list>
#include <map>
Expand Down
2 changes: 2 additions & 0 deletions test/testtokenlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>

#include <simplecpp.h>

Expand Down
1 change: 1 addition & 0 deletions test/testtype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "standards.h"
#include "tokenize.h"

#include <cstddef>
#include <list>
#include <string>
#include <vector>
Expand Down
1 change: 1 addition & 0 deletions test/testunusedfunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "tokenize.h"
#include "tokenlist.h"

#include <cstddef>
#include <sstream>
#include <string>

Expand Down
2 changes: 2 additions & 0 deletions test/testvaarg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "helpers.h"
#include "settings.h"

#include <cstddef>

class TestVaarg : public TestFixture {
public:
TestVaarg() : TestFixture("TestVaarg") {}
Expand Down
1 change: 1 addition & 0 deletions test/testvarid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "tokenize.h"
#include "tokenlist.h"

#include <cstddef>
#include <sstream>
#include <string>
#include <vector>
Expand Down

0 comments on commit cc429d3

Please sign in to comment.