avoid dependency on transitive includes - based on include-what-you-use (#3757)
This commit is contained in:
parent
8764110562
commit
171da2e6f9
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include "check.h"
|
||||
#include "cppcheckexecutor.h"
|
||||
#include "errortypes.h"
|
||||
#include "filelister.h"
|
||||
#include "importproject.h"
|
||||
#include "path.h"
|
||||
|
@ -32,6 +33,7 @@
|
|||
#include "utils.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <climits>
|
||||
#include <cstdio>
|
||||
#include <cstdlib> // EXIT_FAILURE
|
||||
#include <cstring>
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "color.h"
|
||||
#include "config.h"
|
||||
#include "cppcheck.h"
|
||||
#include "errortypes.h"
|
||||
#include "filelister.h"
|
||||
#include "importproject.h"
|
||||
#include "library.h"
|
||||
|
@ -35,13 +36,17 @@
|
|||
#include "utils.h"
|
||||
#include "checkunusedfunctions.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
#include <csignal>
|
||||
#include <cstdio>
|
||||
#include <cstdlib> // EXIT_SUCCESS and EXIT_FAILURE
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -20,13 +20,16 @@
|
|||
#define CPPCHECKEXECUTOR_H
|
||||
|
||||
#include "color.h"
|
||||
#include "config.h"
|
||||
#include "errorlogger.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <ctime>
|
||||
#include <iosfwd>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class CppCheck;
|
||||
class Library;
|
||||
|
|
|
@ -59,8 +59,13 @@
|
|||
*/
|
||||
|
||||
|
||||
#include "errortypes.h"
|
||||
#include "cppcheckexecutor.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
#ifdef NDEBUG
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "config.h"
|
||||
#include "cppcheck.h"
|
||||
#include "cppcheckexecutor.h"
|
||||
#include "errortypes.h"
|
||||
#include "importproject.h"
|
||||
#include "settings.h"
|
||||
#include "suppressions.h"
|
||||
|
@ -30,6 +31,7 @@
|
|||
#include <cerrno>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
#include <utility>
|
||||
|
||||
|
|
|
@ -33,10 +33,15 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <initializer_list>
|
||||
#include <iterator>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <stack>
|
||||
#include <type_traits>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
template<class T, REQUIRES("T must be a Token class", std::is_convertible<T*, const Token*> )>
|
||||
|
|
|
@ -17,12 +17,25 @@
|
|||
*/
|
||||
|
||||
#include "bughuntingchecks.h"
|
||||
|
||||
#include "astutils.h"
|
||||
#include "errorlogger.h"
|
||||
#include "errortypes.h"
|
||||
#include "library.h"
|
||||
#include "mathlib.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
#include "utils.h"
|
||||
#include "valueflow.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
static const CWE CWE_BUFFER_UNDERRUN(786U); // Access of Memory Location Before Start of Buffer
|
||||
static const CWE CWE_BUFFER_OVERRUN(788U); // Access of Memory Location After End of Buffer
|
||||
|
|
|
@ -22,7 +22,9 @@
|
|||
|
||||
#include "errorlogger.h"
|
||||
#include "settings.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
#include "valueflow.h"
|
||||
|
||||
#include <cctype>
|
||||
#include <iostream>
|
||||
|
|
|
@ -22,11 +22,13 @@
|
|||
|
||||
#include "check64bit.h"
|
||||
|
||||
#include "errortypes.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "checkassert.h"
|
||||
|
||||
#include "errortypes.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
|
|
|
@ -28,10 +28,14 @@
|
|||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
#include "utils.h"
|
||||
#include "valueflow.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <list>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -34,6 +34,10 @@ class Tokenizer;
|
|||
class ErrorLogger;
|
||||
class Variable;
|
||||
|
||||
namespace ValueFlow {
|
||||
class Value;
|
||||
}
|
||||
|
||||
/// @addtogroup Checks
|
||||
/** @brief Various small checks for automatic variables */
|
||||
/// @{
|
||||
|
|
|
@ -21,12 +21,15 @@
|
|||
#include "checkbool.h"
|
||||
|
||||
#include "astutils.h"
|
||||
#include "errortypes.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
#include "valueflow.h"
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// Register this check class (by creating a static instance of it)
|
||||
|
|
|
@ -18,9 +18,12 @@
|
|||
|
||||
#include "checkboost.h"
|
||||
|
||||
#include "errortypes.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
// Register this check class (by creating a static instance of it)
|
||||
namespace {
|
||||
CheckBoost instance;
|
||||
|
|
|
@ -35,7 +35,9 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
#include <functional>
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
#include <numeric> // std::accumulate
|
||||
#include <sstream>
|
||||
#include <tinyxml2.h>
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "errortypes.h"
|
||||
#include "mathlib.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "utils.h"
|
||||
#include "valueflow.h"
|
||||
|
||||
#include <list>
|
||||
|
|
|
@ -26,15 +26,26 @@
|
|||
#include "symboldatabase.h"
|
||||
#include "errorlogger.h"
|
||||
#include "errortypes.h"
|
||||
#include "mathlib.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
#include "tokenlist.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include "tinyxml2.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <unordered_map>
|
||||
|
||||
#include <tinyxml2.h>
|
||||
|
||||
namespace CTU {
|
||||
class FileInfo;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// Register CheckClass..
|
||||
|
|
|
@ -23,9 +23,11 @@
|
|||
|
||||
#include "check.h"
|
||||
#include "config.h"
|
||||
#include "tokenize.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "tokenize.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
@ -36,6 +38,14 @@ class ErrorLogger;
|
|||
class Settings;
|
||||
class Token;
|
||||
|
||||
namespace CTU {
|
||||
class FileInfo;
|
||||
}
|
||||
|
||||
namespace tinyxml2 {
|
||||
class XMLElement;
|
||||
}
|
||||
|
||||
/// @addtogroup Checks
|
||||
/// @{
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include "checkcondition.h"
|
||||
|
||||
#include "astutils.h"
|
||||
#include "library.h"
|
||||
#include "platform.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
|
@ -34,8 +36,11 @@
|
|||
#include <algorithm>
|
||||
#include <limits>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
// CWE ids used
|
||||
static const struct CWE uncheckedErrorConditionCWE(391U);
|
||||
|
|
|
@ -37,6 +37,10 @@ class Tokenizer;
|
|||
class ErrorLogger;
|
||||
class ValueType;
|
||||
|
||||
namespace ValueFlow {
|
||||
class Value;
|
||||
}
|
||||
|
||||
/// @addtogroup Checks
|
||||
/// @{
|
||||
|
||||
|
|
|
@ -21,9 +21,12 @@
|
|||
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
|
||||
#include <list>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
#include "valueflow.h"
|
||||
|
||||
#include <iomanip>
|
||||
#include <ostream>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -24,9 +24,10 @@
|
|||
|
||||
#include "check.h"
|
||||
#include "config.h"
|
||||
#include "errortypes.h"
|
||||
#include "library.h"
|
||||
#include "settings.h"
|
||||
#include "errortypes.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
|
|
@ -28,11 +28,15 @@
|
|||
#include "utils.h"
|
||||
#include "valueflow.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <cstdlib>
|
||||
#include <functional>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -34,7 +34,9 @@
|
|||
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
class ErrorLogger;
|
||||
class Settings;
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
#include "utils.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "config.h"
|
||||
#include "errortypes.h"
|
||||
#include "tokenize.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "astutils.h"
|
||||
#include "errorlogger.h"
|
||||
#include "errortypes.h"
|
||||
#include "library.h"
|
||||
#include "mathlib.h"
|
||||
#include "settings.h"
|
||||
|
@ -31,7 +32,11 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// Register this check class (by creating a static instance of it)
|
||||
|
|
|
@ -36,6 +36,9 @@ class Settings;
|
|||
class Token;
|
||||
class Tokenizer;
|
||||
|
||||
namespace tinyxml2 {
|
||||
class XMLElement;
|
||||
}
|
||||
|
||||
/// @addtogroup Checks
|
||||
/// @{
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
//---------------------------------------------------------------------------
|
||||
#include "checkother.h"
|
||||
|
||||
#include "checkuninitvar.h" // CheckUninitVar::isVariableUsage
|
||||
|
||||
#include "astutils.h"
|
||||
#include "library.h"
|
||||
#include "mathlib.h"
|
||||
|
@ -33,11 +31,18 @@
|
|||
#include "utils.h"
|
||||
#include "valueflow.h"
|
||||
|
||||
#include "checkuninitvar.h" // CheckUninitVar::isVariableUsage
|
||||
|
||||
#include <algorithm> // find_if()
|
||||
#include <cctype>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
#include <set>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <cctype>
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// Register this check class (by creating a static instance of it)
|
||||
|
|
|
@ -23,10 +23,13 @@
|
|||
|
||||
#include "checkpostfixoperator.h"
|
||||
|
||||
#include "errortypes.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
|
|
@ -20,11 +20,15 @@
|
|||
//---------------------------------------------------------------------------
|
||||
#include "checksizeof.h"
|
||||
|
||||
#include "errortypes.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// Register this check class (by creating a static instance of it)
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include "astutils.h"
|
||||
#include "check.h"
|
||||
#include "checknullpointer.h"
|
||||
#include "errortypes.h"
|
||||
#include "library.h"
|
||||
#include "mathlib.h"
|
||||
|
@ -33,14 +32,21 @@
|
|||
#include "utils.h"
|
||||
#include "valueflow.h"
|
||||
|
||||
#include "checknullpointer.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <iterator>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
// Register this check class (by creating a static instance of it)
|
||||
namespace {
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "checkstring.h"
|
||||
|
||||
#include "astutils.h"
|
||||
#include "errortypes.h"
|
||||
#include "mathlib.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
|
|
|
@ -20,15 +20,20 @@
|
|||
//---------------------------------------------------------------------------
|
||||
#include "checktype.h"
|
||||
|
||||
#include "errortypes.h"
|
||||
#include "mathlib.h"
|
||||
#include "platform.h"
|
||||
#include "settings.h"
|
||||
#include "standards.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <list>
|
||||
#include <ostream>
|
||||
#include <vector>
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// Register this check class (by creating a static instance of it)
|
||||
|
|
|
@ -26,10 +26,14 @@
|
|||
#include "config.h"
|
||||
#include "valueflow.h"
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
||||
class ErrorLogger;
|
||||
class Settings;
|
||||
class Token;
|
||||
class Tokenizer;
|
||||
class ValueType;
|
||||
|
||||
/// @addtogroup Checks
|
||||
/// @{
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "checkuninitvar.h"
|
||||
|
||||
#include "astutils.h"
|
||||
#include "checknullpointer.h" // CheckNullPointer::isPointerDeref
|
||||
#include "errorlogger.h"
|
||||
#include "library.h"
|
||||
#include "mathlib.h"
|
||||
|
@ -31,10 +30,17 @@
|
|||
#include "tokenize.h"
|
||||
#include "valueflow.h"
|
||||
|
||||
#include "checknullpointer.h" // CheckNullPointer::isPointerDeref
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <functional>
|
||||
#include <initializer_list>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace tinyxml2 {
|
||||
|
|
|
@ -28,7 +28,10 @@
|
|||
#include "mathlib.h"
|
||||
#include "errortypes.h"
|
||||
#include "utils.h"
|
||||
#include "valueflow.h"
|
||||
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
|
@ -40,6 +43,10 @@ class ErrorLogger;
|
|||
class Settings;
|
||||
class Library;
|
||||
|
||||
namespace tinyxml2 {
|
||||
class XMLElement;
|
||||
}
|
||||
|
||||
|
||||
struct VariableValue {
|
||||
explicit VariableValue(MathLib::bigint val = 0) : value(val), notEqual(false) {}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "astutils.h"
|
||||
#include "errorlogger.h"
|
||||
#include "errortypes.h"
|
||||
#include "library.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
|
@ -29,11 +30,22 @@
|
|||
#include "tokenize.h"
|
||||
#include "tokenlist.h"
|
||||
|
||||
#include <tinyxml2.h>
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <istream>
|
||||
#include <memory>
|
||||
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <tinyxml2.h>
|
||||
|
||||
namespace CTU {
|
||||
class FileInfo;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
|
|
@ -35,6 +35,10 @@ class Function;
|
|||
class Settings;
|
||||
class Tokenizer;
|
||||
|
||||
namespace CTU {
|
||||
class FileInfo;
|
||||
}
|
||||
|
||||
/// @addtogroup Checks
|
||||
/** @brief Check for functions never called */
|
||||
/// @{
|
||||
|
|
|
@ -21,14 +21,19 @@
|
|||
#include "checkunusedvar.h"
|
||||
|
||||
#include "astutils.h"
|
||||
#include "errortypes.h"
|
||||
#include "library.h"
|
||||
#include "preprocessor.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
#include "tokenlist.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "check.h"
|
||||
#include "config.h"
|
||||
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "checkvaarg.h"
|
||||
|
||||
#include "astutils.h"
|
||||
#include "errortypes.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
|
@ -26,6 +27,7 @@
|
|||
|
||||
#include <cstddef>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -17,18 +17,30 @@
|
|||
*/
|
||||
|
||||
#include "clangimport.h"
|
||||
|
||||
#include "errortypes.h"
|
||||
#include "mathlib.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
#include "tokenlist.h"
|
||||
#include "utils.h"
|
||||
#include "valueflow.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <stack>
|
||||
#include <vector>
|
||||
#include <cctype>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <stack>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
static const std::string AccessSpecDecl = "AccessSpecDecl";
|
||||
static const std::string ArraySubscriptExpr = "ArraySubscriptExpr";
|
||||
|
|
|
@ -17,9 +17,11 @@
|
|||
*/
|
||||
|
||||
#include "color.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <cstddef>
|
||||
#include <sstream>
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -22,33 +22,45 @@
|
|||
#include "clangimport.h"
|
||||
#include "color.h"
|
||||
#include "ctu.h"
|
||||
#include "errortypes.h"
|
||||
#include "exprengine.h"
|
||||
#include "library.h"
|
||||
#include "mathlib.h"
|
||||
#include "path.h"
|
||||
#include "platform.h"
|
||||
#include "preprocessor.h" // Preprocessor
|
||||
#include "standards.h"
|
||||
#include "suppressions.h"
|
||||
#include "timer.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h" // Tokenizer
|
||||
#include "tokenlist.h"
|
||||
#include "utils.h"
|
||||
#include "valueflow.h"
|
||||
#include "version.h"
|
||||
|
||||
#include "exprengine.h"
|
||||
#include <string>
|
||||
|
||||
#define PICOJSON_USE_INT64
|
||||
#include <picojson.h>
|
||||
#include <simplecpp.h>
|
||||
#include <tinyxml2.h>
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <cctype>
|
||||
#include <cstdlib>
|
||||
#include <exception>
|
||||
#include <iostream> // <- TEMPORARY
|
||||
#include <memory>
|
||||
#include <new>
|
||||
#include <set>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <iostream> // <- TEMPORARY
|
||||
#include <cstdio>
|
||||
|
||||
#define PICOJSON_USE_INT64
|
||||
#include <picojson.h>
|
||||
|
||||
#include <simplecpp.h>
|
||||
|
||||
#include <tinyxml2.h>
|
||||
|
||||
#ifdef HAVE_RULES
|
||||
#ifdef _WIN32
|
||||
|
@ -57,6 +69,8 @@
|
|||
#include <pcre.h>
|
||||
#endif
|
||||
|
||||
class SymbolDatabase;
|
||||
|
||||
static const char Version[] = CPPCHECK_VERSION_STRING;
|
||||
static const char ExtraVersion[] = "";
|
||||
|
||||
|
|
|
@ -29,11 +29,13 @@
|
|||
#include "importproject.h"
|
||||
#include "settings.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <istream>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class Tokenizer;
|
||||
|
||||
|
|
11
lib/ctu.cpp
11
lib/ctu.cpp
|
@ -19,13 +19,22 @@
|
|||
|
||||
//---------------------------------------------------------------------------
|
||||
#include "ctu.h"
|
||||
|
||||
#include "astutils.h"
|
||||
#include "errortypes.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
#include "tokenlist.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iterator> // back_inserter
|
||||
#include <ostream>
|
||||
#include <utility>
|
||||
|
||||
#include <tinyxml2.h>
|
||||
#include <iterator> // back_inserter
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static const char ATTR_CALL_ID[] = "call-id";
|
||||
|
|
14
lib/ctu.h
14
lib/ctu.h
|
@ -22,13 +22,27 @@
|
|||
#define ctuH
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#include "config.h"
|
||||
#include "check.h"
|
||||
#include "errorlogger.h"
|
||||
#include "mathlib.h"
|
||||
#include "utils.h"
|
||||
#include "valueflow.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class Function;
|
||||
class Settings;
|
||||
class Token;
|
||||
class Tokenizer;
|
||||
|
||||
namespace tinyxml2 {
|
||||
class XMLElement;
|
||||
}
|
||||
|
||||
/// @addtogroup Core
|
||||
/// @{
|
||||
|
|
|
@ -24,16 +24,18 @@
|
|||
#include "path.h"
|
||||
#include "token.h"
|
||||
#include "tokenlist.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <string>
|
||||
#include <tinyxml2.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cassert>
|
||||
#include <cctype>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <tinyxml2.h>
|
||||
|
||||
InternalError::InternalError(const Token *tok, const std::string &errorMsg, Type type) :
|
||||
token(tok), errorMessage(errorMsg), type(type)
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "suppressions.h"
|
||||
#include "color.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <fstream>
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/// @addtogroup Core
|
||||
/// @{
|
||||
|
|
|
@ -134,15 +134,28 @@
|
|||
#include "astutils.h"
|
||||
#include "bughuntingchecks.h"
|
||||
#include "errorlogger.h"
|
||||
#include "library.h"
|
||||
#include "mathlib.h"
|
||||
#include "platform.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
#include "tokenlist.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <cctype>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <climits>
|
||||
#include <cstdint>
|
||||
#include <ctime>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <tuple>
|
||||
|
||||
#ifdef USE_Z3
|
||||
#include <z3++.h>
|
||||
#include <z3_version.h>
|
||||
|
|
|
@ -24,11 +24,14 @@
|
|||
#include "config.h"
|
||||
#include "errortypes.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <iosfwd>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
|
||||
class ErrorLogger;
|
||||
class Tokenizer;
|
||||
|
|
|
@ -17,8 +17,12 @@
|
|||
*/
|
||||
|
||||
#include "forwardanalyzer.h"
|
||||
|
||||
#include "analyzer.h"
|
||||
#include "astutils.h"
|
||||
#include "config.h"
|
||||
#include "errortypes.h"
|
||||
#include "mathlib.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
|
@ -27,8 +31,13 @@
|
|||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <functional>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
struct OnExit {
|
||||
std::function<void()> f;
|
||||
|
|
|
@ -20,18 +20,25 @@
|
|||
|
||||
#include "path.h"
|
||||
#include "settings.h"
|
||||
#include "standards.h"
|
||||
#include "suppressions.h"
|
||||
#include "tinyxml2.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
#include "utils.h"
|
||||
#define PICOJSON_USE_INT64
|
||||
#include <picojson.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <tinyxml2.h>
|
||||
|
||||
#define PICOJSON_USE_INT64
|
||||
#include <picojson.h>
|
||||
|
||||
ImportProject::ImportProject()
|
||||
{
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "platform.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <iosfwd>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
|
|
@ -17,10 +17,19 @@
|
|||
*/
|
||||
|
||||
#include "infer.h"
|
||||
|
||||
#include "calculate.h"
|
||||
#include "errortypes.h"
|
||||
#include "valueptr.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <iterator>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
|
||||
class Token;
|
||||
|
||||
template<class Predicate, class Compare>
|
||||
static const ValueFlow::Value* getCompareValue(const std::list<ValueFlow::Value>& values, Predicate pred, Compare compare)
|
||||
|
|
|
@ -19,12 +19,16 @@
|
|||
#ifndef inferH
|
||||
#define inferH
|
||||
|
||||
#include "config.h"
|
||||
#include "mathlib.h"
|
||||
#include "valueflow.h"
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct Interval;
|
||||
template<class T>
|
||||
class ValuePtr;
|
||||
template<class T> class ValuePtr;
|
||||
|
||||
struct InferModel {
|
||||
virtual bool match(const ValueFlow::Value& value) const = 0;
|
||||
|
|
|
@ -22,17 +22,22 @@
|
|||
#include "mathlib.h"
|
||||
#include "path.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "tinyxml2.h"
|
||||
#include "token.h"
|
||||
#include "tokenlist.h"
|
||||
#include "utils.h"
|
||||
#include "valueflow.h"
|
||||
|
||||
#include <cctype>
|
||||
#include <climits>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <iosfwd>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <tinyxml2.h>
|
||||
|
||||
static std::vector<std::string> getnames(const char *names)
|
||||
{
|
||||
std::vector<std::string> ret;
|
||||
|
|
|
@ -21,15 +21,16 @@
|
|||
#include "errortypes.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <simplecpp.h>
|
||||
|
||||
#include <cctype>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <exception>
|
||||
#include <limits>
|
||||
#include <locale>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <simplecpp.h>
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 1700 // VS2012 doesn't have std::isinf and std::isnan
|
||||
#define ISINF(x) (!_finite(x))
|
||||
#define ISNAN(x) (_isnan(x))
|
||||
|
|
|
@ -17,11 +17,16 @@
|
|||
*/
|
||||
|
||||
#include "pathanalysis.h"
|
||||
|
||||
#include "astutils.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
#include "valueflow.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
const Scope* PathAnalysis::findOuterScope(const Scope * scope)
|
||||
{
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
#include "errortypes.h"
|
||||
|
||||
#include <functional>
|
||||
#include <list>
|
||||
#include <utility>
|
||||
|
||||
class Library;
|
||||
class Scope;
|
||||
|
|
|
@ -17,13 +17,17 @@
|
|||
*/
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
#include "path.h"
|
||||
#include "tinyxml2.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
|
||||
#include <tinyxml2.h>
|
||||
|
||||
cppcheck::Platform::Platform()
|
||||
{
|
||||
// This assumes the code you are checking is for the same architecture this is compiled on.
|
||||
|
|
|
@ -20,17 +20,22 @@
|
|||
#include "preprocessor.h"
|
||||
|
||||
#include "errorlogger.h"
|
||||
#include "errortypes.h"
|
||||
#include "library.h"
|
||||
#include "path.h"
|
||||
#include "settings.h"
|
||||
#include "simplecpp.h"
|
||||
#include "standards.h"
|
||||
#include "suppressions.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <iterator> // back_inserter
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <simplecpp.h>
|
||||
|
||||
static bool sameline(const simplecpp::Token *tok1, const simplecpp::Token *tok2)
|
||||
{
|
||||
return tok1 && tok2 && tok1->location.sameline(tok2->location);
|
||||
|
|
|
@ -17,19 +17,27 @@
|
|||
*/
|
||||
|
||||
#include "programmemory.h"
|
||||
|
||||
#include "astutils.h"
|
||||
#include "calculate.h"
|
||||
#include "infer.h"
|
||||
#include "library.h"
|
||||
#include "mathlib.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
#include "valueflow.h"
|
||||
#include "valueptr.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <functional>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
void ProgramMemory::setValue(nonneg int exprid, const ValueFlow::Value& value)
|
||||
{
|
||||
|
|
|
@ -17,16 +17,23 @@
|
|||
*/
|
||||
|
||||
#include "reverseanalyzer.h"
|
||||
|
||||
#include "analyzer.h"
|
||||
#include "astutils.h"
|
||||
#include "errortypes.h"
|
||||
#include "forwardanalyzer.h"
|
||||
#include "mathlib.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
#include "valueptr.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
struct ReverseTraversal {
|
||||
ReverseTraversal(const ValuePtr<Analyzer>& analyzer, const Settings* settings)
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
//---------------------------------------------------------------------------
|
||||
|
||||
#include "config.h"
|
||||
#include "errortypes.h"
|
||||
#include "importproject.h"
|
||||
#include "library.h"
|
||||
#include "platform.h"
|
||||
|
@ -31,7 +32,9 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
|
|
@ -21,7 +21,9 @@
|
|||
#include "analyzerinfo.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
#include "tokenlist.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <fstream>
|
||||
|
|
|
@ -23,12 +23,14 @@
|
|||
#include "path.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <tinyxml2.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cctype> // std::isdigit, std::isalnum, etc
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <functional> // std::bind, std::placeholders
|
||||
|
||||
#include <tinyxml2.h>
|
||||
|
||||
static bool isAcceptedErrorIdChar(char c)
|
||||
{
|
||||
switch (c) {
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "config.h"
|
||||
#include "errortypes.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <istream>
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
|
|
@ -21,10 +21,13 @@
|
|||
|
||||
#include "astutils.h"
|
||||
#include "errorlogger.h"
|
||||
#include "errortypes.h"
|
||||
#include "library.h"
|
||||
#include "mathlib.h"
|
||||
#include "platform.h"
|
||||
#include "settings.h"
|
||||
#include "standards.h"
|
||||
#include "templatesimplifier.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
#include "tokenlist.h"
|
||||
|
@ -37,8 +40,10 @@
|
|||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
#include <stack>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
SymbolDatabase::SymbolDatabase(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
|
|
|
@ -28,10 +28,13 @@
|
|||
#include "utils.h"
|
||||
|
||||
#include <cctype>
|
||||
#include <iosfwd>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -19,8 +19,10 @@
|
|||
#include "templatesimplifier.h"
|
||||
|
||||
#include "errorlogger.h"
|
||||
#include "errortypes.h"
|
||||
#include "mathlib.h"
|
||||
#include "settings.h"
|
||||
#include "standards.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
#include "tokenlist.h"
|
||||
|
@ -29,7 +31,9 @@
|
|||
#include <cassert>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <stack>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
static Token *skipRequires(Token *tok)
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "token.h"
|
||||
|
||||
#include "astutils.h"
|
||||
#include "errortypes.h"
|
||||
#include "library.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
|
@ -30,12 +31,17 @@
|
|||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cctype>
|
||||
#include <climits>
|
||||
#include <cstdio>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <stack>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
|
||||
const std::list<ValueFlow::Value> TokenImpl::mEmptyValueList;
|
||||
|
|
|
@ -27,12 +27,15 @@
|
|||
#include "templatesimplifier.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
class Enumerator;
|
||||
|
@ -43,8 +46,8 @@ class Type;
|
|||
class ValueType;
|
||||
class Variable;
|
||||
class TokenList;
|
||||
|
||||
class ConstTokenRange;
|
||||
class Token;
|
||||
|
||||
/**
|
||||
* @brief This struct stores pointers to the front and back tokens of the list this token is in.
|
||||
|
|
|
@ -38,13 +38,23 @@
|
|||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cctype>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <exception>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <stack>
|
||||
#include <stdexcept>
|
||||
#include <type_traits>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <simplecpp.h>
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -24,11 +24,15 @@
|
|||
#include "config.h"
|
||||
#include "errortypes.h"
|
||||
#include "tokenlist.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <iosfwd>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <stack>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
class Settings;
|
||||
class SymbolDatabase;
|
||||
|
|
|
@ -21,19 +21,24 @@
|
|||
|
||||
#include "astutils.h"
|
||||
#include "errorlogger.h"
|
||||
#include "errortypes.h"
|
||||
#include "library.h"
|
||||
#include "path.h"
|
||||
#include "settings.h"
|
||||
#include "standards.h"
|
||||
#include "token.h"
|
||||
|
||||
#include <exception>
|
||||
#include <simplecpp.h>
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
#include <exception>
|
||||
#include <functional>
|
||||
#include <utility>
|
||||
#include <set>
|
||||
#include <stack>
|
||||
|
||||
#include <simplecpp.h>
|
||||
|
||||
// How many compileExpression recursions are allowed?
|
||||
// For practical code this could be endless. But in some special torture test
|
||||
// there needs to be a limit.
|
||||
|
|
|
@ -23,7 +23,9 @@
|
|||
|
||||
#include "config.h"
|
||||
#include "token.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <iosfwd>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
|
|
@ -18,9 +18,11 @@
|
|||
|
||||
#include "utils.h"
|
||||
|
||||
#include <utility>
|
||||
#include <stack>
|
||||
#include <cctype>
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
#include <stack>
|
||||
#include <utility>
|
||||
|
||||
|
||||
int caseInsensitiveStringCompare(const std::string &lhs, const std::string &rhs)
|
||||
|
|
|
@ -103,12 +103,17 @@
|
|||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cassert>
|
||||
#include <climits>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <exception>
|
||||
#include <functional>
|
||||
#include <initializer_list>
|
||||
#include <iosfwd>
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <stack>
|
||||
#include <string>
|
||||
|
|
|
@ -25,7 +25,9 @@
|
|||
#include "mathlib.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
#include <functional>
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
|
|
@ -18,10 +18,13 @@
|
|||
|
||||
|
||||
#include "check64bit.h"
|
||||
#include "config.h"
|
||||
#include "errortypes.h"
|
||||
#include "settings.h"
|
||||
#include "testsuite.h"
|
||||
#include "tokenize.h"
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
class Test64BitPortability : public TestFixture {
|
||||
public:
|
||||
|
|
|
@ -18,10 +18,14 @@
|
|||
|
||||
|
||||
#include "checkassert.h"
|
||||
#include "config.h"
|
||||
#include "errortypes.h"
|
||||
#include "settings.h"
|
||||
#include "testsuite.h"
|
||||
#include "tokenize.h"
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
|
||||
class TestAssert : public TestFixture {
|
||||
public:
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
|
||||
#include "astutils.h"
|
||||
#include "config.h"
|
||||
#include "library.h"
|
||||
#include "settings.h"
|
||||
#include "testsuite.h"
|
||||
#include "token.h"
|
||||
|
@ -25,6 +27,7 @@
|
|||
#include "tokenlist.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <iosfwd>
|
||||
|
||||
class TestAstUtils : public TestFixture {
|
||||
public:
|
||||
|
|
|
@ -18,10 +18,13 @@
|
|||
|
||||
|
||||
#include "checkautovariables.h"
|
||||
#include "config.h"
|
||||
#include "errortypes.h"
|
||||
#include "settings.h"
|
||||
#include "testsuite.h"
|
||||
#include "tokenize.h"
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
class TestAutoVariables : public TestFixture {
|
||||
public:
|
||||
|
|
|
@ -18,10 +18,13 @@
|
|||
|
||||
|
||||
#include "checkbool.h"
|
||||
#include "config.h"
|
||||
#include "errortypes.h"
|
||||
#include "settings.h"
|
||||
#include "testsuite.h"
|
||||
#include "tokenize.h"
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
class TestBool : public TestFixture {
|
||||
public:
|
||||
|
|
|
@ -18,10 +18,13 @@
|
|||
|
||||
|
||||
#include "checkboost.h"
|
||||
#include "config.h"
|
||||
#include "errortypes.h"
|
||||
#include "settings.h"
|
||||
#include "testsuite.h"
|
||||
#include "tokenize.h"
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
class TestBoost : public TestFixture {
|
||||
public:
|
||||
|
|
|
@ -21,15 +21,23 @@
|
|||
#include "checkbufferoverrun.h"
|
||||
#include "config.h"
|
||||
#include "ctu.h"
|
||||
#include "errortypes.h"
|
||||
#include "standards.h"
|
||||
#include "library.h"
|
||||
#include "preprocessor.h"
|
||||
#include "settings.h"
|
||||
#include "testsuite.h"
|
||||
#include "tokenize.h"
|
||||
|
||||
#include <iosfwd>
|
||||
#include <map>
|
||||
#include <list>
|
||||
#include <simplecpp.h>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <simplecpp.h>
|
||||
|
||||
#include <tinyxml2.h>
|
||||
|
||||
class TestBufferOverrun : public TestFixture {
|
||||
|
|
|
@ -17,11 +17,16 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "errortypes.h"
|
||||
#include "exprengine.h"
|
||||
#include "library.h"
|
||||
#include "platform.h"
|
||||
#include "settings.h"
|
||||
#include "tokenize.h"
|
||||
#include "testsuite.h"
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
class TestBughuntingChecks : public TestFixture {
|
||||
public:
|
||||
TestBughuntingChecks() : TestFixture("TestBughuntingChecks") {
|
||||
|
|
|
@ -18,11 +18,14 @@
|
|||
|
||||
|
||||
#include "checkother.h"
|
||||
#include "config.h"
|
||||
#include "errortypes.h"
|
||||
#include "platform.h"
|
||||
#include "settings.h"
|
||||
#include "testsuite.h"
|
||||
#include "tokenize.h"
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
class TestCharVar : public TestFixture {
|
||||
public:
|
||||
|
|
|
@ -15,11 +15,21 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "clangimport.h"
|
||||
#include "config.h"
|
||||
#include "platform.h"
|
||||
#include "settings.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
#include "tokenize.h"
|
||||
#include "testsuite.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <iosfwd>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
class TestClangImport : public TestFixture {
|
||||
public:
|
||||
|
|
|
@ -16,14 +16,22 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <tinyxml2.h>
|
||||
|
||||
#include "check.h"
|
||||
#include "checkclass.h"
|
||||
#include "config.h"
|
||||
#include "errortypes.h"
|
||||
#include "library.h"
|
||||
#include "settings.h"
|
||||
#include "testsuite.h"
|
||||
#include "tokenize.h"
|
||||
|
||||
#include <iosfwd>
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <tinyxml2.h>
|
||||
|
||||
|
||||
class TestClass : public TestFixture {
|
||||
public:
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
*/
|
||||
|
||||
#include "cmdlineparser.h"
|
||||
#include "config.h"
|
||||
#include "errortypes.h"
|
||||
#include "platform.h"
|
||||
#include "redirect.h"
|
||||
#include "settings.h"
|
||||
|
|
|
@ -17,17 +17,25 @@
|
|||
*/
|
||||
|
||||
#include "checkcondition.h"
|
||||
#include "config.h"
|
||||
#include "errortypes.h"
|
||||
#include "library.h"
|
||||
#include "platform.h"
|
||||
#include "preprocessor.h"
|
||||
#include "settings.h"
|
||||
#include "testsuite.h"
|
||||
#include "tokenize.h"
|
||||
|
||||
#include <simplecpp.h>
|
||||
#include <tinyxml2.h>
|
||||
#include <iosfwd>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <simplecpp.h>
|
||||
|
||||
#include <tinyxml2.h>
|
||||
|
||||
class TestCondition : public TestFixture {
|
||||
public:
|
||||
TestCondition() : TestFixture("TestCondition") {}
|
||||
|
|
|
@ -18,10 +18,17 @@
|
|||
|
||||
|
||||
#include "checkclass.h"
|
||||
#include "config.h"
|
||||
#include "errortypes.h"
|
||||
#include "standards.h"
|
||||
#include "settings.h"
|
||||
#include "testsuite.h"
|
||||
#include "tokenize.h"
|
||||
|
||||
#include <iosfwd>
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
||||
|
||||
class TestConstructors : public TestFixture {
|
||||
public:
|
||||
|
|
|
@ -18,11 +18,13 @@
|
|||
|
||||
#include "check.h"
|
||||
#include "color.h"
|
||||
#include "config.h"
|
||||
#include "cppcheck.h"
|
||||
#include "errorlogger.h"
|
||||
#include "testsuite.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
||||
|
|
|
@ -19,13 +19,16 @@
|
|||
#include "config.h"
|
||||
#include "cppcheck.h"
|
||||
#include "errorlogger.h"
|
||||
#include "errortypes.h"
|
||||
#include "suppressions.h"
|
||||
#include "testsuite.h"
|
||||
|
||||
#include <tinyxml2.h>
|
||||
#include <iosfwd>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <tinyxml2.h>
|
||||
|
||||
class TestErrorLogger : public TestFixture {
|
||||
public:
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue