Typos found by running "codespell" (#2846)
This commit is contained in:
parent
47d0be3249
commit
08cef9e815
|
@ -1663,7 +1663,7 @@ Token* findVariableChanged(Token *start, const Token *end, int indirect, const n
|
||||||
// Is aliased function call
|
// Is aliased function call
|
||||||
if (Token::Match(tok, "%var% (") && std::any_of(tok->values().begin(), tok->values().end(), std::mem_fn(&ValueFlow::Value::isLifetimeValue))) {
|
if (Token::Match(tok, "%var% (") && std::any_of(tok->values().begin(), tok->values().end(), std::mem_fn(&ValueFlow::Value::isLifetimeValue))) {
|
||||||
bool aliased = false;
|
bool aliased = false;
|
||||||
// If we cant find the expression then assume it was modified
|
// If we can't find the expression then assume it was modified
|
||||||
if (!getExprTok())
|
if (!getExprTok())
|
||||||
return tok;
|
return tok;
|
||||||
visitAstNodes(getExprTok(), [&](const Token* childTok) {
|
visitAstNodes(getExprTok(), [&](const Token* childTok) {
|
||||||
|
|
|
@ -8098,7 +8098,7 @@ bool Tokenizer::simplifyRedundantParentheses()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not simplify if there is comma inside parantheses..
|
// Do not simplify if there is comma inside parentheses..
|
||||||
if (Token::Match(tok->previous(), "%op% (") || Token::Match(tok->link(), ") %op%")) {
|
if (Token::Match(tok->previous(), "%op% (") || Token::Match(tok->link(), ") %op%")) {
|
||||||
bool innerComma = false;
|
bool innerComma = false;
|
||||||
for (const Token *inner = tok->link()->previous(); inner != tok; inner = inner->previous()) {
|
for (const Token *inner = tok->link()->previous(); inner != tok; inner = inner->previous()) {
|
||||||
|
|
|
@ -5978,7 +5978,7 @@ struct ContainerVariableForwardAnalyzer : VariableForwardAnalyzer {
|
||||||
|
|
||||||
virtual Action isModified(const Token* tok) const OVERRIDE {
|
virtual Action isModified(const Token* tok) const OVERRIDE {
|
||||||
Action read = Action::Read;
|
Action read = Action::Read;
|
||||||
// An iterator wont change the container size
|
// An iterator won't change the container size
|
||||||
if (astIsIterator(tok))
|
if (astIsIterator(tok))
|
||||||
return read;
|
return read;
|
||||||
if (Token::Match(tok->astParent(), "%assign%") && astIsLHS(tok))
|
if (Token::Match(tok->astParent(), "%assign%") && astIsLHS(tok))
|
||||||
|
|
Loading…
Reference in New Issue