Merge branch 'main' into redsun82/rust-less-canonical-paths

This commit is contained in:
Paolo Tranquilli
2024-12-04 11:24:48 +01:00
28 changed files with 589 additions and 189 deletions

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* Added support for data-flow through member accesses of objects with `dynamic` types.

View File

@@ -883,6 +883,17 @@ private predicate fieldOrPropertyStore(Expr e, ContentSet c, Expr src, Expr q, b
)
)
)
or
// A write to a dynamic property
exists(DynamicMemberAccess dma, AssignableDefinition def, DynamicProperty dp |
def.getTargetAccess() = dma and
dp.getAnAccess() = dma and
c.isDynamicProperty(dp) and
src = def.getSource() and
q = dma.getQualifier() and
e = def.getExpr() and
postUpdate = true
)
}
/**
@@ -894,6 +905,18 @@ private predicate fieldOrPropertyRead(Expr e1, ContentSet c, FieldOrPropertyRead
c = e2.getTarget().(FieldOrProperty).getContentSet()
}
/**
* Holds if `e2` is an expression that reads the dynamic property `c` from
* expression `e1`.
*/
private predicate dynamicPropertyRead(Expr e1, ContentSet c, DynamicMemberRead e2) {
exists(DynamicPropertyContent dpc |
e1 = e2.getQualifier() and
dpc.getAnAccess() = e2 and
c.isDynamicProperty(dpc.getName())
)
}
/**
* Holds if `ce` is a collection expression that adds `src` to the collection `ce`.
*/
@@ -1099,6 +1122,8 @@ private module Cached {
|
fieldOrPropertyRead(e, _, read)
or
dynamicPropertyRead(e, _, read)
or
arrayRead(e, read)
)
)
@@ -1140,6 +1165,7 @@ private module Cached {
newtype TContent =
TFieldContent(Field f) { f.isUnboundDeclaration() } or
TPropertyContent(Property p) { p.isUnboundDeclaration() } or
TDynamicPropertyContent(DynamicProperty dp) or
TElementContent() or
TSyntheticFieldContent(SyntheticField f) or
TPrimaryConstructorParameterContent(Parameter p) {
@@ -1154,12 +1180,16 @@ private module Cached {
cached
newtype TContentSet =
TSingletonContent(Content c) { not c instanceof PropertyContent } or
TPropertyContentSet(Property p) { p.isUnboundDeclaration() }
TPropertyContentSet(Property p) { p.isUnboundDeclaration() } or
TDynamicPropertyContentSet(DynamicProperty dp)
cached
newtype TContentApprox =
TFieldApproxContent(string firstChar) { firstChar = approximateFieldContent(_) } or
TPropertyApproxContent(string firstChar) { firstChar = approximatePropertyContent(_) } or
TDynamicPropertyApproxContent(string firstChar) {
firstChar = approximateDynamicPropertyContent(_)
} or
TElementApproxContent() or
TSyntheticFieldApproxContent() or
TPrimaryConstructorParameterApproxContent(string firstChar) {
@@ -2084,6 +2114,18 @@ class FieldOrProperty extends Assignable, Modifiable {
}
}
/** A string that is a reference to a late-bound target of a dynamic member access. */
class DynamicProperty extends string {
private DynamicMemberAccess dma;
DynamicProperty() { this = dma.getLateBoundTargetName() }
ContentSet getContentSet() { result.isDynamicProperty(this) }
/** Gets an access of this dynamic property. */
DynamicMemberAccess getAnAccess() { result = dma }
}
private class InstanceFieldOrProperty extends FieldOrProperty {
InstanceFieldOrProperty() { not this.isStatic() }
}
@@ -2342,6 +2384,11 @@ private class ReadStepConfiguration extends ControlFlowReachabilityConfiguration
or
exactScope = false and
isSuccessor = true and
dynamicPropertyRead(e1, _, e2) and
scope = e2
or
exactScope = false and
isSuccessor = true and
arrayRead(e1, e2) and
scope = e2
or
@@ -2474,6 +2521,8 @@ predicate readStep(Node node1, ContentSet c, Node node2) {
exists(ReadStepConfiguration x | hasNodePath(x, node1, node2) |
fieldOrPropertyRead(node1.asExpr(), c, node2.asExpr())
or
dynamicPropertyRead(node1.asExpr(), c, node2.asExpr())
or
node2.asExpr().(AwaitExpr).getExpr() = node1.asExpr() and
c = getResultContent()
)
@@ -3064,6 +3113,11 @@ class ContentApprox extends TContentApprox {
this = TPropertyApproxContent(firstChar) and result = "approximated property " + firstChar
)
or
exists(string firstChar |
this = TDynamicPropertyApproxContent(firstChar) and
result = "approximated dynamic property " + firstChar
)
or
this = TElementApproxContent() and result = "element"
or
this = TSyntheticFieldApproxContent() and result = "approximated synthetic field"
@@ -3095,6 +3149,11 @@ private string approximatePropertyContent(PropertyContent pc) {
result = pc.getProperty().getName().prefix(1)
}
/** Gets a string for approximating the name of a dynamic property. */
private string approximateDynamicPropertyContent(DynamicPropertyContent dpc) {
result = dpc.getName().prefix(1)
}
/**
* Gets a string for approximating the name of a synthetic field corresponding
* to a primary constructor parameter.
@@ -3110,6 +3169,8 @@ ContentApprox getContentApprox(Content c) {
or
result = TPropertyApproxContent(approximatePropertyContent(c))
or
result = TDynamicPropertyApproxContent(approximateDynamicPropertyContent(c))
or
c instanceof ElementContent and result = TElementApproxContent()
or
c instanceof SyntheticFieldContent and result = TSyntheticFieldApproxContent()

View File

@@ -239,6 +239,23 @@ class PropertyContent extends Content, TPropertyContent {
override Location getLocation() { result = p.getLocation() }
}
/** A reference to a dynamic property. */
class DynamicPropertyContent extends Content, TDynamicPropertyContent {
private DynamicProperty name;
DynamicPropertyContent() { this = TDynamicPropertyContent(name) }
/** Gets an access of this dynamic property. */
DynamicMemberAccess getAnAccess() { result = name.getAnAccess() }
override string toString() { result = "dynamic property " + name }
override EmptyLocation getLocation() { any() }
/** Gets the name that is referenced. */
string getName() { result = name }
}
/**
* A reference to the index of an argument of a delegate call.
*/
@@ -324,6 +341,9 @@ class ContentSet extends TContentSet {
*/
predicate isProperty(Property p) { this = TPropertyContentSet(p) }
/** Holds if this content set represents the dynamic property `name`. */
predicate isDynamicProperty(string name) { this = TDynamicPropertyContentSet(name) }
/**
* Holds if this content set represents the `i`th argument of a delegate call.
*/
@@ -348,6 +368,8 @@ class ContentSet extends TContentSet {
this.isSingleton(result)
or
this.isProperty(result.(PropertyContent).getProperty())
or
this.isDynamicProperty(result.(DynamicPropertyContent).getName())
}
/** Gets a content that may be read from when reading from this set. */
@@ -362,6 +384,17 @@ class ContentSet extends TContentSet {
or
overridesOrImplementsSourceDecl(p1, p2)
)
or
exists(FieldOrProperty p |
this = p.getContentSet() and
result.(DynamicPropertyContent).getName() = p.getName()
)
or
this.isDynamicProperty([
result.(DynamicPropertyContent).getName(),
result.(PropertyContent).getProperty().getName(),
result.(FieldContent).getField().getName()
])
}
/** Gets a textual representation of this content set. */
@@ -375,6 +408,11 @@ class ContentSet extends TContentSet {
this.isProperty(p) and
result = "property " + p.getName()
)
or
exists(string name |
this.isDynamicProperty(name) and
result = "dynamic property " + name
)
}
/** Gets the location of this content set. */
@@ -388,5 +426,8 @@ class ContentSet extends TContentSet {
this.isProperty(p) and
result = p.getLocation()
)
or
this.isDynamicProperty(_) and
result instanceof EmptyLocation
}
}

View File

@@ -1162,6 +1162,54 @@ edges
| K.cs:8:22:8:22 | access to local variable o : String | K.cs:8:9:8:15 | [post] access to field Strings : String[] [element] : String | provenance | |
| K.cs:13:14:13:20 | access to field Strings : String[] [element] : String | K.cs:13:14:13:23 | access to array element | provenance | |
| K.cs:13:14:13:20 | access to field Strings : String[] [element] : String | K.cs:13:14:13:23 | access to array element | provenance | |
| L.cs:17:9:17:10 | [post] access to local variable d1 : Object [dynamic property p1] : String | L.cs:18:14:18:15 | access to local variable d1 : Object [dynamic property p1] : String | provenance | |
| L.cs:17:9:17:10 | [post] access to local variable d1 : Object [dynamic property p1] : String | L.cs:18:14:18:15 | access to local variable d1 : Object [dynamic property p1] : String | provenance | |
| L.cs:17:17:17:33 | call to method Source<String> : String | L.cs:17:9:17:10 | [post] access to local variable d1 : Object [dynamic property p1] : String | provenance | |
| L.cs:17:17:17:33 | call to method Source<String> : String | L.cs:17:9:17:10 | [post] access to local variable d1 : Object [dynamic property p1] : String | provenance | |
| L.cs:18:14:18:15 | access to local variable d1 : Object [dynamic property p1] : String | L.cs:18:14:18:18 | dynamic access to member p1 | provenance | |
| L.cs:18:14:18:15 | access to local variable d1 : Object [dynamic property p1] : String | L.cs:18:14:18:18 | dynamic access to member p1 | provenance | |
| L.cs:22:9:22:10 | [post] access to local variable d2 : Object [dynamic property p2] : String | L.cs:23:16:23:17 | (...) ... : L [dynamic property p2] : String | provenance | |
| L.cs:22:9:22:10 | [post] access to local variable d2 : Object [dynamic property p2] : String | L.cs:23:16:23:17 | (...) ... : L [dynamic property p2] : String | provenance | |
| L.cs:22:17:22:33 | call to method Source<String> : String | L.cs:22:9:22:10 | [post] access to local variable d2 : Object [dynamic property p2] : String | provenance | |
| L.cs:22:17:22:33 | call to method Source<String> : String | L.cs:22:9:22:10 | [post] access to local variable d2 : Object [dynamic property p2] : String | provenance | |
| L.cs:23:11:23:12 | access to local variable l2 : L [dynamic property p2] : String | L.cs:24:14:24:15 | access to local variable l2 : L [dynamic property p2] : String | provenance | |
| L.cs:23:11:23:12 | access to local variable l2 : L [dynamic property p2] : String | L.cs:24:14:24:15 | access to local variable l2 : L [dynamic property p2] : String | provenance | |
| L.cs:23:16:23:17 | (...) ... : L [dynamic property p2] : String | L.cs:23:11:23:12 | access to local variable l2 : L [dynamic property p2] : String | provenance | |
| L.cs:23:16:23:17 | (...) ... : L [dynamic property p2] : String | L.cs:23:11:23:12 | access to local variable l2 : L [dynamic property p2] : String | provenance | |
| L.cs:24:14:24:15 | access to local variable l2 : L [dynamic property p2] : String | L.cs:24:14:24:18 | access to property p2 | provenance | |
| L.cs:24:14:24:15 | access to local variable l2 : L [dynamic property p2] : String | L.cs:24:14:24:18 | access to property p2 | provenance | |
| L.cs:27:9:27:12 | [post] this access : L [property p3] : String | L.cs:28:17:28:18 | access to local variable d3 : L [property p3] : String | provenance | |
| L.cs:27:9:27:12 | [post] this access : L [property p3] : String | L.cs:28:17:28:18 | access to local variable d3 : L [property p3] : String | provenance | |
| L.cs:27:19:27:35 | call to method Source<String> : String | L.cs:27:9:27:12 | [post] this access : L [property p3] : String | provenance | |
| L.cs:27:19:27:35 | call to method Source<String> : String | L.cs:27:9:27:12 | [post] this access : L [property p3] : String | provenance | |
| L.cs:28:17:28:18 | access to local variable d3 : L [property p3] : String | L.cs:29:14:29:15 | access to local variable d3 : L [property p3] : String | provenance | |
| L.cs:28:17:28:18 | access to local variable d3 : L [property p3] : String | L.cs:29:14:29:15 | access to local variable d3 : L [property p3] : String | provenance | |
| L.cs:29:14:29:15 | access to local variable d3 : L [property p3] : String | L.cs:29:14:29:18 | dynamic access to member p3 | provenance | |
| L.cs:29:14:29:15 | access to local variable d3 : L [property p3] : String | L.cs:29:14:29:18 | dynamic access to member p3 | provenance | |
| L.cs:33:9:33:10 | [post] access to local variable d4 : Object [dynamic property f1] : String | L.cs:34:14:34:15 | access to local variable d4 : Object [dynamic property f1] : String | provenance | |
| L.cs:33:9:33:10 | [post] access to local variable d4 : Object [dynamic property f1] : String | L.cs:34:14:34:15 | access to local variable d4 : Object [dynamic property f1] : String | provenance | |
| L.cs:33:17:33:33 | call to method Source<String> : String | L.cs:33:9:33:10 | [post] access to local variable d4 : Object [dynamic property f1] : String | provenance | |
| L.cs:33:17:33:33 | call to method Source<String> : String | L.cs:33:9:33:10 | [post] access to local variable d4 : Object [dynamic property f1] : String | provenance | |
| L.cs:34:14:34:15 | access to local variable d4 : Object [dynamic property f1] : String | L.cs:34:14:34:18 | dynamic access to member f1 | provenance | |
| L.cs:34:14:34:15 | access to local variable d4 : Object [dynamic property f1] : String | L.cs:34:14:34:18 | dynamic access to member f1 | provenance | |
| L.cs:38:9:38:10 | [post] access to local variable d5 : Object [dynamic property f2] : String | L.cs:39:16:39:17 | (...) ... : L [dynamic property f2] : String | provenance | |
| L.cs:38:9:38:10 | [post] access to local variable d5 : Object [dynamic property f2] : String | L.cs:39:16:39:17 | (...) ... : L [dynamic property f2] : String | provenance | |
| L.cs:38:17:38:33 | call to method Source<String> : String | L.cs:38:9:38:10 | [post] access to local variable d5 : Object [dynamic property f2] : String | provenance | |
| L.cs:38:17:38:33 | call to method Source<String> : String | L.cs:38:9:38:10 | [post] access to local variable d5 : Object [dynamic property f2] : String | provenance | |
| L.cs:39:11:39:12 | access to local variable l5 : L [dynamic property f2] : String | L.cs:40:14:40:15 | access to local variable l5 : L [dynamic property f2] : String | provenance | |
| L.cs:39:11:39:12 | access to local variable l5 : L [dynamic property f2] : String | L.cs:40:14:40:15 | access to local variable l5 : L [dynamic property f2] : String | provenance | |
| L.cs:39:16:39:17 | (...) ... : L [dynamic property f2] : String | L.cs:39:11:39:12 | access to local variable l5 : L [dynamic property f2] : String | provenance | |
| L.cs:39:16:39:17 | (...) ... : L [dynamic property f2] : String | L.cs:39:11:39:12 | access to local variable l5 : L [dynamic property f2] : String | provenance | |
| L.cs:40:14:40:15 | access to local variable l5 : L [dynamic property f2] : String | L.cs:40:14:40:18 | access to field f2 | provenance | |
| L.cs:40:14:40:15 | access to local variable l5 : L [dynamic property f2] : String | L.cs:40:14:40:18 | access to field f2 | provenance | |
| L.cs:43:9:43:12 | [post] this access : L [field f3] : String | L.cs:44:17:44:18 | access to local variable d6 : L [field f3] : String | provenance | |
| L.cs:43:9:43:12 | [post] this access : L [field f3] : String | L.cs:44:17:44:18 | access to local variable d6 : L [field f3] : String | provenance | |
| L.cs:43:19:43:35 | call to method Source<String> : String | L.cs:43:9:43:12 | [post] this access : L [field f3] : String | provenance | |
| L.cs:43:19:43:35 | call to method Source<String> : String | L.cs:43:9:43:12 | [post] this access : L [field f3] : String | provenance | |
| L.cs:44:17:44:18 | access to local variable d6 : L [field f3] : String | L.cs:45:14:45:15 | access to local variable d6 : L [field f3] : String | provenance | |
| L.cs:44:17:44:18 | access to local variable d6 : L [field f3] : String | L.cs:45:14:45:15 | access to local variable d6 : L [field f3] : String | provenance | |
| L.cs:45:14:45:15 | access to local variable d6 : L [field f3] : String | L.cs:45:14:45:18 | dynamic access to member f3 | provenance | |
| L.cs:45:14:45:15 | access to local variable d6 : L [field f3] : String | L.cs:45:14:45:18 | dynamic access to member f3 | provenance | |
nodes
| A.cs:5:13:5:13 | access to local variable c : C | semmle.label | access to local variable c : C |
| A.cs:5:13:5:13 | access to local variable c : C | semmle.label | access to local variable c : C |
@@ -2415,6 +2463,66 @@ nodes
| K.cs:13:14:13:20 | access to field Strings : String[] [element] : String | semmle.label | access to field Strings : String[] [element] : String |
| K.cs:13:14:13:23 | access to array element | semmle.label | access to array element |
| K.cs:13:14:13:23 | access to array element | semmle.label | access to array element |
| L.cs:17:9:17:10 | [post] access to local variable d1 : Object [dynamic property p1] : String | semmle.label | [post] access to local variable d1 : Object [dynamic property p1] : String |
| L.cs:17:9:17:10 | [post] access to local variable d1 : Object [dynamic property p1] : String | semmle.label | [post] access to local variable d1 : Object [dynamic property p1] : String |
| L.cs:17:17:17:33 | call to method Source<String> : String | semmle.label | call to method Source<String> : String |
| L.cs:17:17:17:33 | call to method Source<String> : String | semmle.label | call to method Source<String> : String |
| L.cs:18:14:18:15 | access to local variable d1 : Object [dynamic property p1] : String | semmle.label | access to local variable d1 : Object [dynamic property p1] : String |
| L.cs:18:14:18:15 | access to local variable d1 : Object [dynamic property p1] : String | semmle.label | access to local variable d1 : Object [dynamic property p1] : String |
| L.cs:18:14:18:18 | dynamic access to member p1 | semmle.label | dynamic access to member p1 |
| L.cs:18:14:18:18 | dynamic access to member p1 | semmle.label | dynamic access to member p1 |
| L.cs:22:9:22:10 | [post] access to local variable d2 : Object [dynamic property p2] : String | semmle.label | [post] access to local variable d2 : Object [dynamic property p2] : String |
| L.cs:22:9:22:10 | [post] access to local variable d2 : Object [dynamic property p2] : String | semmle.label | [post] access to local variable d2 : Object [dynamic property p2] : String |
| L.cs:22:17:22:33 | call to method Source<String> : String | semmle.label | call to method Source<String> : String |
| L.cs:22:17:22:33 | call to method Source<String> : String | semmle.label | call to method Source<String> : String |
| L.cs:23:11:23:12 | access to local variable l2 : L [dynamic property p2] : String | semmle.label | access to local variable l2 : L [dynamic property p2] : String |
| L.cs:23:11:23:12 | access to local variable l2 : L [dynamic property p2] : String | semmle.label | access to local variable l2 : L [dynamic property p2] : String |
| L.cs:23:16:23:17 | (...) ... : L [dynamic property p2] : String | semmle.label | (...) ... : L [dynamic property p2] : String |
| L.cs:23:16:23:17 | (...) ... : L [dynamic property p2] : String | semmle.label | (...) ... : L [dynamic property p2] : String |
| L.cs:24:14:24:15 | access to local variable l2 : L [dynamic property p2] : String | semmle.label | access to local variable l2 : L [dynamic property p2] : String |
| L.cs:24:14:24:15 | access to local variable l2 : L [dynamic property p2] : String | semmle.label | access to local variable l2 : L [dynamic property p2] : String |
| L.cs:24:14:24:18 | access to property p2 | semmle.label | access to property p2 |
| L.cs:24:14:24:18 | access to property p2 | semmle.label | access to property p2 |
| L.cs:27:9:27:12 | [post] this access : L [property p3] : String | semmle.label | [post] this access : L [property p3] : String |
| L.cs:27:9:27:12 | [post] this access : L [property p3] : String | semmle.label | [post] this access : L [property p3] : String |
| L.cs:27:19:27:35 | call to method Source<String> : String | semmle.label | call to method Source<String> : String |
| L.cs:27:19:27:35 | call to method Source<String> : String | semmle.label | call to method Source<String> : String |
| L.cs:28:17:28:18 | access to local variable d3 : L [property p3] : String | semmle.label | access to local variable d3 : L [property p3] : String |
| L.cs:28:17:28:18 | access to local variable d3 : L [property p3] : String | semmle.label | access to local variable d3 : L [property p3] : String |
| L.cs:29:14:29:15 | access to local variable d3 : L [property p3] : String | semmle.label | access to local variable d3 : L [property p3] : String |
| L.cs:29:14:29:15 | access to local variable d3 : L [property p3] : String | semmle.label | access to local variable d3 : L [property p3] : String |
| L.cs:29:14:29:18 | dynamic access to member p3 | semmle.label | dynamic access to member p3 |
| L.cs:29:14:29:18 | dynamic access to member p3 | semmle.label | dynamic access to member p3 |
| L.cs:33:9:33:10 | [post] access to local variable d4 : Object [dynamic property f1] : String | semmle.label | [post] access to local variable d4 : Object [dynamic property f1] : String |
| L.cs:33:9:33:10 | [post] access to local variable d4 : Object [dynamic property f1] : String | semmle.label | [post] access to local variable d4 : Object [dynamic property f1] : String |
| L.cs:33:17:33:33 | call to method Source<String> : String | semmle.label | call to method Source<String> : String |
| L.cs:33:17:33:33 | call to method Source<String> : String | semmle.label | call to method Source<String> : String |
| L.cs:34:14:34:15 | access to local variable d4 : Object [dynamic property f1] : String | semmle.label | access to local variable d4 : Object [dynamic property f1] : String |
| L.cs:34:14:34:15 | access to local variable d4 : Object [dynamic property f1] : String | semmle.label | access to local variable d4 : Object [dynamic property f1] : String |
| L.cs:34:14:34:18 | dynamic access to member f1 | semmle.label | dynamic access to member f1 |
| L.cs:34:14:34:18 | dynamic access to member f1 | semmle.label | dynamic access to member f1 |
| L.cs:38:9:38:10 | [post] access to local variable d5 : Object [dynamic property f2] : String | semmle.label | [post] access to local variable d5 : Object [dynamic property f2] : String |
| L.cs:38:9:38:10 | [post] access to local variable d5 : Object [dynamic property f2] : String | semmle.label | [post] access to local variable d5 : Object [dynamic property f2] : String |
| L.cs:38:17:38:33 | call to method Source<String> : String | semmle.label | call to method Source<String> : String |
| L.cs:38:17:38:33 | call to method Source<String> : String | semmle.label | call to method Source<String> : String |
| L.cs:39:11:39:12 | access to local variable l5 : L [dynamic property f2] : String | semmle.label | access to local variable l5 : L [dynamic property f2] : String |
| L.cs:39:11:39:12 | access to local variable l5 : L [dynamic property f2] : String | semmle.label | access to local variable l5 : L [dynamic property f2] : String |
| L.cs:39:16:39:17 | (...) ... : L [dynamic property f2] : String | semmle.label | (...) ... : L [dynamic property f2] : String |
| L.cs:39:16:39:17 | (...) ... : L [dynamic property f2] : String | semmle.label | (...) ... : L [dynamic property f2] : String |
| L.cs:40:14:40:15 | access to local variable l5 : L [dynamic property f2] : String | semmle.label | access to local variable l5 : L [dynamic property f2] : String |
| L.cs:40:14:40:15 | access to local variable l5 : L [dynamic property f2] : String | semmle.label | access to local variable l5 : L [dynamic property f2] : String |
| L.cs:40:14:40:18 | access to field f2 | semmle.label | access to field f2 |
| L.cs:40:14:40:18 | access to field f2 | semmle.label | access to field f2 |
| L.cs:43:9:43:12 | [post] this access : L [field f3] : String | semmle.label | [post] this access : L [field f3] : String |
| L.cs:43:9:43:12 | [post] this access : L [field f3] : String | semmle.label | [post] this access : L [field f3] : String |
| L.cs:43:19:43:35 | call to method Source<String> : String | semmle.label | call to method Source<String> : String |
| L.cs:43:19:43:35 | call to method Source<String> : String | semmle.label | call to method Source<String> : String |
| L.cs:44:17:44:18 | access to local variable d6 : L [field f3] : String | semmle.label | access to local variable d6 : L [field f3] : String |
| L.cs:44:17:44:18 | access to local variable d6 : L [field f3] : String | semmle.label | access to local variable d6 : L [field f3] : String |
| L.cs:45:14:45:15 | access to local variable d6 : L [field f3] : String | semmle.label | access to local variable d6 : L [field f3] : String |
| L.cs:45:14:45:15 | access to local variable d6 : L [field f3] : String | semmle.label | access to local variable d6 : L [field f3] : String |
| L.cs:45:14:45:18 | dynamic access to member f3 | semmle.label | dynamic access to member f3 |
| L.cs:45:14:45:18 | dynamic access to member f3 | semmle.label | dynamic access to member f3 |
subpaths
| A.cs:6:24:6:24 | access to local variable c : C | A.cs:147:32:147:32 | c : C | A.cs:149:20:149:27 | object creation of type B : B [field c] : C | A.cs:6:17:6:25 | call to method Make : B [field c] : C |
| A.cs:6:24:6:24 | access to local variable c : C | A.cs:147:32:147:32 | c : C | A.cs:149:20:149:27 | object creation of type B : B [field c] : C | A.cs:6:17:6:25 | call to method Make : B [field c] : C |
@@ -2672,3 +2780,15 @@ testFailures
| J.cs:125:14:125:17 | (...) ... | J.cs:119:20:119:34 | call to method Source<Int32> : Int32 | J.cs:125:14:125:17 | (...) ... | $@ | J.cs:119:20:119:34 | call to method Source<Int32> : Int32 | call to method Source<Int32> : Int32 |
| K.cs:13:14:13:23 | access to array element | K.cs:7:17:7:33 | call to method Source<String> : String | K.cs:13:14:13:23 | access to array element | $@ | K.cs:7:17:7:33 | call to method Source<String> : String | call to method Source<String> : String |
| K.cs:13:14:13:23 | access to array element | K.cs:7:17:7:33 | call to method Source<String> : String | K.cs:13:14:13:23 | access to array element | $@ | K.cs:7:17:7:33 | call to method Source<String> : String | call to method Source<String> : String |
| L.cs:18:14:18:18 | dynamic access to member p1 | L.cs:17:17:17:33 | call to method Source<String> : String | L.cs:18:14:18:18 | dynamic access to member p1 | $@ | L.cs:17:17:17:33 | call to method Source<String> : String | call to method Source<String> : String |
| L.cs:18:14:18:18 | dynamic access to member p1 | L.cs:17:17:17:33 | call to method Source<String> : String | L.cs:18:14:18:18 | dynamic access to member p1 | $@ | L.cs:17:17:17:33 | call to method Source<String> : String | call to method Source<String> : String |
| L.cs:24:14:24:18 | access to property p2 | L.cs:22:17:22:33 | call to method Source<String> : String | L.cs:24:14:24:18 | access to property p2 | $@ | L.cs:22:17:22:33 | call to method Source<String> : String | call to method Source<String> : String |
| L.cs:24:14:24:18 | access to property p2 | L.cs:22:17:22:33 | call to method Source<String> : String | L.cs:24:14:24:18 | access to property p2 | $@ | L.cs:22:17:22:33 | call to method Source<String> : String | call to method Source<String> : String |
| L.cs:29:14:29:18 | dynamic access to member p3 | L.cs:27:19:27:35 | call to method Source<String> : String | L.cs:29:14:29:18 | dynamic access to member p3 | $@ | L.cs:27:19:27:35 | call to method Source<String> : String | call to method Source<String> : String |
| L.cs:29:14:29:18 | dynamic access to member p3 | L.cs:27:19:27:35 | call to method Source<String> : String | L.cs:29:14:29:18 | dynamic access to member p3 | $@ | L.cs:27:19:27:35 | call to method Source<String> : String | call to method Source<String> : String |
| L.cs:34:14:34:18 | dynamic access to member f1 | L.cs:33:17:33:33 | call to method Source<String> : String | L.cs:34:14:34:18 | dynamic access to member f1 | $@ | L.cs:33:17:33:33 | call to method Source<String> : String | call to method Source<String> : String |
| L.cs:34:14:34:18 | dynamic access to member f1 | L.cs:33:17:33:33 | call to method Source<String> : String | L.cs:34:14:34:18 | dynamic access to member f1 | $@ | L.cs:33:17:33:33 | call to method Source<String> : String | call to method Source<String> : String |
| L.cs:40:14:40:18 | access to field f2 | L.cs:38:17:38:33 | call to method Source<String> : String | L.cs:40:14:40:18 | access to field f2 | $@ | L.cs:38:17:38:33 | call to method Source<String> : String | call to method Source<String> : String |
| L.cs:40:14:40:18 | access to field f2 | L.cs:38:17:38:33 | call to method Source<String> : String | L.cs:40:14:40:18 | access to field f2 | $@ | L.cs:38:17:38:33 | call to method Source<String> : String | call to method Source<String> : String |
| L.cs:45:14:45:18 | dynamic access to member f3 | L.cs:43:19:43:35 | call to method Source<String> : String | L.cs:45:14:45:18 | dynamic access to member f3 | $@ | L.cs:43:19:43:35 | call to method Source<String> : String | call to method Source<String> : String |
| L.cs:45:14:45:18 | dynamic access to member f3 | L.cs:43:19:43:35 | call to method Source<String> : String | L.cs:45:14:45:18 | dynamic access to member f3 | $@ | L.cs:43:19:43:35 | call to method Source<String> : String | call to method Source<String> : String |

View File

@@ -0,0 +1,51 @@
using System;
public class L
{
public string p1 { get; set; }
public string p2 { get; set; }
public string p3 { get; set; }
private string f1;
private string f2;
private string f3;
private void M1()
{
// dynamic property write followed by dynamic property read
dynamic d1 = this;
d1.p1 = Source<string>(1);
Sink(d1.p1); // $ hasValueFlow=1
// dynamic property write followed by static property read
dynamic d2 = this;
d2.p2 = Source<string>(2);
L l2 = d2;
Sink(l2.p2); // $ hasValueFlow=2
// static property write followed by dynamic property read
this.p3 = Source<string>(3);
dynamic d3 = this;
Sink(d3.p3); // $ hasValueFlow=3
// dynamic property write followed by dynamic field read
dynamic d4 = this;
d4.f1 = Source<string>(4);
Sink(d4.f1); // $ hasValueFlow=4
// dynamic property write followed by static field read
dynamic d5 = this;
d5.f2 = Source<string>(5);
L l5 = d5;
Sink(l5.f2); // $ hasValueFlow=5
// static field write followed by dynamic property read
this.f3 = Source<string>(6);
dynamic d6 = this;
Sink(d6.f3); // $ hasValueFlow=6
}
public static void Sink(object o) { }
static T Source<T>(object source) => throw null;
}

View File

@@ -376,7 +376,6 @@ lib/codeql/rust/elements/internal/TupleFieldListImpl.qll ec17ddfe1d03210b7737f9c
lib/codeql/rust/elements/internal/TuplePatConstructor.qll 2a5e83ad5b8713a732e610128aeddf14e9b344402d6cf30ff0b43aa39e838418 6d467f7141307523994f03ed7b8e8b1a5bcf860963c9934b90e54582ea38096a
lib/codeql/rust/elements/internal/TuplePatImpl.qll 4adb38f0f8dae4ff285b9f5843efb92af419719a7549e0ff62dc56969bd3c852 3f622130771d7731ed053175a83b289bab1d1f5931526c4854923dbcec7e43f1
lib/codeql/rust/elements/internal/TupleStructPatConstructor.qll 9d68f67a17a5cec0e78907a53eccfa7696be5b0571da4b486c8184274e56344a 3ffa29f546cd6c644be4fecc7415477a3a4dc00d69b8764be9119abe4c6d8b9e
lib/codeql/rust/elements/internal/TupleStructPatImpl.qll 896f001d82938bd018516a2b59ba5ad76350edb6b9747ed2ef5b96760aa16388 0552f9c0361d14be9896cbcfda17d8884d03a82c4f23c511a8de77fe71cfbb9f
lib/codeql/rust/elements/internal/TupleTypeReprConstructor.qll 80c31c25fd27e330690fb500d757a4bbd33f226186d88ea73bfe4cf29a7db508 d572a72fa361990a3d0a3f9b81d1e966e2ba1ac0a60314ec824c1b8b2814c857
lib/codeql/rust/elements/internal/TupleTypeReprImpl.qll 149719039d66f0cfb620e18d7af7e0995c5125a91f3883ad979e9ad480136d6e 310ef7e9e1e42853aa6a2c7bd9b8155773ff2b091d853059c7e04c8d5e30d723
lib/codeql/rust/elements/internal/TypeAliasConstructor.qll 048caa79eb7d400971e3e6d7e580867cbee4bd6b9d291aafac423aa96c321e76 d1d1e33a789ae6fa1a96af4d23d6376b9d82e14e3cbb777963e2d2cb8b22f66d

1
rust/ql/.gitattributes generated vendored
View File

@@ -378,7 +378,6 @@
/lib/codeql/rust/elements/internal/TuplePatConstructor.qll linguist-generated
/lib/codeql/rust/elements/internal/TuplePatImpl.qll linguist-generated
/lib/codeql/rust/elements/internal/TupleStructPatConstructor.qll linguist-generated
/lib/codeql/rust/elements/internal/TupleStructPatImpl.qll linguist-generated
/lib/codeql/rust/elements/internal/TupleTypeReprConstructor.qll linguist-generated
/lib/codeql/rust/elements/internal/TupleTypeReprImpl.qll linguist-generated
/lib/codeql/rust/elements/internal/TypeAliasConstructor.qll linguist-generated

View File

@@ -1014,14 +1014,29 @@ module RustDataFlow implements InputSig<Location> {
.getSummaryNode(), node2.(Node::FlowSummaryNode).getSummaryNode())
}
class LambdaCallKind = Void;
class LambdaCallKind = Unit;
// class LambdaCallKind;
/** Holds if `creation` is an expression that creates a lambda of kind `kind` for `c`. */
predicate lambdaCreation(Node creation, LambdaCallKind kind, DataFlowCallable c) { none() }
predicate lambdaCreation(Node creation, LambdaCallKind kind, DataFlowCallable c) {
exists(ClosureExpr cl |
cl = creation.asExpr().getExpr() and
cl = c.asCfgScope()
) and
exists(kind)
}
/** Holds if `call` is a lambda call of kind `kind` where `receiver` is the lambda expression. */
predicate lambdaCall(DataFlowCall call, LambdaCallKind kind, Node receiver) { none() }
/**
* Holds if `call` is a lambda call of kind `kind` where `receiver` is the
* invoked expression.
*/
predicate lambdaCall(DataFlowCall call, LambdaCallKind kind, Node receiver) {
receiver.asExpr() = call.asCallExprCfgNode().getFunction() and
// All calls to complex expressions and local variable accesses are lambda call.
exists(Expr f | f = receiver.asExpr().getExpr() |
f instanceof PathExpr implies f = any(Variable v).getAnAccess()
) and
exists(kind)
}
/** Extra data flow steps needed for lambda flow analysis. */
predicate additionalLambdaFlowStep(Node nodeFrom, Node nodeTo, boolean preservesValue) { none() }

