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 eda173c
Show file tree
Hide file tree
Showing 40 changed files with 48 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ cli/cmdlineparser.o: cli/cmdlineparser.cpp cli/cmdlinelogger.h cli/cmdlineparser
cli/cppcheckexecutor.o: cli/cppcheckexecutor.cpp cli/cmdlinelogger.h cli/cmdlineparser.h cli/cppcheckexecutor.h cli/cppcheckexecutorseh.h cli/executor.h cli/processexecutor.h cli/signalhandler.h cli/singleexecutor.h cli/threadexecutor.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/checkersreport.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h
$(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/cppcheckexecutor.cpp

cli/cppcheckexecutorseh.o: cli/cppcheckexecutorseh.cpp cli/cppcheckexecutor.h cli/cppcheckexecutorseh.h lib/config.h lib/filesettings.h lib/platform.h lib/standards.h lib/utils.h
cli/cppcheckexecutorseh.o: cli/cppcheckexecutorseh.cpp cli/cppcheckexecutor.h cli/cppcheckexecutorseh.h lib/config.h lib/utils.h
$(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/cppcheckexecutorseh.cpp

cli/executor.o: cli/executor.cpp cli/executor.h lib/addoninfo.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h
Expand All @@ -664,7 +664,7 @@ cli/executor.o: cli/executor.cpp cli/executor.h lib/addoninfo.h lib/color.h lib/
cli/filelister.o: cli/filelister.cpp cli/filelister.h lib/config.h lib/filesettings.h lib/path.h lib/pathmatch.h lib/platform.h lib/standards.h lib/utils.h
$(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/filelister.cpp

cli/main.o: cli/main.cpp cli/cppcheckexecutor.h lib/config.h lib/errortypes.h lib/filesettings.h lib/platform.h lib/standards.h lib/utils.h
cli/main.o: cli/main.cpp cli/cppcheckexecutor.h lib/config.h lib/errortypes.h
$(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/main.cpp

cli/processexecutor.o: cli/processexecutor.cpp cli/executor.h cli/processexecutor.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h
Expand Down
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
3 changes: 1 addition & 2 deletions cli/cppcheckexecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,16 @@
#define CPPCHECKEXECUTOR_H

#include "config.h"
#include "filesettings.h"

#include <cstdio>
#include <list>
#include <string>
#include <utility>
#include <vector>

class Settings;
class ErrorLogger;
class SuppressionList;
struct FileSettings;
class FileWithDetails;

/**
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
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: 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
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 eda173c

Please sign in to comment.