| 428 | } |
| 429 | |
| 430 | void CheckBoolImpl::pointerArithBoolCond(const Token *tok) |
| 431 | { |
| 432 | if (!tok) |
| 433 | return; |
| 434 | if (Token::Match(tok, "&&|%oror%")) { |
| 435 | pointerArithBoolCond(tok->astOperand1()); |
| 436 | pointerArithBoolCond(tok->astOperand2()); |
| 437 | return; |
| 438 | } |
| 439 | if (tok->str() != "+" && tok->str() != "-") |
| 440 | return; |
| 441 | |
| 442 | if (tok->isBinaryOp() && |
| 443 | tok->astOperand1()->isName() && |
| 444 | tok->astOperand1()->variable() && |
| 445 | tok->astOperand1()->variable()->isPointer() && |
| 446 | tok->astOperand2()->isNumber()) |
| 447 | pointerArithBoolError(tok); |
| 448 | } |
| 449 | |
| 450 | void CheckBoolImpl::pointerArithBoolError(const Token *tok) |
| 451 | { |
nothing calls this directly
no test coverage detected