Skip to content

Commit d5209cc

Browse files
committed
C#: Update the pattern flow test and expected output.
1 parent cfe468f commit d5209cc

2 files changed

Lines changed: 45 additions & 1 deletion

File tree

‎csharp/ql/test/library-tests/dataflow/patterns/PatternFlow.expected‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,26 @@ edges
5252
| Patterns.cs:45:18:45:54 | { ... } : Nested [property Record, property Prop] : Object | Patterns.cs:45:35:45:52 | { ... } : RecordClass [property Prop] : Object | provenance | |
5353
| Patterns.cs:45:35:45:52 | { ... } : RecordClass [property Prop] : Object | Patterns.cs:47:18:47:18 | access to local variable p | provenance | |
5454
| Patterns.cs:45:35:45:52 | { ... } : RecordClass [property Prop] : Object | Patterns.cs:47:18:47:18 | access to local variable p | provenance | |
55+
| Patterns.cs:53:13:53:13 | access to local variable o : Object | Patterns.cs:54:44:54:44 | access to local variable o : Object | provenance | |
56+
| Patterns.cs:53:13:53:13 | access to local variable o : Object | Patterns.cs:54:44:54:44 | access to local variable o : Object | provenance | |
57+
| Patterns.cs:53:17:53:33 | call to method Source<Object> : Object | Patterns.cs:53:13:53:13 | access to local variable o : Object | provenance | |
58+
| Patterns.cs:53:17:53:33 | call to method Source<Object> : Object | Patterns.cs:53:13:53:13 | access to local variable o : Object | provenance | |
59+
| Patterns.cs:54:13:54:13 | access to local variable s : Nested [property Record, property Prop] : Object | Patterns.cs:55:18:55:49 | { ... } : Nested [property Record, property Prop] : Object | provenance | |
60+
| Patterns.cs:54:13:54:13 | access to local variable s : Nested [property Record, property Prop] : Object | Patterns.cs:55:18:55:49 | { ... } : Nested [property Record, property Prop] : Object | provenance | |
61+
| Patterns.cs:54:17:54:46 | object creation of type Nested : Nested [property Record, property Prop] : Object | Patterns.cs:54:13:54:13 | access to local variable s : Nested [property Record, property Prop] : Object | provenance | |
62+
| Patterns.cs:54:17:54:46 | object creation of type Nested : Nested [property Record, property Prop] : Object | Patterns.cs:54:13:54:13 | access to local variable s : Nested [property Record, property Prop] : Object | provenance | |
63+
| Patterns.cs:54:28:54:45 | object creation of type RecordClass : RecordClass [property Prop] : Object | Patterns.cs:5:40:5:45 | Record : RecordClass [property Prop] : Object | provenance | |
64+
| Patterns.cs:54:28:54:45 | object creation of type RecordClass : RecordClass [property Prop] : Object | Patterns.cs:5:40:5:45 | Record : RecordClass [property Prop] : Object | provenance | |
65+
| Patterns.cs:54:28:54:45 | object creation of type RecordClass : RecordClass [property Prop] : Object | Patterns.cs:54:17:54:46 | object creation of type Nested : Nested [property Record, property Prop] : Object | provenance | |
66+
| Patterns.cs:54:28:54:45 | object creation of type RecordClass : RecordClass [property Prop] : Object | Patterns.cs:54:17:54:46 | object creation of type Nested : Nested [property Record, property Prop] : Object | provenance | |
67+
| Patterns.cs:54:44:54:44 | access to local variable o : Object | Patterns.cs:3:40:3:43 | Prop : Object | provenance | |
68+
| Patterns.cs:54:44:54:44 | access to local variable o : Object | Patterns.cs:3:40:3:43 | Prop : Object | provenance | |
69+
| Patterns.cs:54:44:54:44 | access to local variable o : Object | Patterns.cs:54:28:54:45 | object creation of type RecordClass : RecordClass [property Prop] : Object | provenance | |
70+
| Patterns.cs:54:44:54:44 | access to local variable o : Object | Patterns.cs:54:28:54:45 | object creation of type RecordClass : RecordClass [property Prop] : Object | provenance | |
71+
| Patterns.cs:55:18:55:49 | { ... } : Nested [property Record, property Prop] : Object | Patterns.cs:55:27:55:32 | { ... } : null [property Prop] : Object | provenance | |
72+
| Patterns.cs:55:18:55:49 | { ... } : Nested [property Record, property Prop] : Object | Patterns.cs:55:27:55:32 | { ... } : null [property Prop] : Object | provenance | |
73+
| Patterns.cs:55:27:55:32 | { ... } : null [property Prop] : Object | Patterns.cs:57:18:57:18 | access to local variable p | provenance | |
74+
| Patterns.cs:55:27:55:32 | { ... } : null [property Prop] : Object | Patterns.cs:57:18:57:18 | access to local variable p | provenance | |
5575
| Patterns.cs:63:13:63:13 | access to local variable o : Object | Patterns.cs:64:41:64:41 | access to local variable o : Object | provenance | |
5676
| Patterns.cs:63:13:63:13 | access to local variable o : Object | Patterns.cs:64:41:64:41 | access to local variable o : Object | provenance | |
5777
| Patterns.cs:63:17:63:33 | call to method Source<Object> : Object | Patterns.cs:63:13:63:13 | access to local variable o : Object | provenance | |
@@ -187,6 +207,24 @@ nodes
187207
| Patterns.cs:45:35:45:52 | { ... } : RecordClass [property Prop] : Object | semmle.label | { ... } : RecordClass [property Prop] : Object |
188208
| Patterns.cs:47:18:47:18 | access to local variable p | semmle.label | access to local variable p |
189209
| Patterns.cs:47:18:47:18 | access to local variable p | semmle.label | access to local variable p |
210+
| Patterns.cs:53:13:53:13 | access to local variable o : Object | semmle.label | access to local variable o : Object |
211+
| Patterns.cs:53:13:53:13 | access to local variable o : Object | semmle.label | access to local variable o : Object |
212+
| Patterns.cs:53:17:53:33 | call to method Source<Object> : Object | semmle.label | call to method Source<Object> : Object |
213+
| Patterns.cs:53:17:53:33 | call to method Source<Object> : Object | semmle.label | call to method Source<Object> : Object |
214+
| Patterns.cs:54:13:54:13 | access to local variable s : Nested [property Record, property Prop] : Object | semmle.label | access to local variable s : Nested [property Record, property Prop] : Object |
215+
| Patterns.cs:54:13:54:13 | access to local variable s : Nested [property Record, property Prop] : Object | semmle.label | access to local variable s : Nested [property Record, property Prop] : Object |
216+
| Patterns.cs:54:17:54:46 | object creation of type Nested : Nested [property Record, property Prop] : Object | semmle.label | object creation of type Nested : Nested [property Record, property Prop] : Object |
217+
| Patterns.cs:54:17:54:46 | object creation of type Nested : Nested [property Record, property Prop] : Object | semmle.label | object creation of type Nested : Nested [property Record, property Prop] : Object |
218+
| Patterns.cs:54:28:54:45 | object creation of type RecordClass : RecordClass [property Prop] : Object | semmle.label | object creation of type RecordClass : RecordClass [property Prop] : Object |
219+
| Patterns.cs:54:28:54:45 | object creation of type RecordClass : RecordClass [property Prop] : Object | semmle.label | object creation of type RecordClass : RecordClass [property Prop] : Object |
220+
| Patterns.cs:54:44:54:44 | access to local variable o : Object | semmle.label | access to local variable o : Object |
221+
| Patterns.cs:54:44:54:44 | access to local variable o : Object | semmle.label | access to local variable o : Object |
222+
| Patterns.cs:55:18:55:49 | { ... } : Nested [property Record, property Prop] : Object | semmle.label | { ... } : Nested [property Record, property Prop] : Object |
223+
| Patterns.cs:55:18:55:49 | { ... } : Nested [property Record, property Prop] : Object | semmle.label | { ... } : Nested [property Record, property Prop] : Object |
224+
| Patterns.cs:55:27:55:32 | { ... } : null [property Prop] : Object | semmle.label | { ... } : null [property Prop] : Object |
225+
| Patterns.cs:55:27:55:32 | { ... } : null [property Prop] : Object | semmle.label | { ... } : null [property Prop] : Object |
226+
| Patterns.cs:57:18:57:18 | access to local variable p | semmle.label | access to local variable p |
227+
| Patterns.cs:57:18:57:18 | access to local variable p | semmle.label | access to local variable p |
190228
| Patterns.cs:63:13:63:13 | access to local variable o : Object | semmle.label | access to local variable o : Object |
191229
| Patterns.cs:63:13:63:13 | access to local variable o : Object | semmle.label | access to local variable o : Object |
192230
| Patterns.cs:63:17:63:33 | call to method Source<Object> : Object | semmle.label | call to method Source<Object> : Object |
@@ -278,6 +316,10 @@ subpaths
278316
| Patterns.cs:44:28:44:45 | object creation of type RecordClass : RecordClass [property Prop] : Object | Patterns.cs:5:40:5:45 | Record : RecordClass [property Prop] : Object | Patterns.cs:5:21:5:26 | this [Return] : Nested [property Record, property Prop] : Object | Patterns.cs:44:17:44:46 | object creation of type Nested : Nested [property Record, property Prop] : Object |
279317
| Patterns.cs:44:44:44:44 | access to local variable o : Object | Patterns.cs:3:40:3:43 | Prop : Object | Patterns.cs:3:21:3:31 | this [Return] : RecordClass [property Prop] : Object | Patterns.cs:44:28:44:45 | object creation of type RecordClass : RecordClass [property Prop] : Object |
280318
| Patterns.cs:44:44:44:44 | access to local variable o : Object | Patterns.cs:3:40:3:43 | Prop : Object | Patterns.cs:3:21:3:31 | this [Return] : RecordClass [property Prop] : Object | Patterns.cs:44:28:44:45 | object creation of type RecordClass : RecordClass [property Prop] : Object |
319+
| Patterns.cs:54:28:54:45 | object creation of type RecordClass : RecordClass [property Prop] : Object | Patterns.cs:5:40:5:45 | Record : RecordClass [property Prop] : Object | Patterns.cs:5:21:5:26 | this [Return] : Nested [property Record, property Prop] : Object | Patterns.cs:54:17:54:46 | object creation of type Nested : Nested [property Record, property Prop] : Object |
320+
| Patterns.cs:54:28:54:45 | object creation of type RecordClass : RecordClass [property Prop] : Object | Patterns.cs:5:40:5:45 | Record : RecordClass [property Prop] : Object | Patterns.cs:5:21:5:26 | this [Return] : Nested [property Record, property Prop] : Object | Patterns.cs:54:17:54:46 | object creation of type Nested : Nested [property Record, property Prop] : Object |
321+
| Patterns.cs:54:44:54:44 | access to local variable o : Object | Patterns.cs:3:40:3:43 | Prop : Object | Patterns.cs:3:21:3:31 | this [Return] : RecordClass [property Prop] : Object | Patterns.cs:54:28:54:45 | object creation of type RecordClass : RecordClass [property Prop] : Object |
322+
| Patterns.cs:54:44:54:44 | access to local variable o : Object | Patterns.cs:3:40:3:43 | Prop : Object | Patterns.cs:3:21:3:31 | this [Return] : RecordClass [property Prop] : Object | Patterns.cs:54:28:54:45 | object creation of type RecordClass : RecordClass [property Prop] : Object |
281323
| Patterns.cs:74:28:74:45 | object creation of type RecordClass : RecordClass [property Prop] : Object | Patterns.cs:5:40:5:45 | Record : RecordClass [property Prop] : Object | Patterns.cs:5:21:5:26 | this [Return] : Nested [property Record, property Prop] : Object | Patterns.cs:74:17:74:46 | object creation of type Nested : Nested [property Record, property Prop] : Object |
282324
| Patterns.cs:74:28:74:45 | object creation of type RecordClass : RecordClass [property Prop] : Object | Patterns.cs:5:40:5:45 | Record : RecordClass [property Prop] : Object | Patterns.cs:5:21:5:26 | this [Return] : Nested [property Record, property Prop] : Object | Patterns.cs:74:17:74:46 | object creation of type Nested : Nested [property Record, property Prop] : Object |
283325
| Patterns.cs:74:44:74:44 | access to local variable o : Object | Patterns.cs:3:40:3:43 | Prop : Object | Patterns.cs:3:21:3:31 | this [Return] : RecordClass [property Prop] : Object | Patterns.cs:74:28:74:45 | object creation of type RecordClass : RecordClass [property Prop] : Object |
@@ -294,6 +336,8 @@ testFailures
294336
| Patterns.cs:36:22:36:22 | access to local variable p | Patterns.cs:31:17:31:33 | call to method Source<Object> : Object | Patterns.cs:36:22:36:22 | access to local variable p | $@ | Patterns.cs:31:17:31:33 | call to method Source<Object> : Object | call to method Source<Object> : Object |
295337
| Patterns.cs:47:18:47:18 | access to local variable p | Patterns.cs:43:17:43:33 | call to method Source<Object> : Object | Patterns.cs:47:18:47:18 | access to local variable p | $@ | Patterns.cs:43:17:43:33 | call to method Source<Object> : Object | call to method Source<Object> : Object |
296338
| Patterns.cs:47:18:47:18 | access to local variable p | Patterns.cs:43:17:43:33 | call to method Source<Object> : Object | Patterns.cs:47:18:47:18 | access to local variable p | $@ | Patterns.cs:43:17:43:33 | call to method Source<Object> : Object | call to method Source<Object> : Object |
339+
| Patterns.cs:57:18:57:18 | access to local variable p | Patterns.cs:53:17:53:33 | call to method Source<Object> : Object | Patterns.cs:57:18:57:18 | access to local variable p | $@ | Patterns.cs:53:17:53:33 | call to method Source<Object> : Object | call to method Source<Object> : Object |
340+
| Patterns.cs:57:18:57:18 | access to local variable p | Patterns.cs:53:17:53:33 | call to method Source<Object> : Object | Patterns.cs:57:18:57:18 | access to local variable p | $@ | Patterns.cs:53:17:53:33 | call to method Source<Object> : Object | call to method Source<Object> : Object |
297341
| Patterns.cs:67:18:67:18 | access to local variable p | Patterns.cs:63:17:63:33 | call to method Source<Object> : Object | Patterns.cs:67:18:67:18 | access to local variable p | $@ | Patterns.cs:63:17:63:33 | call to method Source<Object> : Object | call to method Source<Object> : Object |
298342
| Patterns.cs:67:18:67:18 | access to local variable p | Patterns.cs:63:17:63:33 | call to method Source<Object> : Object | Patterns.cs:67:18:67:18 | access to local variable p | $@ | Patterns.cs:63:17:63:33 | call to method Source<Object> : Object | call to method Source<Object> : Object |
299343
| Patterns.cs:77:18:77:23 | access to property Prop | Patterns.cs:73:17:73:33 | call to method Source<Object> : Object | Patterns.cs:77:18:77:23 | access to property Prop | $@ | Patterns.cs:73:17:73:33 | call to method Source<Object> : Object | call to method Source<Object> : Object |

‎csharp/ql/test/library-tests/dataflow/patterns/Patterns.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ private void M4()
5454
var s = new Nested(new RecordClass(o));
5555
if (s is Nested { Record.Prop: object p })
5656
{
57-
Sink(p); // $ MISSING: hasValueFlow=4
57+
Sink(p); // $ hasValueFlow=4
5858
}
5959
}
6060

0 commit comments

Comments
 (0)