Abort comma simplification when ", %num%" is detected.

This increases speed a lot in some rare situations.
This commit is contained in:
Reijo Tomperi 2009-10-02 15:38:41 +03:00
parent 57067f6627
commit 6989670e8f
1 changed files with 2 additions and 1 deletions

View File

@ -4031,7 +4031,8 @@ void Tokenizer::simplifyComma()
}
}
if (tok->str() != ",")
// If token after the comma is a constant number, simplification is not required.
if (tok->str() != "," || Token::Match(tok->next(), "%num%"))
continue;
// We must not accept just any keyword, e.g. accepting int