astyle formatting

[ci skip]
This commit is contained in:
Daniel Marjamäki 2019-03-31 16:20:06 +02:00
parent 29a5404d1e
commit 0efddc4010
2 changed files with 12 additions and 12 deletions

View File

@ -1444,8 +1444,8 @@ void CheckOther::checkIncompleteStatement()
if (isVoidStmt(tok)) if (isVoidStmt(tok))
continue; continue;
if (mTokenizer->isCPP() && tok->str() == "&" && !(tok->astOperand1()->valueType() && tok->astOperand1()->valueType()->isIntegral())) if (mTokenizer->isCPP() && tok->str() == "&" && !(tok->astOperand1()->valueType() && tok->astOperand1()->valueType()->isIntegral()))
// Possible archive // Possible archive
continue; continue;
bool inconclusive = Token::Match(tok, "%cop%"); bool inconclusive = Token::Match(tok, "%cop%");
if (mSettings->inconclusive || !inconclusive) if (mSettings->inconclusive || !inconclusive)
constStatementError(tok, tok->isNumber() ? "numeric" : "string", inconclusive); constStatementError(tok, tok->isNumber() ? "numeric" : "string", inconclusive);

View File

@ -368,17 +368,17 @@ private:
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
} }
void archive() { void archive() {
check("void f(Archive &ar) {\n" check("void f(Archive &ar) {\n"
" ar & x;\n" " ar & x;\n"
"}", true); "}", true);
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
check("void f(int ar) {\n" check("void f(int ar) {\n"
" ar & x;\n" " ar & x;\n"
"}", true); "}", true);
ASSERT_EQUALS("[test.cpp:2]: (warning, inconclusive) Found suspicious operator '&'\n", errout.str()); ASSERT_EQUALS("[test.cpp:2]: (warning, inconclusive) Found suspicious operator '&'\n", errout.str());
} }
}; };
REGISTER_TEST(TestIncompleteStatement) REGISTER_TEST(TestIncompleteStatement)