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))
continue;
if (mTokenizer->isCPP() && tok->str() == "&" && !(tok->astOperand1()->valueType() && tok->astOperand1()->valueType()->isIntegral()))
// Possible archive
continue;
// Possible archive
continue;
bool inconclusive = Token::Match(tok, "%cop%");
if (mSettings->inconclusive || !inconclusive)
constStatementError(tok, tok->isNumber() ? "numeric" : "string", inconclusive);

View File

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