View File

@@ -1,4 +1,3 @@
// generated by codegen, remove this comment if you wish to edit this file
/**
* This module provides a hand-modifiable wrapper around the generated class `TupleStructPat`.
*
@@ -12,6 +11,7 @@ private import codeql.rust.elements.internal.generated.TupleStructPat
* be referenced directly.
*/
module Impl {
// the following QLdoc is generated: if you need to edit it, do it in the schema file
/**
* A tuple struct pattern. For example:
* ```rust
@@ -22,5 +22,7 @@ module Impl {
* };
* ```
*/
class TupleStructPat extends Generated::TupleStructPat { }
class TupleStructPat extends Generated::TupleStructPat {
override string toString() { result = this.getPath().toAbbreviatedString() + "(...)" }
}
}

View File

@@ -62,5 +62,5 @@ resolvedPaths
| regular.rs:54:9:54:25 | Variant3 {...} | repo::test | crate::regular::MyEnum::Variant3 |
| regular.rs:58:11:58:11 | e | None | None |
| regular.rs:59:9:59:24 | ...::Variant1 | repo::test | crate::regular::MyEnum::Variant1 |
| regular.rs:60:9:60:27 | TupleStructPat | repo::test | crate::regular::MyEnum::Variant2 |
| regular.rs:60:9:60:27 | ...::Variant2(...) | repo::test | crate::regular::MyEnum::Variant2 |
| regular.rs:61:9:61:31 | ...::Variant3 {...} | repo::test | crate::regular::MyEnum::Variant3 |

