Use simpleMatch to fix travis build

This commit is contained in:
Daniel Marjamäki 2015-12-30 12:28:55 +01:00
parent c0e8654649
commit 7f1b43e79c
1 changed files with 1 additions and 1 deletions

View File

@ -334,7 +334,7 @@ void CheckSizeof::sizeofVoid()
for (const Token *tok = _tokenizer->tokens(); tok; tok = tok->next()) {
if (Token::simpleMatch(tok, "sizeof ( )")) { // "sizeof(void)" gets simplified to sizeof ( )
sizeofVoidError(tok);
} else if (Token::Match(tok, "sizeof (") && tok->next()->astOperand2()) {
} else if (Token::simpleMatch(tok, "sizeof (") && tok->next()->astOperand2()) {
const ValueType *vt = tok->next()->astOperand2()->valueType();
if (vt && vt->type == ValueType::Type::VOID && vt->pointer == 0U)
sizeofDereferencedVoidPointerError(tok, tok->strAt(3));