classPublicInterfaceDivZero: extend bailout

This commit is contained in:
Daniel Marjamäki 2017-10-21 12:40:20 +02:00
parent 299835da2f
commit 7a67bced71
1 changed files with 1 additions and 1 deletions

View File

@ -2460,7 +2460,7 @@ void CheckClass::checkPublicInterfaceDivZero(bool test)
if (func->name().compare(0,8,"operator")==0)
continue;
for (const Token *tok = func->functionScope->classStart; tok; tok = tok->next()) {
if (Token::Match(tok, "if|}"))
if (Token::Match(tok, "if|switch|while|for|do|}"))
break;
if (tok->str() != "/")
continue;