View File

@@ -1,2 +1,2 @@
| gen_box_pat.rs:6:9:6:27 | box ... | gen_box_pat.rs:6:13:6:27 | TupleStructPat |
| gen_box_pat.rs:6:9:6:27 | box ... | gen_box_pat.rs:6:13:6:27 | ...::Some(...) |
| gen_box_pat.rs:7:9:7:24 | box ...::None | gen_box_pat.rs:7:13:7:24 | ...::None |

View File

@@ -1 +1 @@
| gen_ident_pat.rs:10:9:10:25 | y | gen_ident_pat.rs:10:11:10:25 | TupleStructPat |
| gen_ident_pat.rs:10:9:10:25 | y | gen_ident_pat.rs:10:11:10:25 | ...::Some(...) |

View File

@@ -1 +1 @@
| gen_let_expr.rs:5:8:5:31 | let ... = maybe_some | gen_let_expr.rs:5:12:5:18 | TupleStructPat |
| gen_let_expr.rs:5:8:5:31 | let ... = maybe_some | gen_let_expr.rs:5:12:5:18 | Some(...) |

View File

@@ -3,4 +3,4 @@
| gen_let_stmt.rs:7:5:7:15 | let ... | gen_let_stmt.rs:7:9:7:9 | x |
| gen_let_stmt.rs:8:5:8:10 | let ... | gen_let_stmt.rs:8:9:8:9 | x |
| gen_let_stmt.rs:9:5:9:24 | let ... = ... | gen_let_stmt.rs:9:9:9:14 | TuplePat |
| gen_let_stmt.rs:10:5:12:6 | let ... = ... else {...} | gen_let_stmt.rs:10:9:10:15 | TupleStructPat |
| gen_let_stmt.rs:10:5:12:6 | let ... = ... else {...} | gen_let_stmt.rs:10:9:10:15 | Some(...) |

View File

@@ -1,4 +1,4 @@
| gen_match_arm.rs:6:9:6:29 | ... => y | gen_match_arm.rs:6:9:6:23 | TupleStructPat |
| gen_match_arm.rs:6:9:6:29 | ... => y | gen_match_arm.rs:6:9:6:23 | ...::Some(...) |
| gen_match_arm.rs:7:9:7:26 | ...::None => 0 | gen_match_arm.rs:7:9:7:20 | ...::None |
| gen_match_arm.rs:10:9:10:35 | ... if ... => ... | gen_match_arm.rs:10:9:10:15 | TupleStructPat |
| gen_match_arm.rs:10:9:10:35 | ... if ... => ... | gen_match_arm.rs:10:9:10:15 | Some(...) |
| gen_match_arm.rs:11:9:11:15 | _ => 0 | gen_match_arm.rs:11:9:11:9 | _ |

View File

@@ -1,2 +1,2 @@
| gen_or_pat.rs:6:9:6:38 | ... \| ...::None | 0 | gen_or_pat.rs:6:9:6:23 | TupleStructPat |
| gen_or_pat.rs:6:9:6:38 | ... \| ...::None | 0 | gen_or_pat.rs:6:9:6:23 | ...::Some(...) |
| gen_or_pat.rs:6:9:6:38 | ... \| ...::None | 1 | gen_or_pat.rs:6:27:6:38 | ...::None |

View File

@@ -1,2 +1,2 @@
| gen_ref_pat.rs:6:9:6:28 | &mut ... | gen_ref_pat.rs:6:14:6:28 | TupleStructPat |
| gen_ref_pat.rs:6:9:6:28 | &mut ... | gen_ref_pat.rs:6:14:6:28 | ...::Some(...) |
| gen_ref_pat.rs:7:9:7:21 | &...::None | gen_ref_pat.rs:7:10:7:21 | ...::None |

View File

@@ -1,3 +1,3 @@
| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | getNumberOfFields: | 4 |
| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | getNumberOfFields: | 2 |
| gen_tuple_struct_pat.rs:8:9:8:17 | TupleStructPat | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | getNumberOfFields: | 1 |
| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | getNumberOfFields: | 4 |
| gen_tuple_struct_pat.rs:7:9:7:20 | Tuple(...) | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | getNumberOfFields: | 2 |
| gen_tuple_struct_pat.rs:8:9:8:17 | Tuple(...) | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | getNumberOfFields: | 1 |

View File

@@ -1,7 +1,7 @@
| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 0 | gen_tuple_struct_pat.rs:6:15:6:17 | "a" |
| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 1 | gen_tuple_struct_pat.rs:6:20:6:20 | 1 |
| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 2 | gen_tuple_struct_pat.rs:6:23:6:23 | 2 |
| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 3 | gen_tuple_struct_pat.rs:6:26:6:26 | 3 |
| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | 0 | gen_tuple_struct_pat.rs:7:15:7:16 | .. |
| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | 1 | gen_tuple_struct_pat.rs:7:19:7:19 | 3 |
| gen_tuple_struct_pat.rs:8:9:8:17 | TupleStructPat | 0 | gen_tuple_struct_pat.rs:8:15:8:16 | .. |
| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | 0 | gen_tuple_struct_pat.rs:6:15:6:17 | "a" |
| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | 1 | gen_tuple_struct_pat.rs:6:20:6:20 | 1 |
| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | 2 | gen_tuple_struct_pat.rs:6:23:6:23 | 2 |
| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | 3 | gen_tuple_struct_pat.rs:6:26:6:26 | 3 |
| gen_tuple_struct_pat.rs:7:9:7:20 | Tuple(...) | 0 | gen_tuple_struct_pat.rs:7:15:7:16 | .. |
| gen_tuple_struct_pat.rs:7:9:7:20 | Tuple(...) | 1 | gen_tuple_struct_pat.rs:7:19:7:19 | 3 |
| gen_tuple_struct_pat.rs:8:9:8:17 | Tuple(...) | 0 | gen_tuple_struct_pat.rs:8:15:8:16 | .. |

View File

@@ -1,3 +1,3 @@
| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | gen_tuple_struct_pat.rs:6:9:6:13 | Tuple |
| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | gen_tuple_struct_pat.rs:7:9:7:13 | Tuple |
| gen_tuple_struct_pat.rs:8:9:8:17 | TupleStructPat | gen_tuple_struct_pat.rs:8:9:8:13 | Tuple |
| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | gen_tuple_struct_pat.rs:6:9:6:13 | Tuple |
| gen_tuple_struct_pat.rs:7:9:7:20 | Tuple(...) | gen_tuple_struct_pat.rs:7:9:7:13 | Tuple |
| gen_tuple_struct_pat.rs:8:9:8:17 | Tuple(...) | gen_tuple_struct_pat.rs:8:9:8:13 | Tuple |

View File

@@ -14,10 +14,10 @@ edges
| test.rs:6:12:6:31 | [boolean(false)] ... && ... | test.rs:9:13:9:17 | false | false |
| test.rs:6:12:6:31 | [boolean(true)] ... && ... | test.rs:7:13:7:13 | d | true |
| test.rs:6:17:6:31 | let ... = b | test.rs:6:31:6:31 | b | |
| test.rs:6:21:6:27 | TupleStructPat | test.rs:6:12:6:31 | [boolean(false)] ... && ... | no-match |
| test.rs:6:21:6:27 | TupleStructPat | test.rs:6:26:6:26 | d | match |
| test.rs:6:21:6:27 | Some(...) | test.rs:6:12:6:31 | [boolean(false)] ... && ... | no-match |
| test.rs:6:21:6:27 | Some(...) | test.rs:6:26:6:26 | d | match |
| test.rs:6:26:6:26 | d | test.rs:6:12:6:31 | [boolean(true)] ... && ... | match |
| test.rs:6:31:6:31 | b | test.rs:6:21:6:27 | TupleStructPat | |
| test.rs:6:31:6:31 | b | test.rs:6:21:6:27 | Some(...) | |
| test.rs:6:33:8:9 | { ... } | test.rs:6:9:10:9 | if ... {...} else {...} | |
| test.rs:7:13:7:13 | d | test.rs:6:33:8:9 | { ... } | |
| test.rs:8:16:10:9 | { ... } | test.rs:6:9:10:9 | if ... {...} else {...} | |

View File

