Try to make Travis happy
This commit is contained in:
parent
5c061c1c12
commit
68ea60d207
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue