From 08cef9e8159199d3af7ea63a515c3ea482c39cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20M=C3=BCller?= <27155134+arm-in@users.noreply.github.com> Date: Thu, 15 Oct 2020 19:24:13 +0200 Subject: [PATCH] Typos found by running "codespell" (#2846) --- lib/astutils.cpp | 2 +- lib/tokenize.cpp | 2 +- lib/valueflow.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/astutils.cpp b/lib/astutils.cpp index 65b0512e0..49bd15e82 100644 --- a/lib/astutils.cpp +++ b/lib/astutils.cpp @@ -1663,7 +1663,7 @@ Token* findVariableChanged(Token *start, const Token *end, int indirect, const n // Is aliased function call if (Token::Match(tok, "%var% (") && std::any_of(tok->values().begin(), tok->values().end(), std::mem_fn(&ValueFlow::Value::isLifetimeValue))) { 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()) return tok; visitAstNodes(getExprTok(), [&](const Token* childTok) { diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 76d8905f0..5ba99c6f5 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -8098,7 +8098,7 @@ bool Tokenizer::simplifyRedundantParentheses() 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%")) { bool innerComma = false; for (const Token *inner = tok->link()->previous(); inner != tok; inner = inner->previous()) { diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index 2575319a4..951636ae7 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -5978,7 +5978,7 @@ struct ContainerVariableForwardAnalyzer : VariableForwardAnalyzer { virtual Action isModified(const Token* tok) const OVERRIDE { Action read = Action::Read; - // An iterator wont change the container size + // An iterator won't change the container size if (astIsIterator(tok)) return read; if (Token::Match(tok->astParent(), "%assign%") && astIsLHS(tok))