| 2759 | } |
| 2760 | |
| 2761 | static bool addByOne(const Token *tok, nonneg int varid) |
| 2762 | { |
| 2763 | if (Token::Match(tok, "+= %any% ;") && |
| 2764 | tok->tokAt(1)->hasKnownIntValue() && |
| 2765 | tok->tokAt(1)->getValue(1)) { |
| 2766 | return true; |
| 2767 | } |
| 2768 | if (Token::Match(tok, "= %varid% + %any% ;", varid) && |
| 2769 | tok->tokAt(3)->hasKnownIntValue() && |
| 2770 | tok->tokAt(3)->getValue(1)) { |
| 2771 | return true; |
| 2772 | } |
| 2773 | return false; |
| 2774 | } |
| 2775 | |
| 2776 | static bool accumulateBoolLiteral(const Token *tok, nonneg int varid) |
| 2777 | { |
no test coverage detected