Cleaned up includes and forward declarations in checkers:
- Removed definitely unnecessary forward declarations (e.g. "class Token"; token.h is already included by check.h, so a definition is unnecessary) - Removed unused includes
This commit is contained in:
parent
00e28de3b7
commit
8f79dc3ff8
|
@ -22,9 +22,7 @@
|
||||||
|
|
||||||
#include "checkautovariables.h"
|
#include "checkautovariables.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
#include "checkuninitvar.h"
|
|
||||||
|
|
||||||
#include <list>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "token.h"
|
|
||||||
|
|
||||||
/// @addtogroup Checks
|
/// @addtogroup Checks
|
||||||
/** @brief Various small checks for automatic variables */
|
/** @brief Various small checks for automatic variables */
|
||||||
|
|
|
@ -24,9 +24,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "settings.h"
|
|
||||||
|
|
||||||
class Token;
|
|
||||||
class Function;
|
class Function;
|
||||||
class Variable;
|
class Variable;
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include "checkbufferoverrun.h"
|
#include "checkbufferoverrun.h"
|
||||||
|
|
||||||
#include "tokenize.h"
|
#include "tokenize.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
|
|
||||||
|
|
|
@ -24,15 +24,11 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "settings.h"
|
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class ErrorLogger;
|
|
||||||
class Token;
|
|
||||||
class Tokenizer;
|
|
||||||
class Variable;
|
class Variable;
|
||||||
|
|
||||||
/// @addtogroup Checks
|
/// @addtogroup Checks
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
|
||||||
class Token;
|
|
||||||
class Scope;
|
class Scope;
|
||||||
class Function;
|
class Function;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#include "checkexceptionsafety.h"
|
#include "checkexceptionsafety.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
#include "token.h"
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,6 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "settings.h"
|
|
||||||
|
|
||||||
class Token;
|
|
||||||
|
|
||||||
/// @addtogroup Checks
|
/// @addtogroup Checks
|
||||||
/// @{
|
/// @{
|
||||||
|
|
|
@ -25,8 +25,6 @@
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
class Token;
|
|
||||||
|
|
||||||
/// @addtogroup Checks
|
/// @addtogroup Checks
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
#include "checkio.h"
|
#include "checkio.h"
|
||||||
|
|
||||||
#include "tokenize.h"
|
#include "tokenize.h"
|
||||||
#include "token.h"
|
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
|
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "symboldatabase.h"
|
|
||||||
|
|
||||||
/// @addtogroup Checks
|
/// @addtogroup Checks
|
||||||
/// @{
|
/// @{
|
||||||
|
|
|
@ -26,11 +26,8 @@
|
||||||
#include "checkother.h" // <- doubleFreeError
|
#include "checkother.h" // <- doubleFreeError
|
||||||
|
|
||||||
#include "tokenize.h"
|
#include "tokenize.h"
|
||||||
#include "errorlogger.h"
|
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
|
|
||||||
#include <fstream>
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
const int DEALLOC = -1;
|
const int DEALLOC = -1;
|
||||||
|
|
|
@ -25,6 +25,9 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
#include <set>
|
||||||
|
|
||||||
|
|
||||||
class CPPCHECKLIB VarInfo {
|
class CPPCHECKLIB VarInfo {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class Token;
|
|
||||||
class Scope;
|
class Scope;
|
||||||
class Function;
|
class Function;
|
||||||
class Variable;
|
class Variable;
|
||||||
|
|
|
@ -24,10 +24,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "settings.h"
|
|
||||||
|
|
||||||
class Token;
|
|
||||||
class SymbolDatabase;
|
|
||||||
|
|
||||||
/// @addtogroup Checks
|
/// @addtogroup Checks
|
||||||
/// @{
|
/// @{
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#include "checkother.h"
|
#include "checkother.h"
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "symboldatabase.h"
|
#include "symboldatabase.h"
|
||||||
#include "templatesimplifier.h"
|
|
||||||
|
|
||||||
#include <cmath> // fabs()
|
#include <cmath> // fabs()
|
||||||
#include <stack>
|
#include <stack>
|
||||||
|
|
|
@ -24,9 +24,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "settings.h"
|
|
||||||
|
|
||||||
class Token;
|
|
||||||
class Function;
|
class Function;
|
||||||
class Variable;
|
class Variable;
|
||||||
|
|
||||||
|
|
|
@ -309,7 +309,7 @@ void CheckSizeof::sizeofVoid()
|
||||||
if (isMember) {
|
if (isMember) {
|
||||||
// Get 'struct.member' complete name (without spaces)
|
// Get 'struct.member' complete name (without spaces)
|
||||||
varname = tok2->stringifyList(tok->next());
|
varname = tok2->stringifyList(tok->next());
|
||||||
varname.erase(remove_if(varname.begin(), varname.end(),
|
varname.erase(std::remove_if(varname.begin(), varname.end(),
|
||||||
static_cast<int (*)(int)>(std::isspace)), varname.end());
|
static_cast<int (*)(int)>(std::isspace)), varname.end());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,9 +24,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "settings.h"
|
|
||||||
|
|
||||||
class Token;
|
|
||||||
class Function;
|
class Function;
|
||||||
class Variable;
|
class Variable;
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
|
||||||
class Token;
|
|
||||||
|
|
||||||
/// @addtogroup Checks
|
/// @addtogroup Checks
|
||||||
/// @{
|
/// @{
|
||||||
|
|
|
@ -24,9 +24,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "settings.h"
|
|
||||||
|
|
||||||
class Token;
|
|
||||||
class Scope;
|
class Scope;
|
||||||
class Variable;
|
class Variable;
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,6 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "tokenize.h"
|
|
||||||
#include "errorlogger.h"
|
|
||||||
|
|
||||||
/// @addtogroup Checks
|
/// @addtogroup Checks
|
||||||
/** @brief Check for functions never called */
|
/** @brief Check for functions never called */
|
||||||
|
|
|
@ -21,14 +21,12 @@
|
||||||
#define checkunusedvarH
|
#define checkunusedvarH
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#include <map>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "settings.h"
|
|
||||||
|
#include <map>
|
||||||
|
|
||||||
class Type;
|
class Type;
|
||||||
class Token;
|
|
||||||
class Scope;
|
class Scope;
|
||||||
class Variables;
|
class Variables;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue