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

Function astIsRHS

lib/astutils.cpp:825–837  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

823 return parent->astOperand1() == tok;
824}
825bool astIsRHS(const Token* tok)
826{
827 if (!tok)
828 return false;
829 const Token* parent = tok->astParent();
830 if (!parent)
831 return false;
832 if (!parent->astOperand1())
833 return false;
834 if (!parent->astOperand2())
835 return false;
836 return parent->astOperand2() == tok;
837}
838
839template<class T, REQUIRES("T must be a Token class", std::is_convertible<T*, const Token*> )>
840static T* getCondTokImpl(T* tok)

Callers 15

isPointerDeRefMethod · 0.85
setTokenValueFunction · 0.85
valueFlowArrayFunction · 0.85
isDecayedPointerFunction · 0.85
beforeConditionMethod · 0.85
afterConditionMethod · 0.85
solveExprValueMethod · 0.85
uninitvarErrorMethod · 0.85
analyzeLifetimeFunction · 0.85
isDeadCodeMethod · 0.85

Calls 3

astParentMethod · 0.80
astOperand1Method · 0.80
astOperand2Method · 0.80

Tested by

no test coverage detected