Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ $(libcppdir)/infer.o: lib/infer.cpp lib/calculate.h lib/config.h lib/errortypes.
$(libcppdir)/keywords.o: lib/keywords.cpp lib/config.h lib/keywords.h lib/standards.h lib/utils.h
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/keywords.cpp

$(libcppdir)/library.o: lib/library.cpp externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/astutils.h lib/checkers.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenlist.h lib/utils.h lib/vfvalue.h lib/xml.h
$(libcppdir)/library.o: lib/library.cpp externals/tinyxml2/tinyxml2.h lib/astutils.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenlist.h lib/utils.h lib/vfvalue.h lib/xml.h
$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/library.cpp

$(libcppdir)/mathlib.o: lib/mathlib.cpp externals/simplecpp/simplecpp.h lib/config.h lib/errortypes.h lib/mathlib.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/vfvalue.h
Expand Down
2 changes: 2 additions & 0 deletions gui/resultsview.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include "report.h"
#include "showtypes.h"

#include <cstdint>

#include <QObject>
#include <QString>
#include <QStringList>
Expand Down
4 changes: 4 additions & 0 deletions gui/threadresult.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
#include "errorlogger.h"
#include "errortypes.h"
#include "importproject.h"
#include "path.h"

#include <algorithm>
#include <cstddef>
#include <iterator>
#include <numeric>
#include <utility>

Expand Down
1 change: 1 addition & 0 deletions lib/analyzerinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "utils.h"

#include <cstring>
#include <exception>
#include <map>
#include <sstream>

Expand Down
1 change: 1 addition & 0 deletions lib/checknullpointer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <cctype>
#include <map>
#include <set>
#include <utility>
#include <vector>

//---------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions lib/checkuninitvar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <list>
#include <map>
#include <unordered_set>
#include <utility>
#include <vector>

//---------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions lib/cppcheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "check.h"
#include "config.h"

#include <cstddef>
#include <cstdint>
#include <fstream>
#include <functional>
Expand Down
1 change: 0 additions & 1 deletion lib/errorlogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <list>
#include <set>
#include <string>
#include <utility>
#include <vector>
#include <map>

Expand Down
3 changes: 3 additions & 0 deletions lib/importproject.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@

class Settings;
struct Suppressions;
namespace tinyxml2 {
class XMLDocument;
}

/// @addtogroup Core
/// @{
Expand Down
1 change: 0 additions & 1 deletion lib/library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "errortypes.h"
#include "mathlib.h"
#include "path.h"
#include "settings.h"
#include "symboldatabase.h"
#include "token.h"
#include "tokenlist.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <cctype>
#include <fstream>
#include <iostream>
#include <sstream>
#include <map>
#include <utility>

#include "json.h"
Expand Down
2 changes: 0 additions & 2 deletions lib/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
#include <algorithm>
#include <atomic>
#include <cstdint>
#include <functional>
#include <list>
#include <map>
#include <set>
#include <string>
#include <tuple>
Expand Down
1 change: 1 addition & 0 deletions lib/symboldatabase.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class Settings;
class SymbolDatabase;
class Tokenizer;
class ValueType;
class ErrorLogger;

