Refactoring: Use %op%
This commit is contained in:
parent
0730fad778
commit
447f61e9c7
|
@ -7223,7 +7223,7 @@ bool Tokenizer::simplifyCalculations()
|
|||
// keep parentheses here: operator new [] (size_t);
|
||||
// keep parentheses here: Functor()(a ... )
|
||||
// keep parentheses here: ) ( var ) ;
|
||||
if (Token::Match(tok->next(), "( %var% ) [;),+-*/><]]") &&
|
||||
if (Token::Match(tok->next(), "( %var% ) ;|)|,|]|%op%") &&
|
||||
!tok->isName() &&
|
||||
tok->str() != ">" &&
|
||||
tok->str() != "]" &&
|
||||
|
|
|
@ -381,7 +381,7 @@ private:
|
|||
void simplifyTokenList1()
|
||||
{
|
||||
// #1717 : The simplifyErrNoInWhile needs to be used before simplifyIfAssign..
|
||||
ASSERT_EQUALS("; x = f ( ) ; while ( ( x ) == -1 ) { x = f ( ) ; }",
|
||||
ASSERT_EQUALS("; x = f ( ) ; while ( x == -1 ) { x = f ( ) ; }",
|
||||
tok(";while((x=f())==-1 && errno==EINTR){}",true));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue