Updates last library difference

I'm not entirely sure if `getLiteralObject` and `getLiteralValue` are equivalent, and there don't see to be library tests for this
This commit is contained in:
Rebecca Valentine 2020-02-20 20:20:56 -08:00
Родитель 210387a8be
Коммит 2b1d9c8d16
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -110,7 +110,7 @@ predicate invalid_portable_is_comparison(Compare comp, Cmpop op, ClassValue cls)
/* OK to use 'is' when comparing items from a known set of objects */
not exists(Expr left, Expr right, Value val |
comp.compares(left, op, right) and
exists(ImmutableLiteral il | il.getLiteralObject() = val) |
exists(ImmutableLiteral il | il.getLiteralValue() = val) |
left.pointsTo(val) and right.pointsTo(val)
or
/* Simple constant in module, probably some sort of sentinel */