| 516 | } |
| 517 | |
| 518 | void CheckConditionImpl::duplicateConditionError(const Token *tok1, const Token *tok2, ErrorPath errorPath) |
| 519 | { |
| 520 | if (diag(tok1, tok2)) |
| 521 | return; |
| 522 | errorPath.emplace_back(tok1, "First condition"); |
| 523 | errorPath.emplace_back(tok2, "Second condition"); |
| 524 | |
| 525 | std::string msg = "The if condition is the same as the previous if condition"; |
| 526 | |
| 527 | reportError(std::move(errorPath), Severity::style, "duplicateCondition", msg, CWE398, Certainty::normal); |
| 528 | } |
| 529 | |
| 530 | void CheckConditionImpl::multiCondition() |
| 531 | { |
no test coverage detected