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

Function hasVarIds

lib/checkstl.cpp:2801–2811  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2799}
2800
2801static bool hasVarIds(const Token *tok, nonneg int var1, nonneg int var2)
2802{
2803 if (tok->astOperand1()->varId() == tok->astOperand2()->varId())
2804 return false;
2805 if (tok->astOperand1()->varId() == var1 || tok->astOperand1()->varId() == var2) {
2806 if (tok->astOperand2()->varId() == var1 || tok->astOperand2()->varId() == var2) {
2807 return true;
2808 }
2809 }
2810 return false;
2811}
2812
2813static std::string flipMinMax(const std::string &algo)
2814{

Callers 1

minmaxCompareFunction · 0.85

Calls 2

astOperand1Method · 0.80
astOperand2Method · 0.80

Tested by

no test coverage detected