Typos found by running "codespell" (#4260)

This commit is contained in:
Armin Müller 2022-07-11 02:10:05 +05:30 committed by GitHub
parent c218859418
commit 0ae9877766
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View File

@ -147,7 +147,7 @@ if (MSVC)
# C/C++ - Language # C/C++ - Language
add_compile_options(/Zc:rvalueCast) # Enforce type conversion rules 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 # C/C++ - Browse Information
# Enable Browse Information - No # Enable Browse Information - No
@ -184,7 +184,7 @@ if (MSVC)
# Linker - System # Linker - System
# Stack Reserve Size - 8000000 # Stack Reserve Size - 8000000
# Stack Commit Size - 8000000 # Stack Commit Size - 8000000
add_link_options(/LARGEADDRESSAWARE) # Enbale Large Addresses - Yes add_link_options(/LARGEADDRESSAWARE) # Enable Large Addresses - Yes
# Linker - Optimization # Linker - Optimization
add_link_options(/OPT:REF) # References - Yes add_link_options(/OPT:REF) # References - Yes

View File

@ -588,7 +588,7 @@ static ValueFlow::Value evaluate(const std::string& op, const ValueFlow::Value&
// Only add, subtract, and compare for non-integers // Only add, subtract, and compare for non-integers
if (!compareOp && !contains({"+", "-"}, op) && !lhs.isIntValue() && !rhs.isIntValue()) if (!compareOp && !contains({"+", "-"}, op) && !lhs.isIntValue() && !rhs.isIntValue())
return ValueFlow::Value::unknown(); 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()) if (!compareOp && lhs.isIteratorValue() && rhs.isIteratorValue())
return ValueFlow::Value::unknown(); return ValueFlow::Value::unknown();
// Symbolic values must be in the same ring // Symbolic values must be in the same ring
@ -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) { visitAstNodes(expr->astOperand2(), [&](const Token* child) {
if (child->exprId() > 0 && pm.hasValue(child->exprId())) { if (child->exprId() > 0 && pm.hasValue(child->exprId())) {
ValueFlow::Value& v = pm.at(child->exprId()); ValueFlow::Value& v = pm.at(child->exprId());

View File

@ -1362,7 +1362,7 @@ public:
SymbolDatabase(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger); SymbolDatabase(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger);
~SymbolDatabase(); ~SymbolDatabase();
/** @brief Information about all namespaces/classes/structrues */ /** @brief Information about all namespaces/classes/structures */
std::list<Scope> scopeList; std::list<Scope> scopeList;
/** @brief Fast access to function scopes */ /** @brief Fast access to function scopes */

View File

@ -2436,10 +2436,10 @@ struct ValueFlowAnalyzer : Analyzer {
Action read = Action::Read; Action read = Action::Read;
const ValueFlow::Value* value = getValue(tok); const ValueFlow::Value* value = getValue(tok);
if (value) { 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) if (value->isMovedValue() && isMoveOrForward(tok) != ValueFlow::Value::MoveKind::NonMovedVariable)
return read; return read;
// Inserting elements to container wont change the lifetime // Inserting elements to container won't change the lifetime
if (astIsContainer(tok) && value->isLifetimeValue() && if (astIsContainer(tok) && value->isLifetimeValue() &&
contains({Library::Container::Action::PUSH, contains({Library::Container::Action::PUSH,
Library::Container::Action::INSERT, Library::Container::Action::INSERT,
@ -6526,7 +6526,7 @@ static void valueFlowForLoopSimplify(Token* const bodyStart,
ErrorLogger* errorLogger, ErrorLogger* errorLogger,
const Settings* settings) const Settings* settings)
{ {
// TODO: Refactor this to use arbitary expressions // TODO: Refactor this to use arbitrary expressions
assert(expr->varId() > 0); assert(expr->varId() > 0);
const Token * const bodyEnd = bodyStart->link(); const Token * const bodyEnd = bodyStart->link();

View File

@ -74,7 +74,7 @@ def test_combinelines_chunk():
reduce = ReduceTestFail() 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 = [ filedata = [
'int i,\n', 'int i,\n',
'j,\n', 'j,\n',
@ -106,7 +106,7 @@ def test_combinelines_chunk():
def test_combinelines_chunk_2(): 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() reduce = ReduceTest()