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

Function isEqualKnownValue

lib/astutils.cpp:1445–1454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1443}
1444
1445bool isEqualKnownValue(const Token * const tok1, const Token * const tok2)
1446{
1447 return compareKnownValue(tok1, tok2, [&](const ValueFlow::Value& v1, const ValueFlow::Value& v2, bool sameLifetime) {
1448 bool r = v1.equalValue(v2);
1449 if (v1.isIteratorValue()) {
1450 r &= sameLifetime;
1451 }
1452 return r;
1453 });
1454}
1455
1456static inline bool isDifferentKnownValues(const Token * const tok1, const Token * const tok2)
1457{

Callers 2

isSameConstantValueFunction · 0.85

Calls 1

compareKnownValueFunction · 0.85

Tested by

no test coverage detected