| 2024 | } |
| 2025 | |
| 2026 | bool isOppositeExpression(const Token * const tok1, const Token * const tok2, const Settings& settings, bool pure, bool followVar, ErrorPath* errors) |
| 2027 | { |
| 2028 | if (!tok1 || !tok2) |
| 2029 | return false; |
| 2030 | if (isOppositeCond(true, tok1, tok2, settings, pure, followVar, errors)) |
| 2031 | return true; |
| 2032 | if (tok1->isUnaryOp("-") && !(tok2->astParent() && tok2->astParent()->tokType() == Token::eBitOp)) |
| 2033 | return isSameExpression(true, tok1->astOperand1(), tok2, settings, pure, followVar, errors); |
| 2034 | if (tok2->isUnaryOp("-") && !(tok2->astParent() && tok2->astParent()->tokType() == Token::eBitOp)) |
| 2035 | return isSameExpression(true, tok2->astOperand1(), tok1, settings, pure, followVar, errors); |
| 2036 | return false; |
| 2037 | } |
| 2038 | |
| 2039 | static bool functionModifiesArguments(const Function* f) |
| 2040 | { |
no test coverage detected