@@ -191,11 +191,11 @@ edges
| test.rs:98:27:98:28 | 10 | test.rs:98:24:98:28 | 1..10 | |
| test.rs:99:9:103:9 | while ... { ... } | test.rs:97:25:104:5 | { ... } | |
| test.rs:99:15:99:39 | let ... = ... | test.rs:99:29:99:32 | iter | |
| test.rs:99:19:99:25 | TupleStructPat | test.rs:99:9:103:9 | while ... { ... } | no-match |
| test.rs:99:19:99:25 | TupleStructPat | test.rs:99:24:99:24 | x | match |
| test.rs:99:19:99:25 | Some(...) | test.rs:99:9:103:9 | while ... { ... } | no-match |
| test.rs:99:19:99:25 | Some(...) | test.rs:99:24:99:24 | x | match |
| test.rs:99:24:99:24 | x | test.rs:100:17:100:17 | x | match |
| test.rs:99:29:99:32 | iter | test.rs:99:29:99:39 | ... .next(...) | |
| test.rs:99:29:99:39 | ... .next(...) | test.rs:99:19:99:25 | TupleStructPat | |
| test.rs:99:29:99:39 | ... .next(...) | test.rs:99:19:99:25 | Some(...) | |
| test.rs:99:41:103:9 | { ... } | test.rs:99:15:99:39 | let ... = ... | |
| test.rs:100:13:102:13 | if ... {...} | test.rs:99:41:103:9 | { ... } | |
| test.rs:100:17:100:17 | x | test.rs:100:22:100:22 | 5 | |
@@ -274,10 +274,10 @@ edges
| test.rs:137:48:143:5 | { ... } | test.rs:137:5:143:5 | exit fn test_if_let_else (normal) | |
| test.rs:138:9:142:9 | if ... {...} else {...} | test.rs:137:48:143:5 | { ... } | |
| test.rs:138:12:138:26 | let ... = a | test.rs:138:26:138:26 | a | |
| test.rs:138:16:138:22 | TupleStructPat | test.rs:138:21:138:21 | n | match |
| test.rs:138:16:138:22 | TupleStructPat | test.rs:141:13:141:13 | 0 | no-match |
| test.rs:138:16:138:22 | Some(...) | test.rs:138:21:138:21 | n | match |
| test.rs:138:16:138:22 | Some(...) | test.rs:141:13:141:13 | 0 | no-match |
| test.rs:138:21:138:21 | n | test.rs:139:13:139:13 | n | match |
| test.rs:138:26:138:26 | a | test.rs:138:16:138:22 | TupleStructPat | |
| test.rs:138:26:138:26 | a | test.rs:138:16:138:22 | Some(...) | |
| test.rs:138:28:140:9 | { ... } | test.rs:138:9:142:9 | if ... {...} else {...} | |
| test.rs:139:13:139:13 | n | test.rs:138:28:140:9 | { ... } | |
| test.rs:140:16:142:9 | { ... } | test.rs:138:9:142:9 | if ... {...} else {...} | |
@@ -290,10 +290,10 @@ edges
| test.rs:146:9:148:9 | ExprStmt | test.rs:146:12:146:26 | let ... = a | |
| test.rs:146:9:148:9 | if ... {...} | test.rs:149:9:149:9 | 0 | |
| test.rs:146:12:146:26 | let ... = a | test.rs:146:26:146:26 | a | |
| test.rs:146:16:146:22 | TupleStructPat | test.rs:146:9:148:9 | if ... {...} | no-match |
| test.rs:146:16:146:22 | TupleStructPat | test.rs:146:21:146:21 | n | match |
| test.rs:146:16:146:22 | Some(...) | test.rs:146:9:148:9 | if ... {...} | no-match |
| test.rs:146:16:146:22 | Some(...) | test.rs:146:21:146:21 | n | match |
| test.rs:146:21:146:21 | n | test.rs:147:13:147:21 | ExprStmt | match |
| test.rs:146:26:146:26 | a | test.rs:146:16:146:22 | TupleStructPat | |
| test.rs:146:26:146:26 | a | test.rs:146:16:146:22 | Some(...) | |
| test.rs:147:13:147:20 | return n | test.rs:145:5:150:5 | exit fn test_if_let (normal) | return |
| test.rs:147:13:147:21 | ExprStmt | test.rs:147:20:147:20 | n | |
| test.rs:147:20:147:20 | n | test.rs:147:13:147:20 | return n | |
@@ -663,19 +663,19 @@ edges
| test.rs:307:19:307:42 | ...: Option::<...> | test.rs:308:15:308:25 | maybe_digit | |
| test.rs:307:52:313:5 | { ... } | test.rs:307:5:313:5 | exit fn test_match (normal) | |
| test.rs:308:9:312:9 | match maybe_digit { ... } | test.rs:307:52:313:5 | { ... } | |
| test.rs:308:15:308:25 | maybe_digit | test.rs:309:13:309:27 | TupleStructPat | |
| test.rs:309:13:309:27 | TupleStructPat | test.rs:309:26:309:26 | x | match |
| test.rs:309:13:309:27 | TupleStructPat | test.rs:310:13:310:27 | TupleStructPat | no-match |
| test.rs:308:15:308:25 | maybe_digit | test.rs:309:13:309:27 | ...::Some(...) | |
| test.rs:309:13:309:27 | ...::Some(...) | test.rs:309:26:309:26 | x | match |
| test.rs:309:13:309:27 | ...::Some(...) | test.rs:310:13:310:27 | ...::Some(...) | no-match |
| test.rs:309:26:309:26 | x | test.rs:309:32:309:32 | x | match |
| test.rs:309:32:309:32 | x | test.rs:309:36:309:37 | 10 | |
| test.rs:309:32:309:37 | ... < ... | test.rs:309:42:309:42 | x | true |
| test.rs:309:32:309:37 | ... < ... | test.rs:310:13:310:27 | TupleStructPat | false |
| test.rs:309:32:309:37 | ... < ... | test.rs:310:13:310:27 | ...::Some(...) | false |
| test.rs:309:36:309:37 | 10 | test.rs:309:32:309:37 | ... < ... | |
| test.rs:309:42:309:42 | x | test.rs:309:46:309:46 | 5 | |
| test.rs:309:42:309:46 | ... + ... | test.rs:308:9:312:9 | match maybe_digit { ... } | |
| test.rs:309:46:309:46 | 5 | test.rs:309:42:309:46 | ... + ... | |
| test.rs:310:13:310:27 | TupleStructPat | test.rs:310:26:310:26 | x | match |
| test.rs:310:13:310:27 | TupleStructPat | test.rs:311:13:311:24 | ...::None | no-match |
| test.rs:310:13:310:27 | ...::Some(...) | test.rs:310:26:310:26 | x | match |
| test.rs:310:13:310:27 | ...::Some(...) | test.rs:311:13:311:24 | ...::None | no-match |
| test.rs:310:26:310:26 | x | test.rs:310:32:310:32 | x | match |
| test.rs:310:32:310:32 | x | test.rs:308:9:312:9 | match maybe_digit { ... } | |
| test.rs:311:13:311:24 | ...::None | test.rs:311:29:311:29 | 5 | match |
@@ -686,7 +686,7 @@ edges
| test.rs:315:44:315:67 | ...: Option::<...> | test.rs:316:19:316:29 | maybe_digit | |
| test.rs:315:77:324:5 | { ... } | test.rs:315:5:324:5 | exit fn test_match_with_return_in_scrutinee (normal) | |
| test.rs:316:9:323:9 | match ... { ... } | test.rs:315:77:324:5 | { ... } | |
| test.rs:316:16:320:9 | if ... {...} else {...} | test.rs:321:13:321:27 | TupleStructPat | |
| test.rs:316:16:320:9 | if ... {...} else {...} | test.rs:321:13:321:27 | ...::Some(...) | |
| test.rs:316:19:316:29 | maybe_digit | test.rs:316:34:316:37 | Some | |
| test.rs:316:19:316:40 | ... == ... | test.rs:317:13:317:21 | ExprStmt | true |
| test.rs:316:19:316:40 | ... == ... | test.rs:319:13:319:23 | maybe_digit | false |
@@ -698,8 +698,8 @@ edges
| test.rs:317:20:317:20 | 3 | test.rs:317:13:317:20 | return 3 | |
| test.rs:318:16:320:9 | { ... } | test.rs:316:16:320:9 | if ... {...} else {...} | |
| test.rs:319:13:319:23 | maybe_digit | test.rs:318:16:320:9 | { ... } | |
| test.rs:321:13:321:27 | TupleStructPat | test.rs:321:26:321:26 | x | match |
| test.rs:321:13:321:27 | TupleStructPat | test.rs:322:13:322:24 | ...::None | no-match |
| test.rs:321:13:321:27 | ...::Some(...) | test.rs:321:26:321:26 | x | match |
| test.rs:321:13:321:27 | ...::Some(...) | test.rs:322:13:322:24 | ...::None | no-match |
| test.rs:321:26:321:26 | x | test.rs:321:32:321:32 | x | match |
| test.rs:321:32:321:32 | x | test.rs:321:36:321:36 | 5 | |
| test.rs:321:32:321:36 | ... + ... | test.rs:316:9:323:9 | match ... { ... } | |
@@ -716,9 +716,9 @@ edges
| test.rs:327:9:330:18 | ... && ... | test.rs:326:60:331:5 | { ... } | |
| test.rs:327:10:330:9 | [boolean(false)] match r { ... } | test.rs:327:9:330:18 | ... && ... | false |
| test.rs:327:10:330:9 | [boolean(true)] match r { ... } | test.rs:330:15:330:18 | cond | true |
| test.rs:327:16:327:16 | r | test.rs:328:13:328:19 | TupleStructPat | |
| test.rs:328:13:328:19 | TupleStructPat | test.rs:328:18:328:18 | a | match |
| test.rs:328:13:328:19 | TupleStructPat | test.rs:329:13:329:13 | _ | no-match |
| test.rs:327:16:327:16 | r | test.rs:328:13:328:19 | Some(...) | |
| test.rs:328:13:328:19 | Some(...) | test.rs:328:18:328:18 | a | match |
| test.rs:328:13:328:19 | Some(...) | test.rs:329:13:329:13 | _ | no-match |
| test.rs:328:18:328:18 | a | test.rs:328:24:328:24 | a | match |
| test.rs:328:24:328:24 | a | test.rs:327:10:330:9 | [boolean(false)] match r { ... } | false |
| test.rs:328:24:328:24 | a | test.rs:327:10:330:9 | [boolean(true)] match r { ... } | true |
@@ -731,12 +731,12 @@ edges
| test.rs:333:35:333:58 | ...: Result::<...> | test.rs:334:15:334:15 | r | |
| test.rs:333:66:338:5 | { ... } | test.rs:333:5:338:5 | exit fn test_match_with_no_arms (normal) | |
| test.rs:334:9:337:9 | match r { ... } | test.rs:333:66:338:5 | { ... } | |
| test.rs:334:15:334:15 | r | test.rs:335:13:335:21 | TupleStructPat | |
| test.rs:335:13:335:21 | TupleStructPat | test.rs:335:16:335:20 | value | match |
| test.rs:335:13:335:21 | TupleStructPat | test.rs:336:13:336:22 | TupleStructPat | no-match |
| test.rs:334:15:334:15 | r | test.rs:335:13:335:21 | Ok(...) | |
| test.rs:335:13:335:21 | Ok(...) | test.rs:335:16:335:20 | value | match |
| test.rs:335:13:335:21 | Ok(...) | test.rs:336:13:336:22 | Err(...) | no-match |
| test.rs:335:16:335:20 | value | test.rs:335:26:335:30 | value | match |
| test.rs:335:26:335:30 | value | test.rs:334:9:337:9 | match r { ... } | |
| test.rs:336:13:336:22 | TupleStructPat | test.rs:336:17:336:21 | never | match |
| test.rs:336:13:336:22 | Err(...) | test.rs:336:17:336:21 | never | match |
| test.rs:336:17:336:21 | never | test.rs:336:33:336:37 | never | match |
| test.rs:336:27:336:40 | match never { ... } | test.rs:334:9:337:9 | match r { ... } | |
| test.rs:336:33:336:37 | never | test.rs:336:27:336:40 | match never { ... } | |
@@ -746,10 +746,10 @@ edges
| test.rs:343:23:343:36 | ...: Option::<...> | test.rs:344:9:344:57 | let ... = a else {...} | |
| test.rs:343:46:346:5 | { ... } | test.rs:343:5:346:5 | exit fn test_let_match (normal) | |
| test.rs:344:9:344:57 | let ... = a else {...} | test.rs:344:23:344:23 | a | |
| test.rs:344:13:344:19 | TupleStructPat | test.rs:344:18:344:18 | n | match |
| test.rs:344:13:344:19 | TupleStructPat | test.rs:344:39:344:53 | MacroStmts | no-match |
| test.rs:344:13:344:19 | Some(...) | test.rs:344:18:344:18 | n | match |
| test.rs:344:13:344:19 | Some(...) | test.rs:344:39:344:53 | MacroStmts | no-match |
| test.rs:344:18:344:18 | n | test.rs:345:9:345:9 | n | match |
| test.rs:344:23:344:23 | a | test.rs:344:13:344:19 | TupleStructPat | |
| test.rs:344:23:344:23 | a | test.rs:344:13:344:19 | Some(...) | |
| test.rs:344:32:344:54 | ...::panic_fmt | test.rs:344:39:344:53 | "Expected some" | |
| test.rs:344:32:344:54 | MacroExpr | test.rs:344:30:344:56 | { ... } | |
| test.rs:344:39:344:53 | "Expected some" | test.rs:344:39:344:53 | FormatArgsExpr | |
@@ -770,9 +770,9 @@ edges
| test.rs:349:9:352:10 | let ... = ... | test.rs:349:25:349:25 | m | |
| test.rs:349:13:349:15 | ret | test.rs:353:9:353:12 | true | match |
| test.rs:349:19:352:9 | match m { ... } | test.rs:349:13:349:15 | ret | |
| test.rs:349:25:349:25 | m | test.rs:350:13:350:21 | TupleStructPat | |
| test.rs:350:13:350:21 | TupleStructPat | test.rs:350:18:350:20 | ret | match |
| test.rs:350:13:350:21 | TupleStructPat | test.rs:351:13:351:16 | None | no-match |
| test.rs:349:25:349:25 | m | test.rs:350:13:350:21 | Some(...) | |
| test.rs:350:13:350:21 | Some(...) | test.rs:350:18:350:20 | ret | match |
| test.rs:350:13:350:21 | Some(...) | test.rs:351:13:351:16 | None | no-match |
| test.rs:350:18:350:20 | ret | test.rs:350:26:350:28 | ret | match |
| test.rs:350:26:350:28 | ret | test.rs:349:19:352:9 | match m { ... } | |
| test.rs:351:13:351:16 | None | test.rs:351:28:351:32 | false | match |
@@ -1030,10 +1030,10 @@ edges
| test.rs:484:13:484:13 | x | test.rs:485:9:487:10 | let ... = x else {...} | match |
| test.rs:484:30:484:33 | None | test.rs:484:13:484:13 | x | |
| test.rs:485:9:487:10 | let ... = x else {...} | test.rs:485:23:485:23 | x | |
| test.rs:485:13:485:19 | TupleStructPat | test.rs:485:18:485:18 | y | match |
| test.rs:485:13:485:19 | TupleStructPat | test.rs:486:13:486:27 | ExprStmt | no-match |
| test.rs:485:13:485:19 | Some(...) | test.rs:485:18:485:18 | y | match |
| test.rs:485:13:485:19 | Some(...) | test.rs:486:13:486:27 | ExprStmt | no-match |
| test.rs:485:18:485:18 | y | test.rs:488:9:488:9 | 0 | match |
| test.rs:485:23:485:23 | x | test.rs:485:13:485:19 | TupleStructPat | |
| test.rs:485:23:485:23 | x | test.rs:485:13:485:19 | Some(...) | |
| test.rs:486:13:486:26 | break ''block 1 | test.rs:483:18:489:5 | 'block: { ... } | break |
| test.rs:486:13:486:27 | ExprStmt | test.rs:486:26:486:26 | 1 | |
| test.rs:486:26:486:26 | 1 | test.rs:486:13:486:26 | break ''block 1 | |

View File

