зеркало из https://github.com/github/codeql.git
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:
Родитель
210387a8be
Коммит
2b1d9c8d16
|
@ -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 */
|
||||
|
|
Загрузка…
Ссылка в новой задаче