From 2b1d9c8d16cb9f4f1ee6ed73f9979b7177def33e Mon Sep 17 00:00:00 2001 From: Rebecca Valentine Date: Thu, 20 Feb 2020 20:20:56 -0800 Subject: [PATCH] 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 --- python/ql/src/Expressions/IsComparisons.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ql/src/Expressions/IsComparisons.qll b/python/ql/src/Expressions/IsComparisons.qll index efd7effaf81..d2f1e6b1c8f 100644 --- a/python/ql/src/Expressions/IsComparisons.qll +++ b/python/ql/src/Expressions/IsComparisons.qll @@ -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 */