Try to make Travis happy

This commit is contained in:
Daniel Marjamäki 2019-10-20 07:44:56 +02:00
parent 5c061c1c12
commit 68ea60d207
2 changed files with 3 additions and 3 deletions

View File

@ -1394,6 +1394,8 @@ bool isConstVarExpression(const Token *tok)
}
if (Token::Match(tok, "( %type%"))
return isConstVarExpression(tok->astOperand1());
if (tok->str() == "::" && tok->hasKnownValue())
return isConstVarExpression(tok->astOperand2());
if (Token::Match(tok, "%cop%|[|.")) {
if (tok->astOperand1() && !isConstVarExpression(tok->astOperand1()))
return false;

View File

@ -4586,9 +4586,7 @@ private:
" const bool y = a.f(A::C);\n"
" if(!x && !y) return;\n"
"}\n");
ASSERT_EQUALS("[test.cpp:8]: (style) Argument 'A::B' to function f is always 0\n"
"[test.cpp:9]: (style) Argument 'A::C' to function f is always 1\n",
errout.str());
ASSERT_EQUALS("", errout.str());
check("void foo() { \n"
" const bool x = a.f(A::B);\n"