astyle formatting

This commit is contained in:
Daniel Marjamäki 2010-02-18 19:55:47 +01:00
parent b59d79c303
commit 375d2b1fcd
3 changed files with 14 additions and 14 deletions

View File

@ -394,11 +394,11 @@ void CheckOther::unreachableCode()
break;
// If there is a statement below the return it is unreachable
/* original:
if (!Token::Match(tok, "; case|default|}|#") &&
!Token::Match(tok, "; %var% :") &&
!Token::simpleMatch(tok, "; break"))
*/
/* original:
if (!Token::Match(tok, "; case|default|}|#") &&
!Token::Match(tok, "; %var% :") &&
!Token::simpleMatch(tok, "; break"))
*/
if (Token::simpleMatch(tok, "; break"))
{
unreachableCodeError(tok->next());

View File

@ -103,7 +103,7 @@ public:
/** Check for unreachable code */
void unreachableCode();
void unreachableCodeError(const Token *tok);
/** Check for unused function variables */
void functionVariableUsage();
void unusedVariableError(const Token *tok, const std::string &varname);

View File

@ -58,7 +58,7 @@ private:
TEST_CASE(structmember4);
TEST_CASE(structmember5);
TEST_CASE(structmember6);
TEST_CASE(localvar1);
TEST_CASE(localvar2);
TEST_CASE(localvar3);
@ -77,7 +77,7 @@ private:
TEST_CASE(localvarIfElse); // return tmp1 ? tmp2 : tmp3;
TEST_CASE(localvarOpAssign); // a |= b;
TEST_CASE(localvarFor); // for ( ; var; )
TEST_CASE(localvarShift); // 1 >> var
TEST_CASE(localvarShift); // 1 >> var
}
void structmember1()
@ -197,10 +197,10 @@ private:
"}\n");
ASSERT_EQUALS("", errout.str());
}
@ -397,8 +397,8 @@ private:
" return 1 >> var;\n"
"}\n");
ASSERT_EQUALS(std::string(""), errout.str());
}
}
};
REGISTER_TEST(TestUnusedVar)