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

Function isUnknownConstantExpression

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

Source from the content-addressed store, hash-verified

1063 return True
1064
1065def isUnknownConstantExpression(expr):
1066 if expr.isName and not isEnumConstant(expr) and expr.variable is None:
1067 return True
1068 if expr.astOperand1 and isUnknownConstantExpression(expr.astOperand1):
1069 return True
1070 if expr.astOperand2 and isUnknownConstantExpression(expr.astOperand2):
1071 return True
1072 return False
1073
1074def isUnsignedInt(expr):
1075 return expr and expr.valueType and expr.valueType.type in ('short', 'int') and expr.valueType.sign == 'unsigned'

Callers 1

misra_18_8Method · 0.85

Calls 1

isEnumConstantFunction · 0.85

Tested by

no test coverage detected