CheckCondition: Fix FP in Cppcheck

This commit is contained in:
Daniel Marjamäki 2017-09-03 11:35:37 +02:00
parent b9849d9e4e
commit e5c6379d01
1 changed files with 2 additions and 0 deletions

View File

@ -526,6 +526,8 @@ void CheckCondition::multiCondition2()
}
if (Token::Match(tok, "%type% (") && nonlocal) // function call -> bailout if there are nonlocal variables
break;
if (Token::Match(tok, "break|continue|return|throw") && tok->scope() == endToken->scope())
break;
// bailout if loop is seen.
// TODO: handle loops better.
if (Token::Match(tok, "for|while|do")) {