diff --git a/lib/checkexceptionsafety.cpp b/lib/checkexceptionsafety.cpp index a14da4e42..e2d13f5fe 100644 --- a/lib/checkexceptionsafety.cpp +++ b/lib/checkexceptionsafety.cpp @@ -362,7 +362,7 @@ void CheckExceptionSafety::rethrowNoCurrentException() // Rethrow can be used in 'exception dispatcher' idiom which is FP in such case // https://isocpp.org/wiki/faq/exceptions#throw-without-an-object - // We check the beggining of the function with idiom pattern + // We check the beginning of the function with idiom pattern if (Token::simpleMatch(function->functionScope->bodyStart->next(), "try { throw ; } catch (")) continue; diff --git a/lib/forwardanalyzer.cpp b/lib/forwardanalyzer.cpp index b24069b55..dbdb63901 100644 --- a/lib/forwardanalyzer.cpp +++ b/lib/forwardanalyzer.cpp @@ -423,7 +423,7 @@ struct ForwardTraversal { } if (allAnalysis.isModified() || !forkContinue) { - // TODO: Dont bail on missing condition + // TODO: Don't bail on missing condition if (!condTok) return Break(Analyzer::Terminate::Bail); if (analyzer->isConditional() && stopUpdates()) diff --git a/lib/tokenlist.cpp b/lib/tokenlist.cpp index 0d1c77150..e0163061b 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -1661,7 +1661,7 @@ void TokenList::validateAst() const // Check for endless recursion const Token* parent = tok->astParent(); if (parent) { - std::set < const Token* > astTokens; // list of anchestors + std::set < const Token* > astTokens; // list of ancestors astTokens.insert(tok); do { if (safeAstTokens.find(parent) != safeAstTokens.end()) diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index dab8ef659..f081046fc 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -6422,7 +6422,7 @@ static std::vector getInitListSize(const Token* tok, bool known = true) { std::vector args = getArguments(tok); - // Strings dont use an init list + // Strings don't use an init list if (!args.empty() && container->stdStringLike) { if (astIsIntegral(args[0], false)) { if (args.size() > 1) diff --git a/lib/valueflow.h b/lib/valueflow.h index 069d7f89e..996d7eab3 100644 --- a/lib/valueflow.h +++ b/lib/valueflow.h @@ -328,9 +328,9 @@ namespace ValueFlow { Object, // A member of object points to the lifetime SubObject, - // Lambda has captured lifetime(similiar to SubObject) + // Lambda has captured lifetime(similar to SubObject) Lambda, - // Iterator points to the lifetime of a container(similiar to Object) + // Iterator points to the lifetime of a container(similar to Object) Iterator, // A pointer that holds the address of the lifetime Address diff --git a/test/testbufferoverrun.cpp b/test/testbufferoverrun.cpp index af07000ec..c3c1a655c 100644 --- a/test/testbufferoverrun.cpp +++ b/test/testbufferoverrun.cpp @@ -3527,7 +3527,7 @@ private: "}", settings); ASSERT_EQUALS("", errout.str()); - // #3124 - multidimension array + // #3124 - multidimensional array check("int main() {\n" " char b[5][6];\n" " mymemset(b, 0, 5 * 6);\n"