Fixed #1716 (Wrong reporting of leak with close() in a while loop condition)
This commit is contained in:
parent
0c6352a826
commit
46b5e4e79a
|
@ -5666,7 +5666,7 @@ bool Tokenizer::simplifyRedundantParanthesis()
|
|||
ret = true;
|
||||
}
|
||||
|
||||
while (Token::Match(tok->previous(), "[;{] ( %var% (") &&
|
||||
while (Token::Match(tok->previous(), "[;{(] ( %var% (") &&
|
||||
tok->link()->previous() == tok->tokAt(2)->link())
|
||||
{
|
||||
// We have "( func ( *something* ))", remove the outer
|
||||
|
|
|
@ -553,6 +553,7 @@ private:
|
|||
void parantheses1()
|
||||
{
|
||||
ASSERT_EQUALS("<= 110 ;", tok("<= (10+100);"));
|
||||
ASSERT_EQUALS("while ( x ( ) == -1 ) { }", tok("while((x()) == -1){ }"));
|
||||
}
|
||||
|
||||
void paranthesesVar()
|
||||
|
|
Loading…
Reference in New Issue