@@ -34,7 +34,7 @@ localStep
| main.rs:32:9:32:9 | [SSA] b | main.rs:36:10:36:10 | b |
| main.rs:32:9:32:9 | b | main.rs:32:9:32:9 | [SSA] b |
| main.rs:32:13:35:5 | match m { ... } | main.rs:32:9:32:9 | b |
| main.rs:32:19:32:19 | m | main.rs:33:9:33:15 | TupleStructPat |
| main.rs:32:19:32:19 | m | main.rs:33:9:33:15 | Some(...) |
| main.rs:32:19:32:19 | m | main.rs:34:9:34:12 | None |
| main.rs:33:20:33:20 | a | main.rs:32:13:35:5 | match m { ... } |
| main.rs:34:17:34:17 | 0 | main.rs:32:13:35:5 | match m { ... } |
@@ -169,14 +169,14 @@ localStep
| main.rs:199:9:199:10 | [SSA] s2 | main.rs:204:11:204:12 | s2 |
| main.rs:199:9:199:10 | s2 | main.rs:199:9:199:10 | [SSA] s2 |
| main.rs:199:14:199:28 | ...::Some(...) | main.rs:199:9:199:10 | s2 |
| main.rs:200:11:200:12 | s1 | main.rs:201:9:201:23 | TupleStructPat |
| main.rs:200:11:200:12 | s1 | main.rs:201:9:201:23 | ...::Some(...) |
| main.rs:200:11:200:12 | s1 | main.rs:202:9:202:20 | ...::None |
| main.rs:201:22:201:22 | [SSA] n | main.rs:201:33:201:33 | n |
| main.rs:201:22:201:22 | n | main.rs:201:22:201:22 | [SSA] n |
| main.rs:201:28:201:34 | sink(...) | main.rs:200:5:203:5 | match s1 { ... } |
| main.rs:202:25:202:31 | sink(...) | main.rs:200:5:203:5 | match s1 { ... } |
| main.rs:204:5:207:5 | match s2 { ... } | main.rs:197:37:208:1 | { ... } |
| main.rs:204:11:204:12 | s2 | main.rs:205:9:205:23 | TupleStructPat |
| main.rs:204:11:204:12 | s2 | main.rs:205:9:205:23 | ...::Some(...) |
| main.rs:204:11:204:12 | s2 | main.rs:206:9:206:20 | ...::None |
| main.rs:205:22:205:22 | [SSA] n | main.rs:205:33:205:33 | n |
| main.rs:205:22:205:22 | n | main.rs:205:22:205:22 | [SSA] n |
@@ -188,14 +188,14 @@ localStep
| main.rs:212:9:212:10 | [SSA] s2 | main.rs:217:11:217:12 | s2 |
| main.rs:212:9:212:10 | s2 | main.rs:212:9:212:10 | [SSA] s2 |
| main.rs:212:14:212:20 | Some(...) | main.rs:212:9:212:10 | s2 |
| main.rs:213:11:213:12 | s1 | main.rs:214:9:214:15 | TupleStructPat |
| main.rs:213:11:213:12 | s1 | main.rs:214:9:214:15 | Some(...) |
| main.rs:213:11:213:12 | s1 | main.rs:215:9:215:12 | None |
| main.rs:214:14:214:14 | [SSA] n | main.rs:214:25:214:25 | n |
| main.rs:214:14:214:14 | n | main.rs:214:14:214:14 | [SSA] n |
| main.rs:214:20:214:26 | sink(...) | main.rs:213:5:216:5 | match s1 { ... } |
| main.rs:215:17:215:23 | sink(...) | main.rs:213:5:216:5 | match s1 { ... } |
| main.rs:217:5:220:5 | match s2 { ... } | main.rs:210:39:221:1 | { ... } |
| main.rs:217:11:217:12 | s2 | main.rs:218:9:218:15 | TupleStructPat |
| main.rs:217:11:217:12 | s2 | main.rs:218:9:218:15 | Some(...) |
| main.rs:217:11:217:12 | s2 | main.rs:219:9:219:12 | None |
| main.rs:218:14:218:14 | [SSA] n | main.rs:218:25:218:25 | n |
| main.rs:218:14:218:14 | n | main.rs:218:14:218:14 | [SSA] n |
@@ -210,8 +210,8 @@ localStep
| main.rs:235:9:235:10 | [SSA] s2 | main.rs:243:11:243:12 | s2 |
| main.rs:235:9:235:10 | s2 | main.rs:235:9:235:10 | [SSA] s2 |
| main.rs:235:14:235:30 | ...::B(...) | main.rs:235:9:235:10 | s2 |
| main.rs:236:11:236:12 | s1 | main.rs:237:9:237:25 | TupleStructPat |
| main.rs:236:11:236:12 | s1 | main.rs:238:9:238:25 | TupleStructPat |
| main.rs:236:11:236:12 | s1 | main.rs:237:9:237:25 | ...::A(...) |
| main.rs:236:11:236:12 | s1 | main.rs:238:9:238:25 | ...::B(...) |
| main.rs:236:11:236:12 | s1 | main.rs:240:11:240:12 | s1 |
| main.rs:237:24:237:24 | [SSA] n | main.rs:237:35:237:35 | n |
| main.rs:237:24:237:24 | n | main.rs:237:24:237:24 | [SSA] n |
@@ -220,8 +220,8 @@ localStep
| main.rs:238:24:238:24 | n | main.rs:238:24:238:24 | [SSA] n |
| main.rs:238:30:238:36 | sink(...) | main.rs:236:5:239:5 | match s1 { ... } |
| main.rs:240:11:240:12 | s1 | main.rs:241:9:241:45 | ... \| ... |
| main.rs:241:9:241:45 | ... \| ... | main.rs:241:9:241:25 | TupleStructPat |
| main.rs:241:9:241:45 | ... \| ... | main.rs:241:29:241:45 | TupleStructPat |
| main.rs:241:9:241:45 | ... \| ... | main.rs:241:9:241:25 | ...::A(...) |
| main.rs:241:9:241:45 | ... \| ... | main.rs:241:29:241:45 | ...::B(...) |
| main.rs:241:9:241:45 | [SSA] [match(true)] phi | main.rs:241:55:241:55 | n |
| main.rs:241:24:241:24 | [SSA] [input] [match(true)] phi | main.rs:241:9:241:45 | [SSA] [match(true)] phi |
| main.rs:241:24:241:24 | [SSA] n | main.rs:241:24:241:24 | [SSA] [input] [match(true)] phi |
@@ -231,8 +231,8 @@ localStep
| main.rs:241:44:241:44 | n | main.rs:241:44:241:44 | [SSA] n |
| main.rs:241:50:241:56 | sink(...) | main.rs:240:5:242:5 | match s1 { ... } |
| main.rs:243:5:246:5 | match s2 { ... } | main.rs:233:48:247:1 | { ... } |
| main.rs:243:11:243:12 | s2 | main.rs:244:9:244:25 | TupleStructPat |
| main.rs:243:11:243:12 | s2 | main.rs:245:9:245:25 | TupleStructPat |
| main.rs:243:11:243:12 | s2 | main.rs:244:9:244:25 | ...::A(...) |
| main.rs:243:11:243:12 | s2 | main.rs:245:9:245:25 | ...::B(...) |
| main.rs:244:24:244:24 | [SSA] n | main.rs:244:35:244:35 | n |
| main.rs:244:24:244:24 | n | main.rs:244:24:244:24 | [SSA] n |
| main.rs:244:30:244:36 | sink(...) | main.rs:243:5:246:5 | match s2 { ... } |
@@ -245,8 +245,8 @@ localStep
| main.rs:253:9:253:10 | [SSA] s2 | main.rs:261:11:261:12 | s2 |
| main.rs:253:9:253:10 | s2 | main.rs:253:9:253:10 | [SSA] s2 |
| main.rs:253:14:253:17 | B(...) | main.rs:253:9:253:10 | s2 |
| main.rs:254:11:254:12 | s1 | main.rs:255:9:255:12 | TupleStructPat |
| main.rs:254:11:254:12 | s1 | main.rs:256:9:256:12 | TupleStructPat |
| main.rs:254:11:254:12 | s1 | main.rs:255:9:255:12 | A(...) |
| main.rs:254:11:254:12 | s1 | main.rs:256:9:256:12 | B(...) |
| main.rs:254:11:254:12 | s1 | main.rs:258:11:258:12 | s1 |
| main.rs:255:11:255:11 | [SSA] n | main.rs:255:22:255:22 | n |
| main.rs:255:11:255:11 | n | main.rs:255:11:255:11 | [SSA] n |
@@ -255,8 +255,8 @@ localStep
| main.rs:256:11:256:11 | n | main.rs:256:11:256:11 | [SSA] n |
| main.rs:256:17:256:23 | sink(...) | main.rs:254:5:257:5 | match s1 { ... } |
| main.rs:258:11:258:12 | s1 | main.rs:259:9:259:19 | ... \| ... |
| main.rs:259:9:259:19 | ... \| ... | main.rs:259:9:259:12 | TupleStructPat |
| main.rs:259:9:259:19 | ... \| ... | main.rs:259:16:259:19 | TupleStructPat |
| main.rs:259:9:259:19 | ... \| ... | main.rs:259:9:259:12 | A(...) |
| main.rs:259:9:259:19 | ... \| ... | main.rs:259:16:259:19 | B(...) |
| main.rs:259:9:259:19 | [SSA] [match(true)] phi | main.rs:259:29:259:29 | n |
| main.rs:259:11:259:11 | [SSA] [input] [match(true)] phi | main.rs:259:9:259:19 | [SSA] [match(true)] phi |
| main.rs:259:11:259:11 | [SSA] n | main.rs:259:11:259:11 | [SSA] [input] [match(true)] phi |
@@ -266,8 +266,8 @@ localStep
| main.rs:259:18:259:18 | n | main.rs:259:18:259:18 | [SSA] n |
| main.rs:259:24:259:30 | sink(...) | main.rs:258:5:260:5 | match s1 { ... } |
| main.rs:261:5:264:5 | match s2 { ... } | main.rs:251:50:265:1 | { ... } |
| main.rs:261:11:261:12 | s2 | main.rs:262:9:262:12 | TupleStructPat |
| main.rs:261:11:261:12 | s2 | main.rs:263:9:263:12 | TupleStructPat |
| main.rs:261:11:261:12 | s2 | main.rs:262:9:262:12 | A(...) |
| main.rs:261:11:261:12 | s2 | main.rs:263:9:263:12 | B(...) |
| main.rs:262:11:262:11 | [SSA] n | main.rs:262:22:262:22 | n |
| main.rs:262:11:262:11 | n | main.rs:262:11:262:11 | [SSA] n |
| main.rs:262:17:262:23 | sink(...) | main.rs:261:5:264:5 | match s2 { ... } |
@@ -344,6 +344,50 @@ localStep
| main.rs:306:22:306:22 | [SSA] n | main.rs:306:34:306:34 | n |
| main.rs:306:22:306:22 | n | main.rs:306:22:306:22 | [SSA] n |
| main.rs:306:29:306:35 | sink(...) | main.rs:304:5:307:5 | match s2 { ... } |
| main.rs:314:9:314:9 | [SSA] f | main.rs:315:10:315:10 | f |
| main.rs:314:9:314:9 | f | main.rs:314:9:314:9 | [SSA] f |
| main.rs:314:13:314:52 | \|...\| ... | main.rs:314:9:314:9 | f |
| main.rs:314:14:314:17 | ... | main.rs:314:14:314:17 | cond |
| main.rs:314:14:314:17 | [SSA] cond | main.rs:314:23:314:26 | cond |
| main.rs:314:14:314:17 | cond | main.rs:314:14:314:17 | [SSA] cond |
| main.rs:314:28:314:41 | { ... } | main.rs:314:20:314:52 | if cond {...} else {...} |
| main.rs:314:30:314:39 | source(...) | main.rs:314:28:314:41 | { ... } |
| main.rs:314:48:314:52 | { ... } | main.rs:314:20:314:52 | if cond {...} else {...} |
| main.rs:314:50:314:50 | 0 | main.rs:314:48:314:52 | { ... } |
| main.rs:319:9:319:9 | [SSA] f | main.rs:326:5:326:5 | f |
| main.rs:319:9:319:9 | f | main.rs:319:9:319:9 | [SSA] f |
| main.rs:319:13:324:9 | \|...\| ... | main.rs:319:9:319:9 | f |
| main.rs:319:14:319:17 | ... | main.rs:319:14:319:17 | cond |
| main.rs:319:14:319:17 | [SSA] cond | main.rs:320:12:320:15 | cond |
| main.rs:319:14:319:17 | cond | main.rs:319:14:319:17 | [SSA] cond |
| main.rs:319:20:319:23 | ... | main.rs:319:20:319:23 | data |
| main.rs:319:20:319:23 | [SSA] data | main.rs:321:18:321:21 | data |
| main.rs:319:20:319:23 | data | main.rs:319:20:319:23 | [SSA] data |
| main.rs:320:17:322:9 | { ... } | main.rs:320:9:324:9 | if cond {...} else {...} |
| main.rs:322:16:324:9 | { ... } | main.rs:320:9:324:9 | if cond {...} else {...} |
| main.rs:323:13:323:19 | sink(...) | main.rs:322:16:324:9 | { ... } |
| main.rs:325:9:325:9 | [SSA] a | main.rs:326:13:326:13 | a |
| main.rs:325:9:325:9 | a | main.rs:325:9:325:9 | [SSA] a |
| main.rs:325:13:325:22 | source(...) | main.rs:325:9:325:9 | a |
| main.rs:330:9:330:9 | [SSA] f | main.rs:337:13:337:13 | f |
| main.rs:330:9:330:9 | f | main.rs:330:9:330:9 | [SSA] f |
| main.rs:330:13:335:9 | \|...\| ... | main.rs:330:9:330:9 | f |
| main.rs:330:14:330:17 | ... | main.rs:330:14:330:17 | cond |
| main.rs:330:14:330:17 | [SSA] cond | main.rs:331:12:331:15 | cond |
| main.rs:330:14:330:17 | cond | main.rs:330:14:330:17 | [SSA] cond |
| main.rs:330:20:330:23 | ... | main.rs:330:20:330:23 | data |
| main.rs:330:20:330:23 | [SSA] data | main.rs:332:13:332:16 | data |
| main.rs:330:20:330:23 | data | main.rs:330:20:330:23 | [SSA] data |
| main.rs:331:17:333:9 | { ... } | main.rs:331:9:335:9 | if cond {...} else {...} |
| main.rs:332:13:332:16 | data | main.rs:331:17:333:9 | { ... } |
| main.rs:333:16:335:9 | { ... } | main.rs:331:9:335:9 | if cond {...} else {...} |
| main.rs:334:13:334:13 | 0 | main.rs:333:16:335:9 | { ... } |
| main.rs:336:9:336:9 | [SSA] a | main.rs:337:21:337:21 | a |
| main.rs:336:9:336:9 | a | main.rs:336:9:336:9 | [SSA] a |
| main.rs:336:13:336:22 | source(...) | main.rs:336:9:336:9 | a |
| main.rs:337:9:337:9 | [SSA] b | main.rs:338:10:338:10 | b |
| main.rs:337:9:337:9 | b | main.rs:337:9:337:9 | [SSA] b |
| main.rs:337:13:337:22 | f(...) | main.rs:337:9:337:9 | b |
storeStep
| main.rs:94:14:94:22 | source(...) | tuple.0 | main.rs:94:13:94:26 | TupleExpr |
| main.rs:94:25:94:25 | 2 | tuple.1 | main.rs:94:13:94:26 | TupleExpr |
@@ -385,10 +429,10 @@ storeStep
| main.rs:276:41:276:41 | 2 | D | main.rs:276:14:276:43 | ...::D {...} |
| main.rs:294:18:294:27 | source(...) | C | main.rs:293:14:295:5 | C {...} |
| main.rs:296:27:296:27 | 2 | D | main.rs:296:14:296:29 | D {...} |
| main.rs:314:27:314:27 | 0 | Some | main.rs:314:22:314:28 | Some(...) |
| main.rs:345:27:345:27 | 0 | Some | main.rs:345:22:345:28 | Some(...) |
readStep
| file://:0:0:0:0 | [summary param] self in lang:core::_::<crate::option::Option>::unwrap | Some | file://:0:0:0:0 | [summary] read: Argument[self].Variant[crate::option::Option::Some(0)] in lang:core::_::<crate::option::Option>::unwrap |
| main.rs:33:9:33:15 | TupleStructPat | Some | main.rs:33:14:33:14 | _ |
| main.rs:33:9:33:15 | Some(...) | Some | main.rs:33:14:33:14 | _ |
| main.rs:95:10:95:10 | a | tuple.0 | main.rs:95:10:95:12 | a.0 |
| main.rs:96:10:96:10 | a | tuple.1 | main.rs:96:10:96:12 | a.1 |
| main.rs:109:10:109:10 | a | tuple.0 | main.rs:109:10:109:12 | a.0 |
@@ -405,22 +449,22 @@ readStep
| main.rs:151:9:151:28 | Point {...} | Point.x | main.rs:151:20:151:20 | a |
| main.rs:151:9:151:28 | Point {...} | Point.y | main.rs:151:26:151:26 | b |
| main.rs:183:9:186:9 | Point3D {...} | Point3D.plane | main.rs:184:20:184:33 | Point {...} |
| main.rs:201:9:201:23 | TupleStructPat | Some | main.rs:201:22:201:22 | n |
| main.rs:205:9:205:23 | TupleStructPat | Some | main.rs:205:22:205:22 | n |
| main.rs:214:9:214:15 | TupleStructPat | Some | main.rs:214:14:214:14 | n |
| main.rs:218:9:218:15 | TupleStructPat | Some | main.rs:218:14:218:14 | n |
| main.rs:237:9:237:25 | TupleStructPat | A | main.rs:237:24:237:24 | n |
| main.rs:238:9:238:25 | TupleStructPat | B | main.rs:238:24:238:24 | n |
| main.rs:241:9:241:25 | TupleStructPat | A | main.rs:241:24:241:24 | n |
| main.rs:241:29:241:45 | TupleStructPat | B | main.rs:241:44:241:44 | n |
| main.rs:244:9:244:25 | TupleStructPat | A | main.rs:244:24:244:24 | n |
| main.rs:245:9:245:25 | TupleStructPat | B | main.rs:245:24:245:24 | n |
| main.rs:255:9:255:12 | TupleStructPat | A | main.rs:255:11:255:11 | n |
| main.rs:256:9:256:12 | TupleStructPat | B | main.rs:256:11:256:11 | n |
| main.rs:259:9:259:12 | TupleStructPat | A | main.rs:259:11:259:11 | n |
| main.rs:259:16:259:19 | TupleStructPat | B | main.rs:259:18:259:18 | n |
| main.rs:262:9:262:12 | TupleStructPat | A | main.rs:262:11:262:11 | n |
| main.rs:263:9:263:12 | TupleStructPat | B | main.rs:263:11:263:11 | n |
| main.rs:201:9:201:23 | ...::Some(...) | Some | main.rs:201:22:201:22 | n |
| main.rs:205:9:205:23 | ...::Some(...) | Some | main.rs:205:22:205:22 | n |
| main.rs:214:9:214:15 | Some(...) | Some | main.rs:214:14:214:14 | n |
| main.rs:218:9:218:15 | Some(...) | Some | main.rs:218:14:218:14 | n |
| main.rs:237:9:237:25 | ...::A(...) | A | main.rs:237:24:237:24 | n |
| main.rs:238:9:238:25 | ...::B(...) | B | main.rs:238:24:238:24 | n |
| main.rs:241:9:241:25 | ...::A(...) | A | main.rs:241:24:241:24 | n |
| main.rs:241:29:241:45 | ...::B(...) | B | main.rs:241:44:241:44 | n |
| main.rs:244:9:244:25 | ...::A(...) | A | main.rs:244:24:244:24 | n |
| main.rs:245:9:245:25 | ...::B(...) | B | main.rs:245:24:245:24 | n |
| main.rs:255:9:255:12 | A(...) | A | main.rs:255:11:255:11 | n |
| main.rs:256:9:256:12 | B(...) | B | main.rs:256:11:256:11 | n |
| main.rs:259:9:259:12 | A(...) | A | main.rs:259:11:259:11 | n |
| main.rs:259:16:259:19 | B(...) | B | main.rs:259:18:259:18 | n |
| main.rs:262:9:262:12 | A(...) | A | main.rs:262:11:262:11 | n |
| main.rs:263:9:263:12 | B(...) | B | main.rs:263:11:263:11 | n |
| main.rs:278:9:278:38 | ...::C {...} | C | main.rs:278:36:278:36 | n |
| main.rs:279:9:279:38 | ...::D {...} | D | main.rs:279:36:279:36 | n |
| main.rs:282:9:282:38 | ...::C {...} | C | main.rs:282:36:282:36 | n |

