cleaned up includes based on `include-what-you-use` (#5021)
This commit is contained in:
parent
51cba8162b
commit
8cf6a22ea3
2
Makefile
2
Makefile
|
@ -670,7 +670,7 @@ cli/threadexecutor.o: cli/threadexecutor.cpp cli/cppcheckexecutor.h cli/executor
|
|||
test/fixture.o: test/fixture.cpp lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/suppressions.h test/fixture.h test/options.h test/redirect.h
|
||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/fixture.cpp
|
||||
|
||||
test/helpers.o: test/helpers.cpp externals/simplecpp/simplecpp.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/helpers.h
|
||||
test/helpers.o: test/helpers.cpp externals/simplecpp/simplecpp.h lib/config.h lib/errortypes.h lib/mathlib.h lib/path.h lib/preprocessor.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/helpers.h
|
||||
$(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/helpers.cpp
|
||||
|
||||
test/main.o: test/main.cpp externals/simplecpp/simplecpp.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/preprocessor.h lib/suppressions.h test/fixture.h test/options.h
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "check.h"
|
||||
#include "config.h"
|
||||
#include "cppcheckexecutor.h"
|
||||
#include "errorlogger.h"
|
||||
#include "errortypes.h"
|
||||
#include "filelister.h"
|
||||
#include "importproject.h"
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include "suppressions.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <sstream> // IWYU pragma: keep
|
||||
#include <utility>
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#if !defined(WIN32) && !defined(__MINGW32__)
|
||||
|
||||
#include "color.h"
|
||||
#include "config.h"
|
||||
#include "cppcheck.h"
|
||||
#include "cppcheckexecutor.h"
|
||||
|
@ -56,6 +55,8 @@
|
|||
#include <sys/prctl.h>
|
||||
#endif
|
||||
|
||||
enum class Color;
|
||||
|
||||
// NOLINTNEXTLINE(misc-unused-using-decls) - required for FD_ZERO
|
||||
using std::memset;
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include "ui_newsuppressiondialog.h"
|
||||
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
#include <QComboBox>
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
#include "utils.h"
|
||||
#include "vfvalue.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
#include "tokenlist.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "path.h"
|
||||
#include "token.h"
|
||||
#include "tokenlist.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
@ -32,9 +33,9 @@
|
|||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <sstream> // IWYU pragma: keep
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
#include <tinyxml2.h>
|
||||
|
|
|
@ -22,8 +22,10 @@
|
|||
#include "preprocessor.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <fstream>
|
||||
#include <stdexcept>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
|
@ -34,6 +36,8 @@
|
|||
|
||||
#include <simplecpp.h>
|
||||
|
||||
class Suppressions;
|
||||
|
||||
ScopedFile::ScopedFile(std::string name, const std::string &content, std::string path)
|
||||
: mName(std::move(name))
|
||||
, mPath(Path::toNativeSeparators(std::move(path)))
|
||||
|
|
|
@ -19,20 +19,16 @@
|
|||
#ifndef helpersH
|
||||
#define helpersH
|
||||
|
||||
#include "color.h"
|
||||
#include "errorlogger.h"
|
||||
#include "settings.h"
|
||||
#include "suppressions.h"
|
||||
#include "tokenize.h"
|
||||
#include "tokenlist.h"
|
||||
|
||||
#include <fstream> // IWYU pragma: keep
|
||||
#include <list>
|
||||
#include <sstream> // IWYU pragma: keep
|
||||
#include <string>
|
||||
|
||||
class Token;
|
||||
class Processor;
|
||||
class Preprocessor;
|
||||
class Settings;
|
||||
class Suppressions;
|
||||
|
||||
class givenACodeSampleToTokenize {
|
||||
private:
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
#include "cmdlineparser.h"
|
||||
#include "color.h"
|
||||
#include "config.h"
|
||||
#include "cppcheckexecutor.h"
|
||||
#include "errortypes.h"
|
||||
#include "platform.h"
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "fixture.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "color.h"
|
||||
#include "config.h"
|
||||
#include "cppcheck.h"
|
||||
#include "errorlogger.h"
|
||||
|
|
|
@ -26,8 +26,11 @@
|
|||
|
||||
#include <simplecpp.h>
|
||||
|
||||
#include <map>
|
||||
#include <sstream> // IWYU pragma: keep
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
||||
class TestSimplifyUsing : public TestFixture {
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <numeric>
|
||||
|
||||
class TestSuppressions : public TestFixture {
|
||||
public:
|
||||
|
|
|
@ -21,6 +21,11 @@
|
|||
#include "settings.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
|
||||
const Settings givenACodeSampleToTokenize::settings;
|
||||
|
||||
class TestUtils : public TestFixture {
|
||||
|
|
Loading…
Reference in New Issue