Spelling fixes.

This commit is contained in:
Ville Skyttä 2012-07-21 16:54:04 +03:00 committed by PKEUS
parent 9352e124fe
commit 7ab2f6a9fa
7 changed files with 13 additions and 13 deletions

View File

@ -516,7 +516,7 @@ void CheckClass::initializationListUsage()
Scope* owner = scope->functionOf; Scope* owner = scope->functionOf;
for (const Token* tok = scope->classStart; tok != scope->classEnd; tok = tok->next()) { for (const Token* tok = scope->classStart; tok != scope->classEnd; tok = tok->next()) {
if (Token::Match(tok, "%var% (")) // Assignments might depend on this function call or if/for/while/switch statment from now on. if (Token::Match(tok, "%var% (")) // Assignments might depend on this function call or if/for/while/switch statement from now on.
break; break;
if (Token::Match(tok, "try|do {")) if (Token::Match(tok, "try|do {"))
break; break;

View File

@ -237,8 +237,8 @@ void CheckInternal::missingPercentCharacterError(const Token* tok, const std::st
void CheckInternal::unknownPatternError(const Token* tok, const std::string& pattern) void CheckInternal::unknownPatternError(const Token* tok, const std::string& pattern)
{ {
reportError(tok, Severity::error, "unkownPattern", reportError(tok, Severity::error, "unknownPattern",
"Unkown pattern used: \"" + pattern + "\""); "Unknown pattern used: \"" + pattern + "\"");
} }
#endif // #ifndef NDEBUG #endif // #ifndef NDEBUG

View File

@ -65,7 +65,7 @@ public:
/** @brief %Check for missing % end character in Token::Match pattern */ /** @brief %Check for missing % end character in Token::Match pattern */
void checkMissingPercentCharacter(); void checkMissingPercentCharacter();
/** @brief %Check for for unkown (invalid) complex patterns like "%typ%" */ /** @brief %Check for for unknown (invalid) complex patterns like "%typ%" */
void checkUnknownPattern(); void checkUnknownPattern();
private: private:

View File

@ -4059,9 +4059,9 @@ void Tokenizer::simplifyCompoundAssignment()
while (tok->next()->str() != ";") while (tok->next()->str() != ";")
tok->deleteNext(); tok->deleteNext();
} else { } else {
// Enclose the rhs in parantheses.. // Enclose the rhs in parenthesis..
if (!Token::Match(tok->tokAt(2), "[;)]")) { if (!Token::Match(tok->tokAt(2), "[;)]")) {
// Only enclose rhs in parantheses if there is some operator // Only enclose rhs in parenthesis if there is some operator
bool someOperator = false; bool someOperator = false;
for (Token *tok2 = tok->next(); tok2; tok2 = tok2->next()) { for (Token *tok2 = tok->next(); tok2; tok2 = tok2->next()) {
if (tok2->str() == "(") if (tok2->str() == "(")

View File

@ -214,7 +214,7 @@ private:
" Token::Match(tok, \"foo % %type % bar\");\n" " Token::Match(tok, \"foo % %type % bar\");\n"
"}"); "}");
ASSERT_EQUALS("[test.cpp:3]: (error) Missing percent end character in Token::Match() pattern: \"foo % %type % bar\"\n" ASSERT_EQUALS("[test.cpp:3]: (error) Missing percent end character in Token::Match() pattern: \"foo % %type % bar\"\n"
"[test.cpp:3]: (error) Unkown pattern used: \"%type %\"\n", errout.str()); "[test.cpp:3]: (error) Unknown pattern used: \"%type %\"\n", errout.str());
// Find missing % also in 'alternatives' pattern // Find missing % also in 'alternatives' pattern
check("void f() {\n" check("void f() {\n"
@ -235,7 +235,7 @@ private:
check("void f() {\n" check("void f() {\n"
" Token::Match(tok, \"%typ%\");\n" " Token::Match(tok, \"%typ%\");\n"
"}"); "}");
ASSERT_EQUALS("[test.cpp:2]: (error) Unkown pattern used: \"%typ%\"\n", errout.str()); ASSERT_EQUALS("[test.cpp:2]: (error) Unknown pattern used: \"%typ%\"\n", errout.str());
// Make sure we don't take %or% for a broken %oror% // Make sure we don't take %or% for a broken %oror%
check("void f() {\n" check("void f() {\n"