Merge pull request #726 from Dmitry-Me/betterVariableName9
Better variable name
This commit is contained in:
commit
454df6d905
|
@ -8673,7 +8673,7 @@ void Tokenizer::simplifyComma()
|
||||||
|
|
||||||
void Tokenizer::validate() const
|
void Tokenizer::validate() const
|
||||||
{
|
{
|
||||||
std::stack<const Token *> linktok;
|
std::stack<const Token *> linkTokens;
|
||||||
const Token *lastTok = nullptr;
|
const Token *lastTok = nullptr;
|
||||||
for (const Token *tok = tokens(); tok; tok = tok->next()) {
|
for (const Token *tok = tokens(); tok; tok = tok->next()) {
|
||||||
lastTok = tok;
|
lastTok = tok;
|
||||||
|
@ -8681,31 +8681,31 @@ void Tokenizer::validate() const
|
||||||
if (tok->link() == nullptr)
|
if (tok->link() == nullptr)
|
||||||
cppcheckError(tok);
|
cppcheckError(tok);
|
||||||
|
|
||||||
linktok.push(tok);
|
linkTokens.push(tok);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (Token::Match(tok, "[})]]") || (tok->str() == ">" && tok->link())) {
|
else if (Token::Match(tok, "[})]]") || (tok->str() == ">" && tok->link())) {
|
||||||
if (tok->link() == nullptr)
|
if (tok->link() == nullptr)
|
||||||
cppcheckError(tok);
|
cppcheckError(tok);
|
||||||
|
|
||||||
if (linktok.empty() == true)
|
if (linkTokens.empty() == true)
|
||||||
cppcheckError(tok);
|
cppcheckError(tok);
|
||||||
|
|
||||||
if (tok->link() != linktok.top())
|
if (tok->link() != linkTokens.top())
|
||||||
cppcheckError(tok);
|
cppcheckError(tok);
|
||||||
|
|
||||||
if (tok != tok->link()->link())
|
if (tok != tok->link()->link())
|
||||||
cppcheckError(tok);
|
cppcheckError(tok);
|
||||||
|
|
||||||
linktok.pop();
|
linkTokens.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (tok->link() != nullptr)
|
else if (tok->link() != nullptr)
|
||||||
cppcheckError(tok);
|
cppcheckError(tok);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!linktok.empty())
|
if (!linkTokens.empty())
|
||||||
cppcheckError(linktok.top());
|
cppcheckError(linkTokens.top());
|
||||||
|
|
||||||
// Validate that the Tokenizer::list.back() is updated correctly during simplifications
|
// Validate that the Tokenizer::list.back() is updated correctly during simplifications
|
||||||
if (lastTok != list.back())
|
if (lastTok != list.back())
|
||||||
|
|
Loading…
Reference in New Issue