mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
Merge pull request #1627 from markshannon/python-points-to-from-comprehensions
Python points-to: Infer types for comprehensions.
This commit is contained in:
@@ -253,6 +253,12 @@ predicate literal_instantiation(ControlFlowNode n, ClassObjectInternal cls, Poin
|
||||
n instanceof SetNode and cls = ObjectInternal::builtin("set")
|
||||
or
|
||||
n.getNode() instanceof ImaginaryLiteral and cls = ObjectInternal::builtin("complex")
|
||||
or
|
||||
n.getNode() instanceof ListComp and cls = ObjectInternal::builtin("list")
|
||||
or
|
||||
n.getNode() instanceof SetComp and cls = ObjectInternal::builtin("set")
|
||||
or
|
||||
n.getNode() instanceof DictComp and cls = ObjectInternal::builtin("dict")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
| 0 | 77 | 77 | 100.0 |
|
||||
| 1 | 5 | 43 | 11.627906976744185 |
|
||||
| 0 | 81 | 81 | 100.0 |
|
||||
| 1 | 6 | 44 | 13.636363636363637 |
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
| 0 | 77 | 77 | 100.0 |
|
||||
| 1 | 3 | 43 | 6.976744186046512 |
|
||||
| 0 | 81 | 81 | 100.0 |
|
||||
| 1 | 3 | 44 | 6.818181818181818 |
|
||||
|
||||
@@ -1 +1 @@
|
||||
| 1231 |
|
||||
| 1189 |
|
||||
|
||||
Reference in New Issue
Block a user