Skip to content

Commit

Permalink
cleaned up includes based on ìnclude-what-you-use
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Mar 4, 2024
1 parent c59f0e4 commit ef9a8c0
Show file tree
Hide file tree
Showing 72 changed files with 73 additions and 78 deletions.
4 changes: 2 additions & 2 deletions cli/cmdlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
#include <cstdio>
#include <cstdlib> // EXIT_FAILURE
#include <cstring>
#include <fstream> // IWYU pragma: keep
#include <fstream>
#include <iostream>
#include <iterator>
#include <list>
#include <set>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <unordered_set>
#include <utility>

Expand Down
3 changes: 2 additions & 1 deletion cli/cppcheckexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@
#include <cstdio>
#include <cstdlib> // EXIT_SUCCESS and EXIT_FAILURE
#include <ctime>
#include <fstream>
#include <iostream>
#include <list>
#include <set>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <unordered_set>
#include <utility>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion cli/executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "suppressions.h"

#include <cassert>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <utility>

struct FileSettings;
Expand Down
3 changes: 2 additions & 1 deletion cli/processexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@
#include <iostream>
#include <list>
#include <map>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <sys/select.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <unistd.h>
#include <utility>
Expand Down
4 changes: 2 additions & 2 deletions externals/simplecpp/simplecpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
#include <cstring>
#include <ctime>
#include <exception>
#include <fstream> // IWYU pragma: keep
#include <fstream>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <set>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <stack>
#include <stdexcept>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion gui/checkthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@

#include <algorithm>
#include <cstddef>
#include <fstream>
#include <iterator>
#include <list>
#include <ostream>
#include <set>
#include <string>
#include <utility>
Expand Down
1 change: 0 additions & 1 deletion lib/analyzerinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

#include <cstring>
#include <map>
#include <sstream> // IWYU pragma: keep

#include "xml.h"

Expand Down
1 change: 0 additions & 1 deletion lib/checkersreport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <map>
#include <sstream>
#include <unordered_set>
#include <utility>
#include <vector>

