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

Function is_constant_integer_expression

addons/misra.py:819–830  ·  view source on GitHub ↗
(expr)

Source from the content-addressed store, hash-verified

817 return True
818
819def is_constant_integer_expression(expr):
820 if expr is None:
821 return False
822 if expr.isInt:
823 return True
824 if not expr.isArithmeticalOp:
825 return False
826 if expr.astOperand1 and not is_constant_integer_expression(expr.astOperand1):
827 return False
828 if expr.astOperand2 and not is_constant_integer_expression(expr.astOperand2):
829 return False
830 return True
831
832def isFunctionCall(expr, std='c99'):
833 if not expr:

Callers 2

getEssentialTypeFunction · 0.85
misra_12_4_check_exprMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected