| 716 | } |
| 717 | |
| 718 | static bool isInConstructorList(const Token* tok) |
| 719 | { |
| 720 | if (!tok) |
| 721 | return false; |
| 722 | if (!astIsRHS(tok)) |
| 723 | return false; |
| 724 | const Token* parent = tok->astParent(); |
| 725 | if (!Token::Match(parent, "{|(")) |
| 726 | return false; |
| 727 | if (!Token::Match(parent->previous(), "%var% {|(")) |
| 728 | return false; |
| 729 | if (!parent->astOperand1() || !parent->astOperand2()) |
| 730 | return false; |
| 731 | do { |
| 732 | parent = parent->astParent(); |
| 733 | } while (Token::simpleMatch(parent, ",")); |
| 734 | return Token::simpleMatch(parent, ":") && !Token::simpleMatch(parent->astParent(), "?"); |
| 735 | } |
| 736 | |
| 737 | std::vector<ValueType> getParentValueTypes(const Token* tok, const Settings& settings, const Token** parent) |
| 738 | { |
no test coverage detected