| 1566 | } |
| 1567 | |
| 1568 | bool compareTokenFlags(const Token* tok1, const Token* tok2, bool macro) { |
| 1569 | if (macro) { |
| 1570 | if (tok1->isExpandedMacro() != tok2->isExpandedMacro()) |
| 1571 | return false; |
| 1572 | if (tok1->isExpandedMacro()) { // both are macros |
| 1573 | if (tok1->getMacroName() != tok2->getMacroName()) |
| 1574 | return false; |
| 1575 | if (tok1->astParent() && tok2->astParent() && tok1->astParent()->isExpandedMacro() && tok1->astParent()->getMacroName() == tok2->astParent()->getMacroName()) |
| 1576 | return false; |
| 1577 | } |
| 1578 | if (tok1->isTemplateArg() || tok2->isTemplateArg()) |
| 1579 | return false; |
| 1580 | } |
| 1581 | if (tok1->isComplex() != tok2->isComplex()) |
| 1582 | return false; |
| 1583 | if (tok1->isLong() != tok2->isLong()) |
| 1584 | return false; |
| 1585 | if (tok1->isUnsigned() != tok2->isUnsigned()) |
| 1586 | return false; |
| 1587 | if (tok1->isSigned() != tok2->isSigned()) |
| 1588 | return false; |
| 1589 | return true; |
| 1590 | } |
| 1591 | |
| 1592 | static bool astIsBoolLike(const Token* tok, const Settings& settings) |
| 1593 | { |
no test coverage detected