MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / removeContradictions

Function removeContradictions

lib/token.cpp:2202–2210  ·  view source on GitHub ↗

Removing contradictions is an NP-hard problem. Instead we run multiple passes to try to catch most contradictions

Source from the content-addressed store, hash-verified

2200// Removing contradictions is an NP-hard problem. Instead we run multiple
2201// passes to try to catch most contradictions
2202static 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
2212static bool sameValueType(const ValueFlow::Value& x, const ValueFlow::Value& y)
2213{

Callers 1

addValueMethod · 0.85

Calls 2

removeOverlapsFunction · 0.85
removeContradictionFunction · 0.85

Tested by

no test coverage detected