Removing contradictions is an NP-hard problem. Instead we run multiple passes to try to catch most contradictions
| 2200 | // Removing contradictions is an NP-hard problem. Instead we run multiple |
| 2201 | // passes to try to catch most contradictions |
| 2202 | static void removeContradictions(std::list<ValueFlow::Value>& values) |
| 2203 | { |
| 2204 | removeOverlaps(values); |
| 2205 | for (int i = 0; i < 4; i++) { |
| 2206 | if (!removeContradiction(values)) |
| 2207 | return; |
| 2208 | removeOverlaps(values); |
| 2209 | } |
| 2210 | } |
| 2211 | |
| 2212 | static bool sameValueType(const ValueFlow::Value& x, const ValueFlow::Value& y) |
| 2213 | { |
no test coverage detected