mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
C#: Add CFG tests for foreach statements with multipe variable declarations
This commit is contained in:
@@ -231,6 +231,18 @@
|
||||
| Foreach.cs:20:22:20:22 | String x | Foreach.cs:21:11:21:11 | ; | 2 |
|
||||
| Foreach.cs:20:29:20:38 | call to method ToArray | Foreach.cs:20:29:20:38 | call to method ToArray | 1 |
|
||||
| Foreach.cs:20:43:20:68 | call to method Empty | Foreach.cs:20:43:20:68 | call to method Empty | 1 |
|
||||
| Foreach.cs:24:10:24:11 | enter M4 | Foreach.cs:26:36:26:39 | access to parameter args | 3 |
|
||||
| Foreach.cs:24:10:24:11 | exit M4 | Foreach.cs:24:10:24:11 | exit M4 | 1 |
|
||||
| Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | 1 |
|
||||
| Foreach.cs:27:11:27:11 | ; | Foreach.cs:27:11:27:11 | ; | 1 |
|
||||
| Foreach.cs:30:10:30:11 | enter M5 | Foreach.cs:32:32:32:35 | access to parameter args | 3 |
|
||||
| Foreach.cs:30:10:30:11 | exit M5 | Foreach.cs:30:10:30:11 | exit M5 | 1 |
|
||||
| Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | 1 |
|
||||
| Foreach.cs:33:11:33:11 | ; | Foreach.cs:33:11:33:11 | ; | 1 |
|
||||
| Foreach.cs:36:10:36:11 | enter M6 | Foreach.cs:38:39:38:42 | access to parameter args | 3 |
|
||||
| Foreach.cs:36:10:36:11 | exit M6 | Foreach.cs:36:10:36:11 | exit M6 | 1 |
|
||||
| Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | 1 |
|
||||
| Foreach.cs:39:11:39:11 | ; | Foreach.cs:39:11:39:11 | ; | 1 |
|
||||
| Initializers.cs:6:5:6:16 | enter Initializers | Initializers.cs:6:5:6:16 | exit Initializers | 3 |
|
||||
| Initializers.cs:8:10:8:10 | enter M | Initializers.cs:8:10:8:10 | exit M | 23 |
|
||||
| NullCoalescing.cs:3:9:3:10 | enter M1 | NullCoalescing.cs:3:23:3:23 | access to parameter i | 3 |
|
||||
|
||||
@@ -477,6 +477,33 @@
|
||||
| post | Foreach.cs:20:22:20:22 | String x | Foreach.cs:20:22:20:22 | String x |
|
||||
| post | Foreach.cs:20:29:20:38 | call to method ToArray | Foreach.cs:20:29:20:38 | call to method ToArray |
|
||||
| post | Foreach.cs:20:43:20:68 | call to method Empty | Foreach.cs:20:43:20:68 | call to method Empty |
|
||||
| post | Foreach.cs:24:10:24:11 | enter M4 | Foreach.cs:24:10:24:11 | enter M4 |
|
||||
| post | Foreach.cs:24:10:24:11 | exit M4 | Foreach.cs:24:10:24:11 | enter M4 |
|
||||
| post | Foreach.cs:24:10:24:11 | exit M4 | Foreach.cs:24:10:24:11 | exit M4 |
|
||||
| post | Foreach.cs:24:10:24:11 | exit M4 | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... |
|
||||
| post | Foreach.cs:24:10:24:11 | exit M4 | Foreach.cs:27:11:27:11 | ; |
|
||||
| post | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | Foreach.cs:24:10:24:11 | enter M4 |
|
||||
| post | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... |
|
||||
| post | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | Foreach.cs:27:11:27:11 | ; |
|
||||
| post | Foreach.cs:27:11:27:11 | ; | Foreach.cs:27:11:27:11 | ; |
|
||||
| post | Foreach.cs:30:10:30:11 | enter M5 | Foreach.cs:30:10:30:11 | enter M5 |
|
||||
| post | Foreach.cs:30:10:30:11 | exit M5 | Foreach.cs:30:10:30:11 | enter M5 |
|
||||
| post | Foreach.cs:30:10:30:11 | exit M5 | Foreach.cs:30:10:30:11 | exit M5 |
|
||||
| post | Foreach.cs:30:10:30:11 | exit M5 | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... |
|
||||
| post | Foreach.cs:30:10:30:11 | exit M5 | Foreach.cs:33:11:33:11 | ; |
|
||||
| post | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | Foreach.cs:30:10:30:11 | enter M5 |
|
||||
| post | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... |
|
||||
| post | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | Foreach.cs:33:11:33:11 | ; |
|
||||
| post | Foreach.cs:33:11:33:11 | ; | Foreach.cs:33:11:33:11 | ; |
|
||||
| post | Foreach.cs:36:10:36:11 | enter M6 | Foreach.cs:36:10:36:11 | enter M6 |
|
||||
| post | Foreach.cs:36:10:36:11 | exit M6 | Foreach.cs:36:10:36:11 | enter M6 |
|
||||
| post | Foreach.cs:36:10:36:11 | exit M6 | Foreach.cs:36:10:36:11 | exit M6 |
|
||||
| post | Foreach.cs:36:10:36:11 | exit M6 | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... |
|
||||
| post | Foreach.cs:36:10:36:11 | exit M6 | Foreach.cs:39:11:39:11 | ; |
|
||||
| post | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:36:10:36:11 | enter M6 |
|
||||
| post | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... |
|
||||
| post | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:39:11:39:11 | ; |
|
||||
| post | Foreach.cs:39:11:39:11 | ; | Foreach.cs:39:11:39:11 | ; |
|
||||
| post | Initializers.cs:6:5:6:16 | enter Initializers | Initializers.cs:6:5:6:16 | enter Initializers |
|
||||
| post | Initializers.cs:8:10:8:10 | enter M | Initializers.cs:8:10:8:10 | enter M |
|
||||
| post | NullCoalescing.cs:3:9:3:10 | enter M1 | NullCoalescing.cs:3:9:3:10 | enter M1 |
|
||||
@@ -1856,6 +1883,33 @@
|
||||
| pre | Foreach.cs:20:22:20:22 | String x | Foreach.cs:20:22:20:22 | String x |
|
||||
| pre | Foreach.cs:20:29:20:38 | call to method ToArray | Foreach.cs:20:29:20:38 | call to method ToArray |
|
||||
| pre | Foreach.cs:20:43:20:68 | call to method Empty | Foreach.cs:20:43:20:68 | call to method Empty |
|
||||
| pre | Foreach.cs:24:10:24:11 | enter M4 | Foreach.cs:24:10:24:11 | enter M4 |
|
||||
| pre | Foreach.cs:24:10:24:11 | enter M4 | Foreach.cs:24:10:24:11 | exit M4 |
|
||||
| pre | Foreach.cs:24:10:24:11 | enter M4 | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... |
|
||||
| pre | Foreach.cs:24:10:24:11 | enter M4 | Foreach.cs:27:11:27:11 | ; |
|
||||
| pre | Foreach.cs:24:10:24:11 | exit M4 | Foreach.cs:24:10:24:11 | exit M4 |
|
||||
| pre | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | Foreach.cs:24:10:24:11 | exit M4 |
|
||||
| pre | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... |
|
||||
| pre | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | Foreach.cs:27:11:27:11 | ; |
|
||||
| pre | Foreach.cs:27:11:27:11 | ; | Foreach.cs:27:11:27:11 | ; |
|
||||
| pre | Foreach.cs:30:10:30:11 | enter M5 | Foreach.cs:30:10:30:11 | enter M5 |
|
||||
| pre | Foreach.cs:30:10:30:11 | enter M5 | Foreach.cs:30:10:30:11 | exit M5 |
|
||||
| pre | Foreach.cs:30:10:30:11 | enter M5 | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... |
|
||||
| pre | Foreach.cs:30:10:30:11 | enter M5 | Foreach.cs:33:11:33:11 | ; |
|
||||
| pre | Foreach.cs:30:10:30:11 | exit M5 | Foreach.cs:30:10:30:11 | exit M5 |
|
||||
| pre | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | Foreach.cs:30:10:30:11 | exit M5 |
|
||||
| pre | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... |
|
||||
| pre | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | Foreach.cs:33:11:33:11 | ; |
|
||||
| pre | Foreach.cs:33:11:33:11 | ; | Foreach.cs:33:11:33:11 | ; |
|
||||
| pre | Foreach.cs:36:10:36:11 | enter M6 | Foreach.cs:36:10:36:11 | enter M6 |
|
||||
| pre | Foreach.cs:36:10:36:11 | enter M6 | Foreach.cs:36:10:36:11 | exit M6 |
|
||||
| pre | Foreach.cs:36:10:36:11 | enter M6 | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... |
|
||||
| pre | Foreach.cs:36:10:36:11 | enter M6 | Foreach.cs:39:11:39:11 | ; |
|
||||
| pre | Foreach.cs:36:10:36:11 | exit M6 | Foreach.cs:36:10:36:11 | exit M6 |
|
||||
| pre | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:36:10:36:11 | exit M6 |
|
||||
| pre | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... |
|
||||
| pre | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:39:11:39:11 | ; |
|
||||
| pre | Foreach.cs:39:11:39:11 | ; | Foreach.cs:39:11:39:11 | ; |
|
||||
| pre | Initializers.cs:6:5:6:16 | enter Initializers | Initializers.cs:6:5:6:16 | enter Initializers |
|
||||
| pre | Initializers.cs:8:10:8:10 | enter M | Initializers.cs:8:10:8:10 | enter M |
|
||||
| pre | NullCoalescing.cs:3:9:3:10 | enter M1 | NullCoalescing.cs:3:9:3:10 | enter M1 |
|
||||
|
||||
@@ -183,6 +183,12 @@
|
||||
| Foreach.cs:20:9:21:11 | foreach (... ... in ...) ... | Foreach.cs:18:10:18:11 | exit M3 | true |
|
||||
| Foreach.cs:20:9:21:11 | foreach (... ... in ...) ... | Foreach.cs:20:22:20:22 | String x | false |
|
||||
| Foreach.cs:20:27:20:27 | access to parameter e | Foreach.cs:20:29:20:38 | call to method ToArray | false |
|
||||
| Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | Foreach.cs:24:10:24:11 | exit M4 | true |
|
||||
| Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | Foreach.cs:27:11:27:11 | ; | false |
|
||||
| Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | Foreach.cs:30:10:30:11 | exit M5 | true |
|
||||
| Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | Foreach.cs:33:11:33:11 | ; | false |
|
||||
| Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:36:10:36:11 | exit M6 | true |
|
||||
| Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:39:11:39:11 | ; | false |
|
||||
| NullCoalescing.cs:3:23:3:23 | access to parameter i | NullCoalescing.cs:3:28:3:28 | 0 | true |
|
||||
| NullCoalescing.cs:5:25:5:25 | access to parameter b | NullCoalescing.cs:5:30:5:34 | false | true |
|
||||
| NullCoalescing.cs:5:25:5:25 | access to parameter b | NullCoalescing.cs:5:39:5:39 | 0 | true |
|
||||
|
||||
@@ -872,6 +872,21 @@
|
||||
| post | Foreach.cs:20:27:20:27 | access to parameter e | Foreach.cs:20:27:20:68 | ... ?? ... |
|
||||
| post | Foreach.cs:20:27:20:68 | ... ?? ... | Foreach.cs:19:5:22:5 | {...} |
|
||||
| post | Foreach.cs:21:11:21:11 | ; | Foreach.cs:20:22:20:22 | String x |
|
||||
| post | Foreach.cs:24:10:24:11 | exit M4 | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... |
|
||||
| post | Foreach.cs:25:5:28:5 | {...} | Foreach.cs:24:10:24:11 | enter M4 |
|
||||
| post | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | Foreach.cs:26:36:26:39 | access to parameter args |
|
||||
| post | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | Foreach.cs:27:11:27:11 | ; |
|
||||
| post | Foreach.cs:26:36:26:39 | access to parameter args | Foreach.cs:25:5:28:5 | {...} |
|
||||
| post | Foreach.cs:30:10:30:11 | exit M5 | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... |
|
||||
| post | Foreach.cs:31:5:34:5 | {...} | Foreach.cs:30:10:30:11 | enter M5 |
|
||||
| post | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | Foreach.cs:32:32:32:35 | access to parameter args |
|
||||
| post | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | Foreach.cs:33:11:33:11 | ; |
|
||||
| post | Foreach.cs:32:32:32:35 | access to parameter args | Foreach.cs:31:5:34:5 | {...} |
|
||||
| post | Foreach.cs:36:10:36:11 | exit M6 | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... |
|
||||
| post | Foreach.cs:37:5:40:5 | {...} | Foreach.cs:36:10:36:11 | enter M6 |
|
||||
| post | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:38:39:38:42 | access to parameter args |
|
||||
| post | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:39:11:39:11 | ; |
|
||||
| post | Foreach.cs:38:39:38:42 | access to parameter args | Foreach.cs:37:5:40:5 | {...} |
|
||||
| post | Initializers.cs:6:5:6:16 | exit Initializers | Initializers.cs:6:28:6:30 | {...} |
|
||||
| post | Initializers.cs:6:28:6:30 | {...} | Initializers.cs:6:5:6:16 | enter Initializers |
|
||||
| post | Initializers.cs:8:10:8:10 | exit M | Initializers.cs:11:13:11:63 | Initializers[] iz = ... |
|
||||
@@ -3093,6 +3108,21 @@
|
||||
| pre | Foreach.cs:20:27:20:27 | access to parameter e | Foreach.cs:20:29:20:38 | call to method ToArray |
|
||||
| pre | Foreach.cs:20:27:20:27 | access to parameter e | Foreach.cs:20:43:20:68 | call to method Empty |
|
||||
| pre | Foreach.cs:20:27:20:68 | ... ?? ... | Foreach.cs:20:27:20:27 | access to parameter e |
|
||||
| pre | Foreach.cs:24:10:24:11 | enter M4 | Foreach.cs:25:5:28:5 | {...} |
|
||||
| pre | Foreach.cs:25:5:28:5 | {...} | Foreach.cs:26:36:26:39 | access to parameter args |
|
||||
| pre | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | Foreach.cs:24:10:24:11 | exit M4 |
|
||||
| pre | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | Foreach.cs:27:11:27:11 | ; |
|
||||
| pre | Foreach.cs:26:36:26:39 | access to parameter args | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... |
|
||||
| pre | Foreach.cs:30:10:30:11 | enter M5 | Foreach.cs:31:5:34:5 | {...} |
|
||||
| pre | Foreach.cs:31:5:34:5 | {...} | Foreach.cs:32:32:32:35 | access to parameter args |
|
||||
| pre | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | Foreach.cs:30:10:30:11 | exit M5 |
|
||||
| pre | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | Foreach.cs:33:11:33:11 | ; |
|
||||
| pre | Foreach.cs:32:32:32:35 | access to parameter args | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... |
|
||||
| pre | Foreach.cs:36:10:36:11 | enter M6 | Foreach.cs:37:5:40:5 | {...} |
|
||||
| pre | Foreach.cs:37:5:40:5 | {...} | Foreach.cs:38:39:38:42 | access to parameter args |
|
||||
| pre | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:36:10:36:11 | exit M6 |
|
||||
| pre | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:39:11:39:11 | ; |
|
||||
| pre | Foreach.cs:38:39:38:42 | access to parameter args | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... |
|
||||
| pre | Initializers.cs:6:5:6:16 | enter Initializers | Initializers.cs:6:28:6:30 | {...} |
|
||||
| pre | Initializers.cs:6:28:6:30 | {...} | Initializers.cs:6:5:6:16 | exit Initializers |
|
||||
| pre | Initializers.cs:8:10:8:10 | enter M | Initializers.cs:9:5:12:5 | {...} |
|
||||
|
||||
@@ -664,6 +664,18 @@
|
||||
| Foreach.cs:20:29:20:38 | call to method ToArray | Foreach.cs:20:43:20:68 | call to method Empty | semmle.label | null |
|
||||
| Foreach.cs:20:43:20:68 | call to method Empty | Foreach.cs:20:9:21:11 | foreach (... ... in ...) ... | semmle.label | successor |
|
||||
| Foreach.cs:21:11:21:11 | ; | Foreach.cs:20:9:21:11 | foreach (... ... in ...) ... | semmle.label | successor |
|
||||
| Foreach.cs:25:5:28:5 | {...} | Foreach.cs:26:36:26:39 | access to parameter args | semmle.label | successor |
|
||||
| Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | Foreach.cs:27:11:27:11 | ; | semmle.label | non-empty |
|
||||
| Foreach.cs:26:36:26:39 | access to parameter args | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | semmle.label | successor |
|
||||
| Foreach.cs:27:11:27:11 | ; | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | semmle.label | successor |
|
||||
| Foreach.cs:31:5:34:5 | {...} | Foreach.cs:32:32:32:35 | access to parameter args | semmle.label | successor |
|
||||
| Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | Foreach.cs:33:11:33:11 | ; | semmle.label | non-empty |
|
||||
| Foreach.cs:32:32:32:35 | access to parameter args | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | semmle.label | successor |
|
||||
| Foreach.cs:33:11:33:11 | ; | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | semmle.label | successor |
|
||||
| Foreach.cs:37:5:40:5 | {...} | Foreach.cs:38:39:38:42 | access to parameter args | semmle.label | successor |
|
||||
| Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:39:11:39:11 | ; | semmle.label | non-empty |
|
||||
| Foreach.cs:38:39:38:42 | access to parameter args | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | semmle.label | successor |
|
||||
| Foreach.cs:39:11:39:11 | ; | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | semmle.label | successor |
|
||||
| Initializers.cs:9:5:12:5 | {...} | Initializers.cs:10:9:10:54 | ... ...; | semmle.label | successor |
|
||||
| Initializers.cs:10:9:10:54 | ... ...; | Initializers.cs:10:13:10:13 | access to local variable i | semmle.label | successor |
|
||||
| Initializers.cs:10:13:10:13 | access to local variable i | Initializers.cs:10:34:10:35 | "" | semmle.label | successor |
|
||||
|
||||
@@ -706,6 +706,27 @@
|
||||
| Foreach.cs:20:29:20:38 | call to method ToArray | Foreach.cs:20:27:20:27 | access to parameter e |
|
||||
| Foreach.cs:20:43:20:68 | call to method Empty | Foreach.cs:20:43:20:68 | call to method Empty |
|
||||
| Foreach.cs:21:11:21:11 | ; | Foreach.cs:21:11:21:11 | ; |
|
||||
| Foreach.cs:25:5:28:5 | {...} | Foreach.cs:25:5:28:5 | {...} |
|
||||
| Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | Foreach.cs:26:36:26:39 | access to parameter args |
|
||||
| Foreach.cs:26:18:26:31 | (..., ...) | Foreach.cs:26:23:26:23 | String x |
|
||||
| Foreach.cs:26:23:26:23 | String x | Foreach.cs:26:23:26:23 | String x |
|
||||
| Foreach.cs:26:30:26:30 | Int32 y | Foreach.cs:26:30:26:30 | Int32 y |
|
||||
| Foreach.cs:26:36:26:39 | access to parameter args | Foreach.cs:26:36:26:39 | access to parameter args |
|
||||
| Foreach.cs:27:11:27:11 | ; | Foreach.cs:27:11:27:11 | ; |
|
||||
| Foreach.cs:31:5:34:5 | {...} | Foreach.cs:31:5:34:5 | {...} |
|
||||
| Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | Foreach.cs:32:32:32:35 | access to parameter args |
|
||||
| Foreach.cs:32:18:32:27 | (..., ...) | Foreach.cs:32:23:32:23 | String x |
|
||||
| Foreach.cs:32:23:32:23 | String x | Foreach.cs:32:23:32:23 | String x |
|
||||
| Foreach.cs:32:26:32:26 | Int32 y | Foreach.cs:32:26:32:26 | Int32 y |
|
||||
| Foreach.cs:32:32:32:35 | access to parameter args | Foreach.cs:32:32:32:35 | access to parameter args |
|
||||
| Foreach.cs:33:11:33:11 | ; | Foreach.cs:33:11:33:11 | ; |
|
||||
| Foreach.cs:37:5:40:5 | {...} | Foreach.cs:37:5:40:5 | {...} |
|
||||
| Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:38:39:38:42 | access to parameter args |
|
||||
| Foreach.cs:38:18:38:34 | (..., ...) | Foreach.cs:38:26:38:26 | String x |
|
||||
| Foreach.cs:38:26:38:26 | String x | Foreach.cs:38:26:38:26 | String x |
|
||||
| Foreach.cs:38:33:38:33 | Int32 y | Foreach.cs:38:33:38:33 | Int32 y |
|
||||
| Foreach.cs:38:39:38:42 | access to parameter args | Foreach.cs:38:39:38:42 | access to parameter args |
|
||||
| Foreach.cs:39:11:39:11 | ; | Foreach.cs:39:11:39:11 | ; |
|
||||
| Initializers.cs:6:28:6:30 | {...} | Initializers.cs:6:28:6:30 | {...} |
|
||||
| Initializers.cs:9:5:12:5 | {...} | Initializers.cs:9:5:12:5 | {...} |
|
||||
| Initializers.cs:10:9:10:54 | ... ...; | Initializers.cs:10:9:10:54 | ... ...; |
|
||||
|
||||
@@ -62,6 +62,9 @@
|
||||
| Foreach.cs:6:10:6:11 | M1 | Foreach.cs:7:5:10:5 | {...} |
|
||||
| Foreach.cs:12:10:12:11 | M2 | Foreach.cs:13:5:16:5 | {...} |
|
||||
| Foreach.cs:18:10:18:11 | M3 | Foreach.cs:19:5:22:5 | {...} |
|
||||
| Foreach.cs:24:10:24:11 | M4 | Foreach.cs:25:5:28:5 | {...} |
|
||||
| Foreach.cs:30:10:30:11 | M5 | Foreach.cs:31:5:34:5 | {...} |
|
||||
| Foreach.cs:36:10:36:11 | M6 | Foreach.cs:37:5:40:5 | {...} |
|
||||
| Initializers.cs:6:5:6:16 | Initializers | Initializers.cs:6:28:6:30 | {...} |
|
||||
| Initializers.cs:8:10:8:10 | M | Initializers.cs:9:5:12:5 | {...} |
|
||||
| NullCoalescing.cs:3:9:3:10 | M1 | NullCoalescing.cs:3:23:3:28 | ... ?? ... |
|
||||
|
||||
@@ -948,6 +948,27 @@
|
||||
| Foreach.cs:20:29:20:38 | call to method ToArray | Foreach.cs:20:29:20:38 | call to method ToArray | null |
|
||||
| Foreach.cs:20:43:20:68 | call to method Empty | Foreach.cs:20:43:20:68 | call to method Empty | normal |
|
||||
| Foreach.cs:21:11:21:11 | ; | Foreach.cs:21:11:21:11 | ; | normal |
|
||||
| Foreach.cs:25:5:28:5 | {...} | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | empty |
|
||||
| Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | empty |
|
||||
| Foreach.cs:26:18:26:31 | (..., ...) | Foreach.cs:26:18:26:31 | (..., ...) | normal |
|
||||
| Foreach.cs:26:23:26:23 | String x | Foreach.cs:26:23:26:23 | String x | normal |
|
||||
| Foreach.cs:26:30:26:30 | Int32 y | Foreach.cs:26:30:26:30 | Int32 y | normal |
|
||||
| Foreach.cs:26:36:26:39 | access to parameter args | Foreach.cs:26:36:26:39 | access to parameter args | normal |
|
||||
| Foreach.cs:27:11:27:11 | ; | Foreach.cs:27:11:27:11 | ; | normal |
|
||||
| Foreach.cs:31:5:34:5 | {...} | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | empty |
|
||||
| Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | empty |
|
||||
| Foreach.cs:32:18:32:27 | (..., ...) | Foreach.cs:32:18:32:27 | (..., ...) | normal |
|
||||
| Foreach.cs:32:23:32:23 | String x | Foreach.cs:32:23:32:23 | String x | normal |
|
||||
| Foreach.cs:32:26:32:26 | Int32 y | Foreach.cs:32:26:32:26 | Int32 y | normal |
|
||||
| Foreach.cs:32:32:32:35 | access to parameter args | Foreach.cs:32:32:32:35 | access to parameter args | normal |
|
||||
| Foreach.cs:33:11:33:11 | ; | Foreach.cs:33:11:33:11 | ; | normal |
|
||||
| Foreach.cs:37:5:40:5 | {...} | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | empty |
|
||||
| Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | empty |
|
||||
| Foreach.cs:38:18:38:34 | (..., ...) | Foreach.cs:38:18:38:34 | (..., ...) | normal |
|
||||
| Foreach.cs:38:26:38:26 | String x | Foreach.cs:38:26:38:26 | String x | normal |
|
||||
| Foreach.cs:38:33:38:33 | Int32 y | Foreach.cs:38:33:38:33 | Int32 y | normal |
|
||||
| Foreach.cs:38:39:38:42 | access to parameter args | Foreach.cs:38:39:38:42 | access to parameter args | normal |
|
||||
| Foreach.cs:39:11:39:11 | ; | Foreach.cs:39:11:39:11 | ; | normal |
|
||||
| Initializers.cs:6:28:6:30 | {...} | Initializers.cs:6:28:6:30 | {...} | normal |
|
||||
| Initializers.cs:9:5:12:5 | {...} | Initializers.cs:11:13:11:63 | Initializers[] iz = ... | normal |
|
||||
| Initializers.cs:10:9:10:54 | ... ...; | Initializers.cs:10:13:10:53 | Initializers i = ... | normal |
|
||||
|
||||
@@ -20,4 +20,22 @@ class Foreach
|
||||
foreach (var x in e?.ToArray() ?? Enumerable.Empty<string>())
|
||||
;
|
||||
}
|
||||
|
||||
void M4(IEnumerable<(string, int)> args)
|
||||
{
|
||||
foreach ((var x, var y) in args)
|
||||
;
|
||||
}
|
||||
|
||||
void M5(IEnumerable<(string, int)> args)
|
||||
{
|
||||
foreach (var (x, y) in args)
|
||||
;
|
||||
}
|
||||
|
||||
void M6(IEnumerable<(string, int)> args)
|
||||
{
|
||||
foreach ((string x, int y) in args)
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1007,6 +1007,24 @@
|
||||
| Foreach.cs:20:29:20:38 | call to method ToArray | Foreach.cs:20:43:20:68 | call to method Empty | semmle.label | null |
|
||||
| Foreach.cs:20:43:20:68 | call to method Empty | Foreach.cs:20:9:21:11 | foreach (... ... in ...) ... | semmle.label | successor |
|
||||
| Foreach.cs:21:11:21:11 | ; | Foreach.cs:20:9:21:11 | foreach (... ... in ...) ... | semmle.label | successor |
|
||||
| Foreach.cs:24:10:24:11 | enter M4 | Foreach.cs:25:5:28:5 | {...} | semmle.label | successor |
|
||||
| Foreach.cs:25:5:28:5 | {...} | Foreach.cs:26:36:26:39 | access to parameter args | semmle.label | successor |
|
||||
| Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | Foreach.cs:24:10:24:11 | exit M4 | semmle.label | empty |
|
||||
| Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | Foreach.cs:27:11:27:11 | ; | semmle.label | non-empty |
|
||||
| Foreach.cs:26:36:26:39 | access to parameter args | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | semmle.label | successor |
|
||||
| Foreach.cs:27:11:27:11 | ; | Foreach.cs:26:9:27:11 | foreach (... ... in ...) ... | semmle.label | successor |
|
||||
| Foreach.cs:30:10:30:11 | enter M5 | Foreach.cs:31:5:34:5 | {...} | semmle.label | successor |
|
||||
| Foreach.cs:31:5:34:5 | {...} | Foreach.cs:32:32:32:35 | access to parameter args | semmle.label | successor |
|
||||
| Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | Foreach.cs:30:10:30:11 | exit M5 | semmle.label | empty |
|
||||
| Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | Foreach.cs:33:11:33:11 | ; | semmle.label | non-empty |
|
||||
| Foreach.cs:32:32:32:35 | access to parameter args | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | semmle.label | successor |
|
||||
| Foreach.cs:33:11:33:11 | ; | Foreach.cs:32:9:33:11 | foreach (... ... in ...) ... | semmle.label | successor |
|
||||
| Foreach.cs:36:10:36:11 | enter M6 | Foreach.cs:37:5:40:5 | {...} | semmle.label | successor |
|
||||
| Foreach.cs:37:5:40:5 | {...} | Foreach.cs:38:39:38:42 | access to parameter args | semmle.label | successor |
|
||||
| Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:36:10:36:11 | exit M6 | semmle.label | empty |
|
||||
| Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:39:11:39:11 | ; | semmle.label | non-empty |
|
||||
| Foreach.cs:38:39:38:42 | access to parameter args | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | semmle.label | successor |
|
||||
| Foreach.cs:39:11:39:11 | ; | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | semmle.label | successor |
|
||||
| Initializers.cs:6:5:6:16 | enter Initializers | Initializers.cs:6:28:6:30 | {...} | semmle.label | successor |
|
||||
| Initializers.cs:6:28:6:30 | {...} | Initializers.cs:6:5:6:16 | exit Initializers | semmle.label | successor |
|
||||
| Initializers.cs:8:10:8:10 | enter M | Initializers.cs:9:5:12:5 | {...} | semmle.label | successor |
|
||||
|
||||
Reference in New Issue
Block a user