| 569 | } |
| 570 | |
| 571 | Action analyzeMatch(const Token* tok, Direction d) const { |
| 572 | const Token* parent = tok->astParent(); |
| 573 | if (d == Direction::Reverse && isGlobal() && !dependsOnThis() && Token::Match(parent, ". %name% (")) { |
| 574 | Action a = isGlobalModified(parent->next()); |
| 575 | if (a != Action::None) |
| 576 | return a; |
| 577 | } |
| 578 | if ((astIsPointer(tok) || astIsSmartPointer(tok)) && |
| 579 | (Token::Match(parent, "*|[") || (parent && parent->originalName() == "->")) && getIndirect(tok) <= 0) |
| 580 | return Action::Read; |
| 581 | |
| 582 | Action w = isWritable(tok, d); |
| 583 | if (w != Action::None) |
| 584 | return w; |
| 585 | |
| 586 | // Check for modifications by function calls |
| 587 | return isModified(tok); |
| 588 | } |
| 589 | |
| 590 | Action analyzeToken(const Token* ref, const Token* tok, Direction d, bool inconclusiveRef) const { |
| 591 | if (!ref) |
no test coverage detected