static bool isCppcheckPremium(const Settings& settings) {
Expand Down
1 change: 0 additions & 1 deletion lib/checkfunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

#include <map>
#include <string>
#include <utility>

class Token;
class ErrorLogger;
Expand Down
2 changes: 1 addition & 1 deletion lib/checkio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <list>
#include <map>
#include <set>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <unordered_set>
#include <utility>
#include <vector>
Expand Down
1 change: 0 additions & 1 deletion lib/checkleakautovar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <cstddef>
#include <iostream>
#include <list>
#include <utility>
#include <vector>

//---------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion lib/checkleakautovar.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <map>
#include <set>
#include <string>
#include <utility>

class ErrorLogger;
class Settings;
Expand Down
1 change: 0 additions & 1 deletion lib/checkuninitvar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include <list>
#include <map>
#include <unordered_set>
#include <utility>
#include <vector>


Expand Down
4 changes: 2 additions & 2 deletions lib/checkunusedfunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
#include <algorithm>
#include <cctype>
#include <cstring>
#include <fstream> // IWYU pragma: keep
#include <fstream>
#include <map>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <tuple>
#include <utility>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion lib/clangimport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <map>
#include <memory>
#include <set>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <stack>
#include <string>
#include <utility>
Expand Down
2 changes: 1 addition & 1 deletion lib/color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#ifndef _WIN32
#include <unistd.h>
#include <cstddef>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <iostream>
#endif

Expand Down
4 changes: 2 additions & 2 deletions lib/cppcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
#include <cctype>
#include <cstdlib>
#include <ctime>
#include <exception>
#include <exception> // IWYU pragma: keep
#include <fstream>
#include <iostream> // <- TEMPORARY
#include <new>
#include <set>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <stdexcept>
#include <string>
#include <unordered_set>
Expand Down
1 change: 0 additions & 1 deletion lib/cppcheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include <set>
#include <string>
#include <unordered_set>
#include <utility>
#include <vector>

class Tokenizer;
Expand Down
3 changes: 2 additions & 1 deletion lib/errorlogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
#include <cassert>
#include <cctype>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <string>
#include <unordered_map>
#include <utility>
Expand Down
1 change: 0 additions & 1 deletion lib/fwdanalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <list>
#include <map>
#include <string>
#include <utility>

static bool isUnchanged(const Token *startToken, const Token *endToken, const std::set<nonneg int> &exprVarIds, bool local)
{
Expand Down
4 changes: 2 additions & 2 deletions lib/importproject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <fstream> // IWYU pragma: keep
#include <fstream>
#include <iostream>
#include <iterator>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <unordered_set>
#include <utility>

Expand Down
2 changes: 1 addition & 1 deletion lib/library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <cstring>
#include <list>
#include <memory>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <stack>
#include <stdexcept>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions lib/path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <simplecpp.h>

#ifndef _WIN32
#include <sys/types.h>
#include <unistd.h>
#else
#include <direct.h>
Expand Down
2 changes: 1 addition & 1 deletion lib/preprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <array>
#include <cstddef>
#include <iterator> // back_inserter
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <utility>

#include <simplecpp.h>
Expand Down
4 changes: 2 additions & 2 deletions lib/summaries.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
#include "tokenlist.h"

#include <algorithm>
#include <fstream> // IWYU pragma: keep
#include <fstream>
#include <map>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <utility>
#include <vector>

Expand Down
2 changes: 1 addition & 1 deletion lib/suppressions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <cctype> // std::isdigit, std::isalnum, etc
#include <cstring>
#include <functional> // std::bind, std::placeholders
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <utility>

#include "xml.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/symboldatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include <iomanip>
#include <iostream>
#include <iterator>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
Expand Down
2 changes: 1 addition & 1 deletion lib/token.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <iterator>
#include <map>
#include <set>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <stack>
#include <type_traits>
#include <unordered_set>
Expand Down
2 changes: 1 addition & 1 deletion lib/tokenize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#include <exception>
#include <memory>
#include <set>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <stack>
#include <stdexcept>
#include <unordered_map>
Expand Down
2 changes: 1 addition & 1 deletion lib/valueflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
#include <memory>
#include <numeric>
#include <set>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <string>
#include <type_traits>
#include <unordered_map>
Expand Down
2 changes: 1 addition & 1 deletion test/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <cerrno>
#include <cstdio>
#include <iostream>
#include <fstream> // IWYU pragma: keep
#include <fstream>
#include <list>
#include <map>
#include <stdexcept>
Expand Down
2 changes: 1 addition & 1 deletion test/test64bit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "fixture.h"
#include "tokenize.h"

#include <sstream> // IWYU pragma: keep
#include <sstream>

class Test64BitPortability : public TestFixture {
public:
Expand Down
2 changes: 1 addition & 1 deletion test/testassert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "fixture.h"
#include "tokenize.h"

#include <sstream> // IWYU pragma: keep
#include <sstream>


class TestAssert : public TestFixture {
Expand Down
2 changes: 1 addition & 1 deletion test/testastutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "tokenlist.h"

#include <cstring>
#include <sstream> // IWYU pragma: keep
#include <sstream>

class TestAstUtils : public TestFixture {
public:
Expand Down
2 changes: 1 addition & 1 deletion test/testautovariables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "fixture.h"
#include "tokenize.h"

#include <sstream> // IWYU pragma: keep
#include <sstream>

class TestAutoVariables : public TestFixture {
public:
Expand Down
2 changes: 1 addition & 1 deletion test/testbool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "fixture.h"
#include "tokenize.h"

#include <sstream> // IWYU pragma: keep
#include <sstream>

class TestBool : public TestFixture {
public:
Expand Down
2 changes: 1 addition & 1 deletion test/testboost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "fixture.h"
#include "tokenize.h"

#include <sstream> // IWYU pragma: keep
#include <sstream>

class TestBoost : public TestFixture {
public:
Expand Down
2 changes: 1 addition & 1 deletion test/testbufferoverrun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "tokenize.h"

#include <list>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <string>
#include <vector>

Expand Down
2 changes: 1 addition & 1 deletion test/testcharvar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "fixture.h"
#include "tokenize.h"

#include <sstream> // IWYU pragma: keep
#include <sstream>

class TestCharVar : public TestFixture {
public:
Expand Down
2 changes: 1 addition & 1 deletion test/testclangimport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include <cstdint>
#include <list>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <string>
#include <vector>

Expand Down
2 changes: 1 addition & 1 deletion test/testclass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "tokenize.h"

#include <list>
#include <sstream> // IWYU pragma: keep
#include <sstream>
#include <string>
#include <vector>

Expand Down
Loading

0 comments on commit ef9a8c0

Please sign in to comment.