View File

@@ -25,30 +25,30 @@ edges
| main.rs:148:12:148:21 | source(...) | main.rs:147:13:150:5 | Point {...} [Point.x] | provenance | |
| main.rs:151:9:151:28 | Point {...} [Point.x] | main.rs:151:20:151:20 | a | provenance | |
| main.rs:151:20:151:20 | a | main.rs:152:10:152:10 | a | provenance | |
| main.rs:198:14:198:37 | ...::Some(...) [Some] | main.rs:201:9:201:23 | TupleStructPat [Some] | provenance | |
| main.rs:198:14:198:37 | ...::Some(...) [Some] | main.rs:201:9:201:23 | ...::Some(...) [Some] | provenance | |
| main.rs:198:27:198:36 | source(...) | main.rs:198:14:198:37 | ...::Some(...) [Some] | provenance | |
| main.rs:201:9:201:23 | TupleStructPat [Some] | main.rs:201:22:201:22 | n | provenance | |
| main.rs:201:9:201:23 | ...::Some(...) [Some] | main.rs:201:22:201:22 | n | provenance | |
| main.rs:201:22:201:22 | n | main.rs:201:33:201:33 | n | provenance | |
| main.rs:211:14:211:29 | Some(...) [Some] | main.rs:214:9:214:15 | TupleStructPat [Some] | provenance | |
| main.rs:211:14:211:29 | Some(...) [Some] | main.rs:214:9:214:15 | Some(...) [Some] | provenance | |
| main.rs:211:19:211:28 | source(...) | main.rs:211:14:211:29 | Some(...) [Some] | provenance | |
| main.rs:214:9:214:15 | TupleStructPat [Some] | main.rs:214:14:214:14 | n | provenance | |
| main.rs:214:9:214:15 | Some(...) [Some] | main.rs:214:14:214:14 | n | provenance | |
| main.rs:214:14:214:14 | n | main.rs:214:25:214:25 | n | provenance | |
| main.rs:224:14:224:29 | Some(...) [Some] | main.rs:225:10:225:11 | s1 [Some] | provenance | |
| main.rs:224:19:224:28 | source(...) | main.rs:224:14:224:29 | Some(...) [Some] | provenance | |
| main.rs:225:10:225:11 | s1 [Some] | main.rs:225:10:225:20 | ... .unwrap(...) | provenance | |
| main.rs:234:14:234:39 | ...::A(...) [A] | main.rs:237:9:237:25 | TupleStructPat [A] | provenance | |
| main.rs:234:14:234:39 | ...::A(...) [A] | main.rs:241:9:241:25 | TupleStructPat [A] | provenance | |
| main.rs:234:14:234:39 | ...::A(...) [A] | main.rs:237:9:237:25 | ...::A(...) [A] | provenance | |
| main.rs:234:14:234:39 | ...::A(...) [A] | main.rs:241:9:241:25 | ...::A(...) [A] | provenance | |
| main.rs:234:29:234:38 | source(...) | main.rs:234:14:234:39 | ...::A(...) [A] | provenance | |
| main.rs:237:9:237:25 | TupleStructPat [A] | main.rs:237:24:237:24 | n | provenance | |
| main.rs:237:9:237:25 | ...::A(...) [A] | main.rs:237:24:237:24 | n | provenance | |
| main.rs:237:24:237:24 | n | main.rs:237:35:237:35 | n | provenance | |
| main.rs:241:9:241:25 | TupleStructPat [A] | main.rs:241:24:241:24 | n | provenance | |
| main.rs:241:9:241:25 | ...::A(...) [A] | main.rs:241:24:241:24 | n | provenance | |
| main.rs:241:24:241:24 | n | main.rs:241:55:241:55 | n | provenance | |
| main.rs:252:14:252:26 | A(...) [A] | main.rs:255:9:255:12 | TupleStructPat [A] | provenance | |
| main.rs:252:14:252:26 | A(...) [A] | main.rs:259:9:259:12 | TupleStructPat [A] | provenance | |
| main.rs:252:14:252:26 | A(...) [A] | main.rs:255:9:255:12 | A(...) [A] | provenance | |
| main.rs:252:14:252:26 | A(...) [A] | main.rs:259:9:259:12 | A(...) [A] | provenance | |
| main.rs:252:16:252:25 | source(...) | main.rs:252:14:252:26 | A(...) [A] | provenance | |
| main.rs:255:9:255:12 | TupleStructPat [A] | main.rs:255:11:255:11 | n | provenance | |
| main.rs:255:9:255:12 | A(...) [A] | main.rs:255:11:255:11 | n | provenance | |
| main.rs:255:11:255:11 | n | main.rs:255:22:255:22 | n | provenance | |
| main.rs:259:9:259:12 | TupleStructPat [A] | main.rs:259:11:259:11 | n | provenance | |
| main.rs:259:9:259:12 | A(...) [A] | main.rs:259:11:259:11 | n | provenance | |
| main.rs:259:11:259:11 | n | main.rs:259:29:259:29 | n | provenance | |
| main.rs:273:14:275:5 | ...::C {...} [C] | main.rs:278:9:278:38 | ...::C {...} [C] | provenance | |
| main.rs:273:14:275:5 | ...::C {...} [C] | main.rs:282:9:282:38 | ...::C {...} [C] | provenance | |
@@ -64,6 +64,16 @@ edges
| main.rs:298:22:298:22 | n | main.rs:298:34:298:34 | n | provenance | |
| main.rs:302:9:302:24 | C {...} [C] | main.rs:302:22:302:22 | n | provenance | |
| main.rs:302:22:302:22 | n | main.rs:302:53:302:53 | n | provenance | |
| main.rs:314:20:314:52 | if cond {...} else {...} | main.rs:315:10:315:16 | f(...) | provenance | |
| main.rs:314:30:314:39 | source(...) | main.rs:314:20:314:52 | if cond {...} else {...} | provenance | |
| main.rs:319:20:319:23 | ... | main.rs:321:18:321:21 | data | provenance | |
| main.rs:325:13:325:22 | source(...) | main.rs:326:13:326:13 | a | provenance | |
| main.rs:326:13:326:13 | a | main.rs:319:20:319:23 | ... | provenance | |
| main.rs:330:20:330:23 | ... | main.rs:331:9:335:9 | if cond {...} else {...} | provenance | |
| main.rs:336:13:336:22 | source(...) | main.rs:337:21:337:21 | a | provenance | |
| main.rs:337:13:337:22 | f(...) | main.rs:338:10:338:10 | b | provenance | |
| main.rs:337:21:337:21 | a | main.rs:330:20:330:23 | ... | provenance | |
| main.rs:337:21:337:21 | a | main.rs:337:13:337:22 | f(...) | provenance | |
nodes
| main.rs:15:10:15:18 | source(...) | semmle.label | source(...) |
| main.rs:19:13:19:21 | source(...) | semmle.label | source(...) |
@@ -103,12 +113,12 @@ nodes
| main.rs:152:10:152:10 | a | semmle.label | a |
| main.rs:198:14:198:37 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
| main.rs:198:27:198:36 | source(...) | semmle.label | source(...) |
| main.rs:201:9:201:23 | TupleStructPat [Some] | semmle.label | TupleStructPat [Some] |
| main.rs:201:9:201:23 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
| main.rs:201:22:201:22 | n | semmle.label | n |
| main.rs:201:33:201:33 | n | semmle.label | n |
| main.rs:211:14:211:29 | Some(...) [Some] | semmle.label | Some(...) [Some] |
| main.rs:211:19:211:28 | source(...) | semmle.label | source(...) |
| main.rs:214:9:214:15 | TupleStructPat [Some] | semmle.label | TupleStructPat [Some] |
| main.rs:214:9:214:15 | Some(...) [Some] | semmle.label | Some(...) [Some] |
| main.rs:214:14:214:14 | n | semmle.label | n |
| main.rs:214:25:214:25 | n | semmle.label | n |
| main.rs:224:14:224:29 | Some(...) [Some] | semmle.label | Some(...) [Some] |
@@ -117,18 +127,18 @@ nodes
| main.rs:225:10:225:20 | ... .unwrap(...) | semmle.label | ... .unwrap(...) |
| main.rs:234:14:234:39 | ...::A(...) [A] | semmle.label | ...::A(...) [A] |
| main.rs:234:29:234:38 | source(...) | semmle.label | source(...) |
| main.rs:237:9:237:25 | TupleStructPat [A] | semmle.label | TupleStructPat [A] |
| main.rs:237:9:237:25 | ...::A(...) [A] | semmle.label | ...::A(...) [A] |
| main.rs:237:24:237:24 | n | semmle.label | n |
| main.rs:237:35:237:35 | n | semmle.label | n |
| main.rs:241:9:241:25 | TupleStructPat [A] | semmle.label | TupleStructPat [A] |
| main.rs:241:9:241:25 | ...::A(...) [A] | semmle.label | ...::A(...) [A] |
| main.rs:241:24:241:24 | n | semmle.label | n |
| main.rs:241:55:241:55 | n | semmle.label | n |
| main.rs:252:14:252:26 | A(...) [A] | semmle.label | A(...) [A] |
| main.rs:252:16:252:25 | source(...) | semmle.label | source(...) |
| main.rs:255:9:255:12 | TupleStructPat [A] | semmle.label | TupleStructPat [A] |
| main.rs:255:9:255:12 | A(...) [A] | semmle.label | A(...) [A] |
| main.rs:255:11:255:11 | n | semmle.label | n |
| main.rs:255:22:255:22 | n | semmle.label | n |
| main.rs:259:9:259:12 | TupleStructPat [A] | semmle.label | TupleStructPat [A] |
| main.rs:259:9:259:12 | A(...) [A] | semmle.label | A(...) [A] |
| main.rs:259:11:259:11 | n | semmle.label | n |
| main.rs:259:29:259:29 | n | semmle.label | n |
| main.rs:273:14:275:5 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
@@ -147,7 +157,21 @@ nodes
| main.rs:302:9:302:24 | C {...} [C] | semmle.label | C {...} [C] |
| main.rs:302:22:302:22 | n | semmle.label | n |
| main.rs:302:53:302:53 | n | semmle.label | n |
| main.rs:314:20:314:52 | if cond {...} else {...} | semmle.label | if cond {...} else {...} |
| main.rs:314:30:314:39 | source(...) | semmle.label | source(...) |
| main.rs:315:10:315:16 | f(...) | semmle.label | f(...) |
| main.rs:319:20:319:23 | ... | semmle.label | ... |
| main.rs:321:18:321:21 | data | semmle.label | data |
| main.rs:325:13:325:22 | source(...) | semmle.label | source(...) |
| main.rs:326:13:326:13 | a | semmle.label | a |
| main.rs:330:20:330:23 | ... | semmle.label | ... |
| main.rs:331:9:335:9 | if cond {...} else {...} | semmle.label | if cond {...} else {...} |
| main.rs:336:13:336:22 | source(...) | semmle.label | source(...) |
| main.rs:337:13:337:22 | f(...) | semmle.label | f(...) |
| main.rs:337:21:337:21 | a | semmle.label | a |
| main.rs:338:10:338:10 | b | semmle.label | b |
subpaths
| main.rs:337:21:337:21 | a | main.rs:330:20:330:23 | ... | main.rs:331:9:335:9 | if cond {...} else {...} | main.rs:337:13:337:22 | f(...) |
testFailures
#select
| main.rs:15:10:15:18 | source(...) | main.rs:15:10:15:18 | source(...) | main.rs:15:10:15:18 | source(...) | $@ | main.rs:15:10:15:18 | source(...) | source(...) |
@@ -172,3 +196,6 @@ testFailures
| main.rs:282:81:282:81 | n | main.rs:274:18:274:27 | source(...) | main.rs:282:81:282:81 | n | $@ | main.rs:274:18:274:27 | source(...) | source(...) |
| main.rs:298:34:298:34 | n | main.rs:294:18:294:27 | source(...) | main.rs:298:34:298:34 | n | $@ | main.rs:294:18:294:27 | source(...) | source(...) |
| main.rs:302:53:302:53 | n | main.rs:294:18:294:27 | source(...) | main.rs:302:53:302:53 | n | $@ | main.rs:294:18:294:27 | source(...) | source(...) |
| main.rs:315:10:315:16 | f(...) | main.rs:314:30:314:39 | source(...) | main.rs:315:10:315:16 | f(...) | $@ | main.rs:314:30:314:39 | source(...) | source(...) |
| main.rs:321:18:321:21 | data | main.rs:325:13:325:22 | source(...) | main.rs:321:18:321:21 | data | $@ | main.rs:325:13:325:22 | source(...) | source(...) |
| main.rs:338:10:338:10 | b | main.rs:336:13:336:22 | source(...) | main.rs:338:10:338:10 | b | $@ | main.rs:336:13:336:22 | source(...) | source(...) |

View File

