(expr)
| 1050 | |
| 1051 | |
| 1052 | def isConstantExpression(expr): |
| 1053 | if expr.isNumber: |
| 1054 | return True |
| 1055 | if expr.isName and not isEnumConstant(expr): |
| 1056 | return False |
| 1057 | if simpleMatch(expr.previous, 'sizeof ('): |
| 1058 | return True |
| 1059 | if expr.astOperand1 and not isConstantExpression(expr.astOperand1): |
| 1060 | return False |
| 1061 | if expr.astOperand2 and not isConstantExpression(expr.astOperand2): |
| 1062 | return False |
| 1063 | return True |
| 1064 | |
| 1065 | def isUnknownConstantExpression(expr): |
| 1066 | if expr.isName and not isEnumConstant(expr) and expr.variable is None: |
no test coverage detected