mirror of
https://github.com/github/codeql.git
synced 2026-03-17 04:56:58 +01:00
Python: Add regression test for code that proved problematic with the new parser.
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
| Class Base2 | 178 | ControlFlowNode for x | int 1 |
|
||||
| Class Derived4 | 182 | ControlFlowNode for FunctionExpr | Function __init__ |
|
||||
| Class Derived4 | 182 | ControlFlowNode for __init__ | Function __init__ |
|
||||
| Class DiGraph | 272 | ControlFlowNode for FunctionExpr | Function __init__ |
|
||||
| Class DiGraph | 272 | ControlFlowNode for __init__ | Function __init__ |
|
||||
| Class DiGraph | 275 | ControlFlowNode for FunctionExpr | Function add_node |
|
||||
| Class DiGraph | 275 | ControlFlowNode for add_node | Function add_node |
|
||||
| Class E | 195 | ControlFlowNode for FunctionExpr | Function _internal |
|
||||
| Class E | 195 | ControlFlowNode for _internal | Function _internal |
|
||||
| Class E | 201 | ControlFlowNode for _internal | Function _internal |
|
||||
@@ -176,3 +180,6 @@
|
||||
| Module pointsto_test | 254 | ControlFlowNode for object | builtin-class object |
|
||||
| Module pointsto_test | 267 | ControlFlowNode for Derived4 | class Derived4 |
|
||||
| Module pointsto_test | 267 | ControlFlowNode for Derived4() | Derived4() |
|
||||
| Module pointsto_test | 270 | ControlFlowNode for ClassExpr | class DiGraph |
|
||||
| Module pointsto_test | 270 | ControlFlowNode for DiGraph | class DiGraph |
|
||||
| Module pointsto_test | 270 | ControlFlowNode for object | builtin-class object |
|
||||
|
||||
@@ -339,3 +339,17 @@
|
||||
| 264 | ControlFlowNode for self | self |
|
||||
| 267 | ControlFlowNode for Derived4 | class Derived4 |
|
||||
| 267 | ControlFlowNode for Derived4() | Derived4() |
|
||||
| 270 | ControlFlowNode for ClassExpr | class DiGraph |
|
||||
| 270 | ControlFlowNode for DiGraph | class DiGraph |
|
||||
| 270 | ControlFlowNode for object | builtin-class object |
|
||||
| 272 | ControlFlowNode for FunctionExpr | Function __init__ |
|
||||
| 272 | ControlFlowNode for __init__ | Function __init__ |
|
||||
| 273 | ControlFlowNode for Attribute | Dict |
|
||||
| 273 | ControlFlowNode for Dict | Dict |
|
||||
| 273 | ControlFlowNode for self | self |
|
||||
| 275 | ControlFlowNode for FunctionExpr | Function add_node |
|
||||
| 275 | ControlFlowNode for add_node | Function add_node |
|
||||
| 276 | ControlFlowNode for Attribute | Dict |
|
||||
| 276 | ControlFlowNode for IntegerLiteral | int 0 |
|
||||
| 276 | ControlFlowNode for Subscript | int 0 |
|
||||
| 276 | ControlFlowNode for self | self |
|
||||
|
||||
@@ -342,3 +342,17 @@
|
||||
| 264 | ControlFlowNode for self | self | class G |
|
||||
| 267 | ControlFlowNode for Derived4 | class Derived4 | builtin-class type |
|
||||
| 267 | ControlFlowNode for Derived4() | Derived4() | class Derived4 |
|
||||
| 270 | ControlFlowNode for ClassExpr | class DiGraph | builtin-class type |
|
||||
| 270 | ControlFlowNode for DiGraph | class DiGraph | builtin-class type |
|
||||
| 270 | ControlFlowNode for object | builtin-class object | builtin-class type |
|
||||
| 272 | ControlFlowNode for FunctionExpr | Function __init__ | builtin-class function |
|
||||
| 272 | ControlFlowNode for __init__ | Function __init__ | builtin-class function |
|
||||
| 273 | ControlFlowNode for Attribute | Dict | builtin-class dict |
|
||||
| 273 | ControlFlowNode for Dict | Dict | builtin-class dict |
|
||||
| 273 | ControlFlowNode for self | self | class DiGraph |
|
||||
| 275 | ControlFlowNode for FunctionExpr | Function add_node | builtin-class function |
|
||||
| 275 | ControlFlowNode for add_node | Function add_node | builtin-class function |
|
||||
| 276 | ControlFlowNode for Attribute | Dict | builtin-class dict |
|
||||
| 276 | ControlFlowNode for IntegerLiteral | int 0 | builtin-class int |
|
||||
| 276 | ControlFlowNode for Subscript | int 0 | builtin-class int |
|
||||
| 276 | ControlFlowNode for self | self | class DiGraph |
|
||||
|
||||
@@ -265,3 +265,13 @@ class G(object):
|
||||
|
||||
# Self can only be of a class that is instantiated.
|
||||
Derived4()
|
||||
|
||||
|
||||
class DiGraph(object):
|
||||
|
||||
def __init__(self):
|
||||
self.pred = {}
|
||||
|
||||
def add_node(self, n):
|
||||
self.pred[n] = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user