From 7a67bced71731dcbdf042b355736cd6879293b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 21 Oct 2017 12:40:20 +0200 Subject: [PATCH] classPublicInterfaceDivZero: extend bailout --- lib/checkclass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index e52e5d84f..4c312909d 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -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;