Skip to content

Commit

Permalink
Typos found by running "codespell" (danmar#4260)
Browse files Browse the repository at this point in the history
  • Loading branch information
arm-in authored Jul 10, 2022
1 parent c218859 commit 0ae9877
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cmake/compileroptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ if (MSVC)

# C/C++ - Language
add_compile_options(/Zc:rvalueCast) # Enforce type conversion rules
add_compile_options(/std:c++14) # C++ Langage Standard - ISO C++14 Standard
add_compile_options(/std:c++14) # C++ Language Standard - ISO C++14 Standard

# C/C++ - Browse Information
# Enable Browse Information - No
Expand Down Expand Up @@ -184,7 +184,7 @@ if (MSVC)
# Linker - System
# Stack Reserve Size - 8000000
# Stack Commit Size - 8000000
add_link_options(/LARGEADDRESSAWARE) # Enbale Large Addresses - Yes
add_link_options(/LARGEADDRESSAWARE) # Enable Large Addresses - Yes

# Linker - Optimization
add_link_options(/OPT:REF) # References - Yes
Expand Down
4 changes: 2 additions & 2 deletions lib/programmemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ static ValueFlow::Value evaluate(const std::string& op, const ValueFlow::Value&
// Only add, subtract, and compare for non-integers
if (!compareOp && !contains({"+", "-"}, op) && !lhs.isIntValue() && !rhs.isIntValue())
return ValueFlow::Value::unknown();
// Both cant be iterators for non-compare
// Both can't be iterators for non-compare
if (!compareOp && lhs.isIteratorValue() && rhs.isIteratorValue())
return ValueFlow::Value::unknown();
// Symbolic values must be in the same ring
Expand Down Expand Up @@ -1332,7 +1332,7 @@ static ValueFlow::Value executeImpl(const Token* expr, ProgramMemory& pm, const
}
}
}
// Check if functon modifies argument
// Check if function modifies argument
visitAstNodes(expr->astOperand2(), [&](const Token* child) {
if (child->exprId() > 0 && pm.hasValue(child->exprId())) {
ValueFlow::Value& v = pm.at(child->exprId());
Expand Down
2 changes: 1 addition & 1 deletion lib/symboldatabase.h
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,7 @@ class CPPCHECKLIB SymbolDatabase {
SymbolDatabase(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger);
~SymbolDatabase();

/** @brief Information about all namespaces/classes/structrues */
/** @brief Information about all namespaces/classes/structures */
std::list<Scope> scopeList;

/** @brief Fast access to function scopes */
Expand Down
6 changes: 3 additions & 3 deletions lib/valueflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2436,10 +2436,10 @@ struct ValueFlowAnalyzer : Analyzer {
Action read = Action::Read;
const ValueFlow::Value* value = getValue(tok);
if (value) {
// Moving a moved value wont change the moved value
// Moving a moved value won't change the moved value
if (value->isMovedValue() && isMoveOrForward(tok) != ValueFlow::Value::MoveKind::NonMovedVariable)
return read;
// Inserting elements to container wont change the lifetime
// Inserting elements to container won't change the lifetime
if (astIsContainer(tok) && value->isLifetimeValue() &&
contains({Library::Container::Action::PUSH,
Library::Container::Action::INSERT,
Expand Down Expand Up @@ -6526,7 +6526,7 @@ static void valueFlowForLoopSimplify(Token* const bodyStart,
ErrorLogger* errorLogger,
const Settings* settings)
{
// TODO: Refactor this to use arbitary expressions
// TODO: Refactor this to use arbitrary expressions
assert(expr->varId() > 0);
const Token * const bodyEnd = bodyStart->link();

Expand Down
4 changes: 2 additions & 2 deletions tools/test_reduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def runtool(self, filedata=None):

reduce = ReduceTestFail()

# need to have at least 11 lines ending with comma to enter chunked mode and twice as much for second interation
# need to have at least 11 lines ending with comma to enter chunked mode and twice as much for second iteration
filedata = [
'int i,\n',
'j,\n',
Expand Down Expand Up @@ -106,7 +106,7 @@ def runtool(self, filedata=None):


def test_combinelines_chunk_2():
"""'filedata' is not changed by the funtion since the data is assigned to a local variable"""
"""'filedata' is not changed by the function since the data is assigned to a local variable"""

reduce = ReduceTest()

Expand Down

0 comments on commit 0ae9877

Please sign in to comment.