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

Function astIsLHS

lib/astutils.cpp:812–824  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

810}
811
812bool astIsLHS(const Token* tok)
813{
814 if (!tok)
815 return false;
816 const Token* parent = tok->astParent();
817 if (!parent)
818 return false;
819 if (!parent->astOperand1())
820 return false;
821 if (!parent->astOperand2())
822 return false;
823 return parent->astOperand1() == tok;
824}
825bool astIsRHS(const Token* tok)
826{
827 if (!tok)

Callers 15

assignExprFunction · 0.85
valueFlowLifetimeFunction · 0.85
valueFlowAfterAssignFunction · 0.85
beforeConditionMethod · 0.85
afterConditionMethod · 0.85
getConditionVariableFunction · 0.85
valueFlowSmartPointerFunction · 0.85
checkScopeForVariableMethod · 0.85
isModifiedFunction · 0.85

Calls 3

astParentMethod · 0.80
astOperand1Method · 0.80
astOperand2Method · 0.80

Tested by

no test coverage detected