Remove unused function Tokenizer::tokenizeCondition
This commit is contained in:
parent
e9fef003ac
commit
cd3818088f
|
@ -1743,73 +1743,6 @@ bool Tokenizer::tokenize(std::istream &code,
|
|||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool Tokenizer::tokenizeCondition(const std::string &code)
|
||||
{
|
||||
assert(_settings);
|
||||
|
||||
// Fill the map _typeSize..
|
||||
fillTypeSizes();
|
||||
|
||||
{
|
||||
std::istringstream istr(code);
|
||||
if (!list.createTokens(istr))
|
||||
cppcheckError(nullptr);
|
||||
}
|
||||
|
||||
// Combine strings
|
||||
combineStrings();
|
||||
|
||||
// Remove "volatile", "inline", "register", and "restrict"
|
||||
simplifyKeyword();
|
||||
|
||||
// Concatenate double sharp: 'a ## b' -> 'ab'
|
||||
concatenateDoubleSharp();
|
||||
|
||||
// Link brackets (, [ and {
|
||||
createLinks();
|
||||
|
||||
// Order keywords "static" and "const"
|
||||
simplifyStaticConst();
|
||||
|
||||
// convert platform dependent types to standard types
|
||||
// 32 bits: size_t -> unsigned long
|
||||
// 64 bits: size_t -> unsigned long long
|
||||
simplifyPlatformTypes();
|
||||
|
||||
// collapse compound standard types into a single token
|
||||
// unsigned long long int => long (with _isUnsigned=true,_isLong=true)
|
||||
simplifyStdType();
|
||||
|
||||
// replace 'NULL' and similar '0'-defined macros with '0'
|
||||
simplifyNull();
|
||||
|
||||
// combine "- %num%"
|
||||
concatenateNegativeNumberAndAnyPositive();
|
||||
|
||||
// simplify simple calculations
|
||||
for (Token *tok = list.front() ? list.front()->next() : nullptr;
|
||||
tok;
|
||||
tok = tok->next()) {
|
||||
if (tok->isNumber())
|
||||
TemplateSimplifier::simplifyNumericCalculations(tok->previous());
|
||||
}
|
||||
|
||||
combineOperators();
|
||||
|
||||
simplifyRedundantParentheses();
|
||||
for (Token *tok = list.front();
|
||||
tok;
|
||||
tok = tok->next())
|
||||
while (TemplateSimplifier::simplifyNumericCalculations(tok))
|
||||
;
|
||||
|
||||
simplifyCAlternativeTokens();
|
||||
|
||||
simplifyDoublePlusAndDoubleMinus();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Tokenizer::findComplicatedSyntaxErrorsInTemplates()
|
||||
{
|
||||
validate();
|
||||
|
|
|
@ -102,12 +102,6 @@ public:
|
|||
const char FileName[],
|
||||
const std::string &configuration = emptyString,
|
||||
bool noSymbolDB_AST = false);
|
||||
/**
|
||||
* tokenize condition and run simple simplifications on it
|
||||
* @param code code
|
||||
* @return true if success.
|
||||
*/
|
||||
bool tokenizeCondition(const std::string &code);
|
||||
|
||||
/** Set variable id */
|
||||
void setVarId();
|
||||
|
|
Loading…
Reference in New Issue