mirror of
https://github.com/github/codeql.git
synced 2026-04-22 07:15:15 +02:00
Merge branch 'main' into redsun82/swift-fix-wmo
This commit is contained in:
@@ -8,6 +8,7 @@ private import DataFlowImplCommon
|
||||
private import DataFlowImplSpecific::Private
|
||||
private import DataFlowImplSpecific::Public
|
||||
private import DataFlowImplCommonPublic
|
||||
private import codeql.util.Unit
|
||||
import DataFlow
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -3,7 +3,7 @@ private import DataFlowUtil
|
||||
private import DataFlowDispatch
|
||||
private import FlowVar
|
||||
private import DataFlowImplConsistency
|
||||
import codeql.util.Unit
|
||||
private import codeql.util.Unit
|
||||
|
||||
/** Gets the callable in which this node occurs. */
|
||||
DataFlowCallable nodeGetEnclosingCallable(Node n) { result = n.getEnclosingCallable() }
|
||||
|
||||
@@ -8,6 +8,7 @@ private import DataFlowImplCommon
|
||||
private import DataFlowImplSpecific::Private
|
||||
private import DataFlowImplSpecific::Public
|
||||
private import DataFlowImplCommonPublic
|
||||
private import codeql.util.Unit
|
||||
import DataFlow
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -6,7 +6,7 @@ private import DataFlowImplConsistency
|
||||
private import semmle.code.cpp.ir.internal.IRCppLanguage
|
||||
private import SsaInternals as Ssa
|
||||
private import DataFlowImplCommon as DataFlowImplCommon
|
||||
import codeql.util.Unit
|
||||
private import codeql.util.Unit
|
||||
|
||||
cached
|
||||
private module Cached {
|
||||
|
||||
@@ -8,6 +8,7 @@ private import DataFlowImplCommon
|
||||
private import DataFlowImplSpecific::Private
|
||||
private import DataFlowImplSpecific::Public
|
||||
private import DataFlowImplCommonPublic
|
||||
private import codeql.util.Unit
|
||||
import DataFlow
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -19,7 +19,7 @@ private import semmle.code.csharp.frameworks.system.Collections
|
||||
private import semmle.code.csharp.frameworks.system.threading.Tasks
|
||||
private import semmle.code.cil.Ssa::Ssa as CilSsa
|
||||
private import semmle.code.cil.internal.SsaImpl as CilSsaImpl
|
||||
import codeql.util.Unit
|
||||
private import codeql.util.Unit
|
||||
|
||||
/** Gets the callable in which this node occurs. */
|
||||
DataFlowCallable nodeGetEnclosingCallable(NodeImpl n) { result = n.getEnclosingCallableImpl() }
|
||||
|
||||
@@ -10,6 +10,7 @@ private import FlowSummaryImplSpecific
|
||||
private import DataFlowImplSpecific::Private
|
||||
private import DataFlowImplSpecific::Public
|
||||
private import DataFlowImplCommon
|
||||
private import codeql.util.Unit
|
||||
|
||||
/** Provides classes and predicates for defining flow summaries. */
|
||||
module Public {
|
||||
|
||||
@@ -18,8 +18,6 @@ module TaintTracking = CS::TaintTracking;
|
||||
|
||||
class Type = CS::Type;
|
||||
|
||||
class Unit = DataFlowPrivate::Unit;
|
||||
|
||||
/**
|
||||
* Holds if any of the parameters of `api` are `System.Func<>`.
|
||||
*/
|
||||
|
||||
@@ -28,8 +28,6 @@ Experiment and learn how to write effective and efficient queries for CodeQL dat
|
||||
|
||||
- :doc:`Using flow labels for precise data flow analysis <using-flow-labels-for-precise-data-flow-analysis>`: You can associate flow labels with each value tracked by the flow analysis to determine whether the flow contains potential vulnerabilities.
|
||||
|
||||
- :doc:`Specifying remote flow sources for JavaScript <specifying-additional-remote-flow-sources-for-javascript>`: You can model potential sources of untrusted user input in your code without making changes to the CodeQL standard library by specifying extra remote flow sources in an external file.
|
||||
|
||||
- :doc:`Using type tracking for API modeling <using-type-tracking-for-api-modeling>`: You can track data through an API by creating a model using the CodeQL type-tracking library for JavaScript.
|
||||
|
||||
- :doc:`Abstract syntax tree classes for working with JavaScript and TypeScript programs <abstract-syntax-tree-classes-for-working-with-javascript-and-typescript-programs>`: CodeQL has a large selection of classes for representing the abstract syntax tree of JavaScript and TypeScript programs.
|
||||
|
||||
@@ -0,0 +1,479 @@
|
||||
.. _customizing-library-models-for-javascript:
|
||||
|
||||
:orphan:
|
||||
:nosearch:
|
||||
|
||||
Customizing Library Models for JavaScript
|
||||
=========================================
|
||||
|
||||
.. include:: ../reusables/beta-note-customizing-library-models.rst
|
||||
|
||||
JavaScript analysis can be customized by adding library models in data extension files.
|
||||
|
||||
A data extension for JavaScript is a YAML file of the form:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: <name of extensible predicate>
|
||||
data:
|
||||
- <tuple1>
|
||||
- <tuple2>
|
||||
- ...
|
||||
|
||||
The CodeQL library for JavaScript exposes the following extensible predicates:
|
||||
|
||||
- **sourceModel**\(type, path, kind)
|
||||
- **sinkModel**\(type, path, kind)
|
||||
- **typeModel**\(type1, type2, path)
|
||||
- **summaryModel**\(type, path, input, output, kind)
|
||||
|
||||
See the [CLI documentation for how to load and use data extensions in a CodeQL evaluation run](https://docs.google.com/document/d/14IYCHX8wWuU-HTvJ2gPSdXQKHKYbWCHQKOgn8oLaa80/edit#heading=h.m0v53lpi6w2n) (internal access required).
|
||||
|
||||
We'll explain how to use these using a few examples, and provide some reference material at the end of this article.
|
||||
|
||||
Example: Taint sink in the 'execa' package
|
||||
------------------------------------------
|
||||
|
||||
In this example, we'll show how to add the following argument, passed to **execa**, as a command-line injection sink:
|
||||
|
||||
.. code-block:: js
|
||||
|
||||
import { shell } from "execa";
|
||||
shell(cmd); // <-- add 'cmd' as a taint sink
|
||||
|
||||
Note that this sink is already recognized by the CodeQL JS analysis, but for this example, you could use the following data extension:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: sinkModel
|
||||
data:
|
||||
- ["execa", "Member[shell].Argument[0]", "command-line-injection"]
|
||||
|
||||
|
||||
- Since we're adding a new sink, we add a tuple to the **sinkModel** extensible predicate.
|
||||
- The first column, **"execa"**, identifies a set of values from which to begin the search for the sink.
|
||||
The string **"execa"** means we start at the places where the codebase imports the NPM package **execa**.
|
||||
- The second column is an access path that is evaluated from left to right, starting at the values that were identified by the first column.
|
||||
|
||||
- **Member[shell]** selects accesses to the **shell** member of the **execa** package.
|
||||
- **Argument[0]** selects the first argument to calls to that member.
|
||||
|
||||
- **command-line-injection** indicates that this is considered a sink for the command injection query.
|
||||
|
||||
Example: Taint sources from window 'message' events
|
||||
---------------------------------------------------
|
||||
|
||||
In this example, we'll show how the **event.data** expression below could be marked as a remote flow source:
|
||||
|
||||
.. code-block:: js
|
||||
|
||||
window.addEventListener("message", function (event) {
|
||||
let data = event.data; // <-- add 'event.data' as a taint source
|
||||
});
|
||||
|
||||
Note that this source is already known by the CodeQL JS analysis, but for this example, you could use the following data extension:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: sourceModel
|
||||
data:
|
||||
- [
|
||||
"global",
|
||||
"Member[addEventListener].Argument[1].Parameter[0].Member[data]",
|
||||
"remote",
|
||||
]
|
||||
|
||||
|
||||
- Since we're adding a new taint source, we add a tuple to the **sourceModel** extensible predicate.
|
||||
- The first column, **"global"**, begins the search at references to the global object (also known as **window** in browser contexts). This is a special JavaScript object that contains all global variables and methods.
|
||||
- **Member[addEventListener]** selects accesses to the **addEventListener** member.
|
||||
- **Argument[1]** selects the second argument of calls to that member (the argument containing the callback).
|
||||
- **Parameter[0]** selects the first parameter of the callback (the parameter named **event**).
|
||||
- **Member[data]** selects accesses to the **data** property of the event object.
|
||||
- Finally, the kind **remote** indicates that this is considered a source of remote flow.
|
||||
|
||||
In the next section, we'll show how to restrict the model to recognize events of a specific type.
|
||||
|
||||
Continued example: Restricting the event type
|
||||
---------------------------------------------
|
||||
|
||||
The model above treats all events as sources of remote flow, not just **message** events.
|
||||
For example, it would also pick up this irrelevant source:
|
||||
|
||||
.. code-block:: js
|
||||
|
||||
window.addEventListener("onclick", function (event) {
|
||||
let data = event.data; // <-- 'event.data' became a spurious taint source
|
||||
});
|
||||
|
||||
|
||||
We can refine the model by adding the **WithStringArgument** component to restrict the set of calls being considered:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: sourceModel
|
||||
data:
|
||||
- [
|
||||
"global",
|
||||
"Member[addEventListener].WithStringArgument[0=message].Argument[1].Parameter[0].Member[data]",
|
||||
"remote",
|
||||
]
|
||||
|
||||
The **WithStringArgument[0=message]** component here selects the subset of calls to **addEventListener** where the first argument is a string literal with the value **"message"**.
|
||||
|
||||
Example: Using types to add MySQL injection sinks
|
||||
-------------------------------------------------
|
||||
|
||||
In this example, we'll show how to add the following SQL injection sink:
|
||||
|
||||
.. code-block:: ts
|
||||
|
||||
import { Connection } from "mysql";
|
||||
|
||||
function submit(connection: Connection, q: string) {
|
||||
connection.query(q); // <-- add 'q' as a SQL injection sink
|
||||
}
|
||||
|
||||
We can recognize this using the following extension:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: sinkModel
|
||||
data:
|
||||
- ["mysql.Connection", "Member[query].Argument[0]", "sql-injection"]
|
||||
|
||||
|
||||
- The first column, **"mysql.Connection"**, begins the search at any expression whose value is known to be an instance of
|
||||
the **Connection** type from the **mysql** package. This will select the **connection** parameter above because of its type annotation.
|
||||
- **Member[query]** selects the **query** member from the connection object.
|
||||
- **Argument[0]** selects the first argument of a call to that member.
|
||||
- **sql-injection** indicates that this is considered a sink for the SQL injection query.
|
||||
|
||||
This works in this example because the **connection** parameter has a type annotation that matches what the model is looking for.
|
||||
|
||||
Note that there is a significant difference between the following two rows:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
data:
|
||||
- ["mysql.Connection", "", ...]
|
||||
- ["mysql", "Member[Connection]", ...]
|
||||
|
||||
The first row matches instances of **mysql.Connection**, which are objects that encapsulate a MySQL connection.
|
||||
The second row would match something like **require('mysql').Connection**, which is not itself a connection object.
|
||||
|
||||
In the next section, we'll show how to generalize the model to handle the absence of type annotations.
|
||||
|
||||
Continued example: Dealing with untyped code
|
||||
--------------------------------------------
|
||||
|
||||
Suppose we want the model from above to detect the sink in this snippet:
|
||||
|
||||
.. code-block:: js
|
||||
|
||||
import { getConnection } from "@example/db";
|
||||
let connection = getConnection();
|
||||
connection.query(q); // <-- add 'q' as a SQL injection sink
|
||||
|
||||
There is no type annotation on **connection**, and there is no indication of what **getConnection()** returns.
|
||||
Using a **typeModel** tuple we can tell our model that this function returns an instance of **mysql.Connection**:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: typeModel
|
||||
data:
|
||||
- ["mysql.Connection", "@example/db", "Member[getConnection].ReturnValue"]
|
||||
|
||||
|
||||
- Since we're providing type information, we add a tuple to the **typeModel** extensible predicate.
|
||||
- The first column, **"mysql.Connection"**, names the type that we're adding a new definition for.
|
||||
- The second column, **"@example/db"**, begins the search at imports of the hypothetical NPM package **@example/db**.
|
||||
- **Member[getConnection]** selects references to the **getConnection** member from that package.
|
||||
- **ReturnValue** selects the return value from a call to that member.
|
||||
|
||||
The new model states that the return value of **getConnection()** has type **mysql.Connection**.
|
||||
Combining this with the sink model we added earlier, the sink in the example is detected by the model.
|
||||
|
||||
The mechanism used here is how library models work for both TypeScript and plain JavaScript.
|
||||
A good library model contains **typeModel** tuples to ensure it works even in codebases without type annotations.
|
||||
For example, the **mysql** model that is included with the CodeQL JS analysis includes this type definition (among many others):
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
- ["mysql.Connection", "mysql", "Member[createConnection].ReturnValue"]
|
||||
|
||||
Example: Adding flow through 'decodeURIComponent'
|
||||
-------------------------------------------------
|
||||
|
||||
In this example, we'll show how to add flow through calls to `decodeURIComponent`:
|
||||
|
||||
.. code-block:: js
|
||||
|
||||
let y = decodeURIComponent(x); // add taint flow from 'x' to 'y'
|
||||
|
||||
Note that this flow is already recognized by the CodeQL JS analysis, but for this example, you could use the following data extension:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- [
|
||||
"global",
|
||||
"Member[decodeURIComponent]",
|
||||
"Argument[0]",
|
||||
"ReturnValue",
|
||||
"taint",
|
||||
]
|
||||
|
||||
|
||||
- Since we're adding flow through a function call, we add a tuple to the **summaryModel** extensible predicate.
|
||||
- The first column, **"global"**, begins the search for relevant calls at references to the global object.
|
||||
In JavaScript, global variables are properties of the global object, so this lets us access global variables or functions.
|
||||
- The second column, **Member[decodeURIComponent]**, is a path leading to the function calls we wish to model.
|
||||
In this case, we select references to the **decodeURIComponent** member from the global object, that is,
|
||||
the global variable named **decodeURIComponent**.
|
||||
- The third column, **Argument[0]**, indicates the input of the flow. In this case, the first argument to the function call.
|
||||
- The fourth column, **ReturnValue**, indicates the output of the flow. In this case, the return value of the function call.
|
||||
- The last column, **taint**, indicates the kind of flow to add. The value **taint** means the output is not necessarily equal
|
||||
to the input, but was derived from the input in a taint-preserving way.
|
||||
|
||||
Example: Adding flow through 'underscore.forEach'
|
||||
-------------------------------------------------
|
||||
|
||||
In this example, we'll show how to add flow through calls to **forEach** from the **underscore** package:
|
||||
|
||||
.. code-block:: js
|
||||
|
||||
require('underscore').forEach([x, y], (v) => { ... }); // add value flow from 'x' and 'y' to 'v'
|
||||
|
||||
Note that this flow is already recognized by the CodeQL JS analysis, but for this example, you could use the following data extension:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- [
|
||||
"underscore",
|
||||
"Member[forEach]",
|
||||
"Argument[0].ArrayElement",
|
||||
"Argument[1].Parameter[0]",
|
||||
"value",
|
||||
]
|
||||
|
||||
|
||||
- Since we're adding flow through a function call, we add a tuple to the **summaryModel** extensible predicate.
|
||||
- The first column, **"underscore"**, begins the search for relevant calls at places where the **underscore** package is imported.
|
||||
- The second column, **Member[forEach]**, selects references to the **forEach** member from the **underscore** package.
|
||||
- The third column specifies the input of the flow:
|
||||
|
||||
- **Argument[0]** selects the first argument of **forEach**, which is the array being iterated over.
|
||||
- **ArrayElement** selects the elements of that array (the expressions **x** and **y**).
|
||||
|
||||
- The fourth column specifies the output of the flow:
|
||||
|
||||
- **Argument[1]** selects the second argument of **forEach** (the argument containing the callback function).
|
||||
- **Parameter[0]** selects the first parameter of the callback function (the parameter named **v**).
|
||||
|
||||
- The last column, **value**, indicates the kind of flow to add. The value **value** means the input value is unchanged as
|
||||
it flows to the output.
|
||||
|
||||
Reference material
|
||||
------------------
|
||||
|
||||
The following sections provide reference material for extensible predicates, access paths, types, and kinds.
|
||||
|
||||
Extensible predicates
|
||||
---------------------
|
||||
|
||||
sourceModel(type, path, kind)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Adds a new taint source. Most taint-tracking queries will use the new source.
|
||||
|
||||
- **type**: Name of a type from which to evaluate **path**.
|
||||
- **path**: Access path leading to the source.
|
||||
- **kind**: Kind of source to add. Currently only **remote** is used.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: sourceModel
|
||||
data:
|
||||
- ["global", "Member[user].Member[name]", "remote"]
|
||||
|
||||
sinkModel(type, path, kind)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Adds a new taint sink. Sinks are query-specific and will typically affect one or two queries.
|
||||
|
||||
- **type**: Name of a type from which to evaluate **path**.
|
||||
- **path**: Access path leading to the sink.
|
||||
- **kind**: Kind of sink to add. See the section on sink kinds for a list of supported kinds.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: sinkModel
|
||||
data:
|
||||
- ["global", "Member[eval].Argument[0]", "code-injection"]
|
||||
|
||||
summaryModel(type, path, input, output, kind)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Adds flow through a function call.
|
||||
|
||||
- **type**: Name of a type from which to evaluate **path**.
|
||||
- **path**: Access path leading to a function call.
|
||||
- **input**: Path relative to the function call that leads to input of the flow.
|
||||
- **output**: Path relative to the function call leading to the output of the flow.
|
||||
- **kind**: Kind of summary to add. Can be **taint** for taint-propagating flow, or **value** for value-preserving flow.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- [
|
||||
"global",
|
||||
"Member[decodeURIComponent]",
|
||||
"Argument[0]",
|
||||
"ReturnValue",
|
||||
"taint",
|
||||
]
|
||||
|
||||
typeModel(type1, type2, path)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Adds a new definition of a type.
|
||||
|
||||
- **type1**: Name of the type to define.
|
||||
- **type2**: Name of the type from which to evaluate **path**.
|
||||
- **path**: Access path leading from **type2** to **type1**.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: typeModel
|
||||
data:
|
||||
- [
|
||||
"mysql.Connection",
|
||||
"@example/db",
|
||||
"Member[getConnection].ReturnValue",
|
||||
]
|
||||
|
||||
Types
|
||||
-----
|
||||
|
||||
A type is a string that identifies a set of values.
|
||||
In each of the extensible predicates mentioned in previous section, the first column is always the name of a type.
|
||||
A type can be defined by adding **typeModel** tuples for that type. Additionally, the following built-in types are available:
|
||||
|
||||
- The name of an NPM package matches imports of that package. For example, the type **express** matches the expression **require("express")**. If the package name includes dots, it must be surrounded by single quotes, such as in **'lodash.escape'**.
|
||||
- The type **global** identifies the global object, also known as **window**. In JavaScript, global variables are properties of the global object, so global variables can be identified using this type. (This type also matches imports of the NPM package named **global**, which is a package that happens to export the global object.)
|
||||
- A qualified type name of form **<package>.<type>** identifies expressions of type **<type>** from **<package>**. For example, **mysql.Connection** identifies expression of type **Connection** from the **mysql** package. Note that this only works if type annotations are present in the codebase, or if sufficient **typeModel** tuples have been provided for that type.
|
||||
|
||||
Access paths
|
||||
------------
|
||||
|
||||
The **path**, **input**, and **output** columns consist of a **.**-separated list of components, which is evaluated from left to right, with each step selecting a new set of values derived from the previous set of values.
|
||||
|
||||
The following components are supported:
|
||||
|
||||
- **Argument[**\ `number`\ **]** selects the argument at the given index.
|
||||
- **Argument[this]** selects the receiver of a method call.
|
||||
- **Parameter[**\ `number`\ **]** selects the parameter at the given index.
|
||||
- **Parameter[this]** selects the **this** parameter of a function.
|
||||
- **ReturnValue** selects the return value of a function or call.
|
||||
- **Member[**\ `name`\ **]** selects the property with the given name.
|
||||
- **AnyMember** selects any property regardless of name.
|
||||
- **ArrayElement** selects an element of an array.
|
||||
- **Element** selects an element of an array, iterator, or set object.
|
||||
- **MapValue** selects a value of a map object.
|
||||
- **Awaited** selects the value of a promise.
|
||||
- **Instance** selects instances of a class.
|
||||
|
||||
The following components are called "call site filters". They select a subset of the previously-selected calls, if the call fits certain criteria:
|
||||
|
||||
- **WithArity[**\ `number`\ **]** selects the subset of calls that have the given number of arguments.
|
||||
- **WithStringArgument[**\ `number`\ **=**\ `value`\ **]** selects the subset of calls where the argument at the given index is a string literal with the given value.
|
||||
|
||||
Components related to decorators:
|
||||
|
||||
- **DecoratedClass** selects a class that has the current value as a decorator. For example, **Member[Component].DecoratedClass** selects any class that is decorated with **@Component**.
|
||||
- **DecoratedParameter** selects a parameter that is decorated by the current value.
|
||||
- **DecoratedMember** selects a method, field, or accessor that is decorated by the current value.
|
||||
|
||||
Additional notes about the syntax of operands:
|
||||
|
||||
- Multiple operands may be given to a single component, as a shorthand for the union of the operands. For example, **Member[foo,bar]** matches the union of **Member[foo]** and **Member[bar]**.
|
||||
- Numeric operands to **Argument**, **Parameter**, and **WithArity** may be given as an interval. For example, **Argument[0..2]** matches argument 0, 1, or 2.
|
||||
- **Argument[N-1]** selects the last argument of a call, and **Parameter[N-1]** selects the last parameter of a function, with **N-2** being the second-to-last and so on.
|
||||
|
||||
Kinds
|
||||
-----
|
||||
|
||||
Source kinds
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- **remote**: A generic source of remote flow. Most taint-tracking queries will use such a source. Currently this is the only supported source kind.
|
||||
|
||||
Sink kinds
|
||||
~~~~~~~~~~
|
||||
|
||||
Unlike sources, sinks tend to be highly query-specific, rarely affecting more than one or two queries. Not every query supports customizable sinks. If the following sinks are not suitable for your use case, you should add a new query.
|
||||
|
||||
- **code-injection**: A sink that can be used to inject code, such as in calls to **eval**.
|
||||
- **command-line-injection**: A sink that can be used to inject shell commands, such as in calls to **child_process.spawn**.
|
||||
- **path-injection**: A sink that can be used for path injection in a file system access, such as in calls to **fs.readFile**.
|
||||
- **sql-injection**: A sink that can be used for SQL injection, such as in a MySQL **query** call.
|
||||
- **nosql-injection**: A sink that can be used for NoSQL injection, such as in a MongoDB **findOne** call.
|
||||
- **html-injection**: A sink that can be used for HTML injection, such as in a jQuery **$()** call.
|
||||
- **request-forgery**: A sink that controls the URL of a request, such as in a **fetch** call.
|
||||
- **url-redirection**: A sink that can be used to redirect the user to a malicious URL.
|
||||
- **unsafe-deserialization**: A deserialization sink that can lead to code execution or other unsafe behaviour, such as an unsafe YAML parser.
|
||||
|
||||
Summary kinds
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
- **taint**: A summary that propagates taint. This means the output is not necessarily equal to the input, but it was derived from the input in an unrestrictive way. An attacker who controls the input will have significant control over the output as well.
|
||||
- **value**: A summary that preserves the value of the input or creates a copy of the input such that all of its object properties are preserved.
|
||||
@@ -3,13 +3,14 @@
|
||||
Specifying additional remote flow sources for JavaScript
|
||||
========================================================
|
||||
|
||||
You can model potential sources of untrusted user input in your code without making changes to the CodeQL standard library by specifying extra remote flow sources in an external file.
|
||||
|
||||
.. pull-quote::
|
||||
|
||||
Note
|
||||
Deprecation Notice
|
||||
|
||||
Specifying remote flow sources in external files is currently in beta and subject to change.
|
||||
Specifying remote flow sources with the JSON format described here is soon to be deprecated
|
||||
and will be removed in the future.
|
||||
|
||||
You can model potential sources of untrusted user input in your code without making changes to the CodeQL standard library by specifying extra remote flow sources in an external file.
|
||||
|
||||
As mentioned in the :ref:`Data flow cheat sheet for JavaScript <data-flow-cheat-sheet-for-javascript--untrusted-data>`, the CodeQL libraries for JavaScript
|
||||
provide a class `RemoteFlowSource <https://codeql.github.com/codeql-standard-libraries/javascript/semmle/javascript/security/dataflow/RemoteFlowSources.qll/type.RemoteFlowSources$Cached$RemoteFlowSource.html>`__ to represent sources of untrusted user input, sometimes also referred to as remote flow
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
Library customization using data extensions is currently in beta and subject to change.
|
||||
|
||||
Breaking changes to this format may occur while in beta.
|
||||
Breaking changes to this format may occur while in beta.
|
||||
|
||||
@@ -8,6 +8,7 @@ private import DataFlowImplCommon
|
||||
private import DataFlowImplSpecific::Private
|
||||
private import DataFlowImplSpecific::Public
|
||||
private import DataFlowImplCommonPublic
|
||||
private import codeql.util.Unit
|
||||
import DataFlow
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -3,7 +3,7 @@ private import DataFlowUtil
|
||||
private import DataFlowImplCommon
|
||||
private import ContainerFlow
|
||||
private import FlowSummaryImpl as FlowSummaryImpl
|
||||
import codeql.util.Unit
|
||||
private import codeql.util.Unit
|
||||
import DataFlowNodes::Private
|
||||
|
||||
private newtype TReturnKind =
|
||||
|
||||
@@ -10,6 +10,7 @@ private import FlowSummaryImplSpecific
|
||||
private import DataFlowImplSpecific::Private
|
||||
private import DataFlowImplSpecific::Public
|
||||
private import DataFlowImplCommon
|
||||
private import codeql.util.Unit
|
||||
|
||||
/** Provides classes and predicates for defining flow summaries. */
|
||||
module Public {
|
||||
|
||||
@@ -8,6 +8,7 @@ private import DataFlowImplCommon
|
||||
private import DataFlowImplSpecific::Private
|
||||
private import DataFlowImplSpecific::Public
|
||||
private import DataFlowImplCommonPublic
|
||||
private import codeql.util.Unit
|
||||
import DataFlow
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -14,7 +14,6 @@ private import FlowSummaryImpl as FlowSummaryImpl
|
||||
private import TaintTrackingUtil as TaintTrackingUtil
|
||||
private import DataFlowNodes
|
||||
import DataFlowNodes::Public
|
||||
import semmle.code.Unit
|
||||
|
||||
/** Holds if `n` is an access to an unqualified `this` at `cfgnode`. */
|
||||
private predicate thisAccess(Node n, ControlFlowNode cfgnode) {
|
||||
|
||||
@@ -10,6 +10,7 @@ private import FlowSummaryImplSpecific
|
||||
private import DataFlowImplSpecific::Private
|
||||
private import DataFlowImplSpecific::Public
|
||||
private import DataFlowImplCommon
|
||||
private import codeql.util.Unit
|
||||
|
||||
/** Provides classes and predicates for defining flow summaries. */
|
||||
module Public {
|
||||
|
||||
@@ -2,7 +2,7 @@ Customizing the JavaScript analysis
|
||||
===================================
|
||||
|
||||
This document describes the main extension points offered by the JavaScript analysis for customizing
|
||||
analysis behavior without editing the queries or libraries themselves.
|
||||
analysis behavior from CodeQL without editing the queries or libraries themselves.
|
||||
|
||||
Customization mechanisms
|
||||
------------------------
|
||||
|
||||
@@ -63,10 +63,9 @@
|
||||
* the type is not intended to match a static type.
|
||||
*/
|
||||
|
||||
private import codeql.util.Unit
|
||||
private import ApiGraphModelsSpecific as Specific
|
||||
|
||||
private class Unit = Specific::Unit;
|
||||
|
||||
private module API = Specific::API;
|
||||
|
||||
private module DataFlow = Specific::DataFlow;
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
private import javascript as JS
|
||||
private import ApiGraphModels
|
||||
|
||||
class Unit = JS::Unit;
|
||||
|
||||
// Re-export libraries needed by ApiGraphModels.qll
|
||||
module API = JS::API;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ private import DataFlowImplCommon
|
||||
private import DataFlowImplSpecific::Private
|
||||
private import DataFlowImplSpecific::Public
|
||||
private import DataFlowImplCommonPublic
|
||||
private import codeql.util.Unit
|
||||
import DataFlow
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -7,9 +7,6 @@ private import python as Python
|
||||
|
||||
module Private {
|
||||
import DataFlowPrivate
|
||||
|
||||
// import DataFlowDispatch
|
||||
class Unit = Python::Unit;
|
||||
}
|
||||
|
||||
module Public {
|
||||
|
||||
@@ -10,6 +10,7 @@ private import FlowSummaryImplSpecific
|
||||
private import DataFlowImplSpecific::Private
|
||||
private import DataFlowImplSpecific::Public
|
||||
private import DataFlowImplCommon
|
||||
private import codeql.util.Unit
|
||||
|
||||
/** Provides classes and predicates for defining flow summaries. */
|
||||
module Public {
|
||||
|
||||
@@ -63,10 +63,9 @@
|
||||
* the type is not intended to match a static type.
|
||||
*/
|
||||
|
||||
private import codeql.util.Unit
|
||||
private import ApiGraphModelsSpecific as Specific
|
||||
|
||||
private class Unit = Specific::Unit;
|
||||
|
||||
private module API = Specific::API;
|
||||
|
||||
private module DataFlow = Specific::DataFlow;
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
private import python as PY
|
||||
private import ApiGraphModels
|
||||
import semmle.python.ApiGraphs::API as API
|
||||
|
||||
class Unit = PY::Unit;
|
||||
|
||||
// Re-export libraries needed by ApiGraphModels.qll
|
||||
import semmle.python.dataflow.new.internal.AccessPathSyntax as AccessPathSyntax
|
||||
import semmle.python.dataflow.new.DataFlow::DataFlow as DataFlow
|
||||
|
||||
@@ -38,14 +38,14 @@ tools: $(BIN_FILES)
|
||||
rm -rf tools/bin
|
||||
mkdir tools/bin
|
||||
cp -r target/release/ruby-autobuilder$(EXE) tools/bin/autobuilder$(EXE)
|
||||
cp -r target/release/ruby-extractor$(EXE) tools/bin/extractor$(EXE)
|
||||
cp -r target/release/ruby-extractor$(EXE) tools/bin/extractor$(EXE)
|
||||
|
||||
target/release/%$(EXE):
|
||||
cargo build --release --bin $(basename $(notdir $@))
|
||||
cd extractor && cargo build --release
|
||||
|
||||
dbscheme:
|
||||
cargo build --bin ruby-generator
|
||||
cargo run -p ruby-generator -- --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
|
||||
cd extractor && cargo build --release
|
||||
extractor/target/release/generator --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
|
||||
codeql query format -i ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
|
||||
|
||||
.PHONY: extractor
|
||||
@@ -63,8 +63,8 @@ extractor: $(FILES) $(BIN_FILES)
|
||||
cp tools/autobuild.cmd extractor-pack/tools/autobuild.cmd
|
||||
cp ql/lib/ruby.dbscheme.stats extractor-pack/ruby.dbscheme.stats
|
||||
cp ql/lib/ruby.dbscheme extractor-pack/ruby.dbscheme
|
||||
cp target/release/ruby-extractor$(EXE) extractor-pack/tools/$(CODEQL_PLATFORM)/extractor$(EXE)
|
||||
cp target/release/ruby-autobuilder$(EXE) extractor-pack/tools/$(CODEQL_PLATFORM)/autobuilder$(EXE)
|
||||
cp extractor/target/release/extractor$(EXE) extractor-pack/tools/$(CODEQL_PLATFORM)/extractor$(EXE)
|
||||
cp extractor/target/release/autobuilder$(EXE) extractor-pack/tools/$(CODEQL_PLATFORM)/autobuilder$(EXE)
|
||||
|
||||
test: extractor dbscheme
|
||||
codeql test run --check-databases --check-unused-labels --check-repeated-labels --check-redefined-labels --check-use-before-definition --search-path extractor-pack --consistency-queries ql/consistency-queries ql/test
|
||||
|
||||
@@ -2,10 +2,8 @@
|
||||
* Provides classes representing various flow steps for taint tracking.
|
||||
*/
|
||||
|
||||
private import codeql.util.Unit
|
||||
private import codeql.ruby.DataFlow
|
||||
private import internal.DataFlowPrivate as DFPrivate
|
||||
|
||||
private class Unit = DFPrivate::Unit;
|
||||
|
||||
/**
|
||||
* A module importing the frameworks that implement additional flow steps,
|
||||
|
||||
@@ -8,6 +8,7 @@ private import DataFlowImplCommon
|
||||
private import DataFlowImplSpecific::Private
|
||||
private import DataFlowImplSpecific::Public
|
||||
private import DataFlowImplCommonPublic
|
||||
private import codeql.util.Unit
|
||||
import DataFlow
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
private import codeql.util.Boolean
|
||||
private import codeql.util.Unit
|
||||
private import codeql.ruby.AST
|
||||
private import codeql.ruby.ast.internal.Synthesis
|
||||
private import codeql.ruby.CFG
|
||||
@@ -9,7 +10,6 @@ private import SsaImpl as SsaImpl
|
||||
private import FlowSummaryImpl as FlowSummaryImpl
|
||||
private import FlowSummaryImplSpecific as FlowSummaryImplSpecific
|
||||
private import codeql.ruby.frameworks.data.ModelsAsData
|
||||
import codeql.util.Unit
|
||||
|
||||
/** Gets the callable in which this node occurs. */
|
||||
DataFlowCallable nodeGetEnclosingCallable(NodeImpl n) { result = n.getEnclosingCallable() }
|
||||
|
||||
@@ -10,6 +10,7 @@ private import FlowSummaryImplSpecific
|
||||
private import DataFlowImplSpecific::Private
|
||||
private import DataFlowImplSpecific::Public
|
||||
private import DataFlowImplCommon
|
||||
private import codeql.util.Unit
|
||||
|
||||
/** Provides classes and predicates for defining flow summaries. */
|
||||
module Public {
|
||||
|
||||
@@ -63,10 +63,9 @@
|
||||
* the type is not intended to match a static type.
|
||||
*/
|
||||
|
||||
private import codeql.util.Unit
|
||||
private import ApiGraphModelsSpecific as Specific
|
||||
|
||||
private class Unit = Specific::Unit;
|
||||
|
||||
private module API = Specific::API;
|
||||
|
||||
private module DataFlow = Specific::DataFlow;
|
||||
|
||||
@@ -20,11 +20,7 @@
|
||||
*/
|
||||
|
||||
private import codeql.ruby.AST
|
||||
private import codeql.ruby.dataflow.internal.DataFlowPrivate as DataFlowPrivate
|
||||
private import ApiGraphModels
|
||||
|
||||
class Unit = DataFlowPrivate::Unit;
|
||||
|
||||
// Re-export libraries needed by ApiGraphModels.qll
|
||||
import codeql.ruby.ApiGraphs
|
||||
import codeql.ruby.dataflow.internal.AccessPathSyntax as AccessPathSyntax
|
||||
|
||||
@@ -232,7 +232,6 @@ ql/lib/codeql/swift/elements/pattern/IsPatternConstructor.qll 209ad40227f49dfe1b
|
||||
ql/lib/codeql/swift/elements/pattern/NamedPatternConstructor.qll 437ccf0a28c204a83861babc91e0e422846630f001554a3d7764b323c8632a26 91c52727ccf6b035cc1f0c2ca1eb91482ef28fa874bca382fb34f9226c31c84e
|
||||
ql/lib/codeql/swift/elements/pattern/OptionalSomePatternConstructor.qll bc33a81415edfa4294ad9dfb57f5aa929ea4d7f21a013f145949352009a93975 9fb2afa86dc9cedd28af9f27543ea8babf431a4ba48e9941bcd484b9aa0aeab5
|
||||
ql/lib/codeql/swift/elements/pattern/ParenPatternConstructor.qll 7229439aac7010dbb82f2aaa48aedf47b189e21cc70cb926072e00faa8358369 341cfacd838185178e95a2a7bb29f198e46954098f6d13890351a82943969809
|
||||
ql/lib/codeql/swift/elements/pattern/Pattern.qll a5cee4c72446f884107acc248a10b098871dc027513452c569294aaeecbc5890 cbecbc4b2d9bea7b571b9d184a0bb8cf472f66106e96d4f70e0e98d627f269a5
|
||||
ql/lib/codeql/swift/elements/pattern/TuplePatternConstructor.qll 208fe1f6af1eb569ea4cd5f76e8fbe4dfab9a6264f6c12b762f074a237934bdc 174c55ad1bf3058059ed6c3c3502d6099cda95fbfce925cfd261705accbddbcd
|
||||
ql/lib/codeql/swift/elements/pattern/TypedPatternConstructor.qll 1befdd0455e94d4daa0332b644b74eae43f98bab6aab7491a37176a431c36c34 e574ecf38aac7d9381133bfb894da8cb96aec1c933093f4f7cc951dba8152570
|
||||
ql/lib/codeql/swift/elements/stmt/BraceStmtConstructor.qll eb2b4817d84da4063eaa0b95fe22131cc980c761dcf41f1336566e95bc28aae4 c8e5f7fecd01a7724d8f58c2cd8c845264be91252281f37e3eb20f4a6f421c72
|
||||
|
||||
@@ -118,6 +118,16 @@ class ExprCfgNode extends CfgNode {
|
||||
Expr getExpr() { result = e }
|
||||
}
|
||||
|
||||
/** A control-flow node that wraps a pattern. */
|
||||
class PatternCfgNode extends CfgNode {
|
||||
Pattern p;
|
||||
|
||||
PatternCfgNode() { p = this.getNode().asAstNode() }
|
||||
|
||||
/** Gets the underlying pattern. */
|
||||
Pattern getPattern() { result = p }
|
||||
}
|
||||
|
||||
/** A control-flow node that wraps a property getter. */
|
||||
class PropertyGetterCfgNode extends CfgNode {
|
||||
override PropertyGetterElement n;
|
||||
|
||||
@@ -185,7 +185,7 @@ private predicate switchMatching(SwitchStmt switch, CaseStmt c, AstNode ast) {
|
||||
(
|
||||
c.getALabel() = ast
|
||||
or
|
||||
isSubPattern+(c.getALabel().getPattern(), ast)
|
||||
ast.(Pattern).getImmediateEnclosingPattern+() = c.getALabel().getPattern()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -216,27 +216,10 @@ predicate catchMatchingPattern(DoCatchStmt s, CaseStmt c, Pattern pattern) {
|
||||
exists(CaseLabelItem cli | catchMatching(s, c, cli) |
|
||||
cli.getPattern() = pattern
|
||||
or
|
||||
isSubPattern+(cli.getPattern(), pattern)
|
||||
pattern.getImmediateEnclosingPattern+() = cli.getPattern()
|
||||
)
|
||||
}
|
||||
|
||||
/** Holds if `sub` is a subpattern of `p`. */
|
||||
private predicate isSubPattern(Pattern p, Pattern sub) {
|
||||
sub = p.(BindingPattern).getSubPattern().getFullyUnresolved()
|
||||
or
|
||||
sub = p.(EnumElementPattern).getSubPattern().getFullyUnresolved()
|
||||
or
|
||||
sub = p.(IsPattern).getSubPattern().getFullyUnresolved()
|
||||
or
|
||||
sub = p.(OptionalSomePattern).getFullyUnresolved()
|
||||
or
|
||||
sub = p.(ParenPattern).getResolveStep()
|
||||
or
|
||||
sub = p.(TuplePattern).getAnElement().getFullyUnresolved()
|
||||
or
|
||||
sub = p.(TypedPattern).getSubPattern().getFullyUnresolved()
|
||||
}
|
||||
|
||||
/** Gets the value of `e` if it is a constant value, disregarding conversions. */
|
||||
private string getExprValue(Expr e) {
|
||||
result = e.(IntegerLiteralExpr).getStringValue()
|
||||
@@ -260,8 +243,6 @@ private string getPatternValue(Pattern p) {
|
||||
private predicate isIrrefutableMatch(Pattern p) {
|
||||
(p instanceof NamedPattern or p instanceof AnyPattern)
|
||||
or
|
||||
isIrrefutableMatch(p.(BindingPattern).getSubPattern().getFullyUnresolved())
|
||||
or
|
||||
isIrrefutableMatch(p.(TypedPattern).getSubPattern().getFullyUnresolved())
|
||||
or
|
||||
// A pattern hidden underneath a conversion is also an irrefutable pattern.
|
||||
|
||||
@@ -897,21 +897,12 @@ module Patterns {
|
||||
}
|
||||
}
|
||||
|
||||
private class BindingTree extends AstPostOrderTree {
|
||||
private class BindingTree extends AstStandardPostOrderTree {
|
||||
override BindingPattern ast;
|
||||
|
||||
final override predicate propagatesAbnormal(ControlFlowElement n) {
|
||||
n.asAstNode() = ast.getSubPattern().getFullyUnresolved()
|
||||
}
|
||||
|
||||
final override predicate first(ControlFlowElement n) {
|
||||
astFirst(ast.getSubPattern().getFullyUnresolved(), n)
|
||||
}
|
||||
|
||||
override predicate succ(ControlFlowElement pred, ControlFlowElement succ, Completion c) {
|
||||
astLast(ast.getSubPattern().getFullyUnresolved(), pred, c) and
|
||||
c.(MatchingCompletion).isMatch() and
|
||||
succ.asAstNode() = ast
|
||||
final override ControlFlowElement getChildElement(int i) {
|
||||
i = 0 and
|
||||
result.asAstNode() = ast.getResolveStep()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,9 +38,9 @@ module Ssa {
|
||||
// if let x5 = optional { ... }
|
||||
// guard let x6 = optional else { ... }
|
||||
// ```
|
||||
exists(Pattern pattern |
|
||||
exists(NamedPattern pattern |
|
||||
bb.getNode(i).getNode().asAstNode() = pattern and
|
||||
v.getParentPattern() = pattern and
|
||||
v = pattern.getVarDecl() and
|
||||
certain = true
|
||||
)
|
||||
or
|
||||
@@ -153,14 +153,10 @@ module Ssa {
|
||||
value.getNode().asAstNode() = a.getSource()
|
||||
)
|
||||
or
|
||||
exists(
|
||||
VarDecl var, SsaInput::BasicBlock bb, int blockIndex, PatternBindingDecl pbd, Expr init
|
||||
|
|
||||
this.definesAt(var, bb, blockIndex) and
|
||||
pbd.getAPattern() = bb.getNode(blockIndex).getNode().asAstNode() and
|
||||
init = var.getParentInitializer()
|
||||
|
|
||||
value.getAst() = init
|
||||
exists(SsaInput::BasicBlock bb, int blockIndex, NamedPattern np |
|
||||
this.definesAt(_, bb, blockIndex) and
|
||||
np = bb.getNode(blockIndex).getNode().asAstNode() and
|
||||
value.getNode().asAstNode() = np
|
||||
)
|
||||
or
|
||||
exists(SsaInput::BasicBlock bb, int blockIndex, ConditionElement ce, Expr init |
|
||||
|
||||
@@ -8,6 +8,7 @@ private import DataFlowImplCommon
|
||||
private import DataFlowImplSpecific::Private
|
||||
private import DataFlowImplSpecific::Public
|
||||
private import DataFlowImplCommonPublic
|
||||
private import codeql.util.Unit
|
||||
import DataFlow
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,7 @@ import DataFlowImplSpecific::Public
|
||||
private import DataFlowImpl
|
||||
import DataFlowImplCommonPublic
|
||||
import FlowStateString
|
||||
private import codeql.util.Unit
|
||||
|
||||
/**
|
||||
* A configuration of interprocedural data flow analysis. This defines
|
||||
|
||||
@@ -8,8 +8,6 @@ private import swift as Swift
|
||||
module Private {
|
||||
import DataFlowPrivate
|
||||
import DataFlowDispatch
|
||||
|
||||
class Unit = Swift::Unit;
|
||||
}
|
||||
|
||||
module Public {
|
||||
|
||||
@@ -40,6 +40,14 @@ private class ExprNodeImpl extends ExprNode, NodeImpl {
|
||||
override DataFlowCallable getEnclosingCallable() { result = TDataFlowFunc(n.getScope()) }
|
||||
}
|
||||
|
||||
private class PatternNodeImpl extends PatternNode, NodeImpl {
|
||||
override Location getLocationImpl() { result = pattern.getLocation() }
|
||||
|
||||
override string toStringImpl() { result = pattern.toString() }
|
||||
|
||||
override DataFlowCallable getEnclosingCallable() { result = TDataFlowFunc(n.getScope()) }
|
||||
}
|
||||
|
||||
private class SsaDefinitionNodeImpl extends SsaDefinitionNode, NodeImpl {
|
||||
override Location getLocationImpl() { result = def.getLocation() }
|
||||
|
||||
@@ -63,6 +71,7 @@ private module Cached {
|
||||
cached
|
||||
newtype TNode =
|
||||
TExprNode(CfgNode n, Expr e) { hasExprNode(n, e) } or
|
||||
TPatternNode(CfgNode n, Pattern p) { hasPatternNode(n, p) } or
|
||||
TSsaDefinitionNode(Ssa::Definition def) or
|
||||
TInoutReturnNode(ParamDecl param) { modifiableParam(param) } or
|
||||
TSummaryNode(FlowSummary::SummarizedCallable c, FlowSummaryImpl::Private::SummaryNodeState state) {
|
||||
@@ -175,6 +184,20 @@ private module Cached {
|
||||
nodeFrom.asExpr() = ie.getBranch(_)
|
||||
)
|
||||
or
|
||||
// flow from Expr to Pattern
|
||||
exists(Expr e, Pattern p |
|
||||
nodeFrom.asExpr() = e and
|
||||
nodeTo.asPattern() = p and
|
||||
p.getImmediateMatchingExpr() = e
|
||||
)
|
||||
or
|
||||
// flow from Pattern to an identity-preserving sub-Pattern:
|
||||
nodeTo.asPattern() =
|
||||
[
|
||||
nodeFrom.asPattern().(IsPattern).getSubPattern(),
|
||||
nodeFrom.asPattern().(TypedPattern).getSubPattern()
|
||||
]
|
||||
or
|
||||
// flow through a flow summary (extension of `SummaryModelCsv`)
|
||||
FlowSummaryImpl::Private::Steps::summaryLocalStep(nodeFrom, nodeTo, true)
|
||||
}
|
||||
@@ -201,7 +224,8 @@ private module Cached {
|
||||
cached
|
||||
newtype TContent =
|
||||
TFieldContent(FieldDecl f) or
|
||||
TTupleContent(int index) { exists(any(TupleExpr te).getElement(index)) }
|
||||
TTupleContent(int index) { exists(any(TupleExpr te).getElement(index)) } or
|
||||
TEnumContent(ParamDecl f) { exists(EnumElementDecl d | d.getAParam() = f) }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -230,6 +254,11 @@ private predicate hasExprNode(CfgNode n, Expr e) {
|
||||
n.(PropertyObserverCfgNode).getAssignExpr() = e
|
||||
}
|
||||
|
||||
private predicate hasPatternNode(PatternCfgNode n, Pattern p) {
|
||||
n.getPattern() = p and
|
||||
p = p.resolve() // no need to turn hidden-AST patterns (`let`s, parens) into data flow nodes
|
||||
}
|
||||
|
||||
import Cached
|
||||
|
||||
/** Holds if `n` should be hidden from path explanations. */
|
||||
@@ -558,6 +587,29 @@ predicate storeStep(Node node1, ContentSet c, Node node2) {
|
||||
c.isSingleton(any(Content::TupleContent tc | tc.getIndex() = tuple.getIndex()))
|
||||
)
|
||||
or
|
||||
// creation of an enum `.variant(v1, v2)`
|
||||
exists(EnumElementExpr enum, int pos |
|
||||
node1.asExpr() = enum.getArgument(pos).getExpr() and
|
||||
node2.asExpr() = enum and
|
||||
c.isSingleton(any(Content::EnumContent ec | ec.getParam() = enum.getElement().getParam(pos)))
|
||||
)
|
||||
or
|
||||
// creation of an optional via implicit conversion,
|
||||
// i.e. from `f(x)` where `x: T` into `f(.some(x))` where the context `f` expects a `T?`.
|
||||
exists(InjectIntoOptionalExpr e |
|
||||
e.convertsFrom(node1.asExpr()) and
|
||||
node2 = node1 and // HACK: we should ideally have a separate Node case for the (hidden) InjectIntoOptionalExpr
|
||||
c instanceof OptionalSomeContentSet
|
||||
)
|
||||
or
|
||||
// creation of an optional by returning from a failable initializer (`init?`)
|
||||
exists(ConstructorDecl init |
|
||||
node1.asExpr().(CallExpr).getStaticTarget() = init and
|
||||
node2 = node1 and // HACK: again, we should ideally have a separate Node case here, and not reuse the CallExpr
|
||||
c instanceof OptionalSomeContentSet and
|
||||
init.isFailable()
|
||||
)
|
||||
or
|
||||
FlowSummaryImpl::Private::Steps::summaryStoreStep(node1, c, node2)
|
||||
}
|
||||
|
||||
@@ -578,6 +630,34 @@ predicate readStep(Node node1, ContentSet c, Node node2) {
|
||||
node2.asExpr() = tuple and
|
||||
c.isSingleton(any(Content::TupleContent tc | tc.getIndex() = tuple.getIndex()))
|
||||
)
|
||||
or
|
||||
// read of an enum member via `case let .variant(v1, v2)` pattern matching
|
||||
exists(EnumElementPattern enumPat, ParamDecl enumParam, Pattern subPat |
|
||||
node1.asPattern() = enumPat and
|
||||
node2.asPattern() = subPat and
|
||||
c.isSingleton(any(Content::EnumContent ec | ec.getParam() = enumParam))
|
||||
|
|
||||
exists(int idx |
|
||||
enumPat.getElement().getParam(idx) = enumParam and
|
||||
enumPat.getSubPattern(idx) = subPat
|
||||
)
|
||||
)
|
||||
or
|
||||
// read of a tuple member via `case let (v1, v2)` pattern matching
|
||||
exists(TuplePattern tupPat, int idx, Pattern subPat |
|
||||
node1.asPattern() = tupPat and
|
||||
node2.asPattern() = subPat and
|
||||
c.isSingleton(any(Content::TupleContent tc | tc.getIndex() = idx))
|
||||
|
|
||||
tupPat.getElement(idx) = subPat
|
||||
)
|
||||
or
|
||||
// read of an optional .some member via `let x: T = y: T?` pattern matching
|
||||
exists(OptionalSomePattern pat |
|
||||
node1.asPattern() = pat and
|
||||
node2.asPattern() = pat.getSubPattern() and
|
||||
c instanceof OptionalSomeContentSet
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -595,6 +675,22 @@ predicate clearsContent(Node n, ContentSet c) {
|
||||
*/
|
||||
predicate expectsContent(Node n, ContentSet c) { none() }
|
||||
|
||||
/**
|
||||
* The global singleton `Optional.some` content set.
|
||||
*/
|
||||
private class OptionalSomeContentSet extends ContentSet {
|
||||
OptionalSomeContentSet() {
|
||||
exists(EnumDecl optional, EnumElementDecl some |
|
||||
some.getDeclaringDecl() = optional and
|
||||
some.getName() = "some" and
|
||||
optional.getName() = "Optional" and
|
||||
optional.getModule().getName() = "Swift"
|
||||
|
|
||||
this.isSingleton(any(Content::EnumContent ec | ec.getParam() = some.getParam(0)))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private newtype TDataFlowType = TODO_DataFlowType()
|
||||
|
||||
class DataFlowType extends TDataFlowType {
|
||||
|
||||
@@ -37,6 +37,11 @@ class Node extends TNode {
|
||||
*/
|
||||
Expr asExpr() { none() }
|
||||
|
||||
/**
|
||||
* Gets this node's underlying pattern, if any.
|
||||
*/
|
||||
Pattern asPattern() { none() }
|
||||
|
||||
/**
|
||||
* Gets this data flow node's corresponding control flow node.
|
||||
*/
|
||||
@@ -66,6 +71,20 @@ class ExprNode extends Node, TExprNode {
|
||||
override ControlFlowNode getCfgNode() { result = n }
|
||||
}
|
||||
|
||||
/**
|
||||
* A pattern, viewed as a node in a data flow graph.
|
||||
*/
|
||||
class PatternNode extends Node, TPatternNode {
|
||||
CfgNode n;
|
||||
Pattern pattern;
|
||||
|
||||
PatternNode() { this = TPatternNode(n, pattern) }
|
||||
|
||||
override Pattern asPattern() { result = pattern }
|
||||
|
||||
override ControlFlowNode getCfgNode() { result = n }
|
||||
}
|
||||
|
||||
/**
|
||||
* The value of a parameter at function entry, viewed as a node in a data
|
||||
* flow graph.
|
||||
@@ -171,6 +190,20 @@ module Content {
|
||||
|
||||
override string toString() { result = "Tuple element at index " + index.toString() }
|
||||
}
|
||||
|
||||
/** A parameter of an enum element. */
|
||||
class EnumContent extends Content, TEnumContent {
|
||||
private ParamDecl p;
|
||||
|
||||
EnumContent() { this = TEnumContent(p) }
|
||||
|
||||
/** Gets the declaration of the enum parameter. */
|
||||
ParamDecl getParam() { result = p }
|
||||
|
||||
override string toString() {
|
||||
exists(EnumElementDecl d, int pos | d.getParam(pos) = p | result = d.toString() + ":" + pos)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,6 +10,7 @@ private import FlowSummaryImplSpecific
|
||||
private import DataFlowImplSpecific::Private
|
||||
private import DataFlowImplSpecific::Public
|
||||
private import DataFlowImplCommon
|
||||
private import codeql.util.Unit
|
||||
|
||||
/** Provides classes and predicates for defining flow summaries. */
|
||||
module Public {
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
private import codeql.swift.generated.decl.ConstructorDecl
|
||||
private import codeql.swift.elements.decl.MethodDecl
|
||||
private import codeql.swift.elements.type.FunctionType
|
||||
private import codeql.swift.elements.type.OptionalType
|
||||
|
||||
/**
|
||||
* An initializer of a class, struct, enum or protocol.
|
||||
*/
|
||||
class ConstructorDecl extends Generated::ConstructorDecl, MethodDecl {
|
||||
override string toString() { result = this.getSelfParam().getType() + "." + super.toString() }
|
||||
|
||||
/** Holds if this initializer returns an optional type. Failable initializers are written as `init?`. */
|
||||
predicate isFailable() {
|
||||
this.getInterfaceType().(FunctionType).getResult().(FunctionType).getResult() instanceof
|
||||
OptionalType
|
||||
}
|
||||
}
|
||||
|
||||
60
swift/ql/lib/codeql/swift/elements/expr/EnumElementExpr.qll
Normal file
60
swift/ql/lib/codeql/swift/elements/expr/EnumElementExpr.qll
Normal file
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* `EnumElementExpr` is an expression that constructs a case of an enum.
|
||||
*/
|
||||
|
||||
private import codeql.swift.elements.expr.Expr
|
||||
private import codeql.swift.elements.expr.Argument
|
||||
private import codeql.swift.elements.expr.CallExpr
|
||||
private import codeql.swift.elements.expr.DeclRefExpr
|
||||
private import codeql.swift.elements.expr.MethodLookupExpr
|
||||
private import codeql.swift.elements.decl.EnumElementDecl
|
||||
|
||||
/**
|
||||
* An expression that constructs a case of an enum.
|
||||
*/
|
||||
class EnumElementExpr extends Expr {
|
||||
EnumElementDecl decl;
|
||||
|
||||
EnumElementExpr() {
|
||||
this.(NullaryEnumElementExpr).getElement() = decl or
|
||||
this.(NonNullaryEnumElementExpr).getElement() = decl
|
||||
}
|
||||
|
||||
/** Gets the declaration of the enum element that this expression creates. */
|
||||
EnumElementDecl getElement() { result = decl }
|
||||
|
||||
/** Gets the `i`th argument passed to this enum element expression (0-based). */
|
||||
Argument getArgument(int i) { result = this.(NonNullaryEnumElementExpr).getArgument(i) }
|
||||
|
||||
/** Gets an argument passed to this enum element expression, if any. */
|
||||
final Argument getAnArgument() { result = this.getArgument(_) }
|
||||
|
||||
/** Gets the number of arguments passed to this enum element expression. */
|
||||
final int getNumberOfArguments() { result = count(this.getArgument(_)) }
|
||||
}
|
||||
|
||||
/**
|
||||
* An expression that refers to an enum element, either directly in the case of a nullary enum element,
|
||||
* or referring to the enum element constructor in the case of a non-nullary enum element.
|
||||
*/
|
||||
private class EnumElementLookupExpr extends MethodLookupExpr {
|
||||
EnumElementLookupExpr() { this.getMember() instanceof EnumElementDecl }
|
||||
}
|
||||
|
||||
/** An expression creating an enum with no arguments */
|
||||
private class NullaryEnumElementExpr extends EnumElementLookupExpr {
|
||||
/** Gets the declaration of the enum element that this expression creates. */
|
||||
EnumElementDecl getElement() { this.getMember() = result }
|
||||
|
||||
NullaryEnumElementExpr() { not exists(CallExpr ce | ce.getFunction() = this) }
|
||||
}
|
||||
|
||||
/** An expression creating an enum with arguments */
|
||||
private class NonNullaryEnumElementExpr extends CallExpr {
|
||||
EnumElementLookupExpr eele;
|
||||
|
||||
/** Gets the declaration of the enum element that this expression creates. */
|
||||
EnumElementDecl getElement() { eele.getMember() = result }
|
||||
|
||||
NonNullaryEnumElementExpr() { this.getFunction() = eele }
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
private import codeql.swift.generated.pattern.BindingPattern
|
||||
|
||||
class BindingPattern extends Generated::BindingPattern {
|
||||
final override Pattern getResolveStep() { result = getImmediateSubPattern() }
|
||||
|
||||
override string toString() { result = "let ..." }
|
||||
}
|
||||
|
||||
@@ -1,6 +1,19 @@
|
||||
private import codeql.swift.generated.pattern.EnumElementPattern
|
||||
private import codeql.swift.elements.pattern.TuplePattern
|
||||
|
||||
class EnumElementPattern extends Generated::EnumElementPattern {
|
||||
/**
|
||||
* Gets the `i`th element (0-based) of this enum element's tuple
|
||||
* sub-pattern, if any, or the sub-pattern itself if it is not a tuple pattern.
|
||||
*/
|
||||
Pattern getSubPattern(int i) {
|
||||
result = this.getSubPattern().(TuplePattern).getElement(i)
|
||||
or
|
||||
not this.getSubPattern() instanceof TuplePattern and
|
||||
result = this.getSubPattern() and
|
||||
i = 0
|
||||
}
|
||||
|
||||
override string toString() {
|
||||
if this.hasSubPattern()
|
||||
then result = "." + this.getElement().toString() + "(...)"
|
||||
|
||||
@@ -1,5 +1,27 @@
|
||||
private import codeql.swift.generated.pattern.NamedPattern
|
||||
private import codeql.swift.elements.decl.VarDecl
|
||||
|
||||
/**
|
||||
* A pattern that corresponds to a fresh variable binding.
|
||||
*
|
||||
* For example, `x` as in `if case let .some(x) = ...` is a `NamedPattern`,
|
||||
* whereas `y` as in `if case .some(y) = ...` is instead an `ExprPattern`.
|
||||
*/
|
||||
class NamedPattern extends Generated::NamedPattern {
|
||||
/**
|
||||
* Holds if this named pattern has a corresponding `VarDecl`.
|
||||
* This will be the case as long as the variable is subsequently used.
|
||||
*/
|
||||
predicate hasVarDecl() { exists(this.getVarDecl()) }
|
||||
|
||||
/**
|
||||
* Gets the `VarDecl` bound by this named pattern, if any.
|
||||
* This will be the case as long as the variable is subsequently used.
|
||||
*/
|
||||
VarDecl getVarDecl() {
|
||||
this.getImmediateEnclosingPattern*() = result.getParentPattern().getFullyUnresolved() and
|
||||
result.getName() = this.getName()
|
||||
}
|
||||
|
||||
override string toString() { result = this.getName() }
|
||||
}
|
||||
|
||||
@@ -1,4 +1,110 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
private import codeql.swift.generated.pattern.Pattern
|
||||
private import codeql.swift.elements.pattern.EnumElementPattern
|
||||
private import codeql.swift.elements.pattern.IsPattern
|
||||
private import codeql.swift.elements.pattern.OptionalSomePattern
|
||||
private import codeql.swift.elements.pattern.TypedPattern
|
||||
private import codeql.swift.elements.pattern.TuplePattern
|
||||
private import codeql.swift.elements.expr.Expr
|
||||
private import codeql.swift.elements.expr.TupleExpr
|
||||
private import codeql.swift.elements.expr.EnumElementExpr
|
||||
private import codeql.swift.elements.expr.LookupExpr
|
||||
private import codeql.swift.elements.expr.MethodLookupExpr
|
||||
private import codeql.swift.elements.expr.DeclRefExpr
|
||||
private import codeql.swift.elements.stmt.ConditionElement
|
||||
private import codeql.swift.elements.stmt.SwitchStmt
|
||||
private import codeql.swift.elements.stmt.CaseStmt
|
||||
private import codeql.swift.elements.decl.VarDecl
|
||||
private import codeql.swift.elements.decl.PatternBindingDecl
|
||||
private import codeql.swift.elements.decl.EnumElementDecl
|
||||
private import codeql.swift.generated.ParentChild
|
||||
|
||||
class Pattern extends Generated::Pattern { }
|
||||
/**
|
||||
* A syntactic construct that can be matched against an expression,
|
||||
* occurring in switch cases, conditions, and variable bindings.
|
||||
*/
|
||||
class Pattern extends Generated::Pattern {
|
||||
/**
|
||||
* Gets the expression that this top-level pattern is matched against, if any.
|
||||
*
|
||||
* For example, in `switch e { case p: ... }`, the pattern `p`
|
||||
* is immediately matched against the expression `e`.
|
||||
*/
|
||||
Expr getImmediateMatchingExpr() {
|
||||
exists(ConditionElement c |
|
||||
c.getPattern() = this and
|
||||
result = c.getInitializer()
|
||||
)
|
||||
or
|
||||
exists(SwitchStmt s |
|
||||
s.getExpr() = result and
|
||||
s.getACase().getALabel().getPattern() = this
|
||||
)
|
||||
or
|
||||
exists(PatternBindingDecl v, int i |
|
||||
v.getPattern(i) = pragma[only_bind_out](this) and
|
||||
result = v.getInit(i)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the expression that this pattern is matched against, if any.
|
||||
* The expression and the pattern need not be top-level children of
|
||||
* a pattern-matching construct, but they must match each other syntactically.
|
||||
*
|
||||
* For example, in `switch .some(e) { case let .some(p): ... }`, the pattern `p`
|
||||
* is matched against the expression `e`.
|
||||
*/
|
||||
Expr getMatchingExpr() {
|
||||
result = this.getImmediateMatchingExpr()
|
||||
or
|
||||
exists(Pattern p | p.getMatchingExpr() = result |
|
||||
this = p.(IsPattern).getSubPattern()
|
||||
or
|
||||
this = p.(OptionalSomePattern).getSubPattern()
|
||||
or
|
||||
this = p.(TypedPattern).getSubPattern()
|
||||
)
|
||||
or
|
||||
exists(TuplePattern p, TupleExpr e, int i |
|
||||
p.getMatchingExpr() = e and
|
||||
this = p.getElement(i) and
|
||||
result = e.getElement(i)
|
||||
)
|
||||
or
|
||||
exists(EnumElementPattern p, EnumElementExpr e, int i |
|
||||
p.getMatchingExpr() = e and
|
||||
this = p.getSubPattern(i) and
|
||||
result = e.getArgument(i).getExpr() and
|
||||
p.getElement() = e.getElement()
|
||||
)
|
||||
}
|
||||
|
||||
/** Holds if this pattern is matched against an expression. */
|
||||
final predicate hasMatchingExpr() { exists(this.getMatchingExpr()) }
|
||||
|
||||
/**
|
||||
* Gets the parent pattern of this pattern, if any.
|
||||
*/
|
||||
final Pattern getEnclosingPattern() {
|
||||
result = this.getFullyUnresolved().(Pattern).getImmediateEnclosingPattern()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the parent pattern of this pattern, if any.
|
||||
*/
|
||||
Pattern getImmediateEnclosingPattern() {
|
||||
this = result.(EnumElementPattern).getImmediateSubPattern()
|
||||
or
|
||||
this = result.(OptionalSomePattern).getImmediateSubPattern()
|
||||
or
|
||||
this = result.(TuplePattern).getImmediateElement(_)
|
||||
or
|
||||
this = result.(BindingPattern).getImmediateSubPattern()
|
||||
or
|
||||
this = result.(IsPattern).getImmediateSubPattern()
|
||||
or
|
||||
this = result.(ParenPattern).getImmediateSubPattern()
|
||||
or
|
||||
this = result.(TypedPattern).getImmediateSubPattern()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import codeql.swift.elements.expr.InitializerLookupExpr
|
||||
import codeql.swift.elements.expr.MethodCallExpr
|
||||
import codeql.swift.elements.expr.InitializerCallExpr
|
||||
import codeql.swift.elements.expr.SelfRefExpr
|
||||
import codeql.swift.elements.expr.EnumElementExpr
|
||||
import codeql.swift.elements.decl.MethodDecl
|
||||
import codeql.swift.elements.decl.ClassOrStructDecl
|
||||
import codeql.swift.elements.type.NumericType
|
||||
|
||||
@@ -39,3 +39,161 @@
|
||||
| patterns.swift:46:9:46:9 | b |
|
||||
| patterns.swift:49:10:49:10 | true |
|
||||
| patterns.swift:50:10:50:10 | false |
|
||||
| patterns.swift:55:9:55:9 | a |
|
||||
| patterns.swift:55:16:55:16 | b |
|
||||
| patterns.swift:55:23:55:23 | c |
|
||||
| patterns.swift:55:23:55:26 | ... as ... |
|
||||
| patterns.swift:57:8:57:20 | let ... |
|
||||
| patterns.swift:57:8:57:20 | let ...? |
|
||||
| patterns.swift:57:12:57:20 | (...) |
|
||||
| patterns.swift:57:13:57:13 | a |
|
||||
| patterns.swift:57:16:57:16 | b |
|
||||
| patterns.swift:57:19:57:19 | c |
|
||||
| patterns.swift:58:13:58:29 | (...) |
|
||||
| patterns.swift:58:14:58:14 | =~ ... |
|
||||
| patterns.swift:58:17:58:21 | let ... |
|
||||
| patterns.swift:58:21:58:21 | b |
|
||||
| patterns.swift:58:24:58:28 | let ... |
|
||||
| patterns.swift:58:28:58:28 | c |
|
||||
| patterns.swift:61:14:61:14 | =~ ... |
|
||||
| patterns.swift:62:14:62:18 | let ... |
|
||||
| patterns.swift:62:18:62:18 | c |
|
||||
| patterns.swift:63:9:63:9 | _ |
|
||||
| patterns.swift:78:9:78:9 | a |
|
||||
| patterns.swift:78:9:78:13 | ... as ... |
|
||||
| patterns.swift:81:10:81:11 | .myNone |
|
||||
| patterns.swift:83:10:83:25 | .mySingle(...) |
|
||||
| patterns.swift:83:19:83:25 | (...) |
|
||||
| patterns.swift:83:20:83:24 | let ... |
|
||||
| patterns.swift:83:24:83:24 | a |
|
||||
| patterns.swift:85:10:85:30 | .myPair(...) |
|
||||
| patterns.swift:85:17:85:30 | (...) |
|
||||
| patterns.swift:85:18:85:22 | let ... |
|
||||
| patterns.swift:85:22:85:22 | a |
|
||||
| patterns.swift:85:25:85:29 | let ... |
|
||||
| patterns.swift:85:29:85:29 | b |
|
||||
| patterns.swift:88:10:88:26 | let ... |
|
||||
| patterns.swift:88:14:88:26 | .myCons(...) |
|
||||
| patterns.swift:88:21:88:26 | (...) |
|
||||
| patterns.swift:88:22:88:22 | a |
|
||||
| patterns.swift:88:25:88:25 | _ |
|
||||
| patterns.swift:92:13:92:28 | .mySingle(...) |
|
||||
| patterns.swift:92:22:92:28 | (...) |
|
||||
| patterns.swift:92:23:92:27 | let ... |
|
||||
| patterns.swift:92:27:92:27 | x |
|
||||
| patterns.swift:95:13:95:33 | .myPair(...) |
|
||||
| patterns.swift:95:20:95:33 | (...) |
|
||||
| patterns.swift:95:21:95:25 | let ... |
|
||||
| patterns.swift:95:25:95:25 | x |
|
||||
| patterns.swift:95:28:95:32 | let ... |
|
||||
| patterns.swift:95:32:95:32 | y |
|
||||
| patterns.swift:103:10:103:11 | .myNone |
|
||||
| patterns.swift:105:10:105:25 | .mySingle(...) |
|
||||
| patterns.swift:105:19:105:25 | (...) |
|
||||
| patterns.swift:105:20:105:24 | let ... |
|
||||
| patterns.swift:105:24:105:24 | a |
|
||||
| patterns.swift:107:10:107:30 | .myPair(...) |
|
||||
| patterns.swift:107:17:107:30 | (...) |
|
||||
| patterns.swift:107:18:107:22 | let ... |
|
||||
| patterns.swift:107:22:107:22 | a |
|
||||
| patterns.swift:107:25:107:29 | let ... |
|
||||
| patterns.swift:107:29:107:29 | b |
|
||||
| patterns.swift:110:10:110:26 | let ... |
|
||||
| patterns.swift:110:14:110:26 | .myCons(...) |
|
||||
| patterns.swift:110:21:110:26 | (...) |
|
||||
| patterns.swift:110:22:110:22 | a |
|
||||
| patterns.swift:110:25:110:25 | _ |
|
||||
| patterns.swift:114:13:114:28 | .mySingle(...) |
|
||||
| patterns.swift:114:22:114:28 | (...) |
|
||||
| patterns.swift:114:23:114:27 | let ... |
|
||||
| patterns.swift:114:27:114:27 | x |
|
||||
| patterns.swift:117:13:117:33 | .myPair(...) |
|
||||
| patterns.swift:117:20:117:33 | (...) |
|
||||
| patterns.swift:117:21:117:25 | let ... |
|
||||
| patterns.swift:117:25:117:25 | x |
|
||||
| patterns.swift:117:28:117:32 | let ... |
|
||||
| patterns.swift:117:32:117:32 | y |
|
||||
| patterns.swift:125:10:125:11 | .myNone |
|
||||
| patterns.swift:127:10:127:25 | .mySingle(...) |
|
||||
| patterns.swift:127:19:127:25 | (...) |
|
||||
| patterns.swift:127:20:127:24 | let ... |
|
||||
| patterns.swift:127:24:127:24 | a |
|
||||
| patterns.swift:129:10:129:30 | .myPair(...) |
|
||||
| patterns.swift:129:17:129:30 | (...) |
|
||||
| patterns.swift:129:18:129:22 | let ... |
|
||||
| patterns.swift:129:22:129:22 | a |
|
||||
| patterns.swift:129:25:129:29 | let ... |
|
||||
| patterns.swift:129:29:129:29 | b |
|
||||
| patterns.swift:132:10:132:26 | let ... |
|
||||
| patterns.swift:132:14:132:26 | .myCons(...) |
|
||||
| patterns.swift:132:21:132:26 | (...) |
|
||||
| patterns.swift:132:22:132:22 | a |
|
||||
| patterns.swift:132:25:132:25 | _ |
|
||||
| patterns.swift:136:13:136:28 | .mySingle(...) |
|
||||
| patterns.swift:136:22:136:28 | (...) |
|
||||
| patterns.swift:136:23:136:27 | let ... |
|
||||
| patterns.swift:136:27:136:27 | x |
|
||||
| patterns.swift:139:13:139:33 | .myPair(...) |
|
||||
| patterns.swift:139:20:139:33 | (...) |
|
||||
| patterns.swift:139:21:139:25 | let ... |
|
||||
| patterns.swift:139:25:139:25 | x |
|
||||
| patterns.swift:139:28:139:32 | let ... |
|
||||
| patterns.swift:139:32:139:32 | y |
|
||||
| patterns.swift:144:9:144:9 | b |
|
||||
| patterns.swift:144:9:144:12 | ... as ... |
|
||||
| patterns.swift:147:10:147:11 | .myNone |
|
||||
| patterns.swift:149:10:149:25 | .mySingle(...) |
|
||||
| patterns.swift:149:19:149:25 | (...) |
|
||||
| patterns.swift:149:20:149:24 | let ... |
|
||||
| patterns.swift:149:24:149:24 | a |
|
||||
| patterns.swift:151:10:151:30 | .myPair(...) |
|
||||
| patterns.swift:151:17:151:30 | (...) |
|
||||
| patterns.swift:151:18:151:22 | let ... |
|
||||
| patterns.swift:151:22:151:22 | a |
|
||||
| patterns.swift:151:25:151:29 | let ... |
|
||||
| patterns.swift:151:29:151:29 | b |
|
||||
| patterns.swift:154:10:154:38 | let ... |
|
||||
| patterns.swift:154:14:154:38 | .myCons(...) |
|
||||
| patterns.swift:154:21:154:38 | (...) |
|
||||
| patterns.swift:154:22:154:22 | a |
|
||||
| patterns.swift:154:25:154:37 | .myPair(...) |
|
||||
| patterns.swift:154:32:154:37 | (...) |
|
||||
| patterns.swift:154:33:154:33 | b |
|
||||
| patterns.swift:154:36:154:36 | c |
|
||||
| patterns.swift:158:10:158:26 | let ... |
|
||||
| patterns.swift:158:14:158:26 | .myCons(...) |
|
||||
| patterns.swift:158:21:158:26 | (...) |
|
||||
| patterns.swift:158:22:158:22 | a |
|
||||
| patterns.swift:158:25:158:25 | _ |
|
||||
| patterns.swift:162:13:162:28 | .mySingle(...) |
|
||||
| patterns.swift:162:22:162:28 | (...) |
|
||||
| patterns.swift:162:23:162:27 | let ... |
|
||||
| patterns.swift:162:27:162:27 | x |
|
||||
| patterns.swift:165:13:165:39 | .myPair(...) |
|
||||
| patterns.swift:165:26:165:39 | (...) |
|
||||
| patterns.swift:165:27:165:31 | let ... |
|
||||
| patterns.swift:165:31:165:31 | x |
|
||||
| patterns.swift:165:34:165:38 | let ... |
|
||||
| patterns.swift:165:38:165:38 | y |
|
||||
| patterns.swift:169:13:169:41 | let ... |
|
||||
| patterns.swift:169:17:169:41 | .myCons(...) |
|
||||
| patterns.swift:169:24:169:41 | (...) |
|
||||
| patterns.swift:169:25:169:25 | _ |
|
||||
| patterns.swift:169:28:169:40 | .myPair(...) |
|
||||
| patterns.swift:169:35:169:40 | (...) |
|
||||
| patterns.swift:169:36:169:36 | _ |
|
||||
| patterns.swift:169:39:169:39 | c |
|
||||
| patterns.swift:174:10:174:55 | let ... |
|
||||
| patterns.swift:174:14:174:55 | (...) |
|
||||
| patterns.swift:174:15:174:27 | .myPair(...) |
|
||||
| patterns.swift:174:22:174:27 | (...) |
|
||||
| patterns.swift:174:23:174:23 | a |
|
||||
| patterns.swift:174:26:174:26 | b |
|
||||
| patterns.swift:174:30:174:54 | .myCons(...) |
|
||||
| patterns.swift:174:37:174:54 | (...) |
|
||||
| patterns.swift:174:38:174:38 | c |
|
||||
| patterns.swift:174:41:174:53 | .myPair(...) |
|
||||
| patterns.swift:174:48:174:53 | (...) |
|
||||
| patterns.swift:174:49:174:49 | d |
|
||||
| patterns.swift:174:52:174:52 | e |
|
||||
| patterns.swift:180:5:180:5 | _ |
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
bound
|
||||
| patterns.swift:2:9:2:9 | an_int |
|
||||
| patterns.swift:3:9:3:9 | a_string |
|
||||
| patterns.swift:4:10:4:10 | x |
|
||||
| patterns.swift:4:13:4:13 | y |
|
||||
| patterns.swift:4:16:4:16 | z |
|
||||
| patterns.swift:10:9:10:9 | point |
|
||||
| patterns.swift:12:15:12:15 | xx |
|
||||
| patterns.swift:12:19:12:19 | yy |
|
||||
| patterns.swift:24:9:24:9 | v |
|
||||
| patterns.swift:28:19:28:19 | i |
|
||||
| patterns.swift:28:22:28:22 | s |
|
||||
| patterns.swift:31:9:31:9 | w |
|
||||
| patterns.swift:34:14:34:14 | n |
|
||||
| patterns.swift:38:9:38:9 | a |
|
||||
| patterns.swift:42:14:42:14 | x |
|
||||
| patterns.swift:46:9:46:9 | b |
|
||||
| patterns.swift:55:9:55:9 | a |
|
||||
| patterns.swift:55:16:55:16 | b |
|
||||
| patterns.swift:55:23:55:23 | c |
|
||||
| patterns.swift:57:13:57:13 | a |
|
||||
| patterns.swift:57:19:57:19 | c |
|
||||
| patterns.swift:58:21:58:21 | b |
|
||||
| patterns.swift:62:18:62:18 | c |
|
||||
| patterns.swift:78:9:78:9 | a |
|
||||
| patterns.swift:83:24:83:24 | a |
|
||||
| patterns.swift:85:22:85:22 | a |
|
||||
| patterns.swift:85:29:85:29 | b |
|
||||
| patterns.swift:88:22:88:22 | a |
|
||||
| patterns.swift:92:27:92:27 | x |
|
||||
| patterns.swift:95:25:95:25 | x |
|
||||
| patterns.swift:95:32:95:32 | y |
|
||||
| patterns.swift:105:24:105:24 | a |
|
||||
| patterns.swift:107:22:107:22 | a |
|
||||
| patterns.swift:107:29:107:29 | b |
|
||||
| patterns.swift:110:22:110:22 | a |
|
||||
| patterns.swift:114:27:114:27 | x |
|
||||
| patterns.swift:117:25:117:25 | x |
|
||||
| patterns.swift:117:32:117:32 | y |
|
||||
| patterns.swift:127:24:127:24 | a |
|
||||
| patterns.swift:129:22:129:22 | a |
|
||||
| patterns.swift:129:29:129:29 | b |
|
||||
| patterns.swift:132:22:132:22 | a |
|
||||
| patterns.swift:136:27:136:27 | x |
|
||||
| patterns.swift:139:25:139:25 | x |
|
||||
| patterns.swift:139:32:139:32 | y |
|
||||
| patterns.swift:144:9:144:9 | b |
|
||||
| patterns.swift:149:24:149:24 | a |
|
||||
| patterns.swift:151:22:151:22 | a |
|
||||
| patterns.swift:151:29:151:29 | b |
|
||||
| patterns.swift:154:22:154:22 | a |
|
||||
| patterns.swift:154:33:154:33 | b |
|
||||
| patterns.swift:154:36:154:36 | c |
|
||||
| patterns.swift:158:22:158:22 | a |
|
||||
| patterns.swift:162:27:162:27 | x |
|
||||
| patterns.swift:165:31:165:31 | x |
|
||||
| patterns.swift:165:38:165:38 | y |
|
||||
| patterns.swift:169:39:169:39 | c |
|
||||
| patterns.swift:174:23:174:23 | a |
|
||||
| patterns.swift:174:26:174:26 | b |
|
||||
| patterns.swift:174:38:174:38 | c |
|
||||
| patterns.swift:174:49:174:49 | d |
|
||||
| patterns.swift:174:52:174:52 | e |
|
||||
unbound
|
||||
| patterns.swift:57:16:57:16 | b |
|
||||
| patterns.swift:58:28:58:28 | c |
|
||||
11
swift/ql/test/extractor-tests/patterns/bound_and_unbound.ql
Normal file
11
swift/ql/test/extractor-tests/patterns/bound_and_unbound.ql
Normal file
@@ -0,0 +1,11 @@
|
||||
import swift
|
||||
|
||||
query predicate bound(NamedPattern p) {
|
||||
p.getFile().getBaseName() = "patterns.swift" and
|
||||
p.hasVarDecl()
|
||||
}
|
||||
|
||||
query predicate unbound(NamedPattern p) {
|
||||
p.getFile().getBaseName() = "patterns.swift" and
|
||||
not p.hasVarDecl()
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
| patterns.swift:2:9:2:9 | an_int | patterns.swift:2:18:2:18 | 42 |
|
||||
| patterns.swift:3:9:3:9 | a_string | patterns.swift:3:28:3:28 | here |
|
||||
| patterns.swift:3:9:3:19 | ... as ... | patterns.swift:3:28:3:28 | here |
|
||||
| patterns.swift:4:9:4:17 | (...) | patterns.swift:4:21:4:29 | (...) |
|
||||
| patterns.swift:4:10:4:10 | x | patterns.swift:4:22:4:22 | 1 |
|
||||
| patterns.swift:4:13:4:13 | y | patterns.swift:4:25:4:25 | 2 |
|
||||
| patterns.swift:4:16:4:16 | z | patterns.swift:4:28:4:28 | 3 |
|
||||
| patterns.swift:5:9:5:9 | _ | patterns.swift:5:13:5:13 | any |
|
||||
| patterns.swift:6:10:6:10 | _ | patterns.swift:6:15:6:15 | paren |
|
||||
| patterns.swift:10:9:10:9 | point | patterns.swift:10:17:10:22 | (...) |
|
||||
| patterns.swift:12:14:12:21 | (...) | patterns.swift:11:12:11:12 | point |
|
||||
| patterns.swift:16:10:16:14 | =~ ... | patterns.swift:15:12:15:12 | 3 |
|
||||
| patterns.swift:17:10:17:10 | _ | patterns.swift:15:12:15:12 | 3 |
|
||||
| patterns.swift:24:9:24:9 | v | patterns.swift:24:18:24:19 | .bar |
|
||||
| patterns.swift:24:9:24:12 | ... as ... | patterns.swift:24:18:24:19 | .bar |
|
||||
| patterns.swift:27:10:27:11 | .bar | patterns.swift:26:12:26:12 | v |
|
||||
| patterns.swift:28:14:28:23 | .baz(...) | patterns.swift:26:12:26:12 | v |
|
||||
| patterns.swift:31:9:31:9 | w | patterns.swift:31:19:31:19 | nil |
|
||||
| patterns.swift:31:9:31:15 | ... as ... | patterns.swift:31:19:31:19 | nil |
|
||||
| patterns.swift:34:14:34:14 | n | patterns.swift:33:12:33:12 | w |
|
||||
| patterns.swift:34:14:34:15 | let ...? | patterns.swift:33:12:33:12 | w |
|
||||
| patterns.swift:35:10:35:10 | _ | patterns.swift:33:12:33:12 | w |
|
||||
| patterns.swift:38:9:38:9 | a | patterns.swift:38:18:38:18 | any |
|
||||
| patterns.swift:38:9:38:12 | ... as ... | patterns.swift:38:18:38:18 | any |
|
||||
| patterns.swift:41:10:41:13 | ... is ... | patterns.swift:40:12:40:12 | a |
|
||||
| patterns.swift:42:14:42:14 | x | patterns.swift:40:12:40:12 | a |
|
||||
| patterns.swift:42:14:42:19 | ... is ... | patterns.swift:40:12:40:12 | a |
|
||||
| patterns.swift:43:10:43:10 | _ | patterns.swift:40:12:40:12 | a |
|
||||
| patterns.swift:46:9:46:9 | b | patterns.swift:46:13:46:13 | true |
|
||||
| patterns.swift:49:10:49:10 | true | patterns.swift:48:12:48:12 | b |
|
||||
| patterns.swift:50:10:50:10 | false | patterns.swift:48:12:48:12 | b |
|
||||
| patterns.swift:55:9:55:9 | a | patterns.swift:55:13:55:13 | 1 |
|
||||
| patterns.swift:55:16:55:16 | b | patterns.swift:55:20:55:20 | 2 |
|
||||
| patterns.swift:55:23:55:23 | c | patterns.swift:55:32:55:32 | 3 |
|
||||
| patterns.swift:55:23:55:26 | ... as ... | patterns.swift:55:32:55:32 | 3 |
|
||||
| patterns.swift:57:8:57:20 | let ...? | patterns.swift:57:24:57:47 | call to ... |
|
||||
| patterns.swift:57:12:57:20 | (...) | patterns.swift:57:24:57:47 | call to ... |
|
||||
| patterns.swift:58:13:58:29 | (...) | patterns.swift:58:33:58:41 | (...) |
|
||||
| patterns.swift:58:14:58:14 | =~ ... | patterns.swift:58:34:58:34 | a |
|
||||
| patterns.swift:58:21:58:21 | b | patterns.swift:58:37:58:37 | b |
|
||||
| patterns.swift:58:28:58:28 | c | patterns.swift:58:40:58:40 | c |
|
||||
| patterns.swift:61:14:61:14 | =~ ... | patterns.swift:60:12:60:12 | a |
|
||||
| patterns.swift:62:18:62:18 | c | patterns.swift:60:12:60:12 | a |
|
||||
| patterns.swift:63:9:63:9 | _ | patterns.swift:60:12:60:12 | a |
|
||||
| patterns.swift:78:9:78:9 | a | patterns.swift:78:22:78:23 | .myNone |
|
||||
| patterns.swift:78:9:78:13 | ... as ... | patterns.swift:78:22:78:23 | .myNone |
|
||||
| patterns.swift:81:10:81:11 | .myNone | patterns.swift:80:12:80:12 | a |
|
||||
| patterns.swift:83:10:83:25 | .mySingle(...) | patterns.swift:80:12:80:12 | a |
|
||||
| patterns.swift:85:10:85:30 | .myPair(...) | patterns.swift:80:12:80:12 | a |
|
||||
| patterns.swift:88:14:88:26 | .myCons(...) | patterns.swift:80:12:80:12 | a |
|
||||
| patterns.swift:92:13:92:28 | .mySingle(...) | patterns.swift:92:32:92:32 | a |
|
||||
| patterns.swift:95:13:95:33 | .myPair(...) | patterns.swift:95:37:95:37 | a |
|
||||
| patterns.swift:103:10:103:11 | .myNone | patterns.swift:102:12:102:12 | a |
|
||||
| patterns.swift:105:10:105:25 | .mySingle(...) | patterns.swift:102:12:102:12 | a |
|
||||
| patterns.swift:107:10:107:30 | .myPair(...) | patterns.swift:102:12:102:12 | a |
|
||||
| patterns.swift:110:14:110:26 | .myCons(...) | patterns.swift:102:12:102:12 | a |
|
||||
| patterns.swift:114:13:114:28 | .mySingle(...) | patterns.swift:114:32:114:32 | a |
|
||||
| patterns.swift:117:13:117:33 | .myPair(...) | patterns.swift:117:37:117:37 | a |
|
||||
| patterns.swift:125:10:125:11 | .myNone | patterns.swift:124:12:124:12 | a |
|
||||
| patterns.swift:127:10:127:25 | .mySingle(...) | patterns.swift:124:12:124:12 | a |
|
||||
| patterns.swift:129:10:129:30 | .myPair(...) | patterns.swift:124:12:124:12 | a |
|
||||
| patterns.swift:132:14:132:26 | .myCons(...) | patterns.swift:124:12:124:12 | a |
|
||||
| patterns.swift:136:13:136:28 | .mySingle(...) | patterns.swift:136:32:136:32 | a |
|
||||
| patterns.swift:139:13:139:33 | .myPair(...) | patterns.swift:139:37:139:37 | a |
|
||||
| patterns.swift:144:9:144:9 | b | patterns.swift:144:21:144:34 | call to ... |
|
||||
| patterns.swift:144:9:144:12 | ... as ... | patterns.swift:144:21:144:34 | call to ... |
|
||||
| patterns.swift:147:10:147:11 | .myNone | patterns.swift:146:12:146:12 | b |
|
||||
| patterns.swift:149:10:149:25 | .mySingle(...) | patterns.swift:146:12:146:12 | b |
|
||||
| patterns.swift:151:10:151:30 | .myPair(...) | patterns.swift:146:12:146:12 | b |
|
||||
| patterns.swift:154:14:154:38 | .myCons(...) | patterns.swift:146:12:146:12 | b |
|
||||
| patterns.swift:158:14:158:26 | .myCons(...) | patterns.swift:146:12:146:12 | b |
|
||||
| patterns.swift:162:13:162:28 | .mySingle(...) | patterns.swift:162:32:162:57 | call to ... |
|
||||
| patterns.swift:165:13:165:39 | .myPair(...) | patterns.swift:165:43:165:62 | call to ... |
|
||||
| patterns.swift:165:31:165:31 | x | patterns.swift:165:51:165:58 | call to source() |
|
||||
| patterns.swift:165:38:165:38 | y | patterns.swift:165:61:165:61 | 0 |
|
||||
| patterns.swift:169:17:169:41 | .myCons(...) | patterns.swift:169:45:169:45 | b |
|
||||
| patterns.swift:174:14:174:55 | (...) | patterns.swift:173:12:173:17 | (...) |
|
||||
| patterns.swift:174:15:174:27 | .myPair(...) | patterns.swift:173:13:173:13 | a |
|
||||
| patterns.swift:174:30:174:54 | .myCons(...) | patterns.swift:173:16:173:16 | b |
|
||||
| patterns.swift:180:5:180:5 | _ | patterns.swift:173:12:173:17 | (...) |
|
||||
5
swift/ql/test/extractor-tests/patterns/matching_expr.ql
Normal file
5
swift/ql/test/extractor-tests/patterns/matching_expr.ql
Normal file
@@ -0,0 +1,5 @@
|
||||
import swift
|
||||
|
||||
from Pattern p, Expr e
|
||||
where p.getMatchingExpr() = e
|
||||
select p, e
|
||||
@@ -50,3 +50,134 @@ func switch_patterns() {
|
||||
case false: "false"
|
||||
}
|
||||
}
|
||||
|
||||
func bound_and_unbound() {
|
||||
let a = 1, b = 2, c: Int = 3
|
||||
|
||||
if let (a, b, c) = Optional.some((a, b, c)) { _ = (a, c) }
|
||||
if case (a, let b, let c) = (a, b, c) { _ = (b) }
|
||||
|
||||
switch a {
|
||||
case c: "equals c"
|
||||
case let c: "binds c"
|
||||
default: "default"
|
||||
}
|
||||
}
|
||||
|
||||
func source() -> Int { 0 }
|
||||
func sink(arg: Int) { }
|
||||
|
||||
indirect enum MyEnum {
|
||||
case myNone
|
||||
case mySingle(Int)
|
||||
case myPair(Int, Int)
|
||||
case myCons(Int, MyEnum)
|
||||
}
|
||||
|
||||
func test_enums() {
|
||||
var a : MyEnum = .myNone
|
||||
|
||||
switch a {
|
||||
case .myNone:
|
||||
()
|
||||
case .mySingle(let a):
|
||||
sink(arg: a)
|
||||
case .myPair(let a, let b):
|
||||
sink(arg: a)
|
||||
sink(arg: b)
|
||||
case let .myCons(a, _):
|
||||
sink(arg: a)
|
||||
}
|
||||
|
||||
if case .mySingle(let x) = a {
|
||||
sink(arg: x)
|
||||
}
|
||||
if case .myPair(let x, let y) = a {
|
||||
sink(arg: x)
|
||||
sink(arg: y)
|
||||
}
|
||||
|
||||
a = .mySingle(source())
|
||||
|
||||
switch a {
|
||||
case .myNone:
|
||||
()
|
||||
case .mySingle(let a):
|
||||
sink(arg: a)
|
||||
case .myPair(let a, let b):
|
||||
sink(arg: a)
|
||||
sink(arg: b)
|
||||
case let .myCons(a, _):
|
||||
sink(arg: a)
|
||||
}
|
||||
|
||||
if case .mySingle(let x) = a {
|
||||
sink(arg: x)
|
||||
}
|
||||
if case .myPair(let x, let y) = a {
|
||||
sink(arg: x)
|
||||
sink(arg: y)
|
||||
}
|
||||
|
||||
a = MyEnum.myPair(0, source())
|
||||
|
||||
switch a {
|
||||
case .myNone:
|
||||
()
|
||||
case .mySingle(let a):
|
||||
sink(arg: a)
|
||||
case .myPair(let a, let b):
|
||||
sink(arg: a)
|
||||
sink(arg: b)
|
||||
case let .myCons(a, _):
|
||||
sink(arg: a)
|
||||
}
|
||||
|
||||
if case .mySingle(let x) = a {
|
||||
sink(arg: x)
|
||||
}
|
||||
if case .myPair(let x, let y) = a {
|
||||
sink(arg: x)
|
||||
sink(arg: y)
|
||||
}
|
||||
|
||||
let b: MyEnum = .myCons(42, a)
|
||||
|
||||
switch b {
|
||||
case .myNone:
|
||||
()
|
||||
case .mySingle(let a):
|
||||
sink(arg: a)
|
||||
case .myPair(let a, let b):
|
||||
sink(arg: a)
|
||||
sink(arg: b)
|
||||
case let .myCons(a, .myPair(b, c)):
|
||||
sink(arg: a)
|
||||
sink(arg: b)
|
||||
sink(arg: c)
|
||||
case let .myCons(a, _):
|
||||
sink(arg: a)
|
||||
}
|
||||
|
||||
if case .mySingle(let x) = MyEnum.myPair(source(), 0) {
|
||||
sink(arg: x)
|
||||
}
|
||||
if case MyEnum.myPair(let x, let y) = .myPair(source(), 0) {
|
||||
sink(arg: x)
|
||||
sink(arg: y)
|
||||
}
|
||||
if case let .myCons(_, .myPair(_, c)) = b {
|
||||
sink(arg: c)
|
||||
}
|
||||
|
||||
switch (a, b) {
|
||||
case let (.myPair(a, b), .myCons(c, .myPair(d, e))):
|
||||
sink(arg: a)
|
||||
sink(arg: b)
|
||||
sink(arg: c)
|
||||
sink(arg: d)
|
||||
sink(arg: e)
|
||||
default:
|
||||
()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
| statements.swift:3:8:3:13 | ... .==(_:_:) ... | statements.swift:3:8:3:13 | ... .==(_:_:) ... |
|
||||
| statements.swift:10:17:10:24 | ... .<(_:_:) ... | statements.swift:10:18:10:22 | ... .<(_:_:) ... |
|
||||
| statements.swift:39:9:39:14 | ... .!=(_:_:) ... | statements.swift:39:9:39:14 | ... .!=(_:_:) ... |
|
||||
| statements.swift:65:4:65:19 | let ... = ... | statements.swift:65:9:65:15 | let ... |
|
||||
| statements.swift:65:4:65:19 | let ... = ... | statements.swift:65:19:65:19 | x |
|
||||
| statements.swift:65:4:65:19 | let ...? = ... | statements.swift:65:13:65:15 | let ...? |
|
||||
| statements.swift:65:4:65:19 | let ...? = ... | statements.swift:65:19:65:19 | x |
|
||||
| statements.swift:67:4:67:20 | .some(...) = ... | statements.swift:67:9:67:16 | .some(...) |
|
||||
| statements.swift:67:4:67:20 | .some(...) = ... | statements.swift:67:20:67:20 | x |
|
||||
|
||||
@@ -180,8 +180,8 @@ cfg.swift:
|
||||
# 35| getPattern(): [IsPattern] ... is ...
|
||||
# 35| getSubPattern(): [EnumElementPattern] .error3(...)
|
||||
# 35| getSubPattern(): [TuplePattern] (...)
|
||||
# 35| getElement(0): [BindingPattern] let ...
|
||||
# 35| getSubPattern(): [NamedPattern] withParam
|
||||
# 35| getElement(0): [NamedPattern] withParam
|
||||
# 35| getElement(0).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 37| getCatch(2): [CaseStmt] case ...
|
||||
# 37| getBody(): [BraceStmt] { ... }
|
||||
# 38| getElement(0): [CallExpr] call to print(_:separator:terminator:)
|
||||
@@ -239,9 +239,9 @@ cfg.swift:
|
||||
# 40| getExpr(): [DefaultArgumentExpr] default separator
|
||||
# 40| getArgument(2): [Argument] terminator: default terminator
|
||||
# 40| getExpr(): [DefaultArgumentExpr] default terminator
|
||||
# 39| getLabel(0): [CaseLabelItem] let ...
|
||||
# 39| getPattern(): [BindingPattern] let ...
|
||||
# 39| getSubPattern(): [NamedPattern] error
|
||||
# 39| getLabel(0): [CaseLabelItem] error
|
||||
# 39| getPattern(): [NamedPattern] error
|
||||
# 39| getPattern().getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 42| getElement(1): [ReturnStmt] return ...
|
||||
# 42| getResult(): [IntegerLiteralExpr] 0
|
||||
# 35| [ConcreteVarDecl] withParam
|
||||
@@ -803,9 +803,9 @@ cfg.swift:
|
||||
# 156| getCondition(): [StmtCondition] StmtCondition
|
||||
# 156| getElement(0): [ConditionElement] .some(...) = ...
|
||||
# 156| getPattern(): [EnumElementPattern] .some(...)
|
||||
# 156| getSubPattern(): [BindingPattern] let ...
|
||||
# 156| getSubPattern(): [NamedPattern] x
|
||||
# 156| getSubPattern(): [NamedPattern] x
|
||||
# 156| getSubPattern().getFullyUnresolved(): [ParenPattern] (...)
|
||||
# 156| getImmediateSubPattern(): [BindingPattern] let ...
|
||||
# 156| getInitializer(): [DeclRefExpr] xOptional
|
||||
# 156| getThen(): [BraceStmt] { ... }
|
||||
# 157| getElement(0): [ReturnStmt] return ...
|
||||
@@ -5375,11 +5375,11 @@ patterns.swift:
|
||||
# 12| getCase(0): [CaseStmt] case ...
|
||||
# 12| getBody(): [BraceStmt] { ... }
|
||||
# 12| getElement(0): [StringLiteralExpr] binding
|
||||
# 12| getLabel(0): [CaseLabelItem] let ...
|
||||
# 12| getPattern(): [BindingPattern] let ...
|
||||
# 12| getSubPattern(): [TuplePattern] (...)
|
||||
# 12| getElement(0): [NamedPattern] xx
|
||||
# 12| getElement(1): [NamedPattern] yy
|
||||
# 12| getLabel(0): [CaseLabelItem] (...)
|
||||
# 12| getPattern(): [TuplePattern] (...)
|
||||
# 12| getElement(0): [NamedPattern] xx
|
||||
# 12| getElement(1): [NamedPattern] yy
|
||||
# 12| getPattern().getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 15| getElement(3): [SwitchStmt] switch 3 { ... }
|
||||
# 15| getExpr(): [IntegerLiteralExpr] 3
|
||||
# 16| getCase(0): [CaseStmt] case ...
|
||||
@@ -5424,12 +5424,12 @@ patterns.swift:
|
||||
# 28| getCase(1): [CaseStmt] case ...
|
||||
# 28| getBody(): [BraceStmt] { ... }
|
||||
# 28| getElement(0): [DeclRefExpr] i
|
||||
# 28| getLabel(0): [CaseLabelItem] let ...
|
||||
# 28| getPattern(): [BindingPattern] let ...
|
||||
# 28| getSubPattern(): [EnumElementPattern] .baz(...)
|
||||
# 28| getSubPattern(): [TuplePattern] (...)
|
||||
# 28| getElement(0): [NamedPattern] i
|
||||
# 28| getElement(1): [NamedPattern] s
|
||||
# 28| getLabel(0): [CaseLabelItem] .baz(...)
|
||||
# 28| getPattern(): [EnumElementPattern] .baz(...)
|
||||
# 28| getSubPattern(): [TuplePattern] (...)
|
||||
# 28| getElement(0): [NamedPattern] i
|
||||
# 28| getElement(1): [NamedPattern] s
|
||||
# 28| getPattern().getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 31| getElement(8): [PatternBindingDecl] var ... = ...
|
||||
# 31| getInit(0): [NilLiteralExpr] nil
|
||||
# 31| getPattern(0): [TypedPattern] ... as ...
|
||||
@@ -5442,10 +5442,10 @@ patterns.swift:
|
||||
# 34| getCase(0): [CaseStmt] case ...
|
||||
# 34| getBody(): [BraceStmt] { ... }
|
||||
# 34| getElement(0): [DeclRefExpr] n
|
||||
# 34| getLabel(0): [CaseLabelItem] let ...
|
||||
# 34| getPattern(): [BindingPattern] let ...
|
||||
# 34| getSubPattern(): [OptionalSomePattern] let ...?
|
||||
# 34| getSubPattern(): [NamedPattern] n
|
||||
# 34| getLabel(0): [CaseLabelItem] let ...?
|
||||
# 34| getPattern(): [OptionalSomePattern] let ...?
|
||||
# 34| getSubPattern(): [NamedPattern] n
|
||||
# 34| getPattern().getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 35| getCase(1): [CaseStmt] case ...
|
||||
# 35| getBody(): [BraceStmt] { ... }
|
||||
# 35| getElement(0): [StringLiteralExpr] none
|
||||
@@ -5470,11 +5470,11 @@ patterns.swift:
|
||||
# 42| getCase(1): [CaseStmt] case ...
|
||||
# 42| getBody(): [BraceStmt] { ... }
|
||||
# 42| getElement(0): [StringLiteralExpr] as pattern
|
||||
# 42| getLabel(0): [CaseLabelItem] let ...
|
||||
# 42| getPattern(): [BindingPattern] let ...
|
||||
# 42| getSubPattern(): [IsPattern] ... is ...
|
||||
# 42| getCastTypeRepr(): [TypeRepr] String
|
||||
# 42| getSubPattern(): [NamedPattern] x
|
||||
# 42| getLabel(0): [CaseLabelItem] ... is ...
|
||||
# 42| getPattern(): [IsPattern] ... is ...
|
||||
# 42| getCastTypeRepr(): [TypeRepr] String
|
||||
# 42| getSubPattern(): [NamedPattern] x
|
||||
# 42| getPattern().getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 43| getCase(2): [CaseStmt] case ...
|
||||
# 43| getBody(): [BraceStmt] { ... }
|
||||
# 43| getElement(0): [StringLiteralExpr] other
|
||||
@@ -5509,6 +5509,678 @@ patterns.swift:
|
||||
# 34| Type = Int
|
||||
# 42| [ConcreteVarDecl] x
|
||||
# 42| Type = String
|
||||
# 54| [ConcreteFuncDecl] bound_and_unbound()
|
||||
# 54| InterfaceType = () -> ()
|
||||
# 54| getBody(): [BraceStmt] { ... }
|
||||
# 55| getElement(0): [PatternBindingDecl] var ... = ...
|
||||
# 55| getInit(0): [IntegerLiteralExpr] 1
|
||||
# 55| getInit(1): [IntegerLiteralExpr] 2
|
||||
# 55| getInit(2): [IntegerLiteralExpr] 3
|
||||
# 55| getPattern(0): [NamedPattern] a
|
||||
# 55| getPattern(1): [NamedPattern] b
|
||||
# 55| getPattern(2): [TypedPattern] ... as ...
|
||||
# 55| getSubPattern(): [NamedPattern] c
|
||||
# 55| getTypeRepr(): [TypeRepr] Int
|
||||
# 55| getElement(1): [ConcreteVarDecl] a
|
||||
# 55| Type = Int
|
||||
# 55| getElement(2): [ConcreteVarDecl] b
|
||||
# 55| Type = Int
|
||||
# 55| getElement(3): [ConcreteVarDecl] c
|
||||
# 55| Type = Int
|
||||
# 57| getElement(4): [IfStmt] if ... then { ... }
|
||||
# 57| getCondition(): [StmtCondition] StmtCondition
|
||||
# 57| getElement(0): [ConditionElement] let ...? = ...
|
||||
# 57| getPattern(): [OptionalSomePattern] let ...?
|
||||
# 57| getSubPattern(): [TuplePattern] (...)
|
||||
# 57| getElement(0): [NamedPattern] a
|
||||
# 57| getElement(1): [NamedPattern] b
|
||||
# 57| getElement(2): [NamedPattern] c
|
||||
# 57| getSubPattern().getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 57| getInitializer(): [CallExpr] call to ...
|
||||
# 57| getFunction(): [MethodLookupExpr] .some
|
||||
# 57| getBase(): [TypeExpr] Optional<(Int, Int, Int)>.Type
|
||||
# 57| getTypeRepr(): [TypeRepr] Optional<(Int, Int, Int)>
|
||||
# 57| getMethodRef(): [DeclRefExpr] some
|
||||
# 57| getArgument(0): [Argument] : (...)
|
||||
# 57| getExpr(): [TupleExpr] (...)
|
||||
# 57| getElement(0): [DeclRefExpr] a
|
||||
# 57| getElement(1): [DeclRefExpr] b
|
||||
# 57| getElement(2): [DeclRefExpr] c
|
||||
# 57| getThen(): [BraceStmt] { ... }
|
||||
# 57| getElement(0): [AssignExpr] ... = ...
|
||||
# 57| getDest(): [DiscardAssignmentExpr] _
|
||||
# 57| getSource(): [TupleExpr] (...)
|
||||
# 57| getElement(0): [DeclRefExpr] a
|
||||
# 57| getElement(1): [DeclRefExpr] c
|
||||
# 58| getElement(5): [IfStmt] if ... then { ... }
|
||||
# 58| getCondition(): [StmtCondition] StmtCondition
|
||||
# 58| getElement(0): [ConditionElement] (...) = ...
|
||||
# 58| getPattern(): [TuplePattern] (...)
|
||||
# 58| getElement(0): [ExprPattern] =~ ...
|
||||
# 58| getSubExpr(): [DeclRefExpr] a
|
||||
# 58| getElement(1): [NamedPattern] b
|
||||
# 58| getElement(1).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 58| getElement(2): [NamedPattern] c
|
||||
# 58| getElement(2).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 58| getInitializer(): [TupleExpr] (...)
|
||||
# 58| getElement(0): [DeclRefExpr] a
|
||||
# 58| getElement(1): [DeclRefExpr] b
|
||||
# 58| getElement(2): [DeclRefExpr] c
|
||||
# 58| getThen(): [BraceStmt] { ... }
|
||||
# 58| getElement(0): [AssignExpr] ... = ...
|
||||
# 58| getDest(): [DiscardAssignmentExpr] _
|
||||
# 58| getSource(): [DeclRefExpr] b
|
||||
# 58| getSource().getFullyConverted(): [ParenExpr] (...)
|
||||
# 60| getElement(6): [SwitchStmt] switch a { ... }
|
||||
# 60| getExpr(): [DeclRefExpr] a
|
||||
# 61| getCase(0): [CaseStmt] case ...
|
||||
# 61| getBody(): [BraceStmt] { ... }
|
||||
# 61| getElement(0): [StringLiteralExpr] equals c
|
||||
# 61| getLabel(0): [CaseLabelItem] =~ ...
|
||||
# 61| getPattern(): [ExprPattern] =~ ...
|
||||
# 61| getSubExpr(): [DeclRefExpr] c
|
||||
# 62| getCase(1): [CaseStmt] case ...
|
||||
# 62| getBody(): [BraceStmt] { ... }
|
||||
# 62| getElement(0): [StringLiteralExpr] binds c
|
||||
# 62| getLabel(0): [CaseLabelItem] c
|
||||
# 62| getPattern(): [NamedPattern] c
|
||||
# 62| getPattern().getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 63| getCase(2): [CaseStmt] case ...
|
||||
# 63| getBody(): [BraceStmt] { ... }
|
||||
# 63| getElement(0): [StringLiteralExpr] default
|
||||
# 63| getLabel(0): [CaseLabelItem] _
|
||||
# 63| getPattern(): [AnyPattern] _
|
||||
# 57| [ConcreteVarDecl] a
|
||||
# 57| Type = Int
|
||||
# 57| [ConcreteVarDecl] c
|
||||
# 57| Type = Int
|
||||
# 58| [ConcreteVarDecl] b
|
||||
# 58| Type = Int
|
||||
# 62| [ConcreteVarDecl] c
|
||||
# 62| Type = Int
|
||||
# 67| [ConcreteFuncDecl] source()
|
||||
# 67| InterfaceType = () -> Int
|
||||
# 67| getBody(): [BraceStmt] { ... }
|
||||
# 67| getElement(0): [ReturnStmt] return ...
|
||||
# 67| getResult(): [IntegerLiteralExpr] 0
|
||||
# 68| [ConcreteFuncDecl] sink(arg:)
|
||||
# 68| InterfaceType = (Int) -> ()
|
||||
# 68| getParam(0): [ParamDecl] arg
|
||||
# 68| Type = Int
|
||||
# 68| getBody(): [BraceStmt] { ... }
|
||||
# 70| [EnumDecl] MyEnum
|
||||
# 71| getMember(0): [EnumCaseDecl] case ...
|
||||
# 71| getMember(1): [EnumElementDecl] myNone
|
||||
# 72| getMember(2): [EnumCaseDecl] case ...
|
||||
# 72| getMember(3): [EnumElementDecl] mySingle
|
||||
# 72| getParam(0): [ParamDecl] _
|
||||
# 72| Type = Int
|
||||
# 73| getMember(4): [EnumCaseDecl] case ...
|
||||
# 73| getMember(5): [EnumElementDecl] myPair
|
||||
# 73| getParam(0): [ParamDecl] _
|
||||
# 73| Type = Int
|
||||
# 73| getParam(1): [ParamDecl] _
|
||||
# 73| Type = Int
|
||||
# 74| getMember(6): [EnumCaseDecl] case ...
|
||||
# 74| getMember(7): [EnumElementDecl] myCons
|
||||
# 74| getParam(0): [ParamDecl] _
|
||||
# 74| Type = Int
|
||||
# 74| getParam(1): [ParamDecl] _
|
||||
# 74| Type = MyEnum
|
||||
# 77| [ConcreteFuncDecl] test_enums()
|
||||
# 77| InterfaceType = () -> ()
|
||||
# 77| getBody(): [BraceStmt] { ... }
|
||||
# 78| getElement(0): [PatternBindingDecl] var ... = ...
|
||||
# 78| getInit(0): [MethodLookupExpr] .myNone
|
||||
# 78| getBase(): [TypeExpr] MyEnum.Type
|
||||
# 78| getTypeRepr(): [TypeRepr] MyEnum
|
||||
# 78| getMethodRef(): [DeclRefExpr] myNone
|
||||
# 78| getPattern(0): [TypedPattern] ... as ...
|
||||
# 78| getSubPattern(): [NamedPattern] a
|
||||
# 78| getTypeRepr(): [TypeRepr] MyEnum
|
||||
# 78| getElement(1): [ConcreteVarDecl] a
|
||||
# 78| Type = MyEnum
|
||||
# 80| getElement(2): [SwitchStmt] switch a { ... }
|
||||
# 80| getExpr(): [DeclRefExpr] a
|
||||
# 80| getExpr().getFullyConverted(): [LoadExpr] (MyEnum) ...
|
||||
# 81| getCase(0): [CaseStmt] case ...
|
||||
# 82| getBody(): [BraceStmt] { ... }
|
||||
# 82| getElement(0): [TupleExpr] (...)
|
||||
# 81| getLabel(0): [CaseLabelItem] .myNone
|
||||
# 81| getPattern(): [EnumElementPattern] .myNone
|
||||
# 83| getCase(1): [CaseStmt] case ...
|
||||
# 84| getBody(): [BraceStmt] { ... }
|
||||
# 84| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 84| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 84| getArgument(0): [Argument] arg: a
|
||||
# 84| getExpr(): [DeclRefExpr] a
|
||||
# 83| getLabel(0): [CaseLabelItem] .mySingle(...)
|
||||
# 83| getPattern(): [EnumElementPattern] .mySingle(...)
|
||||
# 83| getSubPattern(): [NamedPattern] a
|
||||
# 83| getSubPattern().getFullyUnresolved(): [ParenPattern] (...)
|
||||
# 83| getImmediateSubPattern(): [BindingPattern] let ...
|
||||
# 85| getCase(2): [CaseStmt] case ...
|
||||
# 86| getBody(): [BraceStmt] { ... }
|
||||
# 86| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 86| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 86| getArgument(0): [Argument] arg: a
|
||||
# 86| getExpr(): [DeclRefExpr] a
|
||||
# 87| getElement(1): [CallExpr] call to sink(arg:)
|
||||
# 87| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 87| getArgument(0): [Argument] arg: b
|
||||
# 87| getExpr(): [DeclRefExpr] b
|
||||
# 85| getLabel(0): [CaseLabelItem] .myPair(...)
|
||||
# 85| getPattern(): [EnumElementPattern] .myPair(...)
|
||||
# 85| getSubPattern(): [TuplePattern] (...)
|
||||
# 85| getElement(0): [NamedPattern] a
|
||||
# 85| getElement(0).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 85| getElement(1): [NamedPattern] b
|
||||
# 85| getElement(1).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 88| getCase(3): [CaseStmt] case ...
|
||||
# 89| getBody(): [BraceStmt] { ... }
|
||||
# 89| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 89| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 89| getArgument(0): [Argument] arg: a
|
||||
# 89| getExpr(): [DeclRefExpr] a
|
||||
# 88| getLabel(0): [CaseLabelItem] .myCons(...)
|
||||
# 88| getPattern(): [EnumElementPattern] .myCons(...)
|
||||
# 88| getSubPattern(): [TuplePattern] (...)
|
||||
# 88| getElement(0): [NamedPattern] a
|
||||
# 88| getElement(1): [AnyPattern] _
|
||||
# 88| getPattern().getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 92| getElement(3): [IfStmt] if ... then { ... }
|
||||
# 92| getCondition(): [StmtCondition] StmtCondition
|
||||
# 92| getElement(0): [ConditionElement] .mySingle(...) = ...
|
||||
# 92| getPattern(): [EnumElementPattern] .mySingle(...)
|
||||
# 92| getSubPattern(): [NamedPattern] x
|
||||
# 92| getSubPattern().getFullyUnresolved(): [ParenPattern] (...)
|
||||
# 92| getImmediateSubPattern(): [BindingPattern] let ...
|
||||
# 92| getInitializer(): [DeclRefExpr] a
|
||||
# 92| getInitializer().getFullyConverted(): [LoadExpr] (MyEnum) ...
|
||||
# 92| getThen(): [BraceStmt] { ... }
|
||||
# 93| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 93| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 93| getArgument(0): [Argument] arg: x
|
||||
# 93| getExpr(): [DeclRefExpr] x
|
||||
# 95| getElement(4): [IfStmt] if ... then { ... }
|
||||
# 95| getCondition(): [StmtCondition] StmtCondition
|
||||
# 95| getElement(0): [ConditionElement] .myPair(...) = ...
|
||||
# 95| getPattern(): [EnumElementPattern] .myPair(...)
|
||||
# 95| getSubPattern(): [TuplePattern] (...)
|
||||
# 95| getElement(0): [NamedPattern] x
|
||||
# 95| getElement(0).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 95| getElement(1): [NamedPattern] y
|
||||
# 95| getElement(1).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 95| getInitializer(): [DeclRefExpr] a
|
||||
# 95| getInitializer().getFullyConverted(): [LoadExpr] (MyEnum) ...
|
||||
# 95| getThen(): [BraceStmt] { ... }
|
||||
# 96| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 96| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 96| getArgument(0): [Argument] arg: x
|
||||
# 96| getExpr(): [DeclRefExpr] x
|
||||
# 97| getElement(1): [CallExpr] call to sink(arg:)
|
||||
# 97| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 97| getArgument(0): [Argument] arg: y
|
||||
# 97| getExpr(): [DeclRefExpr] y
|
||||
# 100| getElement(5): [AssignExpr] ... = ...
|
||||
# 100| getDest(): [DeclRefExpr] a
|
||||
# 100| getSource(): [CallExpr] call to ...
|
||||
# 100| getFunction(): [MethodLookupExpr] .mySingle
|
||||
# 100| getBase(): [TypeExpr] MyEnum.Type
|
||||
# 100| getTypeRepr(): [TypeRepr] MyEnum
|
||||
# 100| getMethodRef(): [DeclRefExpr] mySingle
|
||||
# 100| getArgument(0): [Argument] : call to source()
|
||||
# 100| getExpr(): [CallExpr] call to source()
|
||||
# 100| getFunction(): [DeclRefExpr] source()
|
||||
# 102| getElement(6): [SwitchStmt] switch a { ... }
|
||||
# 102| getExpr(): [DeclRefExpr] a
|
||||
# 102| getExpr().getFullyConverted(): [LoadExpr] (MyEnum) ...
|
||||
# 103| getCase(0): [CaseStmt] case ...
|
||||
# 104| getBody(): [BraceStmt] { ... }
|
||||
# 104| getElement(0): [TupleExpr] (...)
|
||||
# 103| getLabel(0): [CaseLabelItem] .myNone
|
||||
# 103| getPattern(): [EnumElementPattern] .myNone
|
||||
# 105| getCase(1): [CaseStmt] case ...
|
||||
# 106| getBody(): [BraceStmt] { ... }
|
||||
# 106| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 106| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 106| getArgument(0): [Argument] arg: a
|
||||
# 106| getExpr(): [DeclRefExpr] a
|
||||
# 105| getLabel(0): [CaseLabelItem] .mySingle(...)
|
||||
# 105| getPattern(): [EnumElementPattern] .mySingle(...)
|
||||
# 105| getSubPattern(): [NamedPattern] a
|
||||
# 105| getSubPattern().getFullyUnresolved(): [ParenPattern] (...)
|
||||
# 105| getImmediateSubPattern(): [BindingPattern] let ...
|
||||
# 107| getCase(2): [CaseStmt] case ...
|
||||
# 108| getBody(): [BraceStmt] { ... }
|
||||
# 108| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 108| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 108| getArgument(0): [Argument] arg: a
|
||||
# 108| getExpr(): [DeclRefExpr] a
|
||||
# 109| getElement(1): [CallExpr] call to sink(arg:)
|
||||
# 109| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 109| getArgument(0): [Argument] arg: b
|
||||
# 109| getExpr(): [DeclRefExpr] b
|
||||
# 107| getLabel(0): [CaseLabelItem] .myPair(...)
|
||||
# 107| getPattern(): [EnumElementPattern] .myPair(...)
|
||||
# 107| getSubPattern(): [TuplePattern] (...)
|
||||
# 107| getElement(0): [NamedPattern] a
|
||||
# 107| getElement(0).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 107| getElement(1): [NamedPattern] b
|
||||
# 107| getElement(1).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 110| getCase(3): [CaseStmt] case ...
|
||||
# 111| getBody(): [BraceStmt] { ... }
|
||||
# 111| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 111| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 111| getArgument(0): [Argument] arg: a
|
||||
# 111| getExpr(): [DeclRefExpr] a
|
||||
# 110| getLabel(0): [CaseLabelItem] .myCons(...)
|
||||
# 110| getPattern(): [EnumElementPattern] .myCons(...)
|
||||
# 110| getSubPattern(): [TuplePattern] (...)
|
||||
# 110| getElement(0): [NamedPattern] a
|
||||
# 110| getElement(1): [AnyPattern] _
|
||||
# 110| getPattern().getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 114| getElement(7): [IfStmt] if ... then { ... }
|
||||
# 114| getCondition(): [StmtCondition] StmtCondition
|
||||
# 114| getElement(0): [ConditionElement] .mySingle(...) = ...
|
||||
# 114| getPattern(): [EnumElementPattern] .mySingle(...)
|
||||
# 114| getSubPattern(): [NamedPattern] x
|
||||
# 114| getSubPattern().getFullyUnresolved(): [ParenPattern] (...)
|
||||
# 114| getImmediateSubPattern(): [BindingPattern] let ...
|
||||
# 114| getInitializer(): [DeclRefExpr] a
|
||||
# 114| getInitializer().getFullyConverted(): [LoadExpr] (MyEnum) ...
|
||||
# 114| getThen(): [BraceStmt] { ... }
|
||||
# 115| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 115| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 115| getArgument(0): [Argument] arg: x
|
||||
# 115| getExpr(): [DeclRefExpr] x
|
||||
# 117| getElement(8): [IfStmt] if ... then { ... }
|
||||
# 117| getCondition(): [StmtCondition] StmtCondition
|
||||
# 117| getElement(0): [ConditionElement] .myPair(...) = ...
|
||||
# 117| getPattern(): [EnumElementPattern] .myPair(...)
|
||||
# 117| getSubPattern(): [TuplePattern] (...)
|
||||
# 117| getElement(0): [NamedPattern] x
|
||||
# 117| getElement(0).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 117| getElement(1): [NamedPattern] y
|
||||
# 117| getElement(1).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 117| getInitializer(): [DeclRefExpr] a
|
||||
# 117| getInitializer().getFullyConverted(): [LoadExpr] (MyEnum) ...
|
||||
# 117| getThen(): [BraceStmt] { ... }
|
||||
# 118| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 118| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 118| getArgument(0): [Argument] arg: x
|
||||
# 118| getExpr(): [DeclRefExpr] x
|
||||
# 119| getElement(1): [CallExpr] call to sink(arg:)
|
||||
# 119| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 119| getArgument(0): [Argument] arg: y
|
||||
# 119| getExpr(): [DeclRefExpr] y
|
||||
# 122| getElement(9): [AssignExpr] ... = ...
|
||||
# 122| getDest(): [DeclRefExpr] a
|
||||
# 122| getSource(): [CallExpr] call to ...
|
||||
# 122| getFunction(): [MethodLookupExpr] .myPair
|
||||
# 122| getBase(): [TypeExpr] MyEnum.Type
|
||||
# 122| getTypeRepr(): [TypeRepr] MyEnum
|
||||
# 122| getMethodRef(): [DeclRefExpr] myPair
|
||||
# 122| getArgument(0): [Argument] : 0
|
||||
# 122| getExpr(): [IntegerLiteralExpr] 0
|
||||
# 122| getArgument(1): [Argument] : call to source()
|
||||
# 122| getExpr(): [CallExpr] call to source()
|
||||
# 122| getFunction(): [DeclRefExpr] source()
|
||||
# 124| getElement(10): [SwitchStmt] switch a { ... }
|
||||
# 124| getExpr(): [DeclRefExpr] a
|
||||
# 124| getExpr().getFullyConverted(): [LoadExpr] (MyEnum) ...
|
||||
# 125| getCase(0): [CaseStmt] case ...
|
||||
# 126| getBody(): [BraceStmt] { ... }
|
||||
# 126| getElement(0): [TupleExpr] (...)
|
||||
# 125| getLabel(0): [CaseLabelItem] .myNone
|
||||
# 125| getPattern(): [EnumElementPattern] .myNone
|
||||
# 127| getCase(1): [CaseStmt] case ...
|
||||
# 128| getBody(): [BraceStmt] { ... }
|
||||
# 128| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 128| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 128| getArgument(0): [Argument] arg: a
|
||||
# 128| getExpr(): [DeclRefExpr] a
|
||||
# 127| getLabel(0): [CaseLabelItem] .mySingle(...)
|
||||
# 127| getPattern(): [EnumElementPattern] .mySingle(...)
|
||||
# 127| getSubPattern(): [NamedPattern] a
|
||||
# 127| getSubPattern().getFullyUnresolved(): [ParenPattern] (...)
|
||||
# 127| getImmediateSubPattern(): [BindingPattern] let ...
|
||||
# 129| getCase(2): [CaseStmt] case ...
|
||||
# 130| getBody(): [BraceStmt] { ... }
|
||||
# 130| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 130| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 130| getArgument(0): [Argument] arg: a
|
||||
# 130| getExpr(): [DeclRefExpr] a
|
||||
# 131| getElement(1): [CallExpr] call to sink(arg:)
|
||||
# 131| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 131| getArgument(0): [Argument] arg: b
|
||||
# 131| getExpr(): [DeclRefExpr] b
|
||||
# 129| getLabel(0): [CaseLabelItem] .myPair(...)
|
||||
# 129| getPattern(): [EnumElementPattern] .myPair(...)
|
||||
# 129| getSubPattern(): [TuplePattern] (...)
|
||||
# 129| getElement(0): [NamedPattern] a
|
||||
# 129| getElement(0).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 129| getElement(1): [NamedPattern] b
|
||||
# 129| getElement(1).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 132| getCase(3): [CaseStmt] case ...
|
||||
# 133| getBody(): [BraceStmt] { ... }
|
||||
# 133| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 133| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 133| getArgument(0): [Argument] arg: a
|
||||
# 133| getExpr(): [DeclRefExpr] a
|
||||
# 132| getLabel(0): [CaseLabelItem] .myCons(...)
|
||||
# 132| getPattern(): [EnumElementPattern] .myCons(...)
|
||||
# 132| getSubPattern(): [TuplePattern] (...)
|
||||
# 132| getElement(0): [NamedPattern] a
|
||||
# 132| getElement(1): [AnyPattern] _
|
||||
# 132| getPattern().getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 136| getElement(11): [IfStmt] if ... then { ... }
|
||||
# 136| getCondition(): [StmtCondition] StmtCondition
|
||||
# 136| getElement(0): [ConditionElement] .mySingle(...) = ...
|
||||
# 136| getPattern(): [EnumElementPattern] .mySingle(...)
|
||||
# 136| getSubPattern(): [NamedPattern] x
|
||||
# 136| getSubPattern().getFullyUnresolved(): [ParenPattern] (...)
|
||||
# 136| getImmediateSubPattern(): [BindingPattern] let ...
|
||||
# 136| getInitializer(): [DeclRefExpr] a
|
||||
# 136| getInitializer().getFullyConverted(): [LoadExpr] (MyEnum) ...
|
||||
# 136| getThen(): [BraceStmt] { ... }
|
||||
# 137| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 137| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 137| getArgument(0): [Argument] arg: x
|
||||
# 137| getExpr(): [DeclRefExpr] x
|
||||
# 139| getElement(12): [IfStmt] if ... then { ... }
|
||||
# 139| getCondition(): [StmtCondition] StmtCondition
|
||||
# 139| getElement(0): [ConditionElement] .myPair(...) = ...
|
||||
# 139| getPattern(): [EnumElementPattern] .myPair(...)
|
||||
# 139| getSubPattern(): [TuplePattern] (...)
|
||||
# 139| getElement(0): [NamedPattern] x
|
||||
# 139| getElement(0).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 139| getElement(1): [NamedPattern] y
|
||||
# 139| getElement(1).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 139| getInitializer(): [DeclRefExpr] a
|
||||
# 139| getInitializer().getFullyConverted(): [LoadExpr] (MyEnum) ...
|
||||
# 139| getThen(): [BraceStmt] { ... }
|
||||
# 140| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 140| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 140| getArgument(0): [Argument] arg: x
|
||||
# 140| getExpr(): [DeclRefExpr] x
|
||||
# 141| getElement(1): [CallExpr] call to sink(arg:)
|
||||
# 141| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 141| getArgument(0): [Argument] arg: y
|
||||
# 141| getExpr(): [DeclRefExpr] y
|
||||
# 144| getElement(13): [PatternBindingDecl] var ... = ...
|
||||
# 144| getInit(0): [CallExpr] call to ...
|
||||
# 144| getFunction(): [MethodLookupExpr] .myCons
|
||||
# 144| getBase(): [TypeExpr] MyEnum.Type
|
||||
# 144| getTypeRepr(): [TypeRepr] MyEnum
|
||||
# 144| getMethodRef(): [DeclRefExpr] myCons
|
||||
# 144| getArgument(0): [Argument] : 42
|
||||
# 144| getExpr(): [IntegerLiteralExpr] 42
|
||||
# 144| getArgument(1): [Argument] : a
|
||||
# 144| getExpr(): [DeclRefExpr] a
|
||||
# 144| getExpr().getFullyConverted(): [LoadExpr] (MyEnum) ...
|
||||
# 144| getPattern(0): [TypedPattern] ... as ...
|
||||
# 144| getSubPattern(): [NamedPattern] b
|
||||
# 144| getTypeRepr(): [TypeRepr] MyEnum
|
||||
# 144| getElement(14): [ConcreteVarDecl] b
|
||||
# 144| Type = MyEnum
|
||||
# 146| getElement(15): [SwitchStmt] switch b { ... }
|
||||
# 146| getExpr(): [DeclRefExpr] b
|
||||
# 147| getCase(0): [CaseStmt] case ...
|
||||
# 148| getBody(): [BraceStmt] { ... }
|
||||
# 148| getElement(0): [TupleExpr] (...)
|
||||
# 147| getLabel(0): [CaseLabelItem] .myNone
|
||||
# 147| getPattern(): [EnumElementPattern] .myNone
|
||||
# 149| getCase(1): [CaseStmt] case ...
|
||||
# 150| getBody(): [BraceStmt] { ... }
|
||||
# 150| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 150| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 150| getArgument(0): [Argument] arg: a
|
||||
# 150| getExpr(): [DeclRefExpr] a
|
||||
# 149| getLabel(0): [CaseLabelItem] .mySingle(...)
|
||||
# 149| getPattern(): [EnumElementPattern] .mySingle(...)
|
||||
# 149| getSubPattern(): [NamedPattern] a
|
||||
# 149| getSubPattern().getFullyUnresolved(): [ParenPattern] (...)
|
||||
# 149| getImmediateSubPattern(): [BindingPattern] let ...
|
||||
# 151| getCase(2): [CaseStmt] case ...
|
||||
# 152| getBody(): [BraceStmt] { ... }
|
||||
# 152| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 152| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 152| getArgument(0): [Argument] arg: a
|
||||
# 152| getExpr(): [DeclRefExpr] a
|
||||
# 153| getElement(1): [CallExpr] call to sink(arg:)
|
||||
# 153| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 153| getArgument(0): [Argument] arg: b
|
||||
# 153| getExpr(): [DeclRefExpr] b
|
||||
# 151| getLabel(0): [CaseLabelItem] .myPair(...)
|
||||
# 151| getPattern(): [EnumElementPattern] .myPair(...)
|
||||
# 151| getSubPattern(): [TuplePattern] (...)
|
||||
# 151| getElement(0): [NamedPattern] a
|
||||
# 151| getElement(0).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 151| getElement(1): [NamedPattern] b
|
||||
# 151| getElement(1).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 154| getCase(3): [CaseStmt] case ...
|
||||
# 155| getBody(): [BraceStmt] { ... }
|
||||
# 155| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 155| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 155| getArgument(0): [Argument] arg: a
|
||||
# 155| getExpr(): [DeclRefExpr] a
|
||||
# 156| getElement(1): [CallExpr] call to sink(arg:)
|
||||
# 156| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 156| getArgument(0): [Argument] arg: b
|
||||
# 156| getExpr(): [DeclRefExpr] b
|
||||
# 157| getElement(2): [CallExpr] call to sink(arg:)
|
||||
# 157| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 157| getArgument(0): [Argument] arg: c
|
||||
# 157| getExpr(): [DeclRefExpr] c
|
||||
# 154| getLabel(0): [CaseLabelItem] .myCons(...)
|
||||
# 154| getPattern(): [EnumElementPattern] .myCons(...)
|
||||
# 154| getSubPattern(): [TuplePattern] (...)
|
||||
# 154| getElement(0): [NamedPattern] a
|
||||
# 154| getElement(1): [EnumElementPattern] .myPair(...)
|
||||
# 154| getSubPattern(): [TuplePattern] (...)
|
||||
# 154| getElement(0): [NamedPattern] b
|
||||
# 154| getElement(1): [NamedPattern] c
|
||||
# 154| getPattern().getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 158| getCase(4): [CaseStmt] case ...
|
||||
# 159| getBody(): [BraceStmt] { ... }
|
||||
# 159| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 159| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 159| getArgument(0): [Argument] arg: a
|
||||
# 159| getExpr(): [DeclRefExpr] a
|
||||
# 158| getLabel(0): [CaseLabelItem] .myCons(...)
|
||||
# 158| getPattern(): [EnumElementPattern] .myCons(...)
|
||||
# 158| getSubPattern(): [TuplePattern] (...)
|
||||
# 158| getElement(0): [NamedPattern] a
|
||||
# 158| getElement(1): [AnyPattern] _
|
||||
# 158| getPattern().getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 162| getElement(16): [IfStmt] if ... then { ... }
|
||||
# 162| getCondition(): [StmtCondition] StmtCondition
|
||||
# 162| getElement(0): [ConditionElement] .mySingle(...) = ...
|
||||
# 162| getPattern(): [EnumElementPattern] .mySingle(...)
|
||||
# 162| getSubPattern(): [NamedPattern] x
|
||||
# 162| getSubPattern().getFullyUnresolved(): [ParenPattern] (...)
|
||||
# 162| getImmediateSubPattern(): [BindingPattern] let ...
|
||||
# 162| getInitializer(): [CallExpr] call to ...
|
||||
# 162| getFunction(): [MethodLookupExpr] .myPair
|
||||
# 162| getBase(): [TypeExpr] MyEnum.Type
|
||||
# 162| getTypeRepr(): [TypeRepr] MyEnum
|
||||
# 162| getMethodRef(): [DeclRefExpr] myPair
|
||||
# 162| getArgument(0): [Argument] : call to source()
|
||||
# 162| getExpr(): [CallExpr] call to source()
|
||||
# 162| getFunction(): [DeclRefExpr] source()
|
||||
# 162| getArgument(1): [Argument] : 0
|
||||
# 162| getExpr(): [IntegerLiteralExpr] 0
|
||||
# 162| getThen(): [BraceStmt] { ... }
|
||||
# 163| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 163| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 163| getArgument(0): [Argument] arg: x
|
||||
# 163| getExpr(): [DeclRefExpr] x
|
||||
# 165| getElement(17): [IfStmt] if ... then { ... }
|
||||
# 165| getCondition(): [StmtCondition] StmtCondition
|
||||
# 165| getElement(0): [ConditionElement] .myPair(...) = ...
|
||||
# 165| getPattern(): [EnumElementPattern] .myPair(...)
|
||||
# 165| getSubPattern(): [TuplePattern] (...)
|
||||
# 165| getElement(0): [NamedPattern] x
|
||||
# 165| getElement(0).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 165| getElement(1): [NamedPattern] y
|
||||
# 165| getElement(1).getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 165| getInitializer(): [CallExpr] call to ...
|
||||
# 165| getFunction(): [MethodLookupExpr] .myPair
|
||||
# 165| getBase(): [TypeExpr] MyEnum.Type
|
||||
# 165| getTypeRepr(): [TypeRepr] MyEnum
|
||||
# 165| getMethodRef(): [DeclRefExpr] myPair
|
||||
# 165| getArgument(0): [Argument] : call to source()
|
||||
# 165| getExpr(): [CallExpr] call to source()
|
||||
# 165| getFunction(): [DeclRefExpr] source()
|
||||
# 165| getArgument(1): [Argument] : 0
|
||||
# 165| getExpr(): [IntegerLiteralExpr] 0
|
||||
# 165| getThen(): [BraceStmt] { ... }
|
||||
# 166| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 166| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 166| getArgument(0): [Argument] arg: x
|
||||
# 166| getExpr(): [DeclRefExpr] x
|
||||
# 167| getElement(1): [CallExpr] call to sink(arg:)
|
||||
# 167| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 167| getArgument(0): [Argument] arg: y
|
||||
# 167| getExpr(): [DeclRefExpr] y
|
||||
# 169| getElement(18): [IfStmt] if ... then { ... }
|
||||
# 169| getCondition(): [StmtCondition] StmtCondition
|
||||
# 169| getElement(0): [ConditionElement] .myCons(...) = ...
|
||||
# 169| getPattern(): [EnumElementPattern] .myCons(...)
|
||||
# 169| getSubPattern(): [TuplePattern] (...)
|
||||
# 169| getElement(0): [AnyPattern] _
|
||||
# 169| getElement(1): [EnumElementPattern] .myPair(...)
|
||||
# 169| getSubPattern(): [TuplePattern] (...)
|
||||
# 169| getElement(0): [AnyPattern] _
|
||||
# 169| getElement(1): [NamedPattern] c
|
||||
# 169| getPattern().getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 169| getInitializer(): [DeclRefExpr] b
|
||||
# 169| getThen(): [BraceStmt] { ... }
|
||||
# 170| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 170| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 170| getArgument(0): [Argument] arg: c
|
||||
# 170| getExpr(): [DeclRefExpr] c
|
||||
# 173| getElement(19): [SwitchStmt] switch (...) { ... }
|
||||
# 173| getExpr(): [TupleExpr] (...)
|
||||
# 173| getElement(0): [DeclRefExpr] a
|
||||
# 173| getElement(0).getFullyConverted(): [LoadExpr] (MyEnum) ...
|
||||
# 173| getElement(1): [DeclRefExpr] b
|
||||
# 174| getCase(0): [CaseStmt] case ...
|
||||
# 175| getBody(): [BraceStmt] { ... }
|
||||
# 175| getElement(0): [CallExpr] call to sink(arg:)
|
||||
# 175| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 175| getArgument(0): [Argument] arg: a
|
||||
# 175| getExpr(): [DeclRefExpr] a
|
||||
# 176| getElement(1): [CallExpr] call to sink(arg:)
|
||||
# 176| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 176| getArgument(0): [Argument] arg: b
|
||||
# 176| getExpr(): [DeclRefExpr] b
|
||||
# 177| getElement(2): [CallExpr] call to sink(arg:)
|
||||
# 177| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 177| getArgument(0): [Argument] arg: c
|
||||
# 177| getExpr(): [DeclRefExpr] c
|
||||
# 178| getElement(3): [CallExpr] call to sink(arg:)
|
||||
# 178| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 178| getArgument(0): [Argument] arg: d
|
||||
# 178| getExpr(): [DeclRefExpr] d
|
||||
# 179| getElement(4): [CallExpr] call to sink(arg:)
|
||||
# 179| getFunction(): [DeclRefExpr] sink(arg:)
|
||||
# 179| getArgument(0): [Argument] arg: e
|
||||
# 179| getExpr(): [DeclRefExpr] e
|
||||
# 174| getLabel(0): [CaseLabelItem] (...)
|
||||
# 174| getPattern(): [TuplePattern] (...)
|
||||
# 174| getElement(0): [EnumElementPattern] .myPair(...)
|
||||
# 174| getSubPattern(): [TuplePattern] (...)
|
||||
# 174| getElement(0): [NamedPattern] a
|
||||
# 174| getElement(1): [NamedPattern] b
|
||||
# 174| getElement(1): [EnumElementPattern] .myCons(...)
|
||||
# 174| getSubPattern(): [TuplePattern] (...)
|
||||
# 174| getElement(0): [NamedPattern] c
|
||||
# 174| getElement(1): [EnumElementPattern] .myPair(...)
|
||||
# 174| getSubPattern(): [TuplePattern] (...)
|
||||
# 174| getElement(0): [NamedPattern] d
|
||||
# 174| getElement(1): [NamedPattern] e
|
||||
# 174| getPattern().getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 180| getCase(1): [CaseStmt] case ...
|
||||
# 181| getBody(): [BraceStmt] { ... }
|
||||
# 181| getElement(0): [TupleExpr] (...)
|
||||
# 180| getLabel(0): [CaseLabelItem] _
|
||||
# 180| getPattern(): [AnyPattern] _
|
||||
# 83| [ConcreteVarDecl] a
|
||||
# 83| Type = (Int)
|
||||
# 85| [ConcreteVarDecl] a
|
||||
# 85| Type = Int
|
||||
# 85| [ConcreteVarDecl] b
|
||||
# 85| Type = Int
|
||||
# 88| [ConcreteVarDecl] a
|
||||
# 88| Type = Int
|
||||
# 92| [ConcreteVarDecl] x
|
||||
# 92| Type = (Int)
|
||||
# 95| [ConcreteVarDecl] x
|
||||
# 95| Type = Int
|
||||
# 95| [ConcreteVarDecl] y
|
||||
# 95| Type = Int
|
||||
# 105| [ConcreteVarDecl] a
|
||||
# 105| Type = (Int)
|
||||
# 107| [ConcreteVarDecl] a
|
||||
# 107| Type = Int
|
||||
# 107| [ConcreteVarDecl] b
|
||||
# 107| Type = Int
|
||||
# 110| [ConcreteVarDecl] a
|
||||
# 110| Type = Int
|
||||
# 114| [ConcreteVarDecl] x
|
||||
# 114| Type = (Int)
|
||||
# 117| [ConcreteVarDecl] x
|
||||
# 117| Type = Int
|
||||
# 117| [ConcreteVarDecl] y
|
||||
# 117| Type = Int
|
||||
# 127| [ConcreteVarDecl] a
|
||||
# 127| Type = (Int)
|
||||
# 129| [ConcreteVarDecl] a
|
||||
# 129| Type = Int
|
||||
# 129| [ConcreteVarDecl] b
|
||||
# 129| Type = Int
|
||||
# 132| [ConcreteVarDecl] a
|
||||
# 132| Type = Int
|
||||
# 136| [ConcreteVarDecl] x
|
||||
# 136| Type = (Int)
|
||||
# 139| [ConcreteVarDecl] x
|
||||
# 139| Type = Int
|
||||
# 139| [ConcreteVarDecl] y
|
||||
# 139| Type = Int
|
||||
# 149| [ConcreteVarDecl] a
|
||||
# 149| Type = (Int)
|
||||
# 151| [ConcreteVarDecl] a
|
||||
# 151| Type = Int
|
||||
# 151| [ConcreteVarDecl] b
|
||||
# 151| Type = Int
|
||||
# 154| [ConcreteVarDecl] a
|
||||
# 154| Type = Int
|
||||
# 154| [ConcreteVarDecl] b
|
||||
# 154| Type = Int
|
||||
# 154| [ConcreteVarDecl] c
|
||||
# 154| Type = Int
|
||||
# 158| [ConcreteVarDecl] a
|
||||
# 158| Type = Int
|
||||
# 162| [ConcreteVarDecl] x
|
||||
# 162| Type = (Int)
|
||||
# 165| [ConcreteVarDecl] x
|
||||
# 165| Type = Int
|
||||
# 165| [ConcreteVarDecl] y
|
||||
# 165| Type = Int
|
||||
# 169| [ConcreteVarDecl] c
|
||||
# 169| Type = Int
|
||||
# 174| [ConcreteVarDecl] a
|
||||
# 174| Type = Int
|
||||
# 174| [ConcreteVarDecl] b
|
||||
# 174| Type = Int
|
||||
# 174| [ConcreteVarDecl] c
|
||||
# 174| Type = Int
|
||||
# 174| [ConcreteVarDecl] d
|
||||
# 174| Type = Int
|
||||
# 174| [ConcreteVarDecl] e
|
||||
# 174| Type = Int
|
||||
statements.swift:
|
||||
# 1| [ConcreteFuncDecl] loop()
|
||||
# 1| InterfaceType = () -> ()
|
||||
@@ -5621,9 +6293,9 @@ statements.swift:
|
||||
# 22| getExpr(): [DefaultArgumentExpr] default separator
|
||||
# 22| getArgument(2): [Argument] terminator: default terminator
|
||||
# 22| getExpr(): [DefaultArgumentExpr] default terminator
|
||||
# 21| getLabel(0): [CaseLabelItem] let ...
|
||||
# 21| getPattern(): [BindingPattern] let ...
|
||||
# 21| getSubPattern(): [NamedPattern] error
|
||||
# 21| getLabel(0): [CaseLabelItem] error
|
||||
# 21| getPattern(): [NamedPattern] error
|
||||
# 21| getPattern().getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 25| getElement(7): [DoCatchStmt] do { ... } catch { ... }
|
||||
# 25| getBody(): [BraceStmt] { ... }
|
||||
# 26| getElement(0): [TryExpr] try ...
|
||||
@@ -5660,9 +6332,9 @@ statements.swift:
|
||||
# 30| getExpr(): [DefaultArgumentExpr] default separator
|
||||
# 30| getArgument(2): [Argument] terminator: default terminator
|
||||
# 30| getExpr(): [DefaultArgumentExpr] default terminator
|
||||
# 29| getLabel(0): [CaseLabelItem] let ...
|
||||
# 29| getPattern(): [BindingPattern] let ...
|
||||
# 29| getSubPattern(): [NamedPattern] error
|
||||
# 29| getLabel(0): [CaseLabelItem] error
|
||||
# 29| getPattern(): [NamedPattern] error
|
||||
# 29| getPattern().getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 2| [ConcreteVarDecl] i
|
||||
# 2| Type = Int
|
||||
# 21| [ConcreteVarDecl] error
|
||||
@@ -5884,10 +6556,10 @@ statements.swift:
|
||||
# 65| getBody(): [BraceStmt] { ... }
|
||||
# 65| getElement(0): [IfStmt] if ... then { ... }
|
||||
# 65| getCondition(): [StmtCondition] StmtCondition
|
||||
# 65| getElement(0): [ConditionElement] let ... = ...
|
||||
# 65| getPattern(): [BindingPattern] let ...
|
||||
# 65| getSubPattern(): [OptionalSomePattern] let ...?
|
||||
# 65| getSubPattern(): [NamedPattern] xx
|
||||
# 65| getElement(0): [ConditionElement] let ...? = ...
|
||||
# 65| getPattern(): [OptionalSomePattern] let ...?
|
||||
# 65| getSubPattern(): [NamedPattern] xx
|
||||
# 65| getPattern().getFullyUnresolved(): [BindingPattern] let ...
|
||||
# 65| getInitializer(): [DeclRefExpr] x
|
||||
# 65| getThen(): [BraceStmt] { ... }
|
||||
# 67| [TopLevelCodeDecl] { ... }
|
||||
|
||||
@@ -50,3 +50,134 @@ func switch_patterns() {
|
||||
case false: "false"
|
||||
}
|
||||
}
|
||||
|
||||
func bound_and_unbound() {
|
||||
let a = 1, b = 2, c: Int = 3
|
||||
|
||||
if let (a, b, c) = Optional.some((a, b, c)) { _ = (a, c) }
|
||||
if case (a, let b, let c) = (a, b, c) { _ = (b) }
|
||||
|
||||
switch a {
|
||||
case c: "equals c"
|
||||
case let c: "binds c"
|
||||
default: "default"
|
||||
}
|
||||
}
|
||||
|
||||
func source() -> Int { 0 }
|
||||
func sink(arg: Int) { }
|
||||
|
||||
indirect enum MyEnum {
|
||||
case myNone
|
||||
case mySingle(Int)
|
||||
case myPair(Int, Int)
|
||||
case myCons(Int, MyEnum)
|
||||
}
|
||||
|
||||
func test_enums() {
|
||||
var a : MyEnum = .myNone
|
||||
|
||||
switch a {
|
||||
case .myNone:
|
||||
()
|
||||
case .mySingle(let a):
|
||||
sink(arg: a)
|
||||
case .myPair(let a, let b):
|
||||
sink(arg: a)
|
||||
sink(arg: b)
|
||||
case let .myCons(a, _):
|
||||
sink(arg: a)
|
||||
}
|
||||
|
||||
if case .mySingle(let x) = a {
|
||||
sink(arg: x)
|
||||
}
|
||||
if case .myPair(let x, let y) = a {
|
||||
sink(arg: x)
|
||||
sink(arg: y)
|
||||
}
|
||||
|
||||
a = .mySingle(source())
|
||||
|
||||
switch a {
|
||||
case .myNone:
|
||||
()
|
||||
case .mySingle(let a):
|
||||
sink(arg: a)
|
||||
case .myPair(let a, let b):
|
||||
sink(arg: a)
|
||||
sink(arg: b)
|
||||
case let .myCons(a, _):
|
||||
sink(arg: a)
|
||||
}
|
||||
|
||||
if case .mySingle(let x) = a {
|
||||
sink(arg: x)
|
||||
}
|
||||
if case .myPair(let x, let y) = a {
|
||||
sink(arg: x)
|
||||
sink(arg: y)
|
||||
}
|
||||
|
||||
a = MyEnum.myPair(0, source())
|
||||
|
||||
switch a {
|
||||
case .myNone:
|
||||
()
|
||||
case .mySingle(let a):
|
||||
sink(arg: a)
|
||||
case .myPair(let a, let b):
|
||||
sink(arg: a)
|
||||
sink(arg: b)
|
||||
case let .myCons(a, _):
|
||||
sink(arg: a)
|
||||
}
|
||||
|
||||
if case .mySingle(let x) = a {
|
||||
sink(arg: x)
|
||||
}
|
||||
if case .myPair(let x, let y) = a {
|
||||
sink(arg: x)
|
||||
sink(arg: y)
|
||||
}
|
||||
|
||||
let b: MyEnum = .myCons(42, a)
|
||||
|
||||
switch b {
|
||||
case .myNone:
|
||||
()
|
||||
case .mySingle(let a):
|
||||
sink(arg: a)
|
||||
case .myPair(let a, let b):
|
||||
sink(arg: a)
|
||||
sink(arg: b)
|
||||
case let .myCons(a, .myPair(b, c)):
|
||||
sink(arg: a)
|
||||
sink(arg: b)
|
||||
sink(arg: c)
|
||||
case let .myCons(a, _):
|
||||
sink(arg: a)
|
||||
}
|
||||
|
||||
if case .mySingle(let x) = MyEnum.myPair(source(), 0) {
|
||||
sink(arg: x)
|
||||
}
|
||||
if case MyEnum.myPair(let x, let y) = .myPair(source(), 0) {
|
||||
sink(arg: x)
|
||||
sink(arg: y)
|
||||
}
|
||||
if case let .myCons(_, .myPair(_, c)) = b {
|
||||
sink(arg: c)
|
||||
}
|
||||
|
||||
switch (a, b) {
|
||||
case let (.myPair(a, b), .myCons(c, .myPair(d, e))):
|
||||
sink(arg: a)
|
||||
sink(arg: b)
|
||||
sink(arg: c)
|
||||
sink(arg: d)
|
||||
sink(arg: e)
|
||||
default:
|
||||
()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,7 +334,10 @@ cfg.swift:
|
||||
#-----| -> default separator
|
||||
|
||||
# 39| case ...
|
||||
#-----| -> let ...
|
||||
#-----| -> error
|
||||
|
||||
# 39| error
|
||||
#-----| -> error
|
||||
|
||||
# 39| error
|
||||
#-----| match -> let ...
|
||||
@@ -342,9 +345,6 @@ cfg.swift:
|
||||
# 39| let ...
|
||||
#-----| match -> print(_:separator:terminator:)
|
||||
|
||||
# 39| let ...
|
||||
#-----| -> error
|
||||
|
||||
# 40| print(_:separator:terminator:)
|
||||
|
||||
# 40| call to print(_:separator:terminator:)
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
edges
|
||||
| file://:0:0:0:0 | [summary param] this in signum() : | file://:0:0:0:0 | [summary] to write: return (return) in signum() : |
|
||||
| file://:0:0:0:0 | [summary param] this in signum() [some:0] : | file://:0:0:0:0 | [summary] to write: return (return) in signum() [some:0] : |
|
||||
| file://:0:0:0:0 | self [a, x] : | file://:0:0:0:0 | .a [x] : |
|
||||
| file://:0:0:0:0 | self [str] : | file://:0:0:0:0 | .str : |
|
||||
| file://:0:0:0:0 | self [x] : | file://:0:0:0:0 | .x : |
|
||||
| file://:0:0:0:0 | self [x, some:0] : | file://:0:0:0:0 | .x [some:0] : |
|
||||
| file://:0:0:0:0 | self [x] : | file://:0:0:0:0 | .x : |
|
||||
| file://:0:0:0:0 | value : | file://:0:0:0:0 | [post] self [x] : |
|
||||
| file://:0:0:0:0 | value : | file://:0:0:0:0 | [post] self [x] : |
|
||||
| file://:0:0:0:0 | value [some:0] : | file://:0:0:0:0 | [post] self [x, some:0] : |
|
||||
| test.swift:6:19:6:26 | call to source() : | test.swift:7:15:7:15 | t1 |
|
||||
| test.swift:6:19:6:26 | call to source() : | test.swift:9:15:9:15 | t1 |
|
||||
| test.swift:6:19:6:26 | call to source() : | test.swift:10:15:10:15 | t2 |
|
||||
@@ -102,9 +103,11 @@ edges
|
||||
| test.swift:219:13:219:15 | .a [x] : | test.swift:219:13:219:17 | .x |
|
||||
| test.swift:225:14:225:21 | call to source() : | test.swift:235:13:235:15 | .source_value |
|
||||
| test.swift:225:14:225:21 | call to source() : | test.swift:238:13:238:15 | .source_value |
|
||||
| test.swift:259:12:259:19 | call to source() : | test.swift:259:12:259:19 | call to source() [some:0] : |
|
||||
| test.swift:259:12:259:19 | call to source() : | test.swift:263:13:263:28 | call to optionalSource() : |
|
||||
| test.swift:259:12:259:19 | call to source() : | test.swift:439:13:439:28 | call to optionalSource() : |
|
||||
| test.swift:259:12:259:19 | call to source() : | test.swift:466:13:466:28 | call to optionalSource() : |
|
||||
| test.swift:259:12:259:19 | call to source() [some:0] : | test.swift:263:13:263:28 | call to optionalSource() [some:0] : |
|
||||
| test.swift:259:12:259:19 | call to source() [some:0] : | test.swift:486:13:486:28 | call to optionalSource() [some:0] : |
|
||||
| test.swift:259:12:259:19 | call to source() [some:0] : | test.swift:513:13:513:28 | call to optionalSource() [some:0] : |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() : | test.swift:265:15:265:15 | x |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() : | test.swift:267:15:267:16 | ...! |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() : | test.swift:271:15:271:16 | ...? : |
|
||||
@@ -112,11 +115,13 @@ edges
|
||||
| test.swift:263:13:263:28 | call to optionalSource() : | test.swift:275:15:275:27 | ... ??(_:_:) ... |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() : | test.swift:279:15:279:31 | ... ? ... : ... |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() : | test.swift:280:15:280:38 | ... ? ... : ... |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() : | test.swift:285:19:285:19 | z |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() : | test.swift:291:16:291:17 | ...? : |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() : | test.swift:300:15:300:15 | z1 |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() : | test.swift:303:15:303:16 | ...! : |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() : | test.swift:307:19:307:19 | z |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() [some:0] : | test.swift:284:8:284:12 | let ...? [some:0] : |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() [some:0] : | test.swift:291:16:291:17 | ...? [some:0] : |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() [some:0] : | test.swift:298:11:298:15 | let ...? [some:0] : |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() [some:0] : | test.swift:306:13:306:24 | .some(...) [some:0] : |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() [some:0] : | test.swift:314:10:314:21 | .some(...) [some:0] : |
|
||||
| test.swift:270:15:270:22 | call to source() : | file://:0:0:0:0 | [summary param] this in signum() : |
|
||||
| test.swift:270:15:270:22 | call to source() : | test.swift:270:15:270:31 | call to signum() |
|
||||
| test.swift:271:15:271:16 | ...? : | file://:0:0:0:0 | [summary param] this in signum() : |
|
||||
@@ -124,69 +129,141 @@ edges
|
||||
| test.swift:271:15:271:25 | call to signum() : | test.swift:271:15:271:25 | OptionalEvaluationExpr |
|
||||
| test.swift:280:31:280:38 | call to source() : | test.swift:280:15:280:38 | ... ? ... : ... |
|
||||
| test.swift:282:31:282:38 | call to source() : | test.swift:282:15:282:38 | ... ? ... : ... |
|
||||
| test.swift:284:8:284:12 | let ...? [some:0] : | test.swift:284:12:284:12 | z : |
|
||||
| test.swift:284:12:284:12 | z : | test.swift:285:19:285:19 | z |
|
||||
| test.swift:291:8:291:12 | let ...? [some:0] : | test.swift:291:12:291:12 | z : |
|
||||
| test.swift:291:12:291:12 | z : | test.swift:292:19:292:19 | z |
|
||||
| test.swift:291:16:291:17 | ...? : | file://:0:0:0:0 | [summary param] this in signum() : |
|
||||
| test.swift:291:16:291:17 | ...? : | test.swift:291:16:291:26 | call to signum() : |
|
||||
| test.swift:291:16:291:26 | call to signum() : | test.swift:292:19:292:19 | z |
|
||||
| test.swift:291:16:291:17 | ...? [some:0] : | file://:0:0:0:0 | [summary param] this in signum() [some:0] : |
|
||||
| test.swift:291:16:291:17 | ...? [some:0] : | test.swift:291:16:291:26 | call to signum() [some:0] : |
|
||||
| test.swift:291:16:291:26 | call to signum() : | test.swift:291:16:291:26 | call to signum() [some:0] : |
|
||||
| test.swift:291:16:291:26 | call to signum() [some:0] : | test.swift:291:8:291:12 | let ...? [some:0] : |
|
||||
| test.swift:298:11:298:15 | let ...? [some:0] : | test.swift:298:15:298:15 | z1 : |
|
||||
| test.swift:298:15:298:15 | z1 : | test.swift:300:15:300:15 | z1 |
|
||||
| test.swift:303:15:303:16 | ...! : | file://:0:0:0:0 | [summary param] this in signum() : |
|
||||
| test.swift:303:15:303:16 | ...! : | test.swift:303:15:303:25 | call to signum() |
|
||||
| test.swift:306:13:306:24 | .some(...) [some:0] : | test.swift:306:23:306:23 | z : |
|
||||
| test.swift:306:23:306:23 | z : | test.swift:307:19:307:19 | z |
|
||||
| test.swift:314:10:314:21 | .some(...) [some:0] : | test.swift:314:20:314:20 | z : |
|
||||
| test.swift:314:20:314:20 | z : | test.swift:315:19:315:19 | z |
|
||||
| test.swift:331:14:331:26 | (...) [Tuple element at index 1] : | test.swift:335:15:335:15 | t1 [Tuple element at index 1] : |
|
||||
| test.swift:331:18:331:25 | call to source() : | test.swift:331:14:331:26 | (...) [Tuple element at index 1] : |
|
||||
| test.swift:335:15:335:15 | t1 [Tuple element at index 1] : | test.swift:335:15:335:18 | .1 |
|
||||
| test.swift:343:5:343:5 | [post] t1 [Tuple element at index 0] : | test.swift:346:15:346:15 | t1 [Tuple element at index 0] : |
|
||||
| test.swift:343:12:343:19 | call to source() : | test.swift:343:5:343:5 | [post] t1 [Tuple element at index 0] : |
|
||||
| test.swift:346:15:346:15 | t1 [Tuple element at index 0] : | test.swift:346:15:346:18 | .0 |
|
||||
| test.swift:351:14:351:45 | (...) [Tuple element at index 0] : | test.swift:353:9:353:17 | (...) [Tuple element at index 0] : |
|
||||
| test.swift:351:14:351:45 | (...) [Tuple element at index 0] : | test.swift:356:15:356:15 | t1 [Tuple element at index 0] : |
|
||||
| test.swift:351:14:351:45 | (...) [Tuple element at index 0] : | test.swift:360:15:360:15 | t2 [Tuple element at index 0] : |
|
||||
| test.swift:351:14:351:45 | (...) [Tuple element at index 1] : | test.swift:353:9:353:17 | (...) [Tuple element at index 1] : |
|
||||
| test.swift:351:14:351:45 | (...) [Tuple element at index 1] : | test.swift:357:15:357:15 | t1 [Tuple element at index 1] : |
|
||||
| test.swift:351:14:351:45 | (...) [Tuple element at index 1] : | test.swift:361:15:361:15 | t2 [Tuple element at index 1] : |
|
||||
| test.swift:351:18:351:25 | call to source() : | test.swift:351:14:351:45 | (...) [Tuple element at index 0] : |
|
||||
| test.swift:351:31:351:38 | call to source() : | test.swift:351:14:351:45 | (...) [Tuple element at index 1] : |
|
||||
| test.swift:353:9:353:17 | (...) [Tuple element at index 0] : | test.swift:353:10:353:10 | a : |
|
||||
| test.swift:353:9:353:17 | (...) [Tuple element at index 1] : | test.swift:353:13:353:13 | b : |
|
||||
| test.swift:353:10:353:10 | a : | test.swift:363:15:363:15 | a |
|
||||
| test.swift:353:13:353:13 | b : | test.swift:364:15:364:15 | b |
|
||||
| test.swift:356:15:356:15 | t1 [Tuple element at index 0] : | test.swift:356:15:356:18 | .0 |
|
||||
| test.swift:357:15:357:15 | t1 [Tuple element at index 1] : | test.swift:357:15:357:18 | .1 |
|
||||
| test.swift:360:15:360:15 | t2 [Tuple element at index 0] : | test.swift:360:15:360:18 | .0 |
|
||||
| test.swift:361:15:361:15 | t2 [Tuple element at index 1] : | test.swift:361:15:361:18 | .1 |
|
||||
| test.swift:439:13:439:28 | call to optionalSource() : | test.swift:442:19:442:19 | a |
|
||||
| test.swift:462:9:462:9 | self [x] : | file://:0:0:0:0 | self [x] : |
|
||||
| test.swift:462:9:462:9 | value : | file://:0:0:0:0 | value : |
|
||||
| test.swift:466:13:466:28 | call to optionalSource() : | test.swift:468:12:468:12 | x : |
|
||||
| test.swift:468:5:468:5 | [post] cx [x] : | test.swift:472:20:472:20 | cx [x] : |
|
||||
| test.swift:468:12:468:12 | x : | test.swift:462:9:462:9 | value : |
|
||||
| test.swift:468:12:468:12 | x : | test.swift:468:5:468:5 | [post] cx [x] : |
|
||||
| test.swift:472:20:472:20 | cx [x] : | test.swift:462:9:462:9 | self [x] : |
|
||||
| test.swift:472:20:472:20 | cx [x] : | test.swift:472:20:472:23 | .x : |
|
||||
| test.swift:472:20:472:23 | .x : | test.swift:473:15:473:15 | z1 |
|
||||
| test.swift:479:14:479:21 | call to source() : | test.swift:479:13:479:21 | call to +(_:) |
|
||||
| test.swift:488:9:488:9 | self [str] : | file://:0:0:0:0 | self [str] : |
|
||||
| test.swift:489:10:489:13 | s : | test.swift:490:13:490:13 | s : |
|
||||
| test.swift:490:7:490:7 | [post] self [str] : | test.swift:489:5:491:5 | self[return] [str] : |
|
||||
| test.swift:490:13:490:13 | s : | test.swift:490:7:490:7 | [post] self [str] : |
|
||||
| test.swift:495:17:498:5 | self[return] [str] : | test.swift:503:13:503:41 | call to Self.init(contentsOfFile:) [str] : |
|
||||
| test.swift:496:7:496:7 | [post] self [str] : | test.swift:495:17:498:5 | self[return] [str] : |
|
||||
| test.swift:496:7:496:7 | [post] self [str] : | test.swift:497:17:497:17 | self [str] : |
|
||||
| test.swift:496:20:496:28 | call to source3() : | test.swift:489:10:489:13 | s : |
|
||||
| test.swift:496:20:496:28 | call to source3() : | test.swift:496:7:496:7 | [post] self [str] : |
|
||||
| test.swift:497:17:497:17 | self [str] : | test.swift:497:17:497:17 | .str |
|
||||
| test.swift:502:13:502:33 | call to MyClass.init(s:) [str] : | test.swift:488:9:488:9 | self [str] : |
|
||||
| test.swift:502:13:502:33 | call to MyClass.init(s:) [str] : | test.swift:502:13:502:35 | .str |
|
||||
| test.swift:502:24:502:32 | call to source3() : | test.swift:489:10:489:13 | s : |
|
||||
| test.swift:502:24:502:32 | call to source3() : | test.swift:502:13:502:33 | call to MyClass.init(s:) [str] : |
|
||||
| test.swift:503:13:503:41 | call to Self.init(contentsOfFile:) [str] : | test.swift:488:9:488:9 | self [str] : |
|
||||
| test.swift:503:13:503:41 | call to Self.init(contentsOfFile:) [str] : | test.swift:503:13:503:43 | .str |
|
||||
| test.swift:398:9:398:27 | call to ... [mySingle:0] : | test.swift:403:10:403:25 | .mySingle(...) [mySingle:0] : |
|
||||
| test.swift:398:9:398:27 | call to ... [mySingle:0] : | test.swift:412:13:412:28 | .mySingle(...) [mySingle:0] : |
|
||||
| test.swift:398:19:398:26 | call to source() : | test.swift:398:9:398:27 | call to ... [mySingle:0] : |
|
||||
| test.swift:403:10:403:25 | .mySingle(...) [mySingle:0] : | test.swift:403:24:403:24 | a : |
|
||||
| test.swift:403:24:403:24 | a : | test.swift:404:19:404:19 | a |
|
||||
| test.swift:412:13:412:28 | .mySingle(...) [mySingle:0] : | test.swift:412:27:412:27 | x : |
|
||||
| test.swift:412:27:412:27 | x : | test.swift:413:19:413:19 | x |
|
||||
| test.swift:420:9:420:34 | call to ... [myPair:1] : | test.swift:427:10:427:30 | .myPair(...) [myPair:1] : |
|
||||
| test.swift:420:9:420:34 | call to ... [myPair:1] : | test.swift:437:13:437:33 | .myPair(...) [myPair:1] : |
|
||||
| test.swift:420:9:420:34 | call to ... [myPair:1] : | test.swift:442:33:442:33 | a [myPair:1] : |
|
||||
| test.swift:420:9:420:34 | call to ... [myPair:1] : | test.swift:471:13:471:13 | a [myPair:1] : |
|
||||
| test.swift:420:26:420:33 | call to source() : | test.swift:420:9:420:34 | call to ... [myPair:1] : |
|
||||
| test.swift:427:10:427:30 | .myPair(...) [myPair:1] : | test.swift:427:29:427:29 | b : |
|
||||
| test.swift:427:29:427:29 | b : | test.swift:429:19:429:19 | b |
|
||||
| test.swift:437:13:437:33 | .myPair(...) [myPair:1] : | test.swift:437:32:437:32 | y : |
|
||||
| test.swift:437:32:437:32 | y : | test.swift:439:19:439:19 | y |
|
||||
| test.swift:442:21:442:34 | call to ... [myCons:1, myPair:1] : | test.swift:452:14:452:38 | .myCons(...) [myCons:1, myPair:1] : |
|
||||
| test.swift:442:21:442:34 | call to ... [myCons:1, myPair:1] : | test.swift:467:17:467:41 | .myCons(...) [myCons:1, myPair:1] : |
|
||||
| test.swift:442:21:442:34 | call to ... [myCons:1, myPair:1] : | test.swift:471:16:471:16 | b [myCons:1, myPair:1] : |
|
||||
| test.swift:442:33:442:33 | a [myPair:1] : | test.swift:442:21:442:34 | call to ... [myCons:1, myPair:1] : |
|
||||
| test.swift:452:14:452:38 | .myCons(...) [myCons:1, myPair:1] : | test.swift:452:25:452:37 | .myPair(...) [myPair:1] : |
|
||||
| test.swift:452:25:452:37 | .myPair(...) [myPair:1] : | test.swift:452:36:452:36 | c : |
|
||||
| test.swift:452:36:452:36 | c : | test.swift:455:19:455:19 | c |
|
||||
| test.swift:463:13:463:39 | .myPair(...) [myPair:0] : | test.swift:463:31:463:31 | x : |
|
||||
| test.swift:463:31:463:31 | x : | test.swift:464:19:464:19 | x |
|
||||
| test.swift:463:43:463:62 | call to ... [myPair:0] : | test.swift:463:13:463:39 | .myPair(...) [myPair:0] : |
|
||||
| test.swift:463:51:463:58 | call to source() : | test.swift:463:43:463:62 | call to ... [myPair:0] : |
|
||||
| test.swift:467:17:467:41 | .myCons(...) [myCons:1, myPair:1] : | test.swift:467:28:467:40 | .myPair(...) [myPair:1] : |
|
||||
| test.swift:467:28:467:40 | .myPair(...) [myPair:1] : | test.swift:467:39:467:39 | c : |
|
||||
| test.swift:467:39:467:39 | c : | test.swift:468:19:468:19 | c |
|
||||
| test.swift:471:12:471:17 | (...) [Tuple element at index 0, myPair:1] : | test.swift:472:14:472:55 | (...) [Tuple element at index 0, myPair:1] : |
|
||||
| test.swift:471:12:471:17 | (...) [Tuple element at index 1, myCons:1, myPair:1] : | test.swift:472:14:472:55 | (...) [Tuple element at index 1, myCons:1, myPair:1] : |
|
||||
| test.swift:471:13:471:13 | a [myPair:1] : | test.swift:471:12:471:17 | (...) [Tuple element at index 0, myPair:1] : |
|
||||
| test.swift:471:16:471:16 | b [myCons:1, myPair:1] : | test.swift:471:12:471:17 | (...) [Tuple element at index 1, myCons:1, myPair:1] : |
|
||||
| test.swift:472:14:472:55 | (...) [Tuple element at index 0, myPair:1] : | test.swift:472:15:472:27 | .myPair(...) [myPair:1] : |
|
||||
| test.swift:472:14:472:55 | (...) [Tuple element at index 1, myCons:1, myPair:1] : | test.swift:472:30:472:54 | .myCons(...) [myCons:1, myPair:1] : |
|
||||
| test.swift:472:15:472:27 | .myPair(...) [myPair:1] : | test.swift:472:26:472:26 | b : |
|
||||
| test.swift:472:26:472:26 | b : | test.swift:474:19:474:19 | b |
|
||||
| test.swift:472:30:472:54 | .myCons(...) [myCons:1, myPair:1] : | test.swift:472:41:472:53 | .myPair(...) [myPair:1] : |
|
||||
| test.swift:472:41:472:53 | .myPair(...) [myPair:1] : | test.swift:472:52:472:52 | e : |
|
||||
| test.swift:472:52:472:52 | e : | test.swift:477:19:477:19 | e |
|
||||
| test.swift:486:13:486:28 | call to optionalSource() [some:0] : | test.swift:488:8:488:12 | let ...? [some:0] : |
|
||||
| test.swift:486:13:486:28 | call to optionalSource() [some:0] : | test.swift:493:19:493:19 | x [some:0] : |
|
||||
| test.swift:488:8:488:12 | let ...? [some:0] : | test.swift:488:12:488:12 | a : |
|
||||
| test.swift:488:12:488:12 | a : | test.swift:489:19:489:19 | a |
|
||||
| test.swift:493:18:493:23 | (...) [Tuple element at index 0, some:0] : | test.swift:495:10:495:37 | (...) [Tuple element at index 0, some:0] : |
|
||||
| test.swift:493:19:493:19 | x [some:0] : | test.swift:493:18:493:23 | (...) [Tuple element at index 0, some:0] : |
|
||||
| test.swift:495:10:495:37 | (...) [Tuple element at index 0, some:0] : | test.swift:495:11:495:22 | .some(...) [some:0] : |
|
||||
| test.swift:495:11:495:22 | .some(...) [some:0] : | test.swift:495:21:495:21 | a : |
|
||||
| test.swift:495:21:495:21 | a : | test.swift:496:19:496:19 | a |
|
||||
| test.swift:509:9:509:9 | self [x, some:0] : | file://:0:0:0:0 | self [x, some:0] : |
|
||||
| test.swift:509:9:509:9 | value [some:0] : | file://:0:0:0:0 | value [some:0] : |
|
||||
| test.swift:513:13:513:28 | call to optionalSource() [some:0] : | test.swift:515:12:515:12 | x [some:0] : |
|
||||
| test.swift:515:5:515:5 | [post] cx [x, some:0] : | test.swift:519:20:519:20 | cx [x, some:0] : |
|
||||
| test.swift:515:12:515:12 | x [some:0] : | test.swift:509:9:509:9 | value [some:0] : |
|
||||
| test.swift:515:12:515:12 | x [some:0] : | test.swift:515:5:515:5 | [post] cx [x, some:0] : |
|
||||
| test.swift:519:11:519:15 | let ...? [some:0] : | test.swift:519:15:519:15 | z1 : |
|
||||
| test.swift:519:15:519:15 | z1 : | test.swift:520:15:520:15 | z1 |
|
||||
| test.swift:519:20:519:20 | cx [x, some:0] : | test.swift:509:9:509:9 | self [x, some:0] : |
|
||||
| test.swift:519:20:519:20 | cx [x, some:0] : | test.swift:519:20:519:23 | .x [some:0] : |
|
||||
| test.swift:519:20:519:23 | .x [some:0] : | test.swift:519:11:519:15 | let ...? [some:0] : |
|
||||
| test.swift:526:14:526:21 | call to source() : | test.swift:526:13:526:21 | call to +(_:) |
|
||||
| test.swift:535:9:535:9 | self [str] : | file://:0:0:0:0 | self [str] : |
|
||||
| test.swift:536:10:536:13 | s : | test.swift:537:13:537:13 | s : |
|
||||
| test.swift:537:7:537:7 | [post] self [str] : | test.swift:536:5:538:5 | self[return] [str] : |
|
||||
| test.swift:537:13:537:13 | s : | test.swift:537:7:537:7 | [post] self [str] : |
|
||||
| test.swift:542:17:545:5 | self[return] [str] : | test.swift:550:13:550:41 | call to Self.init(contentsOfFile:) [str] : |
|
||||
| test.swift:543:7:543:7 | [post] self [str] : | test.swift:542:17:545:5 | self[return] [str] : |
|
||||
| test.swift:543:7:543:7 | [post] self [str] : | test.swift:544:17:544:17 | self [str] : |
|
||||
| test.swift:543:20:543:28 | call to source3() : | test.swift:536:10:536:13 | s : |
|
||||
| test.swift:543:20:543:28 | call to source3() : | test.swift:543:7:543:7 | [post] self [str] : |
|
||||
| test.swift:544:17:544:17 | self [str] : | test.swift:544:17:544:17 | .str |
|
||||
| test.swift:549:13:549:33 | call to MyClass.init(s:) [str] : | test.swift:535:9:535:9 | self [str] : |
|
||||
| test.swift:549:13:549:33 | call to MyClass.init(s:) [str] : | test.swift:549:13:549:35 | .str |
|
||||
| test.swift:549:24:549:32 | call to source3() : | test.swift:536:10:536:13 | s : |
|
||||
| test.swift:549:24:549:32 | call to source3() : | test.swift:549:13:549:33 | call to MyClass.init(s:) [str] : |
|
||||
| test.swift:550:13:550:41 | call to Self.init(contentsOfFile:) [str] : | test.swift:535:9:535:9 | self [str] : |
|
||||
| test.swift:550:13:550:41 | call to Self.init(contentsOfFile:) [str] : | test.swift:550:13:550:43 | .str |
|
||||
nodes
|
||||
| file://:0:0:0:0 | .a [x] : | semmle.label | .a [x] : |
|
||||
| file://:0:0:0:0 | .str : | semmle.label | .str : |
|
||||
| file://:0:0:0:0 | .x : | semmle.label | .x : |
|
||||
| file://:0:0:0:0 | .x : | semmle.label | .x : |
|
||||
| file://:0:0:0:0 | [post] self [x] : | semmle.label | [post] self [x] : |
|
||||
| file://:0:0:0:0 | .x [some:0] : | semmle.label | .x [some:0] : |
|
||||
| file://:0:0:0:0 | [post] self [x, some:0] : | semmle.label | [post] self [x, some:0] : |
|
||||
| file://:0:0:0:0 | [post] self [x] : | semmle.label | [post] self [x] : |
|
||||
| file://:0:0:0:0 | [summary param] this in signum() : | semmle.label | [summary param] this in signum() : |
|
||||
| file://:0:0:0:0 | [summary param] this in signum() [some:0] : | semmle.label | [summary param] this in signum() [some:0] : |
|
||||
| file://:0:0:0:0 | [summary] to write: return (return) in signum() : | semmle.label | [summary] to write: return (return) in signum() : |
|
||||
| file://:0:0:0:0 | [summary] to write: return (return) in signum() [some:0] : | semmle.label | [summary] to write: return (return) in signum() [some:0] : |
|
||||
| file://:0:0:0:0 | self [a, x] : | semmle.label | self [a, x] : |
|
||||
| file://:0:0:0:0 | self [str] : | semmle.label | self [str] : |
|
||||
| file://:0:0:0:0 | self [x] : | semmle.label | self [x] : |
|
||||
| file://:0:0:0:0 | self [x, some:0] : | semmle.label | self [x, some:0] : |
|
||||
| file://:0:0:0:0 | self [x] : | semmle.label | self [x] : |
|
||||
| file://:0:0:0:0 | value : | semmle.label | value : |
|
||||
| file://:0:0:0:0 | value : | semmle.label | value : |
|
||||
| file://:0:0:0:0 | value [some:0] : | semmle.label | value [some:0] : |
|
||||
| test.swift:6:19:6:26 | call to source() : | semmle.label | call to source() : |
|
||||
| test.swift:7:15:7:15 | t1 | semmle.label | t1 |
|
||||
| test.swift:9:15:9:15 | t1 | semmle.label | t1 |
|
||||
@@ -291,7 +368,9 @@ nodes
|
||||
| test.swift:235:13:235:15 | .source_value | semmle.label | .source_value |
|
||||
| test.swift:238:13:238:15 | .source_value | semmle.label | .source_value |
|
||||
| test.swift:259:12:259:19 | call to source() : | semmle.label | call to source() : |
|
||||
| test.swift:259:12:259:19 | call to source() [some:0] : | semmle.label | call to source() [some:0] : |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() : | semmle.label | call to optionalSource() : |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() [some:0] : | semmle.label | call to optionalSource() [some:0] : |
|
||||
| test.swift:265:15:265:15 | x | semmle.label | x |
|
||||
| test.swift:267:15:267:16 | ...! | semmle.label | ...! |
|
||||
| test.swift:270:15:270:22 | call to source() : | semmle.label | call to source() : |
|
||||
@@ -306,14 +385,27 @@ nodes
|
||||
| test.swift:280:31:280:38 | call to source() : | semmle.label | call to source() : |
|
||||
| test.swift:282:15:282:38 | ... ? ... : ... | semmle.label | ... ? ... : ... |
|
||||
| test.swift:282:31:282:38 | call to source() : | semmle.label | call to source() : |
|
||||
| test.swift:284:8:284:12 | let ...? [some:0] : | semmle.label | let ...? [some:0] : |
|
||||
| test.swift:284:12:284:12 | z : | semmle.label | z : |
|
||||
| test.swift:285:19:285:19 | z | semmle.label | z |
|
||||
| test.swift:291:8:291:12 | let ...? [some:0] : | semmle.label | let ...? [some:0] : |
|
||||
| test.swift:291:12:291:12 | z : | semmle.label | z : |
|
||||
| test.swift:291:16:291:17 | ...? : | semmle.label | ...? : |
|
||||
| test.swift:291:16:291:17 | ...? [some:0] : | semmle.label | ...? [some:0] : |
|
||||
| test.swift:291:16:291:26 | call to signum() : | semmle.label | call to signum() : |
|
||||
| test.swift:291:16:291:26 | call to signum() [some:0] : | semmle.label | call to signum() [some:0] : |
|
||||
| test.swift:292:19:292:19 | z | semmle.label | z |
|
||||
| test.swift:298:11:298:15 | let ...? [some:0] : | semmle.label | let ...? [some:0] : |
|
||||
| test.swift:298:15:298:15 | z1 : | semmle.label | z1 : |
|
||||
| test.swift:300:15:300:15 | z1 | semmle.label | z1 |
|
||||
| test.swift:303:15:303:16 | ...! : | semmle.label | ...! : |
|
||||
| test.swift:303:15:303:25 | call to signum() | semmle.label | call to signum() |
|
||||
| test.swift:306:13:306:24 | .some(...) [some:0] : | semmle.label | .some(...) [some:0] : |
|
||||
| test.swift:306:23:306:23 | z : | semmle.label | z : |
|
||||
| test.swift:307:19:307:19 | z | semmle.label | z |
|
||||
| test.swift:314:10:314:21 | .some(...) [some:0] : | semmle.label | .some(...) [some:0] : |
|
||||
| test.swift:314:20:314:20 | z : | semmle.label | z : |
|
||||
| test.swift:315:19:315:19 | z | semmle.label | z |
|
||||
| test.swift:331:14:331:26 | (...) [Tuple element at index 1] : | semmle.label | (...) [Tuple element at index 1] : |
|
||||
| test.swift:331:18:331:25 | call to source() : | semmle.label | call to source() : |
|
||||
| test.swift:335:15:335:15 | t1 [Tuple element at index 1] : | semmle.label | t1 [Tuple element at index 1] : |
|
||||
@@ -326,6 +418,10 @@ nodes
|
||||
| test.swift:351:14:351:45 | (...) [Tuple element at index 1] : | semmle.label | (...) [Tuple element at index 1] : |
|
||||
| test.swift:351:18:351:25 | call to source() : | semmle.label | call to source() : |
|
||||
| test.swift:351:31:351:38 | call to source() : | semmle.label | call to source() : |
|
||||
| test.swift:353:9:353:17 | (...) [Tuple element at index 0] : | semmle.label | (...) [Tuple element at index 0] : |
|
||||
| test.swift:353:9:353:17 | (...) [Tuple element at index 1] : | semmle.label | (...) [Tuple element at index 1] : |
|
||||
| test.swift:353:10:353:10 | a : | semmle.label | a : |
|
||||
| test.swift:353:13:353:13 | b : | semmle.label | b : |
|
||||
| test.swift:356:15:356:15 | t1 [Tuple element at index 0] : | semmle.label | t1 [Tuple element at index 0] : |
|
||||
| test.swift:356:15:356:18 | .0 | semmle.label | .0 |
|
||||
| test.swift:357:15:357:15 | t1 [Tuple element at index 1] : | semmle.label | t1 [Tuple element at index 1] : |
|
||||
@@ -334,34 +430,90 @@ nodes
|
||||
| test.swift:360:15:360:18 | .0 | semmle.label | .0 |
|
||||
| test.swift:361:15:361:15 | t2 [Tuple element at index 1] : | semmle.label | t2 [Tuple element at index 1] : |
|
||||
| test.swift:361:15:361:18 | .1 | semmle.label | .1 |
|
||||
| test.swift:439:13:439:28 | call to optionalSource() : | semmle.label | call to optionalSource() : |
|
||||
| test.swift:442:19:442:19 | a | semmle.label | a |
|
||||
| test.swift:462:9:462:9 | self [x] : | semmle.label | self [x] : |
|
||||
| test.swift:462:9:462:9 | value : | semmle.label | value : |
|
||||
| test.swift:466:13:466:28 | call to optionalSource() : | semmle.label | call to optionalSource() : |
|
||||
| test.swift:468:5:468:5 | [post] cx [x] : | semmle.label | [post] cx [x] : |
|
||||
| test.swift:468:12:468:12 | x : | semmle.label | x : |
|
||||
| test.swift:472:20:472:20 | cx [x] : | semmle.label | cx [x] : |
|
||||
| test.swift:472:20:472:23 | .x : | semmle.label | .x : |
|
||||
| test.swift:473:15:473:15 | z1 | semmle.label | z1 |
|
||||
| test.swift:479:13:479:21 | call to +(_:) | semmle.label | call to +(_:) |
|
||||
| test.swift:479:14:479:21 | call to source() : | semmle.label | call to source() : |
|
||||
| test.swift:480:14:480:21 | call to source() | semmle.label | call to source() |
|
||||
| test.swift:488:9:488:9 | self [str] : | semmle.label | self [str] : |
|
||||
| test.swift:489:5:491:5 | self[return] [str] : | semmle.label | self[return] [str] : |
|
||||
| test.swift:489:10:489:13 | s : | semmle.label | s : |
|
||||
| test.swift:490:7:490:7 | [post] self [str] : | semmle.label | [post] self [str] : |
|
||||
| test.swift:490:13:490:13 | s : | semmle.label | s : |
|
||||
| test.swift:495:17:498:5 | self[return] [str] : | semmle.label | self[return] [str] : |
|
||||
| test.swift:496:7:496:7 | [post] self [str] : | semmle.label | [post] self [str] : |
|
||||
| test.swift:496:20:496:28 | call to source3() : | semmle.label | call to source3() : |
|
||||
| test.swift:497:17:497:17 | .str | semmle.label | .str |
|
||||
| test.swift:497:17:497:17 | self [str] : | semmle.label | self [str] : |
|
||||
| test.swift:502:13:502:33 | call to MyClass.init(s:) [str] : | semmle.label | call to MyClass.init(s:) [str] : |
|
||||
| test.swift:502:13:502:35 | .str | semmle.label | .str |
|
||||
| test.swift:502:24:502:32 | call to source3() : | semmle.label | call to source3() : |
|
||||
| test.swift:503:13:503:41 | call to Self.init(contentsOfFile:) [str] : | semmle.label | call to Self.init(contentsOfFile:) [str] : |
|
||||
| test.swift:503:13:503:43 | .str | semmle.label | .str |
|
||||
| test.swift:363:15:363:15 | a | semmle.label | a |
|
||||
| test.swift:364:15:364:15 | b | semmle.label | b |
|
||||
| test.swift:398:9:398:27 | call to ... [mySingle:0] : | semmle.label | call to ... [mySingle:0] : |
|
||||
| test.swift:398:19:398:26 | call to source() : | semmle.label | call to source() : |
|
||||
| test.swift:403:10:403:25 | .mySingle(...) [mySingle:0] : | semmle.label | .mySingle(...) [mySingle:0] : |
|
||||
| test.swift:403:24:403:24 | a : | semmle.label | a : |
|
||||
| test.swift:404:19:404:19 | a | semmle.label | a |
|
||||
| test.swift:412:13:412:28 | .mySingle(...) [mySingle:0] : | semmle.label | .mySingle(...) [mySingle:0] : |
|
||||
| test.swift:412:27:412:27 | x : | semmle.label | x : |
|
||||
| test.swift:413:19:413:19 | x | semmle.label | x |
|
||||
| test.swift:420:9:420:34 | call to ... [myPair:1] : | semmle.label | call to ... [myPair:1] : |
|
||||
| test.swift:420:26:420:33 | call to source() : | semmle.label | call to source() : |
|
||||
| test.swift:427:10:427:30 | .myPair(...) [myPair:1] : | semmle.label | .myPair(...) [myPair:1] : |
|
||||
| test.swift:427:29:427:29 | b : | semmle.label | b : |
|
||||
| test.swift:429:19:429:19 | b | semmle.label | b |
|
||||
| test.swift:437:13:437:33 | .myPair(...) [myPair:1] : | semmle.label | .myPair(...) [myPair:1] : |
|
||||
| test.swift:437:32:437:32 | y : | semmle.label | y : |
|
||||
| test.swift:439:19:439:19 | y | semmle.label | y |
|
||||
| test.swift:442:21:442:34 | call to ... [myCons:1, myPair:1] : | semmle.label | call to ... [myCons:1, myPair:1] : |
|
||||
| test.swift:442:33:442:33 | a [myPair:1] : | semmle.label | a [myPair:1] : |
|
||||
| test.swift:452:14:452:38 | .myCons(...) [myCons:1, myPair:1] : | semmle.label | .myCons(...) [myCons:1, myPair:1] : |
|
||||
| test.swift:452:25:452:37 | .myPair(...) [myPair:1] : | semmle.label | .myPair(...) [myPair:1] : |
|
||||
| test.swift:452:36:452:36 | c : | semmle.label | c : |
|
||||
| test.swift:455:19:455:19 | c | semmle.label | c |
|
||||
| test.swift:463:13:463:39 | .myPair(...) [myPair:0] : | semmle.label | .myPair(...) [myPair:0] : |
|
||||
| test.swift:463:31:463:31 | x : | semmle.label | x : |
|
||||
| test.swift:463:43:463:62 | call to ... [myPair:0] : | semmle.label | call to ... [myPair:0] : |
|
||||
| test.swift:463:51:463:58 | call to source() : | semmle.label | call to source() : |
|
||||
| test.swift:464:19:464:19 | x | semmle.label | x |
|
||||
| test.swift:467:17:467:41 | .myCons(...) [myCons:1, myPair:1] : | semmle.label | .myCons(...) [myCons:1, myPair:1] : |
|
||||
| test.swift:467:28:467:40 | .myPair(...) [myPair:1] : | semmle.label | .myPair(...) [myPair:1] : |
|
||||
| test.swift:467:39:467:39 | c : | semmle.label | c : |
|
||||
| test.swift:468:19:468:19 | c | semmle.label | c |
|
||||
| test.swift:471:12:471:17 | (...) [Tuple element at index 0, myPair:1] : | semmle.label | (...) [Tuple element at index 0, myPair:1] : |
|
||||
| test.swift:471:12:471:17 | (...) [Tuple element at index 1, myCons:1, myPair:1] : | semmle.label | (...) [Tuple element at index 1, myCons:1, myPair:1] : |
|
||||
| test.swift:471:13:471:13 | a [myPair:1] : | semmle.label | a [myPair:1] : |
|
||||
| test.swift:471:16:471:16 | b [myCons:1, myPair:1] : | semmle.label | b [myCons:1, myPair:1] : |
|
||||
| test.swift:472:14:472:55 | (...) [Tuple element at index 0, myPair:1] : | semmle.label | (...) [Tuple element at index 0, myPair:1] : |
|
||||
| test.swift:472:14:472:55 | (...) [Tuple element at index 1, myCons:1, myPair:1] : | semmle.label | (...) [Tuple element at index 1, myCons:1, myPair:1] : |
|
||||
| test.swift:472:15:472:27 | .myPair(...) [myPair:1] : | semmle.label | .myPair(...) [myPair:1] : |
|
||||
| test.swift:472:26:472:26 | b : | semmle.label | b : |
|
||||
| test.swift:472:30:472:54 | .myCons(...) [myCons:1, myPair:1] : | semmle.label | .myCons(...) [myCons:1, myPair:1] : |
|
||||
| test.swift:472:41:472:53 | .myPair(...) [myPair:1] : | semmle.label | .myPair(...) [myPair:1] : |
|
||||
| test.swift:472:52:472:52 | e : | semmle.label | e : |
|
||||
| test.swift:474:19:474:19 | b | semmle.label | b |
|
||||
| test.swift:477:19:477:19 | e | semmle.label | e |
|
||||
| test.swift:486:13:486:28 | call to optionalSource() [some:0] : | semmle.label | call to optionalSource() [some:0] : |
|
||||
| test.swift:488:8:488:12 | let ...? [some:0] : | semmle.label | let ...? [some:0] : |
|
||||
| test.swift:488:12:488:12 | a : | semmle.label | a : |
|
||||
| test.swift:489:19:489:19 | a | semmle.label | a |
|
||||
| test.swift:493:18:493:23 | (...) [Tuple element at index 0, some:0] : | semmle.label | (...) [Tuple element at index 0, some:0] : |
|
||||
| test.swift:493:19:493:19 | x [some:0] : | semmle.label | x [some:0] : |
|
||||
| test.swift:495:10:495:37 | (...) [Tuple element at index 0, some:0] : | semmle.label | (...) [Tuple element at index 0, some:0] : |
|
||||
| test.swift:495:11:495:22 | .some(...) [some:0] : | semmle.label | .some(...) [some:0] : |
|
||||
| test.swift:495:21:495:21 | a : | semmle.label | a : |
|
||||
| test.swift:496:19:496:19 | a | semmle.label | a |
|
||||
| test.swift:509:9:509:9 | self [x, some:0] : | semmle.label | self [x, some:0] : |
|
||||
| test.swift:509:9:509:9 | value [some:0] : | semmle.label | value [some:0] : |
|
||||
| test.swift:513:13:513:28 | call to optionalSource() [some:0] : | semmle.label | call to optionalSource() [some:0] : |
|
||||
| test.swift:515:5:515:5 | [post] cx [x, some:0] : | semmle.label | [post] cx [x, some:0] : |
|
||||
| test.swift:515:12:515:12 | x [some:0] : | semmle.label | x [some:0] : |
|
||||
| test.swift:519:11:519:15 | let ...? [some:0] : | semmle.label | let ...? [some:0] : |
|
||||
| test.swift:519:15:519:15 | z1 : | semmle.label | z1 : |
|
||||
| test.swift:519:20:519:20 | cx [x, some:0] : | semmle.label | cx [x, some:0] : |
|
||||
| test.swift:519:20:519:23 | .x [some:0] : | semmle.label | .x [some:0] : |
|
||||
| test.swift:520:15:520:15 | z1 | semmle.label | z1 |
|
||||
| test.swift:526:13:526:21 | call to +(_:) | semmle.label | call to +(_:) |
|
||||
| test.swift:526:14:526:21 | call to source() : | semmle.label | call to source() : |
|
||||
| test.swift:527:14:527:21 | call to source() | semmle.label | call to source() |
|
||||
| test.swift:535:9:535:9 | self [str] : | semmle.label | self [str] : |
|
||||
| test.swift:536:5:538:5 | self[return] [str] : | semmle.label | self[return] [str] : |
|
||||
| test.swift:536:10:536:13 | s : | semmle.label | s : |
|
||||
| test.swift:537:7:537:7 | [post] self [str] : | semmle.label | [post] self [str] : |
|
||||
| test.swift:537:13:537:13 | s : | semmle.label | s : |
|
||||
| test.swift:542:17:545:5 | self[return] [str] : | semmle.label | self[return] [str] : |
|
||||
| test.swift:543:7:543:7 | [post] self [str] : | semmle.label | [post] self [str] : |
|
||||
| test.swift:543:20:543:28 | call to source3() : | semmle.label | call to source3() : |
|
||||
| test.swift:544:17:544:17 | .str | semmle.label | .str |
|
||||
| test.swift:544:17:544:17 | self [str] : | semmle.label | self [str] : |
|
||||
| test.swift:549:13:549:33 | call to MyClass.init(s:) [str] : | semmle.label | call to MyClass.init(s:) [str] : |
|
||||
| test.swift:549:13:549:35 | .str | semmle.label | .str |
|
||||
| test.swift:549:24:549:32 | call to source3() : | semmle.label | call to source3() : |
|
||||
| test.swift:550:13:550:41 | call to Self.init(contentsOfFile:) [str] : | semmle.label | call to Self.init(contentsOfFile:) [str] : |
|
||||
| test.swift:550:13:550:43 | .str | semmle.label | .str |
|
||||
subpaths
|
||||
| test.swift:75:21:75:22 | &... : | test.swift:65:16:65:28 | arg1 : | test.swift:65:1:70:1 | arg2[return] : | test.swift:75:31:75:32 | [post] &... : |
|
||||
| test.swift:114:19:114:19 | arg : | test.swift:109:9:109:14 | arg : | test.swift:110:12:110:12 | arg : | test.swift:114:12:114:22 | call to ... : |
|
||||
@@ -391,13 +543,14 @@ subpaths
|
||||
| test.swift:270:15:270:22 | call to source() : | file://:0:0:0:0 | [summary param] this in signum() : | file://:0:0:0:0 | [summary] to write: return (return) in signum() : | test.swift:270:15:270:31 | call to signum() |
|
||||
| test.swift:271:15:271:16 | ...? : | file://:0:0:0:0 | [summary param] this in signum() : | file://:0:0:0:0 | [summary] to write: return (return) in signum() : | test.swift:271:15:271:25 | call to signum() : |
|
||||
| test.swift:291:16:291:17 | ...? : | file://:0:0:0:0 | [summary param] this in signum() : | file://:0:0:0:0 | [summary] to write: return (return) in signum() : | test.swift:291:16:291:26 | call to signum() : |
|
||||
| test.swift:291:16:291:17 | ...? [some:0] : | file://:0:0:0:0 | [summary param] this in signum() [some:0] : | file://:0:0:0:0 | [summary] to write: return (return) in signum() [some:0] : | test.swift:291:16:291:26 | call to signum() [some:0] : |
|
||||
| test.swift:303:15:303:16 | ...! : | file://:0:0:0:0 | [summary param] this in signum() : | file://:0:0:0:0 | [summary] to write: return (return) in signum() : | test.swift:303:15:303:25 | call to signum() |
|
||||
| test.swift:468:12:468:12 | x : | test.swift:462:9:462:9 | value : | file://:0:0:0:0 | [post] self [x] : | test.swift:468:5:468:5 | [post] cx [x] : |
|
||||
| test.swift:472:20:472:20 | cx [x] : | test.swift:462:9:462:9 | self [x] : | file://:0:0:0:0 | .x : | test.swift:472:20:472:23 | .x : |
|
||||
| test.swift:496:20:496:28 | call to source3() : | test.swift:489:10:489:13 | s : | test.swift:490:7:490:7 | [post] self [str] : | test.swift:496:7:496:7 | [post] self [str] : |
|
||||
| test.swift:502:13:502:33 | call to MyClass.init(s:) [str] : | test.swift:488:9:488:9 | self [str] : | file://:0:0:0:0 | .str : | test.swift:502:13:502:35 | .str |
|
||||
| test.swift:502:24:502:32 | call to source3() : | test.swift:489:10:489:13 | s : | test.swift:489:5:491:5 | self[return] [str] : | test.swift:502:13:502:33 | call to MyClass.init(s:) [str] : |
|
||||
| test.swift:503:13:503:41 | call to Self.init(contentsOfFile:) [str] : | test.swift:488:9:488:9 | self [str] : | file://:0:0:0:0 | .str : | test.swift:503:13:503:43 | .str |
|
||||
| test.swift:515:12:515:12 | x [some:0] : | test.swift:509:9:509:9 | value [some:0] : | file://:0:0:0:0 | [post] self [x, some:0] : | test.swift:515:5:515:5 | [post] cx [x, some:0] : |
|
||||
| test.swift:519:20:519:20 | cx [x, some:0] : | test.swift:509:9:509:9 | self [x, some:0] : | file://:0:0:0:0 | .x [some:0] : | test.swift:519:20:519:23 | .x [some:0] : |
|
||||
| test.swift:543:20:543:28 | call to source3() : | test.swift:536:10:536:13 | s : | test.swift:537:7:537:7 | [post] self [str] : | test.swift:543:7:543:7 | [post] self [str] : |
|
||||
| test.swift:549:13:549:33 | call to MyClass.init(s:) [str] : | test.swift:535:9:535:9 | self [str] : | file://:0:0:0:0 | .str : | test.swift:549:13:549:35 | .str |
|
||||
| test.swift:549:24:549:32 | call to source3() : | test.swift:536:10:536:13 | s : | test.swift:536:5:538:5 | self[return] [str] : | test.swift:549:13:549:33 | call to MyClass.init(s:) [str] : |
|
||||
| test.swift:550:13:550:41 | call to Self.init(contentsOfFile:) [str] : | test.swift:535:9:535:9 | self [str] : | file://:0:0:0:0 | .str : | test.swift:550:13:550:43 | .str |
|
||||
#select
|
||||
| test.swift:7:15:7:15 | t1 | test.swift:6:19:6:26 | call to source() : | test.swift:7:15:7:15 | t1 | result |
|
||||
| test.swift:9:15:9:15 | t1 | test.swift:6:19:6:26 | call to source() : | test.swift:9:15:9:15 | t1 | result |
|
||||
@@ -442,16 +595,29 @@ subpaths
|
||||
| test.swift:300:15:300:15 | z1 | test.swift:259:12:259:19 | call to source() : | test.swift:300:15:300:15 | z1 | result |
|
||||
| test.swift:303:15:303:25 | call to signum() | test.swift:259:12:259:19 | call to source() : | test.swift:303:15:303:25 | call to signum() | result |
|
||||
| test.swift:307:19:307:19 | z | test.swift:259:12:259:19 | call to source() : | test.swift:307:19:307:19 | z | result |
|
||||
| test.swift:315:19:315:19 | z | test.swift:259:12:259:19 | call to source() : | test.swift:315:19:315:19 | z | result |
|
||||
| test.swift:335:15:335:18 | .1 | test.swift:331:18:331:25 | call to source() : | test.swift:335:15:335:18 | .1 | result |
|
||||
| test.swift:346:15:346:18 | .0 | test.swift:343:12:343:19 | call to source() : | test.swift:346:15:346:18 | .0 | result |
|
||||
| test.swift:356:15:356:18 | .0 | test.swift:351:18:351:25 | call to source() : | test.swift:356:15:356:18 | .0 | result |
|
||||
| test.swift:357:15:357:18 | .1 | test.swift:351:31:351:38 | call to source() : | test.swift:357:15:357:18 | .1 | result |
|
||||
| test.swift:360:15:360:18 | .0 | test.swift:351:18:351:25 | call to source() : | test.swift:360:15:360:18 | .0 | result |
|
||||
| test.swift:361:15:361:18 | .1 | test.swift:351:31:351:38 | call to source() : | test.swift:361:15:361:18 | .1 | result |
|
||||
| test.swift:442:19:442:19 | a | test.swift:259:12:259:19 | call to source() : | test.swift:442:19:442:19 | a | result |
|
||||
| test.swift:473:15:473:15 | z1 | test.swift:259:12:259:19 | call to source() : | test.swift:473:15:473:15 | z1 | result |
|
||||
| test.swift:479:13:479:21 | call to +(_:) | test.swift:479:14:479:21 | call to source() : | test.swift:479:13:479:21 | call to +(_:) | result |
|
||||
| test.swift:480:14:480:21 | call to source() | test.swift:480:14:480:21 | call to source() | test.swift:480:14:480:21 | call to source() | result |
|
||||
| test.swift:497:17:497:17 | .str | test.swift:496:20:496:28 | call to source3() : | test.swift:497:17:497:17 | .str | result |
|
||||
| test.swift:502:13:502:35 | .str | test.swift:502:24:502:32 | call to source3() : | test.swift:502:13:502:35 | .str | result |
|
||||
| test.swift:503:13:503:43 | .str | test.swift:496:20:496:28 | call to source3() : | test.swift:503:13:503:43 | .str | result |
|
||||
| test.swift:363:15:363:15 | a | test.swift:351:18:351:25 | call to source() : | test.swift:363:15:363:15 | a | result |
|
||||
| test.swift:364:15:364:15 | b | test.swift:351:31:351:38 | call to source() : | test.swift:364:15:364:15 | b | result |
|
||||
| test.swift:404:19:404:19 | a | test.swift:398:19:398:26 | call to source() : | test.swift:404:19:404:19 | a | result |
|
||||
| test.swift:413:19:413:19 | x | test.swift:398:19:398:26 | call to source() : | test.swift:413:19:413:19 | x | result |
|
||||
| test.swift:429:19:429:19 | b | test.swift:420:26:420:33 | call to source() : | test.swift:429:19:429:19 | b | result |
|
||||
| test.swift:439:19:439:19 | y | test.swift:420:26:420:33 | call to source() : | test.swift:439:19:439:19 | y | result |
|
||||
| test.swift:455:19:455:19 | c | test.swift:420:26:420:33 | call to source() : | test.swift:455:19:455:19 | c | result |
|
||||
| test.swift:464:19:464:19 | x | test.swift:463:51:463:58 | call to source() : | test.swift:464:19:464:19 | x | result |
|
||||
| test.swift:468:19:468:19 | c | test.swift:420:26:420:33 | call to source() : | test.swift:468:19:468:19 | c | result |
|
||||
| test.swift:474:19:474:19 | b | test.swift:420:26:420:33 | call to source() : | test.swift:474:19:474:19 | b | result |
|
||||
| test.swift:477:19:477:19 | e | test.swift:420:26:420:33 | call to source() : | test.swift:477:19:477:19 | e | result |
|
||||
| test.swift:489:19:489:19 | a | test.swift:259:12:259:19 | call to source() : | test.swift:489:19:489:19 | a | result |
|
||||
| test.swift:496:19:496:19 | a | test.swift:259:12:259:19 | call to source() : | test.swift:496:19:496:19 | a | result |
|
||||
| test.swift:520:15:520:15 | z1 | test.swift:259:12:259:19 | call to source() : | test.swift:520:15:520:15 | z1 | result |
|
||||
| test.swift:526:13:526:21 | call to +(_:) | test.swift:526:14:526:21 | call to source() : | test.swift:526:13:526:21 | call to +(_:) | result |
|
||||
| test.swift:527:14:527:21 | call to source() | test.swift:527:14:527:21 | call to source() | test.swift:527:14:527:21 | call to source() | result |
|
||||
| test.swift:544:17:544:17 | .str | test.swift:543:20:543:28 | call to source3() : | test.swift:544:17:544:17 | .str | result |
|
||||
| test.swift:549:13:549:35 | .str | test.swift:549:24:549:32 | call to source3() : | test.swift:549:13:549:35 | .str | result |
|
||||
| test.swift:550:13:550:43 | .str | test.swift:543:20:543:28 | call to source3() : | test.swift:550:13:550:43 | .str | result |
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
| test.swift:6:9:6:13 | SSA def(t1) | test.swift:7:15:7:15 | t1 |
|
||||
| test.swift:6:19:6:26 | call to source() | test.swift:6:9:6:13 | SSA def(t1) |
|
||||
| test.swift:5:9:5:13 | ... as ... | test.swift:5:9:5:9 | t2 |
|
||||
| test.swift:6:9:6:9 | SSA def(t1) | test.swift:7:15:7:15 | t1 |
|
||||
| test.swift:6:9:6:9 | t1 | test.swift:6:9:6:9 | SSA def(t1) |
|
||||
| test.swift:6:9:6:13 | ... as ... | test.swift:6:9:6:9 | t1 |
|
||||
| test.swift:6:19:6:26 | call to source() | test.swift:6:9:6:13 | ... as ... |
|
||||
| test.swift:7:15:7:15 | [post] t1 | test.swift:8:10:8:10 | t1 |
|
||||
| test.swift:7:15:7:15 | t1 | test.swift:8:10:8:10 | t1 |
|
||||
| test.swift:8:5:8:10 | SSA def(t2) | test.swift:10:15:10:15 | t2 |
|
||||
@@ -18,8 +21,12 @@
|
||||
| test.swift:29:26:29:29 | y | test.swift:29:26:29:29 | SSA def(y) |
|
||||
| test.swift:42:16:42:19 | SSA def(b) | test.swift:45:8:45:8 | b |
|
||||
| test.swift:42:16:42:19 | b | test.swift:42:16:42:19 | SSA def(b) |
|
||||
| test.swift:43:9:43:13 | SSA def(t1) | test.swift:46:13:46:13 | t1 |
|
||||
| test.swift:43:19:43:26 | call to source() | test.swift:43:9:43:13 | SSA def(t1) |
|
||||
| test.swift:43:9:43:9 | SSA def(t1) | test.swift:46:13:46:13 | t1 |
|
||||
| test.swift:43:9:43:9 | t1 | test.swift:43:9:43:9 | SSA def(t1) |
|
||||
| test.swift:43:9:43:13 | ... as ... | test.swift:43:9:43:9 | t1 |
|
||||
| test.swift:43:19:43:26 | call to source() | test.swift:43:9:43:13 | ... as ... |
|
||||
| test.swift:44:9:44:12 | ... as ... | test.swift:44:9:44:9 | t |
|
||||
| test.swift:44:18:44:18 | 0 | test.swift:44:9:44:12 | ... as ... |
|
||||
| test.swift:46:9:46:13 | SSA def(t) | test.swift:50:5:50:5 | SSA phi(t) |
|
||||
| test.swift:46:13:46:13 | t1 | test.swift:46:9:46:13 | SSA def(t) |
|
||||
| test.swift:48:9:48:13 | SSA def(t) | test.swift:50:5:50:5 | SSA phi(t) |
|
||||
@@ -27,8 +34,10 @@
|
||||
| test.swift:50:5:50:5 | SSA phi(t) | test.swift:50:15:50:15 | t |
|
||||
| test.swift:54:5:54:18 | SSA def(arg) | test.swift:53:1:56:1 | arg[return] |
|
||||
| test.swift:54:11:54:18 | call to source() | test.swift:54:5:54:18 | SSA def(arg) |
|
||||
| test.swift:59:9:59:12 | SSA def(x) | test.swift:60:15:60:15 | x |
|
||||
| test.swift:59:18:59:18 | 0 | test.swift:59:9:59:12 | SSA def(x) |
|
||||
| test.swift:59:9:59:9 | SSA def(x) | test.swift:60:15:60:15 | x |
|
||||
| test.swift:59:9:59:9 | x | test.swift:59:9:59:9 | SSA def(x) |
|
||||
| test.swift:59:9:59:12 | ... as ... | test.swift:59:9:59:9 | x |
|
||||
| test.swift:59:18:59:18 | 0 | test.swift:59:9:59:12 | ... as ... |
|
||||
| test.swift:60:15:60:15 | [post] x | test.swift:61:23:61:23 | x |
|
||||
| test.swift:60:15:60:15 | x | test.swift:61:23:61:23 | x |
|
||||
| test.swift:61:22:61:23 | &... | test.swift:62:15:62:15 | x |
|
||||
@@ -38,16 +47,22 @@
|
||||
| test.swift:65:16:65:28 | arg1 | test.swift:65:16:65:28 | SSA def(arg1) |
|
||||
| test.swift:65:33:65:45 | SSA def(arg2) | test.swift:67:12:67:12 | arg2 |
|
||||
| test.swift:65:33:65:45 | arg2 | test.swift:65:33:65:45 | SSA def(arg2) |
|
||||
| test.swift:66:9:66:15 | SSA def(temp) | test.swift:68:12:68:12 | temp |
|
||||
| test.swift:66:21:66:21 | arg1 | test.swift:66:9:66:15 | SSA def(temp) |
|
||||
| test.swift:66:9:66:9 | SSA def(temp) | test.swift:68:12:68:12 | temp |
|
||||
| test.swift:66:9:66:9 | temp | test.swift:66:9:66:9 | SSA def(temp) |
|
||||
| test.swift:66:9:66:15 | ... as ... | test.swift:66:9:66:9 | temp |
|
||||
| test.swift:66:21:66:21 | arg1 | test.swift:66:9:66:15 | ... as ... |
|
||||
| test.swift:67:5:67:12 | SSA def(arg1) | test.swift:65:1:70:1 | arg1[return] |
|
||||
| test.swift:67:12:67:12 | arg2 | test.swift:67:5:67:12 | SSA def(arg1) |
|
||||
| test.swift:68:5:68:12 | SSA def(arg2) | test.swift:65:1:70:1 | arg2[return] |
|
||||
| test.swift:68:12:68:12 | temp | test.swift:68:5:68:12 | SSA def(arg2) |
|
||||
| test.swift:73:9:73:12 | SSA def(x) | test.swift:75:22:75:22 | x |
|
||||
| test.swift:73:18:73:25 | call to source() | test.swift:73:9:73:12 | SSA def(x) |
|
||||
| test.swift:74:9:74:12 | SSA def(y) | test.swift:75:32:75:32 | y |
|
||||
| test.swift:74:18:74:18 | 0 | test.swift:74:9:74:12 | SSA def(y) |
|
||||
| test.swift:73:9:73:9 | SSA def(x) | test.swift:75:22:75:22 | x |
|
||||
| test.swift:73:9:73:9 | x | test.swift:73:9:73:9 | SSA def(x) |
|
||||
| test.swift:73:9:73:12 | ... as ... | test.swift:73:9:73:9 | x |
|
||||
| test.swift:73:18:73:25 | call to source() | test.swift:73:9:73:12 | ... as ... |
|
||||
| test.swift:74:9:74:9 | SSA def(y) | test.swift:75:32:75:32 | y |
|
||||
| test.swift:74:9:74:9 | y | test.swift:74:9:74:9 | SSA def(y) |
|
||||
| test.swift:74:9:74:12 | ... as ... | test.swift:74:9:74:9 | y |
|
||||
| test.swift:74:18:74:18 | 0 | test.swift:74:9:74:12 | ... as ... |
|
||||
| test.swift:75:21:75:22 | &... | test.swift:76:15:76:15 | x |
|
||||
| test.swift:75:21:75:22 | [post] &... | test.swift:76:15:76:15 | x |
|
||||
| test.swift:75:22:75:22 | x | test.swift:75:21:75:22 | &... |
|
||||
@@ -65,15 +80,19 @@
|
||||
| test.swift:89:15:89:22 | call to source() | test.swift:89:9:89:22 | SSA def(arg) |
|
||||
| test.swift:93:17:93:23 | SSA def(bool) | test.swift:104:50:104:50 | bool |
|
||||
| test.swift:93:17:93:23 | bool | test.swift:93:17:93:23 | SSA def(bool) |
|
||||
| test.swift:95:13:95:16 | SSA def(x) | test.swift:96:19:96:19 | x |
|
||||
| test.swift:95:22:95:22 | 0 | test.swift:95:13:95:16 | SSA def(x) |
|
||||
| test.swift:95:13:95:13 | SSA def(x) | test.swift:96:19:96:19 | x |
|
||||
| test.swift:95:13:95:13 | x | test.swift:95:13:95:13 | SSA def(x) |
|
||||
| test.swift:95:13:95:16 | ... as ... | test.swift:95:13:95:13 | x |
|
||||
| test.swift:95:22:95:22 | 0 | test.swift:95:13:95:16 | ... as ... |
|
||||
| test.swift:96:19:96:19 | [post] x | test.swift:97:40:97:40 | x |
|
||||
| test.swift:96:19:96:19 | x | test.swift:97:40:97:40 | x |
|
||||
| test.swift:97:39:97:40 | &... | test.swift:98:19:98:19 | x |
|
||||
| test.swift:97:39:97:40 | [post] &... | test.swift:98:19:98:19 | x |
|
||||
| test.swift:97:40:97:40 | x | test.swift:97:39:97:40 | &... |
|
||||
| test.swift:102:13:102:16 | SSA def(x) | test.swift:103:19:103:19 | x |
|
||||
| test.swift:102:22:102:22 | 0 | test.swift:102:13:102:16 | SSA def(x) |
|
||||
| test.swift:102:13:102:13 | SSA def(x) | test.swift:103:19:103:19 | x |
|
||||
| test.swift:102:13:102:13 | x | test.swift:102:13:102:13 | SSA def(x) |
|
||||
| test.swift:102:13:102:16 | ... as ... | test.swift:102:13:102:13 | x |
|
||||
| test.swift:102:22:102:22 | 0 | test.swift:102:13:102:16 | ... as ... |
|
||||
| test.swift:103:19:103:19 | [post] x | test.swift:104:41:104:41 | x |
|
||||
| test.swift:103:19:103:19 | x | test.swift:104:41:104:41 | x |
|
||||
| test.swift:104:40:104:41 | &... | test.swift:105:19:105:19 | x |
|
||||
@@ -85,25 +104,37 @@
|
||||
| test.swift:113:14:113:19 | arg | test.swift:113:14:113:19 | SSA def(arg) |
|
||||
| test.swift:113:24:113:41 | SSA def(lambda) | test.swift:114:12:114:12 | lambda |
|
||||
| test.swift:113:24:113:41 | lambda | test.swift:113:24:113:41 | SSA def(lambda) |
|
||||
| test.swift:118:9:118:12 | SSA def(x) | test.swift:119:31:119:31 | x |
|
||||
| test.swift:118:18:118:25 | call to source() | test.swift:118:9:118:12 | SSA def(x) |
|
||||
| test.swift:119:9:119:12 | SSA def(y) | test.swift:120:15:120:15 | y |
|
||||
| test.swift:119:18:119:44 | call to forward(arg:lambda:) | test.swift:119:9:119:12 | SSA def(y) |
|
||||
| test.swift:122:9:122:12 | SSA def(z) | test.swift:126:15:126:15 | z |
|
||||
| test.swift:122:18:125:6 | call to forward(arg:lambda:) | test.swift:122:9:122:12 | SSA def(z) |
|
||||
| test.swift:118:9:118:9 | SSA def(x) | test.swift:119:31:119:31 | x |
|
||||
| test.swift:118:9:118:9 | x | test.swift:118:9:118:9 | SSA def(x) |
|
||||
| test.swift:118:9:118:12 | ... as ... | test.swift:118:9:118:9 | x |
|
||||
| test.swift:118:18:118:25 | call to source() | test.swift:118:9:118:12 | ... as ... |
|
||||
| test.swift:119:9:119:9 | SSA def(y) | test.swift:120:15:120:15 | y |
|
||||
| test.swift:119:9:119:9 | y | test.swift:119:9:119:9 | SSA def(y) |
|
||||
| test.swift:119:9:119:12 | ... as ... | test.swift:119:9:119:9 | y |
|
||||
| test.swift:119:18:119:44 | call to forward(arg:lambda:) | test.swift:119:9:119:12 | ... as ... |
|
||||
| test.swift:122:9:122:9 | SSA def(z) | test.swift:126:15:126:15 | z |
|
||||
| test.swift:122:9:122:9 | z | test.swift:122:9:122:9 | SSA def(z) |
|
||||
| test.swift:122:9:122:12 | ... as ... | test.swift:122:9:122:9 | z |
|
||||
| test.swift:122:18:125:6 | call to forward(arg:lambda:) | test.swift:122:9:122:12 | ... as ... |
|
||||
| test.swift:123:10:123:13 | SSA def(i) | test.swift:124:16:124:16 | i |
|
||||
| test.swift:123:10:123:13 | i | test.swift:123:10:123:13 | SSA def(i) |
|
||||
| test.swift:128:9:128:16 | SSA def(clean) | test.swift:132:15:132:15 | clean |
|
||||
| test.swift:128:22:131:6 | call to forward(arg:lambda:) | test.swift:128:9:128:16 | SSA def(clean) |
|
||||
| test.swift:128:9:128:9 | SSA def(clean) | test.swift:132:15:132:15 | clean |
|
||||
| test.swift:128:9:128:9 | clean | test.swift:128:9:128:9 | SSA def(clean) |
|
||||
| test.swift:128:9:128:16 | ... as ... | test.swift:128:9:128:9 | clean |
|
||||
| test.swift:128:22:131:6 | call to forward(arg:lambda:) | test.swift:128:9:128:16 | ... as ... |
|
||||
| test.swift:136:19:139:5 | { ... } | test.swift:136:9:136:9 | lambda1 |
|
||||
| test.swift:141:9:141:9 | SSA def(lambda2) | test.swift:145:15:145:15 | lambda2 |
|
||||
| test.swift:141:19:144:5 | { ... } | test.swift:141:9:141:9 | SSA def(lambda2) |
|
||||
| test.swift:141:9:141:9 | lambda2 | test.swift:141:9:141:9 | SSA def(lambda2) |
|
||||
| test.swift:141:19:144:5 | { ... } | test.swift:141:9:141:9 | lambda2 |
|
||||
| test.swift:142:10:142:13 | SSA def(i) | test.swift:143:16:143:16 | i |
|
||||
| test.swift:142:10:142:13 | i | test.swift:142:10:142:13 | SSA def(i) |
|
||||
| test.swift:147:9:147:9 | SSA def(lambdaSource) | test.swift:151:15:151:15 | lambdaSource |
|
||||
| test.swift:147:24:150:5 | { ... } | test.swift:147:9:147:9 | SSA def(lambdaSource) |
|
||||
| test.swift:147:9:147:9 | lambdaSource | test.swift:147:9:147:9 | SSA def(lambdaSource) |
|
||||
| test.swift:147:24:150:5 | { ... } | test.swift:147:9:147:9 | lambdaSource |
|
||||
| test.swift:151:15:151:15 | lambdaSource | test.swift:159:16:159:16 | lambdaSource |
|
||||
| test.swift:153:9:153:9 | SSA def(lambdaSink) | test.swift:157:5:157:5 | lambdaSink |
|
||||
| test.swift:153:22:156:5 | { ... } | test.swift:153:9:153:9 | SSA def(lambdaSink) |
|
||||
| test.swift:153:9:153:9 | lambdaSink | test.swift:153:9:153:9 | SSA def(lambdaSink) |
|
||||
| test.swift:153:22:156:5 | { ... } | test.swift:153:9:153:9 | lambdaSink |
|
||||
| test.swift:154:10:154:13 | SSA def(i) | test.swift:155:19:155:19 | i |
|
||||
| test.swift:154:10:154:13 | i | test.swift:154:10:154:13 | SSA def(i) |
|
||||
| test.swift:157:5:157:5 | lambdaSink | test.swift:159:5:159:5 | lambdaSink |
|
||||
@@ -128,7 +159,8 @@
|
||||
| test.swift:174:12:174:12 | [post] self | test.swift:173:3:175:3 | self[return] |
|
||||
| test.swift:174:12:174:12 | self | test.swift:173:3:175:3 | self[return] |
|
||||
| test.swift:179:7:179:7 | SSA def(a) | test.swift:180:3:180:3 | a |
|
||||
| test.swift:179:11:179:13 | call to A.init() | test.swift:179:7:179:7 | SSA def(a) |
|
||||
| test.swift:179:7:179:7 | a | test.swift:179:7:179:7 | SSA def(a) |
|
||||
| test.swift:179:11:179:13 | call to A.init() | test.swift:179:7:179:7 | a |
|
||||
| test.swift:180:3:180:3 | [post] a | test.swift:181:13:181:13 | a |
|
||||
| test.swift:180:3:180:3 | a | test.swift:181:13:181:13 | a |
|
||||
| test.swift:184:7:184:7 | SSA def(self) | test.swift:184:7:184:7 | self[return] |
|
||||
@@ -142,23 +174,28 @@
|
||||
| test.swift:188:5:188:5 | [post] self | test.swift:187:3:189:3 | self[return] |
|
||||
| test.swift:188:5:188:5 | self | test.swift:187:3:189:3 | self[return] |
|
||||
| test.swift:193:7:193:7 | SSA def(b) | test.swift:194:3:194:3 | b |
|
||||
| test.swift:193:11:193:13 | call to B.init() | test.swift:193:7:193:7 | SSA def(b) |
|
||||
| test.swift:193:7:193:7 | b | test.swift:193:7:193:7 | SSA def(b) |
|
||||
| test.swift:193:11:193:13 | call to B.init() | test.swift:193:7:193:7 | b |
|
||||
| test.swift:194:3:194:3 | [post] b | test.swift:195:13:195:13 | b |
|
||||
| test.swift:194:3:194:3 | b | test.swift:195:13:195:13 | b |
|
||||
| test.swift:199:7:199:7 | SSA def(a) | test.swift:200:3:200:3 | a |
|
||||
| test.swift:199:11:199:13 | call to A.init() | test.swift:199:7:199:7 | SSA def(a) |
|
||||
| test.swift:199:7:199:7 | a | test.swift:199:7:199:7 | SSA def(a) |
|
||||
| test.swift:199:11:199:13 | call to A.init() | test.swift:199:7:199:7 | a |
|
||||
| test.swift:200:3:200:3 | [post] a | test.swift:201:13:201:13 | a |
|
||||
| test.swift:200:3:200:3 | a | test.swift:201:13:201:13 | a |
|
||||
| test.swift:205:7:205:7 | SSA def(a) | test.swift:206:3:206:3 | a |
|
||||
| test.swift:205:11:205:13 | call to A.init() | test.swift:205:7:205:7 | SSA def(a) |
|
||||
| test.swift:205:7:205:7 | a | test.swift:205:7:205:7 | SSA def(a) |
|
||||
| test.swift:205:11:205:13 | call to A.init() | test.swift:205:7:205:7 | a |
|
||||
| test.swift:206:3:206:3 | [post] a | test.swift:207:13:207:13 | a |
|
||||
| test.swift:206:3:206:3 | a | test.swift:207:13:207:13 | a |
|
||||
| test.swift:211:7:211:7 | SSA def(a) | test.swift:212:3:212:3 | a |
|
||||
| test.swift:211:11:211:13 | call to A.init() | test.swift:211:7:211:7 | SSA def(a) |
|
||||
| test.swift:211:7:211:7 | a | test.swift:211:7:211:7 | SSA def(a) |
|
||||
| test.swift:211:11:211:13 | call to A.init() | test.swift:211:7:211:7 | a |
|
||||
| test.swift:212:3:212:3 | [post] a | test.swift:213:13:213:13 | a |
|
||||
| test.swift:212:3:212:3 | a | test.swift:213:13:213:13 | a |
|
||||
| test.swift:217:7:217:7 | SSA def(b) | test.swift:218:3:218:3 | b |
|
||||
| test.swift:217:11:217:13 | call to B.init() | test.swift:217:7:217:7 | SSA def(b) |
|
||||
| test.swift:217:7:217:7 | b | test.swift:217:7:217:7 | SSA def(b) |
|
||||
| test.swift:217:11:217:13 | call to B.init() | test.swift:217:7:217:7 | b |
|
||||
| test.swift:218:3:218:3 | [post] b | test.swift:219:13:219:13 | b |
|
||||
| test.swift:218:3:218:3 | b | test.swift:219:13:219:13 | b |
|
||||
| test.swift:222:7:222:7 | SSA def(self) | test.swift:222:7:222:7 | self[return] |
|
||||
@@ -171,7 +208,8 @@
|
||||
| test.swift:227:5:227:5 | SSA def(self) | test.swift:227:5:229:5 | self[return] |
|
||||
| test.swift:227:5:227:5 | self | test.swift:227:5:227:5 | SSA def(self) |
|
||||
| test.swift:234:7:234:7 | SSA def(a) | test.swift:235:13:235:13 | a |
|
||||
| test.swift:234:11:234:31 | call to HasComputedProperty.init() | test.swift:234:7:234:7 | SSA def(a) |
|
||||
| test.swift:234:7:234:7 | a | test.swift:234:7:234:7 | SSA def(a) |
|
||||
| test.swift:234:11:234:31 | call to HasComputedProperty.init() | test.swift:234:7:234:7 | a |
|
||||
| test.swift:235:13:235:13 | [post] a | test.swift:237:3:237:3 | a |
|
||||
| test.swift:235:13:235:13 | a | test.swift:237:3:237:3 | a |
|
||||
| test.swift:237:3:237:3 | [post] a | test.swift:238:13:238:13 | a |
|
||||
@@ -188,11 +226,13 @@
|
||||
| test.swift:246:5:246:5 | self | test.swift:246:5:246:5 | SSA def(self) |
|
||||
| test.swift:247:9:247:9 | [post] self | test.swift:246:5:248:5 | self[return] |
|
||||
| test.swift:247:9:247:9 | self | test.swift:246:5:248:5 | self[return] |
|
||||
| test.swift:252:6:252:27 | call to DidSetSource.init(wrappedValue:) | test.swift:252:23:252:23 | x |
|
||||
| test.swift:252:23:252:23 | value | test.swift:252:23:252:23 | SSA def(value) |
|
||||
| test.swift:262:21:262:27 | SSA def(y) | test.swift:266:15:266:15 | y |
|
||||
| test.swift:262:21:262:27 | y | test.swift:262:21:262:27 | SSA def(y) |
|
||||
| test.swift:263:9:263:9 | SSA def(x) | test.swift:265:15:265:15 | x |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() | test.swift:263:9:263:9 | SSA def(x) |
|
||||
| test.swift:263:9:263:9 | x | test.swift:263:9:263:9 | SSA def(x) |
|
||||
| test.swift:263:13:263:28 | call to optionalSource() | test.swift:263:9:263:9 | x |
|
||||
| test.swift:265:15:265:15 | x | test.swift:267:15:267:15 | x |
|
||||
| test.swift:266:15:266:15 | y | test.swift:268:15:268:15 | y |
|
||||
| test.swift:267:15:267:15 | x | test.swift:267:15:267:16 | ...! |
|
||||
@@ -241,42 +281,57 @@
|
||||
| test.swift:282:26:282:26 | y | test.swift:287:16:287:16 | y |
|
||||
| test.swift:282:26:282:27 | ...! | test.swift:282:15:282:38 | ... ? ... : ... |
|
||||
| test.swift:282:31:282:38 | call to source() | test.swift:282:15:282:38 | ... ? ... : ... |
|
||||
| test.swift:284:8:284:12 | SSA def(z) | test.swift:285:19:285:19 | z |
|
||||
| test.swift:284:16:284:16 | x | test.swift:284:8:284:12 | SSA def(z) |
|
||||
| test.swift:284:12:284:12 | SSA def(z) | test.swift:285:19:285:19 | z |
|
||||
| test.swift:284:12:284:12 | z | test.swift:284:12:284:12 | SSA def(z) |
|
||||
| test.swift:284:16:284:16 | x | test.swift:284:8:284:12 | let ...? |
|
||||
| test.swift:284:16:284:16 | x | test.swift:291:16:291:16 | x |
|
||||
| test.swift:287:8:287:12 | SSA def(z) | test.swift:288:19:288:19 | z |
|
||||
| test.swift:287:16:287:16 | y | test.swift:287:8:287:12 | SSA def(z) |
|
||||
| test.swift:287:12:287:12 | SSA def(z) | test.swift:288:19:288:19 | z |
|
||||
| test.swift:287:12:287:12 | z | test.swift:287:12:287:12 | SSA def(z) |
|
||||
| test.swift:287:16:287:16 | y | test.swift:287:8:287:12 | let ...? |
|
||||
| test.swift:287:16:287:16 | y | test.swift:294:16:294:16 | y |
|
||||
| test.swift:291:8:291:12 | SSA def(z) | test.swift:292:19:292:19 | z |
|
||||
| test.swift:291:12:291:12 | SSA def(z) | test.swift:292:19:292:19 | z |
|
||||
| test.swift:291:12:291:12 | z | test.swift:291:12:291:12 | SSA def(z) |
|
||||
| test.swift:291:16:291:16 | x | test.swift:291:16:291:17 | ...? |
|
||||
| test.swift:291:16:291:16 | x | test.swift:298:20:298:20 | x |
|
||||
| test.swift:291:16:291:26 | OptionalEvaluationExpr | test.swift:291:8:291:12 | SSA def(z) |
|
||||
| test.swift:291:16:291:26 | OptionalEvaluationExpr | test.swift:291:8:291:12 | let ...? |
|
||||
| test.swift:291:16:291:26 | call to signum() | test.swift:291:16:291:26 | OptionalEvaluationExpr |
|
||||
| test.swift:294:8:294:12 | SSA def(z) | test.swift:295:19:295:19 | z |
|
||||
| test.swift:294:12:294:12 | SSA def(z) | test.swift:295:19:295:19 | z |
|
||||
| test.swift:294:12:294:12 | z | test.swift:294:12:294:12 | SSA def(z) |
|
||||
| test.swift:294:16:294:16 | y | test.swift:294:16:294:17 | ...? |
|
||||
| test.swift:294:16:294:16 | y | test.swift:299:20:299:20 | y |
|
||||
| test.swift:294:16:294:26 | OptionalEvaluationExpr | test.swift:294:8:294:12 | SSA def(z) |
|
||||
| test.swift:294:16:294:26 | OptionalEvaluationExpr | test.swift:294:8:294:12 | let ...? |
|
||||
| test.swift:294:16:294:26 | call to signum() | test.swift:294:16:294:26 | OptionalEvaluationExpr |
|
||||
| test.swift:298:11:298:15 | SSA def(z1) | test.swift:300:15:300:15 | z1 |
|
||||
| test.swift:298:20:298:20 | x | test.swift:298:11:298:15 | SSA def(z1) |
|
||||
| test.swift:298:15:298:15 | SSA def(z1) | test.swift:300:15:300:15 | z1 |
|
||||
| test.swift:298:15:298:15 | z1 | test.swift:298:15:298:15 | SSA def(z1) |
|
||||
| test.swift:298:20:298:20 | x | test.swift:298:11:298:15 | let ...? |
|
||||
| test.swift:298:20:298:20 | x | test.swift:303:15:303:15 | x |
|
||||
| test.swift:299:11:299:15 | SSA def(z2) | test.swift:301:15:301:15 | z2 |
|
||||
| test.swift:299:20:299:20 | y | test.swift:299:11:299:15 | SSA def(z2) |
|
||||
| test.swift:299:15:299:15 | SSA def(z2) | test.swift:301:15:301:15 | z2 |
|
||||
| test.swift:299:15:299:15 | z2 | test.swift:299:15:299:15 | SSA def(z2) |
|
||||
| test.swift:299:20:299:20 | y | test.swift:299:11:299:15 | let ...? |
|
||||
| test.swift:299:20:299:20 | y | test.swift:304:15:304:15 | y |
|
||||
| test.swift:303:15:303:15 | x | test.swift:303:15:303:16 | ...! |
|
||||
| test.swift:303:15:303:15 | x | test.swift:306:28:306:28 | x |
|
||||
| test.swift:304:15:304:15 | y | test.swift:304:15:304:16 | ...! |
|
||||
| test.swift:304:15:304:15 | y | test.swift:309:28:309:28 | y |
|
||||
| test.swift:306:13:306:24 | SSA def(z) | test.swift:307:19:307:19 | z |
|
||||
| test.swift:306:28:306:28 | x | test.swift:306:13:306:24 | SSA def(z) |
|
||||
| test.swift:306:23:306:23 | SSA def(z) | test.swift:307:19:307:19 | z |
|
||||
| test.swift:306:23:306:23 | z | test.swift:306:23:306:23 | SSA def(z) |
|
||||
| test.swift:306:28:306:28 | x | test.swift:306:13:306:24 | .some(...) |
|
||||
| test.swift:306:28:306:28 | x | test.swift:313:12:313:12 | x |
|
||||
| test.swift:309:13:309:24 | SSA def(z) | test.swift:310:19:310:19 | z |
|
||||
| test.swift:309:28:309:28 | y | test.swift:309:13:309:24 | SSA def(z) |
|
||||
| test.swift:309:23:309:23 | SSA def(z) | test.swift:310:19:310:19 | z |
|
||||
| test.swift:309:23:309:23 | z | test.swift:309:23:309:23 | SSA def(z) |
|
||||
| test.swift:309:28:309:28 | y | test.swift:309:13:309:24 | .some(...) |
|
||||
| test.swift:309:28:309:28 | y | test.swift:319:12:319:12 | y |
|
||||
| test.swift:314:10:314:21 | SSA def(z) | test.swift:315:19:315:19 | z |
|
||||
| test.swift:320:10:320:21 | SSA def(z) | test.swift:321:19:321:19 | z |
|
||||
| test.swift:313:12:313:12 | x | test.swift:314:10:314:21 | .some(...) |
|
||||
| test.swift:313:12:313:12 | x | test.swift:316:10:316:11 | .none |
|
||||
| test.swift:314:20:314:20 | SSA def(z) | test.swift:315:19:315:19 | z |
|
||||
| test.swift:314:20:314:20 | z | test.swift:314:20:314:20 | SSA def(z) |
|
||||
| test.swift:319:12:319:12 | y | test.swift:320:10:320:21 | .some(...) |
|
||||
| test.swift:319:12:319:12 | y | test.swift:322:10:322:11 | .none |
|
||||
| test.swift:320:20:320:20 | SSA def(z) | test.swift:321:19:321:19 | z |
|
||||
| test.swift:320:20:320:20 | z | test.swift:320:20:320:20 | SSA def(z) |
|
||||
| test.swift:331:9:331:9 | SSA def(t1) | test.swift:333:15:333:15 | t1 |
|
||||
| test.swift:331:14:331:26 | (...) | test.swift:331:9:331:9 | SSA def(t1) |
|
||||
| test.swift:331:9:331:9 | t1 | test.swift:331:9:331:9 | SSA def(t1) |
|
||||
| test.swift:331:14:331:26 | (...) | test.swift:331:9:331:9 | t1 |
|
||||
| test.swift:333:15:333:15 | t1 | test.swift:334:15:334:15 | t1 |
|
||||
| test.swift:334:15:334:15 | [post] t1 | test.swift:335:15:335:15 | t1 |
|
||||
| test.swift:334:15:334:15 | t1 | test.swift:335:15:335:15 | t1 |
|
||||
@@ -295,16 +350,19 @@
|
||||
| test.swift:346:15:346:15 | [post] t1 | test.swift:347:15:347:15 | t1 |
|
||||
| test.swift:346:15:346:15 | t1 | test.swift:347:15:347:15 | t1 |
|
||||
| test.swift:351:9:351:9 | SSA def(t1) | test.swift:352:14:352:14 | t1 |
|
||||
| test.swift:351:14:351:45 | (...) | test.swift:351:9:351:9 | SSA def(t1) |
|
||||
| test.swift:351:9:351:9 | t1 | test.swift:351:9:351:9 | SSA def(t1) |
|
||||
| test.swift:351:14:351:45 | (...) | test.swift:351:9:351:9 | t1 |
|
||||
| test.swift:352:9:352:9 | SSA def(t2) | test.swift:359:15:359:15 | t2 |
|
||||
| test.swift:352:14:352:14 | t1 | test.swift:352:9:352:9 | SSA def(t2) |
|
||||
| test.swift:352:9:352:9 | t2 | test.swift:352:9:352:9 | SSA def(t2) |
|
||||
| test.swift:352:14:352:14 | t1 | test.swift:352:9:352:9 | t2 |
|
||||
| test.swift:352:14:352:14 | t1 | test.swift:353:21:353:21 | t1 |
|
||||
| test.swift:353:9:353:17 | SSA def(a) | test.swift:363:15:363:15 | a |
|
||||
| test.swift:353:9:353:17 | SSA def(b) | test.swift:364:15:364:15 | b |
|
||||
| test.swift:353:9:353:17 | SSA def(c) | test.swift:365:15:365:15 | c |
|
||||
| test.swift:353:21:353:21 | t1 | test.swift:353:9:353:17 | SSA def(a) |
|
||||
| test.swift:353:21:353:21 | t1 | test.swift:353:9:353:17 | SSA def(b) |
|
||||
| test.swift:353:21:353:21 | t1 | test.swift:353:9:353:17 | SSA def(c) |
|
||||
| test.swift:353:10:353:10 | SSA def(a) | test.swift:363:15:363:15 | a |
|
||||
| test.swift:353:10:353:10 | a | test.swift:353:10:353:10 | SSA def(a) |
|
||||
| test.swift:353:13:353:13 | SSA def(b) | test.swift:364:15:364:15 | b |
|
||||
| test.swift:353:13:353:13 | b | test.swift:353:13:353:13 | SSA def(b) |
|
||||
| test.swift:353:16:353:16 | SSA def(c) | test.swift:365:15:365:15 | c |
|
||||
| test.swift:353:16:353:16 | c | test.swift:353:16:353:16 | SSA def(c) |
|
||||
| test.swift:353:21:353:21 | t1 | test.swift:353:9:353:17 | (...) |
|
||||
| test.swift:353:21:353:21 | t1 | test.swift:355:15:355:15 | t1 |
|
||||
| test.swift:355:15:355:15 | t1 | test.swift:356:15:356:15 | t1 |
|
||||
| test.swift:356:15:356:15 | [post] t1 | test.swift:357:15:357:15 | t1 |
|
||||
@@ -316,107 +374,230 @@
|
||||
| test.swift:360:15:360:15 | t2 | test.swift:361:15:361:15 | t2 |
|
||||
| test.swift:361:15:361:15 | [post] t2 | test.swift:362:15:362:15 | t2 |
|
||||
| test.swift:361:15:361:15 | t2 | test.swift:362:15:362:15 | t2 |
|
||||
| test.swift:375:9:375:13 | SSA def(a) | test.swift:377:12:377:12 | a |
|
||||
| test.swift:375:22:375:23 | .myNone | test.swift:375:9:375:13 | SSA def(a) |
|
||||
| test.swift:377:12:377:12 | a | test.swift:387:32:387:32 | a |
|
||||
| test.swift:380:10:380:25 | SSA def(a) | test.swift:381:19:381:19 | a |
|
||||
| test.swift:382:10:382:30 | SSA def(a) | test.swift:383:19:383:19 | a |
|
||||
| test.swift:382:10:382:30 | SSA def(b) | test.swift:384:19:384:19 | b |
|
||||
| test.swift:387:13:387:28 | SSA def(x) | test.swift:388:19:388:19 | x |
|
||||
| test.swift:387:32:387:32 | a | test.swift:387:13:387:28 | SSA def(x) |
|
||||
| test.swift:387:32:387:32 | a | test.swift:390:37:390:37 | a |
|
||||
| test.swift:390:13:390:33 | SSA def(x) | test.swift:391:19:391:19 | x |
|
||||
| test.swift:390:13:390:33 | SSA def(y) | test.swift:392:19:392:19 | y |
|
||||
| test.swift:390:37:390:37 | a | test.swift:407:32:407:32 | a |
|
||||
| test.swift:395:9:395:13 | SSA def(b) | test.swift:397:12:397:12 | b |
|
||||
| test.swift:395:22:395:40 | call to ... | test.swift:395:9:395:13 | SSA def(b) |
|
||||
| test.swift:400:10:400:25 | SSA def(a) | test.swift:401:19:401:19 | a |
|
||||
| test.swift:402:10:402:30 | SSA def(a) | test.swift:403:19:403:19 | a |
|
||||
| test.swift:402:10:402:30 | SSA def(b) | test.swift:404:19:404:19 | b |
|
||||
| test.swift:407:13:407:28 | SSA def(x) | test.swift:408:19:408:19 | x |
|
||||
| test.swift:407:32:407:32 | a | test.swift:407:13:407:28 | SSA def(x) |
|
||||
| test.swift:407:32:407:32 | a | test.swift:410:37:410:37 | a |
|
||||
| test.swift:410:13:410:33 | SSA def(x) | test.swift:411:19:411:19 | x |
|
||||
| test.swift:410:13:410:33 | SSA def(y) | test.swift:412:19:412:19 | y |
|
||||
| test.swift:410:37:410:37 | a | test.swift:427:32:427:32 | a |
|
||||
| test.swift:415:9:415:9 | SSA def(c) | test.swift:417:12:417:12 | c |
|
||||
| test.swift:415:13:415:38 | call to ... | test.swift:415:9:415:9 | SSA def(c) |
|
||||
| test.swift:420:10:420:25 | SSA def(a) | test.swift:421:19:421:19 | a |
|
||||
| test.swift:422:10:422:30 | SSA def(a) | test.swift:423:19:423:19 | a |
|
||||
| test.swift:422:10:422:30 | SSA def(b) | test.swift:424:19:424:19 | b |
|
||||
| test.swift:427:13:427:28 | SSA def(x) | test.swift:428:19:428:19 | x |
|
||||
| test.swift:427:32:427:32 | a | test.swift:427:13:427:28 | SSA def(x) |
|
||||
| test.swift:427:32:427:32 | a | test.swift:430:37:430:37 | a |
|
||||
| test.swift:430:13:430:33 | SSA def(x) | test.swift:431:19:431:19 | x |
|
||||
| test.swift:430:13:430:33 | SSA def(y) | test.swift:432:19:432:19 | y |
|
||||
| test.swift:438:21:438:27 | SSA def(y) | test.swift:441:27:441:27 | y |
|
||||
| test.swift:438:21:438:27 | SSA def(y) | test.swift:446:22:446:22 | y |
|
||||
| test.swift:438:21:438:27 | y | test.swift:438:21:438:27 | SSA def(y) |
|
||||
| test.swift:439:9:439:9 | SSA def(x) | test.swift:441:16:441:16 | x |
|
||||
| test.swift:439:13:439:28 | call to optionalSource() | test.swift:439:9:439:9 | SSA def(x) |
|
||||
| test.swift:441:8:441:12 | SSA def(a) | test.swift:442:19:442:19 | a |
|
||||
| test.swift:441:16:441:16 | x | test.swift:441:8:441:12 | SSA def(a) |
|
||||
| test.swift:441:16:441:16 | x | test.swift:446:19:446:19 | x |
|
||||
| test.swift:441:19:441:23 | SSA def(b) | test.swift:443:19:443:19 | b |
|
||||
| test.swift:441:27:441:27 | y | test.swift:441:19:441:23 | SSA def(b) |
|
||||
| test.swift:441:27:441:27 | y | test.swift:446:22:446:22 | y |
|
||||
| test.swift:446:9:446:9 | SSA def(tuple1) | test.swift:447:12:447:12 | tuple1 |
|
||||
| test.swift:446:18:446:23 | (...) | test.swift:446:9:446:9 | SSA def(tuple1) |
|
||||
| test.swift:448:10:448:37 | SSA def(a) | test.swift:449:19:449:19 | a |
|
||||
| test.swift:448:10:448:37 | SSA def(b) | test.swift:450:19:450:19 | b |
|
||||
| test.swift:455:8:455:17 | SSA def(x) | test.swift:456:19:456:19 | x |
|
||||
| test.swift:455:8:455:17 | SSA def(y) | test.swift:457:19:457:19 | y |
|
||||
| test.swift:461:7:461:7 | SSA def(self) | test.swift:461:7:461:7 | self[return] |
|
||||
| test.swift:461:7:461:7 | SSA def(self) | test.swift:461:7:461:7 | self[return] |
|
||||
| test.swift:461:7:461:7 | self | test.swift:461:7:461:7 | SSA def(self) |
|
||||
| test.swift:461:7:461:7 | self | test.swift:461:7:461:7 | SSA def(self) |
|
||||
| test.swift:462:9:462:9 | self | test.swift:462:9:462:9 | SSA def(self) |
|
||||
| test.swift:462:9:462:9 | self | test.swift:462:9:462:9 | SSA def(self) |
|
||||
| test.swift:462:9:462:9 | self | test.swift:462:9:462:9 | SSA def(self) |
|
||||
| test.swift:462:9:462:9 | value | test.swift:462:9:462:9 | SSA def(value) |
|
||||
| test.swift:465:33:465:39 | SSA def(y) | test.swift:470:12:470:12 | y |
|
||||
| test.swift:465:33:465:39 | y | test.swift:465:33:465:39 | SSA def(y) |
|
||||
| test.swift:466:9:466:9 | SSA def(x) | test.swift:468:12:468:12 | x |
|
||||
| test.swift:466:13:466:28 | call to optionalSource() | test.swift:466:9:466:9 | SSA def(x) |
|
||||
| test.swift:467:9:467:9 | SSA def(cx) | test.swift:468:5:468:5 | cx |
|
||||
| test.swift:467:14:467:16 | call to C.init() | test.swift:467:9:467:9 | SSA def(cx) |
|
||||
| test.swift:468:5:468:5 | [post] cx | test.swift:472:20:472:20 | cx |
|
||||
| test.swift:468:5:468:5 | cx | test.swift:472:20:472:20 | cx |
|
||||
| test.swift:469:9:469:9 | SSA def(cy) | test.swift:470:5:470:5 | cy |
|
||||
| test.swift:469:14:469:16 | call to C.init() | test.swift:469:9:469:9 | SSA def(cy) |
|
||||
| test.swift:470:5:470:5 | [post] cy | test.swift:474:20:474:20 | cy |
|
||||
| test.swift:470:5:470:5 | cy | test.swift:474:20:474:20 | cy |
|
||||
| test.swift:472:11:472:15 | SSA def(z1) | test.swift:473:15:473:15 | z1 |
|
||||
| test.swift:472:20:472:23 | .x | test.swift:472:11:472:15 | SSA def(z1) |
|
||||
| test.swift:474:11:474:15 | SSA def(z2) | test.swift:475:15:475:15 | z2 |
|
||||
| test.swift:474:20:474:23 | .x | test.swift:474:11:474:15 | SSA def(z2) |
|
||||
| test.swift:479:14:479:21 | call to source() | test.swift:479:13:479:21 | call to +(_:) |
|
||||
| test.swift:487:7:487:7 | SSA def(self) | test.swift:487:7:487:7 | self[return] |
|
||||
| test.swift:487:7:487:7 | self | test.swift:487:7:487:7 | SSA def(self) |
|
||||
| test.swift:488:9:488:9 | self | test.swift:488:9:488:9 | SSA def(self) |
|
||||
| test.swift:488:9:488:9 | self | test.swift:488:9:488:9 | SSA def(self) |
|
||||
| test.swift:488:9:488:9 | self | test.swift:488:9:488:9 | SSA def(self) |
|
||||
| test.swift:488:9:488:9 | value | test.swift:488:9:488:9 | SSA def(value) |
|
||||
| test.swift:489:5:489:5 | SSA def(self) | test.swift:490:7:490:7 | self |
|
||||
| test.swift:489:5:489:5 | self | test.swift:489:5:489:5 | SSA def(self) |
|
||||
| test.swift:489:10:489:13 | SSA def(s) | test.swift:490:13:490:13 | s |
|
||||
| test.swift:489:10:489:13 | s | test.swift:489:10:489:13 | SSA def(s) |
|
||||
| test.swift:490:7:490:7 | [post] self | test.swift:489:5:491:5 | self[return] |
|
||||
| test.swift:490:7:490:7 | self | test.swift:489:5:491:5 | self[return] |
|
||||
| test.swift:495:17:495:17 | SSA def(self) | test.swift:496:7:496:7 | self |
|
||||
| test.swift:495:17:495:17 | self | test.swift:495:17:495:17 | SSA def(self) |
|
||||
| test.swift:496:7:496:7 | [post] self | test.swift:497:17:497:17 | self |
|
||||
| test.swift:496:7:496:7 | self | test.swift:497:17:497:17 | self |
|
||||
| test.swift:497:17:497:17 | [post] self | test.swift:495:17:498:5 | self[return] |
|
||||
| test.swift:497:17:497:17 | self | test.swift:495:17:498:5 | self[return] |
|
||||
| test.swift:501:21:501:27 | SSA def(path) | test.swift:503:37:503:37 | path |
|
||||
| test.swift:501:21:501:27 | path | test.swift:501:21:501:27 | SSA def(path) |
|
||||
| test.swift:506:7:506:7 | SSA def(self) | test.swift:506:7:506:7 | self[return] |
|
||||
| test.swift:506:7:506:7 | self | test.swift:506:7:506:7 | SSA def(self) |
|
||||
| test.swift:507:3:507:3 | SSA def(self) | test.swift:507:3:507:40 | self[return] |
|
||||
| test.swift:507:3:507:3 | self | test.swift:507:3:507:3 | SSA def(self) |
|
||||
| test.swift:507:27:507:38 | SSA def(n) | test.swift:507:3:507:40 | n[return] |
|
||||
| test.swift:507:31:507:38 | call to source() | test.swift:507:27:507:38 | SSA def(n) |
|
||||
| test.swift:513:7:513:7 | SSA def(n) | test.swift:514:36:514:36 | n |
|
||||
| test.swift:513:11:513:11 | 0 | test.swift:513:7:513:7 | SSA def(n) |
|
||||
| test.swift:514:36:514:36 | n | test.swift:514:35:514:36 | &... |
|
||||
| test.swift:376:9:376:9 | SSA def(a) | test.swift:378:12:378:12 | a |
|
||||
| test.swift:376:9:376:9 | a | test.swift:376:9:376:9 | SSA def(a) |
|
||||
| test.swift:376:9:376:13 | ... as ... | test.swift:376:9:376:9 | a |
|
||||
| test.swift:376:22:376:23 | .myNone | test.swift:376:9:376:13 | ... as ... |
|
||||
| test.swift:378:12:378:12 | a | test.swift:379:10:379:11 | .myNone |
|
||||
| test.swift:378:12:378:12 | a | test.swift:381:10:381:25 | .mySingle(...) |
|
||||
| test.swift:378:12:378:12 | a | test.swift:383:10:383:30 | .myPair(...) |
|
||||
| test.swift:378:12:378:12 | a | test.swift:386:14:386:26 | .myCons(...) |
|
||||
| test.swift:378:12:378:12 | a | test.swift:390:32:390:32 | a |
|
||||
| test.swift:381:24:381:24 | SSA def(a) | test.swift:382:19:382:19 | a |
|
||||
| test.swift:381:24:381:24 | a | test.swift:381:24:381:24 | SSA def(a) |
|
||||
| test.swift:383:22:383:22 | SSA def(a) | test.swift:384:19:384:19 | a |
|
||||
| test.swift:383:22:383:22 | a | test.swift:383:22:383:22 | SSA def(a) |
|
||||
| test.swift:383:29:383:29 | SSA def(b) | test.swift:385:19:385:19 | b |
|
||||
| test.swift:383:29:383:29 | b | test.swift:383:29:383:29 | SSA def(b) |
|
||||
| test.swift:386:10:386:26 | SSA phi(a) | test.swift:387:19:387:19 | a |
|
||||
| test.swift:386:22:386:22 | SSA def(a) | test.swift:386:10:386:26 | SSA phi(a) |
|
||||
| test.swift:386:22:386:22 | a | test.swift:386:22:386:22 | SSA def(a) |
|
||||
| test.swift:390:27:390:27 | SSA def(x) | test.swift:391:19:391:19 | x |
|
||||
| test.swift:390:27:390:27 | x | test.swift:390:27:390:27 | SSA def(x) |
|
||||
| test.swift:390:32:390:32 | a | test.swift:390:13:390:28 | .mySingle(...) |
|
||||
| test.swift:390:32:390:32 | a | test.swift:393:37:393:37 | a |
|
||||
| test.swift:393:25:393:25 | SSA def(x) | test.swift:394:19:394:19 | x |
|
||||
| test.swift:393:25:393:25 | x | test.swift:393:25:393:25 | SSA def(x) |
|
||||
| test.swift:393:32:393:32 | SSA def(y) | test.swift:395:19:395:19 | y |
|
||||
| test.swift:393:32:393:32 | y | test.swift:393:32:393:32 | SSA def(y) |
|
||||
| test.swift:393:37:393:37 | a | test.swift:393:13:393:33 | .myPair(...) |
|
||||
| test.swift:398:5:398:27 | SSA def(a) | test.swift:400:12:400:12 | a |
|
||||
| test.swift:398:9:398:27 | call to ... | test.swift:398:5:398:27 | SSA def(a) |
|
||||
| test.swift:400:12:400:12 | a | test.swift:401:10:401:11 | .myNone |
|
||||
| test.swift:400:12:400:12 | a | test.swift:403:10:403:25 | .mySingle(...) |
|
||||
| test.swift:400:12:400:12 | a | test.swift:405:10:405:30 | .myPair(...) |
|
||||
| test.swift:400:12:400:12 | a | test.swift:408:14:408:26 | .myCons(...) |
|
||||
| test.swift:400:12:400:12 | a | test.swift:412:32:412:32 | a |
|
||||
| test.swift:403:24:403:24 | SSA def(a) | test.swift:404:19:404:19 | a |
|
||||
| test.swift:403:24:403:24 | a | test.swift:403:24:403:24 | SSA def(a) |
|
||||
| test.swift:405:22:405:22 | SSA def(a) | test.swift:406:19:406:19 | a |
|
||||
| test.swift:405:22:405:22 | a | test.swift:405:22:405:22 | SSA def(a) |
|
||||
| test.swift:405:29:405:29 | SSA def(b) | test.swift:407:19:407:19 | b |
|
||||
| test.swift:405:29:405:29 | b | test.swift:405:29:405:29 | SSA def(b) |
|
||||
| test.swift:408:10:408:26 | SSA phi(a) | test.swift:409:19:409:19 | a |
|
||||
| test.swift:408:22:408:22 | SSA def(a) | test.swift:408:10:408:26 | SSA phi(a) |
|
||||
| test.swift:408:22:408:22 | a | test.swift:408:22:408:22 | SSA def(a) |
|
||||
| test.swift:412:27:412:27 | SSA def(x) | test.swift:413:19:413:19 | x |
|
||||
| test.swift:412:27:412:27 | x | test.swift:412:27:412:27 | SSA def(x) |
|
||||
| test.swift:412:32:412:32 | a | test.swift:412:13:412:28 | .mySingle(...) |
|
||||
| test.swift:412:32:412:32 | a | test.swift:415:37:415:37 | a |
|
||||
| test.swift:415:25:415:25 | SSA def(x) | test.swift:416:19:416:19 | x |
|
||||
| test.swift:415:25:415:25 | x | test.swift:415:25:415:25 | SSA def(x) |
|
||||
| test.swift:415:32:415:32 | SSA def(y) | test.swift:417:19:417:19 | y |
|
||||
| test.swift:415:32:415:32 | y | test.swift:415:32:415:32 | SSA def(y) |
|
||||
| test.swift:415:37:415:37 | a | test.swift:415:13:415:33 | .myPair(...) |
|
||||
| test.swift:420:5:420:34 | SSA def(a) | test.swift:422:12:422:12 | a |
|
||||
| test.swift:420:9:420:34 | call to ... | test.swift:420:5:420:34 | SSA def(a) |
|
||||
| test.swift:422:12:422:12 | a | test.swift:423:10:423:11 | .myNone |
|
||||
| test.swift:422:12:422:12 | a | test.swift:425:10:425:25 | .mySingle(...) |
|
||||
| test.swift:422:12:422:12 | a | test.swift:427:10:427:30 | .myPair(...) |
|
||||
| test.swift:422:12:422:12 | a | test.swift:430:14:430:26 | .myCons(...) |
|
||||
| test.swift:422:12:422:12 | a | test.swift:434:32:434:32 | a |
|
||||
| test.swift:425:24:425:24 | SSA def(a) | test.swift:426:19:426:19 | a |
|
||||
| test.swift:425:24:425:24 | a | test.swift:425:24:425:24 | SSA def(a) |
|
||||
| test.swift:427:22:427:22 | SSA def(a) | test.swift:428:19:428:19 | a |
|
||||
| test.swift:427:22:427:22 | a | test.swift:427:22:427:22 | SSA def(a) |
|
||||
| test.swift:427:29:427:29 | SSA def(b) | test.swift:429:19:429:19 | b |
|
||||
| test.swift:427:29:427:29 | b | test.swift:427:29:427:29 | SSA def(b) |
|
||||
| test.swift:430:10:430:26 | SSA phi(a) | test.swift:431:19:431:19 | a |
|
||||
| test.swift:430:22:430:22 | SSA def(a) | test.swift:430:10:430:26 | SSA phi(a) |
|
||||
| test.swift:430:22:430:22 | a | test.swift:430:22:430:22 | SSA def(a) |
|
||||
| test.swift:434:27:434:27 | SSA def(x) | test.swift:435:19:435:19 | x |
|
||||
| test.swift:434:27:434:27 | x | test.swift:434:27:434:27 | SSA def(x) |
|
||||
| test.swift:434:32:434:32 | a | test.swift:434:13:434:28 | .mySingle(...) |
|
||||
| test.swift:434:32:434:32 | a | test.swift:437:37:437:37 | a |
|
||||
| test.swift:437:25:437:25 | SSA def(x) | test.swift:438:19:438:19 | x |
|
||||
| test.swift:437:25:437:25 | x | test.swift:437:25:437:25 | SSA def(x) |
|
||||
| test.swift:437:32:437:32 | SSA def(y) | test.swift:439:19:439:19 | y |
|
||||
| test.swift:437:32:437:32 | y | test.swift:437:32:437:32 | SSA def(y) |
|
||||
| test.swift:437:37:437:37 | a | test.swift:437:13:437:33 | .myPair(...) |
|
||||
| test.swift:437:37:437:37 | a | test.swift:442:33:442:33 | a |
|
||||
| test.swift:442:9:442:9 | SSA def(b) | test.swift:444:12:444:12 | b |
|
||||
| test.swift:442:9:442:9 | b | test.swift:442:9:442:9 | SSA def(b) |
|
||||
| test.swift:442:9:442:12 | ... as ... | test.swift:442:9:442:9 | b |
|
||||
| test.swift:442:21:442:34 | call to ... | test.swift:442:9:442:12 | ... as ... |
|
||||
| test.swift:442:33:442:33 | [post] a | test.swift:471:13:471:13 | a |
|
||||
| test.swift:442:33:442:33 | a | test.swift:471:13:471:13 | a |
|
||||
| test.swift:444:12:444:12 | b | test.swift:445:10:445:11 | .myNone |
|
||||
| test.swift:444:12:444:12 | b | test.swift:447:10:447:25 | .mySingle(...) |
|
||||
| test.swift:444:12:444:12 | b | test.swift:449:10:449:30 | .myPair(...) |
|
||||
| test.swift:444:12:444:12 | b | test.swift:452:14:452:38 | .myCons(...) |
|
||||
| test.swift:444:12:444:12 | b | test.swift:456:14:456:26 | .myCons(...) |
|
||||
| test.swift:444:12:444:12 | b | test.swift:467:45:467:45 | b |
|
||||
| test.swift:447:24:447:24 | SSA def(a) | test.swift:448:19:448:19 | a |
|
||||
| test.swift:447:24:447:24 | a | test.swift:447:24:447:24 | SSA def(a) |
|
||||
| test.swift:449:22:449:22 | SSA def(a) | test.swift:450:19:450:19 | a |
|
||||
| test.swift:449:22:449:22 | a | test.swift:449:22:449:22 | SSA def(a) |
|
||||
| test.swift:449:29:449:29 | SSA def(b) | test.swift:451:19:451:19 | b |
|
||||
| test.swift:449:29:449:29 | b | test.swift:449:29:449:29 | SSA def(b) |
|
||||
| test.swift:452:10:452:38 | SSA phi(a) | test.swift:453:19:453:19 | a |
|
||||
| test.swift:452:10:452:38 | SSA phi(b) | test.swift:454:19:454:19 | b |
|
||||
| test.swift:452:10:452:38 | SSA phi(c) | test.swift:455:19:455:19 | c |
|
||||
| test.swift:452:22:452:22 | SSA def(a) | test.swift:452:10:452:38 | SSA phi(a) |
|
||||
| test.swift:452:22:452:22 | a | test.swift:452:22:452:22 | SSA def(a) |
|
||||
| test.swift:452:33:452:33 | SSA def(b) | test.swift:452:10:452:38 | SSA phi(b) |
|
||||
| test.swift:452:33:452:33 | b | test.swift:452:33:452:33 | SSA def(b) |
|
||||
| test.swift:452:36:452:36 | SSA def(c) | test.swift:452:10:452:38 | SSA phi(c) |
|
||||
| test.swift:452:36:452:36 | c | test.swift:452:36:452:36 | SSA def(c) |
|
||||
| test.swift:456:10:456:26 | SSA phi(a) | test.swift:457:19:457:19 | a |
|
||||
| test.swift:456:22:456:22 | SSA def(a) | test.swift:456:10:456:26 | SSA phi(a) |
|
||||
| test.swift:456:22:456:22 | a | test.swift:456:22:456:22 | SSA def(a) |
|
||||
| test.swift:460:27:460:27 | SSA def(x) | test.swift:461:19:461:19 | x |
|
||||
| test.swift:460:27:460:27 | x | test.swift:460:27:460:27 | SSA def(x) |
|
||||
| test.swift:460:32:460:57 | call to ... | test.swift:460:13:460:28 | .mySingle(...) |
|
||||
| test.swift:463:31:463:31 | SSA def(x) | test.swift:464:19:464:19 | x |
|
||||
| test.swift:463:31:463:31 | x | test.swift:463:31:463:31 | SSA def(x) |
|
||||
| test.swift:463:38:463:38 | SSA def(y) | test.swift:465:19:465:19 | y |
|
||||
| test.swift:463:38:463:38 | y | test.swift:463:38:463:38 | SSA def(y) |
|
||||
| test.swift:463:43:463:62 | call to ... | test.swift:463:13:463:39 | .myPair(...) |
|
||||
| test.swift:467:13:467:41 | SSA phi(c) | test.swift:468:19:468:19 | c |
|
||||
| test.swift:467:39:467:39 | SSA def(c) | test.swift:467:13:467:41 | SSA phi(c) |
|
||||
| test.swift:467:39:467:39 | c | test.swift:467:39:467:39 | SSA def(c) |
|
||||
| test.swift:467:45:467:45 | b | test.swift:467:17:467:41 | .myCons(...) |
|
||||
| test.swift:467:45:467:45 | b | test.swift:471:16:471:16 | b |
|
||||
| test.swift:471:12:471:17 | (...) | test.swift:472:14:472:55 | (...) |
|
||||
| test.swift:471:12:471:17 | (...) | test.swift:478:5:478:5 | _ |
|
||||
| test.swift:472:10:472:55 | SSA phi(a) | test.swift:473:19:473:19 | a |
|
||||
| test.swift:472:10:472:55 | SSA phi(b) | test.swift:474:19:474:19 | b |
|
||||
| test.swift:472:10:472:55 | SSA phi(c) | test.swift:475:19:475:19 | c |
|
||||
| test.swift:472:10:472:55 | SSA phi(d) | test.swift:476:19:476:19 | d |
|
||||
| test.swift:472:10:472:55 | SSA phi(e) | test.swift:477:19:477:19 | e |
|
||||
| test.swift:472:23:472:23 | SSA def(a) | test.swift:472:10:472:55 | SSA phi(a) |
|
||||
| test.swift:472:23:472:23 | a | test.swift:472:23:472:23 | SSA def(a) |
|
||||
| test.swift:472:26:472:26 | SSA def(b) | test.swift:472:10:472:55 | SSA phi(b) |
|
||||
| test.swift:472:26:472:26 | b | test.swift:472:26:472:26 | SSA def(b) |
|
||||
| test.swift:472:38:472:38 | SSA def(c) | test.swift:472:10:472:55 | SSA phi(c) |
|
||||
| test.swift:472:38:472:38 | c | test.swift:472:38:472:38 | SSA def(c) |
|
||||
| test.swift:472:49:472:49 | SSA def(d) | test.swift:472:10:472:55 | SSA phi(d) |
|
||||
| test.swift:472:49:472:49 | d | test.swift:472:49:472:49 | SSA def(d) |
|
||||
| test.swift:472:52:472:52 | SSA def(e) | test.swift:472:10:472:55 | SSA phi(e) |
|
||||
| test.swift:472:52:472:52 | e | test.swift:472:52:472:52 | SSA def(e) |
|
||||
| test.swift:485:21:485:27 | SSA def(y) | test.swift:488:27:488:27 | y |
|
||||
| test.swift:485:21:485:27 | SSA def(y) | test.swift:493:22:493:22 | y |
|
||||
| test.swift:485:21:485:27 | y | test.swift:485:21:485:27 | SSA def(y) |
|
||||
| test.swift:486:9:486:9 | SSA def(x) | test.swift:488:16:488:16 | x |
|
||||
| test.swift:486:9:486:9 | x | test.swift:486:9:486:9 | SSA def(x) |
|
||||
| test.swift:486:13:486:28 | call to optionalSource() | test.swift:486:9:486:9 | x |
|
||||
| test.swift:488:12:488:12 | SSA def(a) | test.swift:488:27:488:27 | SSA phi(a) |
|
||||
| test.swift:488:12:488:12 | a | test.swift:488:12:488:12 | SSA def(a) |
|
||||
| test.swift:488:16:488:16 | x | test.swift:488:8:488:12 | let ...? |
|
||||
| test.swift:488:16:488:16 | x | test.swift:493:19:493:19 | x |
|
||||
| test.swift:488:23:488:23 | SSA def(b) | test.swift:490:19:490:19 | b |
|
||||
| test.swift:488:23:488:23 | b | test.swift:488:23:488:23 | SSA def(b) |
|
||||
| test.swift:488:27:488:27 | SSA phi(a) | test.swift:489:19:489:19 | a |
|
||||
| test.swift:488:27:488:27 | y | test.swift:488:19:488:23 | let ...? |
|
||||
| test.swift:488:27:488:27 | y | test.swift:493:22:493:22 | y |
|
||||
| test.swift:493:9:493:9 | SSA def(tuple1) | test.swift:494:12:494:12 | tuple1 |
|
||||
| test.swift:493:9:493:9 | tuple1 | test.swift:493:9:493:9 | SSA def(tuple1) |
|
||||
| test.swift:493:18:493:23 | (...) | test.swift:493:9:493:9 | tuple1 |
|
||||
| test.swift:494:12:494:12 | tuple1 | test.swift:495:10:495:37 | (...) |
|
||||
| test.swift:494:12:494:12 | tuple1 | test.swift:498:5:498:5 | _ |
|
||||
| test.swift:495:21:495:21 | SSA def(a) | test.swift:496:19:496:19 | a |
|
||||
| test.swift:495:21:495:21 | a | test.swift:495:21:495:21 | SSA def(a) |
|
||||
| test.swift:495:35:495:35 | SSA def(b) | test.swift:497:19:497:19 | b |
|
||||
| test.swift:495:35:495:35 | b | test.swift:495:35:495:35 | SSA def(b) |
|
||||
| test.swift:502:13:502:13 | SSA def(x) | test.swift:503:19:503:19 | x |
|
||||
| test.swift:502:13:502:13 | x | test.swift:502:13:502:13 | SSA def(x) |
|
||||
| test.swift:502:16:502:16 | SSA def(y) | test.swift:504:19:504:19 | y |
|
||||
| test.swift:502:16:502:16 | y | test.swift:502:16:502:16 | SSA def(y) |
|
||||
| test.swift:502:21:502:29 | call to source2() | test.swift:502:8:502:17 | let ...? |
|
||||
| test.swift:508:7:508:7 | SSA def(self) | test.swift:508:7:508:7 | self[return] |
|
||||
| test.swift:508:7:508:7 | SSA def(self) | test.swift:508:7:508:7 | self[return] |
|
||||
| test.swift:508:7:508:7 | self | test.swift:508:7:508:7 | SSA def(self) |
|
||||
| test.swift:508:7:508:7 | self | test.swift:508:7:508:7 | SSA def(self) |
|
||||
| test.swift:509:9:509:9 | self | test.swift:509:9:509:9 | SSA def(self) |
|
||||
| test.swift:509:9:509:9 | self | test.swift:509:9:509:9 | SSA def(self) |
|
||||
| test.swift:509:9:509:9 | self | test.swift:509:9:509:9 | SSA def(self) |
|
||||
| test.swift:509:9:509:9 | value | test.swift:509:9:509:9 | SSA def(value) |
|
||||
| test.swift:512:33:512:39 | SSA def(y) | test.swift:517:12:517:12 | y |
|
||||
| test.swift:512:33:512:39 | y | test.swift:512:33:512:39 | SSA def(y) |
|
||||
| test.swift:513:9:513:9 | SSA def(x) | test.swift:515:12:515:12 | x |
|
||||
| test.swift:513:9:513:9 | x | test.swift:513:9:513:9 | SSA def(x) |
|
||||
| test.swift:513:13:513:28 | call to optionalSource() | test.swift:513:9:513:9 | x |
|
||||
| test.swift:514:9:514:9 | SSA def(cx) | test.swift:515:5:515:5 | cx |
|
||||
| test.swift:514:9:514:9 | cx | test.swift:514:9:514:9 | SSA def(cx) |
|
||||
| test.swift:514:14:514:16 | call to C.init() | test.swift:514:9:514:9 | cx |
|
||||
| test.swift:515:5:515:5 | [post] cx | test.swift:519:20:519:20 | cx |
|
||||
| test.swift:515:5:515:5 | cx | test.swift:519:20:519:20 | cx |
|
||||
| test.swift:516:9:516:9 | SSA def(cy) | test.swift:517:5:517:5 | cy |
|
||||
| test.swift:516:9:516:9 | cy | test.swift:516:9:516:9 | SSA def(cy) |
|
||||
| test.swift:516:14:516:16 | call to C.init() | test.swift:516:9:516:9 | cy |
|
||||
| test.swift:517:5:517:5 | [post] cy | test.swift:521:20:521:20 | cy |
|
||||
| test.swift:517:5:517:5 | cy | test.swift:521:20:521:20 | cy |
|
||||
| test.swift:519:15:519:15 | SSA def(z1) | test.swift:520:15:520:15 | z1 |
|
||||
| test.swift:519:15:519:15 | z1 | test.swift:519:15:519:15 | SSA def(z1) |
|
||||
| test.swift:519:20:519:23 | .x | test.swift:519:11:519:15 | let ...? |
|
||||
| test.swift:521:15:521:15 | SSA def(z2) | test.swift:522:15:522:15 | z2 |
|
||||
| test.swift:521:15:521:15 | z2 | test.swift:521:15:521:15 | SSA def(z2) |
|
||||
| test.swift:521:20:521:23 | .x | test.swift:521:11:521:15 | let ...? |
|
||||
| test.swift:526:14:526:21 | call to source() | test.swift:526:13:526:21 | call to +(_:) |
|
||||
| test.swift:534:7:534:7 | SSA def(self) | test.swift:534:7:534:7 | self[return] |
|
||||
| test.swift:534:7:534:7 | self | test.swift:534:7:534:7 | SSA def(self) |
|
||||
| test.swift:535:9:535:9 | self | test.swift:535:9:535:9 | SSA def(self) |
|
||||
| test.swift:535:9:535:9 | self | test.swift:535:9:535:9 | SSA def(self) |
|
||||
| test.swift:535:9:535:9 | self | test.swift:535:9:535:9 | SSA def(self) |
|
||||
| test.swift:535:9:535:9 | value | test.swift:535:9:535:9 | SSA def(value) |
|
||||
| test.swift:536:5:536:5 | SSA def(self) | test.swift:537:7:537:7 | self |
|
||||
| test.swift:536:5:536:5 | self | test.swift:536:5:536:5 | SSA def(self) |
|
||||
| test.swift:536:10:536:13 | SSA def(s) | test.swift:537:13:537:13 | s |
|
||||
| test.swift:536:10:536:13 | s | test.swift:536:10:536:13 | SSA def(s) |
|
||||
| test.swift:537:7:537:7 | [post] self | test.swift:536:5:538:5 | self[return] |
|
||||
| test.swift:537:7:537:7 | self | test.swift:536:5:538:5 | self[return] |
|
||||
| test.swift:542:17:542:17 | SSA def(self) | test.swift:543:7:543:7 | self |
|
||||
| test.swift:542:17:542:17 | self | test.swift:542:17:542:17 | SSA def(self) |
|
||||
| test.swift:543:7:543:7 | [post] self | test.swift:544:17:544:17 | self |
|
||||
| test.swift:543:7:543:7 | self | test.swift:544:17:544:17 | self |
|
||||
| test.swift:544:17:544:17 | [post] self | test.swift:542:17:545:5 | self[return] |
|
||||
| test.swift:544:17:544:17 | self | test.swift:542:17:545:5 | self[return] |
|
||||
| test.swift:548:21:548:27 | SSA def(path) | test.swift:550:37:550:37 | path |
|
||||
| test.swift:548:21:548:27 | path | test.swift:548:21:548:27 | SSA def(path) |
|
||||
| test.swift:553:7:553:7 | SSA def(self) | test.swift:553:7:553:7 | self[return] |
|
||||
| test.swift:553:7:553:7 | self | test.swift:553:7:553:7 | SSA def(self) |
|
||||
| test.swift:554:3:554:3 | SSA def(self) | test.swift:554:3:554:40 | self[return] |
|
||||
| test.swift:554:3:554:3 | self | test.swift:554:3:554:3 | SSA def(self) |
|
||||
| test.swift:554:27:554:38 | SSA def(n) | test.swift:554:3:554:40 | n[return] |
|
||||
| test.swift:554:31:554:38 | call to source() | test.swift:554:27:554:38 | SSA def(n) |
|
||||
| test.swift:560:7:560:7 | SSA def(n) | test.swift:561:36:561:36 | n |
|
||||
| test.swift:560:7:560:7 | n | test.swift:560:7:560:7 | SSA def(n) |
|
||||
| test.swift:560:11:560:11 | 0 | test.swift:560:7:560:7 | n |
|
||||
| test.swift:561:36:561:36 | n | test.swift:561:35:561:36 | &... |
|
||||
|
||||
@@ -312,7 +312,7 @@ func test_optionals(y: Int?) {
|
||||
|
||||
switch x {
|
||||
case .some(let z):
|
||||
sink(arg: z) // $ MISSING: flow=259
|
||||
sink(arg: z) // $ flow=259
|
||||
case .none:
|
||||
()
|
||||
}
|
||||
@@ -360,19 +360,20 @@ func testTuples2() {
|
||||
sink(arg: t2.x) // $ flow=351
|
||||
sink(arg: t2.y) // $ flow=351
|
||||
sink(arg: t2.z)
|
||||
sink(arg: a) // $ MISSING: flow=351
|
||||
sink(arg: b) // $ MISSING: flow=351
|
||||
sink(arg: a) // $ flow=351
|
||||
sink(arg: b) // $ flow=351
|
||||
sink(arg: c)
|
||||
}
|
||||
|
||||
enum MyEnum {
|
||||
indirect enum MyEnum {
|
||||
case myNone
|
||||
case mySingle(Int)
|
||||
case myPair(Int, Int)
|
||||
case myCons(Int, MyEnum)
|
||||
}
|
||||
|
||||
func testEnums() {
|
||||
let a : MyEnum = .myNone
|
||||
var a : MyEnum = .myNone
|
||||
|
||||
switch a {
|
||||
case .myNone:
|
||||
@@ -382,6 +383,8 @@ func testEnums() {
|
||||
case .myPair(let a, let b):
|
||||
sink(arg: a)
|
||||
sink(arg: b)
|
||||
case let .myCons(a, _):
|
||||
sink(arg: a)
|
||||
}
|
||||
|
||||
if case .mySingle(let x) = a {
|
||||
@@ -392,44 +395,88 @@ func testEnums() {
|
||||
sink(arg: y)
|
||||
}
|
||||
|
||||
let b : MyEnum = .mySingle(source())
|
||||
a = .mySingle(source())
|
||||
|
||||
switch a {
|
||||
case .myNone:
|
||||
()
|
||||
case .mySingle(let a):
|
||||
sink(arg: a) // $ flow=398
|
||||
case .myPair(let a, let b):
|
||||
sink(arg: a)
|
||||
sink(arg: b)
|
||||
case let .myCons(a, _):
|
||||
sink(arg: a)
|
||||
}
|
||||
|
||||
if case .mySingle(let x) = a {
|
||||
sink(arg: x) // $ flow=398
|
||||
}
|
||||
if case .myPair(let x, let y) = a {
|
||||
sink(arg: x)
|
||||
sink(arg: y)
|
||||
}
|
||||
|
||||
a = MyEnum.myPair(0, source())
|
||||
|
||||
switch a {
|
||||
case .myNone:
|
||||
()
|
||||
case .mySingle(let a):
|
||||
sink(arg: a)
|
||||
case .myPair(let a, let b):
|
||||
sink(arg: a)
|
||||
sink(arg: b) // $ flow=420
|
||||
case let .myCons(a, _):
|
||||
sink(arg: a)
|
||||
}
|
||||
|
||||
if case .mySingle(let x) = a {
|
||||
sink(arg: x)
|
||||
}
|
||||
if case .myPair(let x, let y) = a {
|
||||
sink(arg: x)
|
||||
sink(arg: y) // $ flow=420
|
||||
}
|
||||
|
||||
let b: MyEnum = .myCons(42, a)
|
||||
|
||||
switch b {
|
||||
case .myNone:
|
||||
()
|
||||
case .mySingle(let a):
|
||||
sink(arg: a) // $ MISSING: flow=395
|
||||
sink(arg: a)
|
||||
case .myPair(let a, let b):
|
||||
sink(arg: a)
|
||||
sink(arg: b)
|
||||
case let .myCons(a, .myPair(b, c)):
|
||||
sink(arg: a)
|
||||
sink(arg: b)
|
||||
sink(arg: c) // $ flow=420
|
||||
case let .myCons(a, _):
|
||||
sink(arg: a)
|
||||
}
|
||||
|
||||
if case .mySingle(let x) = a {
|
||||
sink(arg: x) // $ MISSING: flow=395
|
||||
}
|
||||
if case .myPair(let x, let y) = a {
|
||||
if case .mySingle(let x) = MyEnum.myPair(source(), 0) {
|
||||
sink(arg: x)
|
||||
}
|
||||
if case MyEnum.myPair(let x, let y) = .myPair(source(), 0) {
|
||||
sink(arg: x) // $ flow=463
|
||||
sink(arg: y)
|
||||
}
|
||||
if case let .myCons(_, .myPair(_, c)) = b {
|
||||
sink(arg: c) // $ flow=420
|
||||
}
|
||||
|
||||
let c = MyEnum.myPair(0, source())
|
||||
|
||||
switch c {
|
||||
case .myNone:
|
||||
switch (a, b) {
|
||||
case let (.myPair(a, b), .myCons(c, .myPair(d, e))):
|
||||
sink(arg: a)
|
||||
sink(arg: b) // $ flow=420
|
||||
sink(arg: c)
|
||||
sink(arg: d)
|
||||
sink(arg: e) // $ flow=420
|
||||
default:
|
||||
()
|
||||
case .mySingle(let a):
|
||||
sink(arg: a)
|
||||
case .myPair(let a, let b):
|
||||
sink(arg: a)
|
||||
sink(arg: b) // $ MISSING: flow=415
|
||||
}
|
||||
|
||||
if case .mySingle(let x) = a {
|
||||
sink(arg: x)
|
||||
}
|
||||
if case .myPair(let x, let y) = a {
|
||||
sink(arg: x)
|
||||
sink(arg: y) // $ MISSING: flow=415
|
||||
}
|
||||
}
|
||||
|
||||
@@ -446,7 +493,7 @@ func testOptionals2(y: Int?) {
|
||||
let tuple1 = (x, y)
|
||||
switch tuple1 {
|
||||
case (.some(let a), .some(let b)):
|
||||
sink(arg: a) // $ MISSING: flow=259
|
||||
sink(arg: a) // $ flow=259
|
||||
sink(arg: b)
|
||||
default:
|
||||
()
|
||||
@@ -476,8 +523,8 @@ func testOptionalPropertyAccess(y: Int?) {
|
||||
}
|
||||
|
||||
func testIdentityArithmetic() {
|
||||
sink(arg: +source()) // $ flow=479
|
||||
sink(arg: (source())) // $ flow=480
|
||||
sink(arg: +source()) // $ flow=526
|
||||
sink(arg: (source())) // $ flow=527
|
||||
}
|
||||
|
||||
func sink(str: String) {}
|
||||
@@ -493,14 +540,14 @@ class MyClass {
|
||||
|
||||
extension MyClass {
|
||||
convenience init(contentsOfFile: String) {
|
||||
self.init(s: source3())
|
||||
sink(str: str) // $ flow=496
|
||||
self.init(s: source3())
|
||||
sink(str: str) // $ flow=543
|
||||
}
|
||||
}
|
||||
|
||||
func extensionInits(path: String) {
|
||||
sink(str: MyClass(s: source3()).str) // $ flow=502
|
||||
sink(str: MyClass(contentsOfFile: path).str) // $ flow=496
|
||||
sink(str: MyClass(s: source3()).str) // $ flow=549
|
||||
sink(str: MyClass(contentsOfFile: path).str) // $ flow=543
|
||||
}
|
||||
|
||||
class InoutConstructorClass {
|
||||
@@ -512,4 +559,4 @@ func sink(arg: InoutConstructorClass) {}
|
||||
func inoutConstructor() {
|
||||
var n = 0
|
||||
sink(arg: InoutConstructorClass(&n))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
| simple.swift:32:13:32:20 | call to source() | simple.swift:32:13:32:25 | ... .&*(_:_:) ... |
|
||||
| simple.swift:32:25:32:25 | 2 | simple.swift:32:13:32:25 | ... .&*(_:_:) ... |
|
||||
| simple.swift:36:7:36:7 | SSA def(a) | simple.swift:37:13:37:13 | a |
|
||||
| simple.swift:36:11:36:11 | 0 | simple.swift:36:7:36:7 | SSA def(a) |
|
||||
| simple.swift:36:7:36:7 | a | simple.swift:36:7:36:7 | SSA def(a) |
|
||||
| simple.swift:36:11:36:11 | 0 | simple.swift:36:7:36:7 | a |
|
||||
| simple.swift:37:13:37:13 | [post] a | simple.swift:38:3:38:3 | a |
|
||||
| simple.swift:37:13:37:13 | a | simple.swift:38:3:38:3 | a |
|
||||
| simple.swift:38:3:38:3 | &... | simple.swift:39:13:39:13 | a |
|
||||
@@ -54,7 +55,8 @@
|
||||
| simple.swift:44:3:44:7 | SSA def(a) | simple.swift:45:13:45:13 | a |
|
||||
| simple.swift:44:7:44:7 | 0 | simple.swift:44:3:44:7 | SSA def(a) |
|
||||
| simple.swift:47:7:47:7 | SSA def(b) | simple.swift:48:3:48:3 | b |
|
||||
| simple.swift:47:11:47:11 | 128 | simple.swift:47:7:47:7 | SSA def(b) |
|
||||
| simple.swift:47:7:47:7 | b | simple.swift:47:7:47:7 | SSA def(b) |
|
||||
| simple.swift:47:11:47:11 | 128 | simple.swift:47:7:47:7 | b |
|
||||
| simple.swift:48:3:48:3 | &... | simple.swift:49:13:49:13 | b |
|
||||
| simple.swift:48:3:48:3 | [post] &... | simple.swift:49:13:49:13 | b |
|
||||
| simple.swift:48:3:48:3 | b | simple.swift:48:3:48:3 | &... |
|
||||
@@ -66,7 +68,8 @@
|
||||
| simple.swift:50:3:50:3 | b | simple.swift:50:3:50:3 | &... |
|
||||
| simple.swift:50:8:50:8 | 1 | simple.swift:50:3:50:3 | &... |
|
||||
| simple.swift:53:7:53:7 | SSA def(c) | simple.swift:54:3:54:3 | c |
|
||||
| simple.swift:53:11:53:11 | 10 | simple.swift:53:7:53:7 | SSA def(c) |
|
||||
| simple.swift:53:7:53:7 | c | simple.swift:53:7:53:7 | SSA def(c) |
|
||||
| simple.swift:53:11:53:11 | 10 | simple.swift:53:7:53:7 | c |
|
||||
| simple.swift:54:3:54:3 | &... | simple.swift:55:13:55:13 | c |
|
||||
| simple.swift:54:3:54:3 | [post] &... | simple.swift:55:13:55:13 | c |
|
||||
| simple.swift:54:3:54:3 | c | simple.swift:54:3:54:3 | &... |
|
||||
@@ -78,7 +81,8 @@
|
||||
| simple.swift:56:3:56:3 | c | simple.swift:56:3:56:3 | &... |
|
||||
| simple.swift:56:8:56:8 | 2 | simple.swift:56:3:56:3 | &... |
|
||||
| simple.swift:59:7:59:7 | SSA def(d) | simple.swift:60:3:60:3 | d |
|
||||
| simple.swift:59:11:59:11 | 100 | simple.swift:59:7:59:7 | SSA def(d) |
|
||||
| simple.swift:59:7:59:7 | d | simple.swift:59:7:59:7 | SSA def(d) |
|
||||
| simple.swift:59:11:59:11 | 100 | simple.swift:59:7:59:7 | d |
|
||||
| simple.swift:60:3:60:3 | &... | simple.swift:61:13:61:13 | d |
|
||||
| simple.swift:60:3:60:3 | [post] &... | simple.swift:61:13:61:13 | d |
|
||||
| simple.swift:60:3:60:3 | d | simple.swift:60:3:60:3 | &... |
|
||||
@@ -90,7 +94,8 @@
|
||||
| simple.swift:62:3:62:3 | d | simple.swift:62:3:62:3 | &... |
|
||||
| simple.swift:62:8:62:8 | 2 | simple.swift:62:3:62:3 | &... |
|
||||
| simple.swift:65:7:65:7 | SSA def(e) | simple.swift:66:3:66:3 | e |
|
||||
| simple.swift:65:11:65:11 | 1000 | simple.swift:65:7:65:7 | SSA def(e) |
|
||||
| simple.swift:65:7:65:7 | e | simple.swift:65:7:65:7 | SSA def(e) |
|
||||
| simple.swift:65:11:65:11 | 1000 | simple.swift:65:7:65:7 | e |
|
||||
| simple.swift:66:3:66:3 | &... | simple.swift:67:13:67:13 | e |
|
||||
| simple.swift:66:3:66:3 | [post] &... | simple.swift:67:13:67:13 | e |
|
||||
| simple.swift:66:3:66:3 | e | simple.swift:66:3:66:3 | &... |
|
||||
@@ -168,7 +173,8 @@
|
||||
| stringinterpolation.swift:13:47:13:47 | &... | stringinterpolation.swift:13:47:13:47 | [post] &... |
|
||||
| stringinterpolation.swift:13:47:13:47 | [post] &... | stringinterpolation.swift:13:23:13:23 | TapExpr |
|
||||
| stringinterpolation.swift:18:6:18:6 | SSA def(p1) | stringinterpolation.swift:19:2:19:2 | p1 |
|
||||
| stringinterpolation.swift:18:11:18:24 | call to MyStringPair.init() | stringinterpolation.swift:18:6:18:6 | SSA def(p1) |
|
||||
| stringinterpolation.swift:18:6:18:6 | p1 | stringinterpolation.swift:18:6:18:6 | SSA def(p1) |
|
||||
| stringinterpolation.swift:18:11:18:24 | call to MyStringPair.init() | stringinterpolation.swift:18:6:18:6 | p1 |
|
||||
| stringinterpolation.swift:19:2:19:2 | [post] p1 | stringinterpolation.swift:20:2:20:2 | p1 |
|
||||
| stringinterpolation.swift:19:2:19:2 | p1 | stringinterpolation.swift:20:2:20:2 | p1 |
|
||||
| stringinterpolation.swift:20:2:20:2 | [post] p1 | stringinterpolation.swift:22:21:22:21 | p1 |
|
||||
@@ -246,7 +252,8 @@
|
||||
| stringinterpolation.swift:24:24:24:24 | &... | stringinterpolation.swift:24:24:24:24 | [post] &... |
|
||||
| stringinterpolation.swift:24:24:24:24 | [post] &... | stringinterpolation.swift:24:12:24:12 | TapExpr |
|
||||
| stringinterpolation.swift:26:6:26:6 | SSA def(p2) | stringinterpolation.swift:27:2:27:2 | p2 |
|
||||
| stringinterpolation.swift:26:11:26:24 | call to MyStringPair.init() | stringinterpolation.swift:26:6:26:6 | SSA def(p2) |
|
||||
| stringinterpolation.swift:26:6:26:6 | p2 | stringinterpolation.swift:26:6:26:6 | SSA def(p2) |
|
||||
| stringinterpolation.swift:26:11:26:24 | call to MyStringPair.init() | stringinterpolation.swift:26:6:26:6 | p2 |
|
||||
| stringinterpolation.swift:27:2:27:2 | [post] p2 | stringinterpolation.swift:28:2:28:2 | p2 |
|
||||
| stringinterpolation.swift:27:2:27:2 | p2 | stringinterpolation.swift:28:2:28:2 | p2 |
|
||||
| stringinterpolation.swift:28:2:28:2 | [post] p2 | stringinterpolation.swift:30:21:30:21 | p2 |
|
||||
|
||||
Reference in New Issue
Block a user