Skip to content

Commit abe4d8d

Browse files
committed
Python: Accept global field-flow inconsistencies
Yikes
1 parent 94d23f3 commit abe4d8d

File tree

1 file changed

+8
-6
lines changed
  • python/ql/test/experimental/dataflow/fieldflow

1 file changed

+8
-6
lines changed

python/ql/test/experimental/dataflow/fieldflow/test.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,9 @@ def test_global_funcs():
218218
if cond:
219219
myobj.foo = NONSOURCE
220220
SINK_F(myobj.foo)
221-
SINK(myobj.foo) # $ flow="SOURCE, l:-4 -> myobj.foo"
221+
# SPLITTING happens here, so in one version there is flow, and in the other there isn't
222+
# that's why it has both a flow and a MISSING: flow annotation
223+
SINK(myobj.foo) # $ flow="SOURCE, l:-6 -> myobj.foo" MISSING: flow
222224

223225

224226

@@ -259,16 +261,16 @@ def test_global_funcs():
259261

260262

261263

262-
obj = MyObj(SOURCE)
263-
SINK(obj.foo) # $ flow="SOURCE, l:-1 -> obj.foo"
264+
obj2 = MyObj(SOURCE)
265+
SINK(obj2.foo) # $ MISSING: flow="SOURCE, l:-1 -> obj2.foo"
264266

265267

266268

267-
obj = MyObj(foo=SOURCE)
268-
SINK(obj.foo) # $ flow="SOURCE, l:-1 -> obj.foo"
269+
obj3 = MyObj(foo=SOURCE)
270+
SINK(obj3.foo) # $ MISSING: flow="SOURCE, l:-1 -> obj3.foo"
269271

270272

271-
SINK(fields_with_local_flow(SOURCE)) # $ flow="SOURCE -> fields_with_local_flow(..)"
273+
SINK(fields_with_local_flow(SOURCE)) # $ MISSING: flow="SOURCE -> fields_with_local_flow(..)"
272274

273275
# ------------------------------------------------------------------------------
274276
# Nested Object

0 commit comments

Comments
 (0)