enum class Reference : std::uint8_t {
None,
Expand Down
3 changes: 2 additions & 1 deletion lib/token.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "library.h"
#include "mathlib.h"
#include "settings.h"
#include "simplecpp.h"
#include "symboldatabase.h"
#include "tokenlist.h"
#include "utils.h"
Expand All @@ -48,6 +47,8 @@
#include <unordered_set>
#include <utility>

#include <simplecpp.h>

namespace {
struct less {
template<class T, class U>
Expand Down
1 change: 1 addition & 0 deletions lib/valueflow.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "errortypes.h"
#include "mathlib.h"

#include <cstdint>
#include <cstdlib>
#include <functional>
#include <list>
Expand Down
2 changes: 1 addition & 1 deletion oss-fuzz/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ $(libcppdir)/infer.o: ../lib/infer.cpp ../lib/calculate.h ../lib/config.h ../lib
$(libcppdir)/keywords.o: ../lib/keywords.cpp ../lib/config.h ../lib/keywords.h ../lib/standards.h ../lib/utils.h
$(CXX) ${LIB_FUZZING_ENGINE} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/keywords.cpp

$(libcppdir)/library.o: ../lib/library.cpp ../externals/tinyxml2/tinyxml2.h ../lib/addoninfo.h ../lib/astutils.h ../lib/checkers.h ../lib/config.h ../lib/errortypes.h ../lib/library.h ../lib/mathlib.h ../lib/path.h ../lib/platform.h ../lib/settings.h ../lib/smallvector.h ../lib/sourcelocation.h ../lib/standards.h ../lib/symboldatabase.h ../lib/templatesimplifier.h ../lib/token.h ../lib/tokenlist.h ../lib/utils.h ../lib/vfvalue.h ../lib/xml.h
$(libcppdir)/library.o: ../lib/library.cpp ../externals/tinyxml2/tinyxml2.h ../lib/astutils.h ../lib/config.h ../lib/errortypes.h ../lib/library.h ../lib/mathlib.h ../lib/path.h ../lib/smallvector.h ../lib/sourcelocation.h ../lib/standards.h ../lib/symboldatabase.h ../lib/templatesimplifier.h ../lib/token.h ../lib/tokenlist.h ../lib/utils.h ../lib/vfvalue.h ../lib/xml.h
$(CXX) ${LIB_FUZZING_ENGINE} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/library.cpp

$(libcppdir)/mathlib.o: ../lib/mathlib.cpp ../externals/simplecpp/simplecpp.h ../lib/config.h ../lib/errortypes.h ../lib/mathlib.h ../lib/templatesimplifier.h ../lib/token.h ../lib/utils.h ../lib/vfvalue.h
Expand Down
2 changes: 1 addition & 1 deletion test/seh/test-sehwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "config.h"
#include "config.h" // IWYU pragma: keep

#if defined(USE_WINDOWS_SEH)
#include "sehwrapper.h"
Expand Down
7 changes: 5 additions & 2 deletions test/testanalyzerinformation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@


#include "analyzerinfo.h"
#include "errorlogger.h"
#include "filesettings.h"
#include "fixture.h"
#include "xml.h"
#include "standards.h"

#include <list>
#include <sstream>
#include <tinyxml2.h>

#include "xml.h"

class TestAnalyzerInformation : public TestFixture, private AnalyzerInformation {
public:
Expand Down
1 change: 0 additions & 1 deletion test/testbufferoverrun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <cstddef>
#include <list>
#include <string>
#include <vector>

class TestBufferOverrun : public TestFixture {
public:
Expand Down
4 changes: 3 additions & 1 deletion test/testclangimport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

#include "clangimport.h"
#include "fixture.h"
#include "platform.h"
#include "settings.h"
#include "standards.h"
#include "symboldatabase.h"
#include "token.h"
#include "tokenize.h"
#include "fixture.h"
#include "tokenlist.h"

#include <cstdint>
#include <list>
Expand Down
3 changes: 2 additions & 1 deletion test/testcmdlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@
#include "config.h"
#include "errorlogger.h"
#include "errortypes.h"
#include "filesettings.h"
#include "fixture.h"
#include "helpers.h"
#include "path.h"
#include "platform.h"
#include "redirect.h"
#include "settings.h"
#include "standards.h"
#include "suppressions.h"
#include "fixture.h"
#include "timer.h"
#include "utils.h"

Expand Down
1 change: 0 additions & 1 deletion test/testcondition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <cstddef>
#include <limits>
#include <string>
#include <vector>

class TestCondition : public TestFixture {
public:
Expand Down
8 changes: 6 additions & 2 deletions test/testcppcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "addoninfo.h"
#include "color.h"
#include "cppcheck.h"
#include "errorlogger.h"
Expand All @@ -25,15 +26,18 @@
#include "path.h"
#include "preprocessor.h"
#include "settings.h"
#include "standards.h"
#include "suppressions.h"

#include "simplecpp.h"

#include <algorithm>
#include <cstddef>
#include <list>
#include <sstream>
#include <string>
#include <vector>

#include <simplecpp.h>

class TestCppcheck : public TestFixture {
public:
TestCppcheck() : TestFixture("TestCppcheck") {}
Expand Down
1 change: 1 addition & 0 deletions test/testexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "fixture.h"
#include "helpers.h"
#include "settings.h"
#include "standards.h"
#include "suppressions.h"

#include <list>
Expand Down
1 change: 1 addition & 0 deletions test/testimportproject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "importproject.h"
#include "redirect.h"
#include "settings.h"
#include "standards.h"
#include "suppressions.h"
#include "xml.h"

Expand Down
1 change: 0 additions & 1 deletion test/testincompletestatement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "fixture.h"

#include <string>
#include <vector>

class TestIncompleteStatement : public TestFixture {
public:
Expand Down
1 change: 0 additions & 1 deletion test/testleakautovar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

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

class TestLeakAutoVar : public TestFixture {
public:
Expand Down
1 change: 1 addition & 0 deletions test/testmathlib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "config.h"
#include "fixture.h"
#include "mathlib.h"
#include "standards.h"
#include "token.h"
#include "tokenlist.h"

Expand Down
2 changes: 1 addition & 1 deletion test/testnullpointer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
#include "helpers.h"
#include "library.h"
#include "settings.h"
#include "standards.h"
#include "token.h"

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

class TestNullPointer : public TestFixture {
public:
Expand Down
1 change: 0 additions & 1 deletion test/testoptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "options.h"
#include "utils.h"

#include <functional>
#include <set>
#include <string>

Expand Down
1 change: 0 additions & 1 deletion test/testother.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

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

class TestOther : public TestFixture {
public:
Expand Down
2 changes: 1 addition & 1 deletion test/testsimplifytemplate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "errortypes.h"
#include "fixture.h"
#include "helpers.h"
#include "path.h"
#include "settings.h"
#include "standards.h"
#include "templatesimplifier.h"
#include "token.h"
#include "tokenize.h"
Expand Down
1 change: 0 additions & 1 deletion test/testsizeof.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

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

class TestSizeof : public TestFixture {
public:
Expand Down
1 change: 0 additions & 1 deletion test/teststring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "fixture.h"

#include <string>
#include <vector>

class TestString : public TestFixture {
public:
Expand Down
1 change: 0 additions & 1 deletion test/testtype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

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

class TestType : public TestFixture {
public:
Expand Down
1 change: 0 additions & 1 deletion test/testunusedprivfunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "fixture.h"

#include <string>
#include <vector>

class TestUnusedPrivateFunction : public TestFixture {
public:
Expand Down
1 change: 0 additions & 1 deletion test/testvarid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

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

class TestVarID : public TestFixture {
public:
Expand Down
Loading