astyle formatting

[ci skip]
This commit is contained in:
Daniel Marjamäki 2017-09-08 15:41:14 +02:00
parent 9cbfa0e383
commit d9adb5432a
2 changed files with 4 additions and 4 deletions

View File

@ -1164,7 +1164,7 @@ void CheckCondition::alwaysTrueFalse()
&& !tok->isBoolean();
const bool constValExpr = Token::Match(tok, "%num%|%char%") && tok->astParent() && Token::Match(tok->astParent(),"&&|%oror%|?"); // just one number or char in boolean expression
const bool compExpr = Token::Match(tok, "%comp%|!"); // a compare expression
if (!(constIfWhileExpression || constValExpr || compExpr))
continue;

View File

@ -2207,9 +2207,9 @@ private:
ASSERT_EQUALS("[test.cpp:2]: (style) Condition 'a' is always true\n", errout.str());
check("void f() {\n"
" int a = 5;"
" while(a + 1) { a--; }\n"
"}");
" int a = 5;"
" while(a + 1) { a--; }\n"
"}");
ASSERT_EQUALS("", errout.str());
check("void f() {\n"