From 3bf424b07df616b0fa4a3c1c706189d150e32cfa Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Mon, 17 Feb 2025 13:41:55 +0100 Subject: [PATCH 1/4] CFG: Prune `ConditionalCompletionSplitting` for unnecessary splits --- shared/controlflow/codeql/controlflow/Cfg.qll | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shared/controlflow/codeql/controlflow/Cfg.qll b/shared/controlflow/codeql/controlflow/Cfg.qll index 9b5922598c96..bb49cc8d8aee 100644 --- a/shared/controlflow/codeql/controlflow/Cfg.qll +++ b/shared/controlflow/codeql/controlflow/Cfg.qll @@ -1260,7 +1260,10 @@ module MakeWithSplitting< last(parent, succ, completion) and condPropagateExpr(parent, completion, child, c) and succ(pred, succ, c) and - last(child, pred, c) + last(child, pred, c) and + // no need to create split if `succ` can only complete with the + // recorded completion + not completion = unique(ConditionalCompletion c0 | last(parent, succ, c0)) ) } From 9d8e9975de02fd463e7c79df1889cd1646d83e87 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 18 Feb 2025 14:09:16 +0100 Subject: [PATCH 2/4] C#: Update expected test output --- .../controlflow/graph/BasicBlock.expected | 6 +- .../controlflow/graph/Condition.expected | 40 ++++---- .../controlflow/graph/Dominance.expected | 92 +++++++++---------- .../graph/EnclosingCallable.expected | 12 +-- .../controlflow/graph/NodeGraph.expected | 10 +- 5 files changed, 80 insertions(+), 80 deletions(-) diff --git a/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected b/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected index 527816c645be..b3ea35fe7e4b 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected @@ -1190,11 +1190,11 @@ | cflow.cs:181:28:181:37 | enter (...) => ... | cflow.cs:181:28:181:37 | exit (...) => ... | 6 | | cflow.cs:182:28:182:61 | enter delegate(...) { ... } | cflow.cs:182:28:182:61 | exit delegate(...) { ... } | 8 | | cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:187:13:187:18 | ... == ... | 6 | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:187:13:187:28 | [false] ... \|\| ... | 1 | -| cflow.cs:187:13:187:50 | [false] ... \|\| ... | cflow.cs:187:13:187:50 | [false] ... \|\| ... | 1 | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:187:13:187:28 | ... \|\| ... | 1 | +| cflow.cs:187:13:187:50 | ... \|\| ... | cflow.cs:187:13:187:50 | ... \|\| ... | 1 | | cflow.cs:187:23:187:23 | 2 | cflow.cs:187:23:187:28 | ... == ... | 3 | | cflow.cs:187:34:187:34 | 1 | cflow.cs:187:34:187:39 | ... == ... | 3 | -| cflow.cs:187:34:187:49 | [false] ... && ... | cflow.cs:187:34:187:49 | [false] ... && ... | 1 | +| cflow.cs:187:34:187:49 | ... && ... | cflow.cs:187:34:187:49 | ... && ... | 1 | | cflow.cs:190:13:190:52 | ...; | cflow.cs:185:10:185:18 | exit LogicalOr | 5 | | cflow.cs:193:10:193:17 | enter Booleans | cflow.cs:195:17:195:32 | ... > ... | 8 | | cflow.cs:193:10:193:17 | exit Booleans | cflow.cs:193:10:193:17 | exit Booleans | 1 | diff --git a/csharp/ql/test/library-tests/controlflow/graph/Condition.expected b/csharp/ql/test/library-tests/controlflow/graph/Condition.expected index be5ab56b0ed1..4bb86b2c3116 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/Condition.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/Condition.expected @@ -2303,27 +2303,27 @@ conditionBlock | cflow.cs:167:16:167:16 | access to local variable x | cflow.cs:174:9:176:9 | {...} | false | | cflow.cs:173:32:173:32 | access to local variable i | cflow.cs:146:10:146:12 | exit For (normal) | false | | cflow.cs:173:32:173:32 | access to local variable i | cflow.cs:174:9:176:9 | {...} | true | -| cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:187:13:187:28 | [false] ... \|\| ... | false | -| cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:187:13:187:50 | [false] ... \|\| ... | false | +| cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:187:13:187:28 | ... \|\| ... | false | +| cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:187:13:187:50 | ... \|\| ... | false | | cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:187:23:187:23 | 2 | false | | cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:187:34:187:34 | 1 | false | -| cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:187:34:187:49 | [false] ... && ... | false | +| cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:187:34:187:49 | ... && ... | false | | cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:190:13:190:52 | ...; | false | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:187:13:187:50 | [false] ... \|\| ... | false | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:187:34:187:34 | 1 | false | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:187:34:187:49 | [false] ... && ... | false | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:190:13:190:52 | ...; | false | -| cflow.cs:187:13:187:50 | [false] ... \|\| ... | cflow.cs:190:13:190:52 | ...; | false | -| cflow.cs:187:23:187:23 | 2 | cflow.cs:187:13:187:28 | [false] ... \|\| ... | false | -| cflow.cs:187:23:187:23 | 2 | cflow.cs:187:13:187:50 | [false] ... \|\| ... | false | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:187:13:187:50 | ... \|\| ... | false | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:187:34:187:34 | 1 | false | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:187:34:187:49 | ... && ... | false | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:190:13:190:52 | ...; | false | +| cflow.cs:187:13:187:50 | ... \|\| ... | cflow.cs:190:13:190:52 | ...; | false | +| cflow.cs:187:23:187:23 | 2 | cflow.cs:187:13:187:28 | ... \|\| ... | false | +| cflow.cs:187:23:187:23 | 2 | cflow.cs:187:13:187:50 | ... \|\| ... | false | | cflow.cs:187:23:187:23 | 2 | cflow.cs:187:34:187:34 | 1 | false | -| cflow.cs:187:23:187:23 | 2 | cflow.cs:187:34:187:49 | [false] ... && ... | false | +| cflow.cs:187:23:187:23 | 2 | cflow.cs:187:34:187:49 | ... && ... | false | | cflow.cs:187:23:187:23 | 2 | cflow.cs:190:13:190:52 | ...; | false | -| cflow.cs:187:34:187:34 | 1 | cflow.cs:187:13:187:50 | [false] ... \|\| ... | false | -| cflow.cs:187:34:187:34 | 1 | cflow.cs:187:34:187:49 | [false] ... && ... | false | +| cflow.cs:187:34:187:34 | 1 | cflow.cs:187:13:187:50 | ... \|\| ... | false | +| cflow.cs:187:34:187:34 | 1 | cflow.cs:187:34:187:49 | ... && ... | false | | cflow.cs:187:34:187:34 | 1 | cflow.cs:190:13:190:52 | ...; | false | -| cflow.cs:187:34:187:49 | [false] ... && ... | cflow.cs:187:13:187:50 | [false] ... \|\| ... | false | -| cflow.cs:187:34:187:49 | [false] ... && ... | cflow.cs:190:13:190:52 | ...; | false | +| cflow.cs:187:34:187:49 | ... && ... | cflow.cs:187:13:187:50 | ... \|\| ... | false | +| cflow.cs:187:34:187:49 | ... && ... | cflow.cs:190:13:190:52 | ...; | false | | cflow.cs:193:10:193:17 | enter Booleans | cflow.cs:195:39:195:43 | this access | true | | cflow.cs:195:17:195:56 | ... && ... | cflow.cs:197:13:197:47 | [false] !... | false | | cflow.cs:195:17:195:56 | ... && ... | cflow.cs:197:13:197:47 | [true] !... | true | @@ -2964,11 +2964,11 @@ conditionFlow | cflow.cs:173:32:173:41 | ... < ... | cflow.cs:146:10:146:12 | exit For (normal) | false | | cflow.cs:173:32:173:41 | ... < ... | cflow.cs:174:9:176:9 | {...} | true | | cflow.cs:187:13:187:18 | ... == ... | cflow.cs:187:23:187:23 | 2 | false | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:187:34:187:34 | 1 | false | -| cflow.cs:187:13:187:50 | [false] ... \|\| ... | cflow.cs:190:13:190:52 | ...; | false | -| cflow.cs:187:23:187:28 | ... == ... | cflow.cs:187:13:187:28 | [false] ... \|\| ... | false | -| cflow.cs:187:34:187:39 | ... == ... | cflow.cs:187:34:187:49 | [false] ... && ... | false | -| cflow.cs:187:34:187:49 | [false] ... && ... | cflow.cs:187:13:187:50 | [false] ... \|\| ... | false | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:187:34:187:34 | 1 | false | +| cflow.cs:187:13:187:50 | ... \|\| ... | cflow.cs:190:13:190:52 | ...; | false | +| cflow.cs:187:23:187:28 | ... == ... | cflow.cs:187:13:187:28 | ... \|\| ... | false | +| cflow.cs:187:34:187:39 | ... == ... | cflow.cs:187:34:187:49 | ... && ... | false | +| cflow.cs:187:34:187:49 | ... && ... | cflow.cs:187:13:187:50 | ... \|\| ... | false | | cflow.cs:195:17:195:32 | ... > ... | cflow.cs:195:17:195:56 | ... && ... | false | | cflow.cs:195:17:195:32 | ... > ... | cflow.cs:195:39:195:43 | this access | true | | cflow.cs:197:13:197:47 | [false] !... | cflow.cs:200:9:205:9 | if (...) ... | false | diff --git a/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected b/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected index 9a1a38b7935a..7706539ad306 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected @@ -4151,15 +4151,15 @@ dominance | cflow.cs:187:9:190:52 | if (...) ... | cflow.cs:187:13:187:13 | 1 | | cflow.cs:187:13:187:13 | 1 | cflow.cs:187:18:187:18 | 2 | | cflow.cs:187:13:187:18 | ... == ... | cflow.cs:187:23:187:23 | 2 | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:187:34:187:34 | 1 | -| cflow.cs:187:13:187:50 | [false] ... \|\| ... | cflow.cs:190:13:190:52 | ...; | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:187:34:187:34 | 1 | +| cflow.cs:187:13:187:50 | ... \|\| ... | cflow.cs:190:13:190:52 | ...; | | cflow.cs:187:18:187:18 | 2 | cflow.cs:187:13:187:18 | ... == ... | | cflow.cs:187:23:187:23 | 2 | cflow.cs:187:28:187:28 | 3 | -| cflow.cs:187:23:187:28 | ... == ... | cflow.cs:187:13:187:28 | [false] ... \|\| ... | +| cflow.cs:187:23:187:28 | ... == ... | cflow.cs:187:13:187:28 | ... \|\| ... | | cflow.cs:187:28:187:28 | 3 | cflow.cs:187:23:187:28 | ... == ... | | cflow.cs:187:34:187:34 | 1 | cflow.cs:187:39:187:39 | 3 | -| cflow.cs:187:34:187:39 | ... == ... | cflow.cs:187:34:187:49 | [false] ... && ... | -| cflow.cs:187:34:187:49 | [false] ... && ... | cflow.cs:187:13:187:50 | [false] ... \|\| ... | +| cflow.cs:187:34:187:39 | ... == ... | cflow.cs:187:34:187:49 | ... && ... | +| cflow.cs:187:34:187:49 | ... && ... | cflow.cs:187:13:187:50 | ... \|\| ... | | cflow.cs:187:39:187:39 | 3 | cflow.cs:187:34:187:39 | ... == ... | | cflow.cs:190:13:190:51 | call to method WriteLine | cflow.cs:185:10:185:18 | exit LogicalOr (normal) | | cflow.cs:190:13:190:52 | ...; | cflow.cs:190:31:190:50 | "This should happen" | @@ -8307,18 +8307,18 @@ postDominance | cflow.cs:187:9:190:52 | if (...) ... | cflow.cs:186:5:191:5 | {...} | | cflow.cs:187:13:187:13 | 1 | cflow.cs:187:9:190:52 | if (...) ... | | cflow.cs:187:13:187:18 | ... == ... | cflow.cs:187:18:187:18 | 2 | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:187:23:187:28 | ... == ... | -| cflow.cs:187:13:187:50 | [false] ... \|\| ... | cflow.cs:187:34:187:49 | [false] ... && ... | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:187:23:187:28 | ... == ... | +| cflow.cs:187:13:187:50 | ... \|\| ... | cflow.cs:187:34:187:49 | ... && ... | | cflow.cs:187:18:187:18 | 2 | cflow.cs:187:13:187:13 | 1 | | cflow.cs:187:23:187:23 | 2 | cflow.cs:187:13:187:18 | ... == ... | | cflow.cs:187:23:187:28 | ... == ... | cflow.cs:187:28:187:28 | 3 | | cflow.cs:187:28:187:28 | 3 | cflow.cs:187:23:187:23 | 2 | -| cflow.cs:187:34:187:34 | 1 | cflow.cs:187:13:187:28 | [false] ... \|\| ... | +| cflow.cs:187:34:187:34 | 1 | cflow.cs:187:13:187:28 | ... \|\| ... | | cflow.cs:187:34:187:39 | ... == ... | cflow.cs:187:39:187:39 | 3 | -| cflow.cs:187:34:187:49 | [false] ... && ... | cflow.cs:187:34:187:39 | ... == ... | +| cflow.cs:187:34:187:49 | ... && ... | cflow.cs:187:34:187:39 | ... == ... | | cflow.cs:187:39:187:39 | 3 | cflow.cs:187:34:187:34 | 1 | | cflow.cs:190:13:190:51 | call to method WriteLine | cflow.cs:190:31:190:50 | "This should happen" | -| cflow.cs:190:13:190:52 | ...; | cflow.cs:187:13:187:50 | [false] ... \|\| ... | +| cflow.cs:190:13:190:52 | ...; | cflow.cs:187:13:187:50 | ... \|\| ... | | cflow.cs:190:31:190:50 | "This should happen" | cflow.cs:190:13:190:52 | ...; | | cflow.cs:193:10:193:17 | exit Booleans (abnormal) | cflow.cs:203:17:203:38 | throw ...; | | cflow.cs:193:10:193:17 | exit Booleans (normal) | cflow.cs:200:13:200:62 | [false] ... \|\| ... | @@ -12909,32 +12909,32 @@ blockDominance | cflow.cs:181:28:181:37 | enter (...) => ... | cflow.cs:181:28:181:37 | enter (...) => ... | | cflow.cs:182:28:182:61 | enter delegate(...) { ... } | cflow.cs:182:28:182:61 | enter delegate(...) { ... } | | cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:185:10:185:18 | enter LogicalOr | -| cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:187:13:187:28 | [false] ... \|\| ... | -| cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:187:13:187:50 | [false] ... \|\| ... | +| cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:187:13:187:28 | ... \|\| ... | +| cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:187:13:187:50 | ... \|\| ... | | cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:187:23:187:23 | 2 | | cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:187:34:187:34 | 1 | -| cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:187:34:187:49 | [false] ... && ... | +| cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:187:34:187:49 | ... && ... | | cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:190:13:190:52 | ...; | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:187:13:187:28 | [false] ... \|\| ... | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:187:13:187:50 | [false] ... \|\| ... | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:187:34:187:34 | 1 | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:187:34:187:49 | [false] ... && ... | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:190:13:190:52 | ...; | -| cflow.cs:187:13:187:50 | [false] ... \|\| ... | cflow.cs:187:13:187:50 | [false] ... \|\| ... | -| cflow.cs:187:13:187:50 | [false] ... \|\| ... | cflow.cs:190:13:190:52 | ...; | -| cflow.cs:187:23:187:23 | 2 | cflow.cs:187:13:187:28 | [false] ... \|\| ... | -| cflow.cs:187:23:187:23 | 2 | cflow.cs:187:13:187:50 | [false] ... \|\| ... | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:187:13:187:28 | ... \|\| ... | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:187:13:187:50 | ... \|\| ... | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:187:34:187:34 | 1 | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:187:34:187:49 | ... && ... | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:190:13:190:52 | ...; | +| cflow.cs:187:13:187:50 | ... \|\| ... | cflow.cs:187:13:187:50 | ... \|\| ... | +| cflow.cs:187:13:187:50 | ... \|\| ... | cflow.cs:190:13:190:52 | ...; | +| cflow.cs:187:23:187:23 | 2 | cflow.cs:187:13:187:28 | ... \|\| ... | +| cflow.cs:187:23:187:23 | 2 | cflow.cs:187:13:187:50 | ... \|\| ... | | cflow.cs:187:23:187:23 | 2 | cflow.cs:187:23:187:23 | 2 | | cflow.cs:187:23:187:23 | 2 | cflow.cs:187:34:187:34 | 1 | -| cflow.cs:187:23:187:23 | 2 | cflow.cs:187:34:187:49 | [false] ... && ... | +| cflow.cs:187:23:187:23 | 2 | cflow.cs:187:34:187:49 | ... && ... | | cflow.cs:187:23:187:23 | 2 | cflow.cs:190:13:190:52 | ...; | -| cflow.cs:187:34:187:34 | 1 | cflow.cs:187:13:187:50 | [false] ... \|\| ... | +| cflow.cs:187:34:187:34 | 1 | cflow.cs:187:13:187:50 | ... \|\| ... | | cflow.cs:187:34:187:34 | 1 | cflow.cs:187:34:187:34 | 1 | -| cflow.cs:187:34:187:34 | 1 | cflow.cs:187:34:187:49 | [false] ... && ... | +| cflow.cs:187:34:187:34 | 1 | cflow.cs:187:34:187:49 | ... && ... | | cflow.cs:187:34:187:34 | 1 | cflow.cs:190:13:190:52 | ...; | -| cflow.cs:187:34:187:49 | [false] ... && ... | cflow.cs:187:13:187:50 | [false] ... \|\| ... | -| cflow.cs:187:34:187:49 | [false] ... && ... | cflow.cs:187:34:187:49 | [false] ... && ... | -| cflow.cs:187:34:187:49 | [false] ... && ... | cflow.cs:190:13:190:52 | ...; | +| cflow.cs:187:34:187:49 | ... && ... | cflow.cs:187:13:187:50 | ... \|\| ... | +| cflow.cs:187:34:187:49 | ... && ... | cflow.cs:187:34:187:49 | ... && ... | +| cflow.cs:187:34:187:49 | ... && ... | cflow.cs:190:13:190:52 | ...; | | cflow.cs:190:13:190:52 | ...; | cflow.cs:190:13:190:52 | ...; | | cflow.cs:193:10:193:17 | enter Booleans | cflow.cs:193:10:193:17 | enter Booleans | | cflow.cs:193:10:193:17 | enter Booleans | cflow.cs:193:10:193:17 | exit Booleans | @@ -16126,32 +16126,32 @@ postBlockDominance | cflow.cs:181:28:181:37 | enter (...) => ... | cflow.cs:181:28:181:37 | enter (...) => ... | | cflow.cs:182:28:182:61 | enter delegate(...) { ... } | cflow.cs:182:28:182:61 | enter delegate(...) { ... } | | cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:185:10:185:18 | enter LogicalOr | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:185:10:185:18 | enter LogicalOr | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:187:13:187:28 | [false] ... \|\| ... | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:187:23:187:23 | 2 | -| cflow.cs:187:13:187:50 | [false] ... \|\| ... | cflow.cs:185:10:185:18 | enter LogicalOr | -| cflow.cs:187:13:187:50 | [false] ... \|\| ... | cflow.cs:187:13:187:28 | [false] ... \|\| ... | -| cflow.cs:187:13:187:50 | [false] ... \|\| ... | cflow.cs:187:13:187:50 | [false] ... \|\| ... | -| cflow.cs:187:13:187:50 | [false] ... \|\| ... | cflow.cs:187:23:187:23 | 2 | -| cflow.cs:187:13:187:50 | [false] ... \|\| ... | cflow.cs:187:34:187:34 | 1 | -| cflow.cs:187:13:187:50 | [false] ... \|\| ... | cflow.cs:187:34:187:49 | [false] ... && ... | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:185:10:185:18 | enter LogicalOr | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:187:13:187:28 | ... \|\| ... | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:187:23:187:23 | 2 | +| cflow.cs:187:13:187:50 | ... \|\| ... | cflow.cs:185:10:185:18 | enter LogicalOr | +| cflow.cs:187:13:187:50 | ... \|\| ... | cflow.cs:187:13:187:28 | ... \|\| ... | +| cflow.cs:187:13:187:50 | ... \|\| ... | cflow.cs:187:13:187:50 | ... \|\| ... | +| cflow.cs:187:13:187:50 | ... \|\| ... | cflow.cs:187:23:187:23 | 2 | +| cflow.cs:187:13:187:50 | ... \|\| ... | cflow.cs:187:34:187:34 | 1 | +| cflow.cs:187:13:187:50 | ... \|\| ... | cflow.cs:187:34:187:49 | ... && ... | | cflow.cs:187:23:187:23 | 2 | cflow.cs:185:10:185:18 | enter LogicalOr | | cflow.cs:187:23:187:23 | 2 | cflow.cs:187:23:187:23 | 2 | | cflow.cs:187:34:187:34 | 1 | cflow.cs:185:10:185:18 | enter LogicalOr | -| cflow.cs:187:34:187:34 | 1 | cflow.cs:187:13:187:28 | [false] ... \|\| ... | +| cflow.cs:187:34:187:34 | 1 | cflow.cs:187:13:187:28 | ... \|\| ... | | cflow.cs:187:34:187:34 | 1 | cflow.cs:187:23:187:23 | 2 | | cflow.cs:187:34:187:34 | 1 | cflow.cs:187:34:187:34 | 1 | -| cflow.cs:187:34:187:49 | [false] ... && ... | cflow.cs:185:10:185:18 | enter LogicalOr | -| cflow.cs:187:34:187:49 | [false] ... && ... | cflow.cs:187:13:187:28 | [false] ... \|\| ... | -| cflow.cs:187:34:187:49 | [false] ... && ... | cflow.cs:187:23:187:23 | 2 | -| cflow.cs:187:34:187:49 | [false] ... && ... | cflow.cs:187:34:187:34 | 1 | -| cflow.cs:187:34:187:49 | [false] ... && ... | cflow.cs:187:34:187:49 | [false] ... && ... | +| cflow.cs:187:34:187:49 | ... && ... | cflow.cs:185:10:185:18 | enter LogicalOr | +| cflow.cs:187:34:187:49 | ... && ... | cflow.cs:187:13:187:28 | ... \|\| ... | +| cflow.cs:187:34:187:49 | ... && ... | cflow.cs:187:23:187:23 | 2 | +| cflow.cs:187:34:187:49 | ... && ... | cflow.cs:187:34:187:34 | 1 | +| cflow.cs:187:34:187:49 | ... && ... | cflow.cs:187:34:187:49 | ... && ... | | cflow.cs:190:13:190:52 | ...; | cflow.cs:185:10:185:18 | enter LogicalOr | -| cflow.cs:190:13:190:52 | ...; | cflow.cs:187:13:187:28 | [false] ... \|\| ... | -| cflow.cs:190:13:190:52 | ...; | cflow.cs:187:13:187:50 | [false] ... \|\| ... | +| cflow.cs:190:13:190:52 | ...; | cflow.cs:187:13:187:28 | ... \|\| ... | +| cflow.cs:190:13:190:52 | ...; | cflow.cs:187:13:187:50 | ... \|\| ... | | cflow.cs:190:13:190:52 | ...; | cflow.cs:187:23:187:23 | 2 | | cflow.cs:190:13:190:52 | ...; | cflow.cs:187:34:187:34 | 1 | -| cflow.cs:190:13:190:52 | ...; | cflow.cs:187:34:187:49 | [false] ... && ... | +| cflow.cs:190:13:190:52 | ...; | cflow.cs:187:34:187:49 | ... && ... | | cflow.cs:190:13:190:52 | ...; | cflow.cs:190:13:190:52 | ...; | | cflow.cs:193:10:193:17 | enter Booleans | cflow.cs:193:10:193:17 | enter Booleans | | cflow.cs:193:10:193:17 | exit Booleans | cflow.cs:193:10:193:17 | exit Booleans | diff --git a/csharp/ql/test/library-tests/controlflow/graph/EnclosingCallable.expected b/csharp/ql/test/library-tests/controlflow/graph/EnclosingCallable.expected index 9edc62925d86..4f208361ea1a 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/EnclosingCallable.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/EnclosingCallable.expected @@ -4539,15 +4539,15 @@ nodeEnclosing | cflow.cs:187:9:190:52 | if (...) ... | cflow.cs:185:10:185:18 | LogicalOr | | cflow.cs:187:13:187:13 | 1 | cflow.cs:185:10:185:18 | LogicalOr | | cflow.cs:187:13:187:18 | ... == ... | cflow.cs:185:10:185:18 | LogicalOr | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:185:10:185:18 | LogicalOr | -| cflow.cs:187:13:187:50 | [false] ... \|\| ... | cflow.cs:185:10:185:18 | LogicalOr | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:185:10:185:18 | LogicalOr | +| cflow.cs:187:13:187:50 | ... \|\| ... | cflow.cs:185:10:185:18 | LogicalOr | | cflow.cs:187:18:187:18 | 2 | cflow.cs:185:10:185:18 | LogicalOr | | cflow.cs:187:23:187:23 | 2 | cflow.cs:185:10:185:18 | LogicalOr | | cflow.cs:187:23:187:28 | ... == ... | cflow.cs:185:10:185:18 | LogicalOr | | cflow.cs:187:28:187:28 | 3 | cflow.cs:185:10:185:18 | LogicalOr | | cflow.cs:187:34:187:34 | 1 | cflow.cs:185:10:185:18 | LogicalOr | | cflow.cs:187:34:187:39 | ... == ... | cflow.cs:185:10:185:18 | LogicalOr | -| cflow.cs:187:34:187:49 | [false] ... && ... | cflow.cs:185:10:185:18 | LogicalOr | +| cflow.cs:187:34:187:49 | ... && ... | cflow.cs:185:10:185:18 | LogicalOr | | cflow.cs:187:39:187:39 | 3 | cflow.cs:185:10:185:18 | LogicalOr | | cflow.cs:190:13:190:51 | call to method WriteLine | cflow.cs:185:10:185:18 | LogicalOr | | cflow.cs:190:13:190:52 | ...; | cflow.cs:185:10:185:18 | LogicalOr | @@ -6016,11 +6016,11 @@ blockEnclosing | cflow.cs:181:28:181:37 | enter (...) => ... | cflow.cs:181:28:181:37 | (...) => ... | | cflow.cs:182:28:182:61 | enter delegate(...) { ... } | cflow.cs:182:28:182:61 | delegate(...) { ... } | | cflow.cs:185:10:185:18 | enter LogicalOr | cflow.cs:185:10:185:18 | LogicalOr | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:185:10:185:18 | LogicalOr | -| cflow.cs:187:13:187:50 | [false] ... \|\| ... | cflow.cs:185:10:185:18 | LogicalOr | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:185:10:185:18 | LogicalOr | +| cflow.cs:187:13:187:50 | ... \|\| ... | cflow.cs:185:10:185:18 | LogicalOr | | cflow.cs:187:23:187:23 | 2 | cflow.cs:185:10:185:18 | LogicalOr | | cflow.cs:187:34:187:34 | 1 | cflow.cs:185:10:185:18 | LogicalOr | -| cflow.cs:187:34:187:49 | [false] ... && ... | cflow.cs:185:10:185:18 | LogicalOr | +| cflow.cs:187:34:187:49 | ... && ... | cflow.cs:185:10:185:18 | LogicalOr | | cflow.cs:190:13:190:52 | ...; | cflow.cs:185:10:185:18 | LogicalOr | | cflow.cs:193:10:193:17 | enter Booleans | cflow.cs:193:10:193:17 | Booleans | | cflow.cs:193:10:193:17 | exit Booleans | cflow.cs:193:10:193:17 | Booleans | diff --git a/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected b/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected index 0078ba76213d..0ae9a8a1e35c 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected @@ -4658,15 +4658,15 @@ | cflow.cs:187:9:190:52 | if (...) ... | cflow.cs:187:13:187:13 | 1 | | | cflow.cs:187:13:187:13 | 1 | cflow.cs:187:18:187:18 | 2 | | | cflow.cs:187:13:187:18 | ... == ... | cflow.cs:187:23:187:23 | 2 | false | -| cflow.cs:187:13:187:28 | [false] ... \|\| ... | cflow.cs:187:34:187:34 | 1 | false | -| cflow.cs:187:13:187:50 | [false] ... \|\| ... | cflow.cs:190:13:190:52 | ...; | false | +| cflow.cs:187:13:187:28 | ... \|\| ... | cflow.cs:187:34:187:34 | 1 | false | +| cflow.cs:187:13:187:50 | ... \|\| ... | cflow.cs:190:13:190:52 | ...; | false | | cflow.cs:187:18:187:18 | 2 | cflow.cs:187:13:187:18 | ... == ... | | | cflow.cs:187:23:187:23 | 2 | cflow.cs:187:28:187:28 | 3 | | -| cflow.cs:187:23:187:28 | ... == ... | cflow.cs:187:13:187:28 | [false] ... \|\| ... | false | +| cflow.cs:187:23:187:28 | ... == ... | cflow.cs:187:13:187:28 | ... \|\| ... | false | | cflow.cs:187:28:187:28 | 3 | cflow.cs:187:23:187:28 | ... == ... | | | cflow.cs:187:34:187:34 | 1 | cflow.cs:187:39:187:39 | 3 | | -| cflow.cs:187:34:187:39 | ... == ... | cflow.cs:187:34:187:49 | [false] ... && ... | false | -| cflow.cs:187:34:187:49 | [false] ... && ... | cflow.cs:187:13:187:50 | [false] ... \|\| ... | false | +| cflow.cs:187:34:187:39 | ... == ... | cflow.cs:187:34:187:49 | ... && ... | false | +| cflow.cs:187:34:187:49 | ... && ... | cflow.cs:187:13:187:50 | ... \|\| ... | false | | cflow.cs:187:39:187:39 | 3 | cflow.cs:187:34:187:39 | ... == ... | | | cflow.cs:190:13:190:51 | call to method WriteLine | cflow.cs:185:10:185:18 | exit LogicalOr (normal) | | | cflow.cs:190:13:190:52 | ...; | cflow.cs:190:31:190:50 | "This should happen" | | From 889ef330067d1991e723b729a0ebf545395103b2 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 18 Feb 2025 14:09:28 +0100 Subject: [PATCH 3/4] Rust: Update expected test output --- .../dataflow/local/DataFlowStep.expected | 40 +++---- .../test/library-tests/variables/Cfg.expected | 44 +++---- .../test/library-tests/variables/Ssa.expected | 108 +++++++++--------- 3 files changed, 96 insertions(+), 96 deletions(-) diff --git a/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected b/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected index 55b4abee5f63..e3c8608162a3 100644 --- a/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected +++ b/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected @@ -471,13 +471,13 @@ localStep | main.rs:304:11:304:12 | s1 | main.rs:305:9:305:45 | ... \| ... | | | main.rs:305:9:305:45 | ... \| ... | main.rs:305:9:305:25 | ...::A(...) | | | main.rs:305:9:305:45 | ... \| ... | main.rs:305:29:305:45 | ...::B(...) | | -| main.rs:305:9:305:45 | [SSA] [match(true)] phi | main.rs:305:55:305:55 | n | | -| main.rs:305:24:305:24 | [SSA] [input] [match(true)] phi | main.rs:305:9:305:45 | [SSA] [match(true)] phi | | -| main.rs:305:24:305:24 | [SSA] n | main.rs:305:24:305:24 | [SSA] [input] [match(true)] phi | | +| main.rs:305:9:305:45 | [SSA] phi | main.rs:305:55:305:55 | n | | +| main.rs:305:24:305:24 | [SSA] [input] phi | main.rs:305:9:305:45 | [SSA] phi | | +| main.rs:305:24:305:24 | [SSA] n | main.rs:305:24:305:24 | [SSA] [input] phi | | | main.rs:305:24:305:24 | n | main.rs:305:24:305:24 | [SSA] n | | | main.rs:305:24:305:24 | n | main.rs:305:24:305:24 | n | | -| main.rs:305:44:305:44 | [SSA] [input] [match(true)] phi | main.rs:305:9:305:45 | [SSA] [match(true)] phi | | -| main.rs:305:44:305:44 | [SSA] n | main.rs:305:44:305:44 | [SSA] [input] [match(true)] phi | | +| main.rs:305:44:305:44 | [SSA] [input] phi | main.rs:305:9:305:45 | [SSA] phi | | +| main.rs:305:44:305:44 | [SSA] n | main.rs:305:44:305:44 | [SSA] [input] phi | | | main.rs:305:44:305:44 | n | main.rs:305:44:305:44 | [SSA] n | | | main.rs:305:44:305:44 | n | main.rs:305:44:305:44 | n | | | main.rs:305:50:305:56 | sink(...) | main.rs:304:5:306:5 | match s1 { ... } | | @@ -514,13 +514,13 @@ localStep | main.rs:322:11:322:12 | s1 | main.rs:323:9:323:19 | ... \| ... | | | main.rs:323:9:323:19 | ... \| ... | main.rs:323:9:323:12 | A(...) | | | main.rs:323:9:323:19 | ... \| ... | main.rs:323:16:323:19 | B(...) | | -| main.rs:323:9:323:19 | [SSA] [match(true)] phi | main.rs:323:29:323:29 | n | | -| main.rs:323:11:323:11 | [SSA] [input] [match(true)] phi | main.rs:323:9:323:19 | [SSA] [match(true)] phi | | -| main.rs:323:11:323:11 | [SSA] n | main.rs:323:11:323:11 | [SSA] [input] [match(true)] phi | | +| main.rs:323:9:323:19 | [SSA] phi | main.rs:323:29:323:29 | n | | +| main.rs:323:11:323:11 | [SSA] [input] phi | main.rs:323:9:323:19 | [SSA] phi | | +| main.rs:323:11:323:11 | [SSA] n | main.rs:323:11:323:11 | [SSA] [input] phi | | | main.rs:323:11:323:11 | n | main.rs:323:11:323:11 | [SSA] n | | | main.rs:323:11:323:11 | n | main.rs:323:11:323:11 | n | | -| main.rs:323:18:323:18 | [SSA] [input] [match(true)] phi | main.rs:323:9:323:19 | [SSA] [match(true)] phi | | -| main.rs:323:18:323:18 | [SSA] n | main.rs:323:18:323:18 | [SSA] [input] [match(true)] phi | | +| main.rs:323:18:323:18 | [SSA] [input] phi | main.rs:323:9:323:19 | [SSA] phi | | +| main.rs:323:18:323:18 | [SSA] n | main.rs:323:18:323:18 | [SSA] [input] phi | | | main.rs:323:18:323:18 | n | main.rs:323:18:323:18 | [SSA] n | | | main.rs:323:18:323:18 | n | main.rs:323:18:323:18 | n | | | main.rs:323:24:323:30 | sink(...) | main.rs:322:5:324:5 | match s1 { ... } | | @@ -557,13 +557,13 @@ localStep | main.rs:345:11:345:12 | s1 | main.rs:346:9:346:71 | ... \| ... | | | main.rs:346:9:346:71 | ... \| ... | main.rs:346:9:346:38 | ...::C {...} | | | main.rs:346:9:346:71 | ... \| ... | main.rs:346:42:346:71 | ...::D {...} | | -| main.rs:346:9:346:71 | [SSA] [match(true)] phi | main.rs:346:81:346:81 | n | | -| main.rs:346:36:346:36 | [SSA] [input] [match(true)] phi | main.rs:346:9:346:71 | [SSA] [match(true)] phi | | -| main.rs:346:36:346:36 | [SSA] n | main.rs:346:36:346:36 | [SSA] [input] [match(true)] phi | | +| main.rs:346:9:346:71 | [SSA] phi | main.rs:346:81:346:81 | n | | +| main.rs:346:36:346:36 | [SSA] [input] phi | main.rs:346:9:346:71 | [SSA] phi | | +| main.rs:346:36:346:36 | [SSA] n | main.rs:346:36:346:36 | [SSA] [input] phi | | | main.rs:346:36:346:36 | n | main.rs:346:36:346:36 | [SSA] n | | | main.rs:346:36:346:36 | n | main.rs:346:36:346:36 | n | | -| main.rs:346:69:346:69 | [SSA] [input] [match(true)] phi | main.rs:346:9:346:71 | [SSA] [match(true)] phi | | -| main.rs:346:69:346:69 | [SSA] n | main.rs:346:69:346:69 | [SSA] [input] [match(true)] phi | | +| main.rs:346:69:346:69 | [SSA] [input] phi | main.rs:346:9:346:71 | [SSA] phi | | +| main.rs:346:69:346:69 | [SSA] n | main.rs:346:69:346:69 | [SSA] [input] phi | | | main.rs:346:69:346:69 | n | main.rs:346:69:346:69 | [SSA] n | | | main.rs:346:69:346:69 | n | main.rs:346:69:346:69 | n | | | main.rs:346:76:346:82 | sink(...) | main.rs:345:5:347:5 | match s1 { ... } | | @@ -600,13 +600,13 @@ localStep | main.rs:365:11:365:12 | s1 | main.rs:366:9:366:43 | ... \| ... | | | main.rs:366:9:366:43 | ... \| ... | main.rs:366:9:366:24 | C {...} | | | main.rs:366:9:366:43 | ... \| ... | main.rs:366:28:366:43 | D {...} | | -| main.rs:366:9:366:43 | [SSA] [match(true)] phi | main.rs:366:53:366:53 | n | | -| main.rs:366:22:366:22 | [SSA] [input] [match(true)] phi | main.rs:366:9:366:43 | [SSA] [match(true)] phi | | -| main.rs:366:22:366:22 | [SSA] n | main.rs:366:22:366:22 | [SSA] [input] [match(true)] phi | | +| main.rs:366:9:366:43 | [SSA] phi | main.rs:366:53:366:53 | n | | +| main.rs:366:22:366:22 | [SSA] [input] phi | main.rs:366:9:366:43 | [SSA] phi | | +| main.rs:366:22:366:22 | [SSA] n | main.rs:366:22:366:22 | [SSA] [input] phi | | | main.rs:366:22:366:22 | n | main.rs:366:22:366:22 | [SSA] n | | | main.rs:366:22:366:22 | n | main.rs:366:22:366:22 | n | | -| main.rs:366:41:366:41 | [SSA] [input] [match(true)] phi | main.rs:366:9:366:43 | [SSA] [match(true)] phi | | -| main.rs:366:41:366:41 | [SSA] n | main.rs:366:41:366:41 | [SSA] [input] [match(true)] phi | | +| main.rs:366:41:366:41 | [SSA] [input] phi | main.rs:366:9:366:43 | [SSA] phi | | +| main.rs:366:41:366:41 | [SSA] n | main.rs:366:41:366:41 | [SSA] [input] phi | | | main.rs:366:41:366:41 | n | main.rs:366:41:366:41 | [SSA] n | | | main.rs:366:41:366:41 | n | main.rs:366:41:366:41 | n | | | main.rs:366:48:366:54 | sink(...) | main.rs:365:5:367:5 | match s1 { ... } | | diff --git a/rust/ql/test/library-tests/variables/Cfg.expected b/rust/ql/test/library-tests/variables/Cfg.expected index d562f6c23d68..7a6820592a15 100644 --- a/rust/ql/test/library-tests/variables/Cfg.expected +++ b/rust/ql/test/library-tests/variables/Cfg.expected @@ -453,11 +453,11 @@ edges | main.rs:190:11:190:16 | either | main.rs:191:9:191:24 | ...::Left(...) | | | main.rs:191:9:191:24 | ...::Left(...) | main.rs:191:22:191:23 | a3 | match | | main.rs:191:9:191:24 | ...::Left(...) | main.rs:191:28:191:44 | ...::Right(...) | no-match | -| main.rs:191:9:191:44 | [match(true)] ... \| ... | main.rs:192:16:192:24 | print_i64 | match | -| main.rs:191:22:191:23 | a3 | main.rs:191:9:191:44 | [match(true)] ... \| ... | match | +| main.rs:191:9:191:44 | ... \| ... | main.rs:192:16:192:24 | print_i64 | match | +| main.rs:191:22:191:23 | a3 | main.rs:191:9:191:44 | ... \| ... | match | | main.rs:191:22:191:23 | a3 | main.rs:191:22:191:23 | a3 | | | main.rs:191:28:191:44 | ...::Right(...) | main.rs:191:42:191:43 | a3 | match | -| main.rs:191:42:191:43 | a3 | main.rs:191:9:191:44 | [match(true)] ... \| ... | match | +| main.rs:191:42:191:43 | a3 | main.rs:191:9:191:44 | ... \| ... | match | | main.rs:191:42:191:43 | a3 | main.rs:191:42:191:43 | a3 | | | main.rs:192:16:192:24 | print_i64 | main.rs:192:26:192:27 | a3 | | | main.rs:192:16:192:28 | print_i64(...) | main.rs:190:5:193:5 | match either { ... } | | @@ -476,15 +476,15 @@ edges | main.rs:204:11:204:12 | tv | main.rs:205:9:205:30 | ...::First(...) | | | main.rs:205:9:205:30 | ...::First(...) | main.rs:205:28:205:29 | a4 | match | | main.rs:205:9:205:30 | ...::First(...) | main.rs:205:34:205:56 | ...::Second(...) | no-match | -| main.rs:205:9:205:81 | [match(true)] ... \| ... \| ... | main.rs:206:16:206:24 | print_i64 | match | -| main.rs:205:28:205:29 | a4 | main.rs:205:9:205:81 | [match(true)] ... \| ... \| ... | match | +| main.rs:205:9:205:81 | ... \| ... \| ... | main.rs:206:16:206:24 | print_i64 | match | +| main.rs:205:28:205:29 | a4 | main.rs:205:9:205:81 | ... \| ... \| ... | match | | main.rs:205:28:205:29 | a4 | main.rs:205:28:205:29 | a4 | | | main.rs:205:34:205:56 | ...::Second(...) | main.rs:205:54:205:55 | a4 | match | | main.rs:205:34:205:56 | ...::Second(...) | main.rs:205:60:205:81 | ...::Third(...) | no-match | -| main.rs:205:54:205:55 | a4 | main.rs:205:9:205:81 | [match(true)] ... \| ... \| ... | match | +| main.rs:205:54:205:55 | a4 | main.rs:205:9:205:81 | ... \| ... \| ... | match | | main.rs:205:54:205:55 | a4 | main.rs:205:54:205:55 | a4 | | | main.rs:205:60:205:81 | ...::Third(...) | main.rs:205:79:205:80 | a4 | match | -| main.rs:205:79:205:80 | a4 | main.rs:205:9:205:81 | [match(true)] ... \| ... \| ... | match | +| main.rs:205:79:205:80 | a4 | main.rs:205:9:205:81 | ... \| ... \| ... | match | | main.rs:205:79:205:80 | a4 | main.rs:205:79:205:80 | a4 | | | main.rs:206:16:206:24 | print_i64 | main.rs:206:26:206:27 | a4 | | | main.rs:206:16:206:28 | print_i64(...) | main.rs:204:5:207:5 | match tv { ... } | | @@ -492,11 +492,11 @@ edges | main.rs:208:5:211:5 | ExprStmt | main.rs:208:11:208:12 | tv | | | main.rs:208:5:211:5 | match tv { ... } | main.rs:212:11:212:12 | tv | | | main.rs:208:11:208:12 | tv | main.rs:209:10:209:31 | ...::First(...) | | -| main.rs:209:9:209:83 | [match(true)] ... \| ... | main.rs:210:16:210:24 | print_i64 | match | +| main.rs:209:9:209:83 | ... \| ... | main.rs:210:16:210:24 | print_i64 | match | | main.rs:209:10:209:31 | ...::First(...) | main.rs:209:29:209:30 | a5 | match | | main.rs:209:10:209:31 | ...::First(...) | main.rs:209:35:209:57 | ...::Second(...) | no-match | | main.rs:209:10:209:57 | [match(false)] ... \| ... | main.rs:209:62:209:83 | ...::Third(...) | no-match | -| main.rs:209:10:209:57 | [match(true)] ... \| ... | main.rs:209:9:209:83 | [match(true)] ... \| ... | match | +| main.rs:209:10:209:57 | [match(true)] ... \| ... | main.rs:209:9:209:83 | ... \| ... | match | | main.rs:209:29:209:30 | a5 | main.rs:209:10:209:57 | [match(true)] ... \| ... | match | | main.rs:209:29:209:30 | a5 | main.rs:209:29:209:30 | a5 | | | main.rs:209:35:209:57 | ...::Second(...) | main.rs:209:10:209:57 | [match(false)] ... \| ... | no-match | @@ -504,7 +504,7 @@ edges | main.rs:209:55:209:56 | a5 | main.rs:209:10:209:57 | [match(true)] ... \| ... | match | | main.rs:209:55:209:56 | a5 | main.rs:209:55:209:56 | a5 | | | main.rs:209:62:209:83 | ...::Third(...) | main.rs:209:81:209:82 | a5 | match | -| main.rs:209:81:209:82 | a5 | main.rs:209:9:209:83 | [match(true)] ... \| ... | match | +| main.rs:209:81:209:82 | a5 | main.rs:209:9:209:83 | ... \| ... | match | | main.rs:209:81:209:82 | a5 | main.rs:209:81:209:82 | a5 | | | main.rs:210:16:210:24 | print_i64 | main.rs:210:26:210:27 | a5 | | | main.rs:210:16:210:28 | print_i64(...) | main.rs:208:5:211:5 | match tv { ... } | | @@ -513,16 +513,16 @@ edges | main.rs:212:11:212:12 | tv | main.rs:213:9:213:30 | ...::First(...) | | | main.rs:213:9:213:30 | ...::First(...) | main.rs:213:28:213:29 | a6 | match | | main.rs:213:9:213:30 | ...::First(...) | main.rs:213:35:213:57 | ...::Second(...) | no-match | -| main.rs:213:9:213:83 | [match(true)] ... \| ... | main.rs:214:16:214:24 | print_i64 | match | -| main.rs:213:28:213:29 | a6 | main.rs:213:9:213:83 | [match(true)] ... \| ... | match | +| main.rs:213:9:213:83 | ... \| ... | main.rs:214:16:214:24 | print_i64 | match | +| main.rs:213:28:213:29 | a6 | main.rs:213:9:213:83 | ... \| ... | match | | main.rs:213:28:213:29 | a6 | main.rs:213:28:213:29 | a6 | | | main.rs:213:35:213:57 | ...::Second(...) | main.rs:213:55:213:56 | a6 | match | | main.rs:213:35:213:57 | ...::Second(...) | main.rs:213:61:213:82 | ...::Third(...) | no-match | -| main.rs:213:35:213:82 | [match(true)] ... \| ... | main.rs:213:9:213:83 | [match(true)] ... \| ... | match | -| main.rs:213:55:213:56 | a6 | main.rs:213:35:213:82 | [match(true)] ... \| ... | match | +| main.rs:213:35:213:82 | ... \| ... | main.rs:213:9:213:83 | ... \| ... | match | +| main.rs:213:55:213:56 | a6 | main.rs:213:35:213:82 | ... \| ... | match | | main.rs:213:55:213:56 | a6 | main.rs:213:55:213:56 | a6 | | | main.rs:213:61:213:82 | ...::Third(...) | main.rs:213:80:213:81 | a6 | match | -| main.rs:213:80:213:81 | a6 | main.rs:213:35:213:82 | [match(true)] ... \| ... | match | +| main.rs:213:80:213:81 | a6 | main.rs:213:35:213:82 | ... \| ... | match | | main.rs:213:80:213:81 | a6 | main.rs:213:80:213:81 | a6 | | | main.rs:214:16:214:24 | print_i64 | main.rs:214:26:214:27 | a6 | | | main.rs:214:16:214:28 | print_i64(...) | main.rs:212:5:215:5 | match tv { ... } | | @@ -614,13 +614,13 @@ edges | main.rs:254:11:254:12 | fv | main.rs:255:9:255:30 | ...::First(...) | | | main.rs:255:9:255:30 | ...::First(...) | main.rs:255:27:255:29 | a13 | match | | main.rs:255:9:255:30 | ...::First(...) | main.rs:255:35:255:57 | ...::Second(...) | no-match | -| main.rs:255:9:255:109 | [match(true)] ... \| ... \| ... | main.rs:256:16:256:24 | print_i64 | match | -| main.rs:255:27:255:29 | a13 | main.rs:255:9:255:109 | [match(true)] ... \| ... \| ... | match | +| main.rs:255:9:255:109 | ... \| ... \| ... | main.rs:256:16:256:24 | print_i64 | match | +| main.rs:255:27:255:29 | a13 | main.rs:255:9:255:109 | ... \| ... \| ... | match | | main.rs:255:27:255:29 | a13 | main.rs:255:27:255:29 | a13 | | | main.rs:255:35:255:57 | ...::Second(...) | main.rs:255:54:255:56 | a13 | match | | main.rs:255:35:255:57 | ...::Second(...) | main.rs:255:61:255:82 | ...::Third(...) | no-match | | main.rs:255:35:255:82 | [match(false)] ... \| ... | main.rs:255:87:255:109 | ...::Fourth(...) | no-match | -| main.rs:255:35:255:82 | [match(true)] ... \| ... | main.rs:255:9:255:109 | [match(true)] ... \| ... \| ... | match | +| main.rs:255:35:255:82 | [match(true)] ... \| ... | main.rs:255:9:255:109 | ... \| ... \| ... | match | | main.rs:255:54:255:56 | a13 | main.rs:255:35:255:82 | [match(true)] ... \| ... | match | | main.rs:255:54:255:56 | a13 | main.rs:255:54:255:56 | a13 | | | main.rs:255:61:255:82 | ...::Third(...) | main.rs:255:35:255:82 | [match(false)] ... \| ... | no-match | @@ -628,7 +628,7 @@ edges | main.rs:255:79:255:81 | a13 | main.rs:255:35:255:82 | [match(true)] ... \| ... | match | | main.rs:255:79:255:81 | a13 | main.rs:255:79:255:81 | a13 | | | main.rs:255:87:255:109 | ...::Fourth(...) | main.rs:255:106:255:108 | a13 | match | -| main.rs:255:106:255:108 | a13 | main.rs:255:9:255:109 | [match(true)] ... \| ... \| ... | match | +| main.rs:255:106:255:108 | a13 | main.rs:255:9:255:109 | ... \| ... \| ... | match | | main.rs:255:106:255:108 | a13 | main.rs:255:106:255:108 | a13 | | | main.rs:256:16:256:24 | print_i64 | main.rs:256:26:256:28 | a13 | | | main.rs:256:16:256:29 | print_i64(...) | main.rs:254:5:257:5 | match fv { ... } | | @@ -662,11 +662,11 @@ edges | main.rs:272:5:272:50 | ...: Either | main.rs:274:5:274:18 | ExprStmt | | | main.rs:272:6:272:21 | ...::Left(...) | main.rs:272:19:272:20 | a9 | match | | main.rs:272:6:272:21 | ...::Left(...) | main.rs:272:25:272:41 | ...::Right(...) | no-match | -| main.rs:272:6:272:41 | [match(true)] ... \| ... | main.rs:272:5:272:50 | ...: Either | match | -| main.rs:272:19:272:20 | a9 | main.rs:272:6:272:41 | [match(true)] ... \| ... | match | +| main.rs:272:6:272:41 | ... \| ... | main.rs:272:5:272:50 | ...: Either | match | +| main.rs:272:19:272:20 | a9 | main.rs:272:6:272:41 | ... \| ... | match | | main.rs:272:19:272:20 | a9 | main.rs:272:19:272:20 | a9 | | | main.rs:272:25:272:41 | ...::Right(...) | main.rs:272:39:272:40 | a9 | match | -| main.rs:272:39:272:40 | a9 | main.rs:272:6:272:41 | [match(true)] ... \| ... | match | +| main.rs:272:39:272:40 | a9 | main.rs:272:6:272:41 | ... \| ... | match | | main.rs:272:39:272:40 | a9 | main.rs:272:39:272:40 | a9 | | | main.rs:273:9:275:1 | { ... } | main.rs:271:1:275:1 | exit fn param_pattern2 (normal) | | | main.rs:274:5:274:13 | print_i64 | main.rs:274:15:274:16 | a9 | | diff --git a/rust/ql/test/library-tests/variables/Ssa.expected b/rust/ql/test/library-tests/variables/Ssa.expected index 9e8dca004df8..57245cc30e7e 100644 --- a/rust/ql/test/library-tests/variables/Ssa.expected +++ b/rust/ql/test/library-tests/variables/Ssa.expected @@ -47,22 +47,22 @@ definition | main.rs:173:17:173:27 | id_variable | main.rs:173:17:173:27 | id_variable | | main.rs:178:26:178:27 | id | main.rs:178:26:178:27 | id | | main.rs:189:9:189:14 | either | main.rs:189:9:189:14 | either | -| main.rs:191:9:191:44 | [match(true)] phi | main.rs:191:9:191:44 | a3 | +| main.rs:191:9:191:44 | phi | main.rs:191:9:191:44 | a3 | | main.rs:191:22:191:23 | a3 | main.rs:191:9:191:44 | a3 | | main.rs:191:42:191:43 | a3 | main.rs:191:9:191:44 | a3 | | main.rs:203:9:203:10 | tv | main.rs:203:9:203:10 | tv | -| main.rs:205:9:205:81 | [match(true)] phi | main.rs:205:9:205:81 | a4 | +| main.rs:205:9:205:81 | phi | main.rs:205:9:205:81 | a4 | | main.rs:205:28:205:29 | a4 | main.rs:205:9:205:81 | a4 | | main.rs:205:54:205:55 | a4 | main.rs:205:9:205:81 | a4 | | main.rs:205:79:205:80 | a4 | main.rs:205:9:205:81 | a4 | -| main.rs:209:9:209:83 | [match(true)] phi | main.rs:209:9:209:83 | a5 | +| main.rs:209:9:209:83 | phi | main.rs:209:9:209:83 | a5 | | main.rs:209:10:209:57 | [match(true)] phi | main.rs:209:9:209:83 | a5 | | main.rs:209:29:209:30 | a5 | main.rs:209:9:209:83 | a5 | | main.rs:209:55:209:56 | a5 | main.rs:209:9:209:83 | a5 | | main.rs:209:81:209:82 | a5 | main.rs:209:9:209:83 | a5 | -| main.rs:213:9:213:83 | [match(true)] phi | main.rs:213:9:213:83 | a6 | +| main.rs:213:9:213:83 | phi | main.rs:213:9:213:83 | a6 | | main.rs:213:28:213:29 | a6 | main.rs:213:9:213:83 | a6 | -| main.rs:213:35:213:82 | [match(true)] phi | main.rs:213:9:213:83 | a6 | +| main.rs:213:35:213:82 | phi | main.rs:213:9:213:83 | a6 | | main.rs:213:55:213:56 | a6 | main.rs:213:9:213:83 | a6 | | main.rs:213:80:213:81 | a6 | main.rs:213:9:213:83 | a6 | | main.rs:219:9:219:14 | either | main.rs:219:9:219:14 | either | @@ -76,7 +76,7 @@ definition | main.rs:233:48:233:50 | a11 | main.rs:233:14:233:51 | a11 | | main.rs:236:33:236:35 | a12 | main.rs:236:33:236:35 | a12 | | main.rs:253:9:253:10 | fv | main.rs:253:9:253:10 | fv | -| main.rs:255:9:255:109 | [match(true)] phi | main.rs:255:9:255:109 | a13 | +| main.rs:255:9:255:109 | phi | main.rs:255:9:255:109 | a13 | | main.rs:255:27:255:29 | a13 | main.rs:255:9:255:109 | a13 | | main.rs:255:35:255:82 | [match(true)] phi | main.rs:255:9:255:109 | a13 | | main.rs:255:54:255:56 | a13 | main.rs:255:9:255:109 | a13 | @@ -85,7 +85,7 @@ definition | main.rs:261:5:261:6 | a8 | main.rs:261:5:261:6 | a8 | | main.rs:263:9:263:10 | b3 | main.rs:263:9:263:10 | b3 | | main.rs:264:9:264:10 | c1 | main.rs:264:9:264:10 | c1 | -| main.rs:272:6:272:41 | [match(true)] phi | main.rs:272:6:272:41 | a9 | +| main.rs:272:6:272:41 | phi | main.rs:272:6:272:41 | a9 | | main.rs:272:19:272:20 | a9 | main.rs:272:6:272:41 | a9 | | main.rs:272:39:272:40 | a9 | main.rs:272:6:272:41 | a9 | | main.rs:279:13:279:15 | a10 | main.rs:279:13:279:15 | a10 | @@ -198,13 +198,13 @@ read | main.rs:173:17:173:27 | id_variable | main.rs:173:17:173:27 | id_variable | main.rs:174:24:174:34 | id_variable | | main.rs:178:26:178:27 | id | main.rs:178:26:178:27 | id | main.rs:179:23:179:24 | id | | main.rs:189:9:189:14 | either | main.rs:189:9:189:14 | either | main.rs:190:11:190:16 | either | -| main.rs:191:9:191:44 | [match(true)] phi | main.rs:191:9:191:44 | a3 | main.rs:192:26:192:27 | a3 | +| main.rs:191:9:191:44 | phi | main.rs:191:9:191:44 | a3 | main.rs:192:26:192:27 | a3 | | main.rs:203:9:203:10 | tv | main.rs:203:9:203:10 | tv | main.rs:204:11:204:12 | tv | | main.rs:203:9:203:10 | tv | main.rs:203:9:203:10 | tv | main.rs:208:11:208:12 | tv | | main.rs:203:9:203:10 | tv | main.rs:203:9:203:10 | tv | main.rs:212:11:212:12 | tv | -| main.rs:205:9:205:81 | [match(true)] phi | main.rs:205:9:205:81 | a4 | main.rs:206:26:206:27 | a4 | -| main.rs:209:9:209:83 | [match(true)] phi | main.rs:209:9:209:83 | a5 | main.rs:210:26:210:27 | a5 | -| main.rs:213:9:213:83 | [match(true)] phi | main.rs:213:9:213:83 | a6 | main.rs:214:26:214:27 | a6 | +| main.rs:205:9:205:81 | phi | main.rs:205:9:205:81 | a4 | main.rs:206:26:206:27 | a4 | +| main.rs:209:9:209:83 | phi | main.rs:209:9:209:83 | a5 | main.rs:210:26:210:27 | a5 | +| main.rs:213:9:213:83 | phi | main.rs:213:9:213:83 | a6 | main.rs:214:26:214:27 | a6 | | main.rs:219:9:219:14 | either | main.rs:219:9:219:14 | either | main.rs:220:11:220:16 | either | | main.rs:221:9:221:44 | [match(true)] phi | main.rs:221:9:221:44 | a7 | main.rs:222:16:222:17 | a7 | | main.rs:221:9:221:44 | [match(true)] phi | main.rs:221:9:221:44 | a7 | main.rs:223:26:223:27 | a7 | @@ -213,11 +213,11 @@ read | main.rs:233:14:233:51 | [match(true)] phi | main.rs:233:14:233:51 | a11 | main.rs:235:23:235:25 | a11 | | main.rs:236:33:236:35 | a12 | main.rs:236:33:236:35 | a12 | main.rs:238:28:238:30 | a12 | | main.rs:253:9:253:10 | fv | main.rs:253:9:253:10 | fv | main.rs:254:11:254:12 | fv | -| main.rs:255:9:255:109 | [match(true)] phi | main.rs:255:9:255:109 | a13 | main.rs:256:26:256:28 | a13 | +| main.rs:255:9:255:109 | phi | main.rs:255:9:255:109 | a13 | main.rs:256:26:256:28 | a13 | | main.rs:261:5:261:6 | a8 | main.rs:261:5:261:6 | a8 | main.rs:266:15:266:16 | a8 | | main.rs:263:9:263:10 | b3 | main.rs:263:9:263:10 | b3 | main.rs:267:15:267:16 | b3 | | main.rs:264:9:264:10 | c1 | main.rs:264:9:264:10 | c1 | main.rs:268:15:268:16 | c1 | -| main.rs:272:6:272:41 | [match(true)] phi | main.rs:272:6:272:41 | a9 | main.rs:274:15:274:16 | a9 | +| main.rs:272:6:272:41 | phi | main.rs:272:6:272:41 | a9 | main.rs:274:15:274:16 | a9 | | main.rs:279:13:279:15 | a10 | main.rs:279:13:279:15 | a10 | main.rs:283:15:283:17 | a10 | | main.rs:280:13:280:14 | b4 | main.rs:280:13:280:14 | b4 | main.rs:284:15:284:16 | b4 | | main.rs:281:13:281:14 | c2 | main.rs:281:13:281:14 | c2 | main.rs:285:15:285:16 | c2 | @@ -343,11 +343,11 @@ firstRead | main.rs:173:17:173:27 | id_variable | main.rs:173:17:173:27 | id_variable | main.rs:174:24:174:34 | id_variable | | main.rs:178:26:178:27 | id | main.rs:178:26:178:27 | id | main.rs:179:23:179:24 | id | | main.rs:189:9:189:14 | either | main.rs:189:9:189:14 | either | main.rs:190:11:190:16 | either | -| main.rs:191:9:191:44 | [match(true)] phi | main.rs:191:9:191:44 | a3 | main.rs:192:26:192:27 | a3 | +| main.rs:191:9:191:44 | phi | main.rs:191:9:191:44 | a3 | main.rs:192:26:192:27 | a3 | | main.rs:203:9:203:10 | tv | main.rs:203:9:203:10 | tv | main.rs:204:11:204:12 | tv | -| main.rs:205:9:205:81 | [match(true)] phi | main.rs:205:9:205:81 | a4 | main.rs:206:26:206:27 | a4 | -| main.rs:209:9:209:83 | [match(true)] phi | main.rs:209:9:209:83 | a5 | main.rs:210:26:210:27 | a5 | -| main.rs:213:9:213:83 | [match(true)] phi | main.rs:213:9:213:83 | a6 | main.rs:214:26:214:27 | a6 | +| main.rs:205:9:205:81 | phi | main.rs:205:9:205:81 | a4 | main.rs:206:26:206:27 | a4 | +| main.rs:209:9:209:83 | phi | main.rs:209:9:209:83 | a5 | main.rs:210:26:210:27 | a5 | +| main.rs:213:9:213:83 | phi | main.rs:213:9:213:83 | a6 | main.rs:214:26:214:27 | a6 | | main.rs:219:9:219:14 | either | main.rs:219:9:219:14 | either | main.rs:220:11:220:16 | either | | main.rs:221:9:221:44 | [match(true)] phi | main.rs:221:9:221:44 | a7 | main.rs:222:16:222:17 | a7 | | main.rs:229:9:229:14 | either | main.rs:229:9:229:14 | either | main.rs:231:11:231:16 | either | @@ -355,11 +355,11 @@ firstRead | main.rs:233:14:233:51 | [match(true)] phi | main.rs:233:14:233:51 | a11 | main.rs:235:23:235:25 | a11 | | main.rs:236:33:236:35 | a12 | main.rs:236:33:236:35 | a12 | main.rs:238:28:238:30 | a12 | | main.rs:253:9:253:10 | fv | main.rs:253:9:253:10 | fv | main.rs:254:11:254:12 | fv | -| main.rs:255:9:255:109 | [match(true)] phi | main.rs:255:9:255:109 | a13 | main.rs:256:26:256:28 | a13 | +| main.rs:255:9:255:109 | phi | main.rs:255:9:255:109 | a13 | main.rs:256:26:256:28 | a13 | | main.rs:261:5:261:6 | a8 | main.rs:261:5:261:6 | a8 | main.rs:266:15:266:16 | a8 | | main.rs:263:9:263:10 | b3 | main.rs:263:9:263:10 | b3 | main.rs:267:15:267:16 | b3 | | main.rs:264:9:264:10 | c1 | main.rs:264:9:264:10 | c1 | main.rs:268:15:268:16 | c1 | -| main.rs:272:6:272:41 | [match(true)] phi | main.rs:272:6:272:41 | a9 | main.rs:274:15:274:16 | a9 | +| main.rs:272:6:272:41 | phi | main.rs:272:6:272:41 | a9 | main.rs:274:15:274:16 | a9 | | main.rs:279:13:279:15 | a10 | main.rs:279:13:279:15 | a10 | main.rs:283:15:283:17 | a10 | | main.rs:280:13:280:14 | b4 | main.rs:280:13:280:14 | b4 | main.rs:284:15:284:16 | b4 | | main.rs:281:13:281:14 | c2 | main.rs:281:13:281:14 | c2 | main.rs:285:15:285:16 | c2 | @@ -456,30 +456,30 @@ adjacentReads | main.rs:540:13:540:13 | a | main.rs:540:13:540:13 | a | main.rs:542:5:542:5 | a | main.rs:543:15:543:15 | a | | main.rs:549:9:549:9 | x | main.rs:549:9:549:9 | x | main.rs:550:20:550:20 | x | main.rs:551:15:551:15 | x | phi -| main.rs:191:9:191:44 | [match(true)] phi | main.rs:191:9:191:44 | a3 | main.rs:191:22:191:23 | a3 | -| main.rs:191:9:191:44 | [match(true)] phi | main.rs:191:9:191:44 | a3 | main.rs:191:42:191:43 | a3 | -| main.rs:205:9:205:81 | [match(true)] phi | main.rs:205:9:205:81 | a4 | main.rs:205:28:205:29 | a4 | -| main.rs:205:9:205:81 | [match(true)] phi | main.rs:205:9:205:81 | a4 | main.rs:205:54:205:55 | a4 | -| main.rs:205:9:205:81 | [match(true)] phi | main.rs:205:9:205:81 | a4 | main.rs:205:79:205:80 | a4 | -| main.rs:209:9:209:83 | [match(true)] phi | main.rs:209:9:209:83 | a5 | main.rs:209:10:209:57 | [match(true)] phi | -| main.rs:209:9:209:83 | [match(true)] phi | main.rs:209:9:209:83 | a5 | main.rs:209:81:209:82 | a5 | +| main.rs:191:9:191:44 | phi | main.rs:191:9:191:44 | a3 | main.rs:191:22:191:23 | a3 | +| main.rs:191:9:191:44 | phi | main.rs:191:9:191:44 | a3 | main.rs:191:42:191:43 | a3 | +| main.rs:205:9:205:81 | phi | main.rs:205:9:205:81 | a4 | main.rs:205:28:205:29 | a4 | +| main.rs:205:9:205:81 | phi | main.rs:205:9:205:81 | a4 | main.rs:205:54:205:55 | a4 | +| main.rs:205:9:205:81 | phi | main.rs:205:9:205:81 | a4 | main.rs:205:79:205:80 | a4 | +| main.rs:209:9:209:83 | phi | main.rs:209:9:209:83 | a5 | main.rs:209:10:209:57 | [match(true)] phi | +| main.rs:209:9:209:83 | phi | main.rs:209:9:209:83 | a5 | main.rs:209:81:209:82 | a5 | | main.rs:209:10:209:57 | [match(true)] phi | main.rs:209:9:209:83 | a5 | main.rs:209:29:209:30 | a5 | | main.rs:209:10:209:57 | [match(true)] phi | main.rs:209:9:209:83 | a5 | main.rs:209:55:209:56 | a5 | -| main.rs:213:9:213:83 | [match(true)] phi | main.rs:213:9:213:83 | a6 | main.rs:213:28:213:29 | a6 | -| main.rs:213:9:213:83 | [match(true)] phi | main.rs:213:9:213:83 | a6 | main.rs:213:35:213:82 | [match(true)] phi | -| main.rs:213:35:213:82 | [match(true)] phi | main.rs:213:9:213:83 | a6 | main.rs:213:55:213:56 | a6 | -| main.rs:213:35:213:82 | [match(true)] phi | main.rs:213:9:213:83 | a6 | main.rs:213:80:213:81 | a6 | +| main.rs:213:9:213:83 | phi | main.rs:213:9:213:83 | a6 | main.rs:213:28:213:29 | a6 | +| main.rs:213:9:213:83 | phi | main.rs:213:9:213:83 | a6 | main.rs:213:35:213:82 | phi | +| main.rs:213:35:213:82 | phi | main.rs:213:9:213:83 | a6 | main.rs:213:55:213:56 | a6 | +| main.rs:213:35:213:82 | phi | main.rs:213:9:213:83 | a6 | main.rs:213:80:213:81 | a6 | | main.rs:221:9:221:44 | [match(true)] phi | main.rs:221:9:221:44 | a7 | main.rs:221:22:221:23 | a7 | | main.rs:221:9:221:44 | [match(true)] phi | main.rs:221:9:221:44 | a7 | main.rs:221:42:221:43 | a7 | | main.rs:233:14:233:51 | [match(true)] phi | main.rs:233:14:233:51 | a11 | main.rs:233:27:233:29 | a11 | | main.rs:233:14:233:51 | [match(true)] phi | main.rs:233:14:233:51 | a11 | main.rs:233:48:233:50 | a11 | -| main.rs:255:9:255:109 | [match(true)] phi | main.rs:255:9:255:109 | a13 | main.rs:255:27:255:29 | a13 | -| main.rs:255:9:255:109 | [match(true)] phi | main.rs:255:9:255:109 | a13 | main.rs:255:35:255:82 | [match(true)] phi | -| main.rs:255:9:255:109 | [match(true)] phi | main.rs:255:9:255:109 | a13 | main.rs:255:106:255:108 | a13 | +| main.rs:255:9:255:109 | phi | main.rs:255:9:255:109 | a13 | main.rs:255:27:255:29 | a13 | +| main.rs:255:9:255:109 | phi | main.rs:255:9:255:109 | a13 | main.rs:255:35:255:82 | [match(true)] phi | +| main.rs:255:9:255:109 | phi | main.rs:255:9:255:109 | a13 | main.rs:255:106:255:108 | a13 | | main.rs:255:35:255:82 | [match(true)] phi | main.rs:255:9:255:109 | a13 | main.rs:255:54:255:56 | a13 | | main.rs:255:35:255:82 | [match(true)] phi | main.rs:255:9:255:109 | a13 | main.rs:255:79:255:81 | a13 | -| main.rs:272:6:272:41 | [match(true)] phi | main.rs:272:6:272:41 | a9 | main.rs:272:19:272:20 | a9 | -| main.rs:272:6:272:41 | [match(true)] phi | main.rs:272:6:272:41 | a9 | main.rs:272:39:272:40 | a9 | +| main.rs:272:6:272:41 | phi | main.rs:272:6:272:41 | a9 | main.rs:272:19:272:20 | a9 | +| main.rs:272:6:272:41 | phi | main.rs:272:6:272:41 | a9 | main.rs:272:39:272:40 | a9 | | main.rs:479:5:487:5 | phi | main.rs:476:13:476:13 | x | main.rs:480:9:480:9 | x | | main.rs:479:5:487:5 | phi | main.rs:476:13:476:13 | x | main.rs:484:9:484:9 | x | phiReadNode @@ -494,33 +494,33 @@ phiReadInput | main.rs:104:11:105:12 | SSA phi read(s1) | main.rs:104:11:105:12 | SSA phi read(s1) | | main.rs:493:5:497:5 | SSA phi read(x) | main.rs:492:9:492:9 | x | ultimateDef -| main.rs:191:9:191:44 | [match(true)] phi | main.rs:191:22:191:23 | a3 | -| main.rs:191:9:191:44 | [match(true)] phi | main.rs:191:42:191:43 | a3 | -| main.rs:205:9:205:81 | [match(true)] phi | main.rs:205:28:205:29 | a4 | -| main.rs:205:9:205:81 | [match(true)] phi | main.rs:205:54:205:55 | a4 | -| main.rs:205:9:205:81 | [match(true)] phi | main.rs:205:79:205:80 | a4 | -| main.rs:209:9:209:83 | [match(true)] phi | main.rs:209:29:209:30 | a5 | -| main.rs:209:9:209:83 | [match(true)] phi | main.rs:209:55:209:56 | a5 | -| main.rs:209:9:209:83 | [match(true)] phi | main.rs:209:81:209:82 | a5 | +| main.rs:191:9:191:44 | phi | main.rs:191:22:191:23 | a3 | +| main.rs:191:9:191:44 | phi | main.rs:191:42:191:43 | a3 | +| main.rs:205:9:205:81 | phi | main.rs:205:28:205:29 | a4 | +| main.rs:205:9:205:81 | phi | main.rs:205:54:205:55 | a4 | +| main.rs:205:9:205:81 | phi | main.rs:205:79:205:80 | a4 | +| main.rs:209:9:209:83 | phi | main.rs:209:29:209:30 | a5 | +| main.rs:209:9:209:83 | phi | main.rs:209:55:209:56 | a5 | +| main.rs:209:9:209:83 | phi | main.rs:209:81:209:82 | a5 | | main.rs:209:10:209:57 | [match(true)] phi | main.rs:209:29:209:30 | a5 | | main.rs:209:10:209:57 | [match(true)] phi | main.rs:209:55:209:56 | a5 | -| main.rs:213:9:213:83 | [match(true)] phi | main.rs:213:28:213:29 | a6 | -| main.rs:213:9:213:83 | [match(true)] phi | main.rs:213:55:213:56 | a6 | -| main.rs:213:9:213:83 | [match(true)] phi | main.rs:213:80:213:81 | a6 | -| main.rs:213:35:213:82 | [match(true)] phi | main.rs:213:55:213:56 | a6 | -| main.rs:213:35:213:82 | [match(true)] phi | main.rs:213:80:213:81 | a6 | +| main.rs:213:9:213:83 | phi | main.rs:213:28:213:29 | a6 | +| main.rs:213:9:213:83 | phi | main.rs:213:55:213:56 | a6 | +| main.rs:213:9:213:83 | phi | main.rs:213:80:213:81 | a6 | +| main.rs:213:35:213:82 | phi | main.rs:213:55:213:56 | a6 | +| main.rs:213:35:213:82 | phi | main.rs:213:80:213:81 | a6 | | main.rs:221:9:221:44 | [match(true)] phi | main.rs:221:22:221:23 | a7 | | main.rs:221:9:221:44 | [match(true)] phi | main.rs:221:42:221:43 | a7 | | main.rs:233:14:233:51 | [match(true)] phi | main.rs:233:27:233:29 | a11 | | main.rs:233:14:233:51 | [match(true)] phi | main.rs:233:48:233:50 | a11 | -| main.rs:255:9:255:109 | [match(true)] phi | main.rs:255:27:255:29 | a13 | -| main.rs:255:9:255:109 | [match(true)] phi | main.rs:255:54:255:56 | a13 | -| main.rs:255:9:255:109 | [match(true)] phi | main.rs:255:79:255:81 | a13 | -| main.rs:255:9:255:109 | [match(true)] phi | main.rs:255:106:255:108 | a13 | +| main.rs:255:9:255:109 | phi | main.rs:255:27:255:29 | a13 | +| main.rs:255:9:255:109 | phi | main.rs:255:54:255:56 | a13 | +| main.rs:255:9:255:109 | phi | main.rs:255:79:255:81 | a13 | +| main.rs:255:9:255:109 | phi | main.rs:255:106:255:108 | a13 | | main.rs:255:35:255:82 | [match(true)] phi | main.rs:255:54:255:56 | a13 | | main.rs:255:35:255:82 | [match(true)] phi | main.rs:255:79:255:81 | a13 | -| main.rs:272:6:272:41 | [match(true)] phi | main.rs:272:19:272:20 | a9 | -| main.rs:272:6:272:41 | [match(true)] phi | main.rs:272:39:272:40 | a9 | +| main.rs:272:6:272:41 | phi | main.rs:272:19:272:20 | a9 | +| main.rs:272:6:272:41 | phi | main.rs:272:39:272:40 | a9 | | main.rs:479:5:487:5 | phi | main.rs:480:9:480:9 | x | | main.rs:479:5:487:5 | phi | main.rs:484:9:484:9 | x | assigns From a8bb37c3c25ca9e2870d25b0d34bace9f2ee83b3 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 18 Feb 2025 14:09:39 +0100 Subject: [PATCH 4/4] Swift: Update expected test output --- .../ql/test/library-tests/controlflow/graph/Cfg.expected | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/swift/ql/test/library-tests/controlflow/graph/Cfg.expected b/swift/ql/test/library-tests/controlflow/graph/Cfg.expected index d2d700b9d5c8..05f14b3082e5 100644 --- a/swift/ql/test/library-tests/controlflow/graph/Cfg.expected +++ b/swift/ql/test/library-tests/controlflow/graph/Cfg.expected @@ -705,10 +705,10 @@ | cfg.swift:215:6:215:29 | StmtCondition | cfg.swift:215:6:215:6 | b | | | cfg.swift:215:6:215:29 | [false] ... ? ... : ... | cfg.swift:219:12:219:12 | !b | false | | cfg.swift:215:6:215:29 | [true] ... ? ... : ... | cfg.swift:216:12:216:12 | b | true | -| cfg.swift:215:10:215:15 | [true] (...) | cfg.swift:215:6:215:29 | [true] ... ? ... : ... | true | -| cfg.swift:215:11:215:11 | true | cfg.swift:215:10:215:15 | [true] (...) | true | -| cfg.swift:215:19:215:29 | [false] (Bool) ... | cfg.swift:215:6:215:29 | [false] ... ? ... : ... | false | -| cfg.swift:215:24:215:24 | false | cfg.swift:215:19:215:29 | [false] (Bool) ... | false | +| cfg.swift:215:10:215:15 | (...) | cfg.swift:215:6:215:29 | [true] ... ? ... : ... | true | +| cfg.swift:215:11:215:11 | true | cfg.swift:215:10:215:15 | (...) | true | +| cfg.swift:215:19:215:29 | (Bool) ... | cfg.swift:215:6:215:29 | [false] ... ? ... : ... | false | +| cfg.swift:215:24:215:24 | false | cfg.swift:215:19:215:29 | (Bool) ... | false | | cfg.swift:216:5:216:12 | return ... | cfg.swift:214:1:221:1 | exit conversionsInSplitEntry(b:) (normal) | return | | cfg.swift:216:12:216:12 | b | cfg.swift:216:5:216:12 | return ... | | | cfg.swift:219:5:219:12 | return ... | cfg.swift:214:1:221:1 | exit conversionsInSplitEntry(b:) (normal) | return |