Fixed #988 (Tokenizer::simplifyDoWhileAddBraces(): don't add braces after "do" when it not a loop)
FIXME: test cases needed. http://sourceforge.net/apps/trac/cppcheck/ticket/988
This commit is contained in:
parent
d7c708cbf4
commit
38a6c41730
|
@ -2375,6 +2375,12 @@ void Tokenizer::simplifyDoWhileAddBraces()
|
|||
continue;
|
||||
}
|
||||
|
||||
if (tok->next()->str() == ")")
|
||||
{
|
||||
// fix for #988
|
||||
continue;
|
||||
}
|
||||
|
||||
Token *tok1 = tok; // token with "do"
|
||||
Token *tok2 = NULL; // token with "while"
|
||||
Token *tok3 = tok;
|
||||
|
|
Loading…
Reference in New Issue