Change location of %op% operator in multicompare
When the %op% operator is the first element of a multicompare, it properly executes Token::isOp(). Otherwise it uses it's "internal implementation". Workaround inspired by Edoardo Prezioso.
This commit is contained in:
parent
9ecc74e845
commit
8b2adf1391
|
@ -793,7 +793,7 @@ bool TemplateSimplifier::simplifyCalculations(Token *_tokens)
|
|||
// keep parentheses here: operator new [] (size_t);
|
||||
// keep parentheses here: Functor()(a ... )
|
||||
// keep parentheses here: ) ( var ) ;
|
||||
if (Token::Match(tok->next(), "( %var% ) ;|)|,|]|%op%") &&
|
||||
if (Token::Match(tok->next(), "( %var% ) %op%|;|)|,|]") &&
|
||||
!tok->isName() &&
|
||||
tok->str() != ">" &&
|
||||
tok->str() != "]" &&
|
||||
|
|
Loading…
Reference in New Issue