mirror of
https://github.com/github/codeql.git
synced 2026-05-04 21:25:44 +02:00
Python tests: Hide special ESSA variables in tests, to ease transition from '*' to '$' variable.
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
| __init__.py:0 | *_0 = ScopeEntryDefinition |
|
||||
| __init__.py:0 | __name___0 = ScopeEntryDefinition |
|
||||
| __init__.py:0 | __package___0 = ScopeEntryDefinition |
|
||||
| __init__.py:0 | module2_0 = ImplicitSubModuleDefinition |
|
||||
| __init__.py:0 | moduleX_0 = ImplicitSubModuleDefinition |
|
||||
| __init__.py:0 | sys_0 = ScopeEntryDefinition |
|
||||
| __init__.py:1 | *_1 = ImportStarRefinement(*_0) |
|
||||
| __init__.py:1 | __name___1 = ImportStarRefinement(__name___0) |
|
||||
| __init__.py:1 | __package___1 = ImportStarRefinement(__package___0) |
|
||||
| __init__.py:1 | sys_1 = ImportStarRefinement(sys_0) |
|
||||
| __init__.py:2 | *_2 = ImportStarRefinement(*_1) |
|
||||
| __init__.py:2 | __name___2 = ImportStarRefinement(__name___1) |
|
||||
| __init__.py:2 | __package___2 = ImportStarRefinement(__package___1) |
|
||||
| __init__.py:2 | module_0 = ImportMember |
|
||||
@@ -498,7 +495,6 @@
|
||||
| h_classes.py:52 | arg1_0 = ParameterDefinition |
|
||||
| h_classes.py:52 | n_0 = FunctionExpr |
|
||||
| h_classes.py:52 | self_0 = ParameterDefinition |
|
||||
| i_imports.py:0 | *_0 = ScopeEntryDefinition |
|
||||
| i_imports.py:0 | BytesIO_0 = ScopeEntryDefinition |
|
||||
| i_imports.py:0 | StringIO_0 = ScopeEntryDefinition |
|
||||
| i_imports.py:0 | __name___0 = ScopeEntryDefinition |
|
||||
@@ -513,7 +509,6 @@
|
||||
| i_imports.py:3 | a_0 = IntegerLiteral |
|
||||
| i_imports.py:4 | b_0 = IntegerLiteral |
|
||||
| i_imports.py:5 | c_0 = IntegerLiteral |
|
||||
| i_imports.py:7 | *_1 = ImportStarRefinement(*_0) |
|
||||
| i_imports.py:7 | BytesIO_1 = ImportStarRefinement(BytesIO_0) |
|
||||
| i_imports.py:7 | StringIO_1 = ImportStarRefinement(StringIO_0) |
|
||||
| i_imports.py:7 | __name___1 = ImportStarRefinement(__name___0) |
|
||||
@@ -528,7 +523,6 @@
|
||||
| i_imports.py:13 | argv_1 = ImportMember |
|
||||
| i_imports.py:17 | sys_1 = ImportExpr |
|
||||
| i_imports.py:23 | code_1 = ImportExpr |
|
||||
| i_imports.py:27 | *_2 = ImportStarRefinement(*_1) |
|
||||
| i_imports.py:27 | __name___2 = ImportStarRefinement(__name___1) |
|
||||
| i_imports.py:27 | __package___2 = ImportStarRefinement(__package___1) |
|
||||
| i_imports.py:27 | a_2 = ImportStarRefinement(a_1) |
|
||||
|
||||
@@ -4,5 +4,5 @@ import python
|
||||
import Util
|
||||
|
||||
from EssaVariable v, EssaDefinition def
|
||||
where def = v.getDefinition()
|
||||
where def = v.getDefinition() and not v.getSourceVariable() instanceof SpecialSsaSourceVariable
|
||||
select locate(def.getLocation(), "abdefghijknrs_"), v.getRepresentation() + " = " + def.getRepresentation()
|
||||
|
||||
@@ -37,16 +37,6 @@
|
||||
| g_class_init.py:52 | self_3 | version | phi(self_1, self_2) | 'v2' | runtime |
|
||||
| g_class_init.py:52 | self_3 | version | phi(self_1, self_2) | 'v3' | runtime |
|
||||
| g_class_init.py:54 | self_1 | version | Pi(self_0) [true] | 'v2' | runtime |
|
||||
| i_imports.py:7 | *_1 | x | ImportStarRefinement(*_0) | float 1.0 | import |
|
||||
| i_imports.py:7 | *_1 | y | ImportStarRefinement(*_0) | float 2.0 | import |
|
||||
| i_imports.py:27 | *_2 | module1 | ImportStarRefinement(*_1) | Module code.test_package.module1 | import |
|
||||
| i_imports.py:27 | *_2 | module2 | ImportStarRefinement(*_1) | Module code.test_package.module2 | import |
|
||||
| i_imports.py:27 | *_2 | p | ImportStarRefinement(*_1) | int 1 | import |
|
||||
| i_imports.py:27 | *_2 | q | ImportStarRefinement(*_1) | int 2 | import |
|
||||
| i_imports.py:27 | *_2 | r | ImportStarRefinement(*_1) | Dict | import |
|
||||
| i_imports.py:27 | *_2 | s | ImportStarRefinement(*_1) | NoneType None | import |
|
||||
| i_imports.py:27 | *_2 | x | ImportStarRefinement(*_1) | float 1.0 | import |
|
||||
| i_imports.py:27 | *_2 | y | ImportStarRefinement(*_1) | float 2.0 | import |
|
||||
| k_getsetattr.py:6 | self_0 | a | ParameterDefinition | float 7.0 | code/k_getsetattr.py:15 from runtime |
|
||||
| k_getsetattr.py:6 | self_0 | c | ParameterDefinition | int 2 | code/k_getsetattr.py:15 from runtime |
|
||||
| k_getsetattr.py:7 | self_1 | a | ArgumentRefinement(self_0) | int 0 | code/k_getsetattr.py:15 from runtime |
|
||||
|
||||
@@ -5,7 +5,7 @@ private import semmle.python.pointsto.PointsToContext
|
||||
import Util
|
||||
|
||||
from EssaVariable var, string name, Object o, PointsToContext ctx
|
||||
where PointsTo::Test::ssa_variable_named_attribute_points_to(var, ctx, name, o, _, _)
|
||||
where PointsTo::Test::ssa_variable_named_attribute_points_to(var, ctx, name, o, _, _) and not var.getSourceVariable() instanceof SpecialSsaSourceVariable
|
||||
select
|
||||
locate(var.getDefinition().getLocation(), "abdfgikm"), var.getRepresentation(),
|
||||
name, var.getDefinition().getRepresentation(), repr(o), ctx
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
| __init__.py:0 | *_2 | Exit node for Module code.test_package.__init__ |
|
||||
| __init__.py:0 | __name___0 | Exit node for Module code.__init__ |
|
||||
| __init__.py:0 | __name___0 | Exit node for Module code.package.__init__ |
|
||||
| __init__.py:0 | __name___2 | Exit node for Module code.test_package.__init__ |
|
||||
@@ -12,11 +11,9 @@
|
||||
| __init__.py:0 | moduleX_1 | Exit node for Module code.package.__init__ |
|
||||
| __init__.py:0 | module_0 | Exit node for Module code.package.__init__ |
|
||||
| __init__.py:0 | sys_2 | Exit node for Module code.test_package.__init__ |
|
||||
| __init__.py:1 | *_0 | ControlFlowNode for from module1 import * |
|
||||
| __init__.py:1 | __name___0 | ControlFlowNode for from module1 import * |
|
||||
| __init__.py:1 | __package___0 | ControlFlowNode for from module1 import * |
|
||||
| __init__.py:1 | sys_0 | ControlFlowNode for from module1 import * |
|
||||
| __init__.py:2 | *_1 | ControlFlowNode for from module2 import * |
|
||||
| __init__.py:2 | __name___1 | ControlFlowNode for from module2 import * |
|
||||
| __init__.py:2 | __package___1 | ControlFlowNode for from module2 import * |
|
||||
| __init__.py:2 | sys_1 | ControlFlowNode for from module2 import * |
|
||||
|
||||
@@ -5,5 +5,5 @@ import semmle.python.pointsto.PointsTo
|
||||
import Util
|
||||
|
||||
from EssaVariable var, ControlFlowNode use
|
||||
where use = var.getAUse()
|
||||
where use = var.getAUse() and not var.getSourceVariable() instanceof SpecialSsaSourceVariable
|
||||
select locate(use.getLocation(), "abdeghjks_"), var.getRepresentation(), use.toString()
|
||||
|
||||
Reference in New Issue
Block a user