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 "symboldatabase.h"
|
||||
#include "checkuninitvar.h"
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include "config.h"
|
||||
#include "check.h"
|
||||
#include "token.h"
|
||||
|
||||
/// @addtogroup Checks
|
||||
/** @brief Various small checks for automatic variables */
|
||||
|
|
|
@ -24,9 +24,7 @@
|
|||
|
||||
#include "config.h"
|
||||
#include "check.h"
|
||||
#include "settings.h"
|
||||
|
||||
class Token;
|
||||
class Function;
|
||||
class Variable;
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "checkbufferoverrun.h"
|
||||
|
||||
#include "tokenize.h"
|
||||
#include "errorlogger.h"
|
||||
#include "mathlib.h"
|
||||
#include "symboldatabase.h"
|
||||
|
||||
|
|
|
@ -24,15 +24,11 @@
|
|||
|
||||
#include "config.h"
|
||||
#include "check.h"
|
||||
#include "settings.h"
|
||||
#include "mathlib.h"
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
class ErrorLogger;
|
||||
class Token;
|
||||
class Tokenizer;
|
||||
class Variable;
|
||||
|
||||
/// @addtogroup Checks
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include "config.h"
|
||||
#include "check.h"
|
||||
|
||||
class Token;
|
||||
class Scope;
|
||||
class Function;
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
//---------------------------------------------------------------------------
|
||||
#include "checkexceptionsafety.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "token.h"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
|
||||
#include "config.h"
|
||||
#include "check.h"
|
||||
#include "settings.h"
|
||||
|
||||
class Token;
|
||||
|
||||
/// @addtogroup Checks
|
||||
/// @{
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
#include "check.h"
|
||||
#include "config.h"
|
||||
|
||||
class Token;
|
||||
|
||||
/// @addtogroup Checks
|
||||
/// @{
|
||||
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
#include "checkio.h"
|
||||
|
||||
#include "tokenize.h"
|
||||
#include "token.h"
|
||||
#include "errorlogger.h"
|
||||
#include "symboldatabase.h"
|
||||
|
||||
#include <cctype>
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
#include "check.h"
|
||||
#include "config.h"
|
||||
#include "symboldatabase.h"
|
||||
|
||||
/// @addtogroup Checks
|
||||
/// @{
|
||||
|
|
|
@ -26,11 +26,8 @@
|
|||
#include "checkother.h" // <- doubleFreeError
|
||||
|
||||
#include "tokenize.h"
|
||||
#include "errorlogger.h"
|
||||
#include "symboldatabase.h"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
const int DEALLOC = -1;
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
#include "config.h"
|
||||
#include "check.h"
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
||||
|
||||
class CPPCHECKLIB VarInfo {
|
||||
public:
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include <list>
|
||||
#include <string>
|
||||
|
||||
class Token;
|
||||
class Scope;
|
||||
class Function;
|
||||
class Variable;
|
||||
|
|
|
@ -24,10 +24,7 @@
|
|||
|
||||
#include "config.h"
|
||||
#include "check.h"
|
||||
#include "settings.h"
|
||||
|
||||
class Token;
|
||||
class SymbolDatabase;
|
||||
|
||||
/// @addtogroup Checks
|
||||
/// @{
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "checkother.h"
|
||||
#include "mathlib.h"
|
||||
#include "symboldatabase.h"
|
||||
#include "templatesimplifier.h"
|
||||
|
||||
#include <cmath> // fabs()
|
||||
#include <stack>
|
||||
|
|
|
@ -24,9 +24,7 @@
|
|||
|
||||
#include "config.h"
|
||||
#include "check.h"
|
||||
#include "settings.h"
|
||||
|
||||
class Token;
|
||||
class Function;
|
||||
class Variable;
|
||||
|
||||
|
|
|
@ -309,7 +309,7 @@ void CheckSizeof::sizeofVoid()
|
|||
if (isMember) {
|
||||
// Get 'struct.member' complete name (without spaces)
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,9 +24,7 @@
|
|||
|
||||
#include "config.h"
|
||||
#include "check.h"
|
||||
#include "settings.h"
|
||||
|
||||
class Token;
|
||||
class Function;
|
||||
class Variable;
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include "config.h"
|
||||
#include "check.h"
|
||||
|
||||
class Token;
|
||||
|
||||
/// @addtogroup Checks
|
||||
/// @{
|
||||
|
|
|
@ -24,9 +24,7 @@
|
|||
|
||||
#include "config.h"
|
||||
#include "check.h"
|
||||
#include "settings.h"
|
||||
|
||||
class Token;
|
||||
class Scope;
|
||||
class Variable;
|
||||
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
|
||||
#include "config.h"
|
||||
#include "check.h"
|
||||
#include "tokenize.h"
|
||||
#include "errorlogger.h"
|
||||
|
||||
/// @addtogroup Checks
|
||||
/** @brief Check for functions never called */
|
||||
|
|
|
@ -21,14 +21,12 @@
|
|||
#define checkunusedvarH
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "config.h"
|
||||
#include "check.h"
|
||||
#include "settings.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
class Type;
|
||||
class Token;
|
||||
class Scope;
|
||||
class Variables;
|
||||
|
||||
|
|
Loading…
Reference in New Issue