@@ -307,6 +307,37 @@ fn custom_record_enum_pattern_match_unqualified() {
}
}
// -----------------------------------------------------------------------------
// Data flow through closures
fn closure_flow_out() {
let f = |cond| if cond { source(92) } else { 0 };
sink(f(true)); // $ hasValueFlow=92
}
fn closure_flow_in() {
let f = |cond, data|
if cond {
sink(data); // $ hasValueFlow=87
} else {
sink(0)
};
let a = source(87);
f(true, a);
}
fn closure_flow_through() {
let f = |cond, data|
if cond {
data
} else {
0
};
let a = source(43);
let b = f(true, a);
sink(b); // $ hasValueFlow=43
}
fn main() {
direct();
variable_usage();
@@ -334,4 +365,7 @@ fn main() {
block_expression1();
block_expression2(true);
block_expression3(true);
closure_flow_out();
closure_flow_in();
closure_flow_through();
}

View File

@@ -7,9 +7,9 @@ edges
| main.rs:31:27:31:27 | s | main.rs:31:14:31:28 | ...::A(...) [A] | provenance | |
| main.rs:32:22:32:23 | e1 [A] | main.rs:32:10:32:24 | get_var_pos(...) | provenance | |
| main.rs:43:13:43:21 | source(...) | main.rs:44:26:44:26 | s | provenance | |
| main.rs:44:14:44:27 | set_var_pos(...) [B] | main.rs:47:9:47:23 | TupleStructPat [B] | provenance | |
| main.rs:44:14:44:27 | set_var_pos(...) [B] | main.rs:47:9:47:23 | ...::B(...) [B] | provenance | |
| main.rs:44:26:44:26 | s | main.rs:44:14:44:27 | set_var_pos(...) [B] | provenance | |
| main.rs:47:9:47:23 | TupleStructPat [B] | main.rs:47:22:47:22 | i | provenance | |
| main.rs:47:9:47:23 | ...::B(...) [B] | main.rs:47:22:47:22 | i | provenance | |
| main.rs:47:22:47:22 | i | main.rs:47:33:47:33 | i | provenance | |
| main.rs:62:13:62:21 | source(...) | main.rs:63:40:63:40 | s | provenance | |
| main.rs:63:14:63:42 | ...::C {...} [C] | main.rs:64:24:64:25 | e1 [C] | provenance | |
@@ -32,7 +32,7 @@ nodes
| main.rs:43:13:43:21 | source(...) | semmle.label | source(...) |
| main.rs:44:14:44:27 | set_var_pos(...) [B] | semmle.label | set_var_pos(...) [B] |
| main.rs:44:26:44:26 | s | semmle.label | s |
| main.rs:47:9:47:23 | TupleStructPat [B] | semmle.label | TupleStructPat [B] |
| main.rs:47:9:47:23 | ...::B(...) [B] | semmle.label | ...::B(...) [B] |
| main.rs:47:22:47:22 | i | semmle.label | i |
| main.rs:47:33:47:33 | i | semmle.label | i |
| main.rs:62:13:62:21 | source(...) | semmle.label | source(...) |

View File

@@ -197,10 +197,10 @@ edges
| variables.rs:85:32:85:39 | "Hello!" | variables.rs:85:19:85:40 | ...::from(...) | |
| variables.rs:87:5:90:5 | if ... {...} | variables.rs:84:19:91:1 | { ... } | |
| variables.rs:87:8:88:12 | let ... = s1 | variables.rs:88:11:88:12 | s1 | |
| variables.rs:87:12:87:23 | TupleStructPat | variables.rs:87:5:90:5 | if ... {...} | no-match |
| variables.rs:87:12:87:23 | TupleStructPat | variables.rs:87:17:87:22 | s2 | match |
| variables.rs:87:12:87:23 | Some(...) | variables.rs:87:5:90:5 | if ... {...} | no-match |
| variables.rs:87:12:87:23 | Some(...) | variables.rs:87:17:87:22 | s2 | match |
| variables.rs:87:17:87:22 | s2 | variables.rs:89:9:89:22 | ExprStmt | match |
| variables.rs:88:11:88:12 | s1 | variables.rs:87:12:87:23 | TupleStructPat | |
| variables.rs:88:11:88:12 | s1 | variables.rs:87:12:87:23 | Some(...) | |
| variables.rs:88:14:90:5 | { ... } | variables.rs:87:5:90:5 | if ... {...} | |
| variables.rs:89:9:89:17 | print_str | variables.rs:89:19:89:20 | s2 | |
| variables.rs:89:9:89:21 | print_str(...) | variables.rs:88:14:90:5 | { ... } | |
@@ -210,11 +210,11 @@ edges
| variables.rs:93:1:99:1 | exit fn let_pattern4 (normal) | variables.rs:93:1:99:1 | exit fn let_pattern4 | |
| variables.rs:93:19:99:1 | { ... } | variables.rs:93:1:99:1 | exit fn let_pattern4 (normal) | |
| variables.rs:94:5:97:10 | let ... = ... else {...} | variables.rs:94:34:94:37 | Some | |
| variables.rs:94:9:94:16 | TupleStructPat | variables.rs:94:14:94:15 | x5 | match |
| variables.rs:94:9:94:16 | TupleStructPat | variables.rs:96:13:96:19 | MacroStmts | no-match |
| variables.rs:94:9:94:16 | Some(...) | variables.rs:94:14:94:15 | x5 | match |
| variables.rs:94:9:94:16 | Some(...) | variables.rs:96:13:96:19 | MacroStmts | no-match |
| variables.rs:94:14:94:15 | x5 | variables.rs:98:5:98:18 | ExprStmt | match |
| variables.rs:94:34:94:37 | Some | variables.rs:94:39:94:42 | "x5" | |
| variables.rs:94:34:94:43 | Some(...) | variables.rs:94:9:94:16 | TupleStructPat | |
| variables.rs:94:34:94:43 | Some(...) | variables.rs:94:9:94:16 | Some(...) | |
| variables.rs:94:39:94:42 | "x5" | variables.rs:94:34:94:43 | Some(...) | |
| variables.rs:96:13:96:19 | "not yet implemented" | variables.rs:96:13:96:19 | ...::panic(...) | |
| variables.rs:96:13:96:19 | ...::panic | variables.rs:96:13:96:19 | "not yet implemented" | |
@@ -237,10 +237,10 @@ edges
| variables.rs:102:32:102:39 | "Hello!" | variables.rs:102:19:102:40 | ...::from(...) | |
| variables.rs:104:5:107:5 | while ... { ... } | variables.rs:101:19:108:1 | { ... } | |
| variables.rs:104:11:105:12 | let ... = s1 | variables.rs:105:11:105:12 | s1 | |
| variables.rs:104:15:104:26 | TupleStructPat | variables.rs:104:5:107:5 | while ... { ... } | no-match |
| variables.rs:104:15:104:26 | TupleStructPat | variables.rs:104:20:104:25 | s2 | match |
| variables.rs:104:15:104:26 | Some(...) | variables.rs:104:5:107:5 | while ... { ... } | no-match |
| variables.rs:104:15:104:26 | Some(...) | variables.rs:104:20:104:25 | s2 | match |
| variables.rs:104:20:104:25 | s2 | variables.rs:106:9:106:22 | ExprStmt | match |
| variables.rs:105:11:105:12 | s1 | variables.rs:104:15:104:26 | TupleStructPat | |
| variables.rs:105:11:105:12 | s1 | variables.rs:104:15:104:26 | Some(...) | |
| variables.rs:105:14:107:5 | { ... } | variables.rs:104:11:105:12 | let ... = s1 | |
| variables.rs:106:9:106:17 | print_str | variables.rs:106:19:106:20 | s2 | |
| variables.rs:106:9:106:21 | print_str(...) | variables.rs:105:14:107:5 | { ... } | |
@@ -259,17 +259,17 @@ edges
| variables.rs:112:14:112:15 | 10 | variables.rs:112:9:112:10 | y1 | |
| variables.rs:114:5:122:5 | ExprStmt | variables.rs:114:11:114:12 | x6 | |
| variables.rs:114:5:122:5 | match x6 { ... } | variables.rs:124:5:124:18 | ExprStmt | |
| variables.rs:114:11:114:12 | x6 | variables.rs:115:9:115:16 | TupleStructPat | |
| variables.rs:115:9:115:16 | TupleStructPat | variables.rs:115:14:115:15 | 50 | match |
| variables.rs:115:9:115:16 | TupleStructPat | variables.rs:116:9:116:16 | TupleStructPat | no-match |
| variables.rs:114:11:114:12 | x6 | variables.rs:115:9:115:16 | Some(...) | |
| variables.rs:115:9:115:16 | Some(...) | variables.rs:115:14:115:15 | 50 | match |
| variables.rs:115:9:115:16 | Some(...) | variables.rs:116:9:116:16 | Some(...) | no-match |
| variables.rs:115:14:115:15 | 50 | variables.rs:115:14:115:15 | 50 | |
| variables.rs:115:14:115:15 | 50 | variables.rs:115:21:115:29 | print_str | match |
| variables.rs:115:14:115:15 | 50 | variables.rs:116:9:116:16 | TupleStructPat | no-match |
| variables.rs:115:14:115:15 | 50 | variables.rs:116:9:116:16 | Some(...) | no-match |
| variables.rs:115:21:115:29 | print_str | variables.rs:115:31:115:38 | "Got 50" | |
| variables.rs:115:21:115:39 | print_str(...) | variables.rs:114:5:122:5 | match x6 { ... } | |
| variables.rs:115:31:115:38 | "Got 50" | variables.rs:115:21:115:39 | print_str(...) | |
| variables.rs:116:9:116:16 | TupleStructPat | variables.rs:116:14:116:15 | y1 | match |
| variables.rs:116:9:116:16 | TupleStructPat | variables.rs:121:9:121:12 | None | no-match |
| variables.rs:116:9:116:16 | Some(...) | variables.rs:116:14:116:15 | y1 | match |
| variables.rs:116:9:116:16 | Some(...) | variables.rs:121:9:121:12 | None | no-match |
| variables.rs:116:14:116:15 | y1 | variables.rs:119:13:119:21 | print_i64 | match |
| variables.rs:118:9:120:9 | { ... } | variables.rs:114:5:122:5 | match x6 { ... } | |
| variables.rs:119:13:119:21 | print_i64 | variables.rs:119:23:119:24 | y1 | |
@@ -404,12 +404,12 @@ edges
| variables.rs:189:18:189:33 | ...::Left(...) | variables.rs:189:9:189:14 | either | |
| variables.rs:189:31:189:32 | 32 | variables.rs:189:18:189:33 | ...::Left(...) | |
| variables.rs:190:5:193:5 | match either { ... } | variables.rs:188:21:194:1 | { ... } | |
| variables.rs:190:11:190:16 | either | variables.rs:191:9:191:24 | TupleStructPat | |
| variables.rs:191:9:191:24 | TupleStructPat | variables.rs:191:22:191:23 | a3 | match |
| variables.rs:191:9:191:24 | TupleStructPat | variables.rs:191:28:191:44 | TupleStructPat | no-match |
| variables.rs:190:11:190:16 | either | variables.rs:191:9:191:24 | ...::Left(...) | |
| variables.rs:191:9:191:24 | ...::Left(...) | variables.rs:191:22:191:23 | a3 | match |
| variables.rs:191:9:191:24 | ...::Left(...) | variables.rs:191:28:191:44 | ...::Right(...) | no-match |
| variables.rs:191:9:191:44 | [match(true)] ... \| ... | variables.rs:192:16:192:24 | print_i64 | match |
| variables.rs:191:22:191:23 | a3 | variables.rs:191:9:191:44 | [match(true)] ... \| ... | match |
| variables.rs:191:28:191:44 | TupleStructPat | variables.rs:191:42:191:43 | a3 | match |
| variables.rs:191:28:191:44 | ...::Right(...) | variables.rs:191:42:191:43 | a3 | match |
| variables.rs:191:42:191:43 | a3 | variables.rs:191:9:191:44 | [match(true)] ... \| ... | match |
| variables.rs:192:16:192:24 | print_i64 | variables.rs:192:26:192:27 | a3 | |
| variables.rs:192:16:192:28 | print_i64(...) | variables.rs:190:5:193:5 | match either { ... } | |
@@ -424,47 +424,47 @@ edges
| variables.rs:203:34:203:35 | 62 | variables.rs:203:14:203:36 | ...::Second(...) | |
| variables.rs:204:5:207:5 | ExprStmt | variables.rs:204:11:204:12 | tv | |
| variables.rs:204:5:207:5 | match tv { ... } | variables.rs:208:5:211:5 | ExprStmt | |
| variables.rs:204:11:204:12 | tv | variables.rs:205:9:205:30 | TupleStructPat | |
| variables.rs:205:9:205:30 | TupleStructPat | variables.rs:205:28:205:29 | a4 | match |
| variables.rs:205:9:205:30 | TupleStructPat | variables.rs:205:34:205:56 | TupleStructPat | no-match |
| variables.rs:204:11:204:12 | tv | variables.rs:205:9:205:30 | ...::First(...) | |
| variables.rs:205:9:205:30 | ...::First(...) | variables.rs:205:28:205:29 | a4 | match |
| variables.rs:205:9:205:30 | ...::First(...) | variables.rs:205:34:205:56 | ...::Second(...) | no-match |
| variables.rs:205:9:205:81 | [match(true)] ... \| ... \| ... | variables.rs:206:16:206:24 | print_i64 | match |
| variables.rs:205:28:205:29 | a4 | variables.rs:205:9:205:81 | [match(true)] ... \| ... \| ... | match |
| variables.rs:205:34:205:56 | TupleStructPat | variables.rs:205:54:205:55 | a4 | match |
| variables.rs:205:34:205:56 | TupleStructPat | variables.rs:205:60:205:81 | TupleStructPat | no-match |
| variables.rs:205:34:205:56 | ...::Second(...) | variables.rs:205:54:205:55 | a4 | match |
| variables.rs:205:34:205:56 | ...::Second(...) | variables.rs:205:60:205:81 | ...::Third(...) | no-match |
| variables.rs:205:54:205:55 | a4 | variables.rs:205:9:205:81 | [match(true)] ... \| ... \| ... | match |
| variables.rs:205:60:205:81 | TupleStructPat | variables.rs:205:79:205:80 | a4 | match |
| variables.rs:205:60:205:81 | ...::Third(...) | variables.rs:205:79:205:80 | a4 | match |
| variables.rs:205:79:205:80 | a4 | variables.rs:205:9:205:81 | [match(true)] ... \| ... \| ... | match |
| variables.rs:206:16:206:24 | print_i64 | variables.rs:206:26:206:27 | a4 | |
| variables.rs:206:16:206:28 | print_i64(...) | variables.rs:204:5:207:5 | match tv { ... } | |
| variables.rs:206:26:206:27 | a4 | variables.rs:206:16:206:28 | print_i64(...) | |
| variables.rs:208:5:211:5 | ExprStmt | variables.rs:208:11:208:12 | tv | |
| variables.rs:208:5:211:5 | match tv { ... } | variables.rs:212:11:212:12 | tv | |
| variables.rs:208:11:208:12 | tv | variables.rs:209:10:209:31 | TupleStructPat | |
| variables.rs:208:11:208:12 | tv | variables.rs:209:10:209:31 | ...::First(...) | |
| variables.rs:209:9:209:83 | [match(true)] ... \| ... | variables.rs:210:16:210:24 | print_i64 | match |
| variables.rs:209:10:209:31 | TupleStructPat | variables.rs:209:29:209:30 | a5 | match |
| variables.rs:209:10:209:31 | TupleStructPat | variables.rs:209:35:209:57 | TupleStructPat | no-match |
| variables.rs:209:10:209:57 | [match(false)] ... \| ... | variables.rs:209:62:209:83 | TupleStructPat | no-match |
| variables.rs:209:10:209:31 | ...::First(...) | variables.rs:209:29:209:30 | a5 | match |
| variables.rs:209:10:209:31 | ...::First(...) | variables.rs:209:35:209:57 | ...::Second(...) | no-match |
| variables.rs:209:10:209:57 | [match(false)] ... \| ... | variables.rs:209:62:209:83 | ...::Third(...) | no-match |
| variables.rs:209:10:209:57 | [match(true)] ... \| ... | variables.rs:209:9:209:83 | [match(true)] ... \| ... | match |
| variables.rs:209:29:209:30 | a5 | variables.rs:209:10:209:57 | [match(true)] ... \| ... | match |
| variables.rs:209:35:209:57 | TupleStructPat | variables.rs:209:10:209:57 | [match(false)] ... \| ... | no-match |
| variables.rs:209:35:209:57 | TupleStructPat | variables.rs:209:55:209:56 | a5 | match |
| variables.rs:209:35:209:57 | ...::Second(...) | variables.rs:209:10:209:57 | [match(false)] ... \| ... | no-match |
| variables.rs:209:35:209:57 | ...::Second(...) | variables.rs:209:55:209:56 | a5 | match |
| variables.rs:209:55:209:56 | a5 | variables.rs:209:10:209:57 | [match(true)] ... \| ... | match |
| variables.rs:209:62:209:83 | TupleStructPat | variables.rs:209:81:209:82 | a5 | match |
| variables.rs:209:62:209:83 | ...::Third(...) | variables.rs:209:81:209:82 | a5 | match |
| variables.rs:209:81:209:82 | a5 | variables.rs:209:9:209:83 | [match(true)] ... \| ... | match |
| variables.rs:210:16:210:24 | print_i64 | variables.rs:210:26:210:27 | a5 | |
| variables.rs:210:16:210:28 | print_i64(...) | variables.rs:208:5:211:5 | match tv { ... } | |
| variables.rs:210:26:210:27 | a5 | variables.rs:210:16:210:28 | print_i64(...) | |
| variables.rs:212:5:215:5 | match tv { ... } | variables.rs:202:21:216:1 | { ... } | |
| variables.rs:212:11:212:12 | tv | variables.rs:213:9:213:30 | TupleStructPat | |
| variables.rs:213:9:213:30 | TupleStructPat | variables.rs:213:28:213:29 | a6 | match |
| variables.rs:213:9:213:30 | TupleStructPat | variables.rs:213:35:213:57 | TupleStructPat | no-match |
| variables.rs:212:11:212:12 | tv | variables.rs:213:9:213:30 | ...::First(...) | |
| variables.rs:213:9:213:30 | ...::First(...) | variables.rs:213:28:213:29 | a6 | match |
| variables.rs:213:9:213:30 | ...::First(...) | variables.rs:213:35:213:57 | ...::Second(...) | no-match |
| variables.rs:213:9:213:83 | [match(true)] ... \| ... | variables.rs:214:16:214:24 | print_i64 | match |
| variables.rs:213:28:213:29 | a6 | variables.rs:213:9:213:83 | [match(true)] ... \| ... | match |
| variables.rs:213:35:213:57 | TupleStructPat | variables.rs:213:55:213:56 | a6 | match |
| variables.rs:213:35:213:57 | TupleStructPat | variables.rs:213:61:213:82 | TupleStructPat | no-match |
| variables.rs:213:35:213:57 | ...::Second(...) | variables.rs:213:55:213:56 | a6 | match |
| variables.rs:213:35:213:57 | ...::Second(...) | variables.rs:213:61:213:82 | ...::Third(...) | no-match |
| variables.rs:213:35:213:82 | [match(true)] ... \| ... | variables.rs:213:9:213:83 | [match(true)] ... \| ... | match |
| variables.rs:213:55:213:56 | a6 | variables.rs:213:35:213:82 | [match(true)] ... \| ... | match |
| variables.rs:213:61:213:82 | TupleStructPat | variables.rs:213:80:213:81 | a6 | match |
| variables.rs:213:61:213:82 | ...::Third(...) | variables.rs:213:80:213:81 | a6 | match |
| variables.rs:213:80:213:81 | a6 | variables.rs:213:35:213:82 | [match(true)] ... \| ... | match |
| variables.rs:214:16:214:24 | print_i64 | variables.rs:214:26:214:27 | a6 | |
| variables.rs:214:16:214:28 | print_i64(...) | variables.rs:212:5:215:5 | match tv { ... } | |
@@ -478,14 +478,14 @@ edges
| variables.rs:219:18:219:33 | ...::Left(...) | variables.rs:219:9:219:14 | either | |
| variables.rs:219:31:219:32 | 32 | variables.rs:219:18:219:33 | ...::Left(...) | |
| variables.rs:220:5:225:5 | match either { ... } | variables.rs:218:21:226:1 | { ... } | |
| variables.rs:220:11:220:16 | either | variables.rs:221:9:221:24 | TupleStructPat | |
| variables.rs:221:9:221:24 | TupleStructPat | variables.rs:221:22:221:23 | a7 | match |
| variables.rs:221:9:221:24 | TupleStructPat | variables.rs:221:28:221:44 | TupleStructPat | no-match |
| variables.rs:220:11:220:16 | either | variables.rs:221:9:221:24 | ...::Left(...) | |
| variables.rs:221:9:221:24 | ...::Left(...) | variables.rs:221:22:221:23 | a7 | match |
| variables.rs:221:9:221:24 | ...::Left(...) | variables.rs:221:28:221:44 | ...::Right(...) | no-match |
| variables.rs:221:9:221:44 | [match(false)] ... \| ... | variables.rs:224:9:224:9 | _ | no-match |
| variables.rs:221:9:221:44 | [match(true)] ... \| ... | variables.rs:222:16:222:17 | a7 | match |
| variables.rs:221:22:221:23 | a7 | variables.rs:221:9:221:44 | [match(true)] ... \| ... | match |
| variables.rs:221:28:221:44 | TupleStructPat | variables.rs:221:9:221:44 | [match(false)] ... \| ... | no-match |
| variables.rs:221:28:221:44 | TupleStructPat | variables.rs:221:42:221:43 | a7 | match |
| variables.rs:221:28:221:44 | ...::Right(...) | variables.rs:221:9:221:44 | [match(false)] ... \| ... | no-match |
| variables.rs:221:28:221:44 | ...::Right(...) | variables.rs:221:42:221:43 | a7 | match |
| variables.rs:221:42:221:43 | a7 | variables.rs:221:9:221:44 | [match(true)] ... \| ... | match |
| variables.rs:222:16:222:17 | a7 | variables.rs:222:21:222:21 | 0 | |
| variables.rs:222:16:222:21 | ... > ... | variables.rs:223:16:223:24 | print_i64 | true |
@@ -505,15 +505,15 @@ edges
| variables.rs:229:18:229:33 | ...::Left(...) | variables.rs:229:9:229:14 | either | |
| variables.rs:229:31:229:32 | 32 | variables.rs:229:18:229:33 | ...::Left(...) | |
| variables.rs:231:5:242:5 | match either { ... } | variables.rs:228:21:243:1 | { ... } | |
| variables.rs:231:11:231:16 | either | variables.rs:233:14:233:30 | TupleStructPat | |
| variables.rs:231:11:231:16 | either | variables.rs:233:14:233:30 | ...::Left(...) | |
| variables.rs:232:9:233:52 | [match(true)] e | variables.rs:235:13:235:27 | ExprStmt | match |
| variables.rs:233:14:233:30 | TupleStructPat | variables.rs:233:27:233:29 | a11 | match |
| variables.rs:233:14:233:30 | TupleStructPat | variables.rs:233:34:233:51 | TupleStructPat | no-match |
| variables.rs:233:14:233:30 | ...::Left(...) | variables.rs:233:27:233:29 | a11 | match |
| variables.rs:233:14:233:30 | ...::Left(...) | variables.rs:233:34:233:51 | ...::Right(...) | no-match |
| variables.rs:233:14:233:51 | [match(false)] ... \| ... | variables.rs:241:9:241:9 | _ | no-match |
| variables.rs:233:14:233:51 | [match(true)] ... \| ... | variables.rs:232:9:233:52 | [match(true)] e | match |
| variables.rs:233:27:233:29 | a11 | variables.rs:233:14:233:51 | [match(true)] ... \| ... | match |
| variables.rs:233:34:233:51 | TupleStructPat | variables.rs:233:14:233:51 | [match(false)] ... \| ... | no-match |
| variables.rs:233:34:233:51 | TupleStructPat | variables.rs:233:48:233:50 | a11 | match |
| variables.rs:233:34:233:51 | ...::Right(...) | variables.rs:233:14:233:51 | [match(false)] ... \| ... | no-match |
| variables.rs:233:34:233:51 | ...::Right(...) | variables.rs:233:48:233:50 | a11 | match |
| variables.rs:233:48:233:50 | a11 | variables.rs:233:14:233:51 | [match(true)] ... \| ... | match |
| variables.rs:234:12:240:9 | { ... } | variables.rs:231:5:242:5 | match either { ... } | |
| variables.rs:235:13:235:21 | print_i64 | variables.rs:235:23:235:25 | a11 | |
@@ -522,10 +522,10 @@ edges
| variables.rs:235:23:235:25 | a11 | variables.rs:235:13:235:26 | print_i64(...) | |
| variables.rs:236:13:239:13 | if ... {...} | variables.rs:234:12:240:9 | { ... } | |
| variables.rs:236:16:237:15 | let ... = e | variables.rs:237:15:237:15 | e | |
| variables.rs:236:20:236:36 | TupleStructPat | variables.rs:236:13:239:13 | if ... {...} | no-match |
| variables.rs:236:20:236:36 | TupleStructPat | variables.rs:236:33:236:35 | a12 | match |
| variables.rs:236:20:236:36 | ...::Left(...) | variables.rs:236:13:239:13 | if ... {...} | no-match |
| variables.rs:236:20:236:36 | ...::Left(...) | variables.rs:236:33:236:35 | a12 | match |
| variables.rs:236:33:236:35 | a12 | variables.rs:238:17:238:32 | ExprStmt | match |
| variables.rs:237:15:237:15 | e | variables.rs:236:20:236:36 | TupleStructPat | |
| variables.rs:237:15:237:15 | e | variables.rs:236:20:236:36 | ...::Left(...) | |
| variables.rs:237:17:239:13 | { ... } | variables.rs:236:13:239:13 | if ... {...} | |
| variables.rs:238:17:238:25 | print_i64 | variables.rs:238:28:238:30 | a12 | |
| variables.rs:238:17:238:31 | print_i64(...) | variables.rs:237:17:239:13 | { ... } | |
@@ -543,20 +543,20 @@ edges
| variables.rs:253:14:253:35 | ...::Second(...) | variables.rs:253:9:253:10 | fv | |
| variables.rs:253:33:253:34 | 62 | variables.rs:253:14:253:35 | ...::Second(...) | |
| variables.rs:254:5:257:5 | match fv { ... } | variables.rs:252:21:258:1 | { ... } | |
| variables.rs:254:11:254:12 | fv | variables.rs:255:9:255:30 | TupleStructPat | |
| variables.rs:255:9:255:30 | TupleStructPat | variables.rs:255:27:255:29 | a13 | match |
| variables.rs:255:9:255:30 | TupleStructPat | variables.rs:255:35:255:57 | TupleStructPat | no-match |
| variables.rs:254:11:254:12 | fv | variables.rs:255:9:255:30 | ...::First(...) | |
| variables.rs:255:9:255:30 | ...::First(...) | variables.rs:255:27:255:29 | a13 | match |
| variables.rs:255:9:255:30 | ...::First(...) | variables.rs:255:35:255:57 | ...::Second(...) | no-match |
| variables.rs:255:9:255:109 | [match(true)] ... \| ... \| ... | variables.rs:256:16:256:24 | print_i64 | match |
| variables.rs:255:27:255:29 | a13 | variables.rs:255:9:255:109 | [match(true)] ... \| ... \| ... | match |
| variables.rs:255:35:255:57 | TupleStructPat | variables.rs:255:54:255:56 | a13 | match |
| variables.rs:255:35:255:57 | TupleStructPat | variables.rs:255:61:255:82 | TupleStructPat | no-match |
| variables.rs:255:35:255:82 | [match(false)] ... \| ... | variables.rs:255:87:255:109 | TupleStructPat | no-match |
| variables.rs:255:35:255:57 | ...::Second(...) | variables.rs:255:54:255:56 | a13 | match |
| variables.rs:255:35:255:57 | ...::Second(...) | variables.rs:255:61:255:82 | ...::Third(...) | no-match |
| variables.rs:255:35:255:82 | [match(false)] ... \| ... | variables.rs:255:87:255:109 | ...::Fourth(...) | no-match |
| variables.rs:255:35:255:82 | [match(true)] ... \| ... | variables.rs:255:9:255:109 | [match(true)] ... \| ... \| ... | match |
| variables.rs:255:54:255:56 | a13 | variables.rs:255:35:255:82 | [match(true)] ... \| ... | match |
| variables.rs:255:61:255:82 | TupleStructPat | variables.rs:255:35:255:82 | [match(false)] ... \| ... | no-match |
| variables.rs:255:61:255:82 | TupleStructPat | variables.rs:255:79:255:81 | a13 | match |
| variables.rs:255:61:255:82 | ...::Third(...) | variables.rs:255:35:255:82 | [match(false)] ... \| ... | no-match |
| variables.rs:255:61:255:82 | ...::Third(...) | variables.rs:255:79:255:81 | a13 | match |
| variables.rs:255:79:255:81 | a13 | variables.rs:255:35:255:82 | [match(true)] ... \| ... | match |
| variables.rs:255:87:255:109 | TupleStructPat | variables.rs:255:106:255:108 | a13 | match |
| variables.rs:255:87:255:109 | ...::Fourth(...) | variables.rs:255:106:255:108 | a13 | match |
| variables.rs:255:106:255:108 | a13 | variables.rs:255:9:255:109 | [match(true)] ... \| ... \| ... | match |
| variables.rs:256:16:256:24 | print_i64 | variables.rs:256:26:256:28 | a13 | |
| variables.rs:256:16:256:29 | print_i64(...) | variables.rs:254:5:257:5 | match fv { ... } | |
@@ -582,14 +582,14 @@ edges
| variables.rs:268:5:268:17 | print_str(...) | variables.rs:265:28:269:1 | { ... } | |
| variables.rs:268:5:268:18 | ExprStmt | variables.rs:268:5:268:13 | print_str | |
| variables.rs:268:15:268:16 | c1 | variables.rs:268:5:268:17 | print_str(...) | |
| variables.rs:271:1:275:1 | enter fn param_pattern2 | variables.rs:272:6:272:21 | TupleStructPat | |
| variables.rs:271:1:275:1 | enter fn param_pattern2 | variables.rs:272:6:272:21 | ...::Left(...) | |
| variables.rs:271:1:275:1 | exit fn param_pattern2 (normal) | variables.rs:271:1:275:1 | exit fn param_pattern2 | |
| variables.rs:272:5:272:50 | ...: Either | variables.rs:274:5:274:18 | ExprStmt | |
| variables.rs:272:6:272:21 | TupleStructPat | variables.rs:272:19:272:20 | a9 | match |
| variables.rs:272:6:272:21 | TupleStructPat | variables.rs:272:25:272:41 | TupleStructPat | no-match |
| variables.rs:272:6:272:21 | ...::Left(...) | variables.rs:272:19:272:20 | a9 | match |
| variables.rs:272:6:272:21 | ...::Left(...) | variables.rs:272:25:272:41 | ...::Right(...) | no-match |
| variables.rs:272:6:272:41 | [match(true)] ... \| ... | variables.rs:272:5:272:50 | ...: Either | match |
| variables.rs:272:19:272:20 | a9 | variables.rs:272:6:272:41 | [match(true)] ... \| ... | match |
| variables.rs:272:25:272:41 | TupleStructPat | variables.rs:272:39:272:40 | a9 | match |
| variables.rs:272:25:272:41 | ...::Right(...) | variables.rs:272:39:272:40 | a9 | match |
| variables.rs:272:39:272:40 | a9 | variables.rs:272:6:272:41 | [match(true)] ... \| ... | match |
| variables.rs:273:9:275:1 | { ... } | variables.rs:271:1:275:1 | exit fn param_pattern2 (normal) | |
| variables.rs:274:5:274:13 | print_i64 | variables.rs:274:15:274:16 | a9 | |

View File

@@ -17,6 +17,9 @@ private import codeql.util.Location
* - endLine: End line number (starting with 1, inclusive) to restrict alerts to.
*
* If startLine and endLine are both 0, accept alerts anywhere in the file.
*
* A query should either completely ignore this predicate (i.e., perform no filtering whatsoever),
* or only return alerts that meet the filtering criteria as specified above.
*/
extensible predicate restrictAlertsTo(string filePath, int startLine, int endLine);