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

Function isDifferentKnownValues

lib/astutils.cpp:1456–1465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1454}
1455
1456static inline bool isDifferentKnownValues(const Token * const tok1, const Token * const tok2)
1457{
1458 return compareKnownValue(tok1, tok2, [&](const ValueFlow::Value& v1, const ValueFlow::Value& v2, bool sameLifetime) {
1459 bool r = v1.equalValue(v2);
1460 if (v1.isIteratorValue()) {
1461 r &= sameLifetime;
1462 }
1463 return !r;
1464 });
1465}
1466
1467static inline bool isSameConstantValue(bool macro, const Token* tok1, const Token* tok2)
1468{

Callers 2

isSameExpressionFunction · 0.85
isOppositeCondFunction · 0.85

Calls 1

compareKnownValueFunction · 0.85

Tested by

no test coverage detected