Skip to content

Commit 29c6d22

Browse files
committed
C#: Add test exposing missing delegate flow
1 parent 25adcfc commit 29c6d22

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

csharp/ql/test/library-tests/dataflow/global/GetAnOutNode.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@
196196
| GlobalDataFlow.cs:472:25:472:50 | call to method ConfigureAwait | return | GlobalDataFlow.cs:472:25:472:50 | call to method ConfigureAwait |
197197
| GlobalDataFlow.cs:473:23:473:44 | call to method GetAwaiter | return | GlobalDataFlow.cs:473:23:473:44 | call to method GetAwaiter |
198198
| GlobalDataFlow.cs:474:22:474:40 | call to method GetResult | return | GlobalDataFlow.cs:474:22:474:40 | call to method GetResult |
199-
| GlobalDataFlow.cs:486:44:486:47 | delegate call | return | GlobalDataFlow.cs:486:44:486:47 | delegate call |
199+
| GlobalDataFlow.cs:498:44:498:47 | delegate call | return | GlobalDataFlow.cs:498:44:498:47 | delegate call |
200200
| Splitting.cs:8:17:8:31 | [b (line 3): false] call to method Return | return | Splitting.cs:8:17:8:31 | [b (line 3): false] call to method Return |
201201
| Splitting.cs:8:17:8:31 | [b (line 3): true] call to method Return | return | Splitting.cs:8:17:8:31 | [b (line 3): true] call to method Return |
202202
| Splitting.cs:20:22:20:30 | call to method Return | return | Splitting.cs:20:22:20:30 | call to method Return |

csharp/ql/test/library-tests/dataflow/global/GlobalDataFlow.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,18 @@ public void M4()
474474
var sink45 = awaiter.GetResult();
475475
Check(sink45);
476476
}
477+
478+
void M5(bool b)
479+
{
480+
void Inner(Action<string> a, bool b, string arg)
481+
{
482+
if (b)
483+
a = s => Check(s);
484+
a(arg);
485+
}
486+
487+
Inner(_ => {}, b, "taint source");
488+
}
477489
}
478490

479491
static class IEnumerableExtensions

0 commit comments

Comments
 (0)