PS: Ensure the constants 0 .. 10 always exists.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-10-14 14:58:00 +01:00
parent 51269633b0
commit 01a556e583

View File

@@ -13,6 +13,8 @@ class ConstExpr extends @constant_expression, BaseConstExpr {
private newtype TConstantValue =
TConstInteger(int value) {
exists(ConstExpr ce | ce.getType() = "Int32" and ce.getValue().getValue().toInt() = value)
or
value = [0 .. 10] // needed for `trackKnownValue` in `DataFlowPrivate`
} or
TConstDouble(float double) {
exists(ConstExpr ce | ce.getType() = "Double" and ce.getValue().getValue().toFloat() = double)