diff --git a/rules/token-matching.xml b/rules/token-matching.xml index 8b7823c05da..b376b3fad1c 100644 --- a/rules/token-matching.xml +++ b/rules/token-matching.xml @@ -40,4 +40,20 @@ Simplify 'Token :: Match ( expr , %var% ) && expr->variable()' to 'expr->variable()' + + + + TokenNext + error + Simplify 'tok->next()->next()' to 'tok->tokAt(2).' + + + + + + TokenLink + error + Simplify 'tok->next()->link()' to 'tok->linkAt(1).' + +