diff --git a/.bazelversion b/.bazelversion index 0e79152459e..e7fdef7e2e6 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -8.1.1 +8.4.2 diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9ce291fa33c..60b21a86163 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -40,3 +40,8 @@ updates: - dependency-name: "*" reviewers: - "github/codeql-go" + + - package-ecosystem: bazel + directory: "/" + schedule: + interval: weekly diff --git a/MODULE.bazel b/MODULE.bazel index fc6acfc1137..91f9ae51f3d 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -23,7 +23,7 @@ bazel_dep(name = "rules_shell", version = "0.5.0") bazel_dep(name = "bazel_skylib", version = "1.8.1") bazel_dep(name = "abseil-cpp", version = "20240116.1", repo_name = "absl") bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "json") -bazel_dep(name = "fmt", version = "10.0.0") +bazel_dep(name = "fmt", version = "12.1.0-codeql.1") bazel_dep(name = "rules_kotlin", version = "2.1.3-codeql.1") bazel_dep(name = "gazelle", version = "0.40.0") bazel_dep(name = "rules_dotnet", version = "0.19.2-codeql.1") @@ -274,11 +274,11 @@ ripunzip_archive = use_repo_rule("//misc/ripunzip:ripunzip.bzl", "ripunzip_archi # go to https://github.com/GoogleChrome/ripunzip/releases to find latest version and corresponding sha256s ripunzip_archive( name = "ripunzip", - sha256_linux = "ee0e8a957687a5dc3a66b2a4b25883bf762df4c9c07f0651af527a32a405054b", - sha256_macos_arm = "8a88eea54eac232d162a72a42065e0429b82dbf4f05e9642915dff9d7a81f846", - sha256_macos_intel = "4457a18bfcc5feabe09f5ea3d1157128e07b4873392cb404a870e611924abf64", - sha256_windows = "66d0c1375301bf5ab815348048f43b110631d3fa7200acd50d50a8ed8655ca62", - version = "2.0.3", + sha256_linux = "71482d7a7e4ea9176d5596161c49250c34b136b157c45f632b1111323fbfc0de", + sha256_macos_arm = "604194ab13f0aba3972995d995f11002b8fc285c8170401fcd46655065df20c9", + sha256_macos_intel = "65367b94fd579d93d46f2d2595cc4c9a60cfcf497e3c824f9d1a7b80fa8bd38a", + sha256_windows = "ac3874075def2b9e5074a3b5945005ab082cc6e689e1de658da8965bc23e643e", + version = "2.0.4", ) register_toolchains( diff --git a/actions/ql/lib/CHANGELOG.md b/actions/ql/lib/CHANGELOG.md index 0ae66461fc7..507c5e80716 100644 --- a/actions/ql/lib/CHANGELOG.md +++ b/actions/ql/lib/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.4.23 + +No user-facing changes. + +## 0.4.22 + +No user-facing changes. + ## 0.4.21 No user-facing changes. diff --git a/actions/ql/lib/change-notes/2025-11-28-fix-code-injection-alert-filtering.md b/actions/ql/lib/change-notes/2025-11-28-fix-code-injection-alert-filtering.md new file mode 100644 index 00000000000..b80ef77c2bc --- /dev/null +++ b/actions/ql/lib/change-notes/2025-11-28-fix-code-injection-alert-filtering.md @@ -0,0 +1,4 @@ +--- +category: majorAnalysis +--- +* The query `actions/code-injection/medium` has been updated to include results which were incorrectly excluded while filtering out results that are reported by `actions/code-injection/critical`. diff --git a/actions/ql/lib/change-notes/released/0.4.22.md b/actions/ql/lib/change-notes/released/0.4.22.md new file mode 100644 index 00000000000..289b153fdc9 --- /dev/null +++ b/actions/ql/lib/change-notes/released/0.4.22.md @@ -0,0 +1,3 @@ +## 0.4.22 + +No user-facing changes. diff --git a/actions/ql/lib/change-notes/released/0.4.23.md b/actions/ql/lib/change-notes/released/0.4.23.md new file mode 100644 index 00000000000..bec5c9a2085 --- /dev/null +++ b/actions/ql/lib/change-notes/released/0.4.23.md @@ -0,0 +1,3 @@ +## 0.4.23 + +No user-facing changes. diff --git a/actions/ql/lib/codeql-pack.release.yml b/actions/ql/lib/codeql-pack.release.yml index eb3b038a715..482605d096c 100644 --- a/actions/ql/lib/codeql-pack.release.yml +++ b/actions/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.4.21 +lastReleaseVersion: 0.4.23 diff --git a/actions/ql/lib/codeql/actions/security/CodeInjectionQuery.qll b/actions/ql/lib/codeql/actions/security/CodeInjectionQuery.qll index 0f77acc2444..3d5b8852b85 100644 --- a/actions/ql/lib/codeql/actions/security/CodeInjectionQuery.qll +++ b/actions/ql/lib/codeql/actions/security/CodeInjectionQuery.qll @@ -19,12 +19,7 @@ class CodeInjectionSink extends DataFlow::Node { Event getRelevantCriticalEventForSink(DataFlow::Node sink) { inPrivilegedContext(sink.asExpr(), result) and not exists(ControlCheck check | check.protects(sink.asExpr(), result, "code-injection")) and - // exclude cases where the sink is a JS script and the expression uses toJson - not exists(UsesStep script | - script.getCallee() = "actions/github-script" and - script.getArgumentExpr("script") = sink.asExpr() and - exists(getAToJsonReferenceExpression(sink.asExpr().(Expression).getExpression(), _)) - ) + not isGithubScriptUsingToJson(sink.asExpr()) } /** @@ -91,3 +86,38 @@ private module CodeInjectionConfig implements DataFlow::ConfigSig { /** Tracks flow of unsafe user input that is used to construct and evaluate a code script. */ module CodeInjectionFlow = TaintTracking::Global; + +/** + * Holds if there is a code injection flow from `source` to `sink` with + * critical severity, linked by `event`. + */ +predicate criticalSeverityCodeInjection( + CodeInjectionFlow::PathNode source, CodeInjectionFlow::PathNode sink, Event event +) { + CodeInjectionFlow::flowPath(source, sink) and + event = getRelevantCriticalEventForSink(sink.getNode()) and + source.getNode().(RemoteFlowSource).getEventName() = event.getName() +} + +/** + * Holds if there is a code injection flow from `source` to `sink` with medium severity. + */ +predicate mediumSeverityCodeInjection( + CodeInjectionFlow::PathNode source, CodeInjectionFlow::PathNode sink +) { + CodeInjectionFlow::flowPath(source, sink) and + not criticalSeverityCodeInjection(source, sink, _) and + not isGithubScriptUsingToJson(sink.getNode().asExpr()) +} + +/** + * Holds if `expr` is the `script` input to `actions/github-script` and it uses + * `toJson`. + */ +predicate isGithubScriptUsingToJson(Expression expr) { + exists(UsesStep script | + script.getCallee() = "actions/github-script" and + script.getArgumentExpr("script") = expr and + exists(getAToJsonReferenceExpression(expr.getExpression(), _)) + ) +} diff --git a/actions/ql/lib/qlpack.yml b/actions/ql/lib/qlpack.yml index 7671d59ddc0..be9fdac3892 100644 --- a/actions/ql/lib/qlpack.yml +++ b/actions/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/actions-all -version: 0.4.22-dev +version: 0.4.24-dev library: true warnOnImplicitThis: true dependencies: diff --git a/actions/ql/src/CHANGELOG.md b/actions/ql/src/CHANGELOG.md index b26f2472b1d..abe6a3a85be 100644 --- a/actions/ql/src/CHANGELOG.md +++ b/actions/ql/src/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.6.15 + +No user-facing changes. + +## 0.6.14 + +No user-facing changes. + ## 0.6.13 No user-facing changes. diff --git a/actions/ql/src/Security/CWE-094/CodeInjectionCritical.ql b/actions/ql/src/Security/CWE-094/CodeInjectionCritical.ql index ed30e4da71c..001aadd66cb 100644 --- a/actions/ql/src/Security/CWE-094/CodeInjectionCritical.ql +++ b/actions/ql/src/Security/CWE-094/CodeInjectionCritical.ql @@ -20,10 +20,7 @@ import CodeInjectionFlow::PathGraph import codeql.actions.security.ControlChecks from CodeInjectionFlow::PathNode source, CodeInjectionFlow::PathNode sink, Event event -where - CodeInjectionFlow::flowPath(source, sink) and - event = getRelevantCriticalEventForSink(sink.getNode()) and - source.getNode().(RemoteFlowSource).getEventName() = event.getName() +where criticalSeverityCodeInjection(source, sink, event) select sink.getNode(), source, sink, "Potential code injection in $@, which may be controlled by an external user ($@).", sink, sink.getNode().asExpr().(Expression).getRawExpression(), event, event.getName() diff --git a/actions/ql/src/Security/CWE-094/CodeInjectionMedium.ql b/actions/ql/src/Security/CWE-094/CodeInjectionMedium.ql index 0f8b6e13a29..8bc3fe8f51a 100644 --- a/actions/ql/src/Security/CWE-094/CodeInjectionMedium.ql +++ b/actions/ql/src/Security/CWE-094/CodeInjectionMedium.ql @@ -19,15 +19,7 @@ import codeql.actions.security.CodeInjectionQuery import CodeInjectionFlow::PathGraph from CodeInjectionFlow::PathNode source, CodeInjectionFlow::PathNode sink -where - CodeInjectionFlow::flowPath(source, sink) and - inNonPrivilegedContext(sink.getNode().asExpr()) and - // exclude cases where the sink is a JS script and the expression uses toJson - not exists(UsesStep script | - script.getCallee() = "actions/github-script" and - script.getArgumentExpr("script") = sink.getNode().asExpr() and - exists(getAToJsonReferenceExpression(sink.getNode().asExpr().(Expression).getExpression(), _)) - ) +where mediumSeverityCodeInjection(source, sink) select sink.getNode(), source, sink, "Potential code injection in $@, which may be controlled by an external user.", sink, sink.getNode().asExpr().(Expression).getRawExpression() diff --git a/actions/ql/src/Security/CWE-275/MissingActionsPermissions.md b/actions/ql/src/Security/CWE-275/MissingActionsPermissions.md index e932fcf50fd..bbe918bba7e 100644 --- a/actions/ql/src/Security/CWE-275/MissingActionsPermissions.md +++ b/actions/ql/src/Security/CWE-275/MissingActionsPermissions.md @@ -2,6 +2,8 @@ If a GitHub Actions job or workflow has no explicit permissions set, then the repository permissions are used. Repositories created under organizations inherit the organization permissions. The organizations or repositories created before February 2023 have the default permissions set to read-write. Often these permissions do not adhere to the principle of least privilege and can be reduced to read-only, leaving the `write` permission only to a specific types as `issues: write` or `pull-requests: write`. +Note that this query cannot check whether the organization or repository token settings are set to read-only. However, even if they are, it is recommended to define explicit permissions (`contents: read` and `packages: read` are equivalent to the read-only default) so that (a) the actual needs of the workflow are documented, and (b) the permissions will remain restricted if the default is subsequently changed, or the workflow is copied to a different repository or organization. + ## Recommendation Add the `permissions` key to the job or the root of workflow (in this case it is applied to all jobs in the workflow that do not have their own `permissions` key) and assign the least privileges required to complete the task. diff --git a/actions/ql/src/change-notes/released/0.6.14.md b/actions/ql/src/change-notes/released/0.6.14.md new file mode 100644 index 00000000000..f96f2afc5fd --- /dev/null +++ b/actions/ql/src/change-notes/released/0.6.14.md @@ -0,0 +1,3 @@ +## 0.6.14 + +No user-facing changes. diff --git a/actions/ql/src/change-notes/released/0.6.15.md b/actions/ql/src/change-notes/released/0.6.15.md new file mode 100644 index 00000000000..3060ada741e --- /dev/null +++ b/actions/ql/src/change-notes/released/0.6.15.md @@ -0,0 +1,3 @@ +## 0.6.15 + +No user-facing changes. diff --git a/actions/ql/src/codeql-pack.release.yml b/actions/ql/src/codeql-pack.release.yml index 4568aee7f4f..d2638922927 100644 --- a/actions/ql/src/codeql-pack.release.yml +++ b/actions/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.6.13 +lastReleaseVersion: 0.6.15 diff --git a/actions/ql/src/experimental/Security/CWE-829/ArtifactPoisoningPathTraversal.ql b/actions/ql/src/experimental/Security/CWE-829/ArtifactPoisoningPathTraversal.ql index 517a9d1eaad..d03d2407cb7 100644 --- a/actions/ql/src/experimental/Security/CWE-829/ArtifactPoisoningPathTraversal.ql +++ b/actions/ql/src/experimental/Security/CWE-829/ArtifactPoisoningPathTraversal.ql @@ -1,5 +1,5 @@ /** - * @name Artifact Poisoning (Path Traversal). + * @name Artifact Poisoning (Path Traversal) * @description An attacker may be able to poison the workflow's artifacts and influence on consequent steps. * @kind problem * @problem.severity error diff --git a/actions/ql/src/qlpack.yml b/actions/ql/src/qlpack.yml index b11eab521eb..decd31da2d1 100644 --- a/actions/ql/src/qlpack.yml +++ b/actions/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/actions-queries -version: 0.6.14-dev +version: 0.6.16-dev library: false warnOnImplicitThis: true groups: [actions, queries] diff --git a/actions/ql/test/query-tests/Security/CWE-094/.github/workflows/push_and_workflow_dispatch.yml b/actions/ql/test/query-tests/Security/CWE-094/.github/workflows/push_and_workflow_dispatch.yml new file mode 100644 index 00000000000..8b7a6df009c --- /dev/null +++ b/actions/ql/test/query-tests/Security/CWE-094/.github/workflows/push_and_workflow_dispatch.yml @@ -0,0 +1,18 @@ +on: + push: + workflow_dispatch: + +jobs: + echo-chamber: + runs-on: ubuntu-latest + steps: + - run: echo '${{ github.event.commits[11].message }}' + - run: echo '${{ github.event.commits[11].author.email }}' + - run: echo '${{ github.event.commits[11].author.name }}' + - run: echo '${{ github.event.head_commit.message }}' + - run: echo '${{ github.event.head_commit.author.email }}' + - run: echo '${{ github.event.head_commit.author.name }}' + - run: echo '${{ github.event.head_commit.committer.email }}' + - run: echo '${{ github.event.head_commit.committer.name }}' + - run: echo '${{ github.event.commits[11].committer.email }}' + - run: echo '${{ github.event.commits[11].committer.name }}' \ No newline at end of file diff --git a/actions/ql/test/query-tests/Security/CWE-094/CodeInjectionCritical.expected b/actions/ql/test/query-tests/Security/CWE-094/CodeInjectionCritical.expected index af788f6280b..9bf7e9aa56d 100644 --- a/actions/ql/test/query-tests/Security/CWE-094/CodeInjectionCritical.expected +++ b/actions/ql/test/query-tests/Security/CWE-094/CodeInjectionCritical.expected @@ -435,6 +435,16 @@ nodes | .github/workflows/push.yml:14:19:14:64 | github.event.head_commit.committer.name | semmle.label | github.event.head_commit.committer.name | | .github/workflows/push.yml:15:19:15:65 | github.event.commits[11].committer.email | semmle.label | github.event.commits[11].committer.email | | .github/workflows/push.yml:16:19:16:64 | github.event.commits[11].committer.name | semmle.label | github.event.commits[11].committer.name | +| .github/workflows/push_and_workflow_dispatch.yml:9:19:9:57 | github.event.commits[11].message | semmle.label | github.event.commits[11].message | +| .github/workflows/push_and_workflow_dispatch.yml:10:19:10:62 | github.event.commits[11].author.email | semmle.label | github.event.commits[11].author.email | +| .github/workflows/push_and_workflow_dispatch.yml:11:19:11:61 | github.event.commits[11].author.name | semmle.label | github.event.commits[11].author.name | +| .github/workflows/push_and_workflow_dispatch.yml:12:19:12:57 | github.event.head_commit.message | semmle.label | github.event.head_commit.message | +| .github/workflows/push_and_workflow_dispatch.yml:13:19:13:62 | github.event.head_commit.author.email | semmle.label | github.event.head_commit.author.email | +| .github/workflows/push_and_workflow_dispatch.yml:14:19:14:61 | github.event.head_commit.author.name | semmle.label | github.event.head_commit.author.name | +| .github/workflows/push_and_workflow_dispatch.yml:15:19:15:65 | github.event.head_commit.committer.email | semmle.label | github.event.head_commit.committer.email | +| .github/workflows/push_and_workflow_dispatch.yml:16:19:16:64 | github.event.head_commit.committer.name | semmle.label | github.event.head_commit.committer.name | +| .github/workflows/push_and_workflow_dispatch.yml:17:19:17:65 | github.event.commits[11].committer.email | semmle.label | github.event.commits[11].committer.email | +| .github/workflows/push_and_workflow_dispatch.yml:18:19:18:64 | github.event.commits[11].committer.name | semmle.label | github.event.commits[11].committer.name | | .github/workflows/reusable-workflow-1.yml:6:7:6:11 | input taint | semmle.label | input taint | | .github/workflows/reusable-workflow-1.yml:36:21:36:39 | inputs.taint | semmle.label | inputs.taint | | .github/workflows/reusable-workflow-1.yml:44:19:44:56 | github.event.pull_request.title | semmle.label | github.event.pull_request.title | diff --git a/actions/ql/test/query-tests/Security/CWE-094/CodeInjectionMedium.expected b/actions/ql/test/query-tests/Security/CWE-094/CodeInjectionMedium.expected index 6c948d9559e..4bbe7da0aaf 100644 --- a/actions/ql/test/query-tests/Security/CWE-094/CodeInjectionMedium.expected +++ b/actions/ql/test/query-tests/Security/CWE-094/CodeInjectionMedium.expected @@ -435,6 +435,16 @@ nodes | .github/workflows/push.yml:14:19:14:64 | github.event.head_commit.committer.name | semmle.label | github.event.head_commit.committer.name | | .github/workflows/push.yml:15:19:15:65 | github.event.commits[11].committer.email | semmle.label | github.event.commits[11].committer.email | | .github/workflows/push.yml:16:19:16:64 | github.event.commits[11].committer.name | semmle.label | github.event.commits[11].committer.name | +| .github/workflows/push_and_workflow_dispatch.yml:9:19:9:57 | github.event.commits[11].message | semmle.label | github.event.commits[11].message | +| .github/workflows/push_and_workflow_dispatch.yml:10:19:10:62 | github.event.commits[11].author.email | semmle.label | github.event.commits[11].author.email | +| .github/workflows/push_and_workflow_dispatch.yml:11:19:11:61 | github.event.commits[11].author.name | semmle.label | github.event.commits[11].author.name | +| .github/workflows/push_and_workflow_dispatch.yml:12:19:12:57 | github.event.head_commit.message | semmle.label | github.event.head_commit.message | +| .github/workflows/push_and_workflow_dispatch.yml:13:19:13:62 | github.event.head_commit.author.email | semmle.label | github.event.head_commit.author.email | +| .github/workflows/push_and_workflow_dispatch.yml:14:19:14:61 | github.event.head_commit.author.name | semmle.label | github.event.head_commit.author.name | +| .github/workflows/push_and_workflow_dispatch.yml:15:19:15:65 | github.event.head_commit.committer.email | semmle.label | github.event.head_commit.committer.email | +| .github/workflows/push_and_workflow_dispatch.yml:16:19:16:64 | github.event.head_commit.committer.name | semmle.label | github.event.head_commit.committer.name | +| .github/workflows/push_and_workflow_dispatch.yml:17:19:17:65 | github.event.commits[11].committer.email | semmle.label | github.event.commits[11].committer.email | +| .github/workflows/push_and_workflow_dispatch.yml:18:19:18:64 | github.event.commits[11].committer.name | semmle.label | github.event.commits[11].committer.name | | .github/workflows/reusable-workflow-1.yml:6:7:6:11 | input taint | semmle.label | input taint | | .github/workflows/reusable-workflow-1.yml:36:21:36:39 | inputs.taint | semmle.label | inputs.taint | | .github/workflows/reusable-workflow-1.yml:44:19:44:56 | github.event.pull_request.title | semmle.label | github.event.pull_request.title | @@ -719,6 +729,16 @@ subpaths | .github/workflows/push.yml:14:19:14:64 | github.event.head_commit.committer.name | .github/workflows/push.yml:14:19:14:64 | github.event.head_commit.committer.name | .github/workflows/push.yml:14:19:14:64 | github.event.head_commit.committer.name | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/push.yml:14:19:14:64 | github.event.head_commit.committer.name | ${{ github.event.head_commit.committer.name }} | | .github/workflows/push.yml:15:19:15:65 | github.event.commits[11].committer.email | .github/workflows/push.yml:15:19:15:65 | github.event.commits[11].committer.email | .github/workflows/push.yml:15:19:15:65 | github.event.commits[11].committer.email | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/push.yml:15:19:15:65 | github.event.commits[11].committer.email | ${{ github.event.commits[11].committer.email }} | | .github/workflows/push.yml:16:19:16:64 | github.event.commits[11].committer.name | .github/workflows/push.yml:16:19:16:64 | github.event.commits[11].committer.name | .github/workflows/push.yml:16:19:16:64 | github.event.commits[11].committer.name | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/push.yml:16:19:16:64 | github.event.commits[11].committer.name | ${{ github.event.commits[11].committer.name }} | +| .github/workflows/push_and_workflow_dispatch.yml:9:19:9:57 | github.event.commits[11].message | .github/workflows/push_and_workflow_dispatch.yml:9:19:9:57 | github.event.commits[11].message | .github/workflows/push_and_workflow_dispatch.yml:9:19:9:57 | github.event.commits[11].message | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/push_and_workflow_dispatch.yml:9:19:9:57 | github.event.commits[11].message | ${{ github.event.commits[11].message }} | +| .github/workflows/push_and_workflow_dispatch.yml:10:19:10:62 | github.event.commits[11].author.email | .github/workflows/push_and_workflow_dispatch.yml:10:19:10:62 | github.event.commits[11].author.email | .github/workflows/push_and_workflow_dispatch.yml:10:19:10:62 | github.event.commits[11].author.email | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/push_and_workflow_dispatch.yml:10:19:10:62 | github.event.commits[11].author.email | ${{ github.event.commits[11].author.email }} | +| .github/workflows/push_and_workflow_dispatch.yml:11:19:11:61 | github.event.commits[11].author.name | .github/workflows/push_and_workflow_dispatch.yml:11:19:11:61 | github.event.commits[11].author.name | .github/workflows/push_and_workflow_dispatch.yml:11:19:11:61 | github.event.commits[11].author.name | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/push_and_workflow_dispatch.yml:11:19:11:61 | github.event.commits[11].author.name | ${{ github.event.commits[11].author.name }} | +| .github/workflows/push_and_workflow_dispatch.yml:12:19:12:57 | github.event.head_commit.message | .github/workflows/push_and_workflow_dispatch.yml:12:19:12:57 | github.event.head_commit.message | .github/workflows/push_and_workflow_dispatch.yml:12:19:12:57 | github.event.head_commit.message | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/push_and_workflow_dispatch.yml:12:19:12:57 | github.event.head_commit.message | ${{ github.event.head_commit.message }} | +| .github/workflows/push_and_workflow_dispatch.yml:13:19:13:62 | github.event.head_commit.author.email | .github/workflows/push_and_workflow_dispatch.yml:13:19:13:62 | github.event.head_commit.author.email | .github/workflows/push_and_workflow_dispatch.yml:13:19:13:62 | github.event.head_commit.author.email | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/push_and_workflow_dispatch.yml:13:19:13:62 | github.event.head_commit.author.email | ${{ github.event.head_commit.author.email }} | +| .github/workflows/push_and_workflow_dispatch.yml:14:19:14:61 | github.event.head_commit.author.name | .github/workflows/push_and_workflow_dispatch.yml:14:19:14:61 | github.event.head_commit.author.name | .github/workflows/push_and_workflow_dispatch.yml:14:19:14:61 | github.event.head_commit.author.name | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/push_and_workflow_dispatch.yml:14:19:14:61 | github.event.head_commit.author.name | ${{ github.event.head_commit.author.name }} | +| .github/workflows/push_and_workflow_dispatch.yml:15:19:15:65 | github.event.head_commit.committer.email | .github/workflows/push_and_workflow_dispatch.yml:15:19:15:65 | github.event.head_commit.committer.email | .github/workflows/push_and_workflow_dispatch.yml:15:19:15:65 | github.event.head_commit.committer.email | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/push_and_workflow_dispatch.yml:15:19:15:65 | github.event.head_commit.committer.email | ${{ github.event.head_commit.committer.email }} | +| .github/workflows/push_and_workflow_dispatch.yml:16:19:16:64 | github.event.head_commit.committer.name | .github/workflows/push_and_workflow_dispatch.yml:16:19:16:64 | github.event.head_commit.committer.name | .github/workflows/push_and_workflow_dispatch.yml:16:19:16:64 | github.event.head_commit.committer.name | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/push_and_workflow_dispatch.yml:16:19:16:64 | github.event.head_commit.committer.name | ${{ github.event.head_commit.committer.name }} | +| .github/workflows/push_and_workflow_dispatch.yml:17:19:17:65 | github.event.commits[11].committer.email | .github/workflows/push_and_workflow_dispatch.yml:17:19:17:65 | github.event.commits[11].committer.email | .github/workflows/push_and_workflow_dispatch.yml:17:19:17:65 | github.event.commits[11].committer.email | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/push_and_workflow_dispatch.yml:17:19:17:65 | github.event.commits[11].committer.email | ${{ github.event.commits[11].committer.email }} | +| .github/workflows/push_and_workflow_dispatch.yml:18:19:18:64 | github.event.commits[11].committer.name | .github/workflows/push_and_workflow_dispatch.yml:18:19:18:64 | github.event.commits[11].committer.name | .github/workflows/push_and_workflow_dispatch.yml:18:19:18:64 | github.event.commits[11].committer.name | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/push_and_workflow_dispatch.yml:18:19:18:64 | github.event.commits[11].committer.name | ${{ github.event.commits[11].committer.name }} | | .github/workflows/reusable-workflow-1.yml:36:21:36:39 | inputs.taint | .github/workflows/reusable-workflow-caller-1.yml:11:15:11:52 | github.event.pull_request.title | .github/workflows/reusable-workflow-1.yml:36:21:36:39 | inputs.taint | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/reusable-workflow-1.yml:36:21:36:39 | inputs.taint | ${{ inputs.taint }} | | .github/workflows/reusable-workflow-1.yml:53:26:53:39 | env.log | .github/workflows/reusable-workflow-1.yml:44:19:44:56 | github.event.pull_request.title | .github/workflows/reusable-workflow-1.yml:53:26:53:39 | env.log | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/reusable-workflow-1.yml:53:26:53:39 | env.log | ${{ env.log }} | | .github/workflows/reusable-workflow-1.yml:66:34:66:52 | env.prev_log | .github/workflows/reusable-workflow-1.yml:45:24:45:61 | github.event.changes.title.from | .github/workflows/reusable-workflow-1.yml:66:34:66:52 | env.prev_log | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/reusable-workflow-1.yml:66:34:66:52 | env.prev_log | ${{ env.prev_log }} | @@ -729,6 +749,10 @@ subpaths | .github/workflows/test10.yml:333:34:333:77 | github.event.workflow_run.head_branch | .github/workflows/test10.yml:333:34:333:77 | github.event.workflow_run.head_branch | .github/workflows/test10.yml:333:34:333:77 | github.event.workflow_run.head_branch | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/test10.yml:333:34:333:77 | github.event.workflow_run.head_branch | ${{ github.event.workflow_run.head_branch }} | | .github/workflows/test10.yml:423:34:423:77 | github.event.workflow_run.head_branch | .github/workflows/test10.yml:423:34:423:77 | github.event.workflow_run.head_branch | .github/workflows/test10.yml:423:34:423:77 | github.event.workflow_run.head_branch | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/test10.yml:423:34:423:77 | github.event.workflow_run.head_branch | ${{ github.event.workflow_run.head_branch }} | | .github/workflows/test10.yml:518:34:518:77 | github.event.workflow_run.head_branch | .github/workflows/test10.yml:518:34:518:77 | github.event.workflow_run.head_branch | .github/workflows/test10.yml:518:34:518:77 | github.event.workflow_run.head_branch | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/test10.yml:518:34:518:77 | github.event.workflow_run.head_branch | ${{ github.event.workflow_run.head_branch }} | +| .github/workflows/test20.yml:15:54:15:94 | github.event.pull_request.head.ref | .github/workflows/test20.yml:15:54:15:94 | github.event.pull_request.head.ref | .github/workflows/test20.yml:15:54:15:94 | github.event.pull_request.head.ref | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/test20.yml:15:54:15:94 | github.event.pull_request.head.ref | ${{ github.event.pull_request.head.ref }} | +| .github/workflows/test21.yml:22:35:22:73 | github.event.head_commit.message | .github/workflows/test21.yml:22:35:22:73 | github.event.head_commit.message | .github/workflows/test21.yml:22:35:22:73 | github.event.head_commit.message | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/test21.yml:22:35:22:73 | github.event.head_commit.message | ${{ github.event.head_commit.message }} | +| .github/workflows/test21.yml:23:36:23:74 | github.event.head_commit.message | .github/workflows/test21.yml:23:36:23:74 | github.event.head_commit.message | .github/workflows/test21.yml:23:36:23:74 | github.event.head_commit.message | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/test21.yml:23:36:23:74 | github.event.head_commit.message | ${{ github.event.head_commit.message }} | +| .github/workflows/test21.yml:24:50:24:88 | github.event.head_commit.message | .github/workflows/test21.yml:24:50:24:88 | github.event.head_commit.message | .github/workflows/test21.yml:24:50:24:88 | github.event.head_commit.message | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/test21.yml:24:50:24:88 | github.event.head_commit.message | ${{ github.event.head_commit.message }} | | .github/workflows/workflow_run_branches1.yml:13:20:13:63 | github.event.workflow_run.head_branch | .github/workflows/workflow_run_branches1.yml:13:20:13:63 | github.event.workflow_run.head_branch | .github/workflows/workflow_run_branches1.yml:13:20:13:63 | github.event.workflow_run.head_branch | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/workflow_run_branches1.yml:13:20:13:63 | github.event.workflow_run.head_branch | ${{ github.event.workflow_run.head_branch }} | | .github/workflows/workflow_run_branches2.yml:13:20:13:63 | github.event.workflow_run.head_branch | .github/workflows/workflow_run_branches2.yml:13:20:13:63 | github.event.workflow_run.head_branch | .github/workflows/workflow_run_branches2.yml:13:20:13:63 | github.event.workflow_run.head_branch | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/workflow_run_branches2.yml:13:20:13:63 | github.event.workflow_run.head_branch | ${{ github.event.workflow_run.head_branch }} | | .github/workflows/workflow_run_branches4.yml:13:20:13:63 | github.event.workflow_run.head_branch | .github/workflows/workflow_run_branches4.yml:13:20:13:63 | github.event.workflow_run.head_branch | .github/workflows/workflow_run_branches4.yml:13:20:13:63 | github.event.workflow_run.head_branch | Potential code injection in $@, which may be controlled by an external user. | .github/workflows/workflow_run_branches4.yml:13:20:13:63 | github.event.workflow_run.head_branch | ${{ github.event.workflow_run.head_branch }} | diff --git a/config/identical-files.json b/config/identical-files.json index 89beb48acd4..a33dbb1997b 100644 --- a/config/identical-files.json +++ b/config/identical-files.json @@ -276,5 +276,12 @@ "Python model summaries test extension": [ "python/ql/test/library-tests/dataflow/model-summaries/InlineTaintTest.ext.yml", "python/ql/test/library-tests/dataflow/model-summaries/NormalDataflowTest.ext.yml" + ], + "XML discard predicates": [ + "javascript/ql/lib/semmle/javascript/internal/OverlayXml.qll", + "java/ql/lib/semmle/code/java/internal/OverlayXml.qll", + "go/ql/lib/semmle/go/internal/OverlayXml.qll", + "python/ql/lib/semmle/python/internal/OverlayXml.qll", + "csharp/ql/lib/semmle/code/csharp/internal/OverlayXml.qll" ] } diff --git a/cpp/downgrades/a42ce5fc943254097f85471b94ae2247e819104a/old.dbscheme b/cpp/downgrades/a42ce5fc943254097f85471b94ae2247e819104a/old.dbscheme new file mode 100644 index 00000000000..a42ce5fc943 --- /dev/null +++ b/cpp/downgrades/a42ce5fc943254097f85471b94ae2247e819104a/old.dbscheme @@ -0,0 +1,2469 @@ + +/*- Compilations -*/ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/*- External data -*/ + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Lines of code -*/ + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- C++ dbscheme -*/ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +pch_uses( + int pch: @pch ref, + int compilation: @compilation ref, + int id: @file ref +) + +#keyset[pch, compilation] +pch_creations( + int pch: @pch, + int compilation: @compilation ref, + int from: @file ref +) + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location_default ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +case @function.kind of + 0 = @unknown_function +| 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +// ... 6 = @builtin_function deprecated // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +builtin_functions( + int id: @function ref +) + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +| 11 = @scalable_vector // Arm SVE +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +case @type_operator.kind of + 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +case @usertype.kind of + 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location_default ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype + | @decltype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_default ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_default ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_default ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + +/*- XML Files -*/ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; diff --git a/cpp/downgrades/a42ce5fc943254097f85471b94ae2247e819104a/semmlecode.dbscheme b/cpp/downgrades/a42ce5fc943254097f85471b94ae2247e819104a/semmlecode.dbscheme new file mode 100644 index 00000000000..1a6854060d5 --- /dev/null +++ b/cpp/downgrades/a42ce5fc943254097f85471b94ae2247e819104a/semmlecode.dbscheme @@ -0,0 +1,2450 @@ +/*- Compilations -*/ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/*- External data -*/ + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Lines of code -*/ + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- C++ dbscheme -*/ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +pch_uses( + int pch: @pch ref, + int compilation: @compilation ref, + int id: @file ref +) + +#keyset[pch, compilation] +pch_creations( + int pch: @pch, + int compilation: @compilation ref, + int from: @file ref +) + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location_default ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +case @function.kind of + 0 = @unknown_function +| 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +// ... 6 = @builtin_function deprecated // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +builtin_functions( + int id: @function ref +) + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +| 11 = @scalable_vector // Arm SVE +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +case @type_operator.kind of + 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +case @usertype.kind of + 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location_default ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype + | @decltype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_default ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_default ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_default ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/*- XML Files -*/ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; diff --git a/cpp/downgrades/a42ce5fc943254097f85471b94ae2247e819104a/upgrade.properties b/cpp/downgrades/a42ce5fc943254097f85471b94ae2247e819104a/upgrade.properties new file mode 100644 index 00000000000..1a7cdb0ad71 --- /dev/null +++ b/cpp/downgrades/a42ce5fc943254097f85471b94ae2247e819104a/upgrade.properties @@ -0,0 +1,4 @@ +description: Add databaseMetadata and overlayChangedFiles relations +compatibility: full +databaseMetadata.rel: delete +overlayChangedFiles.rel: delete diff --git a/cpp/ql/lib/CHANGELOG.md b/cpp/ql/lib/CHANGELOG.md index 450185adf89..a493369e8dd 100644 --- a/cpp/ql/lib/CHANGELOG.md +++ b/cpp/ql/lib/CHANGELOG.md @@ -1,3 +1,13 @@ +## 6.1.2 + +No user-facing changes. + +## 6.1.1 + +### Minor Analysis Improvements + +* The class `DataFlow::FieldContent` now covers both `union` and `struct`/`class` types. A new predicate `FieldContent.getAField` has been added to access the union members associated with the `FieldContent`. The old `FieldContent` has been renamed to `NonUnionFieldContent`. + ## 6.1.0 ### New Features diff --git a/cpp/ql/lib/change-notes/2025-11-19-content.md b/cpp/ql/lib/change-notes/released/6.1.1.md similarity index 80% rename from cpp/ql/lib/change-notes/2025-11-19-content.md rename to cpp/ql/lib/change-notes/released/6.1.1.md index e16bfc903bf..d88c93a5ed7 100644 --- a/cpp/ql/lib/change-notes/2025-11-19-content.md +++ b/cpp/ql/lib/change-notes/released/6.1.1.md @@ -1,4 +1,5 @@ ---- -category: minorAnalysis ---- -* The class `DataFlow::FieldContent` now covers both `union` and `struct`/`class` types. A new predicate `FieldContent.getAField` has been added to access the union members associated with the `FieldContent`. The old `FieldContent` has been renamed to `NonUnionFieldContent`. \ No newline at end of file +## 6.1.1 + +### Minor Analysis Improvements + +* The class `DataFlow::FieldContent` now covers both `union` and `struct`/`class` types. A new predicate `FieldContent.getAField` has been added to access the union members associated with the `FieldContent`. The old `FieldContent` has been renamed to `NonUnionFieldContent`. diff --git a/cpp/ql/lib/change-notes/released/6.1.2.md b/cpp/ql/lib/change-notes/released/6.1.2.md new file mode 100644 index 00000000000..8e41b366dab --- /dev/null +++ b/cpp/ql/lib/change-notes/released/6.1.2.md @@ -0,0 +1,3 @@ +## 6.1.2 + +No user-facing changes. diff --git a/cpp/ql/lib/codeql-pack.release.yml b/cpp/ql/lib/codeql-pack.release.yml index 22247782f3e..8a2b5999dee 100644 --- a/cpp/ql/lib/codeql-pack.release.yml +++ b/cpp/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 6.1.0 +lastReleaseVersion: 6.1.2 diff --git a/cpp/ql/lib/cpp.qll b/cpp/ql/lib/cpp.qll index 46c651daf57..560a4444bfa 100644 --- a/cpp/ql/lib/cpp.qll +++ b/cpp/ql/lib/cpp.qll @@ -74,3 +74,4 @@ import semmle.code.cpp.Preprocessor import semmle.code.cpp.Iteration import semmle.code.cpp.NameQualifiers import DefaultOptions +private import semmle.code.cpp.internal.Overlay diff --git a/cpp/ql/lib/qlpack.yml b/cpp/ql/lib/qlpack.yml index febb297cb8d..4692d1ea27e 100644 --- a/cpp/ql/lib/qlpack.yml +++ b/cpp/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/cpp-all -version: 6.1.1-dev +version: 6.1.3-dev groups: cpp dbscheme: semmlecode.cpp.dbscheme extractor: cpp @@ -21,3 +21,4 @@ dataExtensions: - ext/deallocation/*.model.yml - ext/allocation/*.model.yml warnOnImplicitThis: true +compileForOverlayEval: true diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll index b71a46f6961..69e32d23ec1 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll @@ -15,16 +15,17 @@ * reading. * 1. The `namespace` column selects a namespace. * 2. The `type` column selects a type within that namespace. This column can - * introduce template names that can be mentioned in the `signature` column. + * introduce template type names that can be mentioned in the `signature` column. * For example, `vector` introduces the template names `T` and - * `Allocator`. + * `Allocator`. Non-type template parameters cannot be specified. * 3. The `subtypes` is a boolean that indicates whether to jump to an * arbitrary subtype of that type. Set this to `false` if leaving the `type` * blank (for example, a free function). * 4. The `name` column optionally selects a specific named member of the type. - * Like the `type` column, this column can introduce template names that can - * be mentioned in the `signature` column. For example, `insert` - * introduces the template name `InputIt`. + * Like the `type` column, this column can introduce template type names + * that can be mentioned in the `signature` column. For example, + * `insert` introduces the template name `InputIt`. Non-type + * template parameters cannot be specified. * 5. The `signature` column optionally restricts the named member. If * `signature` is blank then no such filtering is done. The format of the * signature is a comma-separated list of types enclosed in parentheses. The @@ -633,6 +634,28 @@ string getParameterTypeWithoutTemplateArguments(Function f, int n, boolean canon canonical = true } +/** + * Gets the largest index of a template parameter of `templateFunction` that + * is a type template parameter. + */ +private int getLastTypeTemplateFunctionParameterIndex(Function templateFunction) { + result = + max(int index | templateFunction.getTemplateArgument(index) instanceof TypeTemplateParameter) +} + +/** Gets the number of supported template parameters for `templateFunction`. */ +private int getNumberOfSupportedFunctionTemplateArguments(Function templateFunction) { + result = count(int i | exists(getSupportedFunctionTemplateArgument(templateFunction, i)) | i) +} + +/** Gets the `i`'th supported template parameter for `templateFunction`. */ +private Locatable getSupportedFunctionTemplateArgument(Function templateFunction, int i) { + result = templateFunction.getTemplateArgument(i) and + // We don't yet support non-type template parameters in the middle of a + // template parameter list + i <= getLastTypeTemplateFunctionParameterIndex(templateFunction) +} + /** * Normalize the `n`'th parameter of `f` by replacing template names * with `func:N` (where `N` is the index of the template). @@ -640,18 +663,41 @@ string getParameterTypeWithoutTemplateArguments(Function f, int n, boolean canon private string getTypeNameWithoutFunctionTemplates(Function f, int n, int remaining) { exists(Function templateFunction | templateFunction = getFullyTemplatedFunction(f) and - remaining = templateFunction.getNumberOfTemplateArguments() and + remaining = getNumberOfSupportedFunctionTemplateArguments(templateFunction) and result = getParameterTypeWithoutTemplateArguments(templateFunction, n, _) ) or exists(string mid, TypeTemplateParameter tp, Function templateFunction | mid = getTypeNameWithoutFunctionTemplates(f, n, remaining + 1) and templateFunction = getFullyTemplatedFunction(f) and - tp = templateFunction.getTemplateArgument(remaining) and + tp = getSupportedFunctionTemplateArgument(templateFunction, remaining) + | result = mid.replaceAll(tp.getName(), "func:" + remaining.toString()) ) } +/** + * Gets the largest index of a template parameter of `templateClass` that + * is a type template parameter. + */ +private int getLastTypeTemplateClassParameterIndex(Class templateClass) { + result = + max(int index | templateClass.getTemplateArgument(index) instanceof TypeTemplateParameter) +} + +/** Gets the `i`'th supported template parameter for `templateClass`. */ +private Locatable getSupportedClassTemplateArgument(Class templateClass, int i) { + result = templateClass.getTemplateArgument(i) and + // We don't yet support non-type template parameters in the middle of a + // template parameter list + i <= getLastTypeTemplateClassParameterIndex(templateClass) +} + +/** Gets the number of supported template parameters for `templateClass`. */ +private int getNumberOfSupportedClassTemplateArguments(Class templateClass) { + result = count(int i | exists(getSupportedClassTemplateArgument(templateClass, i)) | i) +} + /** * Normalize the `n`'th parameter of `f` by replacing template names * with `class:N` (where `N` is the index of the template). @@ -661,7 +707,7 @@ private string getTypeNameWithoutClassTemplates(Function f, int n, int remaining // If there is a declaring type then we start by expanding the function templates exists(Class template | isClassConstructedFrom(f.getDeclaringType(), template) and - remaining = template.getNumberOfTemplateArguments() and + remaining = getNumberOfSupportedClassTemplateArguments(template) and result = getTypeNameWithoutFunctionTemplates(f, n, 0) ) or @@ -673,7 +719,8 @@ private string getTypeNameWithoutClassTemplates(Function f, int n, int remaining exists(string mid, TypeTemplateParameter tp, Class template | mid = getTypeNameWithoutClassTemplates(f, n, remaining + 1) and isClassConstructedFrom(f.getDeclaringType(), template) and - tp = template.getTemplateArgument(remaining) and + tp = getSupportedClassTemplateArgument(template, remaining) + | result = mid.replaceAll(tp.getName(), "class:" + remaining.toString()) ) } diff --git a/cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll b/cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll new file mode 100644 index 00000000000..571f034d85b --- /dev/null +++ b/cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll @@ -0,0 +1,60 @@ +/** + * Defines entity discard predicates for C++ overlay analysis. + */ + +/** + * Holds always for the overlay variant and never for the base variant. + * This local predicate is used to define local predicates that behave + * differently for the base and overlay variant. + */ +overlay[local] +predicate isOverlay() { databaseMetadata("isOverlay", "true") } + +overlay[local] +private string getLocationFilePath(@location_default loc) { + exists(@file file | locations_default(loc, file, _, _, _, _) | files(file, result)) +} + +/** + * Gets the file path for an element with a single location. + */ +overlay[local] +private string getSingleLocationFilePath(@element e) { + // @var_decl has a direct location in the var_decls relation + exists(@location_default loc | var_decls(e, _, _, _, loc) | result = getLocationFilePath(loc)) + //TODO: add other kinds of elements with single locations +} + +/** + * Gets the file path for an element with potentially multiple locations. + */ +overlay[local] +private string getMultiLocationFilePath(@element e) { + // @variable gets its location(s) from its @var_decl(s) + exists(@var_decl vd, @location_default loc | var_decls(vd, e, _, _, loc) | + result = getLocationFilePath(loc) + ) + //TODO: add other kinds of elements with multiple locations +} + +/** + * A local helper predicate that holds in the base variant and never in the + * overlay variant. + */ +overlay[local] +private predicate holdsInBase() { not isOverlay() } + +/** + * Discards an element from the base variant if: + * - It has a single location in a changed file, or + * - All of its locations are in changed files. + */ +overlay[discard_entity] +private predicate discardElement(@element e) { + holdsInBase() and + ( + overlayChangedFiles(getSingleLocationFilePath(e)) + or + forex(string path | path = getMultiLocationFilePath(e) | overlayChangedFiles(path)) + ) +} diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll index 7c2b15b1812..1185b6a0c9c 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll @@ -2078,38 +2078,151 @@ predicate localExprFlow(Expr e1, Expr e2) { localExprFlowPlus(e1, e2) } +/** + * A canonical representation of a field. + * + * For performance reasons we want a unique `Content` that represents + * a given field across any template instantiation of a class. + * + * This is possible in _almost_ all cases, but there are cases where it is + * not possible to map between a field in the uninstantiated template to a + * field in the instantiated template. This happens in the case of local class + * definitions (because the local class is not the template that constructs + * the instantiation - it is the enclosing function). So this abstract class + * has two implementations: a non-local case (where we can represent a + * canonical field as the field declaration from an uninstantiated class + * template or a non-templated class), and a local case (where we simply use + * the field from the instantiated class). + */ +abstract private class CanonicalField extends Field { + /** Gets a field represented by this canonical field. */ + abstract Field getAField(); + + /** + * Gets a class that declares a field represented by this canonical field. + */ + abstract Class getADeclaringType(); + + /** + * Gets a type that this canonical field may have. Note that this may + * not be a unique type. For example, consider this case: + * ``` + * template + * struct S { T x; }; + * + * S s1; + * S s2; + * ``` + * In this case the canonical field corresponding to `S::x` has two types: + * `int` and `char`. + */ + Type getAType() { result = this.getAField().getType() } + + Type getAnUnspecifiedType() { result = this.getAType().getUnspecifiedType() } +} + +private class NonLocalCanonicalField extends CanonicalField { + Class declaringType; + + NonLocalCanonicalField() { + declaringType = this.getDeclaringType() and + not declaringType.isFromTemplateInstantiation(_) and + not declaringType.isLocal() // handled in LocalCanonicalField + } + + override Field getAField() { + exists(Class c | result.getDeclaringType() = c | + // Either the declaring class of the field is a template instantiation + // that has been constructed from this canonical declaration + c.isConstructedFrom(declaringType) and + pragma[only_bind_out](result.getName()) = pragma[only_bind_out](this.getName()) + or + // or this canonical declaration is not a template. + not c.isConstructedFrom(_) and + result = this + ) + } + + override Class getADeclaringType() { + result = this.getDeclaringType() + or + result.isConstructedFrom(this.getDeclaringType()) + } +} + +private class LocalCanonicalField extends CanonicalField { + Class declaringType; + + LocalCanonicalField() { + declaringType = this.getDeclaringType() and + declaringType.isLocal() + } + + override Field getAField() { result = this } + + override Class getADeclaringType() { result = declaringType } +} + +/** + * A canonical representation of a `Union`. See `CanonicalField` for the explanation for + * why we need a canonical representation. + */ +abstract private class CanonicalUnion extends Union { + /** Gets a union represented by this canonical union. */ + abstract Union getAUnion(); + + /** Gets a canonical field of this canonical union. */ + CanonicalField getACanonicalField() { result.getDeclaringType() = this } +} + +private class NonLocalCanonicalUnion extends CanonicalUnion { + NonLocalCanonicalUnion() { not this.isFromTemplateInstantiation(_) and not this.isLocal() } + + override Union getAUnion() { + result = this + or + result.isConstructedFrom(this) + } +} + +private class LocalCanonicalUnion extends CanonicalUnion { + LocalCanonicalUnion() { this.isLocal() } + + override Union getAUnion() { result = this } +} + bindingset[f] pragma[inline_late] -private int getFieldSize(Field f) { result = f.getType().getSize() } +private int getFieldSize(CanonicalField f) { result = max(f.getAType().getSize()) } /** * Gets a field in the union `u` whose size * is `bytes` number of bytes. */ -private Field getAFieldWithSize(Union u, int bytes) { - result = u.getAField() and +private CanonicalField getAFieldWithSize(CanonicalUnion u, int bytes) { + result = u.getACanonicalField() and bytes = getFieldSize(result) } cached private newtype TContent = - TNonUnionContent(Field f, int indirectionIndex) { + TNonUnionContent(CanonicalField f, int indirectionIndex) { // the indirection index for field content starts at 1 (because `TNonUnionContent` is thought of as // the address of the field, `FieldAddress` in the IR). - indirectionIndex = [1 .. SsaImpl::getMaxIndirectionsForType(f.getUnspecifiedType())] and + indirectionIndex = [1 .. max(SsaImpl::getMaxIndirectionsForType(f.getAnUnspecifiedType()))] and // Reads and writes of union fields are tracked using `UnionContent`. not f.getDeclaringType() instanceof Union } or - TUnionContent(Union u, int bytes, int indirectionIndex) { - exists(Field f | - f = u.getAField() and + TUnionContent(CanonicalUnion u, int bytes, int indirectionIndex) { + exists(CanonicalField f | + f = u.getACanonicalField() and bytes = getFieldSize(f) and // We key `UnionContent` by the union instead of its fields since a write to one // field can be read by any read of the union's fields. Again, the indirection index // is 1-based (because 0 is considered the address). indirectionIndex = [1 .. max(SsaImpl::getMaxIndirectionsForType(getAFieldWithSize(u, bytes) - .getUnspecifiedType()) + .getAnUnspecifiedType()) )] ) } or @@ -2175,8 +2288,12 @@ class FieldContent extends Content, TFieldContent { /** * Gets the field associated with this `Content`, if a unique one exists. + * + * For fields from template instantiations this predicate may still return + * more than one field, but all the fields will be constructed from the same + * template. */ - final Field getField() { result = unique( | | this.getAField()) } + Field getField() { none() } // overridden in subclasses override int getIndirectionIndex() { none() } // overridden in subclasses @@ -2187,32 +2304,33 @@ class FieldContent extends Content, TFieldContent { /** A reference through a non-union instance field. */ class NonUnionFieldContent extends FieldContent, TNonUnionContent { - private Field f; + private CanonicalField f; private int indirectionIndex; NonUnionFieldContent() { this = TNonUnionContent(f, indirectionIndex) } override string toString() { result = contentStars(this) + f.toString() } - override Field getAField() { result = f } + final override Field getField() { result = f.getAField() } + + override Field getAField() { result = this.getField() } /** Gets the indirection index of this `FieldContent`. */ override int getIndirectionIndex() { result = indirectionIndex } override predicate impliesClearOf(Content c) { - exists(FieldContent fc | - fc = c and - fc.getField() = f and + exists(int i | + c = TNonUnionContent(f, i) and // If `this` is `f` then `c` is cleared if it's of the // form `*f`, `**f`, etc. - fc.getIndirectionIndex() >= indirectionIndex + i >= indirectionIndex ) } } /** A reference through an instance field of a union. */ class UnionContent extends FieldContent, TUnionContent { - private Union u; + private CanonicalUnion u; private int indirectionIndex; private int bytes; @@ -2220,24 +2338,31 @@ class UnionContent extends FieldContent, TUnionContent { override string toString() { result = contentStars(this) + u.toString() } + final override Field getField() { result = unique( | | u.getACanonicalField()).getAField() } + /** Gets a field of the underlying union of this `UnionContent`, if any. */ - override Field getAField() { result = u.getAField() and getFieldSize(result) = bytes } + override Field getAField() { + exists(CanonicalField cf | + cf = u.getACanonicalField() and + result = cf.getAField() and + getFieldSize(cf) = bytes + ) + } /** Gets the underlying union of this `UnionContent`. */ - Union getUnion() { result = u } + Union getUnion() { result = u.getAUnion() } /** Gets the indirection index of this `UnionContent`. */ override int getIndirectionIndex() { result = indirectionIndex } override predicate impliesClearOf(Content c) { - exists(UnionContent uc | - uc = c and - uc.getUnion() = u and + exists(int i | + c = TUnionContent(u, _, i) and // If `this` is `u` then `c` is cleared if it's of the // form `*u`, `**u`, etc. (and we ignore `bytes` because // we know the entire union is overwritten because it's a // union). - uc.getIndirectionIndex() >= indirectionIndex + i >= indirectionIndex ) } } diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme b/cpp/ql/lib/semmlecode.cpp.dbscheme index 1a6854060d5..a42ce5fc943 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme @@ -1,3 +1,4 @@ + /*- Compilations -*/ /** @@ -2378,6 +2379,24 @@ link_parent( int link_target : @link_target ref ); +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + /*- XML Files -*/ xmlEncoding( diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats index 1d796c9aa9a..4ff7d2dd67b 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats @@ -2,7 +2,7 @@ @compilation - 12640 + 12641 @externalDataElement @@ -10,35 +10,35 @@ @file - 65198 + 65204 @folder - 12387 + 12388 @diagnostic 359 - - @location_default - 46943795 - @pch 249 + + @location_default + 46943825 + @macro_expansion - 40272403 + 40272429 @other_macro_reference - 300697 + 300698 @normal_function - 2737947 + 2737949 @unknown_function @@ -46,7 +46,7 @@ @constructor - 698677 + 698692 @destructor @@ -58,7 +58,7 @@ @operator - 652426 + 652427 @user_defined_literal @@ -70,23 +70,23 @@ @fun_decl - 4202851 + 4202854 @var_decl - 9383095 + 9383101 @type_decl - 1633437 + 1633438 @namespace_decl - 407917 + 407918 @using_declaration - 267880 + 268041 @using_directive @@ -102,11 +102,11 @@ @parameter - 7019638 + 7019643 @membervariable - 1499493 + 1499494 @globalvariable @@ -114,7 +114,7 @@ @localvariable - 725806 + 726016 @enumconstant @@ -378,7 +378,7 @@ @routineptr - 684266 + 684282 @reference @@ -404,6 +404,10 @@ @scalable_vector 1 + + @decltype + 102350 + @typeof 816 @@ -484,13 +488,9 @@ @remove_reference 5715 - - @decltype - 102350 - @struct - 979711 + 979799 @union @@ -502,11 +502,11 @@ @template_parameter - 866907 + 866985 @alias - 1762011 + 1762169 @unknown_usertype @@ -514,7 +514,7 @@ @class - 324965 + 324966 @template_template_parameter @@ -522,7 +522,7 @@ @proxy_class - 48429 + 48433 @scoped_enum @@ -530,7 +530,7 @@ @template_struct - 212038 + 212057 @template_class @@ -542,23 +542,23 @@ @mangledname - 6364342 + 6364346 @type_mention - 5907627 + 5907630 @concept_template - 3610 + 3609 @routinetype - 604482 + 604495 @ptrtomember - 9725 + 9726 @specifier @@ -582,15 +582,15 @@ @alignas - 2163 + 2164 @attribute_arg_token - 16692 + 16693 @attribute_arg_constant_expr - 71883 + 71889 @attribute_arg_expr @@ -606,23 +606,23 @@ @attribute_arg_type - 459 + 460 @derivation - 476867 + 476878 @frienddecl - 699835 + 700430 @comment - 11233093 + 11233100 @namespace - 8648 + 8649 @specialnamequalifyingelement @@ -630,15 +630,15 @@ @namequalifier - 3037999 + 3037638 @value - 13474763 + 13474772 @initialiser - 2247635 + 2247637 @address_of @@ -650,19 +650,19 @@ @array_to_pointer - 1953766 + 1953767 @parexpr - 4915246 + 4915249 @arithnegexpr - 586538 + 586539 @unaryplusexpr - 4067 + 4068 @complementexpr @@ -694,11 +694,11 @@ @addexpr - 571559 + 571560 @subexpr - 466802 + 466803 @mulexpr @@ -734,11 +734,11 @@ @andexpr - 481223 + 481224 @orexpr - 194057 + 194058 @xorexpr @@ -746,11 +746,11 @@ @eqexpr - 643379 + 643380 @neexpr - 411873 + 411874 @gtexpr @@ -770,7 +770,7 @@ @assignexpr - 1281159 + 1281160 @assignaddexpr @@ -782,7 +782,7 @@ @assignmulexpr - 11183 + 11184 @assigndivexpr @@ -838,7 +838,7 @@ @callexpr - 239762 + 239767 @vastartexpr @@ -858,7 +858,7 @@ @varaccess - 8254728 + 8254733 @runtime_sizeof @@ -866,7 +866,7 @@ @runtime_alignof - 49873 + 49874 @expr_stmt @@ -874,11 +874,11 @@ @routineexpr - 5730574 + 5729912 @type_operand - 1405379 + 1405380 @offsetofexpr @@ -886,11 +886,11 @@ @typescompexpr - 701942 + 701943 @literal - 7966636 + 7966268 @aggregateliteral @@ -898,23 +898,23 @@ @c_style_cast - 6026984 + 6026987 @temp_init - 991871 + 990622 @errorexpr - 45479 + 45480 @reference_to - 1902179 + 1903214 @ref_indirect - 2107171 + 2107218 @vacuous_destructor_call @@ -974,11 +974,11 @@ @thisaccess - 1555763 + 1555764 @new_expr - 46194 + 46195 @delete_expr @@ -986,19 +986,19 @@ @throw_expr - 24145 + 24214 @condition_decl - 408385 + 408340 @braced_init_list - 2151 + 2146 @type_id - 47898 + 47899 @sizeof_pack @@ -1106,7 +1106,7 @@ @ctordirectinit - 112829 + 112831 @ctorvirtualinit @@ -1122,7 +1122,7 @@ @dtordirectdestruct - 39449 + 39450 @dtorvirtualdestruct @@ -1130,7 +1130,7 @@ @dtorfielddestruct - 39824 + 39825 @static_cast @@ -1154,11 +1154,11 @@ @param_ref - 163939 + 163867 @noopexpr - 64 + 48 @istriviallyconstructibleexpr @@ -1186,7 +1186,7 @@ @istrivialexpr - 3367 + 3375 @isstandardlayoutexpr @@ -1258,7 +1258,7 @@ @noexceptexpr - 28343 + 28463 @builtinshufflevector @@ -1322,7 +1322,7 @@ @issame - 4534 + 4533 @isfunction @@ -1430,7 +1430,7 @@ @reuseexpr - 845931 + 845836 @istriviallycopyassignable @@ -1530,7 +1530,7 @@ @requires_expr - 16481 + 16479 @nested_requirement @@ -1538,11 +1538,11 @@ @compound_requirement - 10937 + 10936 @concept_id - 90315 + 90305 @lambdacapture @@ -1550,11 +1550,11 @@ @stmt_expr - 2031638 + 2031639 @stmt_if - 990226 + 990227 @stmt_while @@ -1562,23 +1562,23 @@ @stmt_goto - 157874 + 157889 @stmt_label - 78008 + 78015 @stmt_return - 1241721 + 1241800 @stmt_block - 1728619 + 1728620 @stmt_end_test_while - 233643 + 233644 @stmt_for @@ -1586,11 +1586,11 @@ @stmt_switch_case - 835058 + 834964 @stmt_switch - 411329 + 411283 @stmt_asm @@ -1598,11 +1598,11 @@ @stmt_decl - 771065 + 771066 @stmt_empty - 428842 + 428794 @stmt_continue @@ -1614,7 +1614,7 @@ @stmt_try_block - 26736 + 26771 @stmt_microsoft_try @@ -1634,15 +1634,15 @@ @stmt_range_based_for - 6384 + 6372 @stmt_handler - 43770 + 43779 @stmt_constexpr_if - 106034 + 106035 @stmt_co_return @@ -1670,11 +1670,11 @@ @ppd_ifndef - 160377 + 160378 @ppd_elif - 21912 + 21914 @ppd_else @@ -1686,11 +1686,11 @@ @ppd_plain_include - 318495 + 318524 @ppd_define - 2750047 + 2750049 @ppd_undef @@ -1706,7 +1706,7 @@ @ppd_line - 18799 + 18805 @ppd_error @@ -1762,13 +1762,60 @@ + + databaseMetadata + 1 + + + metadataKey + 1 + + + value + 1 + + + + + metadataKey + value + + + 12 + + + + + + value + metadataKey + + + 12 + + + + + + + + overlayChangedFiles + 50 + + + path + 50 + + + + compilations - 12640 + 12641 id - 12640 + 12641 cwd @@ -1786,7 +1833,7 @@ 1 2 - 12640 + 12641 @@ -1812,11 +1859,11 @@ compilation_args - 1011994 + 1012084 id - 12640 + 12641 num @@ -1824,7 +1871,7 @@ arg - 29262 + 29264 @@ -1893,7 +1940,7 @@ 103 104 - 1995 + 1996 104 @@ -1984,7 +2031,7 @@ 79 89 - 1129 + 1130 89 @@ -2152,12 +2199,12 @@ 1 2 - 13400 + 13402 2 3 - 12682 + 12683 3 @@ -2183,12 +2230,12 @@ 1 2 - 19377 + 19379 2 3 - 8722 + 8723 3 @@ -2203,11 +2250,11 @@ compilation_expanded_args - 1011994 + 1012084 id - 12640 + 12641 num @@ -2215,7 +2262,7 @@ arg - 29262 + 29264 @@ -2284,7 +2331,7 @@ 103 104 - 1995 + 1996 104 @@ -2375,7 +2422,7 @@ 79 89 - 1129 + 1130 89 @@ -2543,12 +2590,12 @@ 1 2 - 13400 + 13402 2 3 - 12682 + 12683 3 @@ -2574,12 +2621,12 @@ 1 2 - 19377 + 19379 2 3 - 8722 + 8723 3 @@ -2904,7 +2951,7 @@ seconds - 14485 + 18352 @@ -2985,27 +3032,27 @@ 3 4 - 544 + 653 4 5 - 816 + 707 6 - 7 - 163 + 9 + 217 - 8 + 9 10 - 217 + 108 10 11 - 108 + 163 11 @@ -3013,19 +3060,24 @@ 217 - 13 - 18 + 15 + 17 + 163 + + + 17 + 21 217 - 18 - 22 + 21 + 51 217 - 25 - 98 - 217 + 118 + 119 + 54 @@ -3098,12 +3150,12 @@ 3 4 - 1089 + 1252 4 5 - 1306 + 1089 5 @@ -3113,32 +3165,32 @@ 6 7 - 599 + 544 7 8 - 217 + 272 8 9 - 217 + 326 9 - 13 + 17 381 - 17 - 46 + 23 + 53 381 - 50 - 90 - 108 + 98 + 99 + 54 @@ -3186,16 +3238,21 @@ 4 5 - 108 - - - 154 - 155 54 - 171 - 172 + 5 + 6 + 54 + + + 195 + 196 + 54 + + + 197 + 198 54 @@ -3212,22 +3269,22 @@ 1 2 - 7732 + 12198 2 3 - 3376 + 4084 3 4 - 2341 + 1415 4 - 46 - 1034 + 44 + 653 @@ -3243,27 +3300,22 @@ 1 2 - 7242 + 10891 2 3 - 3158 + 4465 3 4 - 1960 + 1579 4 - 6 - 1306 - - - 6 - 77 - 816 + 71 + 1415 @@ -3279,12 +3331,12 @@ 1 2 - 10837 + 14866 2 3 - 3648 + 3485 @@ -3560,19 +3612,19 @@ compilation_finished - 12640 + 12641 id - 12640 + 12641 cpu_seconds - 9630 + 9409 elapsed_seconds - 221 + 200 @@ -3586,7 +3638,7 @@ 1 2 - 12640 + 12641 @@ -3602,7 +3654,7 @@ 1 2 - 12640 + 12641 @@ -3618,17 +3670,17 @@ 1 2 - 8268 + 7846 2 3 - 1013 + 1130 3 - 37 - 348 + 35 + 433 @@ -3644,12 +3696,12 @@ 1 2 - 8923 + 8744 2 3 - 707 + 665 @@ -3665,12 +3717,17 @@ 1 2 - 63 + 42 + + + 2 + 3 + 10 3 4 - 21 + 10 4 @@ -3678,14 +3735,19 @@ 10 - 8 - 9 + 9 + 10 + 10 + + + 10 + 11 10 11 12 - 21 + 10 12 @@ -3693,43 +3755,43 @@ 10 - 13 - 14 + 14 + 15 10 - 20 - 21 + 19 + 20 10 - 29 - 30 + 32 + 33 10 - 59 - 60 + 57 + 58 10 - 150 - 151 + 154 + 155 10 - 247 - 248 + 251 + 252 10 - 302 - 303 + 306 + 307 10 - 319 - 320 + 309 + 310 10 @@ -3746,12 +3808,17 @@ 1 2 - 63 + 42 + + + 2 + 3 + 10 3 4 - 21 + 10 4 @@ -3759,14 +3826,19 @@ 10 - 8 - 9 + 9 + 10 + 10 + + + 10 + 11 10 11 12 - 21 + 10 12 @@ -3774,13 +3846,13 @@ 10 - 13 - 14 + 14 + 15 10 - 20 - 21 + 18 + 19 10 @@ -3789,28 +3861,28 @@ 10 - 59 - 60 + 54 + 55 10 - 148 - 149 + 149 + 150 10 - 159 - 160 + 152 + 153 10 - 237 - 238 + 228 + 229 10 - 256 - 257 + 255 + 256 10 @@ -4048,11 +4120,11 @@ locations_default - 46943795 + 46943825 id - 46943795 + 46943825 file @@ -4060,7 +4132,7 @@ beginLine - 7500413 + 7500418 beginColumn @@ -4068,7 +4140,7 @@ endLine - 7501536 + 7501541 endColumn @@ -4086,7 +4158,7 @@ 1 2 - 46943795 + 46943825 @@ -4102,7 +4174,7 @@ 1 2 - 46943795 + 46943825 @@ -4118,7 +4190,7 @@ 1 2 - 46943795 + 46943825 @@ -4134,7 +4206,7 @@ 1 2 - 46943795 + 46943825 @@ -4150,7 +4222,7 @@ 1 2 - 46943795 + 46943825 @@ -4551,7 +4623,7 @@ 1 2 - 4957321 + 4957324 2 @@ -4561,7 +4633,7 @@ 3 4 - 543896 + 543897 4 @@ -4592,7 +4664,7 @@ 1 2 - 5019320 + 5019323 2 @@ -4607,7 +4679,7 @@ 6 57 - 563232 + 563233 57 @@ -4628,7 +4700,7 @@ 1 2 - 5641184 + 5641187 2 @@ -4643,7 +4715,7 @@ 7 25 - 565228 + 565229 25 @@ -4664,12 +4736,12 @@ 1 2 - 7034358 + 7034363 2 85 - 466054 + 466055 @@ -4685,7 +4757,7 @@ 1 2 - 5026306 + 5026309 2 @@ -4700,12 +4772,12 @@ 4 12 - 586934 + 586935 12 72 - 564105 + 564106 72 @@ -5106,12 +5178,12 @@ 1 2 - 4955200 + 4955203 2 3 - 781539 + 781540 3 @@ -5147,7 +5219,7 @@ 1 2 - 5016451 + 5016454 2 @@ -5162,7 +5234,7 @@ 6 52 - 564105 + 564106 52 @@ -5183,7 +5255,7 @@ 1 2 - 7051449 + 7051453 2 @@ -5204,7 +5276,7 @@ 1 2 - 5640311 + 5640314 2 @@ -5240,17 +5312,17 @@ 1 2 - 5024934 + 5024937 2 3 - 743741 + 743742 3 4 - 539530 + 539531 4 @@ -5260,7 +5332,7 @@ 12 72 - 562733 + 562734 72 @@ -5580,15 +5652,15 @@ files - 65198 + 65204 id - 65198 + 65204 name - 65198 + 65204 @@ -5602,7 +5674,7 @@ 1 2 - 65198 + 65204 @@ -5618,7 +5690,7 @@ 1 2 - 65198 + 65204 @@ -5628,15 +5700,15 @@ folders - 12387 + 12388 id - 12387 + 12388 name - 12387 + 12388 @@ -5650,7 +5722,7 @@ 1 2 - 12387 + 12388 @@ -5666,7 +5738,7 @@ 1 2 - 12387 + 12388 @@ -5676,15 +5748,15 @@ containerparent - 77564 + 77571 parent - 12387 + 12388 child - 77564 + 77571 @@ -5698,7 +5770,7 @@ 1 2 - 6029 + 6030 2 @@ -5749,7 +5821,7 @@ 1 2 - 77564 + 77571 @@ -5759,11 +5831,11 @@ numlines - 807861 + 807862 element_id - 806738 + 806739 num_lines @@ -7237,11 +7309,11 @@ fileannotations - 4199643 + 4200019 id - 5765 + 5766 kind @@ -7249,11 +7321,11 @@ name - 58704 + 58709 value - 39505 + 39509 @@ -7288,12 +7360,12 @@ 1 86 - 432 + 433 88 206 - 432 + 433 212 @@ -7303,17 +7375,17 @@ 291 359 - 432 + 433 362 401 - 432 + 433 402 479 - 432 + 433 480 @@ -7328,7 +7400,7 @@ 553 628 - 432 + 433 631 @@ -7359,17 +7431,17 @@ 1 98 - 432 + 433 102 244 - 432 + 433 244 351 - 432 + 433 352 @@ -7384,7 +7456,7 @@ 490 628 - 432 + 433 632 @@ -7399,22 +7471,22 @@ 710 939 - 432 + 433 939 1038 - 432 + 433 1066 1853 - 432 + 433 1853 3292 - 432 + 433 3423 @@ -7498,7 +7570,7 @@ 1 2 - 11024 + 11025 2 @@ -7518,12 +7590,12 @@ 7 9 - 4593 + 4594 9 16 - 4329 + 4330 16 @@ -7533,12 +7605,12 @@ 19 27 - 4255 + 4256 27 47 - 4836 + 4837 47 @@ -7569,7 +7641,7 @@ 1 2 - 58704 + 58709 @@ -7585,12 +7657,12 @@ 1 2 - 11584 + 11585 2 3 - 7687 + 7688 3 @@ -7600,7 +7672,7 @@ 4 6 - 4065 + 4066 6 @@ -7630,7 +7702,7 @@ 41 95 - 4466 + 4467 95 @@ -7691,12 +7763,12 @@ 51 58 - 3030 + 3031 58 80 - 2977 + 2978 81 @@ -7706,7 +7778,7 @@ 151 334 - 2977 + 2978 334 @@ -7732,7 +7804,7 @@ 1 2 - 39495 + 39498 2 @@ -7763,7 +7835,7 @@ 4 5 - 3051 + 3052 5 @@ -7773,7 +7845,7 @@ 8 14 - 3484 + 3485 14 @@ -7783,17 +7855,17 @@ 18 28 - 3199 + 3200 28 34 - 3146 + 3147 34 41 - 3199 + 3200 41 @@ -7813,7 +7885,7 @@ 113 145 - 3030 + 3031 145 @@ -7828,15 +7900,15 @@ inmacroexpansion - 149997201 + 149997296 id - 24671160 + 24671176 inv - 3705370 + 3705372 @@ -7850,37 +7922,37 @@ 1 3 - 2209511 + 2209512 3 5 - 1474989 + 1474990 5 6 - 1620381 + 1620382 6 7 - 6582595 + 6582599 7 8 - 8719067 + 8719073 8 9 - 3557076 + 3557078 9 22 - 507538 + 507539 @@ -7901,7 +7973,7 @@ 2 3 - 743238 + 743239 3 @@ -7931,12 +8003,12 @@ 10 11 - 444653 + 444654 11 337 - 307800 + 307801 339 @@ -7956,15 +8028,15 @@ affectedbymacroexpansion - 48736214 + 48736245 id - 7044796 + 7044800 inv - 3803150 + 3803153 @@ -7978,12 +8050,12 @@ 1 2 - 3846740 + 3846743 2 3 - 766310 + 766311 3 @@ -7993,7 +8065,7 @@ 4 5 - 772742 + 772743 5 @@ -8003,7 +8075,7 @@ 12 50 - 556271 + 556272 50 @@ -8054,7 +8126,7 @@ 14 15 - 408041 + 408042 15 @@ -8064,7 +8136,7 @@ 16 17 - 377680 + 377681 17 @@ -8094,11 +8166,11 @@ macroinvocations - 40354035 + 40354061 id - 40354035 + 40354061 macro_id @@ -8106,7 +8178,7 @@ location - 5919825 + 5919829 kind @@ -8124,7 +8196,7 @@ 1 2 - 40354035 + 40354061 @@ -8140,7 +8212,7 @@ 1 2 - 40354035 + 40354061 @@ -8156,7 +8228,7 @@ 1 2 - 40354035 + 40354061 @@ -8279,7 +8351,7 @@ 1 2 - 177858 + 177859 2 @@ -8300,12 +8372,12 @@ 1 2 - 5256857 + 5256860 2 4 - 428527 + 428528 4 @@ -8326,7 +8398,7 @@ 1 2 - 5897661 + 5897665 2 @@ -8347,7 +8419,7 @@ 1 2 - 5919825 + 5919829 @@ -8420,15 +8492,15 @@ macroparent - 33658296 + 33658318 id - 33658296 + 33658318 parent_id - 15929098 + 15929108 @@ -8442,7 +8514,7 @@ 1 2 - 33658296 + 33658318 @@ -8458,17 +8530,17 @@ 1 2 - 7809235 + 7809240 2 3 - 1595502 + 1595503 3 4 - 4703022 + 4703025 4 @@ -8488,15 +8560,15 @@ macrolocationbind - 6032778 + 6033959 id - 4216419 + 4217710 location - 2276207 + 2276069 @@ -8510,12 +8582,12 @@ 1 2 - 3291436 + 3292783 2 3 - 490596 + 490566 3 @@ -8525,12 +8597,12 @@ 4 5 - 413328 + 413303 5 17 - 13171 + 13170 @@ -8546,12 +8618,12 @@ 1 2 - 1335195 + 1335114 2 3 - 481486 + 481456 3 @@ -8561,12 +8633,12 @@ 4 5 - 427639 + 427613 5 522 - 24087 + 24085 @@ -8576,19 +8648,19 @@ macro_argument_unexpanded - 82481176 + 82486758 invocation - 26280397 + 26280952 argument_index - 696 + 697 text - 343195 + 343226 @@ -8602,22 +8674,22 @@ 1 2 - 9681115 + 9680186 2 3 - 9768522 + 9769396 3 4 - 5001183 + 5001631 4 67 - 1829575 + 1829739 @@ -8633,22 +8705,22 @@ 1 2 - 9863712 + 9862798 2 3 - 9786062 + 9786938 3 4 - 4844554 + 4844988 4 67 - 1786067 + 1786227 @@ -8673,7 +8745,7 @@ 646840 - 2488628 + 2488458 31 @@ -8716,52 +8788,52 @@ 1 2 - 39695 + 39699 2 3 - 62315 + 62321 3 4 - 21025 + 21027 4 5 - 34574 + 34577 5 6 - 39241 + 39245 6 9 - 30867 + 30870 9 15 - 28977 + 28979 15 26 - 25883 + 25885 26 57 - 27139 + 27142 57 517 - 25988 + 25990 518 @@ -8782,17 +8854,17 @@ 1 2 - 243127 + 243149 2 3 - 89856 + 89864 3 9 - 10211 + 10212 @@ -8802,19 +8874,19 @@ macro_argument_expanded - 82481176 + 82486758 invocation - 26280397 + 26280952 argument_index - 696 + 697 text - 207888 + 207906 @@ -8828,22 +8900,22 @@ 1 2 - 9681115 + 9680186 2 3 - 9768522 + 9769396 3 4 - 5001183 + 5001631 4 67 - 1829575 + 1829739 @@ -8859,22 +8931,22 @@ 1 2 - 12639154 + 12638489 2 3 - 8426648 + 8427402 3 4 - 4224417 + 4224795 4 9 - 990177 + 990265 @@ -8899,7 +8971,7 @@ 646840 - 2488628 + 2488458 31 @@ -8942,22 +9014,22 @@ 1 2 - 21827 + 21829 2 3 - 26854 + 26856 3 4 - 43486 + 43490 4 5 - 15903 + 15905 5 @@ -8967,32 +9039,32 @@ 6 7 - 18395 + 18397 7 10 - 18966 + 18967 10 19 - 18321 + 18323 19 51 - 15776 + 15778 51 252 - 15597 + 15598 252 - 1169531 - 9493 + 1169361 + 9494 @@ -9008,17 +9080,17 @@ 1 2 - 105063 + 105072 2 3 - 88895 + 88903 3 66 - 13928 + 13930 @@ -9028,15 +9100,15 @@ functions - 4049287 + 4049290 id - 4049287 + 4049290 name - 1693315 + 1693316 kind @@ -9054,7 +9126,7 @@ 1 2 - 4049287 + 4049290 @@ -9070,7 +9142,7 @@ 1 2 - 4049287 + 4049290 @@ -9112,7 +9184,7 @@ 1 2 - 1690446 + 1690447 2 @@ -9219,26 +9291,26 @@ builtin_functions - 30920 + 30923 id - 30920 + 30923 function_entry_point - 1141750 + 1141776 id - 1138003 + 1138028 entry_point - 1141750 + 1141776 @@ -9252,7 +9324,7 @@ 1 2 - 1134801 + 1134826 2 @@ -9273,7 +9345,7 @@ 1 2 - 1141750 + 1141776 @@ -9283,11 +9355,11 @@ function_return_type - 4066752 + 4066754 id - 4049287 + 4049290 return_type @@ -9305,7 +9377,7 @@ 1 2 - 4031823 + 4031825 2 @@ -9637,33 +9709,33 @@ function_deleted - 87973 + 87963 id - 87973 + 87963 function_defaulted - 51614 + 51609 id - 51614 + 51609 function_prototyped - 4047790 + 4047793 id - 4047790 + 4047793 @@ -9743,11 +9815,11 @@ member_function_this_type - 674132 + 674133 id - 674132 + 674133 this_type @@ -9765,7 +9837,7 @@ 1 2 - 674132 + 674133 @@ -9821,15 +9893,15 @@ fun_decls - 4208839 + 4208841 id - 4202851 + 4202854 function - 4024712 + 4024715 type_id @@ -9837,11 +9909,11 @@ name - 1691818 + 1691819 location - 2813169 + 2813171 @@ -9855,7 +9927,7 @@ 1 2 - 4202851 + 4202854 @@ -9871,7 +9943,7 @@ 1 2 - 4196863 + 4196866 2 @@ -9892,7 +9964,7 @@ 1 2 - 4202851 + 4202854 @@ -9908,7 +9980,7 @@ 1 2 - 4202851 + 4202854 @@ -9924,7 +9996,7 @@ 1 2 - 3861169 + 3861171 2 @@ -9945,7 +10017,7 @@ 1 2 - 4006250 + 4006252 2 @@ -9966,7 +10038,7 @@ 1 2 - 4024712 + 4024715 @@ -9982,7 +10054,7 @@ 1 2 - 3881627 + 3881630 2 @@ -10039,7 +10111,7 @@ 1 2 - 305255 + 305256 2 @@ -10194,7 +10266,7 @@ 1 2 - 1602001 + 1602002 2 @@ -10215,7 +10287,7 @@ 1 2 - 1367227 + 1367228 2 @@ -10241,12 +10313,12 @@ 1 2 - 2420216 + 2420218 2 3 - 251489 + 251490 3 @@ -10267,12 +10339,12 @@ 1 2 - 2438928 + 2438930 2 3 - 233276 + 233277 3 @@ -10293,7 +10365,7 @@ 1 2 - 2698776 + 2698778 2 @@ -10314,7 +10386,7 @@ 1 2 - 2773999 + 2774000 2 @@ -10329,11 +10401,11 @@ fun_def - 1422240 + 1422241 id - 1422240 + 1422241 @@ -10362,11 +10434,11 @@ fun_decl_specifiers - 4279570 + 4279573 id - 1748204 + 1748205 name @@ -10394,7 +10466,7 @@ 3 4 - 1100143 + 1100144 4 @@ -10607,15 +10679,15 @@ fun_decl_noexcept - 141820 + 141823 fun_decl - 141820 + 141823 constant - 141343 + 141346 @@ -10629,7 +10701,7 @@ 1 2 - 141820 + 141823 @@ -10645,7 +10717,7 @@ 1 2 - 140900 + 140903 2 @@ -10671,15 +10743,15 @@ fun_decl_typedef_type - 2759 + 2760 fun_decl - 2759 + 2760 typedeftype_id - 123 + 124 @@ -10693,7 +10765,7 @@ 1 2 - 2759 + 2760 @@ -10709,57 +10781,57 @@ 1 2 - 39 + 40 2 3 - 11 + 12 3 4 - 11 + 12 5 13 - 7 + 8 16 17 - 11 + 12 17 18 - 3 + 4 21 22 - 7 + 8 25 43 - 7 + 8 46 55 - 7 + 8 89 128 - 7 + 8 158 159 - 3 + 4 @@ -10769,11 +10841,11 @@ fun_requires - 29073 + 29070 id - 10099 + 10098 kind @@ -10781,7 +10853,7 @@ constraint - 28837 + 28834 @@ -10795,7 +10867,7 @@ 1 2 - 10035 + 10033 2 @@ -10816,7 +10888,7 @@ 1 2 - 7263 + 7262 2 @@ -10899,7 +10971,7 @@ 1 2 - 28600 + 28597 2 @@ -10920,7 +10992,7 @@ 1 2 - 28837 + 28834 @@ -10930,11 +11002,11 @@ param_decl_bind - 7310174 + 7310179 id - 7310174 + 7310179 index @@ -10942,7 +11014,7 @@ fun_decl - 3531587 + 3531589 @@ -10956,7 +11028,7 @@ 1 2 - 7310174 + 7310179 @@ -10972,7 +11044,7 @@ 1 2 - 7310174 + 7310179 @@ -11070,7 +11142,7 @@ 1 2 - 1508939 + 1508940 2 @@ -11106,7 +11178,7 @@ 1 2 - 1508939 + 1508940 2 @@ -11136,19 +11208,19 @@ var_decls - 9389956 + 9389962 id - 9383095 + 9383101 variable - 9034677 + 9034682 type_id - 1456421 + 1456422 name @@ -11156,7 +11228,7 @@ location - 6274400 + 6274404 @@ -11170,7 +11242,7 @@ 1 2 - 9383095 + 9383101 @@ -11186,7 +11258,7 @@ 1 2 - 9376234 + 9376240 2 @@ -11207,7 +11279,7 @@ 1 2 - 9383095 + 9383101 @@ -11223,7 +11295,7 @@ 1 2 - 9383095 + 9383101 @@ -11239,12 +11311,12 @@ 1 2 - 8703723 + 8703728 2 5 - 330953 + 330954 @@ -11260,7 +11332,7 @@ 1 2 - 8981160 + 8981166 2 @@ -11281,7 +11353,7 @@ 1 2 - 8929265 + 8929271 2 @@ -11302,7 +11374,7 @@ 1 2 - 8783062 + 8783068 2 @@ -11328,7 +11400,7 @@ 2 3 - 284048 + 284049 3 @@ -11395,7 +11467,7 @@ 1 2 - 1119479 + 1119480 2 @@ -11426,7 +11498,7 @@ 1 2 - 985376 + 985377 2 @@ -11482,7 +11554,7 @@ 7 25 - 64119 + 64120 25 @@ -11503,7 +11575,7 @@ 1 2 - 478903 + 478904 2 @@ -11611,7 +11683,7 @@ 1 2 - 5774663 + 5774667 2 @@ -11637,7 +11709,7 @@ 1 2 - 5855499 + 5855503 2 @@ -11658,7 +11730,7 @@ 1 2 - 5975880 + 5975884 2 @@ -11679,7 +11751,7 @@ 1 2 - 6262050 + 6262054 2 @@ -11694,11 +11766,11 @@ var_def - 3766860 + 3766862 id - 3766860 + 3766862 @@ -11848,19 +11920,19 @@ type_decls - 1633437 + 1633438 id - 1633437 + 1633438 type_id - 1614475 + 1614476 location - 1547361 + 1547362 @@ -11874,7 +11946,7 @@ 1 2 - 1633437 + 1633438 @@ -11890,7 +11962,7 @@ 1 2 - 1633437 + 1633438 @@ -11906,7 +11978,7 @@ 1 2 - 1598133 + 1598134 2 @@ -11927,7 +11999,7 @@ 1 2 - 1598258 + 1598259 2 @@ -11948,7 +12020,7 @@ 1 2 - 1525281 + 1525282 2 @@ -11969,7 +12041,7 @@ 1 2 - 1525406 + 1525407 2 @@ -11995,18 +12067,18 @@ type_decl_top - 675275 + 675276 type_decl - 675275 + 675276 type_requires - 7671 + 7670 id @@ -12014,7 +12086,7 @@ constraint - 7649 + 7648 @@ -12064,7 +12136,7 @@ 1 2 - 7628 + 7627 2 @@ -12079,11 +12151,11 @@ namespace_decls - 407917 + 407918 id - 407917 + 407918 namespace_id @@ -12091,11 +12163,11 @@ location - 407917 + 407918 bodylocation - 407917 + 407918 @@ -12109,7 +12181,7 @@ 1 2 - 407917 + 407918 @@ -12125,7 +12197,7 @@ 1 2 - 407917 + 407918 @@ -12141,7 +12213,7 @@ 1 2 - 407917 + 407918 @@ -12355,7 +12427,7 @@ 1 2 - 407917 + 407918 @@ -12371,7 +12443,7 @@ 1 2 - 407917 + 407918 @@ -12387,7 +12459,7 @@ 1 2 - 407917 + 407918 @@ -12403,7 +12475,7 @@ 1 2 - 407917 + 407918 @@ -12419,7 +12491,7 @@ 1 2 - 407917 + 407918 @@ -12435,7 +12507,7 @@ 1 2 - 407917 + 407918 @@ -12445,19 +12517,19 @@ usings - 272030 + 272192 id - 272030 + 272192 element_id - 59042 + 59184 location - 26844 + 26846 kind @@ -12475,7 +12547,7 @@ 1 2 - 272030 + 272192 @@ -12491,7 +12563,7 @@ 1 2 - 272030 + 272192 @@ -12507,7 +12579,7 @@ 1 2 - 272030 + 272192 @@ -12523,12 +12595,12 @@ 1 2 - 51312 + 51453 2 5 - 5385 + 5386 5 @@ -12549,12 +12621,12 @@ 1 2 - 51312 + 51453 2 5 - 5385 + 5386 5 @@ -12575,7 +12647,7 @@ 1 2 - 59042 + 59184 @@ -12591,21 +12663,21 @@ 1 2 - 21173 + 21175 2 4 - 2302 + 2291 4 132 - 1943 + 1953 145 - 367 + 371 1425 @@ -12622,21 +12694,21 @@ 1 2 - 21173 + 21175 2 4 - 2302 + 2291 4 132 - 1943 + 1953 145 - 367 + 371 1425 @@ -12653,7 +12725,7 @@ 1 2 - 26844 + 26846 @@ -12672,8 +12744,8 @@ 10 - 25367 - 25368 + 25380 + 25381 10 @@ -12693,8 +12765,8 @@ 10 - 5377 - 5378 + 5390 + 5391 10 @@ -12726,15 +12798,15 @@ using_container - 580040 + 580229 parent - 21891 + 21914 child - 272030 + 272192 @@ -12748,7 +12820,7 @@ 1 2 - 10370 + 10371 2 @@ -12763,7 +12835,7 @@ 6 7 - 2291 + 2312 7 @@ -12778,7 +12850,7 @@ 145 146 - 2618 + 2619 146 @@ -12799,27 +12871,27 @@ 1 2 - 96583 + 96729 2 3 - 120259 + 120270 3 4 - 20096 + 20097 4 5 - 26706 + 26709 5 65 - 8384 + 8385 @@ -13094,7 +13166,7 @@ 1 2 - 30262 + 30263 2 @@ -13170,7 +13242,7 @@ 17 18 - 4386 + 4387 19 @@ -13231,7 +13303,7 @@ 17 18 - 4386 + 4387 19 @@ -13437,15 +13509,15 @@ params - 7060555 + 7060560 id - 7019638 + 7019643 function - 3404844 + 3404846 index @@ -13467,7 +13539,7 @@ 1 2 - 7019638 + 7019643 @@ -13483,7 +13555,7 @@ 1 2 - 7019638 + 7019643 @@ -13499,7 +13571,7 @@ 1 2 - 6978721 + 6978726 2 @@ -13520,12 +13592,12 @@ 1 2 - 1473137 + 1473138 2 3 - 926246 + 926247 3 @@ -13540,7 +13612,7 @@ 5 65 - 145953 + 145954 @@ -13556,12 +13628,12 @@ 1 2 - 1473137 + 1473138 2 3 - 926246 + 926247 3 @@ -13576,7 +13648,7 @@ 5 65 - 145953 + 145954 @@ -13592,17 +13664,17 @@ 1 2 - 1781636 + 1781637 2 3 - 1030659 + 1030660 3 4 - 437487 + 437488 4 @@ -13782,7 +13854,7 @@ 1 2 - 819587 + 819588 2 @@ -13818,7 +13890,7 @@ 1 2 - 995106 + 995107 2 @@ -13916,11 +13988,11 @@ membervariables - 1501943 + 1501944 id - 1499493 + 1499494 type_id @@ -13928,7 +14000,7 @@ name - 642219 + 642220 @@ -13942,7 +14014,7 @@ 1 2 - 1497151 + 1497152 2 @@ -13963,7 +14035,7 @@ 1 2 - 1499493 + 1499494 @@ -14046,7 +14118,7 @@ 2 3 - 122420 + 122421 3 @@ -14278,19 +14350,19 @@ localvariables - 725806 + 726016 id - 725806 + 726016 type_id - 53403 + 53423 name - 101564 + 101594 @@ -14304,7 +14376,7 @@ 1 2 - 725806 + 726016 @@ -14320,7 +14392,7 @@ 1 2 - 725806 + 726016 @@ -14336,37 +14408,37 @@ 1 2 - 28845 + 28857 2 3 - 7838 + 7840 3 4 - 4027 + 4028 4 6 - 4063 + 4064 6 12 - 4131 + 4132 12 162 - 4007 + 4008 162 19347 - 491 + 492 @@ -14382,22 +14454,22 @@ 1 2 - 38343 + 38358 2 3 - 6702 + 6704 3 5 - 4474 + 4476 5 3509 - 3883 + 3884 @@ -14413,32 +14485,32 @@ 1 2 - 62497 + 62515 2 3 - 16028 + 16032 3 4 - 6526 + 6528 4 8 - 8142 + 8144 8 134 - 7618 + 7620 134 7549 - 751 + 752 @@ -14454,22 +14526,22 @@ 1 2 - 84528 + 84553 2 3 - 8406 + 8408 3 15 - 7678 + 7680 15 1509 - 951 + 952 @@ -14547,15 +14619,15 @@ orphaned_variables - 44320 + 44321 var - 44320 + 44321 function - 41050 + 41051 @@ -14569,7 +14641,7 @@ 1 2 - 44320 + 44321 @@ -14585,7 +14657,7 @@ 1 2 - 40198 + 40199 2 @@ -15318,7 +15390,7 @@ 1 2 - 347167 + 347168 2 @@ -15339,7 +15411,7 @@ 1 2 - 347167 + 347168 2 @@ -15392,7 +15464,7 @@ 1 2 - 347167 + 347168 2 @@ -16179,15 +16251,15 @@ derivedtypes - 3030853 + 3030855 id - 3030853 + 3030855 name - 1460537 + 1460538 kind @@ -16195,7 +16267,7 @@ type_id - 1946677 + 1946678 @@ -16209,7 +16281,7 @@ 1 2 - 3030853 + 3030855 @@ -16225,7 +16297,7 @@ 1 2 - 3030853 + 3030855 @@ -16241,7 +16313,7 @@ 1 2 - 3030853 + 3030855 @@ -16257,7 +16329,7 @@ 1 2 - 1344024 + 1344025 2 @@ -16283,7 +16355,7 @@ 1 2 - 1460537 + 1460538 @@ -16299,7 +16371,7 @@ 1 2 - 1344148 + 1344149 2 @@ -16510,7 +16582,7 @@ 1 2 - 1319324 + 1319325 2 @@ -16535,11 +16607,11 @@ pointerishsize - 2247317 + 2247318 id - 2247317 + 2247318 size @@ -16561,7 +16633,7 @@ 1 2 - 2247317 + 2247318 @@ -16577,7 +16649,7 @@ 1 2 - 2247317 + 2247318 @@ -17100,15 +17172,15 @@ typedefbase - 1762011 + 1762169 id - 1762011 + 1762169 type_id - 837877 + 837952 @@ -17122,7 +17194,7 @@ 1 2 - 1762011 + 1762169 @@ -17138,22 +17210,22 @@ 1 2 - 662420 + 662479 2 3 - 80933 + 80940 3 6 - 64163 + 64169 6 4526 - 30360 + 30363 @@ -17163,7 +17235,7 @@ decltypes - 814485 + 814486 id @@ -17171,7 +17243,7 @@ expr - 814485 + 814486 kind @@ -17301,7 +17373,7 @@ 1 2 - 814485 + 814486 @@ -17317,7 +17389,7 @@ 1 2 - 814485 + 814486 @@ -17333,7 +17405,7 @@ 1 2 - 814485 + 814486 @@ -17349,7 +17421,7 @@ 1 2 - 814485 + 814486 @@ -17611,15 +17683,15 @@ type_operators - 7950 + 7949 id - 7950 + 7949 arg_type - 7177 + 7176 kind @@ -17627,7 +17699,7 @@ base_type - 5243 + 5242 @@ -17641,7 +17713,7 @@ 1 2 - 7950 + 7949 @@ -17657,7 +17729,7 @@ 1 2 - 7950 + 7949 @@ -17673,7 +17745,7 @@ 1 2 - 7950 + 7949 @@ -17689,7 +17761,7 @@ 1 2 - 6403 + 6402 2 @@ -17710,7 +17782,7 @@ 1 2 - 6403 + 6402 2 @@ -17731,7 +17803,7 @@ 1 2 - 7155 + 7154 2 @@ -17927,15 +17999,15 @@ usertypes - 4150876 + 4151247 id - 4150876 + 4151247 name - 918367 + 918449 kind @@ -17953,7 +18025,7 @@ 1 2 - 4150876 + 4151247 @@ -17969,7 +18041,7 @@ 1 2 - 4150876 + 4151247 @@ -17985,22 +18057,22 @@ 1 2 - 654151 + 654210 2 3 - 158635 + 158649 3 8 - 70552 + 70559 8 32672 - 35028 + 35031 @@ -18016,12 +18088,12 @@ 1 2 - 866633 + 866710 2 10 - 51734 + 51739 @@ -18173,11 +18245,11 @@ usertypesize - 1363554 + 1363676 id - 1363554 + 1363676 size @@ -18199,7 +18271,7 @@ 1 2 - 1363554 + 1363676 @@ -18215,7 +18287,7 @@ 1 2 - 1363554 + 1363676 @@ -18473,11 +18545,11 @@ usertype_alias_kind - 1762011 + 1762169 id - 1762011 + 1762169 alias_kind @@ -18495,7 +18567,7 @@ 1 2 - 1762011 + 1762169 @@ -18526,26 +18598,26 @@ nontype_template_parameters - 766231 + 766248 id - 766231 + 766248 type_template_type_constraint - 27118 + 27115 id - 13365 + 13364 constraint - 25979 + 25976 @@ -18559,7 +18631,7 @@ 1 2 - 10206 + 10205 2 @@ -18595,7 +18667,7 @@ 1 2 - 24840 + 24837 2 @@ -18610,15 +18682,15 @@ mangled_name - 7853946 + 7853951 id - 7853946 + 7853951 mangled_name - 6364342 + 6364346 is_complete @@ -18636,7 +18708,7 @@ 1 2 - 7853946 + 7853951 @@ -18652,7 +18724,7 @@ 1 2 - 7853946 + 7853951 @@ -18668,7 +18740,7 @@ 1 2 - 6036258 + 6036261 2 @@ -18689,7 +18761,7 @@ 1 2 - 6364342 + 6364346 @@ -18741,59 +18813,59 @@ is_pod_class - 593785 + 593798 id - 593785 + 593798 is_standard_layout_class - 1124207 + 1124307 id - 1124207 + 1124307 is_complete - 1346034 + 1346155 id - 1346034 + 1346155 is_class_template - 232123 + 232144 id - 232123 + 232144 class_instantiation - 1125875 + 1125965 to - 1122823 + 1122924 from - 71788 + 71794 @@ -18807,12 +18879,12 @@ 1 2 - 1120680 + 1120790 2 8 - 2143 + 2133 @@ -18828,12 +18900,12 @@ 1 2 - 20497 + 20499 2 3 - 12883 + 12884 3 @@ -18848,27 +18920,27 @@ 5 7 - 6061 + 6072 7 10 - 5723 + 5713 10 17 - 5913 + 5903 17 51 - 5385 + 5396 51 4223 - 3558 + 3559 @@ -18878,11 +18950,11 @@ class_template_argument - 2898088 + 2898347 type_id - 1366848 + 1366971 index @@ -18890,7 +18962,7 @@ arg_type - 821942 + 822016 @@ -18904,27 +18976,27 @@ 1 2 - 579258 + 579310 2 3 - 410210 + 410247 3 4 - 250994 + 251017 4 7 - 103078 + 103087 7 113 - 23306 + 23308 @@ -18940,22 +19012,22 @@ 1 2 - 607792 + 607846 2 3 - 424213 + 424251 3 4 - 251829 + 251851 4 113 - 83013 + 83021 @@ -19063,22 +19135,22 @@ 1 2 - 513626 + 513672 2 3 - 167611 + 167626 3 5 - 75072 + 75079 5 47 - 61724 + 61729 47 @@ -19099,17 +19171,17 @@ 1 2 - 723679 + 723744 2 3 - 79898 + 79905 3 22 - 18364 + 18365 @@ -19119,11 +19191,11 @@ class_template_argument_value - 510048 + 510060 type_id - 205797 + 205802 index @@ -19131,7 +19203,7 @@ arg_value - 509912 + 509924 @@ -19145,12 +19217,12 @@ 1 2 - 155787 + 155791 2 3 - 43367 + 43368 3 @@ -19171,12 +19243,12 @@ 1 2 - 147918 + 147921 2 3 - 40471 + 40472 3 @@ -19314,7 +19386,7 @@ 1 2 - 509776 + 509787 2 @@ -19335,7 +19407,7 @@ 1 2 - 509912 + 509924 @@ -19345,15 +19417,15 @@ is_proxy_class_for - 48429 + 48433 id - 48429 + 48433 templ_param_id - 45757 + 45761 @@ -19367,7 +19439,7 @@ 1 2 - 48429 + 48433 @@ -19383,7 +19455,7 @@ 1 2 - 45039 + 45043 2 @@ -19398,11 +19470,11 @@ type_mentions - 5907627 + 5907630 id - 5907627 + 5907630 type_id @@ -19410,7 +19482,7 @@ location - 5851317 + 5851321 kind @@ -19428,7 +19500,7 @@ 1 2 - 5907627 + 5907630 @@ -19444,7 +19516,7 @@ 1 2 - 5907627 + 5907630 @@ -19460,7 +19532,7 @@ 1 2 - 5907627 + 5907630 @@ -19594,7 +19666,7 @@ 1 2 - 5805627 + 5805631 2 @@ -19615,7 +19687,7 @@ 1 2 - 5805627 + 5805631 2 @@ -19636,7 +19708,7 @@ 1 2 - 5851317 + 5851321 @@ -19705,15 +19777,15 @@ function_instantiation - 973767 + 973788 to - 973767 + 973788 from - 182700 + 182704 @@ -19727,7 +19799,7 @@ 1 2 - 973767 + 973788 @@ -19743,12 +19815,12 @@ 1 2 - 110581 + 110583 2 3 - 42787 + 42788 3 @@ -19758,7 +19830,7 @@ 9 104 - 13728 + 13729 119 @@ -19773,11 +19845,11 @@ function_template_argument - 2484632 + 2484687 function_id - 1453189 + 1453222 index @@ -19785,7 +19857,7 @@ arg_type - 297982 + 297989 @@ -19799,22 +19871,22 @@ 1 2 - 782958 + 782976 2 3 - 413128 + 413137 3 4 - 171799 + 171802 4 15 - 85303 + 85305 @@ -19830,22 +19902,22 @@ 1 2 - 802104 + 802122 2 3 - 411221 + 411230 3 4 - 169618 + 169622 4 9 - 70245 + 70247 @@ -19983,12 +20055,12 @@ 1 2 - 174762 + 174766 2 3 - 26333 + 26334 3 @@ -20003,17 +20075,17 @@ 6 11 - 23233 + 23234 11 76 - 23369 + 23370 79 2452 - 7630 + 7631 @@ -20029,7 +20101,7 @@ 1 2 - 256795 + 256801 2 @@ -20049,11 +20121,11 @@ function_template_argument_value - 452748 + 452758 function_id - 196770 + 196774 index @@ -20061,7 +20133,7 @@ arg_value - 450057 + 450067 @@ -20075,12 +20147,12 @@ 1 2 - 151393 + 151396 2 3 - 42890 + 42891 3 @@ -20101,7 +20173,7 @@ 1 2 - 144477 + 144480 2 @@ -20254,7 +20326,7 @@ 1 2 - 447365 + 447375 2 @@ -20275,7 +20347,7 @@ 1 2 - 450057 + 450067 @@ -20379,7 +20451,7 @@ variable_template_argument - 768940 + 768941 variable_id @@ -20849,7 +20921,7 @@ template_template_argument - 9673 + 9674 type_id @@ -20861,7 +20933,7 @@ arg_type - 9081 + 9082 @@ -21080,7 +21152,7 @@ 1 2 - 9060 + 9061 2 @@ -21231,19 +21303,19 @@ concept_templates - 3610 + 3609 concept_id - 3610 + 3609 name - 3610 + 3609 location - 3610 + 3609 @@ -21257,7 +21329,7 @@ 1 2 - 3610 + 3609 @@ -21273,7 +21345,7 @@ 1 2 - 3610 + 3609 @@ -21289,7 +21361,7 @@ 1 2 - 3610 + 3609 @@ -21305,7 +21377,7 @@ 1 2 - 3610 + 3609 @@ -21321,7 +21393,7 @@ 1 2 - 3610 + 3609 @@ -21337,7 +21409,7 @@ 1 2 - 3610 + 3609 @@ -21347,15 +21419,15 @@ concept_instantiation - 90315 + 90305 to - 90315 + 90305 from - 3438 + 3437 @@ -21369,7 +21441,7 @@ 1 2 - 90315 + 90305 @@ -21465,22 +21537,22 @@ is_type_constraint - 36852 + 36848 concept_id - 36852 + 36848 concept_template_argument - 112899 + 112887 concept_id - 76283 + 76275 index @@ -21488,7 +21560,7 @@ arg_type - 21402 + 21399 @@ -21502,12 +21574,12 @@ 1 2 - 46414 + 46409 2 3 - 24647 + 24644 3 @@ -21528,12 +21600,12 @@ 1 2 - 50024 + 50019 2 3 - 22347 + 22345 3 @@ -21636,7 +21708,7 @@ 1 2 - 10378 + 10377 2 @@ -21687,12 +21759,12 @@ 1 2 - 18007 + 18005 2 3 - 3266 + 3265 3 @@ -21838,15 +21910,15 @@ routinetypes - 604482 + 604495 id - 604482 + 604495 return_type - 283845 + 283851 @@ -21860,7 +21932,7 @@ 1 2 - 604482 + 604495 @@ -21876,7 +21948,7 @@ 1 2 - 234073 + 234078 2 @@ -21896,7 +21968,7 @@ routinetypeargs - 1178519 + 1178520 routine @@ -21908,7 +21980,7 @@ type_id - 112073 + 112074 @@ -22262,15 +22334,15 @@ ptrtomembers - 9725 + 9726 id - 9725 + 9726 type_id - 7972 + 7973 class_id @@ -22288,7 +22360,7 @@ 1 2 - 9725 + 9726 @@ -22304,7 +22376,7 @@ 1 2 - 9725 + 9726 @@ -22362,7 +22434,7 @@ 1 2 - 3896 + 3897 2 @@ -22393,7 +22465,7 @@ 1 2 - 3896 + 3897 2 @@ -22466,15 +22538,15 @@ typespecifiers - 854142 + 854164 type_id - 846657 + 849020 spec_id - 1621 + 95 @@ -22488,12 +22560,12 @@ 1 2 - 839173 + 843877 2 3 - 7484 + 5143 @@ -22507,69 +22579,49 @@ 12 - 1 - 2 - 124 + 168 + 169 + 10 - 2 - 3 - 124 + 215 + 216 + 10 - 16 - 17 - 124 + 225 + 226 + 10 - 17 - 18 - 124 + 533 + 534 + 10 - 24 - 25 - 124 + 821 + 822 + 10 - 44 - 45 - 124 + 1568 + 1569 + 10 - 49 - 50 - 124 + 4195 + 4196 + 10 - 51 - 52 - 124 + 18295 + 18296 + 10 - 112 - 113 - 124 - - - 199 - 200 - 124 - - - 325 - 326 - 124 - - - 545 - 546 - 124 - - - 5462 - 5463 - 124 + 54858 + 54859 + 10 @@ -22579,11 +22631,11 @@ funspecifiers - 9714174 + 9714180 func_id - 4008745 + 4008747 spec_id @@ -22601,7 +22653,7 @@ 1 2 - 1527028 + 1527029 2 @@ -22616,7 +22668,7 @@ 4 5 - 692844 + 692845 5 @@ -22737,11 +22789,11 @@ varspecifiers - 3075512 + 3075514 var_id - 2315054 + 2315056 spec_id @@ -22759,7 +22811,7 @@ 1 2 - 1658261 + 1658263 2 @@ -23405,7 +23457,7 @@ 1 2 - 642571 + 642572 2 @@ -23979,11 +24031,11 @@ attribute_arg_value - 16692 + 16693 arg - 16692 + 16693 value @@ -24001,7 +24053,7 @@ 1 2 - 16692 + 16693 @@ -24072,15 +24124,15 @@ attribute_arg_type - 459 + 460 arg - 459 + 460 type_id - 83 + 84 @@ -24094,7 +24146,7 @@ 1 2 - 459 + 460 @@ -24110,22 +24162,22 @@ 1 2 - 71 + 72 2 3 - 3 + 4 35 36 - 3 + 4 60 61 - 3 + 4 @@ -24135,15 +24187,15 @@ attribute_arg_constant - 71883 + 71889 arg - 71883 + 71889 constant - 71883 + 71889 @@ -24157,7 +24209,7 @@ 1 2 - 71883 + 71889 @@ -24173,7 +24225,7 @@ 1 2 - 71883 + 71889 @@ -24351,7 +24403,7 @@ func_id - 799004 + 799005 spec_id @@ -24369,7 +24421,7 @@ 1 2 - 758960 + 758961 2 @@ -24594,15 +24646,15 @@ unspecifiedtype - 7174200 + 7174204 type_id - 7174200 + 7174204 unspecified_type_id - 3962838 + 3962840 @@ -24616,7 +24668,7 @@ 1 2 - 7174200 + 7174204 @@ -24632,12 +24684,12 @@ 1 2 - 2481093 + 2481094 2 3 - 1116610 + 1116611 3 @@ -24657,7 +24709,7 @@ member - 4189503 + 4189506 parent @@ -24669,7 +24721,7 @@ child - 4184887 + 4184890 @@ -24703,7 +24755,7 @@ 5 6 - 42413 + 42414 6 @@ -24947,7 +24999,7 @@ 1 2 - 4184887 + 4184890 @@ -24963,7 +25015,7 @@ 1 2 - 4180272 + 4180274 2 @@ -24978,15 +25030,15 @@ enclosingfunction - 114805 + 114807 child - 114805 + 114807 parent - 71335 + 71337 @@ -25000,7 +25052,7 @@ 1 2 - 114805 + 114807 @@ -25016,7 +25068,7 @@ 1 2 - 49328 + 49329 2 @@ -25041,15 +25093,15 @@ derivations - 476867 + 476878 derivation - 476867 + 476878 sub - 455133 + 455143 index @@ -25057,11 +25109,11 @@ super - 235538 + 235543 location - 35395 + 35396 @@ -25075,7 +25127,7 @@ 1 2 - 476867 + 476878 @@ -25091,7 +25143,7 @@ 1 2 - 476867 + 476878 @@ -25107,7 +25159,7 @@ 1 2 - 476867 + 476878 @@ -25123,7 +25175,7 @@ 1 2 - 476867 + 476878 @@ -25139,7 +25191,7 @@ 1 2 - 438610 + 438620 2 @@ -25160,7 +25212,7 @@ 1 2 - 438610 + 438620 2 @@ -25181,7 +25233,7 @@ 1 2 - 438610 + 438620 2 @@ -25202,7 +25254,7 @@ 1 2 - 438610 + 438620 2 @@ -25362,7 +25414,7 @@ 1 2 - 225726 + 225732 2 @@ -25383,7 +25435,7 @@ 1 2 - 225726 + 225732 2 @@ -25404,7 +25456,7 @@ 1 2 - 235095 + 235100 2 @@ -25425,7 +25477,7 @@ 1 2 - 230189 + 230194 2 @@ -25518,7 +25570,7 @@ 1 2 - 35395 + 35396 @@ -25559,11 +25611,11 @@ derspecifiers - 478639 + 478649 der_id - 476424 + 476435 spec_id @@ -25581,7 +25633,7 @@ 1 2 - 474210 + 474221 2 @@ -25627,11 +25679,11 @@ direct_base_offsets - 449955 + 449965 der_id - 449955 + 449965 offset @@ -25649,7 +25701,7 @@ 1 2 - 449955 + 449965 @@ -25846,23 +25898,23 @@ frienddecls - 699835 + 700430 id - 699835 + 700430 type_id - 42413 + 42414 decl_id - 77876 + 77742 location - 6097 + 6098 @@ -25876,7 +25928,7 @@ 1 2 - 699835 + 700430 @@ -25892,7 +25944,7 @@ 1 2 - 699835 + 700430 @@ -25908,7 +25960,7 @@ 1 2 - 699835 + 700430 @@ -25924,12 +25976,12 @@ 1 2 - 6200 + 6166 2 3 - 14001 + 13967 3 @@ -25944,7 +25996,7 @@ 12 20 - 3577 + 3645 20 @@ -25980,12 +26032,12 @@ 1 2 - 6200 + 6166 2 3 - 14001 + 13967 3 @@ -26000,7 +26052,7 @@ 12 20 - 3577 + 3645 20 @@ -26036,7 +26088,7 @@ 1 2 - 41050 + 41051 2 @@ -26057,12 +26109,12 @@ 1 2 - 48170 + 47864 2 3 - 5893 + 6064 3 @@ -26072,17 +26124,17 @@ 8 15 - 5995 + 6064 15 40 - 6097 + 6064 40 164 - 5723 + 5689 @@ -26098,12 +26150,12 @@ 1 2 - 48170 + 47864 2 3 - 5893 + 6064 3 @@ -26113,17 +26165,17 @@ 8 15 - 5995 + 6064 15 40 - 6097 + 6064 40 164 - 5723 + 5689 @@ -26139,7 +26191,7 @@ 1 2 - 77195 + 77060 2 @@ -26164,7 +26216,7 @@ 2 - 20354 + 20371 374 @@ -26206,7 +26258,7 @@ 2 - 2133 + 2129 340 @@ -26217,19 +26269,19 @@ comments - 11233093 + 11233100 id - 11233093 + 11233100 contents - 4303522 + 4303524 location - 11233093 + 11233100 @@ -26243,7 +26295,7 @@ 1 2 - 11233093 + 11233100 @@ -26259,7 +26311,7 @@ 1 2 - 11233093 + 11233100 @@ -26275,12 +26327,12 @@ 1 2 - 3928782 + 3928784 2 6 - 322969 + 322970 6 @@ -26301,12 +26353,12 @@ 1 2 - 3928782 + 3928784 2 6 - 322969 + 322970 6 @@ -26327,7 +26379,7 @@ 1 2 - 11233093 + 11233100 @@ -26343,7 +26395,7 @@ 1 2 - 11233093 + 11233100 @@ -26353,15 +26405,15 @@ commentbinding - 3914685 + 3914688 id - 3350704 + 3350706 element - 3749146 + 3749148 @@ -26375,7 +26427,7 @@ 1 2 - 3289079 + 3289081 2 @@ -26396,7 +26448,7 @@ 1 2 - 3583607 + 3583609 2 @@ -26411,15 +26463,15 @@ exprconv - 9633161 + 9633168 converted - 9633056 + 9633062 conversion - 9633161 + 9633168 @@ -26433,7 +26485,7 @@ 1 2 - 9632950 + 9632957 2 @@ -26454,7 +26506,7 @@ 1 2 - 9633161 + 9633168 @@ -26464,22 +26516,22 @@ compgenerated - 9893081 + 9895967 id - 9893081 + 9895967 synthetic_destructor_call - 1669514 + 1669328 element - 1243336 + 1243197 i @@ -26487,7 +26539,7 @@ destructor_call - 1669514 + 1669328 @@ -26501,17 +26553,17 @@ 1 2 - 827601 + 827509 2 3 - 408944 + 408898 3 19 - 6790 + 6789 @@ -26527,17 +26579,17 @@ 1 2 - 827601 + 827509 2 3 - 408944 + 408898 3 19 - 6790 + 6789 @@ -26685,7 +26737,7 @@ 1 2 - 1669514 + 1669328 @@ -26701,7 +26753,7 @@ 1 2 - 1669514 + 1669328 @@ -26711,11 +26763,11 @@ namespaces - 8648 + 8649 id - 8648 + 8649 name @@ -26733,7 +26785,7 @@ 1 2 - 8648 + 8649 @@ -26780,7 +26832,7 @@ namespacembrs - 2038490 + 2038492 parentid @@ -26788,7 +26840,7 @@ memberid - 2038490 + 2038492 @@ -26878,7 +26930,7 @@ 1 2 - 2038490 + 2038492 @@ -26888,11 +26940,11 @@ exprparents - 19454445 + 19454457 expr_id - 19454445 + 19454457 child_index @@ -26900,7 +26952,7 @@ parent_id - 12940139 + 12940148 @@ -26914,7 +26966,7 @@ 1 2 - 19454445 + 19454457 @@ -26930,7 +26982,7 @@ 1 2 - 19454445 + 19454457 @@ -27048,17 +27100,17 @@ 1 2 - 7394844 + 7394848 2 3 - 5082739 + 5082743 3 712 - 462555 + 462556 @@ -27074,17 +27126,17 @@ 1 2 - 7394844 + 7394848 2 3 - 5082739 + 5082743 3 712 - 462555 + 462556 @@ -27094,22 +27146,22 @@ expr_isload - 6899307 + 6899311 expr_id - 6899307 + 6899311 conversionkinds - 6050440 + 6050443 expr_id - 6050440 + 6050443 kind @@ -27127,7 +27179,7 @@ 1 2 - 6050440 + 6050443 @@ -27171,8 +27223,8 @@ 1 - 5831532 - 5831533 + 5831535 + 5831536 1 @@ -27183,11 +27235,11 @@ iscall - 5800862 + 5800192 caller - 5800862 + 5800192 kind @@ -27205,7 +27257,7 @@ 1 2 - 5800862 + 5800192 @@ -27229,8 +27281,8 @@ 21 - 268316 - 268317 + 268315 + 268316 21 @@ -27241,11 +27293,11 @@ numtemplatearguments - 627726 + 627727 expr_id - 627726 + 627727 num @@ -27263,7 +27315,7 @@ 1 2 - 627726 + 627727 @@ -27347,23 +27399,23 @@ namequalifiers - 3037999 + 3037638 id - 3037999 + 3037638 qualifiableelement - 3037999 + 3037638 qualifyingelement - 47424 + 47419 location - 551734 + 551672 @@ -27377,7 +27429,7 @@ 1 2 - 3037999 + 3037638 @@ -27393,7 +27445,7 @@ 1 2 - 3037999 + 3037638 @@ -27409,7 +27461,7 @@ 1 2 - 3037999 + 3037638 @@ -27425,7 +27477,7 @@ 1 2 - 3037999 + 3037638 @@ -27441,7 +27493,7 @@ 1 2 - 3037999 + 3037638 @@ -27457,7 +27509,7 @@ 1 2 - 3037999 + 3037638 @@ -27473,22 +27525,22 @@ 1 2 - 31501 + 31498 2 3 - 8165 + 8164 3 5 - 4104 + 4103 5 - 6811 - 3567 + 6810 + 3566 19018 @@ -27509,22 +27561,22 @@ 1 2 - 31501 + 31498 2 3 - 8165 + 8164 3 5 - 4104 + 4103 5 - 6811 - 3567 + 6810 + 3566 19018 @@ -27545,17 +27597,17 @@ 1 2 - 34359 + 34356 2 3 - 7349 + 7348 3 6 - 3567 + 3566 6 @@ -27576,22 +27628,22 @@ 1 2 - 79034 + 79046 2 6 - 38055 + 38030 6 7 - 398479 + 398435 7 192 - 36164 + 36160 @@ -27607,22 +27659,22 @@ 1 2 - 79034 + 79046 2 6 - 38055 + 38030 6 7 - 398479 + 398435 7 192 - 36164 + 36160 @@ -27638,22 +27690,22 @@ 1 2 - 111395 + 111383 2 4 - 13279 + 13278 4 5 - 414767 + 414721 5 33 - 12291 + 12289 @@ -27663,15 +27715,15 @@ varbind - 8254728 + 8254733 expr - 8254728 + 8254733 var - 1050388 + 1050389 @@ -27685,7 +27737,7 @@ 1 2 - 8254728 + 8254733 @@ -27701,12 +27753,12 @@ 1 2 - 171537 + 171538 2 3 - 188702 + 188703 3 @@ -27756,15 +27808,15 @@ funbind - 5810554 + 5809904 expr - 5808083 + 5807433 fun - 275716 + 275686 @@ -27778,12 +27830,12 @@ 1 2 - 5805611 + 5804962 2 3 - 2471 + 2470 @@ -27799,27 +27851,27 @@ 1 2 - 181318 + 181298 2 3 - 38786 + 38782 3 4 - 17169 + 17167 4 8 - 22713 + 22710 8 37798 - 15729 + 15727 @@ -27829,11 +27881,11 @@ expr_allocator - 45240 + 45241 expr - 45240 + 45241 func @@ -27855,7 +27907,7 @@ 1 2 - 45240 + 45241 @@ -27871,7 +27923,7 @@ 1 2 - 45240 + 45241 @@ -27955,11 +28007,11 @@ expr_deallocator - 53825 + 53826 expr - 53825 + 53826 func @@ -27981,7 +28033,7 @@ 1 2 - 53825 + 53826 @@ -27997,7 +28049,7 @@ 1 2 - 53825 + 53826 @@ -28246,11 +28298,11 @@ values - 13474763 + 13474772 id - 13474763 + 13474772 str @@ -28268,7 +28320,7 @@ 1 2 - 13474763 + 13474772 @@ -28314,11 +28366,11 @@ valuetext - 6647515 + 6647555 id - 6647515 + 6647555 text @@ -28336,7 +28388,7 @@ 1 2 - 6647515 + 6647555 @@ -28377,15 +28429,15 @@ valuebind - 13583347 + 13583356 val - 13474763 + 13474772 expr - 13583347 + 13583356 @@ -28399,7 +28451,7 @@ 1 2 - 13384208 + 13384216 2 @@ -28420,7 +28472,7 @@ 1 2 - 13583347 + 13583356 @@ -28430,11 +28482,11 @@ fieldoffsets - 1499493 + 1499494 id - 1499493 + 1499494 byteoffset @@ -28456,7 +28508,7 @@ 1 2 - 1499493 + 1499494 @@ -28472,7 +28524,7 @@ 1 2 - 1499493 + 1499494 @@ -28817,19 +28869,19 @@ initialisers - 2247635 + 2247637 init - 2247635 + 2247637 var - 979695 + 979696 expr - 2247635 + 2247637 location @@ -28847,7 +28899,7 @@ 1 2 - 2247635 + 2247637 @@ -28863,7 +28915,7 @@ 1 2 - 2247635 + 2247637 @@ -28879,7 +28931,7 @@ 1 2 - 2247635 + 2247637 @@ -28947,7 +28999,7 @@ 1 2 - 979687 + 979688 2 @@ -28968,7 +29020,7 @@ 1 2 - 2247635 + 2247637 @@ -28984,7 +29036,7 @@ 1 2 - 2247635 + 2247637 @@ -29000,7 +29052,7 @@ 1 2 - 2247635 + 2247637 @@ -29016,7 +29068,7 @@ 1 2 - 414607 + 414608 2 @@ -29073,7 +29125,7 @@ 1 2 - 414607 + 414608 2 @@ -29098,26 +29150,26 @@ braced_initialisers - 68436 + 68305 init - 68436 + 68305 expr_ancestor - 1675488 + 1675301 exp - 1675488 + 1675301 ancestor - 838560 + 838467 @@ -29131,7 +29183,7 @@ 1 2 - 1675488 + 1675301 @@ -29147,17 +29199,17 @@ 1 2 - 17061 + 17059 2 3 - 811442 + 811351 3 19 - 10056 + 10055 @@ -29167,11 +29219,11 @@ exprs - 25210871 + 25210887 id - 25210871 + 25210887 kind @@ -29179,7 +29231,7 @@ location - 10585982 + 10585988 @@ -29193,7 +29245,7 @@ 1 2 - 25210871 + 25210887 @@ -29209,7 +29261,7 @@ 1 2 - 25210871 + 25210887 @@ -29387,7 +29439,7 @@ 1 2 - 8903992 + 8903998 2 @@ -29418,7 +29470,7 @@ 1 2 - 9043396 + 9043402 2 @@ -29438,15 +29490,15 @@ expr_reuse - 845931 + 845836 reuse - 845931 + 845836 original - 845931 + 845836 value_category @@ -29464,7 +29516,7 @@ 1 2 - 845931 + 845836 @@ -29480,7 +29532,7 @@ 1 2 - 845931 + 845836 @@ -29496,7 +29548,7 @@ 1 2 - 845931 + 845836 @@ -29512,7 +29564,7 @@ 1 2 - 845931 + 845836 @@ -29564,11 +29616,11 @@ expr_types - 25210871 + 25210887 id - 25210871 + 25210887 typeid @@ -29590,7 +29642,7 @@ 1 2 - 25210871 + 25210887 @@ -29606,7 +29658,7 @@ 1 2 - 25210871 + 25210887 @@ -29751,15 +29803,15 @@ new_allocated_type - 46194 + 46195 expr - 46194 + 46195 type_id - 27389 + 27390 @@ -29773,7 +29825,7 @@ 1 2 - 46194 + 46195 @@ -31208,15 +31260,15 @@ condition_decl_bind - 408385 + 408340 expr - 408385 + 408340 decl - 408385 + 408340 @@ -31230,7 +31282,7 @@ 1 2 - 408385 + 408340 @@ -31246,7 +31298,7 @@ 1 2 - 408385 + 408340 @@ -31256,11 +31308,11 @@ typeid_bind - 47898 + 47899 expr - 47898 + 47899 type_id @@ -31278,7 +31330,7 @@ 1 2 - 47898 + 47899 @@ -31367,11 +31419,11 @@ sizeof_bind - 242029 + 242030 expr - 242029 + 242030 type_id @@ -31389,7 +31441,7 @@ 1 2 - 242029 + 242030 @@ -33088,11 +33140,11 @@ stmts - 6358197 + 6358201 id - 6358197 + 6358201 kind @@ -33100,7 +33152,7 @@ location - 2679767 + 2679769 @@ -33114,7 +33166,7 @@ 1 2 - 6358197 + 6358201 @@ -33130,7 +33182,7 @@ 1 2 - 6358197 + 6358201 @@ -33368,7 +33420,7 @@ 1 2 - 2221078 + 2221080 2 @@ -33399,7 +33451,7 @@ 1 2 - 2596949 + 2596951 2 @@ -33569,15 +33621,15 @@ if_then - 990226 + 990227 if_stmt - 990226 + 990227 then_id - 990226 + 990227 @@ -33591,7 +33643,7 @@ 1 2 - 990226 + 990227 @@ -33607,7 +33659,7 @@ 1 2 - 990226 + 990227 @@ -33617,15 +33669,15 @@ if_else - 436535 + 436486 if_stmt - 436535 + 436486 else_id - 436535 + 436486 @@ -33639,7 +33691,7 @@ 1 2 - 436535 + 436486 @@ -33655,7 +33707,7 @@ 1 2 - 436535 + 436486 @@ -33713,15 +33765,15 @@ constexpr_if_then - 106034 + 106035 constexpr_if_stmt - 106034 + 106035 then_id - 106034 + 106035 @@ -33735,7 +33787,7 @@ 1 2 - 106034 + 106035 @@ -33751,7 +33803,7 @@ 1 2 - 106034 + 106035 @@ -33953,15 +34005,15 @@ do_body - 233643 + 233644 do_stmt - 233643 + 233644 body_id - 233643 + 233644 @@ -33975,7 +34027,7 @@ 1 2 - 233643 + 233644 @@ -33991,7 +34043,7 @@ 1 2 - 233643 + 233644 @@ -34049,11 +34101,11 @@ switch_case - 835058 + 834964 switch_stmt - 411329 + 411283 index @@ -34061,7 +34113,7 @@ case_id - 835058 + 834964 @@ -34080,7 +34132,7 @@ 2 3 - 408450 + 408404 3 @@ -34106,7 +34158,7 @@ 2 3 - 408450 + 408404 3 @@ -34269,7 +34321,7 @@ 1 2 - 835058 + 834964 @@ -34285,7 +34337,7 @@ 1 2 - 835058 + 834964 @@ -34295,15 +34347,15 @@ switch_body - 411329 + 411283 switch_stmt - 411329 + 411283 body_id - 411329 + 411283 @@ -34317,7 +34369,7 @@ 1 2 - 411329 + 411283 @@ -34333,7 +34385,7 @@ 1 2 - 411329 + 411283 @@ -34535,11 +34587,11 @@ stmtparents - 5618643 + 5618647 id - 5618643 + 5618647 index @@ -34547,7 +34599,7 @@ parent - 2377534 + 2377536 @@ -34561,7 +34613,7 @@ 1 2 - 5618643 + 5618647 @@ -34577,7 +34629,7 @@ 1 2 - 5618643 + 5618647 @@ -34715,12 +34767,12 @@ 1 2 - 1356880 + 1356881 2 3 - 516457 + 516458 3 @@ -34756,12 +34808,12 @@ 1 2 - 1356880 + 1356881 2 3 - 516457 + 516458 3 @@ -34791,22 +34843,22 @@ ishandler - 43770 + 43779 block - 43770 + 43779 stmt_decl_bind - 724592 + 724593 stmt - 714042 + 714043 num @@ -34814,7 +34866,7 @@ decl - 724592 + 724593 @@ -34828,7 +34880,7 @@ 1 2 - 706590 + 706591 2 @@ -34849,7 +34901,7 @@ 1 2 - 706590 + 706591 2 @@ -34982,7 +35034,7 @@ 1 2 - 724592 + 724593 @@ -34998,7 +35050,7 @@ 1 2 - 724592 + 724593 @@ -35008,11 +35060,11 @@ stmt_decl_entry_bind - 724592 + 724593 stmt - 714042 + 714043 num @@ -35020,7 +35072,7 @@ decl_entry - 724592 + 724593 @@ -35034,7 +35086,7 @@ 1 2 - 706590 + 706591 2 @@ -35055,7 +35107,7 @@ 1 2 - 706590 + 706591 2 @@ -35188,7 +35240,7 @@ 1 2 - 724592 + 724593 @@ -35204,7 +35256,7 @@ 1 2 - 724592 + 724593 @@ -35214,15 +35266,15 @@ blockscope - 1644290 + 1644291 block - 1644290 + 1644291 enclosing - 1427105 + 1427106 @@ -35236,7 +35288,7 @@ 1 2 - 1644290 + 1644291 @@ -35252,7 +35304,7 @@ 1 2 - 1294499 + 1294500 2 @@ -35272,11 +35324,11 @@ jumpinfo - 348324 + 348325 id - 348324 + 348325 str @@ -35284,7 +35336,7 @@ target - 72706 + 72707 @@ -35298,7 +35350,7 @@ 1 2 - 348324 + 348325 @@ -35314,7 +35366,7 @@ 1 2 - 348324 + 348325 @@ -35443,7 +35495,7 @@ 1 2 - 72706 + 72707 @@ -35453,11 +35505,11 @@ preprocdirects - 5408281 + 5408285 id - 5408281 + 5408285 kind @@ -35465,7 +35517,7 @@ location - 5405038 + 5405041 @@ -35479,7 +35531,7 @@ 1 2 - 5408281 + 5408285 @@ -35495,7 +35547,7 @@ 1 2 - 5408281 + 5408285 @@ -35643,7 +35695,7 @@ 1 2 - 5404913 + 5404916 27 @@ -35664,7 +35716,7 @@ 1 2 - 5405038 + 5405041 @@ -35674,7 +35726,7 @@ preprocpair - 1141185 + 1141186 begin @@ -35682,7 +35734,7 @@ elseelifend - 1141185 + 1141186 @@ -35696,7 +35748,7 @@ 1 2 - 649557 + 649558 2 @@ -35722,7 +35774,7 @@ 1 2 - 1141185 + 1141186 @@ -35732,11 +35784,11 @@ preproctrue - 439358 + 439359 branch - 439358 + 439359 @@ -35754,19 +35806,19 @@ preproctext - 4352298 + 4352301 id - 4352298 + 4352301 head - 2955007 + 2955008 body - 1683336 + 1683337 @@ -35780,7 +35832,7 @@ 1 2 - 4352298 + 4352301 @@ -35796,7 +35848,7 @@ 1 2 - 4352298 + 4352301 @@ -35812,7 +35864,7 @@ 1 2 - 2756409 + 2756411 2 @@ -35833,7 +35885,7 @@ 1 2 - 2873796 + 2873798 2 @@ -35854,12 +35906,12 @@ 1 2 - 1535136 + 1535137 2 10 - 127241 + 127242 10 @@ -35880,7 +35932,7 @@ 1 2 - 1539378 + 1539379 2 @@ -35900,15 +35952,15 @@ includes - 318569 + 318598 id - 318569 + 318598 included - 58683 + 58688 @@ -35922,7 +35974,7 @@ 1 2 - 318569 + 318598 @@ -35938,17 +35990,17 @@ 1 2 - 29040 + 29043 2 3 - 9440 + 9441 3 4 - 4952 + 4953 4 @@ -35958,7 +36010,7 @@ 6 11 - 4519 + 4520 11 @@ -36026,11 +36078,11 @@ link_parent - 30400377 + 30401054 element - 3866383 + 3866469 link_target @@ -36048,17 +36100,17 @@ 1 2 - 530489 + 530500 2 9 - 26946 + 26947 9 10 - 3308947 + 3309021 diff --git a/cpp/ql/lib/upgrades/1a6854060d5d3ada16c580a29f8c5ce21f3367f8/old.dbscheme b/cpp/ql/lib/upgrades/1a6854060d5d3ada16c580a29f8c5ce21f3367f8/old.dbscheme new file mode 100644 index 00000000000..1a6854060d5 --- /dev/null +++ b/cpp/ql/lib/upgrades/1a6854060d5d3ada16c580a29f8c5ce21f3367f8/old.dbscheme @@ -0,0 +1,2450 @@ +/*- Compilations -*/ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/*- External data -*/ + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Lines of code -*/ + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- C++ dbscheme -*/ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +pch_uses( + int pch: @pch ref, + int compilation: @compilation ref, + int id: @file ref +) + +#keyset[pch, compilation] +pch_creations( + int pch: @pch, + int compilation: @compilation ref, + int from: @file ref +) + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location_default ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +case @function.kind of + 0 = @unknown_function +| 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +// ... 6 = @builtin_function deprecated // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +builtin_functions( + int id: @function ref +) + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +| 11 = @scalable_vector // Arm SVE +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +case @type_operator.kind of + 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +case @usertype.kind of + 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location_default ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype + | @decltype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_default ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_default ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_default ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/*- XML Files -*/ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; diff --git a/cpp/ql/lib/upgrades/1a6854060d5d3ada16c580a29f8c5ce21f3367f8/semmlecode.cpp.dbscheme b/cpp/ql/lib/upgrades/1a6854060d5d3ada16c580a29f8c5ce21f3367f8/semmlecode.cpp.dbscheme new file mode 100644 index 00000000000..a42ce5fc943 --- /dev/null +++ b/cpp/ql/lib/upgrades/1a6854060d5d3ada16c580a29f8c5ce21f3367f8/semmlecode.cpp.dbscheme @@ -0,0 +1,2469 @@ + +/*- Compilations -*/ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/*- External data -*/ + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Lines of code -*/ + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- C++ dbscheme -*/ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +pch_uses( + int pch: @pch ref, + int compilation: @compilation ref, + int id: @file ref +) + +#keyset[pch, compilation] +pch_creations( + int pch: @pch, + int compilation: @compilation ref, + int from: @file ref +) + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location_default ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +case @function.kind of + 0 = @unknown_function +| 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +// ... 6 = @builtin_function deprecated // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +builtin_functions( + int id: @function ref +) + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +| 11 = @scalable_vector // Arm SVE +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +case @type_operator.kind of + 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +case @usertype.kind of + 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location_default ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype + | @decltype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_default ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_default ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_default ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + +/*- XML Files -*/ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; diff --git a/cpp/ql/lib/upgrades/1a6854060d5d3ada16c580a29f8c5ce21f3367f8/upgrade.properties b/cpp/ql/lib/upgrades/1a6854060d5d3ada16c580a29f8c5ce21f3367f8/upgrade.properties new file mode 100644 index 00000000000..52b67d65af7 --- /dev/null +++ b/cpp/ql/lib/upgrades/1a6854060d5d3ada16c580a29f8c5ce21f3367f8/upgrade.properties @@ -0,0 +1,2 @@ +description: Add databaseMetadata and overlayChangedFiles relations +compatibility: full diff --git a/cpp/ql/src/CHANGELOG.md b/cpp/ql/src/CHANGELOG.md index 58677d61a2a..813bbda6a8a 100644 --- a/cpp/ql/src/CHANGELOG.md +++ b/cpp/ql/src/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.5.6 + +No user-facing changes. + +## 1.5.5 + +No user-facing changes. + ## 1.5.4 No user-facing changes. diff --git a/cpp/ql/src/Security/CWE/CWE-020/ExternalAPIs.qll b/cpp/ql/src/Security/CWE/CWE-020/ExternalAPIs.qll index 51dad0fc18c..74fe756093c 100644 --- a/cpp/ql/src/Security/CWE/CWE-020/ExternalAPIs.qll +++ b/cpp/ql/src/Security/CWE/CWE-020/ExternalAPIs.qll @@ -10,7 +10,7 @@ import ExternalAPIsSpecific /** A node representing untrusted data being passed to an external API. */ class UntrustedExternalApiDataNode extends ExternalApiDataNode { - UntrustedExternalApiDataNode() { UntrustedDataToExternalApiFlow::flow(_, this) } + UntrustedExternalApiDataNode() { UntrustedDataToExternalApiFlow::flowTo(this) } /** Gets a source of untrusted data which is passed to this external API data node. */ DataFlow::Node getAnUntrustedSource() { UntrustedDataToExternalApiFlow::flow(result, this) } diff --git a/cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIs.qll b/cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIs.qll index 51dad0fc18c..74fe756093c 100644 --- a/cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIs.qll +++ b/cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIs.qll @@ -10,7 +10,7 @@ import ExternalAPIsSpecific /** A node representing untrusted data being passed to an external API. */ class UntrustedExternalApiDataNode extends ExternalApiDataNode { - UntrustedExternalApiDataNode() { UntrustedDataToExternalApiFlow::flow(_, this) } + UntrustedExternalApiDataNode() { UntrustedDataToExternalApiFlow::flowTo(this) } /** Gets a source of untrusted data which is passed to this external API data node. */ DataFlow::Node getAnUntrustedSource() { UntrustedDataToExternalApiFlow::flow(result, this) } diff --git a/cpp/ql/src/Security/CWE/CWE-311/CleartextTransmission.ql b/cpp/ql/src/Security/CWE/CWE-311/CleartextTransmission.ql index 01d078cf545..392650022e2 100644 --- a/cpp/ql/src/Security/CWE/CWE-311/CleartextTransmission.ql +++ b/cpp/ql/src/Security/CWE/CWE-311/CleartextTransmission.ql @@ -263,7 +263,7 @@ module FromSensitiveFlow = TaintTracking::Global; * A taint flow configuration for flow from a sensitive expression to an encryption operation. */ module ToEncryptionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { FromSensitiveFlow::flow(source, _) } + predicate isSource(DataFlow::Node source) { FromSensitiveFlow::flowFrom(source) } predicate isSink(DataFlow::Node sink) { isSinkEncrypt(sink, _) } @@ -311,7 +311,7 @@ where FromSensitiveFlow::flowPath(source, sink) and isSinkSendRecv(sink.getNode(), networkSendRecv) and // no flow from sensitive -> evidence of encryption - not ToEncryptionFlow::flow(source.getNode(), _) and + not ToEncryptionFlow::flowFrom(source.getNode()) and not FromEncryptionFlow::flowTo(sink.getNode()) and // construct result if networkSendRecv instanceof NetworkSend diff --git a/cpp/ql/src/change-notes/released/1.5.5.md b/cpp/ql/src/change-notes/released/1.5.5.md new file mode 100644 index 00000000000..76d0ac89489 --- /dev/null +++ b/cpp/ql/src/change-notes/released/1.5.5.md @@ -0,0 +1,3 @@ +## 1.5.5 + +No user-facing changes. diff --git a/cpp/ql/src/change-notes/released/1.5.6.md b/cpp/ql/src/change-notes/released/1.5.6.md new file mode 100644 index 00000000000..17fb577dc9e --- /dev/null +++ b/cpp/ql/src/change-notes/released/1.5.6.md @@ -0,0 +1,3 @@ +## 1.5.6 + +No user-facing changes. diff --git a/cpp/ql/src/codeql-pack.release.yml b/cpp/ql/src/codeql-pack.release.yml index c216828ee1c..9a0b3c9461b 100644 --- a/cpp/ql/src/codeql-pack.release.yml +++ b/cpp/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.5.4 +lastReleaseVersion: 1.5.6 diff --git a/cpp/ql/src/experimental/Security/CWE/CWE-125/DangerousWorksWithMultibyteOrWideCharacters.ql b/cpp/ql/src/experimental/Security/CWE/CWE-125/DangerousWorksWithMultibyteOrWideCharacters.ql index 74ac8e6da66..c562e28326b 100644 --- a/cpp/ql/src/experimental/Security/CWE/CWE-125/DangerousWorksWithMultibyteOrWideCharacters.ql +++ b/cpp/ql/src/experimental/Security/CWE/CWE-125/DangerousWorksWithMultibyteOrWideCharacters.ql @@ -1,5 +1,5 @@ /** - * @name Dangerous use convert function. + * @name Dangerous use convert function * @description Using convert function with an invalid length argument can result in an out-of-bounds access error or unexpected result. * @kind problem * @id cpp/dangerous-use-convert-function diff --git a/cpp/ql/src/experimental/Security/CWE/CWE-190/DangerousUseOfTransformationAfterOperation.ql b/cpp/ql/src/experimental/Security/CWE/CWE-190/DangerousUseOfTransformationAfterOperation.ql index e848b97ef8f..47ece4a2aae 100644 --- a/cpp/ql/src/experimental/Security/CWE/CWE-190/DangerousUseOfTransformationAfterOperation.ql +++ b/cpp/ql/src/experimental/Security/CWE/CWE-190/DangerousUseOfTransformationAfterOperation.ql @@ -1,5 +1,5 @@ /** - * @name Dangerous use of transformation after operation. + * @name Dangerous use of transformation after operation * @description By using the transformation after the operation, you are doing a pointless and dangerous action. * @kind problem * @id cpp/dangerous-use-of-transformation-after-operation diff --git a/cpp/ql/src/experimental/Security/CWE/CWE-193/ConstantSizeArrayOffByOne.ql b/cpp/ql/src/experimental/Security/CWE/CWE-193/ConstantSizeArrayOffByOne.ql index 58f5dc2ade4..003c4f27f49 100644 --- a/cpp/ql/src/experimental/Security/CWE/CWE-193/ConstantSizeArrayOffByOne.ql +++ b/cpp/ql/src/experimental/Security/CWE/CWE-193/ConstantSizeArrayOffByOne.ql @@ -129,7 +129,7 @@ module PointerArithmeticToDerefFlow = DataFlow::Global; (const T &); ; Argument[*0]; ReturnValue; value; manual | +| 33 | Summary: ; ; false; pthread_create; ; ; Argument[@3]; Argument[2].Parameter[@0]; value; manual | +| 34 | Summary: ; ; false; ymlStepGenerated; ; ; Argument[0]; ReturnValue; taint; df-generated | +| 35 | Summary: ; ; false; ymlStepManual; ; ; Argument[0]; ReturnValue; taint; manual | +| 36 | Summary: ; ; false; ymlStepManual_with_body; ; ; Argument[0]; ReturnValue; taint; manual | +| 37 | Summary: boost::asio; ; false; buffer; ; ; Argument[*0]; ReturnValue; taint; manual | edges -| asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | provenance | MaD:36 | +| asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | provenance | MaD:37 | | asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:91:7:91:17 | recv_buffer | provenance | Src:MaD:17 | | asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:93:29:93:39 | *recv_buffer | provenance | Src:MaD:17 Sink:MaD:2 | | asio_streams.cpp:97:37:97:44 | call to source | asio_streams.cpp:98:7:98:14 | send_str | provenance | TaintFunction | @@ -45,10 +46,10 @@ edges | asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:101:7:101:17 | send_buffer | provenance | | | asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:103:29:103:39 | *send_buffer | provenance | Sink:MaD:2 | | asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | provenance | | -| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | MaD:36 | -| test.cpp:4:5:4:17 | [summary param] 0 in ymlStepManual | test.cpp:4:5:4:17 | [summary] to write: ReturnValue in ymlStepManual | provenance | MaD:34 | -| test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | test.cpp:5:5:5:20 | [summary] to write: ReturnValue in ymlStepGenerated | provenance | MaD:33 | -| test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | test.cpp:6:5:6:27 | [summary] to write: ReturnValue in ymlStepManual_with_body | provenance | MaD:35 | +| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | MaD:37 | +| test.cpp:4:5:4:17 | [summary param] 0 in ymlStepManual | test.cpp:4:5:4:17 | [summary] to write: ReturnValue in ymlStepManual | provenance | MaD:35 | +| test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | test.cpp:5:5:5:20 | [summary] to write: ReturnValue in ymlStepGenerated | provenance | MaD:34 | +| test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | test.cpp:6:5:6:27 | [summary] to write: ReturnValue in ymlStepManual_with_body | provenance | MaD:36 | | test.cpp:7:47:7:52 | value2 | test.cpp:7:64:7:69 | value2 | provenance | | | test.cpp:7:64:7:69 | value2 | test.cpp:7:5:7:30 | *ymlStepGenerated_with_body | provenance | | | test.cpp:10:10:10:18 | call to ymlSource | test.cpp:10:10:10:18 | call to ymlSource | provenance | Src:MaD:16 | @@ -60,15 +61,15 @@ edges | test.cpp:17:10:17:22 | call to ymlStepManual | test.cpp:17:10:17:22 | call to ymlStepManual | provenance | | | test.cpp:17:10:17:22 | call to ymlStepManual | test.cpp:18:10:18:10 | y | provenance | Sink:MaD:1 | | test.cpp:17:24:17:24 | x | test.cpp:4:5:4:17 | [summary param] 0 in ymlStepManual | provenance | | -| test.cpp:17:24:17:24 | x | test.cpp:17:10:17:22 | call to ymlStepManual | provenance | MaD:34 | +| test.cpp:17:24:17:24 | x | test.cpp:17:10:17:22 | call to ymlStepManual | provenance | MaD:35 | | test.cpp:21:10:21:25 | call to ymlStepGenerated | test.cpp:21:10:21:25 | call to ymlStepGenerated | provenance | | | test.cpp:21:10:21:25 | call to ymlStepGenerated | test.cpp:22:10:22:10 | z | provenance | Sink:MaD:1 | | test.cpp:21:27:21:27 | x | test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | provenance | | -| test.cpp:21:27:21:27 | x | test.cpp:21:10:21:25 | call to ymlStepGenerated | provenance | MaD:33 | +| test.cpp:21:27:21:27 | x | test.cpp:21:10:21:25 | call to ymlStepGenerated | provenance | MaD:34 | | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | provenance | | | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | test.cpp:26:10:26:11 | y2 | provenance | Sink:MaD:1 | | test.cpp:25:35:25:35 | x | test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | provenance | | -| test.cpp:25:35:25:35 | x | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | provenance | MaD:35 | +| test.cpp:25:35:25:35 | x | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | provenance | MaD:36 | | test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | provenance | | | test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | test.cpp:33:10:33:11 | z2 | provenance | Sink:MaD:1 | | test.cpp:32:41:32:41 | x | test.cpp:7:47:7:52 | value2 | provenance | | @@ -76,7 +77,7 @@ edges | test.cpp:46:30:46:32 | *arg [x] | test.cpp:47:12:47:19 | *arg [x] | provenance | | | test.cpp:47:12:47:19 | *arg [x] | test.cpp:48:13:48:13 | *s [x] | provenance | | | test.cpp:48:13:48:13 | *s [x] | test.cpp:48:16:48:16 | x | provenance | Sink:MaD:1 | -| test.cpp:52:5:52:18 | [summary param] *3 in pthread_create [x] | test.cpp:52:5:52:18 | [summary] to write: Argument[2].Parameter[*0] in pthread_create [x] | provenance | MaD:32 | +| test.cpp:52:5:52:18 | [summary param] *3 in pthread_create [x] | test.cpp:52:5:52:18 | [summary] to write: Argument[2].Parameter[*0] in pthread_create [x] | provenance | MaD:33 | | test.cpp:52:5:52:18 | [summary] to write: Argument[2].Parameter[*0] in pthread_create [x] | test.cpp:46:30:46:32 | *arg [x] | provenance | | | test.cpp:56:2:56:2 | *s [post update] [x] | test.cpp:59:55:59:64 | *& ... [x] | provenance | | | test.cpp:56:2:56:18 | ... = ... | test.cpp:56:2:56:2 | *s [post update] [x] | provenance | | @@ -103,6 +104,13 @@ edges | test.cpp:101:26:101:26 | x | test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | provenance | | | test.cpp:103:63:103:63 | x | test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | provenance | | | test.cpp:104:62:104:62 | x | test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | provenance | | +| test.cpp:111:3:111:25 | [summary param] *0 in callWithNonTypeTemplate | test.cpp:111:3:111:25 | [summary] to write: ReturnValue in callWithNonTypeTemplate | provenance | MaD:32 | +| test.cpp:114:10:114:18 | call to ymlSource | test.cpp:114:10:114:18 | call to ymlSource | provenance | Src:MaD:16 | +| test.cpp:114:10:114:18 | call to ymlSource | test.cpp:118:44:118:44 | *x | provenance | | +| test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | provenance | | +| test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | test.cpp:119:10:119:11 | y2 | provenance | Sink:MaD:1 | +| test.cpp:118:44:118:44 | *x | test.cpp:111:3:111:25 | [summary param] *0 in callWithNonTypeTemplate | provenance | | +| test.cpp:118:44:118:44 | *x | test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | provenance | MaD:32 | | windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | provenance | MaD:18 | | windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:22:15:22:29 | *call to GetCommandLineA | provenance | Src:MaD:3 | | windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:24:8:24:11 | * ... | provenance | | @@ -314,6 +322,14 @@ nodes | test.cpp:101:26:101:26 | x | semmle.label | x | | test.cpp:103:63:103:63 | x | semmle.label | x | | test.cpp:104:62:104:62 | x | semmle.label | x | +| test.cpp:111:3:111:25 | [summary param] *0 in callWithNonTypeTemplate | semmle.label | [summary param] *0 in callWithNonTypeTemplate | +| test.cpp:111:3:111:25 | [summary] to write: ReturnValue in callWithNonTypeTemplate | semmle.label | [summary] to write: ReturnValue in callWithNonTypeTemplate | +| test.cpp:114:10:114:18 | call to ymlSource | semmle.label | call to ymlSource | +| test.cpp:114:10:114:18 | call to ymlSource | semmle.label | call to ymlSource | +| test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | semmle.label | call to callWithNonTypeTemplate | +| test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | semmle.label | call to callWithNonTypeTemplate | +| test.cpp:118:44:118:44 | *x | semmle.label | *x | +| test.cpp:119:10:119:11 | y2 | semmle.label | y2 | | windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | semmle.label | [summary param] *0 in CommandLineToArgvA | | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | semmle.label | [summary] to write: ReturnValue[**] in CommandLineToArgvA | | windows.cpp:22:15:22:29 | *call to GetCommandLineA | semmle.label | *call to GetCommandLineA | @@ -472,6 +488,7 @@ subpaths | test.cpp:21:27:21:27 | x | test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | test.cpp:5:5:5:20 | [summary] to write: ReturnValue in ymlStepGenerated | test.cpp:21:10:21:25 | call to ymlStepGenerated | | test.cpp:25:35:25:35 | x | test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | test.cpp:6:5:6:27 | [summary] to write: ReturnValue in ymlStepManual_with_body | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | | test.cpp:32:41:32:41 | x | test.cpp:7:47:7:52 | value2 | test.cpp:7:5:7:30 | *ymlStepGenerated_with_body | test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | +| test.cpp:118:44:118:44 | *x | test.cpp:111:3:111:25 | [summary param] *0 in callWithNonTypeTemplate | test.cpp:111:3:111:25 | [summary] to write: ReturnValue in callWithNonTypeTemplate | test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | | windows.cpp:27:36:27:38 | *cmd | windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | | windows.cpp:537:40:537:41 | *& ... | windows.cpp:473:17:473:37 | [summary param] *1 in RtlCopyVolatileMemory | windows.cpp:473:17:473:37 | [summary param] *0 in RtlCopyVolatileMemory [Return] | windows.cpp:537:27:537:37 | RtlCopyVolatileMemory output argument | | windows.cpp:542:38:542:39 | *& ... | windows.cpp:479:17:479:35 | [summary param] *1 in RtlCopyDeviceMemory | windows.cpp:479:17:479:35 | [summary param] *0 in RtlCopyDeviceMemory [Return] | windows.cpp:542:25:542:35 | RtlCopyDeviceMemory output argument | diff --git a/cpp/ql/test/library-tests/dataflow/external-models/flow.ext.yml b/cpp/ql/test/library-tests/dataflow/external-models/flow.ext.yml index f0df3e749e6..8e200aabfbd 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/flow.ext.yml +++ b/cpp/ql/test/library-tests/dataflow/external-models/flow.ext.yml @@ -17,4 +17,5 @@ extensions: - ["", "", False, "ymlStepGenerated", "", "", "Argument[0]", "ReturnValue", "taint", "df-generated"] - ["", "", False, "ymlStepManual_with_body", "", "", "Argument[0]", "ReturnValue", "taint", "manual"] - ["", "", False, "ymlStepGenerated_with_body", "", "", "Argument[0]", "ReturnValue", "taint", "df-generated"] - - ["", "", False, "callWithArgument", "", "", "Argument[1]", "Argument[0].Parameter[0]", "value", "manual"] \ No newline at end of file + - ["", "", False, "callWithArgument", "", "", "Argument[1]", "Argument[0].Parameter[0]", "value", "manual"] + - ["", "", False, "callWithNonTypeTemplate", "(const T &)", "", "Argument[*0]", "ReturnValue", "value", "manual"] \ No newline at end of file diff --git a/cpp/ql/test/library-tests/dataflow/external-models/sinks.expected b/cpp/ql/test/library-tests/dataflow/external-models/sinks.expected index 0cc01c8165e..e28349b7159 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/sinks.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/sinks.expected @@ -13,3 +13,5 @@ | test.cpp:75:11:75:11 | y | test-sink | | test.cpp:83:11:83:11 | y | test-sink | | test.cpp:89:11:89:11 | y | test-sink | +| test.cpp:116:10:116:11 | y1 | test-sink | +| test.cpp:119:10:119:11 | y2 | test-sink | diff --git a/cpp/ql/test/library-tests/dataflow/external-models/sources.expected b/cpp/ql/test/library-tests/dataflow/external-models/sources.expected index 401fffdbd59..cb7e06b801d 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/sources.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/sources.expected @@ -2,6 +2,7 @@ | test.cpp:10:10:10:18 | call to ymlSource | local | | test.cpp:56:8:56:16 | call to ymlSource | local | | test.cpp:94:10:94:18 | call to ymlSource | local | +| test.cpp:114:10:114:18 | call to ymlSource | local | | windows.cpp:22:15:22:29 | *call to GetCommandLineA | local | | windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | local | | windows.cpp:39:36:39:38 | GetEnvironmentVariableA output argument | local | diff --git a/cpp/ql/test/library-tests/dataflow/external-models/test.cpp b/cpp/ql/test/library-tests/dataflow/external-models/test.cpp index f357b934b2f..af11ff958f5 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/test.cpp +++ b/cpp/ql/test/library-tests/dataflow/external-models/test.cpp @@ -102,4 +102,19 @@ void test_callWithArgument() { } callWithArgument(StructWithOperatorCall_has_constructor_2(), x); callWithArgument(StructWithOperatorCall_no_constructor_2(), x); -} \ No newline at end of file +} + +template +T callWithNonTypeTemplate(const T&); + +template +T callWithNonTypeTemplate(const T&); + +void test_callWithNonTypeTemplate() { + int x = ymlSource(); + int y1 = callWithNonTypeTemplate<10, int>(x); + ymlSink(y1); // $ MISSING: ir + + int y2 = callWithNonTypeTemplate(x); + ymlSink(y2); // $ ir +} diff --git a/cpp/ql/test/library-tests/dataflow/fields/dataflow-consistency.expected b/cpp/ql/test/library-tests/dataflow/fields/dataflow-consistency.expected index 4021dbc492a..1b0b906af52 100644 --- a/cpp/ql/test/library-tests/dataflow/fields/dataflow-consistency.expected +++ b/cpp/ql/test/library-tests/dataflow/fields/dataflow-consistency.expected @@ -142,6 +142,7 @@ postWithInFlow | simple.cpp:92:7:92:7 | i [post update] | PostUpdateNode should not be the target of local flow. | | simple.cpp:118:7:118:7 | i [post update] | PostUpdateNode should not be the target of local flow. | | simple.cpp:124:5:124:6 | * ... [post update] | PostUpdateNode should not be the target of local flow. | +| simple.cpp:167:9:167:9 | x [post update] | PostUpdateNode should not be the target of local flow. | viableImplInCallContextTooLarge uniqueParameterNodeAtPosition uniqueParameterNodePosition diff --git a/cpp/ql/test/library-tests/dataflow/fields/partial-definition-diff.expected b/cpp/ql/test/library-tests/dataflow/fields/partial-definition-diff.expected index 8137e350d85..6cce6ac4f89 100644 --- a/cpp/ql/test/library-tests/dataflow/fields/partial-definition-diff.expected +++ b/cpp/ql/test/library-tests/dataflow/fields/partial-definition-diff.expected @@ -308,3 +308,5 @@ WARNING: module 'DataFlow' has been deprecated and may be removed in future (par | simple.cpp:124:5:124:6 | * ... | AST only | | simple.cpp:131:14:131:14 | a | IR only | | simple.cpp:136:10:136:10 | a | IR only | +| simple.cpp:167:9:167:9 | x | AST only | +| simple.cpp:168:8:168:12 | u_int | IR only | diff --git a/cpp/ql/test/library-tests/dataflow/fields/partial-definition-ir.expected b/cpp/ql/test/library-tests/dataflow/fields/partial-definition-ir.expected index 8df575d8e16..b09f949271d 100644 --- a/cpp/ql/test/library-tests/dataflow/fields/partial-definition-ir.expected +++ b/cpp/ql/test/library-tests/dataflow/fields/partial-definition-ir.expected @@ -670,6 +670,8 @@ | simple.cpp:131:14:131:14 | a | | simple.cpp:135:20:135:20 | q | | simple.cpp:136:10:136:10 | a | +| simple.cpp:167:3:167:7 | u_int | +| simple.cpp:168:8:168:12 | u_int | | struct_init.c:15:8:15:9 | ab | | struct_init.c:15:12:15:12 | a | | struct_init.c:16:8:16:9 | ab | diff --git a/cpp/ql/test/library-tests/dataflow/fields/partial-definition.expected b/cpp/ql/test/library-tests/dataflow/fields/partial-definition.expected index 397e069c166..127cbadd971 100644 --- a/cpp/ql/test/library-tests/dataflow/fields/partial-definition.expected +++ b/cpp/ql/test/library-tests/dataflow/fields/partial-definition.expected @@ -597,6 +597,8 @@ WARNING: module 'DataFlow' has been deprecated and may be removed in future (par | simple.cpp:118:7:118:7 | i | | simple.cpp:124:5:124:6 | * ... | | simple.cpp:135:20:135:20 | q | +| simple.cpp:167:3:167:7 | u_int | +| simple.cpp:167:9:167:9 | x | | struct_init.c:15:8:15:9 | ab | | struct_init.c:15:12:15:12 | a | | struct_init.c:16:8:16:9 | ab | diff --git a/cpp/ql/test/library-tests/dataflow/fields/simple.cpp b/cpp/ql/test/library-tests/dataflow/fields/simple.cpp index 3b8d882bc2b..d220b416e1a 100644 --- a/cpp/ql/test/library-tests/dataflow/fields/simple.cpp +++ b/cpp/ql/test/library-tests/dataflow/fields/simple.cpp @@ -136,4 +136,36 @@ void alias_with_fields(bool b) { sink(a.i); // $ MISSING: ast,ir } +template +union U_with_two_instantiations_of_different_size { + int x; + T y; +}; + +struct LargeStruct { + int data[64]; +}; + +void test_union_with_two_instantiations_of_different_sizes() { + // A union's fields is partitioned into "chunks" for field-flow in order to + // improve performance (so that a write to a field of a union does not flow + // to too many reads that don't happen at runtime). The partitioning is based + // the size of the types in the union. So a write to a field of size k only + // flows to a read of size k. + // Since field-flow is based on uninstantiated types a field can have + // multiple sizes if the union is instantiated with types of + // different sizes. So to compute the partition we pick the maximum size. + // Because of this there are `Content`s corresponding to the union + // `U_with_two_instantiations_of_different_size`: The one for size + // `sizeof(int)`, and the one for size `sizeof(LargeStruct)` (because + // `LargeStruct` is larger than `int`). So the write to `x` writes to the + // `Content` for size `sizeof(int)`, and the read of `y` reads from the + // `Content` for size `sizeof(LargeStruct)`. + U_with_two_instantiations_of_different_size u_int; + U_with_two_instantiations_of_different_size u_very_large; + + u_int.x = user_input(); + sink(u_int.y); // $ MISSING: ir +} + } // namespace Simple \ No newline at end of file diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/test_mad-signatures.expected b/cpp/ql/test/library-tests/dataflow/taint-tests/test_mad-signatures.expected index 2409e711e6d..e0002aa9c03 100644 --- a/cpp/ql/test/library-tests/dataflow/taint-tests/test_mad-signatures.expected +++ b/cpp/ql/test/library-tests/dataflow/taint-tests/test_mad-signatures.expected @@ -26843,6 +26843,24 @@ getParameterTypeName | atl.cpp:71:5:71:17 | _U_STRINGorID | 0 | unsigned int | | atl.cpp:72:5:72:17 | _U_STRINGorID | 0 | LPCTSTR | | atl.cpp:72:5:72:17 | _U_STRINGorID | 0 | const char * | +| atl.cpp:96:5:96:10 | CA2AEX | 0 | LPCSTR | +| atl.cpp:96:5:96:10 | CA2AEX | 0 | const char * | +| atl.cpp:96:5:96:10 | CA2AEX | 1 | UINT | +| atl.cpp:96:5:96:10 | CA2AEX | 1 | unsigned int | +| atl.cpp:97:5:97:10 | CA2AEX | 0 | LPCSTR | +| atl.cpp:97:5:97:10 | CA2AEX | 0 | const char * | +| atl.cpp:124:5:124:11 | CA2CAEX | 0 | LPCSTR | +| atl.cpp:124:5:124:11 | CA2CAEX | 0 | const char * | +| atl.cpp:124:5:124:11 | CA2CAEX | 1 | UINT | +| atl.cpp:124:5:124:11 | CA2CAEX | 1 | unsigned int | +| atl.cpp:125:5:125:11 | CA2CAEX | 0 | LPCSTR | +| atl.cpp:125:5:125:11 | CA2CAEX | 0 | const char * | +| atl.cpp:149:5:149:10 | CA2WEX | 0 | LPCSTR | +| atl.cpp:149:5:149:10 | CA2WEX | 0 | const char * | +| atl.cpp:149:5:149:10 | CA2WEX | 1 | UINT | +| atl.cpp:149:5:149:10 | CA2WEX | 1 | unsigned int | +| atl.cpp:150:5:150:10 | CA2WEX | 0 | LPCSTR | +| atl.cpp:150:5:150:10 | CA2WEX | 0 | const char * | | atl.cpp:196:12:196:14 | Add | 0 | INARGTYPclass:0 | | atl.cpp:198:12:198:17 | Append | 0 | const CAtlArray & | | atl.cpp:199:10:199:13 | Copy | 0 | const CAtlArray & | @@ -27083,6 +27101,10 @@ getParameterTypeName | atl.cpp:940:10:940:18 | SetString | 0 | PCXSTR | | atl.cpp:940:10:940:18 | SetString | 0 | const class:0 * | | atl.cpp:942:11:942:20 | operator[] | 0 | int | +| atl.cpp:1018:10:1018:10 | operator= | 0 | MakeOther && | +| atl.cpp:1018:10:1018:10 | operator= | 0 | const MakeOther & | +| atl.cpp:1023:10:1023:10 | operator= | 0 | MakeOther && | +| atl.cpp:1023:10:1023:10 | operator= | 0 | const MakeOther & | | atl.cpp:1036:5:1036:12 | CStringT | 0 | const VARIANT & | | atl.cpp:1036:5:1036:12 | CStringT | 0 | const tagVARIANT & | | atl.cpp:1037:5:1037:12 | CStringT | 0 | const VARIANT & | @@ -27286,6 +27308,8 @@ getParameterTypeName | standalone_iterators.cpp:20:7:20:7 | operator= | 0 | const int_iterator_by_trait & | | standalone_iterators.cpp:20:7:20:7 | operator= | 0 | int_iterator_by_trait && | | standalone_iterators.cpp:23:27:23:36 | operator++ | 0 | int | +| standalone_iterators.cpp:28:13:28:13 | operator= | 0 | const iterator_traits & | +| standalone_iterators.cpp:28:13:28:13 | operator= | 0 | iterator_traits && | | standalone_iterators.cpp:36:7:36:7 | operator= | 0 | const non_iterator & | | standalone_iterators.cpp:36:7:36:7 | operator= | 0 | non_iterator && | | standalone_iterators.cpp:39:18:39:27 | operator++ | 0 | int | @@ -27297,6 +27321,8 @@ getParameterTypeName | standalone_iterators.cpp:66:30:66:39 | operator++ | 0 | int | | standalone_iterators.cpp:68:30:68:39 | operator-- | 0 | int | | standalone_iterators.cpp:70:31:70:39 | operator= | 0 | int | +| standalone_iterators.cpp:74:13:74:13 | operator= | 0 | const iterator_traits & | +| standalone_iterators.cpp:74:13:74:13 | operator= | 0 | iterator_traits && | | standalone_iterators.cpp:82:7:82:7 | container | 0 | const container & | | standalone_iterators.cpp:82:7:82:7 | container | 0 | container && | | standalone_iterators.cpp:82:7:82:7 | operator= | 0 | const container & | diff --git a/cpp/ql/test/library-tests/variables/variables/variable.expected b/cpp/ql/test/library-tests/variables/variables/variable.expected index 1ef5902a9a8..c6ada1f3615 100644 --- a/cpp/ql/test/library-tests/variables/variables/variable.expected +++ b/cpp/ql/test/library-tests/variables/variables/variable.expected @@ -2,10 +2,10 @@ | file://:0:0:0:0 | (unnamed parameter 0) | file://:0:0:0:0 | address && | SemanticStackVariable | | | | file://:0:0:0:0 | (unnamed parameter 0) | file://:0:0:0:0 | const __va_list_tag & | SemanticStackVariable | | | | file://:0:0:0:0 | (unnamed parameter 0) | file://:0:0:0:0 | const address & | SemanticStackVariable | | | -| file://:0:0:0:0 | fp_offset | file://:0:0:0:0 | unsigned int | Field | | | -| file://:0:0:0:0 | gp_offset | file://:0:0:0:0 | unsigned int | Field | | | -| file://:0:0:0:0 | overflow_arg_area | file://:0:0:0:0 | void * | Field | | | -| file://:0:0:0:0 | reg_save_area | file://:0:0:0:0 | void * | Field | | | +| file://:0:0:0:0 | fp_offset | file://:0:0:0:0 | unsigned int | NonLocalCanonicalField | | | +| file://:0:0:0:0 | gp_offset | file://:0:0:0:0 | unsigned int | NonLocalCanonicalField | | | +| file://:0:0:0:0 | overflow_arg_area | file://:0:0:0:0 | void * | NonLocalCanonicalField | | | +| file://:0:0:0:0 | reg_save_area | file://:0:0:0:0 | void * | NonLocalCanonicalField | | | | variables.cpp:1:12:1:12 | i | file://:0:0:0:0 | int | GlobalLikeVariable, GlobalVariable, StaticStorageDurationVariable | | | | variables.cpp:2:12:2:12 | i | file://:0:0:0:0 | int | GlobalLikeVariable, GlobalVariable, StaticStorageDurationVariable | | | | variables.cpp:3:12:3:12 | i | file://:0:0:0:0 | int | GlobalLikeVariable, GlobalVariable, StaticStorageDurationVariable | | | @@ -33,10 +33,10 @@ | variables.cpp:37:6:37:8 | ap3 | file://:0:0:0:0 | int * | GlobalLikeVariable, GlobalVariable, StaticStorageDurationVariable | | | | variables.cpp:41:7:41:11 | local | file://:0:0:0:0 | char[] | LocalVariable, SemanticStackVariable | | | | variables.cpp:43:14:43:18 | local | file://:0:0:0:0 | int | GlobalLikeVariable, StaticLocalVariable | | static | -| variables.cpp:48:9:48:12 | name | file://:0:0:0:0 | char * | Field | | | -| variables.cpp:49:12:49:17 | number | file://:0:0:0:0 | long | Field | | | -| variables.cpp:50:9:50:14 | street | file://:0:0:0:0 | char * | Field | | | -| variables.cpp:51:9:51:12 | town | file://:0:0:0:0 | char * | Field | | | +| variables.cpp:48:9:48:12 | name | file://:0:0:0:0 | char * | NonLocalCanonicalField | | | +| variables.cpp:49:12:49:17 | number | file://:0:0:0:0 | long | NonLocalCanonicalField | | | +| variables.cpp:50:9:50:14 | street | file://:0:0:0:0 | char * | NonLocalCanonicalField | | | +| variables.cpp:51:9:51:12 | town | file://:0:0:0:0 | char * | NonLocalCanonicalField | | | | variables.cpp:52:16:52:22 | country | file://:0:0:0:0 | char * | MemberVariable, StaticStorageDurationVariable | | static | | variables.cpp:56:14:56:29 | externInFunction | file://:0:0:0:0 | int | GlobalLikeVariable, GlobalVariable, StaticStorageDurationVariable | | | | variables.cpp:60:10:60:17 | __func__ | file://:0:0:0:0 | const char[9] | GlobalLikeVariable, StaticInitializedStaticLocalVariable | | static | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-119/semmle/tests/OverflowBuffer.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-119/semmle/tests/OverflowBuffer.expected index ac0e8d3a25a..f9f887b6409 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-119/semmle/tests/OverflowBuffer.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-119/semmle/tests/OverflowBuffer.expected @@ -1,6 +1,10 @@ | overflowdestination.cpp:46:2:46:7 | call to memcpy | This 'memcpy' operation accesses 128 bytes but the $@ is only 64 bytes. | overflowdestination.cpp:40:7:40:10 | dest | destination buffer | | tests.cpp:23:2:23:7 | call to memcpy | This 'memcpy' operation accesses 20 bytes but the $@ is only 10 bytes. | tests.cpp:19:7:19:17 | smallbuffer | source buffer | | tests.cpp:25:2:25:7 | call to memcpy | This 'memcpy' operation accesses 20 bytes but the $@ is only 10 bytes. | tests.cpp:19:7:19:17 | smallbuffer | destination buffer | +| tests.cpp:34:2:34:7 | call to memcpy | This 'memcpy' operation accesses 20 bytes but the $@ is only 10 bytes. | tests.cpp:30:30:30:35 | call to malloc | source buffer | +| tests.cpp:36:2:36:7 | call to memcpy | This 'memcpy' operation accesses 20 bytes but the $@ is only 10 bytes. | tests.cpp:30:30:30:35 | call to malloc | destination buffer | +| tests.cpp:50:2:50:7 | call to memcpy | This 'memcpy' operation accesses 20 bytes but the $@ is only 10 bytes. | tests.cpp:46:16:46:27 | new[] | source buffer | +| tests.cpp:52:2:52:7 | call to memcpy | This 'memcpy' operation accesses 20 bytes but the $@ is only 10 bytes. | tests.cpp:46:16:46:27 | new[] | destination buffer | | tests.cpp:172:23:172:31 | access to array | This array indexing operation accesses a negative index -1 on the $@. | tests.cpp:170:17:170:41 | {...} | array | | tests.cpp:176:23:176:30 | access to array | This array indexing operation accesses byte offset 31 but the $@ is only 24 bytes. | tests.cpp:170:17:170:41 | {...} | array | | tests.cpp:222:3:222:8 | call to memset | This 'memset' operation accesses 33 bytes but the $@ is only 32 bytes. | tests.cpp:214:8:214:14 | buffer1 | destination buffer | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-119/semmle/tests/tests.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-119/semmle/tests/tests.cpp index 555c8e25fb5..603d868258a 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-119/semmle/tests/tests.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-119/semmle/tests/tests.cpp @@ -30,10 +30,10 @@ void test2() char *smallbuffer = (char *)malloc(sizeof(char) * 10); char *bigbuffer = (char *)malloc(sizeof(char) * 20); - memcpy(bigbuffer, smallbuffer, sizeof(smallbuffer)); // GOOD - memcpy(bigbuffer, smallbuffer, sizeof(bigbuffer)); // BAD: over-read [NOT DETECTED] - memcpy(smallbuffer, bigbuffer, sizeof(smallbuffer)); // GOOD - memcpy(smallbuffer, bigbuffer, sizeof(bigbuffer)); // BAD: over-write [NOT DETECTED] + memcpy(bigbuffer, smallbuffer, sizeof(char) * 10); // GOOD + memcpy(bigbuffer, smallbuffer, sizeof(char) * 20); // BAD: over-read + memcpy(smallbuffer, bigbuffer, sizeof(char) * 10); // GOOD + memcpy(smallbuffer, bigbuffer, sizeof(char) * 20); // BAD: over-write free(bigbuffer); free(smallbuffer); @@ -46,10 +46,10 @@ void test3() smallbuffer = new char[10]; bigbuffer = new char[20]; - memcpy(bigbuffer, smallbuffer, sizeof(smallbuffer)); // GOOD - memcpy(bigbuffer, smallbuffer, sizeof(bigbuffer)); // BAD: over-read [NOT DETECTED] - memcpy(smallbuffer, bigbuffer, sizeof(smallbuffer)); // GOOD - memcpy(smallbuffer, bigbuffer, sizeof(bigbuffer)); // BAD: over-write [NOT DETECTED] + memcpy(bigbuffer, smallbuffer, sizeof(char[10])); // GOOD + memcpy(bigbuffer, smallbuffer, sizeof(char[20])); // BAD: over-read + memcpy(smallbuffer, bigbuffer, sizeof(char[10])); // GOOD + memcpy(smallbuffer, bigbuffer, sizeof(char[20])); // BAD: over-write delete [] bigbuffer; delete [] smallbuffer; diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp/DotNetRule.cs b/csharp/autobuilder/Semmle.Autobuild.CSharp/DotNetRule.cs index a396ab751ea..e07f7592887 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp/DotNetRule.cs +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp/DotNetRule.cs @@ -48,7 +48,7 @@ namespace Semmle.Autobuild.CSharp { // When a custom .NET CLI has been installed, `dotnet --info` has already been executed // to verify the installation. - var ret = dotNetPath is null ? GetInfoCommand(builder.Actions, dotNetPath, environment) : BuildScript.Success; + var ret = dotNetPath is null ? DotNet.InfoScript(builder.Actions, DotNetCommand(builder.Actions, dotNetPath), environment, builder.Logger) : BuildScript.Success; foreach (var projectOrSolution in builder.ProjectsOrSolutionsToBuild) { var cleanCommand = GetCleanCommand(builder.Actions, dotNetPath, environment); @@ -111,14 +111,6 @@ namespace Semmle.Autobuild.CSharp private static string DotNetCommand(IBuildActions actions, string? dotNetPath) => dotNetPath is not null ? actions.PathCombine(dotNetPath, "dotnet") : "dotnet"; - private static BuildScript GetInfoCommand(IBuildActions actions, string? dotNetPath, IDictionary? environment) - { - var info = new CommandBuilder(actions, null, environment). - RunCommand(DotNetCommand(actions, dotNetPath)). - Argument("--info"); - return info.Script; - } - private static CommandBuilder GetCleanCommand(IBuildActions actions, string? dotNetPath, IDictionary? environment) { var clean = new CommandBuilder(actions, null, environment). diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/BUILD.bazel b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/BUILD.bazel index 96ecccc31aa..0dc2a366125 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/BUILD.bazel +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/BUILD.bazel @@ -16,5 +16,6 @@ codeql_csharp_library( "//csharp/extractor/Semmle.Extraction.CSharp", "//csharp/extractor/Semmle.Util", "@paket.main//newtonsoft.json", + "@paket.main//nuget.versioning", ], ) diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs index 040e89dcec1..ad69d0c85c3 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs @@ -283,7 +283,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching { foreach (var fp in frameworkPaths) { - dotnetFrameworkVersionVariantCount += NugetPackageRestorer.GetOrderedPackageVersionSubDirectories(fp.Path!).Length; + dotnetFrameworkVersionVariantCount += nugetPackageRestorer.GetOrderedPackageVersionSubDirectories(fp.Path!).Length; } var folder = nugetPackageRestorer.GetNewestNugetPackageVersionFolder(frameworkPath.Path, ".NET Framework"); diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs index 7bc79238415..c60127c6835 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; using System.Linq; +using System.Threading; using Newtonsoft.Json.Linq; using Semmle.Util; @@ -36,12 +37,29 @@ namespace Semmle.Extraction.CSharp.DependencyFetching public static IDotNet Make(ILogger logger, string? dotNetPath, TemporaryDirectory tempWorkingDirectory, DependabotProxy? dependabotProxy) => new DotNet(logger, dotNetPath, tempWorkingDirectory, dependabotProxy); + private static void HandleRetryExitCode143(string dotnet, int attempt, ILogger logger) + { + logger.LogWarning($"Running '{dotnet} --info' failed with exit code 143. Retrying..."); + var sleep = Math.Pow(2, attempt) * 1000; + Thread.Sleep((int)sleep); + } + private void Info() { - var res = dotnetCliInvoker.RunCommand("--info", silent: false); - if (!res) + // Allow up to four attempts (with up to three retries) to run `dotnet --info`, to mitigate transient issues + for (int attempt = 0; attempt < 4; attempt++) { - throw new Exception($"{dotnetCliInvoker.Exec} --info failed."); + var exitCode = dotnetCliInvoker.RunCommandExitCode("--info", silent: false); + switch (exitCode) + { + case 0: + return; + case 143 when attempt < 3: + HandleRetryExitCode143(dotnetCliInvoker.Exec, attempt, logger); + continue; + default: + throw new Exception($"{dotnetCliInvoker.Exec} --info failed with exit code {exitCode}."); + } } } @@ -59,7 +77,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching Directory.CreateDirectory(path); } - args += $" /p:TargetFrameworkRootPath=\"{path}\" /p:NetCoreTargetingPackRoot=\"{path}\""; + args += $" /p:TargetFrameworkRootPath=\"{path}\" /p:NetCoreTargetingPackRoot=\"{path}\" /p:AllowMissingPrunePackageData=true"; } if (restoreSettings.PathToNugetConfig != null) @@ -193,6 +211,35 @@ namespace Semmle.Extraction.CSharp.DependencyFetching return BuildScript.Failure; } + /// + /// Returns a script for running `dotnet --info`, with retries on exit code 143. + /// + public static BuildScript InfoScript(IBuildActions actions, string dotnet, IDictionary? environment, ILogger logger) + { + var info = new CommandBuilder(actions, null, environment). + RunCommand(dotnet). + Argument("--info"); + var script = info.Script; + for (var attempt = 0; attempt < 4; attempt++) + { + var attemptCopy = attempt; // Capture in local variable + script = BuildScript.Bind(script, ret => + { + switch (ret) + { + case 0: + return BuildScript.Success; + case 143 when attemptCopy < 3: + HandleRetryExitCode143(dotnet, attemptCopy, logger); + return info.Script; + default: + return BuildScript.Failure; + } + }); + } + return script; + } + /// /// Returns a script for downloading specific .NET SDK versions, if the /// versions are not already installed. @@ -292,9 +339,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching }; } - var dotnetInfo = new CommandBuilder(actions, environment: MinimalEnvironment). - RunCommand(actions.PathCombine(path, "dotnet")). - Argument("--info").Script; + var dotnetInfo = InfoScript(actions, actions.PathCombine(path, "dotnet"), MinimalEnvironment.ToDictionary(), logger); Func getInstallAndVerify = version => // run `dotnet --info` after install, to check that it executes successfully diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNetCliInvoker.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNetCliInvoker.cs index 45f69a1fdfc..4c4e789973c 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNetCliInvoker.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNetCliInvoker.cs @@ -57,15 +57,21 @@ namespace Semmle.Extraction.CSharp.DependencyFetching return startInfo; } - private bool RunCommandAux(string args, string? workingDirectory, out IList output, bool silent) + private int RunCommandExitCodeAux(string args, string? workingDirectory, out IList output, out string dirLog, bool silent) { - var dirLog = string.IsNullOrWhiteSpace(workingDirectory) ? "" : $" in {workingDirectory}"; + dirLog = string.IsNullOrWhiteSpace(workingDirectory) ? "" : $" in {workingDirectory}"; var pi = MakeDotnetStartInfo(args, workingDirectory); var threadId = Environment.CurrentManagedThreadId; void onOut(string s) => logger.Log(silent ? Severity.Debug : Severity.Info, s, threadId); void onError(string s) => logger.LogError(s, threadId); logger.LogInfo($"Running '{Exec} {args}'{dirLog}"); var exitCode = pi.ReadOutput(out output, onOut, onError); + return exitCode; + } + + private bool RunCommandAux(string args, string? workingDirectory, out IList output, bool silent) + { + var exitCode = RunCommandExitCodeAux(args, workingDirectory, out output, out var dirLog, silent); if (exitCode != 0) { logger.LogError($"Command '{Exec} {args}'{dirLog} failed with exit code {exitCode}"); @@ -77,6 +83,9 @@ namespace Semmle.Extraction.CSharp.DependencyFetching public bool RunCommand(string args, bool silent = true) => RunCommandAux(args, null, out _, silent); + public int RunCommandExitCode(string args, bool silent = true) => + RunCommandExitCodeAux(args, null, out _, out _, silent); + public bool RunCommand(string args, out IList output, bool silent = true) => RunCommandAux(args, null, out output, silent); diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNetVersion.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNetVersion.cs index b4273d02b77..31a4ac2292d 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNetVersion.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNetVersion.cs @@ -1,24 +1,16 @@ using System; using System.IO; +using NuGet.Versioning; namespace Semmle.Extraction.CSharp.DependencyFetching { internal record DotNetVersion : IComparable { private readonly string dir; - private readonly Version version; - private readonly Version? preReleaseVersion; - private readonly string? preReleaseVersionType; - private bool IsPreRelease => preReleaseVersionType is not null && preReleaseVersion is not null; + private readonly NuGetVersion version; - private string FullVersion - { - get - { - var preRelease = IsPreRelease ? $"-{preReleaseVersionType}.{preReleaseVersion}" : ""; - return this.version + preRelease; - } - } + private string FullVersion => + version.ToString(); public string FullPath => Path.Combine(dir, FullVersion); @@ -48,37 +40,14 @@ namespace Semmle.Extraction.CSharp.DependencyFetching } - public DotNetVersion(string dir, string version, string preReleaseVersionType, string preReleaseVersion) + public DotNetVersion(string dir, NuGetVersion version) { this.dir = dir; - this.version = Version.Parse(version); - if (!string.IsNullOrEmpty(preReleaseVersion) && !string.IsNullOrEmpty(preReleaseVersionType)) - { - this.preReleaseVersionType = preReleaseVersionType; - this.preReleaseVersion = Version.Parse(preReleaseVersion); - } + this.version = version; } - public int CompareTo(DotNetVersion? other) - { - var c = version.CompareTo(other?.version); - if (c == 0 && IsPreRelease) - { - if (!other!.IsPreRelease) - { - return -1; - } - - // Both are pre-release like runtime versions. - // The pre-release version types are sorted alphabetically (e.g. alpha, beta, preview, rc) - // and the pre-release version types are more important that the pre-release version numbers. - return preReleaseVersionType != other!.preReleaseVersionType - ? preReleaseVersionType!.CompareTo(other!.preReleaseVersionType) - : preReleaseVersion!.CompareTo(other!.preReleaseVersion); - } - - return c; - } + public int CompareTo(DotNetVersion? other) => + version.CompareTo(other?.version); public override string ToString() => FullPath; } diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/IDotNetCliInvoker.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/IDotNetCliInvoker.cs index 3a599afe96d..61d0ea4260d 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/IDotNetCliInvoker.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/IDotNetCliInvoker.cs @@ -30,6 +30,12 @@ namespace Semmle.Extraction.CSharp.DependencyFetching /// bool RunCommand(string args, bool silent = true); + /// + /// Execute `dotnet ` and return the exit code. + /// If `silent` is true the output of the command is logged as `debug` otherwise as `info`. + /// + int RunCommandExitCode(string args, bool silent = true); + /// /// Execute `dotnet ` and return true if the command succeeded, otherwise false. /// The output of the command is returned in `output`. diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/NugetPackageRestorer.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/NugetPackageRestorer.cs index e2e548a46a9..29cec8a0e33 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/NugetPackageRestorer.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/NugetPackageRestorer.cs @@ -10,6 +10,7 @@ using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; +using NuGet.Versioning; using Semmle.Util; using Semmle.Util.Logging; @@ -87,11 +88,22 @@ namespace Semmle.Extraction.CSharp.DependencyFetching return selectedFrameworkFolder; } - public static DirectoryInfo[] GetOrderedPackageVersionSubDirectories(string packagePath) + public DirectoryInfo[] GetOrderedPackageVersionSubDirectories(string packagePath) { + // Only consider directories with valid NuGet version names. return new DirectoryInfo(packagePath) .EnumerateDirectories("*", new EnumerationOptions { MatchCasing = MatchCasing.CaseInsensitive, RecurseSubdirectories = false }) - .OrderByDescending(d => d.Name) // TODO: Improve sorting to handle pre-release versions. + .SelectMany(d => + { + if (NuGetVersion.TryParse(d.Name, out var version)) + { + return new[] { new { Directory = d, NuGetVersion = version } }; + } + logger.LogInfo($"Ignoring package directory '{d.FullName}' as it does not have a valid NuGet version name."); + return []; + }) + .OrderByDescending(dw => dw.NuGetVersion) + .Select(dw => dw.Directory) .ToArray(); } diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Runtime.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Runtime.cs index a489ec504c4..64c835d27fc 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Runtime.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Runtime.cs @@ -4,6 +4,7 @@ using System.IO; using System.Linq; using System.Runtime.InteropServices; using System.Text.RegularExpressions; +using NuGet.Versioning; using Semmle.Util; using Semmle.Util.Logging; @@ -27,7 +28,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching this.newestRuntimes = new(GetNewestRuntimes); } - [GeneratedRegex(@"^(\S+)\s(\d+\.\d+\.\d+)(-([a-z]+)\.(\d+\.\d+\.\d+))?\s\[(.+)\]$")] + [GeneratedRegex(@"^(\S+)\s(\d+\.\d+\.\d+(-[a-z]+\.\d+\.\d+\.\d+)?)\s\[(.+)\]$")] private static partial Regex RuntimeRegex(); /// @@ -44,9 +45,9 @@ namespace Semmle.Extraction.CSharp.DependencyFetching listed.ForEach(r => { var match = regex.Match(r); - if (match.Success) + if (match.Success && NuGetVersion.TryParse(match.Groups[2].Value, out var version)) { - runtimes.AddOrUpdateToLatest(match.Groups[1].Value, new DotNetVersion(match.Groups[6].Value, match.Groups[2].Value, match.Groups[4].Value, match.Groups[5].Value)); + runtimes.AddOrUpdateToLatest(match.Groups[1].Value, new DotNetVersion(match.Groups[4].Value, version)); } }); diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Sdk.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Sdk.cs index 848350bce98..c4d1ba9ac08 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Sdk.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Sdk.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Text.RegularExpressions; +using NuGet.Versioning; using Semmle.Util; using Semmle.Util.Logging; @@ -27,7 +28,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching cscPath = new Lazy(GetCscPath); } - [GeneratedRegex(@"^(\d+\.\d+\.\d+)(-([a-z]+)\.(\d+\.\d+\.\d+))?\s\[(.+)\]$")] + [GeneratedRegex(@"^(\d+\.\d+\.\d+(-[a-z]+\.\d+\.\d+\.\d+)?)\s\[(.+)\]$")] private static partial Regex SdkRegex(); private static HashSet ParseSdks(IList listed) @@ -37,9 +38,9 @@ namespace Semmle.Extraction.CSharp.DependencyFetching listed.ForEach(r => { var match = regex.Match(r); - if (match.Success) + if (match.Success && NuGetVersion.TryParse(match.Groups[1].Value, out var version)) { - sdks.Add(new DotNetVersion(match.Groups[5].Value, match.Groups[1].Value, match.Groups[3].Value, match.Groups[4].Value)); + sdks.Add(new DotNetVersion(match.Groups[3].Value, version)); } }); @@ -73,4 +74,4 @@ namespace Semmle.Extraction.CSharp.DependencyFetching return path; } } -} \ No newline at end of file +} diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/paket.references b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/paket.references index 99e44f5d76e..f4c783b379a 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/paket.references +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/paket.references @@ -1 +1,2 @@ Newtonsoft.Json +NuGet.Versioning diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Constructor.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Constructor.cs index 2c3b25b2e1c..14d9b548015 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Constructor.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Constructor.cs @@ -74,6 +74,7 @@ namespace Semmle.Extraction.CSharp.Entities { case SyntaxKind.BaseConstructorInitializer: initializerType = Symbol.ContainingType.BaseType!; + ExtractObjectInitCall(trapFile); break; case SyntaxKind.ThisConstructorInitializer: initializerType = Symbol.ContainingType; @@ -90,10 +91,12 @@ namespace Semmle.Extraction.CSharp.Entities var primaryInfo = Context.GetSymbolInfo(primaryInitializer); var primarySymbol = primaryInfo.Symbol; + ExtractObjectInitCall(trapFile); ExtractSourceInitializer(trapFile, primarySymbol?.ContainingType, (IMethodSymbol?)primarySymbol, primaryInitializer.ArgumentList, primaryInitializer.GetLocation()); } else if (Symbol.MethodKind is MethodKind.Constructor) { + ExtractObjectInitCall(trapFile); var baseType = Symbol.ContainingType.BaseType; if (baseType is null) { @@ -127,6 +130,27 @@ namespace Semmle.Extraction.CSharp.Entities } } + private void ExtractObjectInitCall(TextWriter trapFile) + { + var target = ObjectInitMethod.Create(Context, ContainingType!); + + var type = Context.Compilation.GetSpecialType(SpecialType.System_Void); + + var info = new ExpressionInfo(Context, + AnnotatedTypeSymbol.CreateNotAnnotated(type), + Location, + Kinds.ExprKind.METHOD_INVOCATION, + this, + -2, + isCompilerGenerated: true, + null); + var obinitCall = new Expression(info); + + trapFile.expr_call(obinitCall, target); + + Expressions.This.CreateImplicit(Context, Symbol.ContainingType, Location, obinitCall, -1); + } + private void ExtractSourceInitializer(TextWriter trapFile, ITypeSymbol? type, IMethodSymbol? symbol, ArgumentListSyntax arguments, Microsoft.CodeAnalysis.Location location) { var initInfo = new ExpressionInfo(Context, diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/IMethodEntity.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/IMethodEntity.cs new file mode 100644 index 00000000000..278f2b18798 --- /dev/null +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/IMethodEntity.cs @@ -0,0 +1,9 @@ +namespace Semmle.Extraction.CSharp.Entities +{ + /// + /// Marker interface for method entities. + /// + public interface IMethodEntity : IEntity + { + } +} diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Method.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Method.cs index c1b0f1a65bc..c92c561f31b 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Method.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Method.cs @@ -9,7 +9,7 @@ using Semmle.Extraction.CSharp.Populators; namespace Semmle.Extraction.CSharp.Entities { - internal abstract class Method : CachedSymbol, IExpressionParentEntity, IStatementParentEntity + internal abstract class Method : CachedSymbol, IExpressionParentEntity, IStatementParentEntity, IMethodEntity { protected Method(Context cx, IMethodSymbol init) : base(cx, init) { } diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/ObjectInitMethod.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/ObjectInitMethod.cs new file mode 100644 index 00000000000..81c08ec35d5 --- /dev/null +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/ObjectInitMethod.cs @@ -0,0 +1,56 @@ +using System.IO; +using Microsoft.CodeAnalysis; + +namespace Semmle.Extraction.CSharp.Entities +{ + internal sealed class ObjectInitMethod : CachedEntity, IMethodEntity + { + private Type ContainingType { get; } + + private ObjectInitMethod(Context cx, Type containingType) + : base(cx) + { + this.ContainingType = containingType; + } + + private static readonly string Name = ""; + + public static ObjectInitMethod Create(Context cx, Type containingType) + { + return ObjectInitMethodFactory.Instance.CreateEntity(cx, (typeof(ObjectInitMethod), containingType), containingType); + } + + public override void Populate(TextWriter trapFile) + { + var returnType = Type.Create(Context, Context.Compilation.GetSpecialType(SpecialType.System_Void)); + + trapFile.methods(this, Name, ContainingType, returnType.TypeRef, this); + + trapFile.compiler_generated(this); + + trapFile.method_location(this, Context.CreateLocation(ReportingLocation)); + } + + public override void WriteId(EscapingTextWriter trapFile) + { + trapFile.WriteSubId(ContainingType); + trapFile.Write("."); + trapFile.Write(Name); + trapFile.Write(";method"); + } + + public override Microsoft.CodeAnalysis.Location? ReportingLocation => ContainingType.ReportingLocation; + + public override bool NeedsPopulation => true; + + public override TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour.NoLabel; + + private class ObjectInitMethodFactory : CachedEntityFactory + { + public static ObjectInitMethodFactory Instance { get; } = new ObjectInitMethodFactory(); + + public override ObjectInitMethod Create(Context cx, Type containingType) => + new ObjectInitMethod(cx, containingType); + } + } +} diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Trap/Tuples.cs b/csharp/extractor/Semmle.Extraction.CSharp/Trap/Tuples.cs index 8960b6adb67..b789eaa2e9c 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Trap/Tuples.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Trap/Tuples.cs @@ -175,7 +175,7 @@ namespace Semmle.Extraction.CSharp internal static void expr_argument_name(this TextWriter trapFile, Expression expr, string name) => trapFile.WriteTuple("expr_argument_name", expr, name); - internal static void expr_call(this TextWriter trapFile, Expression expr, Method target) => + internal static void expr_call(this TextWriter trapFile, Expression expr, IMethodEntity target) => trapFile.WriteTuple("expr_call", expr, target); internal static void expr_flowstate(this TextWriter trapFile, Expression expr, int flowState) => @@ -247,10 +247,10 @@ namespace Semmle.Extraction.CSharp internal static void localvars(this TextWriter trapFile, LocalVariable key, VariableKind kind, string name, int @var, Type type, Expression expr) => trapFile.WriteTuple("localvars", key, (int)kind, name, @var, type, expr); - internal static void method_location(this TextWriter trapFile, Method method, Location location) => + internal static void method_location(this TextWriter trapFile, IMethodEntity method, Location location) => trapFile.WriteTuple("method_location", method, location); - internal static void methods(this TextWriter trapFile, Method method, string name, Type declType, Type retType, Method originalDefinition) => + internal static void methods(this TextWriter trapFile, IMethodEntity method, string name, Type declType, Type retType, IMethodEntity originalDefinition) => trapFile.WriteTuple("methods", method, name, declType, retType, originalDefinition); internal static void modifiers(this TextWriter trapFile, Label entity, string modifier) => diff --git a/csharp/extractor/Semmle.Extraction.Tests/DotNet.cs b/csharp/extractor/Semmle.Extraction.Tests/DotNet.cs index 904ad04ce82..a2996497e00 100644 --- a/csharp/extractor/Semmle.Extraction.Tests/DotNet.cs +++ b/csharp/extractor/Semmle.Extraction.Tests/DotNet.cs @@ -12,6 +12,7 @@ namespace Semmle.Extraction.Tests private string lastArgs = ""; public string WorkingDirectory { get; private set; } = ""; public bool Success { get; set; } = true; + public int ExitCode { get; set; } = 0; public DotNetCliInvokerStub(IList output) { @@ -26,6 +27,12 @@ namespace Semmle.Extraction.Tests return Success; } + public int RunCommandExitCode(string args, bool silent) + { + lastArgs = args; + return ExitCode; + } + public bool RunCommand(string args, out IList output, bool silent) { lastArgs = args; @@ -83,7 +90,7 @@ namespace Semmle.Extraction.Tests public void TestDotnetInfoFailure() { // Setup - var dotnetCliInvoker = new DotNetCliInvokerStub(new List()) { Success = false }; + var dotnetCliInvoker = new DotNetCliInvokerStub(new List()) { ExitCode = 1 }; // Execute try @@ -94,7 +101,7 @@ namespace Semmle.Extraction.Tests // Verify catch (Exception e) { - Assert.Equal("dotnet --info failed.", e.Message); + Assert.Equal("dotnet --info failed with exit code 1.", e.Message); return; } Assert.Fail("Expected exception"); diff --git a/csharp/paket.dependencies b/csharp/paket.dependencies index cd2ac36422b..336a61e40e0 100644 --- a/csharp/paket.dependencies +++ b/csharp/paket.dependencies @@ -7,6 +7,7 @@ strategy: max nuget Basic.CompilerLog.Util 0.9.21 nuget Mono.Posix.NETStandard nuget Newtonsoft.Json +nuget NuGet.Versioning nuget xunit nuget xunit.runner.visualstudio nuget xunit.runner.utility diff --git a/csharp/paket.lock b/csharp/paket.lock index d503e19d87d..7e5b0d5bc94 100644 --- a/csharp/paket.lock +++ b/csharp/paket.lock @@ -123,6 +123,7 @@ NUGET System.Collections.Immutable (>= 8.0) NaturalSort.Extension (4.4) Newtonsoft.Json (13.0.4) + NuGet.Versioning (7.0.1) System.Buffers (4.6.1) System.Collections.Immutable (9.0.10) System.Composition (9.0.10) diff --git a/csharp/paket.main.bzl b/csharp/paket.main.bzl index 1ef6f63df8f..0778182f8b9 100644 --- a/csharp/paket.main.bzl +++ b/csharp/paket.main.bzl @@ -38,6 +38,7 @@ def main(): {"name": "MSBuild.StructuredLogger", "id": "MSBuild.StructuredLogger", "version": "2.3.71", "sha512": "sha512-u2Tw1WLYy+2VdccrQWyN3AY8zcFj4evfwqWMd7aBiicX3eGfkWkME7lsh9K2XS/+S8KVkjGNPI/g78E2A7Zx0g==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net462": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net47": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net471": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net472": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net48": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net5.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net6.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net7.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net8.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable"], "net9.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.1": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.2": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.1": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netstandard2.1": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"]}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "NaturalSort.Extension", "id": "NaturalSort.Extension", "version": "4.4.0", "sha512": "sha512-lcwYGJO2xZylcLW6B64tp6wE9UAt6fSn6el8MSAly5+6QG1vc/9uXQz+dsi69q1DxFv2TOaWrrheHNzg4yvy3Q==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "Newtonsoft.Json", "id": "Newtonsoft.Json", "version": "13.0.4", "sha512": "sha512-bR+v+E/yJ6g7GV2uXw2OrUSjYYfjLkOLC8JD4kCS23msLapnKtdJPBJA75fwHH++ErIffeIqzYITLxAur4KAXA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []}, + {"name": "NuGet.Versioning", "id": "NuGet.Versioning", "version": "7.0.1", "sha512": "sha512-ibGcrpgA8foidKNcnf+AQ4zEaVZu4OyWjcPITii6mNgwt2uhd8VFsEq7/Mb0KDxrEJaew+nWJQb7Ju166SAyzw==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "System.Buffers", "id": "System.Buffers", "version": "4.6.1", "sha512": "sha512-qve/dFwECwehSWlZmpkrrlIeATCvo/Hw2koyMrUVcDBy5gXAQrnwX8pHEoqgj8DgkrWuWW1DrQbFqoMbo+Fvrg==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "System.Collections.Immutable", "id": "System.Collections.Immutable", "version": "9.0.10", "sha512": "sha512-00LI4a7blU063Z0lCdRVLlh0Mzl1yYLZaxlOZe0MiNH+TELklX0Mne/XKU7UuCZQQh6FHrcEUPDjxIsy2jZUxg==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net462": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net47": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net471": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net472": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net48": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net5.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net6.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net7.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.1": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.2": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.1": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netstandard2.1": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"]}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "System.Composition", "id": "System.Composition", "version": "9.0.10", "sha512": "sha512-PyUH0f6tdjlQBntP/73cqaR53fjAZkaqGRatIi1BgZIfQH/Z0k1rPHaklBZqFV5+wKUkL74+49TrFPnB/zw+2Q==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net462": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net47": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net471": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net472": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net48": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net5.0": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net6.0": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net7.0": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net8.0": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net9.0": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "netcoreapp2.1": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "netcoreapp2.2": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "netcoreapp3.0": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "netcoreapp3.1": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "netstandard2.1": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"]}, "targeting_pack_overrides": [], "framework_list": []}, diff --git a/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md b/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md index de67deb4d32..34a8c2f3799 100644 --- a/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md +++ b/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.7.54 + +No user-facing changes. + +## 1.7.53 + +No user-facing changes. + ## 1.7.52 No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.53.md b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.53.md new file mode 100644 index 00000000000..b50e2ef9d7c --- /dev/null +++ b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.53.md @@ -0,0 +1,3 @@ +## 1.7.53 + +No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.54.md b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.54.md new file mode 100644 index 00000000000..4a829015914 --- /dev/null +++ b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.54.md @@ -0,0 +1,3 @@ +## 1.7.54 + +No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml b/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml index 31d9cd574dd..7d3013ec3c0 100644 --- a/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml +++ b/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.7.52 +lastReleaseVersion: 1.7.54 diff --git a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml index 177b79ef6b8..a758d0d4ca4 100644 --- a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml +++ b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-solorigate-all -version: 1.7.53-dev +version: 1.7.55-dev groups: - csharp - solorigate diff --git a/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md b/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md index de67deb4d32..34a8c2f3799 100644 --- a/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md +++ b/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.7.54 + +No user-facing changes. + +## 1.7.53 + +No user-facing changes. + ## 1.7.52 No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.53.md b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.53.md new file mode 100644 index 00000000000..b50e2ef9d7c --- /dev/null +++ b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.53.md @@ -0,0 +1,3 @@ +## 1.7.53 + +No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.54.md b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.54.md new file mode 100644 index 00000000000..4a829015914 --- /dev/null +++ b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.54.md @@ -0,0 +1,3 @@ +## 1.7.54 + +No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml b/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml index 31d9cd574dd..7d3013ec3c0 100644 --- a/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml +++ b/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.7.52 +lastReleaseVersion: 1.7.54 diff --git a/csharp/ql/campaigns/Solorigate/src/qlpack.yml b/csharp/ql/campaigns/Solorigate/src/qlpack.yml index 7b065e193b6..ce6202bf9c2 100644 --- a/csharp/ql/campaigns/Solorigate/src/qlpack.yml +++ b/csharp/ql/campaigns/Solorigate/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-solorigate-queries -version: 1.7.53-dev +version: 1.7.55-dev groups: - csharp - solorigate diff --git a/csharp/ql/integration-tests/all-platforms/blazor/global.json b/csharp/ql/integration-tests/all-platforms/blazor/global.json new file mode 100644 index 00000000000..d488208a2a7 --- /dev/null +++ b/csharp/ql/integration-tests/all-platforms/blazor/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "9.0.304" + } +} diff --git a/csharp/ql/integration-tests/all-platforms/blazor_build_mode_none/global.json b/csharp/ql/integration-tests/all-platforms/blazor_build_mode_none/global.json new file mode 100644 index 00000000000..d488208a2a7 --- /dev/null +++ b/csharp/ql/integration-tests/all-platforms/blazor_build_mode_none/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "9.0.304" + } +} diff --git a/csharp/ql/integration-tests/all-platforms/blazor_net_8/global.json b/csharp/ql/integration-tests/all-platforms/blazor_net_8/global.json new file mode 100644 index 00000000000..402fd849691 --- /dev/null +++ b/csharp/ql/integration-tests/all-platforms/blazor_net_8/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "8.0.401" + } +} \ No newline at end of file diff --git a/csharp/ql/integration-tests/all-platforms/dotnet_10/test.py b/csharp/ql/integration-tests/all-platforms/dotnet_10/test.py index 903d3430061..1f1fe52a4e5 100644 --- a/csharp/ql/integration-tests/all-platforms/dotnet_10/test.py +++ b/csharp/ql/integration-tests/all-platforms/dotnet_10/test.py @@ -1,3 +1,5 @@ +import pytest + def test1(codeql, csharp): codeql.database.create() diff --git a/csharp/ql/integration-tests/all-platforms/standalone/DatabaseQualityDiagnostics.expected b/csharp/ql/integration-tests/all-platforms/standalone/DatabaseQualityDiagnostics.expected index e9b4f2e2428..662b7d18f72 100644 --- a/csharp/ql/integration-tests/all-platforms/standalone/DatabaseQualityDiagnostics.expected +++ b/csharp/ql/integration-tests/all-platforms/standalone/DatabaseQualityDiagnostics.expected @@ -1,6 +1,6 @@ diagnosticAttributes -| Scanning C# code completed successfully, but the scan encountered issues. This may be caused by problems identifying dependencies or use of generated source code. Some metrics of the database quality are: Percentage of calls with call target: 25 % (threshold 85 %). Percentage of expressions with known type: 58 % (threshold 85 %). Ideally these metrics should be above their thresholds. Addressing these issues is advisable to avoid false-positives or missing results. If they cannot be addressed, consider scanning C# using either the `autobuild` or `manual` [build modes](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#comparison-of-the-build-modes). | visibilityCliSummaryTable | true | -| Scanning C# code completed successfully, but the scan encountered issues. This may be caused by problems identifying dependencies or use of generated source code. Some metrics of the database quality are: Percentage of calls with call target: 25 % (threshold 85 %). Percentage of expressions with known type: 58 % (threshold 85 %). Ideally these metrics should be above their thresholds. Addressing these issues is advisable to avoid false-positives or missing results. If they cannot be addressed, consider scanning C# using either the `autobuild` or `manual` [build modes](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#comparison-of-the-build-modes). | visibilityStatusPage | true | -| Scanning C# code completed successfully, but the scan encountered issues. This may be caused by problems identifying dependencies or use of generated source code. Some metrics of the database quality are: Percentage of calls with call target: 25 % (threshold 85 %). Percentage of expressions with known type: 58 % (threshold 85 %). Ideally these metrics should be above their thresholds. Addressing these issues is advisable to avoid false-positives or missing results. If they cannot be addressed, consider scanning C# using either the `autobuild` or `manual` [build modes](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#comparison-of-the-build-modes). | visibilityTelemetry | true | +| Scanning C# code completed successfully, but the scan encountered issues. This may be caused by problems identifying dependencies or use of generated source code. Some metrics of the database quality are: Percentage of calls with call target: 40 % (threshold 85 %). Percentage of expressions with known type: 64 % (threshold 85 %). Ideally these metrics should be above their thresholds. Addressing these issues is advisable to avoid false-positives or missing results. If they cannot be addressed, consider scanning C# using either the `autobuild` or `manual` [build modes](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#comparison-of-the-build-modes). | visibilityCliSummaryTable | true | +| Scanning C# code completed successfully, but the scan encountered issues. This may be caused by problems identifying dependencies or use of generated source code. Some metrics of the database quality are: Percentage of calls with call target: 40 % (threshold 85 %). Percentage of expressions with known type: 64 % (threshold 85 %). Ideally these metrics should be above their thresholds. Addressing these issues is advisable to avoid false-positives or missing results. If they cannot be addressed, consider scanning C# using either the `autobuild` or `manual` [build modes](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#comparison-of-the-build-modes). | visibilityStatusPage | true | +| Scanning C# code completed successfully, but the scan encountered issues. This may be caused by problems identifying dependencies or use of generated source code. Some metrics of the database quality are: Percentage of calls with call target: 40 % (threshold 85 %). Percentage of expressions with known type: 64 % (threshold 85 %). Ideally these metrics should be above their thresholds. Addressing these issues is advisable to avoid false-positives or missing results. If they cannot be addressed, consider scanning C# using either the `autobuild` or `manual` [build modes](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#comparison-of-the-build-modes). | visibilityTelemetry | true | #select -| Scanning C# code completed successfully, but the scan encountered issues. This may be caused by problems identifying dependencies or use of generated source code. Some metrics of the database quality are: Percentage of calls with call target: 25 % (threshold 85 %). Percentage of expressions with known type: 58 % (threshold 85 %). Ideally these metrics should be above their thresholds. Addressing these issues is advisable to avoid false-positives or missing results. If they cannot be addressed, consider scanning C# using either the `autobuild` or `manual` [build modes](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#comparison-of-the-build-modes). | Scanning C# code completed successfully, but the scan encountered issues. This may be caused by problems identifying dependencies or use of generated source code. Some metrics of the database quality are: Percentage of calls with call target: 25 % (threshold 85 %). Percentage of expressions with known type: 58 % (threshold 85 %). Ideally these metrics should be above their thresholds. Addressing these issues is advisable to avoid false-positives or missing results. If they cannot be addressed, consider scanning C# using either the `autobuild` or `manual` [build modes](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#comparison-of-the-build-modes). | 1 | +| Scanning C# code completed successfully, but the scan encountered issues. This may be caused by problems identifying dependencies or use of generated source code. Some metrics of the database quality are: Percentage of calls with call target: 40 % (threshold 85 %). Percentage of expressions with known type: 64 % (threshold 85 %). Ideally these metrics should be above their thresholds. Addressing these issues is advisable to avoid false-positives or missing results. If they cannot be addressed, consider scanning C# using either the `autobuild` or `manual` [build modes](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#comparison-of-the-build-modes). | Scanning C# code completed successfully, but the scan encountered issues. This may be caused by problems identifying dependencies or use of generated source code. Some metrics of the database quality are: Percentage of calls with call target: 40 % (threshold 85 %). Percentage of expressions with known type: 64 % (threshold 85 %). Ideally these metrics should be above their thresholds. Addressing these issues is advisable to avoid false-positives or missing results. If they cannot be addressed, consider scanning C# using either the `autobuild` or `manual` [build modes](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#comparison-of-the-build-modes). | 1 | diff --git a/csharp/ql/integration-tests/all-platforms/standalone_failed/global.json b/csharp/ql/integration-tests/all-platforms/standalone_failed/global.json new file mode 100644 index 00000000000..4c6e2601f69 --- /dev/null +++ b/csharp/ql/integration-tests/all-platforms/standalone_failed/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "9.0.304" + } +} diff --git a/csharp/ql/integration-tests/all-platforms/standalone_resx/Members.expected b/csharp/ql/integration-tests/all-platforms/standalone_resx/Members.expected index 469a8556db6..0de697aab2d 100644 --- a/csharp/ql/integration-tests/all-platforms/standalone_resx/Members.expected +++ b/csharp/ql/integration-tests/all-platforms/standalone_resx/Members.expected @@ -1,4 +1,5 @@ | Program | Program.
$ | +| Program | Program. | | Program | Program.Program | | Resx.Test1.Test2.test | Resx.Test1.Test2.test.Culture | | Resx.Test1.Test2.test | Resx.Test1.Test2.test.GetResourceString | diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/Assemblies.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/Assemblies.expected index bbfd3417df3..72f46cf9ac4 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/Assemblies.expected +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/Assemblies.expected @@ -23,6 +23,7 @@ | [...]/csharp/tools/[...]/Mono.Posix.NETStandard.dll | | [...]/csharp/tools/[...]/NaturalSort.Extension.dll | | [...]/csharp/tools/[...]/Newtonsoft.Json.dll | +| [...]/csharp/tools/[...]/NuGet.Versioning.dll | | [...]/csharp/tools/[...]/StructuredLogger.dll | | [...]/csharp/tools/[...]/System.AppContext.dll | | [...]/csharp/tools/[...]/System.Buffers.dll | diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/Assemblies.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/Assemblies.expected index 0934f8063db..10fa6873383 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/Assemblies.expected +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/Assemblies.expected @@ -1 +1 @@ -| test-db/working/packages/newtonsoft.json/6.0.4/lib/net45/Newtonsoft.Json.dll:0:0:0:0 | Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed | +| test-db/working/packages/newtonsoft.json/13.0.1/lib/netstandard2.0/Newtonsoft.Json.dll:0:0:0:0 | Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed | diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test_sdk.csproj b/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test_sdk.csproj index 3beee773f83..b93eda83d55 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test_sdk.csproj +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test_sdk.csproj @@ -11,6 +11,6 @@ - + diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/global.json b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/global.json new file mode 100644 index 00000000000..d488208a2a7 --- /dev/null +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "9.0.304" + } +} diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/global.json b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/global.json new file mode 100644 index 00000000000..d488208a2a7 --- /dev/null +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "9.0.304" + } +} diff --git a/csharp/ql/lib/CHANGELOG.md b/csharp/ql/lib/CHANGELOG.md index dbaa58119a4..3e3a49681f9 100644 --- a/csharp/ql/lib/CHANGELOG.md +++ b/csharp/ql/lib/CHANGELOG.md @@ -1,3 +1,15 @@ +## 5.4.2 + +No user-facing changes. + +## 5.4.1 + +### Minor Analysis Improvements + +* Improved stability when downloading .NET versions by setting appropriate environment variables for `dotnet` commands. The correct architecture-specific version of .NET is now downloaded on ARM runners. +* Compilation errors are now included in the debug log when using build-mode none. +* Added a new extractor option to specify a custom directory for dependency downloads in buildless mode. Use `-O buildless_dependency_dir=` to configure the target directory. + ## 5.4.0 ### Deprecated APIs diff --git a/csharp/ql/lib/change-notes/2025-11-17-compiler-error-debug.md b/csharp/ql/lib/change-notes/2025-11-17-compiler-error-debug.md deleted file mode 100644 index 082f4562615..00000000000 --- a/csharp/ql/lib/change-notes/2025-11-17-compiler-error-debug.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* Compilation errors are now included in the debug log when using build-mode none. diff --git a/csharp/ql/lib/change-notes/2025-11-17-dependencies-directory.md b/csharp/ql/lib/change-notes/2025-11-17-dependencies-directory.md deleted file mode 100644 index ec86dca35b9..00000000000 --- a/csharp/ql/lib/change-notes/2025-11-17-dependencies-directory.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* Added a new extractor option to specify a custom directory for dependency downloads in buildless mode. Use `-O buildless_dependency_dir=` to configure the target directory. diff --git a/csharp/ql/lib/change-notes/2025-11-19-autobuilder-stability.md b/csharp/ql/lib/change-notes/2025-11-19-autobuilder-stability.md deleted file mode 100644 index 719c44ac8ad..00000000000 --- a/csharp/ql/lib/change-notes/2025-11-19-autobuilder-stability.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* Improved stability when downloading .NET versions by setting appropriate environment variables for `dotnet` commands. The correct architecture-specific version of .NET is now downloaded on ARM runners. diff --git a/csharp/ql/lib/change-notes/2025-12-03-run-tracer-after-compilation.md b/csharp/ql/lib/change-notes/2025-12-03-run-tracer-after-compilation.md new file mode 100644 index 00000000000..d7dd475cb0b --- /dev/null +++ b/csharp/ql/lib/change-notes/2025-12-03-run-tracer-after-compilation.md @@ -0,0 +1,4 @@ +--- +category: fix +--- +* Fixed an issue where compiler-generated files were not being extracted. The extractor now runs after compilation completes to ensure all generated files are properly analyzed. diff --git a/csharp/ql/lib/change-notes/2025-12-04-bmn-dotnet-fixes.md b/csharp/ql/lib/change-notes/2025-12-04-bmn-dotnet-fixes.md new file mode 100644 index 00000000000..af1f1b91966 --- /dev/null +++ b/csharp/ql/lib/change-notes/2025-12-04-bmn-dotnet-fixes.md @@ -0,0 +1,6 @@ +--- +category: fix +--- +* Fixed two issues affecting build mode `none`: + * Corrected version sorting logic when detecting the newest .NET framework to use. + * Improved stability for .NET 10 compatibility. diff --git a/csharp/ql/lib/change-notes/released/5.4.1.md b/csharp/ql/lib/change-notes/released/5.4.1.md new file mode 100644 index 00000000000..2b0961ec925 --- /dev/null +++ b/csharp/ql/lib/change-notes/released/5.4.1.md @@ -0,0 +1,7 @@ +## 5.4.1 + +### Minor Analysis Improvements + +* Improved stability when downloading .NET versions by setting appropriate environment variables for `dotnet` commands. The correct architecture-specific version of .NET is now downloaded on ARM runners. +* Compilation errors are now included in the debug log when using build-mode none. +* Added a new extractor option to specify a custom directory for dependency downloads in buildless mode. Use `-O buildless_dependency_dir=` to configure the target directory. diff --git a/csharp/ql/lib/change-notes/released/5.4.2.md b/csharp/ql/lib/change-notes/released/5.4.2.md new file mode 100644 index 00000000000..ae5501672ad --- /dev/null +++ b/csharp/ql/lib/change-notes/released/5.4.2.md @@ -0,0 +1,3 @@ +## 5.4.2 + +No user-facing changes. diff --git a/csharp/ql/lib/codeql-pack.release.yml b/csharp/ql/lib/codeql-pack.release.yml index afb2156eaa2..0318ae05ad8 100644 --- a/csharp/ql/lib/codeql-pack.release.yml +++ b/csharp/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 5.4.0 +lastReleaseVersion: 5.4.2 diff --git a/csharp/ql/lib/qlpack.yml b/csharp/ql/lib/qlpack.yml index 7ea21611edc..1f20395f975 100644 --- a/csharp/ql/lib/qlpack.yml +++ b/csharp/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-all -version: 5.4.1-dev +version: 5.4.3-dev groups: csharp dbscheme: semmlecode.csharp.dbscheme extractor: csharp diff --git a/csharp/ql/lib/semmle/code/csharp/Callable.qll b/csharp/ql/lib/semmle/code/csharp/Callable.qll index 44e7c3cf4ca..49a2271b27c 100644 --- a/csharp/ql/lib/semmle/code/csharp/Callable.qll +++ b/csharp/ql/lib/semmle/code/csharp/Callable.qll @@ -281,7 +281,6 @@ class Method extends Callable, Virtualizable, Attributable, @method { /** Holds if this method has a `params` parameter. */ predicate hasParams() { exists(this.getParamsType()) } - // Remove when `Callable.isOverridden()` is removed override predicate fromSource() { Callable.super.fromSource() and not this.isCompilerGenerated() @@ -317,6 +316,19 @@ class ExtensionMethod extends Method { override string getAPrimaryQlClass() { result = "ExtensionMethod" } } +/** + * An object initializer method. + * + * This is an extractor-synthesized method that executes the field + * initializers. Note that the AST nodes for the field initializers are nested + * directly under the class, and therefore this method has no body in the AST. + * On the other hand, this provides the unique enclosing callable for the field + * initializers and their control flow graph. + */ +class ObjectInitMethod extends Method { + ObjectInitMethod() { this.getName() = "" } +} + /** * A constructor, for example `public C() { }` on line 2 in * @@ -350,6 +362,9 @@ class Constructor extends Callable, Member, Attributable, @constructor { */ ConstructorInitializer getInitializer() { result = this.getChildExpr(-1) } + /** Gets the object initializer call of this constructor, if any. */ + MethodCall getObjectInitializerCall() { result = this.getChildExpr(-2) } + /** Holds if this constructor has an initializer. */ predicate hasInitializer() { exists(this.getInitializer()) } diff --git a/csharp/ql/lib/semmle/code/csharp/ExprOrStmtParent.qll b/csharp/ql/lib/semmle/code/csharp/ExprOrStmtParent.qll index be79c579513..aa834ef9103 100644 --- a/csharp/ql/lib/semmle/code/csharp/ExprOrStmtParent.qll +++ b/csharp/ql/lib/semmle/code/csharp/ExprOrStmtParent.qll @@ -55,7 +55,8 @@ class TopLevelExprParent extends Element, @top_level_expr_parent { /** INTERNAL: Do not use. */ Expr getExpressionBody(Callable c) { result = c.getAChildExpr() and - not result = c.(Constructor).getInitializer() + not result = c.(Constructor).getInitializer() and + not result = c.(Constructor).getObjectInitializerCall() } /** INTERNAL: Do not use. */ @@ -211,6 +212,8 @@ private module Cached { enclosingBody(cfe, getBody(c)) or parent*(enclosingStart(cfe), c.(Constructor).getInitializer()) + or + parent*(cfe, c.(Constructor).getObjectInitializerCall()) } /** Holds if the enclosing statement of expression `e` is `s`. */ diff --git a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/ControlFlowGraphImpl.qll b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/ControlFlowGraphImpl.qll index 5f62d6d21df..96fe5703090 100644 --- a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/ControlFlowGraphImpl.qll +++ b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/ControlFlowGraphImpl.qll @@ -6,10 +6,65 @@ import csharp private import codeql.controlflow.Cfg as CfgShared private import Completion -private import Splitting private import semmle.code.csharp.ExprOrStmtParent private import semmle.code.csharp.commons.Compilation +private module Initializers { + /** + * A non-static member with an initializer, for example a field `int Field = 0`. + */ + class InitializedInstanceMember extends Member { + private AssignExpr ae; + + InitializedInstanceMember() { + not this.isStatic() and + expr_parent_top_level(ae, _, this) and + not ae = any(Callable c).getExpressionBody() + } + + /** Gets the initializer expression. */ + AssignExpr getInitializer() { result = ae } + } + + /** + * Holds if `obinit` is an object initializer method that performs the initialization + * of a member via assignment `init`. + */ + predicate obinitInitializes(ObjectInitMethod obinit, AssignExpr init) { + exists(InitializedInstanceMember m | + obinit.getDeclaringType().getAMember() = m and + init = m.getInitializer() + ) + } + + /** + * Gets the `i`th member initializer expression for object initializer method `obinit` + * in compilation `comp`. + */ + AssignExpr initializedInstanceMemberOrder(ObjectInitMethod obinit, CompilationExt comp, int i) { + obinitInitializes(obinit, result) and + result = + rank[i + 1](AssignExpr ae0, Location l | + obinitInitializes(obinit, ae0) and + l = ae0.getLocation() and + getCompilation(l.getFile()) = comp + | + ae0 order by l.getStartLine(), l.getStartColumn(), l.getFile().getAbsolutePath() + ) + } + + /** + * Gets the last member initializer expression for object initializer method `obinit` + * in compilation `comp`. + */ + AssignExpr lastInitializer(ObjectInitMethod obinit, CompilationExt comp) { + exists(int i | + result = initializedInstanceMemberOrder(obinit, comp, i) and + not exists(initializedInstanceMemberOrder(obinit, comp, i + 1)) + ) + } +} + /** An element that defines a new CFG scope. */ class CfgScope extends Element, @top_level_exprorstmt_parent { CfgScope() { @@ -19,7 +74,7 @@ class CfgScope extends Element, @top_level_exprorstmt_parent { any(Callable c | c.(Constructor).hasInitializer() or - InitializerSplitting::constructorInitializes(c, _) + Initializers::obinitInitializes(c, _) or c.hasBody() ) @@ -146,14 +201,16 @@ private predicate expr_parent_top_level_adjusted2( predicate scopeFirst(CfgScope scope, AstNode first) { scope = any(Callable c | - if exists(c.(Constructor).getInitializer()) - then first(c.(Constructor).getInitializer(), first) + if exists(c.(Constructor).getObjectInitializerCall()) + then first(c.(Constructor).getObjectInitializerCall(), first) else - if InitializerSplitting::constructorInitializes(c, _) - then first(InitializerSplitting::constructorInitializeOrder(c, _, 0), first) + if exists(c.(Constructor).getInitializer()) + then first(c.(Constructor).getInitializer(), first) else first(c.getBody(), first) ) or + first(Initializers::initializedInstanceMemberOrder(scope, _, 0), first) + or expr_parent_top_level_adjusted2(any(Expr e | first(e, first)), _, scope) and not scope instanceof Callable } @@ -165,14 +222,40 @@ predicate scopeLast(CfgScope scope, AstNode last, Completion c) { last(callable.getBody(), last, c) and not c instanceof GotoCompletion or - last(InitializerSplitting::lastConstructorInitializer(scope, _), last, c) and + last(callable.(Constructor).getInitializer(), last, c) and + not callable.hasBody() + or + // This is only relevant in the context of compilation errors, since + // normally the existence of an object initializer call implies the + // existence of an initializer. + last(callable.(Constructor).getObjectInitializerCall(), last, c) and + not callable.(Constructor).hasInitializer() and not callable.hasBody() ) or + last(Initializers::lastInitializer(scope, _), last, c) + or expr_parent_top_level_adjusted2(any(Expr e | last(e, last, c)), _, scope) and not scope instanceof Callable } +private class ObjectInitTree extends ControlFlowTree instanceof ObjectInitMethod { + final override predicate propagatesAbnormal(AstNode child) { none() } + + final override predicate first(AstNode first) { none() } + + final override predicate last(AstNode last, Completion c) { none() } + + final override predicate succ(AstNode pred, AstNode succ, Completion c) { + exists(CompilationExt comp, int i | + // Flow from one member initializer to the next + last(Initializers::initializedInstanceMemberOrder(this, comp, i), pred, c) and + c instanceof NormalCompletion and + first(Initializers::initializedInstanceMemberOrder(this, comp, i + 1), succ) + ) + } +} + private class ConstructorTree extends ControlFlowTree instanceof Constructor { final override predicate propagatesAbnormal(AstNode child) { none() } @@ -187,17 +270,29 @@ private class ConstructorTree extends ControlFlowTree instanceof Constructor { comp = getCompilation(result.getFile()) } + pragma[noinline] + private MethodCall getObjectInitializerCall(CompilationExt comp) { + result = super.getObjectInitializerCall() and + comp = getCompilation(result.getFile()) + } + + pragma[noinline] + private ConstructorInitializer getInitializer(CompilationExt comp) { + result = super.getInitializer() and + comp = getCompilation(result.getFile()) + } + final override predicate succ(AstNode pred, AstNode succ, Completion c) { - exists(CompilationExt comp, int i, AssignExpr ae | - ae = InitializerSplitting::constructorInitializeOrder(this, comp, i) and - last(ae, pred, c) and + exists(CompilationExt comp | + last(this.getObjectInitializerCall(comp), pred, c) and c instanceof NormalCompletion | - // Flow from one member initializer to the next - first(InitializerSplitting::constructorInitializeOrder(this, comp, i + 1), succ) + first(this.getInitializer(comp), succ) or - // Flow from last member initializer to constructor body - ae = InitializerSplitting::lastConstructorInitializer(this, comp) and + // This is only relevant in the context of compilation errors, since + // normally the existence of an object initializer call implies the + // existence of an initializer. + not exists(this.getInitializer(comp)) and first(this.getBody(comp), succ) ) } @@ -837,13 +932,7 @@ module Expressions { last(this, pred, c) and con = super.getConstructor() and comp = getCompilation(this.getFile()) and - c instanceof NormalCompletion - | - // Flow from constructor initializer to first member initializer - first(InitializerSplitting::constructorInitializeOrder(con, comp, 0), succ) - or - // Flow from constructor initializer to first element of constructor body - not exists(InitializerSplitting::constructorInitializeOrder(con, comp, _)) and + c instanceof NormalCompletion and first(con.getBody(comp), succ) ) } diff --git a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/Splitting.qll b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/Splitting.qll index 63d2c181da4..87579a075f9 100644 --- a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/Splitting.qll +++ b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/Splitting.qll @@ -22,14 +22,10 @@ private module Cached { } cached - newtype TSplitKind = - TInitializerSplitKind() or - TConditionalCompletionSplitKind() + newtype TSplitKind = TConditionalCompletionSplitKind() cached - newtype TSplit = - TInitializerSplit(Constructor c) { InitializerSplitting::constructorInitializes(c, _) } or - TConditionalCompletionSplit(ConditionalCompletion c) + newtype TSplit = TConditionalCompletionSplit(ConditionalCompletion c) } import Cached @@ -43,186 +39,6 @@ class Split extends TSplit { string toString() { none() } } -module InitializerSplitting { - private import semmle.code.csharp.ExprOrStmtParent - - /** - * A non-static member with an initializer, for example a field `int Field = 0`. - */ - class InitializedInstanceMember extends Member { - InitializedInstanceMember() { - exists(AssignExpr ae | - not this.isStatic() and - expr_parent_top_level(ae, _, this) and - not ae = any(Callable c).getExpressionBody() - ) - } - - /** Gets the initializer expression. */ - AssignExpr getInitializer() { expr_parent_top_level(result, _, this) } - - /** - * Gets a control flow element that is a syntactic descendant of the - * initializer expression. - */ - AstNode getAnInitializerDescendant() { - result = this.getInitializer() - or - result = this.getAnInitializerDescendant().getAChild() - } - } - - /** - * Holds if `c` is a non-static constructor that performs the initialization - * of a member via assignment `init`. - */ - predicate constructorInitializes(InstanceConstructor c, AssignExpr init) { - exists(InitializedInstanceMember m | - c.isUnboundDeclaration() and - c.getDeclaringType().getAMember() = m and - not c.getInitializer().isThis() and - init = m.getInitializer() - ) - } - - /** - * Gets the `i`th member initializer expression for non-static constructor `c` - * in compilation `comp`. - */ - AssignExpr constructorInitializeOrder(Constructor c, CompilationExt comp, int i) { - constructorInitializes(c, result) and - result = - rank[i + 1](AssignExpr ae0, Location l | - constructorInitializes(c, ae0) and - l = ae0.getLocation() and - getCompilation(l.getFile()) = comp - | - ae0 order by l.getStartLine(), l.getStartColumn(), l.getFile().getAbsolutePath() - ) - } - - /** - * Gets the last member initializer expression for non-static constructor `c` - * in compilation `comp`. - */ - AssignExpr lastConstructorInitializer(Constructor c, CompilationExt comp) { - exists(int i | - result = constructorInitializeOrder(c, comp, i) and - not exists(constructorInitializeOrder(c, comp, i + 1)) - ) - } - - /** - * A split for non-static member initializers belonging to a given non-static - * constructor. For example, in - * - * ```csharp - * class C - * { - * int Field1 = 0; - * int Field2 = Field1 + 1; - * int Field3; - * - * public C() - * { - * Field3 = 2; - * } - * - * public C(int i) - * { - * Field3 = 3; - * } - * } - * ``` - * - * the initializer expressions `Field1 = 0` and `Field2 = Field1 + 1` are split - * on the two constructors. This is in order to generate CFGs for the two - * constructors that mimic - * - * ```csharp - * public C() - * { - * Field1 = 0; - * Field2 = Field1 + 1; - * Field3 = 2; - * } - * ``` - * - * and - * - * ```csharp - * public C() - * { - * Field1 = 0; - * Field2 = Field1 + 1; - * Field3 = 3; - * } - * ``` - * - * respectively. - */ - private class InitializerSplit extends Split, TInitializerSplit { - private Constructor c; - - InitializerSplit() { this = TInitializerSplit(c) } - - /** Gets the constructor. */ - Constructor getConstructor() { result = c } - - override string toString() { result = "" } - } - - private class InitializerSplitKind extends SplitKind, TInitializerSplitKind { - override int getListOrder() { result = 0 } - - override predicate isEnabled(AstNode cfe) { this.appliesTo(cfe) } - - override string toString() { result = "Initializer" } - } - - int getNextListOrder() { result = 1 } - - private class InitializerSplitImpl extends SplitImpl instanceof InitializerSplit { - override InitializerSplitKind getKind() { any() } - - override predicate hasEntry(AstNode pred, AstNode succ, Completion c) { - exists(ConstructorInitializer ci | - last(ci, pred, c) and - succ(pred, succ, c) and - succ = any(InitializedInstanceMember m).getAnInitializerDescendant() and - super.getConstructor() = ci.getConstructor() - ) - } - - override predicate hasEntryScope(CfgScope scope, AstNode first) { - scopeFirst(scope, first) and - scope = super.getConstructor() and - first = any(InitializedInstanceMember m).getAnInitializerDescendant() - } - - override predicate hasExit(AstNode pred, AstNode succ, Completion c) { - this.appliesTo(pred) and - succ(pred, succ, c) and - not succ = any(InitializedInstanceMember m).getAnInitializerDescendant() and - succ.(ControlFlowElement).getEnclosingCallable() = super.getConstructor() - } - - override predicate hasExitScope(CfgScope scope, AstNode last, Completion c) { - this.appliesTo(last) and - scopeLast(scope, last, c) and - scope = super.getConstructor() - } - - override predicate hasSuccessor(AstNode pred, AstNode succ, Completion c) { - this.appliesSucc(pred, succ, c) and - succ = - any(InitializedInstanceMember m | - constructorInitializes(super.getConstructor(), m.getInitializer()) - ).getAnInitializerDescendant() - } - } -} - module ConditionalCompletionSplitting { /** * A split for conditional completions. For example, in @@ -249,7 +65,7 @@ module ConditionalCompletionSplitting { } private class ConditionalCompletionSplitKind_ extends SplitKind, TConditionalCompletionSplitKind { - override int getListOrder() { result = InitializerSplitting::getNextListOrder() } + override int getListOrder() { result = 0 } override predicate isEnabled(AstNode cfe) { this.appliesTo(cfe) } @@ -312,6 +128,4 @@ module ConditionalCompletionSplitting { ) } } - - int getNextListOrder() { result = InitializerSplitting::getNextListOrder() + 1 } } diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowDispatch.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowDispatch.qll index 9ba96154820..c7d34a38979 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowDispatch.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowDispatch.qll @@ -16,7 +16,7 @@ private import semmle.code.csharp.internal.Location */ Callable getCallableForDataFlow(Callable c) { result = c.getUnboundDeclaration() and - result.hasBody() and + (result.hasBody() or result instanceof ObjectInitMethod) and result.getFile().fromSource() } @@ -27,6 +27,12 @@ newtype TReturnKind = private predicate hasMultipleSourceLocations(Callable c) { strictcount(getASourceLocation(c)) > 1 } +private predicate objectInitEntry(ObjectInitMethod m, ControlFlowElement first) { + exists(ControlFlow::Nodes::EntryNode en | + en.getCallable() = m and first.getControlFlowNode() = en.getASuccessor() + ) +} + private module NearestBodyLocationInput implements NearestLocationInputSig { class C = ControlFlowElement; @@ -34,7 +40,7 @@ private module NearestBodyLocationInput implements NearestLocationInputSig { exists(Callable c | hasMultipleSourceLocations(c) and l1 = getASourceLocation(c) and - body = c.getBody() and + (body = c.getBody() or objectInitEntry(c, body)) and l2 = body.getLocation() ) } @@ -207,7 +213,9 @@ class DataFlowCallable extends TDataFlowCallable { private ControlFlow::Nodes::ElementNode getAMultiBodyEntryNode(ControlFlow::BasicBlock bb, int i) { this.isMultiBodied() and exists(ControlFlowElement body, Location l | - body = this.asCallable(l).getBody() and + body = this.asCallable(l).getBody() or + objectInitEntry(this.asCallable(l), body) + | NearestLocation::nearestLocation(body, l, _) and result = body.getAControlFlowEntryNode() ) and diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll index 4f7f0141da2..a05651b4c64 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll @@ -178,12 +178,24 @@ private module ThisFlow { cfn = n.(InstanceParameterAccessPreNode).getUnderlyingControlFlowNode() } + private predicate primaryConstructorThisAccess(Node n, BasicBlock bb, int ppos) { + exists(Parameter p | + n.(PrimaryConstructorThisAccessPreNode).getParameter() = p and + bb.getCallable() = p.getCallable() and + ppos = p.getPosition() + ) + } + + private int numberOfPrimaryConstructorParameters(BasicBlock bb) { + result = strictcount(int primaryParamPos | primaryConstructorThisAccess(_, bb, primaryParamPos)) + } + private predicate thisAccess(Node n, BasicBlock bb, int i) { thisAccess(n, bb.getNode(i)) or - exists(Parameter p | n.(PrimaryConstructorThisAccessPreNode).getParameter() = p | - bb.getCallable() = p.getCallable() and - i = p.getPosition() + 1 + exists(int ppos | + primaryConstructorThisAccess(n, bb, ppos) and + i = ppos - numberOfPrimaryConstructorParameters(bb) ) or exists(DataFlowCallable c, ControlFlow::BasicBlocks::EntryBlock entry | @@ -195,8 +207,11 @@ private module ThisFlow { // entry definition. In case `c` doesn't have multiple bodies, the line below // is simply the same as `bb = entry`, because `entry.getFirstNode().getASuccessor()` // will be in the entry block. - bb = succ.getBasicBlock() and - i = -1 + bb = succ.getBasicBlock() + | + i = -1 - numberOfPrimaryConstructorParameters(bb) + or + not exists(numberOfPrimaryConstructorParameters(bb)) and i = -1 ) ) } @@ -3035,8 +3050,11 @@ predicate additionalLambdaFlowStep(Node nodeFrom, Node nodeTo, boolean preserves exists(AssignableDefinition def | def.getTargetAccess() = fa and nodeFrom.asExpr() = def.getSource() and - nodeTo = TFlowInsensitiveFieldNode(f) and + nodeTo = TFlowInsensitiveFieldNode(f) + | nodeFrom.getEnclosingCallable() instanceof Constructor + or + nodeFrom.getEnclosingCallable() instanceof ObjectInitMethod ) or nodeFrom = TFlowInsensitiveFieldNode(f) and @@ -3070,6 +3088,9 @@ predicate allowParameterReturnInSelf(ParameterNode p) { or VariableCapture::Flow::heuristicAllowInstanceParameterReturnInSelf(p.(DelegateSelfReferenceNode) .getCallable()) + or + // Allow field initializers to access Primary Constructor parameters + p.getEnclosingCallable() instanceof ObjectInitMethod } /** An approximated `Content`. */ diff --git a/csharp/ql/lib/semmle/code/csharp/frameworks/Sql.qll b/csharp/ql/lib/semmle/code/csharp/frameworks/Sql.qll index 77d749a0333..6b1eb7b67fb 100644 --- a/csharp/ql/lib/semmle/code/csharp/frameworks/Sql.qll +++ b/csharp/ql/lib/semmle/code/csharp/frameworks/Sql.qll @@ -52,7 +52,7 @@ class IDbCommandConstructionSqlExpr extends SqlExpr, ObjectCreation { class DapperCommandDefinitionMethodCallSqlExpr extends SqlExpr, ObjectCreation { DapperCommandDefinitionMethodCallSqlExpr() { this.getObjectType() instanceof Dapper::CommandDefinitionStruct and - DapperCommandDefinitionMethodCallSql::flow(DataFlow::exprNode(this), _) + DapperCommandDefinitionMethodCallSql::flowFromExpr(this) } override Expr getSql() { result = this.getArgumentForName("commandText") } diff --git a/csharp/ql/lib/semmle/code/csharp/internal/Overlay.qll b/csharp/ql/lib/semmle/code/csharp/internal/Overlay.qll index a44d82c92ad..a2939a5df03 100644 --- a/csharp/ql/lib/semmle/code/csharp/internal/Overlay.qll +++ b/csharp/ql/lib/semmle/code/csharp/internal/Overlay.qll @@ -2,6 +2,8 @@ * Defines entity discard predicates for C# overlay analysis. */ +private import OverlayXml + /** * Holds always for the overlay variant and never for the base variant. * This local predicate is used to define local predicates that behave @@ -110,36 +112,6 @@ private predicate discardLocation(@location_default loc) { exists(string path | discardableLocation(loc, path) | overlayChangedFiles(path)) } -/** - * A class of Xml locatables that can be discarded from the base. - */ -overlay[local] -private class DiscardableXmlEntity extends DiscardableEntityBase instanceof @xmllocatable { - /** Gets the path to the file in which this element occurs. */ - override string getFilePath() { - exists(@location_default loc | result = getLocationFilePath(loc) | xmllocations(this, loc)) - } -} - -overlay[local] -private predicate overlayXmlExtracted(string file) { - exists(DiscardableXmlEntity dxe | - dxe.existsInOverlay() and - file = dxe.getFilePath() and - not files(dxe, _) and - not xmlNs(dxe, _, _, _) - ) -} - -overlay[discard_entity] -private predicate discardXmlEntity(@xmllocatable xml) { - overlayChangedFiles(xml.(DiscardableXmlEntity).getFilePath()) - or - // The XML extractor is not incremental and may extract more - // XML files than those included in overlayChangedFiles. - overlayXmlExtracted(xml.(DiscardableXmlEntity).getFilePath()) -} - overlay[local] private class DiscardableAspEntity extends DiscardableEntityBase instanceof @asp_element { /** Gets the path to the file in which this element occurs. */ diff --git a/csharp/ql/lib/semmle/code/csharp/internal/OverlayXml.qll b/csharp/ql/lib/semmle/code/csharp/internal/OverlayXml.qll new file mode 100644 index 00000000000..95d49f2d611 --- /dev/null +++ b/csharp/ql/lib/semmle/code/csharp/internal/OverlayXml.qll @@ -0,0 +1,46 @@ +overlay[local] +module; + +/** + * A local predicate that always holds for the overlay variant and never holds for the base variant. + * This is used to define local predicates that behave differently for the base and overlay variant. + */ +private predicate isOverlay() { databaseMetadata("isOverlay", "true") } + +private string getXmlFile(@xmllocatable locatable) { + exists(@location_default location, @file file | xmllocations(locatable, location) | + locations_default(location, file, _, _, _, _) and + files(file, result) + ) +} + +private string getXmlFileInBase(@xmllocatable locatable) { + not isOverlay() and + result = getXmlFile(locatable) +} + +/** + * Holds if the given `file` was extracted as part of the overlay and was extracted by the HTML/XML + * extractor. + */ +private predicate overlayXmlExtracted(string file) { + isOverlay() and + exists(@xmllocatable locatable | + not files(locatable, _) and not xmlNs(locatable, _, _, _) and file = getXmlFile(locatable) + ) +} + +/** + * Holds if the given XML `locatable` should be discarded, because it is part of the overlay base + * and is in a file that was also extracted as part of the overlay database. + */ +overlay[discard_entity] +private predicate discardXmlLocatable(@xmllocatable locatable) { + exists(string file | file = getXmlFileInBase(locatable) | + overlayChangedFiles(file) + or + // The HTML/XML extractor is currently not incremental and may extract more files than those + // included in overlayChangedFiles. + overlayXmlExtracted(file) + ) +} diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExternalAPIsQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExternalAPIsQuery.qll index f1a64f6810b..e623628fea6 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExternalAPIsQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExternalAPIsQuery.qll @@ -85,7 +85,7 @@ module RemoteSourceToExternalApi = TaintTracking::Global # 171| 1: [TypeMention] int # 171| 4: [BlockStmt] {...} -# 174| 7: [Method] M +# 174| 8: [Method] M # 174| -1: [TypeMention] Void #-----| 0: (Attributes) # 173| 1: [DefaultAttribute] [OverloadResolutionPriority(...)] diff --git a/csharp/ql/test/library-tests/comments/PrintAst.expected b/csharp/ql/test/library-tests/comments/PrintAst.expected index 68c2c582e37..9bc446858ee 100644 --- a/csharp/ql/test/library-tests/comments/PrintAst.expected +++ b/csharp/ql/test/library-tests/comments/PrintAst.expected @@ -1,19 +1,19 @@ comments1.cs: # 9| [Class] C # 34| [Class] Foo -# 39| 5: [Field] x +# 39| 6: [Field] x # 39| -1: [TypeMention] int -# 42| 6: [Field] y +# 42| 7: [Field] y # 42| -1: [TypeMention] int -# 43| 7: [Field] z +# 43| 8: [Field] z # 43| -1: [TypeMention] int comments2.cs: # 11| [Class] C2 -# 13| 4: [Field] field1 +# 13| 5: [Field] field1 # 13| -1: [TypeMention] int -# 14| 5: [Field] field2 +# 14| 6: [Field] field2 # 14| -1: [TypeMention] int -# 19| 6: [Method] f +# 19| 7: [Method] f # 19| -1: [TypeMention] Void # 20| 4: [BlockStmt] {...} # 23| 0: [ExprStmt] ...; @@ -21,7 +21,7 @@ comments2.cs: # 26| 1: [ExprStmt] ...; # 26| 0: [MethodCall] call to method g # 26| 0: [IntLiteral] 2 -# 29| 7: [Method] g +# 29| 8: [Method] g # 29| -1: [TypeMention] Void #-----| 2: (Parameters) # 29| 0: [Parameter] x @@ -37,8 +37,8 @@ comments2.cs: # 34| -1: [TypeMention] int # 34| 0: [LocalVariableAccess] access to local variable z # 34| 1: [IntLiteral] 0 -# 40| 8: [Class] C3 -# 48| 9: [Property] S1 +# 40| 9: [Class] C3 +# 48| 10: [Property] S1 # 48| -1: [TypeMention] string # 52| 3: [Getter] get_S1 # 52| 4: [BlockStmt] {...} @@ -48,15 +48,15 @@ comments2.cs: #-----| 2: (Parameters) # 53| 0: [Parameter] value # 54| 4: [BlockStmt] {...} -# 61| 10: [Enum] Values +# 61| 11: [Enum] Values # 66| 5: [Field] First # 67| 6: [Field] Second # 73| 7: [Field] Third -# 79| 11: [InstanceConstructor] C2 +# 79| 12: [InstanceConstructor] C2 # 80| 4: [BlockStmt] {...} -# 85| 12: [Destructor] ~C2 +# 85| 13: [Destructor] ~C2 # 86| 4: [BlockStmt] {...} -# 90| 13: [AddOperator] + +# 90| 14: [AddOperator] + # 90| -1: [TypeMention] int #-----| 2: (Parameters) # 90| 0: [Parameter] x @@ -66,7 +66,7 @@ comments2.cs: # 91| 4: [BlockStmt] {...} # 92| 0: [ReturnStmt] return ...; # 92| 0: [IntLiteral] 2 -# 95| 14: [Method] f +# 95| 15: [Method] f # 95| -1: [TypeMention] Void #-----| 2: (Parameters) # 96| 0: [Parameter] x @@ -74,8 +74,8 @@ comments2.cs: # 97| 1: [Parameter] y # 97| -1: [TypeMention] int # 99| 4: [BlockStmt] {...} -# 103| 15: [DelegateType] D -# 107| 16: [Event] E +# 103| 16: [DelegateType] D +# 107| 17: [Event] E # 107| -1: [TypeMention] D # 107| 3: [AddEventAccessor] add_E #-----| 2: (Parameters) @@ -83,7 +83,7 @@ comments2.cs: # 107| 4: [RemoveEventAccessor] remove_E #-----| 2: (Parameters) # 107| 0: [Parameter] value -# 110| 17: [Method] gen +# 110| 18: [Method] gen # 110| -1: [TypeMention] Void # 111| 4: [BlockStmt] {...} # 112| 0: [LocalVariableDeclStmt] ... ...; @@ -110,12 +110,12 @@ comments2.cs: # 115| -1: [TypeMention] int # 115| 0: [LocalVariableAccess] access to local variable t4 # 115| 1: [MethodCall] call to method GenericFn -# 119| 20: [Class] GenericClass`1 +# 119| 21: [Class] GenericClass`1 #-----| 1: (Type parameters) # 119| 0: [TypeParameter] T -# 121| 5: [Field] f +# 121| 6: [Field] f # 121| -1: [TypeMention] int -# 125| 23: [Method] GenericFn`1 +# 125| 24: [Method] GenericFn`1 # 125| -1: [TypeMention] int #-----| 1: (Type parameters) # 125| 0: [TypeParameter] T @@ -129,7 +129,7 @@ comments2.cs: # 128| 0: [IntLiteral] 0 trivia.cs: # 14| [Class] Tr1 -# 16| 5: [Method] M1 +# 16| 6: [Method] M1 # 16| -1: [TypeMention] Void # 17| 4: [BlockStmt] {...} comments1.cs: @@ -155,7 +155,7 @@ trivia.cs: # 28| 0: [LocalVariableDeclExpr] Double d # 28| 0: [TypeMention] double # 32| [Class] Tr2 -# 34| 5: [Method] M1 +# 34| 6: [Method] M1 # 34| -1: [TypeMention] Void # 35| 4: [BlockStmt] {...} # 37| 0: [LocalVariableDeclStmt] ... ...; @@ -165,11 +165,11 @@ trivia.cs: # 39| 0: [LocalVariableDeclExpr] Int32 j # 39| 0: [TypeMention] int # 45| [Class] Tr3 -# 47| 5: [Method] M1 +# 47| 6: [Method] M1 # 47| -1: [TypeMention] Void # 48| 4: [BlockStmt] {...} # 61| [Class] Tr4 -# 63| 5: [Method] M1 +# 63| 6: [Method] M1 # 63| -1: [TypeMention] Void # 64| 4: [BlockStmt] {...} # 73| 0: [LocalVariableDeclStmt] ... ...; @@ -178,25 +178,25 @@ trivia.cs: # 73| 0: [LocalVariableAccess] access to local variable i # 73| 1: [IntLiteral] 1 # 80| [Class] Tr5 -# 83| 5: [Method] M1 +# 83| 6: [Method] M1 # 83| -1: [TypeMention] Void # 84| 4: [BlockStmt] {...} -# 88| 6: [Method] M2 +# 88| 7: [Method] M2 # 88| -1: [TypeMention] Void # 89| 4: [BlockStmt] {...} -# 92| 7: [Field] F1 +# 92| 8: [Field] F1 # 92| -1: [TypeMention] int # 94| 1: [IntLiteral] 10 -# 98| 8: [Field] F2 +# 98| 9: [Field] F2 # 98| -1: [TypeMention] int # 98| 1: [IntLiteral] 0 -# 100| 9: [Property] P1 +# 100| 10: [Property] P1 # 100| -1: [TypeMention] int # 102| 3: [Getter] get_P1 # 104| 4: [Setter] set_P1 #-----| 2: (Parameters) # 104| 0: [Parameter] value -# 108| 10: [Property] P2 +# 108| 11: [Property] P2 # 108| -1: [TypeMention] int # 108| 3: [Getter] get_P2 # 108| 4: [Setter] set_P2 diff --git a/csharp/ql/test/library-tests/constructors/PrintAst.expected b/csharp/ql/test/library-tests/constructors/PrintAst.expected index fc5c19ac2df..000ae29f2c2 100644 --- a/csharp/ql/test/library-tests/constructors/PrintAst.expected +++ b/csharp/ql/test/library-tests/constructors/PrintAst.expected @@ -1,16 +1,16 @@ constructors.cs: # 1| [NamespaceDeclaration] namespace ... { ... } # 3| 1: [Class] Class -# 5| 4: [InstanceConstructor] Class +# 5| 5: [InstanceConstructor] Class # 6| 4: [BlockStmt] {...} -# 8| 5: [InstanceConstructor] Class +# 8| 6: [InstanceConstructor] Class #-----| 2: (Parameters) # 8| 0: [Parameter] i # 8| -1: [TypeMention] int # 9| 4: [BlockStmt] {...} -# 11| 6: [StaticConstructor] Class +# 11| 7: [StaticConstructor] Class # 12| 4: [BlockStmt] {...} -# 14| 7: [Destructor] ~Class +# 14| 8: [Destructor] ~Class # 15| 4: [BlockStmt] {...} # 16| 0: [LocalVariableDeclStmt] ... ...; # 16| 0: [LocalVariableDeclAndInitExpr] Int32 i = ... @@ -19,13 +19,13 @@ constructors.cs: # 16| 1: [IntLiteral] 0 # 21| [NamespaceDeclaration] namespace ... { ... } # 23| 1: [Class] C1 -# 23| 4: [InstanceConstructor,PrimaryConstructor] C1 +# 23| 5: [InstanceConstructor,PrimaryConstructor] C1 #-----| 2: (Parameters) # 23| 0: [Parameter] o # 23| -1: [TypeMention] object # 23| 1: [Parameter] s # 23| -1: [TypeMention] string -# 25| 5: [InstanceConstructor] C1 +# 25| 6: [InstanceConstructor] C1 #-----| 2: (Parameters) # 25| 0: [Parameter] o # 25| -1: [TypeMention] object @@ -36,7 +36,7 @@ constructors.cs: # 28| 2: [Class] C2 #-----| 3: (Base types) # 28| 0: [TypeMention] C1 -# 28| 4: [InstanceConstructor,PrimaryConstructor] C2 +# 28| 5: [InstanceConstructor,PrimaryConstructor] C2 #-----| 2: (Parameters) # 28| 0: [Parameter] o # 28| -1: [TypeMention] object diff --git a/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected b/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected index c9f7d2ab35c..99d89a29c13 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected @@ -1,4 +1,4 @@ -| AccessorCalls.cs:1:7:1:19 | enter AccessorCalls | AccessorCalls.cs:1:7:1:19 | exit AccessorCalls | 5 | +| AccessorCalls.cs:1:7:1:19 | enter AccessorCalls | AccessorCalls.cs:1:7:1:19 | exit AccessorCalls | 7 | | AccessorCalls.cs:5:23:5:25 | enter get_Item | AccessorCalls.cs:5:23:5:25 | exit get_Item | 4 | | AccessorCalls.cs:5:33:5:35 | enter set_Item | AccessorCalls.cs:5:33:5:35 | exit set_Item | 4 | | AccessorCalls.cs:7:32:7:34 | enter add_Event | AccessorCalls.cs:7:32:7:34 | exit add_Event | 4 | @@ -12,12 +12,12 @@ | AccessorCalls.cs:56:10:56:11 | enter M7 | AccessorCalls.cs:56:10:56:11 | exit M7 | 24 | | AccessorCalls.cs:61:10:61:11 | enter M8 | AccessorCalls.cs:61:10:61:11 | exit M8 | 30 | | AccessorCalls.cs:66:10:66:11 | enter M9 | AccessorCalls.cs:66:10:66:11 | exit M9 | 58 | -| ArrayCreation.cs:1:7:1:19 | enter ArrayCreation | ArrayCreation.cs:1:7:1:19 | exit ArrayCreation | 5 | +| ArrayCreation.cs:1:7:1:19 | enter ArrayCreation | ArrayCreation.cs:1:7:1:19 | exit ArrayCreation | 7 | | ArrayCreation.cs:3:11:3:12 | enter M1 | ArrayCreation.cs:3:11:3:12 | exit M1 | 5 | | ArrayCreation.cs:5:12:5:13 | enter M2 | ArrayCreation.cs:5:12:5:13 | exit M2 | 6 | | ArrayCreation.cs:7:11:7:12 | enter M3 | ArrayCreation.cs:7:11:7:12 | exit M3 | 8 | | ArrayCreation.cs:9:12:9:13 | enter M4 | ArrayCreation.cs:9:12:9:13 | exit M4 | 13 | -| Assert.cs:5:7:5:17 | enter AssertTests | Assert.cs:5:7:5:17 | exit AssertTests | 5 | +| Assert.cs:5:7:5:17 | enter AssertTests | Assert.cs:5:7:5:17 | exit AssertTests | 7 | | Assert.cs:7:10:7:11 | enter M1 | Assert.cs:9:20:9:20 | access to parameter b | 4 | | Assert.cs:7:10:7:11 | exit M1 | Assert.cs:7:10:7:11 | exit M1 | 1 | | Assert.cs:7:10:7:11 | exit M1 (abnormal) | Assert.cs:7:10:7:11 | exit M1 (abnormal) | 1 | @@ -163,11 +163,11 @@ | Assert.cs:138:10:138:12 | exit M13 | Assert.cs:138:10:138:12 | exit M13 | 1 | | Assert.cs:138:10:138:12 | exit M13 (abnormal) | Assert.cs:138:10:138:12 | exit M13 (abnormal) | 1 | | Assert.cs:141:9:141:15 | return ...; | Assert.cs:138:10:138:12 | exit M13 (normal) | 2 | -| Assignments.cs:1:7:1:17 | enter Assignments | Assignments.cs:1:7:1:17 | exit Assignments | 5 | +| Assignments.cs:1:7:1:17 | enter Assignments | Assignments.cs:1:7:1:17 | exit Assignments | 7 | | Assignments.cs:3:10:3:10 | enter M | Assignments.cs:3:10:3:10 | exit M | 34 | | Assignments.cs:14:18:14:35 | enter (...) => ... | Assignments.cs:14:18:14:35 | exit (...) => ... | 4 | | Assignments.cs:17:40:17:40 | enter + | Assignments.cs:17:40:17:40 | exit + | 6 | -| BreakInTry.cs:1:7:1:16 | enter BreakInTry | BreakInTry.cs:1:7:1:16 | exit BreakInTry | 5 | +| BreakInTry.cs:1:7:1:16 | enter BreakInTry | BreakInTry.cs:1:7:1:16 | exit BreakInTry | 7 | | BreakInTry.cs:3:10:3:11 | enter M1 | BreakInTry.cs:7:33:7:36 | access to parameter args | 5 | | BreakInTry.cs:3:10:3:11 | exit M1 (normal) | BreakInTry.cs:3:10:3:11 | exit M1 | 2 | | BreakInTry.cs:7:13:11:13 | foreach (... ... in ...) ... | BreakInTry.cs:7:13:11:13 | foreach (... ... in ...) ... | 1 | @@ -197,18 +197,18 @@ | BreakInTry.cs:65:13:69:13 | foreach (... ... in ...) ... | BreakInTry.cs:65:13:69:13 | foreach (... ... in ...) ... | 1 | | BreakInTry.cs:65:26:65:28 | String arg | BreakInTry.cs:67:21:67:31 | ... == ... | 6 | | BreakInTry.cs:68:21:68:26 | break; | BreakInTry.cs:68:21:68:26 | break; | 1 | -| CompileTimeOperators.cs:3:7:3:26 | enter CompileTimeOperators | CompileTimeOperators.cs:3:7:3:26 | exit CompileTimeOperators | 5 | +| CompileTimeOperators.cs:3:7:3:26 | enter CompileTimeOperators | CompileTimeOperators.cs:3:7:3:26 | exit CompileTimeOperators | 7 | | CompileTimeOperators.cs:5:9:5:15 | enter Default | CompileTimeOperators.cs:5:9:5:15 | exit Default | 6 | | CompileTimeOperators.cs:10:9:10:14 | enter Sizeof | CompileTimeOperators.cs:10:9:10:14 | exit Sizeof | 6 | | CompileTimeOperators.cs:15:10:15:15 | enter Typeof | CompileTimeOperators.cs:15:10:15:15 | exit Typeof | 6 | | CompileTimeOperators.cs:20:12:20:17 | enter Nameof | CompileTimeOperators.cs:20:12:20:17 | exit Nameof | 6 | -| CompileTimeOperators.cs:26:7:26:22 | enter GotoInTryFinally | CompileTimeOperators.cs:26:7:26:22 | exit GotoInTryFinally | 5 | +| CompileTimeOperators.cs:26:7:26:22 | enter GotoInTryFinally | CompileTimeOperators.cs:26:7:26:22 | exit GotoInTryFinally | 7 | | CompileTimeOperators.cs:28:10:28:10 | enter M | CompileTimeOperators.cs:37:13:37:40 | call to method WriteLine | 9 | | CompileTimeOperators.cs:28:10:28:10 | exit M | CompileTimeOperators.cs:28:10:28:10 | exit M | 1 | | CompileTimeOperators.cs:28:10:28:10 | exit M (abnormal) | CompileTimeOperators.cs:28:10:28:10 | exit M (abnormal) | 1 | | CompileTimeOperators.cs:39:9:39:34 | ...; | CompileTimeOperators.cs:39:9:39:33 | call to method WriteLine | 3 | | CompileTimeOperators.cs:40:9:40:11 | End: | CompileTimeOperators.cs:28:10:28:10 | exit M (normal) | 5 | -| ConditionalAccess.cs:1:7:1:23 | enter ConditionalAccess | ConditionalAccess.cs:1:7:1:23 | exit ConditionalAccess | 5 | +| ConditionalAccess.cs:1:7:1:23 | enter ConditionalAccess | ConditionalAccess.cs:1:7:1:23 | exit ConditionalAccess | 7 | | ConditionalAccess.cs:3:12:3:13 | enter M1 | ConditionalAccess.cs:3:26:3:26 | access to parameter i | 2 | | ConditionalAccess.cs:3:12:3:13 | exit M1 (normal) | ConditionalAccess.cs:3:12:3:13 | exit M1 | 2 | | ConditionalAccess.cs:3:26:3:38 | call to method ToString | ConditionalAccess.cs:3:26:3:38 | call to method ToString | 1 | @@ -245,7 +245,7 @@ | ConditionalAccess.cs:32:10:32:11 | exit M8 (normal) | ConditionalAccess.cs:32:10:32:11 | exit M8 | 2 | | ConditionalAccess.cs:35:9:35:24 | call to method Out | ConditionalAccess.cs:35:9:35:24 | call to method Out | 1 | | ConditionalAccess.cs:41:26:41:38 | enter CommaJoinWith | ConditionalAccess.cs:41:26:41:38 | exit CommaJoinWith | 8 | -| Conditions.cs:1:7:1:16 | enter Conditions | Conditions.cs:1:7:1:16 | exit Conditions | 5 | +| Conditions.cs:1:7:1:16 | enter Conditions | Conditions.cs:1:7:1:16 | exit Conditions | 7 | | Conditions.cs:3:10:3:19 | enter IncrOrDecr | Conditions.cs:5:13:5:15 | access to parameter inc | 4 | | Conditions.cs:3:10:3:19 | exit IncrOrDecr (normal) | Conditions.cs:3:10:3:19 | exit IncrOrDecr | 2 | | Conditions.cs:6:13:6:16 | ...; | Conditions.cs:6:13:6:15 | ...++ | 3 | @@ -334,7 +334,7 @@ | Conditions.cs:145:27:145:29 | "b" | Conditions.cs:145:27:145:29 | "b" | 1 | | Conditions.cs:147:13:147:49 | ...; | Conditions.cs:147:13:147:48 | call to method WriteLine | 6 | | Conditions.cs:149:13:149:49 | ...; | Conditions.cs:149:13:149:48 | call to method WriteLine | 6 | -| ExitMethods.cs:6:7:6:17 | enter ExitMethods | ExitMethods.cs:6:7:6:17 | exit ExitMethods | 5 | +| ExitMethods.cs:6:7:6:17 | enter ExitMethods | ExitMethods.cs:6:7:6:17 | exit ExitMethods | 7 | | ExitMethods.cs:8:10:8:11 | enter M1 | ExitMethods.cs:8:10:8:11 | exit M1 | 8 | | ExitMethods.cs:14:10:14:11 | enter M2 | ExitMethods.cs:14:10:14:11 | exit M2 | 8 | | ExitMethods.cs:20:10:20:11 | enter M3 | ExitMethods.cs:20:10:20:11 | exit M3 | 7 | @@ -383,7 +383,7 @@ | Extensions.cs:10:24:10:29 | enter ToBool | Extensions.cs:10:24:10:29 | exit ToBool | 8 | | Extensions.cs:15:23:15:33 | enter CallToInt32 | Extensions.cs:15:23:15:33 | exit CallToInt32 | 5 | | Extensions.cs:20:17:20:20 | enter Main | Extensions.cs:20:17:20:20 | exit Main | 20 | -| Finally.cs:3:14:3:20 | enter Finally | Finally.cs:3:14:3:20 | exit Finally | 5 | +| Finally.cs:3:14:3:20 | enter Finally | Finally.cs:3:14:3:20 | exit Finally | 7 | | Finally.cs:7:10:7:11 | enter M1 | Finally.cs:15:13:15:40 | call to method WriteLine | 11 | | Finally.cs:7:10:7:11 | exit M1 | Finally.cs:7:10:7:11 | exit M1 | 1 | | Finally.cs:7:10:7:11 | exit M1 (abnormal) | Finally.cs:7:10:7:11 | exit M1 (abnormal) | 1 | @@ -464,9 +464,9 @@ | Finally.cs:161:30:161:30 | Exception e | Finally.cs:161:39:161:54 | ... == ... | 5 | | Finally.cs:162:13:164:13 | {...} | Finally.cs:163:17:163:42 | call to method WriteLine | 6 | | Finally.cs:165:13:168:13 | catch {...} | Finally.cs:167:17:167:37 | call to method WriteLine | 5 | -| Finally.cs:172:11:172:20 | enter ExceptionA | Finally.cs:172:11:172:20 | exit ExceptionA | 5 | -| Finally.cs:173:11:173:20 | enter ExceptionB | Finally.cs:173:11:173:20 | exit ExceptionB | 5 | -| Finally.cs:174:11:174:20 | enter ExceptionC | Finally.cs:174:11:174:20 | exit ExceptionC | 5 | +| Finally.cs:172:11:172:20 | enter ExceptionA | Finally.cs:172:11:172:20 | exit ExceptionA | 7 | +| Finally.cs:173:11:173:20 | enter ExceptionB | Finally.cs:173:11:173:20 | exit ExceptionB | 7 | +| Finally.cs:174:11:174:20 | enter ExceptionC | Finally.cs:174:11:174:20 | exit ExceptionC | 7 | | Finally.cs:176:10:176:11 | enter M9 | Finally.cs:180:17:180:18 | access to parameter b1 | 6 | | Finally.cs:176:10:176:11 | exit M9 | Finally.cs:176:10:176:11 | exit M9 | 1 | | Finally.cs:176:10:176:11 | exit M9 (abnormal) | Finally.cs:176:10:176:11 | exit M9 (abnormal) | 1 | @@ -511,7 +511,7 @@ | Finally.cs:263:10:263:12 | exit M13 | Finally.cs:263:10:263:12 | exit M13 | 1 | | Finally.cs:263:10:263:12 | exit M13 (abnormal) | Finally.cs:263:10:263:12 | exit M13 (abnormal) | 1 | | Finally.cs:263:10:263:12 | exit M13 (normal) | Finally.cs:263:10:263:12 | exit M13 (normal) | 1 | -| Foreach.cs:4:7:4:13 | enter Foreach | Foreach.cs:4:7:4:13 | exit Foreach | 5 | +| Foreach.cs:4:7:4:13 | enter Foreach | Foreach.cs:4:7:4:13 | exit Foreach | 7 | | Foreach.cs:6:10:6:11 | enter M1 | Foreach.cs:8:29:8:32 | access to parameter args | 3 | | Foreach.cs:6:10:6:11 | exit M1 (normal) | Foreach.cs:6:10:6:11 | exit M1 | 2 | | Foreach.cs:8:9:9:13 | foreach (... ... in ...) ... | Foreach.cs:8:9:9:13 | foreach (... ... in ...) ... | 1 | @@ -539,19 +539,22 @@ | Foreach.cs:36:10:36:11 | exit M6 (normal) | Foreach.cs:36:10:36:11 | exit M6 | 2 | | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | 1 | | Foreach.cs:38:26:38:26 | String x | Foreach.cs:39:11:39:11 | ; | 4 | +| Initializers.cs:3:7:3:18 | enter | Initializers.cs:3:7:3:18 | exit | 14 | | Initializers.cs:3:7:3:18 | enter Initializers | Initializers.cs:3:7:3:18 | exit Initializers | 4 | -| Initializers.cs:8:5:8:16 | enter Initializers | Initializers.cs:8:5:8:16 | exit Initializers | 16 | -| Initializers.cs:10:5:10:16 | enter Initializers | Initializers.cs:10:5:10:16 | exit Initializers | 16 | +| Initializers.cs:8:5:8:16 | enter Initializers | Initializers.cs:8:5:8:16 | exit Initializers | 7 | +| Initializers.cs:10:5:10:16 | enter Initializers | Initializers.cs:10:5:10:16 | exit Initializers | 7 | | Initializers.cs:12:10:12:10 | enter M | Initializers.cs:12:10:12:10 | exit M | 22 | | Initializers.cs:18:16:18:16 | enter H | Initializers.cs:18:16:18:16 | exit H | 5 | -| Initializers.cs:20:11:20:23 | enter NoConstructor | Initializers.cs:20:11:20:23 | exit NoConstructor | 11 | -| Initializers.cs:31:9:31:11 | enter Sub | Initializers.cs:31:9:31:11 | exit Sub | 12 | +| Initializers.cs:20:11:20:23 | enter | Initializers.cs:20:11:20:23 | exit | 9 | +| Initializers.cs:20:11:20:23 | enter NoConstructor | Initializers.cs:20:11:20:23 | exit NoConstructor | 7 | +| Initializers.cs:26:11:26:13 | enter | Initializers.cs:26:11:26:13 | exit | 6 | +| Initializers.cs:31:9:31:11 | enter Sub | Initializers.cs:31:9:31:11 | exit Sub | 11 | | Initializers.cs:33:9:33:11 | enter Sub | Initializers.cs:33:9:33:11 | exit Sub | 9 | -| Initializers.cs:35:9:35:11 | enter Sub | Initializers.cs:35:9:35:11 | exit Sub | 14 | -| Initializers.cs:39:7:39:23 | enter IndexInitializers | Initializers.cs:39:7:39:23 | exit IndexInitializers | 5 | -| Initializers.cs:41:11:41:18 | enter Compound | Initializers.cs:41:11:41:18 | exit Compound | 5 | +| Initializers.cs:35:9:35:11 | enter Sub | Initializers.cs:35:9:35:11 | exit Sub | 13 | +| Initializers.cs:39:7:39:23 | enter IndexInitializers | Initializers.cs:39:7:39:23 | exit IndexInitializers | 7 | +| Initializers.cs:41:11:41:18 | enter Compound | Initializers.cs:41:11:41:18 | exit Compound | 7 | | Initializers.cs:51:10:51:13 | enter Test | Initializers.cs:51:10:51:13 | exit Test | 105 | -| LoopUnrolling.cs:5:7:5:19 | enter LoopUnrolling | LoopUnrolling.cs:5:7:5:19 | exit LoopUnrolling | 5 | +| LoopUnrolling.cs:5:7:5:19 | enter LoopUnrolling | LoopUnrolling.cs:5:7:5:19 | exit LoopUnrolling | 7 | | LoopUnrolling.cs:7:10:7:11 | enter M1 | LoopUnrolling.cs:9:13:9:28 | ... == ... | 7 | | LoopUnrolling.cs:7:10:7:11 | exit M1 (normal) | LoopUnrolling.cs:7:10:7:11 | exit M1 | 2 | | LoopUnrolling.cs:10:13:10:19 | return ...; | LoopUnrolling.cs:10:13:10:19 | return ...; | 1 | @@ -609,9 +612,9 @@ | LoopUnrolling.cs:94:10:94:12 | exit M11 (normal) | LoopUnrolling.cs:94:10:94:12 | exit M11 | 2 | | LoopUnrolling.cs:97:9:100:9 | foreach (... ... in ...) ... | LoopUnrolling.cs:97:9:100:9 | foreach (... ... in ...) ... | 1 | | LoopUnrolling.cs:97:22:97:22 | String x | LoopUnrolling.cs:99:13:99:32 | call to method WriteLine | 5 | -| MultiImplementationA.cs:4:7:4:8 | call to constructor Object | MultiImplementationA.cs:4:7:4:8 | {...} | 2 | | MultiImplementationA.cs:4:7:4:8 | enter C1 | MultiImplementationA.cs:4:7:4:8 | enter C1 | 1 | | MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | MultiImplementationA.cs:4:7:4:8 | exit C1 | 2 | +| MultiImplementationA.cs:4:7:4:8 | this access | MultiImplementationA.cs:4:7:4:8 | {...} | 4 | | MultiImplementationA.cs:6:22:6:31 | enter get_P1 | MultiImplementationA.cs:6:22:6:31 | enter get_P1 | 1 | | MultiImplementationA.cs:6:22:6:31 | exit get_P1 | MultiImplementationA.cs:6:22:6:31 | exit get_P1 | 1 | | MultiImplementationA.cs:6:28:6:31 | null | MultiImplementationA.cs:6:22:6:31 | exit get_P1 (abnormal) | 3 | @@ -624,6 +627,9 @@ | MultiImplementationA.cs:8:16:8:16 | enter M | MultiImplementationA.cs:8:16:8:16 | enter M | 1 | | MultiImplementationA.cs:8:16:8:16 | exit M | MultiImplementationA.cs:8:16:8:16 | exit M | 1 | | MultiImplementationA.cs:8:29:8:32 | null | MultiImplementationA.cs:8:16:8:16 | exit M (abnormal) | 3 | +| MultiImplementationA.cs:11:7:11:8 | enter | MultiImplementationA.cs:11:7:11:8 | enter | 1 | +| MultiImplementationA.cs:11:7:11:8 | exit (normal) | MultiImplementationA.cs:11:7:11:8 | exit | 2 | +| MultiImplementationA.cs:13:16:13:16 | this access | MultiImplementationA.cs:24:32:24:34 | ... = ... | 7 | | MultiImplementationA.cs:14:31:14:31 | access to parameter i | MultiImplementationA.cs:14:31:14:31 | exit get_Item (normal) | 2 | | MultiImplementationA.cs:14:31:14:31 | enter get_Item | MultiImplementationA.cs:14:31:14:31 | enter get_Item | 1 | | MultiImplementationA.cs:14:31:14:31 | exit get_Item | MultiImplementationA.cs:14:31:14:31 | exit get_Item | 1 | @@ -637,9 +643,9 @@ | MultiImplementationA.cs:16:17:16:18 | exit M1 (normal) | MultiImplementationA.cs:16:17:16:18 | exit M1 | 2 | | MultiImplementationA.cs:17:5:19:5 | {...} | MultiImplementationA.cs:18:9:18:22 | M2(...) | 2 | | MultiImplementationA.cs:18:9:18:22 | enter M2 | MultiImplementationA.cs:18:9:18:22 | exit M2 | 4 | -| MultiImplementationA.cs:20:12:20:13 | call to constructor Object | MultiImplementationA.cs:20:12:20:13 | exit C2 (normal) | 14 | | MultiImplementationA.cs:20:12:20:13 | enter C2 | MultiImplementationA.cs:20:12:20:13 | enter C2 | 1 | | MultiImplementationA.cs:20:12:20:13 | exit C2 | MultiImplementationA.cs:20:12:20:13 | exit C2 | 1 | +| MultiImplementationA.cs:20:12:20:13 | this access | MultiImplementationA.cs:20:12:20:13 | exit C2 (normal) | 9 | | MultiImplementationA.cs:21:12:21:13 | enter C2 | MultiImplementationA.cs:21:12:21:13 | enter C2 | 1 | | MultiImplementationA.cs:21:12:21:13 | exit C2 (normal) | MultiImplementationA.cs:21:12:21:13 | exit C2 | 2 | | MultiImplementationA.cs:21:24:21:24 | 0 | MultiImplementationA.cs:21:27:21:29 | {...} | 3 | @@ -649,35 +655,36 @@ | MultiImplementationA.cs:23:28:23:35 | enter implicit conversion | MultiImplementationA.cs:23:28:23:35 | enter implicit conversion | 1 | | MultiImplementationA.cs:23:28:23:35 | exit implicit conversion | MultiImplementationA.cs:23:28:23:35 | exit implicit conversion | 1 | | MultiImplementationA.cs:23:50:23:53 | null | MultiImplementationA.cs:23:28:23:35 | exit implicit conversion (normal) | 2 | -| MultiImplementationA.cs:28:7:28:8 | call to constructor Object | MultiImplementationA.cs:28:7:28:8 | {...} | 2 | | MultiImplementationA.cs:28:7:28:8 | enter C3 | MultiImplementationA.cs:28:7:28:8 | enter C3 | 1 | | MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | MultiImplementationA.cs:28:7:28:8 | exit C3 | 2 | +| MultiImplementationA.cs:28:7:28:8 | this access | MultiImplementationA.cs:28:7:28:8 | {...} | 4 | | MultiImplementationA.cs:30:21:30:23 | enter get_P3 | MultiImplementationA.cs:30:21:30:23 | exit get_P3 | 5 | -| MultiImplementationA.cs:34:15:34:16 | call to constructor Object | MultiImplementationA.cs:34:15:34:16 | {...} | 2 | | MultiImplementationA.cs:34:15:34:16 | enter C4 | MultiImplementationA.cs:34:15:34:16 | enter C4 | 1 | | MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | MultiImplementationA.cs:34:15:34:16 | exit C4 | 2 | +| MultiImplementationA.cs:34:15:34:16 | this access | MultiImplementationA.cs:34:15:34:16 | {...} | 4 | | MultiImplementationA.cs:36:9:36:10 | enter M1 | MultiImplementationA.cs:36:9:36:10 | enter M1 | 1 | | MultiImplementationA.cs:36:9:36:10 | exit M1 | MultiImplementationA.cs:36:9:36:10 | exit M1 | 1 | | MultiImplementationA.cs:36:14:36:28 | {...} | MultiImplementationA.cs:36:9:36:10 | exit M1 (abnormal) | 4 | | MultiImplementationA.cs:37:9:37:10 | enter M2 | MultiImplementationA.cs:37:9:37:10 | exit M2 | 6 | -| MultiImplementationB.cs:1:7:1:8 | call to constructor Object | MultiImplementationB.cs:1:7:1:8 | {...} | 2 | +| MultiImplementationB.cs:1:7:1:8 | this access | MultiImplementationB.cs:1:7:1:8 | {...} | 4 | | MultiImplementationB.cs:3:22:3:22 | 0 | MultiImplementationA.cs:6:22:6:31 | exit get_P1 (normal) | 2 | | MultiImplementationB.cs:4:25:4:37 | {...} | MultiImplementationA.cs:7:21:7:23 | exit get_P2 (normal) | 4 | | MultiImplementationB.cs:4:43:4:45 | {...} | MultiImplementationA.cs:7:41:7:43 | exit set_P2 (normal) | 2 | | MultiImplementationB.cs:5:23:5:23 | 2 | MultiImplementationA.cs:8:16:8:16 | exit M (normal) | 2 | +| MultiImplementationB.cs:11:16:11:16 | this access | MultiImplementationB.cs:22:32:22:34 | ... = ... | 7 | | MultiImplementationB.cs:12:37:12:40 | null | MultiImplementationA.cs:14:31:14:31 | exit get_Item (abnormal) | 3 | | MultiImplementationB.cs:13:40:13:54 | {...} | MultiImplementationA.cs:15:36:15:38 | exit get_Item (abnormal) | 4 | | MultiImplementationB.cs:13:60:13:62 | {...} | MultiImplementationB.cs:13:60:13:62 | {...} | 1 | | MultiImplementationB.cs:15:5:17:5 | {...} | MultiImplementationB.cs:16:9:16:31 | M2(...) | 2 | | MultiImplementationB.cs:16:9:16:31 | enter M2 | MultiImplementationB.cs:16:9:16:31 | exit M2 | 5 | -| MultiImplementationB.cs:18:12:18:13 | call to constructor Object | MultiImplementationA.cs:20:12:20:13 | exit C2 (abnormal) | 12 | +| MultiImplementationB.cs:18:12:18:13 | this access | MultiImplementationA.cs:20:12:20:13 | exit C2 (abnormal) | 7 | | MultiImplementationB.cs:19:24:19:24 | 1 | MultiImplementationB.cs:19:27:19:29 | {...} | 3 | | MultiImplementationB.cs:20:11:20:25 | {...} | MultiImplementationA.cs:22:6:22:7 | exit ~C2 (abnormal) | 4 | | MultiImplementationB.cs:21:56:21:59 | null | MultiImplementationA.cs:23:28:23:35 | exit implicit conversion (abnormal) | 3 | -| MultiImplementationB.cs:25:7:25:8 | call to constructor Object | MultiImplementationB.cs:25:7:25:8 | {...} | 2 | -| MultiImplementationB.cs:30:15:30:16 | call to constructor Object | MultiImplementationB.cs:30:15:30:16 | {...} | 2 | +| MultiImplementationB.cs:25:7:25:8 | this access | MultiImplementationB.cs:25:7:25:8 | {...} | 4 | +| MultiImplementationB.cs:30:15:30:16 | this access | MultiImplementationB.cs:30:15:30:16 | {...} | 4 | | MultiImplementationB.cs:32:17:32:17 | 0 | MultiImplementationA.cs:36:9:36:10 | exit M1 (normal) | 2 | -| NullCoalescing.cs:1:7:1:20 | enter NullCoalescing | NullCoalescing.cs:1:7:1:20 | exit NullCoalescing | 5 | +| NullCoalescing.cs:1:7:1:20 | enter NullCoalescing | NullCoalescing.cs:1:7:1:20 | exit NullCoalescing | 7 | | NullCoalescing.cs:3:9:3:10 | enter M1 | NullCoalescing.cs:3:23:3:23 | access to parameter i | 2 | | NullCoalescing.cs:3:23:3:28 | ... ?? ... | NullCoalescing.cs:3:9:3:10 | exit M1 | 3 | | NullCoalescing.cs:3:28:3:28 | 0 | NullCoalescing.cs:3:28:3:28 | 0 | 1 | @@ -715,9 +722,10 @@ | NullCoalescing.cs:15:31:15:31 | 0 | NullCoalescing.cs:16:17:16:18 | "" | 5 | | NullCoalescing.cs:16:17:16:25 | ... ?? ... | NullCoalescing.cs:17:13:17:19 | (...) ... | 5 | | NullCoalescing.cs:17:13:17:24 | ... ?? ... | NullCoalescing.cs:13:10:13:11 | exit M6 | 4 | -| PartialImplementationA.cs:3:12:3:18 | enter Partial | PartialImplementationA.cs:3:12:3:18 | exit Partial | 12 | -| PartialImplementationB.cs:4:12:4:18 | enter Partial | PartialImplementationB.cs:4:12:4:18 | exit Partial | 12 | -| Patterns.cs:3:7:3:14 | enter Patterns | Patterns.cs:3:7:3:14 | exit Patterns | 5 | +| PartialImplementationA.cs:1:15:1:21 | enter | PartialImplementationA.cs:1:15:1:21 | exit | 10 | +| PartialImplementationA.cs:3:12:3:18 | enter Partial | PartialImplementationA.cs:3:12:3:18 | exit Partial | 7 | +| PartialImplementationB.cs:4:12:4:18 | enter Partial | PartialImplementationB.cs:4:12:4:18 | exit Partial | 7 | +| Patterns.cs:3:7:3:14 | enter Patterns | Patterns.cs:3:7:3:14 | exit Patterns | 7 | | Patterns.cs:5:10:5:11 | enter M1 | Patterns.cs:8:18:8:23 | Int32 i1 | 8 | | Patterns.cs:8:13:8:23 | [false] ... is ... | Patterns.cs:8:13:8:23 | [false] ... is ... | 1 | | Patterns.cs:8:13:8:23 | [true] ... is ... | Patterns.cs:8:13:8:23 | [true] ... is ... | 1 | @@ -811,7 +819,7 @@ | Patterns.cs:95:29:95:38 | [no-match] ... or ... | Patterns.cs:95:29:95:38 | [no-match] ... or ... | 1 | | Patterns.cs:95:36:95:38 | access to constant B | Patterns.cs:95:36:95:38 | access to constant B | 1 | | Patterns.cs:96:9:98:9 | {...} | Patterns.cs:97:13:97:38 | call to method WriteLine | 4 | -| PostDominance.cs:3:7:3:19 | enter PostDominance | PostDominance.cs:3:7:3:19 | exit PostDominance | 5 | +| PostDominance.cs:3:7:3:19 | enter PostDominance | PostDominance.cs:3:7:3:19 | exit PostDominance | 7 | | PostDominance.cs:5:10:5:11 | enter M1 | PostDominance.cs:5:10:5:11 | exit M1 | 7 | | PostDominance.cs:10:10:10:11 | enter M2 | PostDominance.cs:12:18:12:21 | null | 5 | | PostDominance.cs:10:10:10:11 | exit M2 (normal) | PostDominance.cs:10:10:10:11 | exit M2 | 2 | @@ -825,11 +833,11 @@ | PostDominance.cs:19:13:19:21 | [true] ... is ... | PostDominance.cs:19:13:19:21 | [true] ... is ... | 1 | | PostDominance.cs:20:45:20:53 | nameof(...) | PostDominance.cs:17:10:17:11 | exit M3 (abnormal) | 4 | | PostDominance.cs:21:9:21:29 | ...; | PostDominance.cs:17:10:17:11 | exit M3 (normal) | 4 | -| Qualifiers.cs:1:7:1:16 | enter Qualifiers | Qualifiers.cs:1:7:1:16 | exit Qualifiers | 5 | +| Qualifiers.cs:1:7:1:16 | enter Qualifiers | Qualifiers.cs:1:7:1:16 | exit Qualifiers | 7 | | Qualifiers.cs:7:16:7:21 | enter Method | Qualifiers.cs:7:16:7:21 | exit Method | 4 | | Qualifiers.cs:8:23:8:34 | enter StaticMethod | Qualifiers.cs:8:23:8:34 | exit StaticMethod | 4 | | Qualifiers.cs:10:10:10:10 | enter M | Qualifiers.cs:10:10:10:10 | exit M | 58 | -| Switch.cs:3:7:3:12 | enter Switch | Switch.cs:3:7:3:12 | exit Switch | 5 | +| Switch.cs:3:7:3:12 | enter Switch | Switch.cs:3:7:3:12 | exit Switch | 7 | | Switch.cs:5:10:5:11 | enter M1 | Switch.cs:5:10:5:11 | exit M1 | 6 | | Switch.cs:10:10:10:11 | enter M2 | Switch.cs:14:18:14:20 | "a" | 6 | | Switch.cs:10:10:10:11 | exit M2 | Switch.cs:10:10:10:11 | exit M2 | 1 | @@ -947,20 +955,20 @@ | Switch.cs:171:13:171:19 | case ...: | Switch.cs:171:18:171:18 | 3 | 2 | | Switch.cs:172:17:172:46 | ...; | Switch.cs:173:17:173:22 | break; | 4 | | Switch.cs:174:13:174:20 | default: | Switch.cs:176:17:176:22 | break; | 5 | -| TypeAccesses.cs:1:7:1:18 | enter TypeAccesses | TypeAccesses.cs:1:7:1:18 | exit TypeAccesses | 5 | +| TypeAccesses.cs:1:7:1:18 | enter TypeAccesses | TypeAccesses.cs:1:7:1:18 | exit TypeAccesses | 7 | | TypeAccesses.cs:3:10:3:10 | enter M | TypeAccesses.cs:7:18:7:22 | Int32 j | 13 | | TypeAccesses.cs:7:13:7:22 | [false] ... is ... | TypeAccesses.cs:7:13:7:22 | [false] ... is ... | 1 | | TypeAccesses.cs:7:13:7:22 | [true] ... is ... | TypeAccesses.cs:7:13:7:22 | [true] ... is ... | 1 | | TypeAccesses.cs:7:25:7:25 | ; | TypeAccesses.cs:7:25:7:25 | ; | 1 | | TypeAccesses.cs:8:9:8:28 | ... ...; | TypeAccesses.cs:3:10:3:10 | exit M | 5 | -| VarDecls.cs:3:7:3:14 | enter VarDecls | VarDecls.cs:3:7:3:14 | exit VarDecls | 5 | +| VarDecls.cs:3:7:3:14 | enter VarDecls | VarDecls.cs:3:7:3:14 | exit VarDecls | 7 | | VarDecls.cs:5:18:5:19 | enter M1 | VarDecls.cs:5:18:5:19 | exit M1 | 19 | | VarDecls.cs:13:12:13:13 | enter M2 | VarDecls.cs:13:12:13:13 | exit M2 | 13 | | VarDecls.cs:19:7:19:8 | enter M3 | VarDecls.cs:25:20:25:20 | access to parameter b | 11 | | VarDecls.cs:25:20:25:28 | ... ? ... : ... | VarDecls.cs:19:7:19:8 | exit M3 | 4 | | VarDecls.cs:25:24:25:24 | access to local variable x | VarDecls.cs:25:24:25:24 | access to local variable x | 1 | | VarDecls.cs:25:28:25:28 | access to local variable y | VarDecls.cs:25:28:25:28 | access to local variable y | 1 | -| VarDecls.cs:28:11:28:11 | enter C | VarDecls.cs:28:11:28:11 | exit C | 5 | +| VarDecls.cs:28:11:28:11 | enter C | VarDecls.cs:28:11:28:11 | exit C | 7 | | VarDecls.cs:28:41:28:47 | enter Dispose | VarDecls.cs:28:41:28:47 | exit Dispose | 4 | | cflow.cs:5:17:5:20 | enter Main | cflow.cs:11:13:11:17 | ... > ... | 15 | | cflow.cs:5:17:5:20 | exit Main (normal) | cflow.cs:5:17:5:20 | exit Main | 2 | @@ -1034,7 +1042,7 @@ | cflow.cs:127:48:127:49 | "" | cflow.cs:127:48:127:49 | "" | 1 | | cflow.cs:127:53:127:57 | this access | cflow.cs:127:53:127:57 | access to field Field | 2 | | cflow.cs:127:62:127:64 | enter set_Prop | cflow.cs:127:62:127:64 | exit set_Prop | 8 | -| cflow.cs:129:5:129:15 | enter ControlFlow | cflow.cs:129:5:129:15 | exit ControlFlow | 9 | +| cflow.cs:129:5:129:15 | enter ControlFlow | cflow.cs:129:5:129:15 | exit ControlFlow | 11 | | cflow.cs:134:5:134:15 | enter ControlFlow | cflow.cs:134:5:134:15 | exit ControlFlow | 9 | | cflow.cs:136:12:136:22 | enter ControlFlow | cflow.cs:136:12:136:22 | exit ControlFlow | 8 | | cflow.cs:138:40:138:40 | enter + | cflow.cs:138:40:138:40 | exit + | 9 | @@ -1132,17 +1140,17 @@ | cflow.cs:264:25:264:25 | access to local variable i | cflow.cs:264:25:264:30 | ... < ... | 3 | | cflow.cs:265:9:267:9 | {...} | cflow.cs:264:33:264:35 | ...++ | 5 | | cflow.cs:268:9:276:9 | try {...} ... | cflow.cs:275:13:275:41 | call to method WriteLine | 7 | -| cflow.cs:282:5:282:18 | enter ControlFlowSub | cflow.cs:282:5:282:18 | exit ControlFlowSub | 5 | +| cflow.cs:282:5:282:18 | enter ControlFlowSub | cflow.cs:282:5:282:18 | exit ControlFlowSub | 7 | | cflow.cs:284:5:284:18 | enter ControlFlowSub | cflow.cs:284:5:284:18 | exit ControlFlowSub | 5 | | cflow.cs:286:5:286:18 | enter ControlFlowSub | cflow.cs:286:5:286:18 | exit ControlFlowSub | 7 | -| cflow.cs:289:7:289:18 | enter DelegateCall | cflow.cs:289:7:289:18 | exit DelegateCall | 5 | +| cflow.cs:289:7:289:18 | enter DelegateCall | cflow.cs:289:7:289:18 | exit DelegateCall | 7 | | cflow.cs:291:12:291:12 | enter M | cflow.cs:291:12:291:12 | exit M | 6 | -| cflow.cs:296:5:296:25 | enter NegationInConstructor | cflow.cs:296:5:296:25 | exit NegationInConstructor | 5 | +| cflow.cs:296:5:296:25 | enter NegationInConstructor | cflow.cs:296:5:296:25 | exit NegationInConstructor | 7 | | cflow.cs:298:10:298:10 | enter M | cflow.cs:300:46:300:50 | ... > ... | 7 | | cflow.cs:300:44:300:51 | [false] !... | cflow.cs:300:44:300:51 | [false] !... | 1 | | cflow.cs:300:44:300:51 | [true] !... | cflow.cs:300:44:300:51 | [true] !... | 1 | | cflow.cs:300:44:300:64 | ... && ... | cflow.cs:298:10:298:10 | exit M | 5 | | cflow.cs:300:56:300:56 | access to parameter s | cflow.cs:300:56:300:64 | ... != ... | 3 | -| cflow.cs:304:7:304:18 | enter LambdaGetter | cflow.cs:304:7:304:18 | exit LambdaGetter | 5 | +| cflow.cs:304:7:304:18 | enter LambdaGetter | cflow.cs:304:7:304:18 | exit LambdaGetter | 7 | | cflow.cs:306:60:310:5 | enter (...) => ... | cflow.cs:306:60:310:5 | exit (...) => ... | 9 | | cflow.cs:306:60:310:5 | enter get__getter | cflow.cs:306:60:310:5 | exit get__getter | 4 | diff --git a/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected b/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected index f5368b5c7e9..8240e61a419 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected @@ -1,7 +1,9 @@ dominance | AccessorCalls.cs:1:7:1:19 | call to constructor Object | AccessorCalls.cs:1:7:1:19 | {...} | -| AccessorCalls.cs:1:7:1:19 | enter AccessorCalls | AccessorCalls.cs:1:7:1:19 | call to constructor Object | +| AccessorCalls.cs:1:7:1:19 | call to method | AccessorCalls.cs:1:7:1:19 | call to constructor Object | +| AccessorCalls.cs:1:7:1:19 | enter AccessorCalls | AccessorCalls.cs:1:7:1:19 | this access | | AccessorCalls.cs:1:7:1:19 | exit AccessorCalls (normal) | AccessorCalls.cs:1:7:1:19 | exit AccessorCalls | +| AccessorCalls.cs:1:7:1:19 | this access | AccessorCalls.cs:1:7:1:19 | call to method | | AccessorCalls.cs:1:7:1:19 | {...} | AccessorCalls.cs:1:7:1:19 | exit AccessorCalls (normal) | | AccessorCalls.cs:5:23:5:25 | enter get_Item | AccessorCalls.cs:5:30:5:30 | access to parameter i | | AccessorCalls.cs:5:23:5:25 | exit get_Item (normal) | AccessorCalls.cs:5:23:5:25 | exit get_Item | @@ -305,8 +307,10 @@ dominance | AccessorCalls.cs:73:78:73:81 | dynamic access to element | AccessorCalls.cs:73:74:73:82 | (..., ...) | | AccessorCalls.cs:73:80:73:80 | 1 | AccessorCalls.cs:73:78:73:81 | dynamic access to element | | ArrayCreation.cs:1:7:1:19 | call to constructor Object | ArrayCreation.cs:1:7:1:19 | {...} | -| ArrayCreation.cs:1:7:1:19 | enter ArrayCreation | ArrayCreation.cs:1:7:1:19 | call to constructor Object | +| ArrayCreation.cs:1:7:1:19 | call to method | ArrayCreation.cs:1:7:1:19 | call to constructor Object | +| ArrayCreation.cs:1:7:1:19 | enter ArrayCreation | ArrayCreation.cs:1:7:1:19 | this access | | ArrayCreation.cs:1:7:1:19 | exit ArrayCreation (normal) | ArrayCreation.cs:1:7:1:19 | exit ArrayCreation | +| ArrayCreation.cs:1:7:1:19 | this access | ArrayCreation.cs:1:7:1:19 | call to method | | ArrayCreation.cs:1:7:1:19 | {...} | ArrayCreation.cs:1:7:1:19 | exit ArrayCreation (normal) | | ArrayCreation.cs:3:11:3:12 | enter M1 | ArrayCreation.cs:3:27:3:27 | 0 | | ArrayCreation.cs:3:11:3:12 | exit M1 (normal) | ArrayCreation.cs:3:11:3:12 | exit M1 | @@ -337,8 +341,10 @@ dominance | ArrayCreation.cs:9:45:9:45 | 2 | ArrayCreation.cs:9:48:9:48 | 3 | | ArrayCreation.cs:9:48:9:48 | 3 | ArrayCreation.cs:9:43:9:50 | { ..., ... } | | Assert.cs:5:7:5:17 | call to constructor Object | Assert.cs:5:7:5:17 | {...} | -| Assert.cs:5:7:5:17 | enter AssertTests | Assert.cs:5:7:5:17 | call to constructor Object | +| Assert.cs:5:7:5:17 | call to method | Assert.cs:5:7:5:17 | call to constructor Object | +| Assert.cs:5:7:5:17 | enter AssertTests | Assert.cs:5:7:5:17 | this access | | Assert.cs:5:7:5:17 | exit AssertTests (normal) | Assert.cs:5:7:5:17 | exit AssertTests | +| Assert.cs:5:7:5:17 | this access | Assert.cs:5:7:5:17 | call to method | | Assert.cs:5:7:5:17 | {...} | Assert.cs:5:7:5:17 | exit AssertTests (normal) | | Assert.cs:7:10:7:11 | enter M1 | Assert.cs:8:5:12:5 | {...} | | Assert.cs:8:5:12:5 | {...} | Assert.cs:9:9:9:33 | ... ...; | @@ -708,8 +714,10 @@ dominance | Assert.cs:140:33:140:34 | access to parameter b3 | Assert.cs:140:9:140:35 | call to method AssertTrueFalse | | Assert.cs:141:9:141:15 | return ...; | Assert.cs:138:10:138:12 | exit M13 (normal) | | Assignments.cs:1:7:1:17 | call to constructor Object | Assignments.cs:1:7:1:17 | {...} | -| Assignments.cs:1:7:1:17 | enter Assignments | Assignments.cs:1:7:1:17 | call to constructor Object | +| Assignments.cs:1:7:1:17 | call to method | Assignments.cs:1:7:1:17 | call to constructor Object | +| Assignments.cs:1:7:1:17 | enter Assignments | Assignments.cs:1:7:1:17 | this access | | Assignments.cs:1:7:1:17 | exit Assignments (normal) | Assignments.cs:1:7:1:17 | exit Assignments | +| Assignments.cs:1:7:1:17 | this access | Assignments.cs:1:7:1:17 | call to method | | Assignments.cs:1:7:1:17 | {...} | Assignments.cs:1:7:1:17 | exit Assignments (normal) | | Assignments.cs:3:10:3:10 | enter M | Assignments.cs:4:5:15:5 | {...} | | Assignments.cs:3:10:3:10 | exit M (normal) | Assignments.cs:3:10:3:10 | exit M | @@ -753,8 +761,10 @@ dominance | Assignments.cs:19:9:19:17 | return ...; | Assignments.cs:17:40:17:40 | exit + (normal) | | Assignments.cs:19:16:19:16 | access to parameter x | Assignments.cs:19:9:19:17 | return ...; | | BreakInTry.cs:1:7:1:16 | call to constructor Object | BreakInTry.cs:1:7:1:16 | {...} | -| BreakInTry.cs:1:7:1:16 | enter BreakInTry | BreakInTry.cs:1:7:1:16 | call to constructor Object | +| BreakInTry.cs:1:7:1:16 | call to method | BreakInTry.cs:1:7:1:16 | call to constructor Object | +| BreakInTry.cs:1:7:1:16 | enter BreakInTry | BreakInTry.cs:1:7:1:16 | this access | | BreakInTry.cs:1:7:1:16 | exit BreakInTry (normal) | BreakInTry.cs:1:7:1:16 | exit BreakInTry | +| BreakInTry.cs:1:7:1:16 | this access | BreakInTry.cs:1:7:1:16 | call to method | | BreakInTry.cs:1:7:1:16 | {...} | BreakInTry.cs:1:7:1:16 | exit BreakInTry (normal) | | BreakInTry.cs:3:10:3:11 | enter M1 | BreakInTry.cs:4:5:18:5 | {...} | | BreakInTry.cs:3:10:3:11 | exit M1 (normal) | BreakInTry.cs:3:10:3:11 | exit M1 | @@ -839,8 +849,10 @@ dominance | BreakInTry.cs:67:21:67:31 | ... == ... | BreakInTry.cs:68:21:68:26 | break; | | BreakInTry.cs:67:28:67:31 | null | BreakInTry.cs:67:21:67:31 | ... == ... | | CompileTimeOperators.cs:3:7:3:26 | call to constructor Object | CompileTimeOperators.cs:3:7:3:26 | {...} | -| CompileTimeOperators.cs:3:7:3:26 | enter CompileTimeOperators | CompileTimeOperators.cs:3:7:3:26 | call to constructor Object | +| CompileTimeOperators.cs:3:7:3:26 | call to method | CompileTimeOperators.cs:3:7:3:26 | call to constructor Object | +| CompileTimeOperators.cs:3:7:3:26 | enter CompileTimeOperators | CompileTimeOperators.cs:3:7:3:26 | this access | | CompileTimeOperators.cs:3:7:3:26 | exit CompileTimeOperators (normal) | CompileTimeOperators.cs:3:7:3:26 | exit CompileTimeOperators | +| CompileTimeOperators.cs:3:7:3:26 | this access | CompileTimeOperators.cs:3:7:3:26 | call to method | | CompileTimeOperators.cs:3:7:3:26 | {...} | CompileTimeOperators.cs:3:7:3:26 | exit CompileTimeOperators (normal) | | CompileTimeOperators.cs:5:9:5:15 | enter Default | CompileTimeOperators.cs:6:5:8:5 | {...} | | CompileTimeOperators.cs:5:9:5:15 | exit Default (normal) | CompileTimeOperators.cs:5:9:5:15 | exit Default | @@ -863,8 +875,10 @@ dominance | CompileTimeOperators.cs:22:9:22:25 | return ...; | CompileTimeOperators.cs:20:12:20:17 | exit Nameof (normal) | | CompileTimeOperators.cs:22:16:22:24 | nameof(...) | CompileTimeOperators.cs:22:9:22:25 | return ...; | | CompileTimeOperators.cs:26:7:26:22 | call to constructor Object | CompileTimeOperators.cs:26:7:26:22 | {...} | -| CompileTimeOperators.cs:26:7:26:22 | enter GotoInTryFinally | CompileTimeOperators.cs:26:7:26:22 | call to constructor Object | +| CompileTimeOperators.cs:26:7:26:22 | call to method | CompileTimeOperators.cs:26:7:26:22 | call to constructor Object | +| CompileTimeOperators.cs:26:7:26:22 | enter GotoInTryFinally | CompileTimeOperators.cs:26:7:26:22 | this access | | CompileTimeOperators.cs:26:7:26:22 | exit GotoInTryFinally (normal) | CompileTimeOperators.cs:26:7:26:22 | exit GotoInTryFinally | +| CompileTimeOperators.cs:26:7:26:22 | this access | CompileTimeOperators.cs:26:7:26:22 | call to method | | CompileTimeOperators.cs:26:7:26:22 | {...} | CompileTimeOperators.cs:26:7:26:22 | exit GotoInTryFinally (normal) | | CompileTimeOperators.cs:28:10:28:10 | enter M | CompileTimeOperators.cs:29:5:41:5 | {...} | | CompileTimeOperators.cs:29:5:41:5 | {...} | CompileTimeOperators.cs:30:9:38:9 | try {...} ... | @@ -884,8 +898,10 @@ dominance | CompileTimeOperators.cs:40:14:40:38 | ...; | CompileTimeOperators.cs:40:32:40:36 | "End" | | CompileTimeOperators.cs:40:32:40:36 | "End" | CompileTimeOperators.cs:40:14:40:37 | call to method WriteLine | | ConditionalAccess.cs:1:7:1:23 | call to constructor Object | ConditionalAccess.cs:1:7:1:23 | {...} | -| ConditionalAccess.cs:1:7:1:23 | enter ConditionalAccess | ConditionalAccess.cs:1:7:1:23 | call to constructor Object | +| ConditionalAccess.cs:1:7:1:23 | call to method | ConditionalAccess.cs:1:7:1:23 | call to constructor Object | +| ConditionalAccess.cs:1:7:1:23 | enter ConditionalAccess | ConditionalAccess.cs:1:7:1:23 | this access | | ConditionalAccess.cs:1:7:1:23 | exit ConditionalAccess (normal) | ConditionalAccess.cs:1:7:1:23 | exit ConditionalAccess | +| ConditionalAccess.cs:1:7:1:23 | this access | ConditionalAccess.cs:1:7:1:23 | call to method | | ConditionalAccess.cs:1:7:1:23 | {...} | ConditionalAccess.cs:1:7:1:23 | exit ConditionalAccess (normal) | | ConditionalAccess.cs:3:12:3:13 | enter M1 | ConditionalAccess.cs:3:26:3:26 | access to parameter i | | ConditionalAccess.cs:3:12:3:13 | exit M1 (normal) | ConditionalAccess.cs:3:12:3:13 | exit M1 | @@ -963,8 +979,10 @@ dominance | ConditionalAccess.cs:41:75:41:78 | ", " | ConditionalAccess.cs:41:70:41:78 | ... + ... | | ConditionalAccess.cs:41:82:41:83 | access to parameter s2 | ConditionalAccess.cs:41:70:41:83 | ... + ... | | Conditions.cs:1:7:1:16 | call to constructor Object | Conditions.cs:1:7:1:16 | {...} | -| Conditions.cs:1:7:1:16 | enter Conditions | Conditions.cs:1:7:1:16 | call to constructor Object | +| Conditions.cs:1:7:1:16 | call to method | Conditions.cs:1:7:1:16 | call to constructor Object | +| Conditions.cs:1:7:1:16 | enter Conditions | Conditions.cs:1:7:1:16 | this access | | Conditions.cs:1:7:1:16 | exit Conditions (normal) | Conditions.cs:1:7:1:16 | exit Conditions | +| Conditions.cs:1:7:1:16 | this access | Conditions.cs:1:7:1:16 | call to method | | Conditions.cs:1:7:1:16 | {...} | Conditions.cs:1:7:1:16 | exit Conditions (normal) | | Conditions.cs:3:10:3:19 | enter IncrOrDecr | Conditions.cs:4:5:9:5 | {...} | | Conditions.cs:3:10:3:19 | exit IncrOrDecr (normal) | Conditions.cs:3:10:3:19 | exit IncrOrDecr | @@ -1266,8 +1284,10 @@ dominance | Conditions.cs:149:44:149:46 | {...} | Conditions.cs:149:38:149:47 | $"..." | | Conditions.cs:149:45:149:45 | access to local variable s | Conditions.cs:149:44:149:46 | {...} | | ExitMethods.cs:6:7:6:17 | call to constructor Object | ExitMethods.cs:6:7:6:17 | {...} | -| ExitMethods.cs:6:7:6:17 | enter ExitMethods | ExitMethods.cs:6:7:6:17 | call to constructor Object | +| ExitMethods.cs:6:7:6:17 | call to method | ExitMethods.cs:6:7:6:17 | call to constructor Object | +| ExitMethods.cs:6:7:6:17 | enter ExitMethods | ExitMethods.cs:6:7:6:17 | this access | | ExitMethods.cs:6:7:6:17 | exit ExitMethods (normal) | ExitMethods.cs:6:7:6:17 | exit ExitMethods | +| ExitMethods.cs:6:7:6:17 | this access | ExitMethods.cs:6:7:6:17 | call to method | | ExitMethods.cs:6:7:6:17 | {...} | ExitMethods.cs:6:7:6:17 | exit ExitMethods (normal) | | ExitMethods.cs:8:10:8:11 | enter M1 | ExitMethods.cs:9:5:12:5 | {...} | | ExitMethods.cs:8:10:8:11 | exit M1 (normal) | ExitMethods.cs:8:10:8:11 | exit M1 | @@ -1464,8 +1484,10 @@ dominance | Extensions.cs:25:23:25:32 | access to method Parse | Extensions.cs:25:23:25:32 | delegate creation of type Func | | Extensions.cs:25:23:25:32 | delegate creation of type Func | Extensions.cs:25:9:25:33 | call to method ToBool | | Finally.cs:3:14:3:20 | call to constructor Object | Finally.cs:3:14:3:20 | {...} | -| Finally.cs:3:14:3:20 | enter Finally | Finally.cs:3:14:3:20 | call to constructor Object | +| Finally.cs:3:14:3:20 | call to method | Finally.cs:3:14:3:20 | call to constructor Object | +| Finally.cs:3:14:3:20 | enter Finally | Finally.cs:3:14:3:20 | this access | | Finally.cs:3:14:3:20 | exit Finally (normal) | Finally.cs:3:14:3:20 | exit Finally | +| Finally.cs:3:14:3:20 | this access | Finally.cs:3:14:3:20 | call to method | | Finally.cs:3:14:3:20 | {...} | Finally.cs:3:14:3:20 | exit Finally (normal) | | Finally.cs:7:10:7:11 | enter M1 | Finally.cs:8:5:17:5 | {...} | | Finally.cs:8:5:17:5 | {...} | Finally.cs:9:9:16:9 | try {...} ... | @@ -1679,16 +1701,22 @@ dominance | Finally.cs:167:17:167:38 | ...; | Finally.cs:167:35:167:36 | "" | | Finally.cs:167:35:167:36 | "" | Finally.cs:167:17:167:37 | call to method WriteLine | | Finally.cs:172:11:172:20 | call to constructor Exception | Finally.cs:172:11:172:20 | {...} | -| Finally.cs:172:11:172:20 | enter ExceptionA | Finally.cs:172:11:172:20 | call to constructor Exception | +| Finally.cs:172:11:172:20 | call to method | Finally.cs:172:11:172:20 | call to constructor Exception | +| Finally.cs:172:11:172:20 | enter ExceptionA | Finally.cs:172:11:172:20 | this access | | Finally.cs:172:11:172:20 | exit ExceptionA (normal) | Finally.cs:172:11:172:20 | exit ExceptionA | +| Finally.cs:172:11:172:20 | this access | Finally.cs:172:11:172:20 | call to method | | Finally.cs:172:11:172:20 | {...} | Finally.cs:172:11:172:20 | exit ExceptionA (normal) | | Finally.cs:173:11:173:20 | call to constructor Exception | Finally.cs:173:11:173:20 | {...} | -| Finally.cs:173:11:173:20 | enter ExceptionB | Finally.cs:173:11:173:20 | call to constructor Exception | +| Finally.cs:173:11:173:20 | call to method | Finally.cs:173:11:173:20 | call to constructor Exception | +| Finally.cs:173:11:173:20 | enter ExceptionB | Finally.cs:173:11:173:20 | this access | | Finally.cs:173:11:173:20 | exit ExceptionB (normal) | Finally.cs:173:11:173:20 | exit ExceptionB | +| Finally.cs:173:11:173:20 | this access | Finally.cs:173:11:173:20 | call to method | | Finally.cs:173:11:173:20 | {...} | Finally.cs:173:11:173:20 | exit ExceptionB (normal) | | Finally.cs:174:11:174:20 | call to constructor Exception | Finally.cs:174:11:174:20 | {...} | -| Finally.cs:174:11:174:20 | enter ExceptionC | Finally.cs:174:11:174:20 | call to constructor Exception | +| Finally.cs:174:11:174:20 | call to method | Finally.cs:174:11:174:20 | call to constructor Exception | +| Finally.cs:174:11:174:20 | enter ExceptionC | Finally.cs:174:11:174:20 | this access | | Finally.cs:174:11:174:20 | exit ExceptionC (normal) | Finally.cs:174:11:174:20 | exit ExceptionC | +| Finally.cs:174:11:174:20 | this access | Finally.cs:174:11:174:20 | call to method | | Finally.cs:174:11:174:20 | {...} | Finally.cs:174:11:174:20 | exit ExceptionC (normal) | | Finally.cs:176:10:176:11 | enter M9 | Finally.cs:177:5:193:5 | {...} | | Finally.cs:177:5:193:5 | {...} | Finally.cs:178:9:192:9 | try {...} ... | @@ -1812,8 +1840,10 @@ dominance | Finally.cs:272:13:272:19 | ...; | Finally.cs:272:13:272:13 | access to parameter i | | Finally.cs:272:18:272:18 | 3 | Finally.cs:272:13:272:18 | ... + ... | | Foreach.cs:4:7:4:13 | call to constructor Object | Foreach.cs:4:7:4:13 | {...} | -| Foreach.cs:4:7:4:13 | enter Foreach | Foreach.cs:4:7:4:13 | call to constructor Object | +| Foreach.cs:4:7:4:13 | call to method | Foreach.cs:4:7:4:13 | call to constructor Object | +| Foreach.cs:4:7:4:13 | enter Foreach | Foreach.cs:4:7:4:13 | this access | | Foreach.cs:4:7:4:13 | exit Foreach (normal) | Foreach.cs:4:7:4:13 | exit Foreach | +| Foreach.cs:4:7:4:13 | this access | Foreach.cs:4:7:4:13 | call to method | | Foreach.cs:4:7:4:13 | {...} | Foreach.cs:4:7:4:13 | exit Foreach (normal) | | Foreach.cs:6:10:6:11 | enter M1 | Foreach.cs:7:5:10:5 | {...} | | Foreach.cs:6:10:6:11 | exit M1 (normal) | Foreach.cs:6:10:6:11 | exit M1 | @@ -1865,38 +1895,33 @@ dominance | Foreach.cs:38:26:38:26 | String x | Foreach.cs:38:33:38:33 | Int32 y | | Foreach.cs:38:33:38:33 | Int32 y | Foreach.cs:38:18:38:34 | (..., ...) | | Foreach.cs:38:39:38:42 | access to parameter args | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | +| Initializers.cs:3:7:3:18 | enter | Initializers.cs:5:9:5:9 | this access | | Initializers.cs:3:7:3:18 | enter Initializers | Initializers.cs:3:7:3:18 | {...} | +| Initializers.cs:3:7:3:18 | exit (normal) | Initializers.cs:3:7:3:18 | exit | | Initializers.cs:3:7:3:18 | exit Initializers (normal) | Initializers.cs:3:7:3:18 | exit Initializers | | Initializers.cs:3:7:3:18 | {...} | Initializers.cs:3:7:3:18 | exit Initializers (normal) | | Initializers.cs:5:9:5:9 | this access | Initializers.cs:5:13:5:13 | access to field H | -| Initializers.cs:5:9:5:9 | this access | Initializers.cs:5:13:5:13 | access to field H | -| Initializers.cs:5:9:5:17 | ... = ... | Initializers.cs:6:9:6:9 | this access | | Initializers.cs:5:9:5:17 | ... = ... | Initializers.cs:6:9:6:9 | this access | | Initializers.cs:5:13:5:13 | access to field H | Initializers.cs:5:17:5:17 | 1 | -| Initializers.cs:5:13:5:13 | access to field H | Initializers.cs:5:17:5:17 | 1 | -| Initializers.cs:5:13:5:17 | ... + ... | Initializers.cs:5:9:5:17 | ... = ... | | Initializers.cs:5:13:5:17 | ... + ... | Initializers.cs:5:9:5:17 | ... = ... | | Initializers.cs:5:17:5:17 | 1 | Initializers.cs:5:13:5:17 | ... + ... | -| Initializers.cs:5:17:5:17 | 1 | Initializers.cs:5:13:5:17 | ... + ... | -| Initializers.cs:6:9:6:9 | access to property G | Initializers.cs:6:25:6:31 | ... = ... | | Initializers.cs:6:9:6:9 | access to property G | Initializers.cs:6:25:6:31 | ... = ... | | Initializers.cs:6:9:6:9 | this access | Initializers.cs:6:27:6:27 | access to field H | -| Initializers.cs:6:9:6:9 | this access | Initializers.cs:6:27:6:27 | access to field H | -| Initializers.cs:6:25:6:31 | ... = ... | Initializers.cs:8:20:8:22 | {...} | -| Initializers.cs:6:25:6:31 | ... = ... | Initializers.cs:10:28:10:30 | {...} | -| Initializers.cs:6:27:6:27 | access to field H | Initializers.cs:6:31:6:31 | 2 | +| Initializers.cs:6:25:6:31 | ... = ... | Initializers.cs:3:7:3:18 | exit (normal) | | Initializers.cs:6:27:6:27 | access to field H | Initializers.cs:6:31:6:31 | 2 | | Initializers.cs:6:27:6:31 | ... + ... | Initializers.cs:6:9:6:9 | access to property G | -| Initializers.cs:6:27:6:31 | ... + ... | Initializers.cs:6:9:6:9 | access to property G | | Initializers.cs:6:31:6:31 | 2 | Initializers.cs:6:27:6:31 | ... + ... | -| Initializers.cs:6:31:6:31 | 2 | Initializers.cs:6:27:6:31 | ... + ... | -| Initializers.cs:8:5:8:16 | call to constructor Object | Initializers.cs:5:9:5:9 | this access | -| Initializers.cs:8:5:8:16 | enter Initializers | Initializers.cs:8:5:8:16 | call to constructor Object | +| Initializers.cs:8:5:8:16 | call to constructor Object | Initializers.cs:8:20:8:22 | {...} | +| Initializers.cs:8:5:8:16 | call to method | Initializers.cs:8:5:8:16 | call to constructor Object | +| Initializers.cs:8:5:8:16 | enter Initializers | Initializers.cs:8:5:8:16 | this access | | Initializers.cs:8:5:8:16 | exit Initializers (normal) | Initializers.cs:8:5:8:16 | exit Initializers | +| Initializers.cs:8:5:8:16 | this access | Initializers.cs:8:5:8:16 | call to method | | Initializers.cs:8:20:8:22 | {...} | Initializers.cs:8:5:8:16 | exit Initializers (normal) | -| Initializers.cs:10:5:10:16 | call to constructor Object | Initializers.cs:5:9:5:9 | this access | -| Initializers.cs:10:5:10:16 | enter Initializers | Initializers.cs:10:5:10:16 | call to constructor Object | +| Initializers.cs:10:5:10:16 | call to constructor Object | Initializers.cs:10:28:10:30 | {...} | +| Initializers.cs:10:5:10:16 | call to method | Initializers.cs:10:5:10:16 | call to constructor Object | +| Initializers.cs:10:5:10:16 | enter Initializers | Initializers.cs:10:5:10:16 | this access | | Initializers.cs:10:5:10:16 | exit Initializers (normal) | Initializers.cs:10:5:10:16 | exit Initializers | +| Initializers.cs:10:5:10:16 | this access | Initializers.cs:10:5:10:16 | call to method | | Initializers.cs:10:28:10:30 | {...} | Initializers.cs:10:5:10:16 | exit Initializers (normal) | | Initializers.cs:12:10:12:10 | enter M | Initializers.cs:13:5:16:5 | {...} | | Initializers.cs:12:10:12:10 | exit M (normal) | Initializers.cs:12:10:12:10 | exit M | @@ -1923,25 +1948,30 @@ dominance | Initializers.cs:18:16:18:16 | exit H (normal) | Initializers.cs:18:16:18:16 | exit H | | Initializers.cs:18:16:18:20 | ... = ... | Initializers.cs:18:16:18:16 | exit H (normal) | | Initializers.cs:18:20:18:20 | 1 | Initializers.cs:18:16:18:20 | ... = ... | -| Initializers.cs:20:11:20:23 | call to constructor Object | Initializers.cs:22:23:22:23 | this access | -| Initializers.cs:20:11:20:23 | enter NoConstructor | Initializers.cs:20:11:20:23 | call to constructor Object | +| Initializers.cs:20:11:20:23 | call to constructor Object | Initializers.cs:20:11:20:23 | {...} | +| Initializers.cs:20:11:20:23 | call to method | Initializers.cs:20:11:20:23 | call to constructor Object | +| Initializers.cs:20:11:20:23 | enter | Initializers.cs:22:23:22:23 | this access | +| Initializers.cs:20:11:20:23 | enter NoConstructor | Initializers.cs:20:11:20:23 | this access | +| Initializers.cs:20:11:20:23 | exit (normal) | Initializers.cs:20:11:20:23 | exit | | Initializers.cs:20:11:20:23 | exit NoConstructor (normal) | Initializers.cs:20:11:20:23 | exit NoConstructor | +| Initializers.cs:20:11:20:23 | this access | Initializers.cs:20:11:20:23 | call to method | | Initializers.cs:20:11:20:23 | {...} | Initializers.cs:20:11:20:23 | exit NoConstructor (normal) | | Initializers.cs:22:23:22:23 | this access | Initializers.cs:22:27:22:27 | 0 | | Initializers.cs:22:23:22:27 | ... = ... | Initializers.cs:23:23:23:23 | this access | | Initializers.cs:22:27:22:27 | 0 | Initializers.cs:22:23:22:27 | ... = ... | | Initializers.cs:23:23:23:23 | this access | Initializers.cs:23:27:23:27 | 1 | -| Initializers.cs:23:23:23:27 | ... = ... | Initializers.cs:20:11:20:23 | {...} | +| Initializers.cs:23:23:23:27 | ... = ... | Initializers.cs:20:11:20:23 | exit (normal) | | Initializers.cs:23:27:23:27 | 1 | Initializers.cs:23:23:23:27 | ... = ... | +| Initializers.cs:26:11:26:13 | enter | Initializers.cs:28:13:28:13 | this access | +| Initializers.cs:26:11:26:13 | exit (normal) | Initializers.cs:26:11:26:13 | exit | | Initializers.cs:28:13:28:13 | this access | Initializers.cs:28:17:28:17 | 2 | -| Initializers.cs:28:13:28:13 | this access | Initializers.cs:28:17:28:17 | 2 | -| Initializers.cs:28:13:28:17 | ... = ... | Initializers.cs:31:24:31:33 | {...} | -| Initializers.cs:28:13:28:17 | ... = ... | Initializers.cs:35:27:35:40 | {...} | +| Initializers.cs:28:13:28:17 | ... = ... | Initializers.cs:26:11:26:13 | exit (normal) | | Initializers.cs:28:17:28:17 | 2 | Initializers.cs:28:13:28:17 | ... = ... | -| Initializers.cs:28:17:28:17 | 2 | Initializers.cs:28:13:28:17 | ... = ... | -| Initializers.cs:31:9:31:11 | enter Sub | Initializers.cs:31:17:31:20 | call to constructor NoConstructor | +| Initializers.cs:31:9:31:11 | call to method | Initializers.cs:31:17:31:20 | call to constructor NoConstructor | +| Initializers.cs:31:9:31:11 | enter Sub | Initializers.cs:31:9:31:11 | this access | | Initializers.cs:31:9:31:11 | exit Sub (normal) | Initializers.cs:31:9:31:11 | exit Sub | -| Initializers.cs:31:17:31:20 | call to constructor NoConstructor | Initializers.cs:28:13:28:13 | this access | +| Initializers.cs:31:9:31:11 | this access | Initializers.cs:31:9:31:11 | call to method | +| Initializers.cs:31:17:31:20 | call to constructor NoConstructor | Initializers.cs:31:24:31:33 | {...} | | Initializers.cs:31:24:31:33 | {...} | Initializers.cs:31:26:31:31 | ...; | | Initializers.cs:31:26:31:26 | this access | Initializers.cs:31:30:31:30 | 3 | | Initializers.cs:31:26:31:30 | ... = ... | Initializers.cs:31:9:31:11 | exit Sub (normal) | @@ -1955,9 +1985,11 @@ dominance | Initializers.cs:33:31:33:35 | ... = ... | Initializers.cs:33:9:33:11 | exit Sub (normal) | | Initializers.cs:33:31:33:36 | ...; | Initializers.cs:33:31:33:31 | this access | | Initializers.cs:33:35:33:35 | access to parameter i | Initializers.cs:33:31:33:35 | ... = ... | -| Initializers.cs:35:9:35:11 | call to constructor NoConstructor | Initializers.cs:28:13:28:13 | this access | -| Initializers.cs:35:9:35:11 | enter Sub | Initializers.cs:35:9:35:11 | call to constructor NoConstructor | +| Initializers.cs:35:9:35:11 | call to constructor NoConstructor | Initializers.cs:35:27:35:40 | {...} | +| Initializers.cs:35:9:35:11 | call to method | Initializers.cs:35:9:35:11 | call to constructor NoConstructor | +| Initializers.cs:35:9:35:11 | enter Sub | Initializers.cs:35:9:35:11 | this access | | Initializers.cs:35:9:35:11 | exit Sub (normal) | Initializers.cs:35:9:35:11 | exit Sub | +| Initializers.cs:35:9:35:11 | this access | Initializers.cs:35:9:35:11 | call to method | | Initializers.cs:35:27:35:40 | {...} | Initializers.cs:35:29:35:38 | ...; | | Initializers.cs:35:29:35:29 | this access | Initializers.cs:35:33:35:33 | access to parameter i | | Initializers.cs:35:29:35:37 | ... = ... | Initializers.cs:35:9:35:11 | exit Sub (normal) | @@ -1966,12 +1998,16 @@ dominance | Initializers.cs:35:33:35:37 | ... + ... | Initializers.cs:35:29:35:37 | ... = ... | | Initializers.cs:35:37:35:37 | access to parameter j | Initializers.cs:35:33:35:37 | ... + ... | | Initializers.cs:39:7:39:23 | call to constructor Object | Initializers.cs:39:7:39:23 | {...} | -| Initializers.cs:39:7:39:23 | enter IndexInitializers | Initializers.cs:39:7:39:23 | call to constructor Object | +| Initializers.cs:39:7:39:23 | call to method | Initializers.cs:39:7:39:23 | call to constructor Object | +| Initializers.cs:39:7:39:23 | enter IndexInitializers | Initializers.cs:39:7:39:23 | this access | | Initializers.cs:39:7:39:23 | exit IndexInitializers (normal) | Initializers.cs:39:7:39:23 | exit IndexInitializers | +| Initializers.cs:39:7:39:23 | this access | Initializers.cs:39:7:39:23 | call to method | | Initializers.cs:39:7:39:23 | {...} | Initializers.cs:39:7:39:23 | exit IndexInitializers (normal) | | Initializers.cs:41:11:41:18 | call to constructor Object | Initializers.cs:41:11:41:18 | {...} | -| Initializers.cs:41:11:41:18 | enter Compound | Initializers.cs:41:11:41:18 | call to constructor Object | +| Initializers.cs:41:11:41:18 | call to method | Initializers.cs:41:11:41:18 | call to constructor Object | +| Initializers.cs:41:11:41:18 | enter Compound | Initializers.cs:41:11:41:18 | this access | | Initializers.cs:41:11:41:18 | exit Compound (normal) | Initializers.cs:41:11:41:18 | exit Compound | +| Initializers.cs:41:11:41:18 | this access | Initializers.cs:41:11:41:18 | call to method | | Initializers.cs:41:11:41:18 | {...} | Initializers.cs:41:11:41:18 | exit Compound (normal) | | Initializers.cs:51:10:51:13 | enter Test | Initializers.cs:52:5:66:5 | {...} | | Initializers.cs:51:10:51:13 | exit Test (normal) | Initializers.cs:51:10:51:13 | exit Test | @@ -2078,8 +2114,10 @@ dominance | Initializers.cs:64:54:64:54 | 0 | Initializers.cs:64:50:64:54 | ... + ... | | Initializers.cs:64:59:64:61 | "1" | Initializers.cs:64:46:64:61 | ... = ... | | LoopUnrolling.cs:5:7:5:19 | call to constructor Object | LoopUnrolling.cs:5:7:5:19 | {...} | -| LoopUnrolling.cs:5:7:5:19 | enter LoopUnrolling | LoopUnrolling.cs:5:7:5:19 | call to constructor Object | +| LoopUnrolling.cs:5:7:5:19 | call to method | LoopUnrolling.cs:5:7:5:19 | call to constructor Object | +| LoopUnrolling.cs:5:7:5:19 | enter LoopUnrolling | LoopUnrolling.cs:5:7:5:19 | this access | | LoopUnrolling.cs:5:7:5:19 | exit LoopUnrolling (normal) | LoopUnrolling.cs:5:7:5:19 | exit LoopUnrolling | +| LoopUnrolling.cs:5:7:5:19 | this access | LoopUnrolling.cs:5:7:5:19 | call to method | | LoopUnrolling.cs:5:7:5:19 | {...} | LoopUnrolling.cs:5:7:5:19 | exit LoopUnrolling (normal) | | LoopUnrolling.cs:7:10:7:11 | enter M1 | LoopUnrolling.cs:8:5:13:5 | {...} | | LoopUnrolling.cs:7:10:7:11 | exit M1 (normal) | LoopUnrolling.cs:7:10:7:11 | exit M1 | @@ -2275,9 +2313,11 @@ dominance | LoopUnrolling.cs:99:13:99:33 | ...; | LoopUnrolling.cs:99:31:99:31 | access to local variable x | | LoopUnrolling.cs:99:31:99:31 | access to local variable x | LoopUnrolling.cs:99:13:99:32 | call to method WriteLine | | MultiImplementationA.cs:4:7:4:8 | call to constructor Object | MultiImplementationA.cs:4:7:4:8 | {...} | -| MultiImplementationA.cs:4:7:4:8 | enter C1 | MultiImplementationA.cs:4:7:4:8 | call to constructor Object | -| MultiImplementationA.cs:4:7:4:8 | enter C1 | MultiImplementationB.cs:1:7:1:8 | call to constructor Object | +| MultiImplementationA.cs:4:7:4:8 | call to method | MultiImplementationA.cs:4:7:4:8 | call to constructor Object | +| MultiImplementationA.cs:4:7:4:8 | enter C1 | MultiImplementationA.cs:4:7:4:8 | this access | +| MultiImplementationA.cs:4:7:4:8 | enter C1 | MultiImplementationB.cs:1:7:1:8 | this access | | MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | MultiImplementationA.cs:4:7:4:8 | exit C1 | +| MultiImplementationA.cs:4:7:4:8 | this access | MultiImplementationA.cs:4:7:4:8 | call to method | | MultiImplementationA.cs:6:22:6:31 | enter get_P1 | MultiImplementationA.cs:6:28:6:31 | null | | MultiImplementationA.cs:6:22:6:31 | enter get_P1 | MultiImplementationB.cs:3:22:3:22 | 0 | | MultiImplementationA.cs:6:22:6:31 | throw ... | MultiImplementationA.cs:6:22:6:31 | exit get_P1 (abnormal) | @@ -2296,6 +2336,9 @@ dominance | MultiImplementationA.cs:8:16:8:16 | enter M | MultiImplementationB.cs:5:23:5:23 | 2 | | MultiImplementationA.cs:8:23:8:32 | throw ... | MultiImplementationA.cs:8:16:8:16 | exit M (abnormal) | | MultiImplementationA.cs:8:29:8:32 | null | MultiImplementationA.cs:8:23:8:32 | throw ... | +| MultiImplementationA.cs:11:7:11:8 | enter | MultiImplementationA.cs:13:16:13:16 | this access | +| MultiImplementationA.cs:11:7:11:8 | enter | MultiImplementationB.cs:11:16:11:16 | this access | +| MultiImplementationA.cs:11:7:11:8 | exit (normal) | MultiImplementationA.cs:11:7:11:8 | exit | | MultiImplementationA.cs:13:16:13:16 | this access | MultiImplementationA.cs:13:20:13:20 | 0 | | MultiImplementationA.cs:13:16:13:20 | ... = ... | MultiImplementationA.cs:24:16:24:16 | this access | | MultiImplementationA.cs:13:20:13:20 | 0 | MultiImplementationA.cs:13:16:13:20 | ... = ... | @@ -2317,9 +2360,11 @@ dominance | MultiImplementationA.cs:18:9:18:22 | enter M2 | MultiImplementationA.cs:18:21:18:21 | 0 | | MultiImplementationA.cs:18:9:18:22 | exit M2 (normal) | MultiImplementationA.cs:18:9:18:22 | exit M2 | | MultiImplementationA.cs:18:21:18:21 | 0 | MultiImplementationA.cs:18:9:18:22 | exit M2 (normal) | -| MultiImplementationA.cs:20:12:20:13 | call to constructor Object | MultiImplementationA.cs:13:16:13:16 | this access | -| MultiImplementationA.cs:20:12:20:13 | enter C2 | MultiImplementationA.cs:20:12:20:13 | call to constructor Object | -| MultiImplementationA.cs:20:12:20:13 | enter C2 | MultiImplementationB.cs:18:12:18:13 | call to constructor Object | +| MultiImplementationA.cs:20:12:20:13 | call to constructor Object | MultiImplementationA.cs:20:22:20:31 | {...} | +| MultiImplementationA.cs:20:12:20:13 | call to method | MultiImplementationA.cs:20:12:20:13 | call to constructor Object | +| MultiImplementationA.cs:20:12:20:13 | enter C2 | MultiImplementationA.cs:20:12:20:13 | this access | +| MultiImplementationA.cs:20:12:20:13 | enter C2 | MultiImplementationB.cs:18:12:18:13 | this access | +| MultiImplementationA.cs:20:12:20:13 | this access | MultiImplementationA.cs:20:12:20:13 | call to method | | MultiImplementationA.cs:20:22:20:31 | {...} | MultiImplementationA.cs:20:24:20:29 | ...; | | MultiImplementationA.cs:20:24:20:24 | this access | MultiImplementationA.cs:20:28:20:28 | access to parameter i | | MultiImplementationA.cs:20:24:20:28 | ... = ... | MultiImplementationA.cs:20:12:20:13 | exit C2 (normal) | @@ -2338,20 +2383,23 @@ dominance | MultiImplementationA.cs:23:50:23:53 | null | MultiImplementationA.cs:23:28:23:35 | exit implicit conversion (normal) | | MultiImplementationA.cs:24:16:24:16 | access to property P | MultiImplementationA.cs:24:32:24:34 | ... = ... | | MultiImplementationA.cs:24:16:24:16 | this access | MultiImplementationA.cs:24:34:24:34 | 0 | -| MultiImplementationA.cs:24:32:24:34 | ... = ... | MultiImplementationA.cs:20:22:20:31 | {...} | | MultiImplementationA.cs:24:34:24:34 | 0 | MultiImplementationA.cs:24:16:24:16 | access to property P | | MultiImplementationA.cs:28:7:28:8 | call to constructor Object | MultiImplementationA.cs:28:7:28:8 | {...} | -| MultiImplementationA.cs:28:7:28:8 | enter C3 | MultiImplementationA.cs:28:7:28:8 | call to constructor Object | -| MultiImplementationA.cs:28:7:28:8 | enter C3 | MultiImplementationB.cs:25:7:25:8 | call to constructor Object | +| MultiImplementationA.cs:28:7:28:8 | call to method | MultiImplementationA.cs:28:7:28:8 | call to constructor Object | +| MultiImplementationA.cs:28:7:28:8 | enter C3 | MultiImplementationA.cs:28:7:28:8 | this access | +| MultiImplementationA.cs:28:7:28:8 | enter C3 | MultiImplementationB.cs:25:7:25:8 | this access | | MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | MultiImplementationA.cs:28:7:28:8 | exit C3 | +| MultiImplementationA.cs:28:7:28:8 | this access | MultiImplementationA.cs:28:7:28:8 | call to method | | MultiImplementationA.cs:30:21:30:23 | enter get_P3 | MultiImplementationA.cs:30:34:30:37 | null | | MultiImplementationA.cs:30:21:30:23 | exit get_P3 (abnormal) | MultiImplementationA.cs:30:21:30:23 | exit get_P3 | | MultiImplementationA.cs:30:28:30:37 | throw ... | MultiImplementationA.cs:30:21:30:23 | exit get_P3 (abnormal) | | MultiImplementationA.cs:30:34:30:37 | null | MultiImplementationA.cs:30:28:30:37 | throw ... | | MultiImplementationA.cs:34:15:34:16 | call to constructor Object | MultiImplementationA.cs:34:15:34:16 | {...} | -| MultiImplementationA.cs:34:15:34:16 | enter C4 | MultiImplementationA.cs:34:15:34:16 | call to constructor Object | -| MultiImplementationA.cs:34:15:34:16 | enter C4 | MultiImplementationB.cs:30:15:30:16 | call to constructor Object | +| MultiImplementationA.cs:34:15:34:16 | call to method | MultiImplementationA.cs:34:15:34:16 | call to constructor Object | +| MultiImplementationA.cs:34:15:34:16 | enter C4 | MultiImplementationA.cs:34:15:34:16 | this access | +| MultiImplementationA.cs:34:15:34:16 | enter C4 | MultiImplementationB.cs:30:15:30:16 | this access | | MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | MultiImplementationA.cs:34:15:34:16 | exit C4 | +| MultiImplementationA.cs:34:15:34:16 | this access | MultiImplementationA.cs:34:15:34:16 | call to method | | MultiImplementationA.cs:36:9:36:10 | enter M1 | MultiImplementationA.cs:36:14:36:28 | {...} | | MultiImplementationA.cs:36:9:36:10 | enter M1 | MultiImplementationB.cs:32:17:32:17 | 0 | | MultiImplementationA.cs:36:14:36:28 | {...} | MultiImplementationA.cs:36:22:36:25 | null | @@ -2363,6 +2411,8 @@ dominance | MultiImplementationA.cs:37:16:37:26 | throw ...; | MultiImplementationA.cs:37:9:37:10 | exit M2 (abnormal) | | MultiImplementationA.cs:37:22:37:25 | null | MultiImplementationA.cs:37:16:37:26 | throw ...; | | MultiImplementationB.cs:1:7:1:8 | call to constructor Object | MultiImplementationB.cs:1:7:1:8 | {...} | +| MultiImplementationB.cs:1:7:1:8 | call to method | MultiImplementationB.cs:1:7:1:8 | call to constructor Object | +| MultiImplementationB.cs:1:7:1:8 | this access | MultiImplementationB.cs:1:7:1:8 | call to method | | MultiImplementationB.cs:3:22:3:22 | 0 | MultiImplementationA.cs:6:22:6:31 | exit get_P1 (normal) | | MultiImplementationB.cs:4:25:4:37 | {...} | MultiImplementationB.cs:4:34:4:34 | 1 | | MultiImplementationB.cs:4:27:4:35 | return ...; | MultiImplementationA.cs:7:21:7:23 | exit get_P2 (normal) | @@ -2382,7 +2432,9 @@ dominance | MultiImplementationB.cs:16:9:16:31 | exit M2 (abnormal) | MultiImplementationB.cs:16:9:16:31 | exit M2 | | MultiImplementationB.cs:16:21:16:30 | throw ... | MultiImplementationB.cs:16:9:16:31 | exit M2 (abnormal) | | MultiImplementationB.cs:16:27:16:30 | null | MultiImplementationB.cs:16:21:16:30 | throw ... | -| MultiImplementationB.cs:18:12:18:13 | call to constructor Object | MultiImplementationB.cs:11:16:11:16 | this access | +| MultiImplementationB.cs:18:12:18:13 | call to constructor Object | MultiImplementationB.cs:18:22:18:36 | {...} | +| MultiImplementationB.cs:18:12:18:13 | call to method | MultiImplementationB.cs:18:12:18:13 | call to constructor Object | +| MultiImplementationB.cs:18:12:18:13 | this access | MultiImplementationB.cs:18:12:18:13 | call to method | | MultiImplementationB.cs:18:22:18:36 | {...} | MultiImplementationB.cs:18:30:18:33 | null | | MultiImplementationB.cs:18:24:18:34 | throw ...; | MultiImplementationA.cs:20:12:20:13 | exit C2 (abnormal) | | MultiImplementationB.cs:18:30:18:33 | null | MultiImplementationB.cs:18:24:18:34 | throw ...; | @@ -2395,14 +2447,19 @@ dominance | MultiImplementationB.cs:21:56:21:59 | null | MultiImplementationB.cs:21:50:21:59 | throw ... | | MultiImplementationB.cs:22:16:22:16 | access to property P | MultiImplementationB.cs:22:32:22:34 | ... = ... | | MultiImplementationB.cs:22:16:22:16 | this access | MultiImplementationB.cs:22:34:22:34 | 1 | -| MultiImplementationB.cs:22:32:22:34 | ... = ... | MultiImplementationB.cs:18:22:18:36 | {...} | | MultiImplementationB.cs:22:34:22:34 | 1 | MultiImplementationB.cs:22:16:22:16 | access to property P | | MultiImplementationB.cs:25:7:25:8 | call to constructor Object | MultiImplementationB.cs:25:7:25:8 | {...} | +| MultiImplementationB.cs:25:7:25:8 | call to method | MultiImplementationB.cs:25:7:25:8 | call to constructor Object | +| MultiImplementationB.cs:25:7:25:8 | this access | MultiImplementationB.cs:25:7:25:8 | call to method | | MultiImplementationB.cs:30:15:30:16 | call to constructor Object | MultiImplementationB.cs:30:15:30:16 | {...} | +| MultiImplementationB.cs:30:15:30:16 | call to method | MultiImplementationB.cs:30:15:30:16 | call to constructor Object | +| MultiImplementationB.cs:30:15:30:16 | this access | MultiImplementationB.cs:30:15:30:16 | call to method | | MultiImplementationB.cs:32:17:32:17 | 0 | MultiImplementationA.cs:36:9:36:10 | exit M1 (normal) | | NullCoalescing.cs:1:7:1:20 | call to constructor Object | NullCoalescing.cs:1:7:1:20 | {...} | -| NullCoalescing.cs:1:7:1:20 | enter NullCoalescing | NullCoalescing.cs:1:7:1:20 | call to constructor Object | +| NullCoalescing.cs:1:7:1:20 | call to method | NullCoalescing.cs:1:7:1:20 | call to constructor Object | +| NullCoalescing.cs:1:7:1:20 | enter NullCoalescing | NullCoalescing.cs:1:7:1:20 | this access | | NullCoalescing.cs:1:7:1:20 | exit NullCoalescing (normal) | NullCoalescing.cs:1:7:1:20 | exit NullCoalescing | +| NullCoalescing.cs:1:7:1:20 | this access | NullCoalescing.cs:1:7:1:20 | call to method | | NullCoalescing.cs:1:7:1:20 | {...} | NullCoalescing.cs:1:7:1:20 | exit NullCoalescing (normal) | | NullCoalescing.cs:3:9:3:10 | enter M1 | NullCoalescing.cs:3:23:3:23 | access to parameter i | | NullCoalescing.cs:3:9:3:10 | exit M1 (normal) | NullCoalescing.cs:3:9:3:10 | exit M1 | @@ -2460,31 +2517,32 @@ dominance | NullCoalescing.cs:17:13:17:19 | (...) ... | NullCoalescing.cs:17:13:17:24 | ... ?? ... | | NullCoalescing.cs:17:13:17:24 | ... ?? ... | NullCoalescing.cs:17:9:17:24 | ... = ... | | NullCoalescing.cs:17:19:17:19 | access to parameter i | NullCoalescing.cs:17:13:17:19 | (...) ... | -| PartialImplementationA.cs:3:12:3:18 | call to constructor Object | PartialImplementationB.cs:3:16:3:16 | this access | -| PartialImplementationA.cs:3:12:3:18 | enter Partial | PartialImplementationA.cs:3:12:3:18 | call to constructor Object | +| PartialImplementationA.cs:1:15:1:21 | enter | PartialImplementationB.cs:3:16:3:16 | this access | +| PartialImplementationA.cs:1:15:1:21 | exit (normal) | PartialImplementationA.cs:1:15:1:21 | exit | +| PartialImplementationA.cs:3:12:3:18 | call to constructor Object | PartialImplementationA.cs:3:27:3:29 | {...} | +| PartialImplementationA.cs:3:12:3:18 | call to method | PartialImplementationA.cs:3:12:3:18 | call to constructor Object | +| PartialImplementationA.cs:3:12:3:18 | enter Partial | PartialImplementationA.cs:3:12:3:18 | this access | | PartialImplementationA.cs:3:12:3:18 | exit Partial (normal) | PartialImplementationA.cs:3:12:3:18 | exit Partial | +| PartialImplementationA.cs:3:12:3:18 | this access | PartialImplementationA.cs:3:12:3:18 | call to method | | PartialImplementationA.cs:3:27:3:29 | {...} | PartialImplementationA.cs:3:12:3:18 | exit Partial (normal) | | PartialImplementationB.cs:3:16:3:16 | this access | PartialImplementationB.cs:3:20:3:20 | 0 | -| PartialImplementationB.cs:3:16:3:16 | this access | PartialImplementationB.cs:3:20:3:20 | 0 | -| PartialImplementationB.cs:3:16:3:20 | ... = ... | PartialImplementationB.cs:5:16:5:16 | this access | | PartialImplementationB.cs:3:16:3:20 | ... = ... | PartialImplementationB.cs:5:16:5:16 | this access | | PartialImplementationB.cs:3:20:3:20 | 0 | PartialImplementationB.cs:3:16:3:20 | ... = ... | -| PartialImplementationB.cs:3:20:3:20 | 0 | PartialImplementationB.cs:3:16:3:20 | ... = ... | -| PartialImplementationB.cs:4:12:4:18 | call to constructor Object | PartialImplementationB.cs:3:16:3:16 | this access | -| PartialImplementationB.cs:4:12:4:18 | enter Partial | PartialImplementationB.cs:4:12:4:18 | call to constructor Object | +| PartialImplementationB.cs:4:12:4:18 | call to constructor Object | PartialImplementationB.cs:4:22:4:24 | {...} | +| PartialImplementationB.cs:4:12:4:18 | call to method | PartialImplementationB.cs:4:12:4:18 | call to constructor Object | +| PartialImplementationB.cs:4:12:4:18 | enter Partial | PartialImplementationB.cs:4:12:4:18 | this access | | PartialImplementationB.cs:4:12:4:18 | exit Partial (normal) | PartialImplementationB.cs:4:12:4:18 | exit Partial | +| PartialImplementationB.cs:4:12:4:18 | this access | PartialImplementationB.cs:4:12:4:18 | call to method | | PartialImplementationB.cs:4:22:4:24 | {...} | PartialImplementationB.cs:4:12:4:18 | exit Partial (normal) | | PartialImplementationB.cs:5:16:5:16 | access to property P | PartialImplementationB.cs:5:32:5:34 | ... = ... | -| PartialImplementationB.cs:5:16:5:16 | access to property P | PartialImplementationB.cs:5:32:5:34 | ... = ... | | PartialImplementationB.cs:5:16:5:16 | this access | PartialImplementationB.cs:5:34:5:34 | 0 | -| PartialImplementationB.cs:5:16:5:16 | this access | PartialImplementationB.cs:5:34:5:34 | 0 | -| PartialImplementationB.cs:5:32:5:34 | ... = ... | PartialImplementationA.cs:3:27:3:29 | {...} | -| PartialImplementationB.cs:5:32:5:34 | ... = ... | PartialImplementationB.cs:4:22:4:24 | {...} | -| PartialImplementationB.cs:5:34:5:34 | 0 | PartialImplementationB.cs:5:16:5:16 | access to property P | +| PartialImplementationB.cs:5:32:5:34 | ... = ... | PartialImplementationA.cs:1:15:1:21 | exit (normal) | | PartialImplementationB.cs:5:34:5:34 | 0 | PartialImplementationB.cs:5:16:5:16 | access to property P | | Patterns.cs:3:7:3:14 | call to constructor Object | Patterns.cs:3:7:3:14 | {...} | -| Patterns.cs:3:7:3:14 | enter Patterns | Patterns.cs:3:7:3:14 | call to constructor Object | +| Patterns.cs:3:7:3:14 | call to method | Patterns.cs:3:7:3:14 | call to constructor Object | +| Patterns.cs:3:7:3:14 | enter Patterns | Patterns.cs:3:7:3:14 | this access | | Patterns.cs:3:7:3:14 | exit Patterns (normal) | Patterns.cs:3:7:3:14 | exit Patterns | +| Patterns.cs:3:7:3:14 | this access | Patterns.cs:3:7:3:14 | call to method | | Patterns.cs:3:7:3:14 | {...} | Patterns.cs:3:7:3:14 | exit Patterns (normal) | | Patterns.cs:5:10:5:11 | enter M1 | Patterns.cs:6:5:43:5 | {...} | | Patterns.cs:5:10:5:11 | exit M1 (normal) | Patterns.cs:5:10:5:11 | exit M1 | @@ -2683,8 +2741,10 @@ dominance | Patterns.cs:97:13:97:39 | ...; | Patterns.cs:97:31:97:37 | "not C" | | Patterns.cs:97:31:97:37 | "not C" | Patterns.cs:97:13:97:38 | call to method WriteLine | | PostDominance.cs:3:7:3:19 | call to constructor Object | PostDominance.cs:3:7:3:19 | {...} | -| PostDominance.cs:3:7:3:19 | enter PostDominance | PostDominance.cs:3:7:3:19 | call to constructor Object | +| PostDominance.cs:3:7:3:19 | call to method | PostDominance.cs:3:7:3:19 | call to constructor Object | +| PostDominance.cs:3:7:3:19 | enter PostDominance | PostDominance.cs:3:7:3:19 | this access | | PostDominance.cs:3:7:3:19 | exit PostDominance (normal) | PostDominance.cs:3:7:3:19 | exit PostDominance | +| PostDominance.cs:3:7:3:19 | this access | PostDominance.cs:3:7:3:19 | call to method | | PostDominance.cs:3:7:3:19 | {...} | PostDominance.cs:3:7:3:19 | exit PostDominance (normal) | | PostDominance.cs:5:10:5:11 | enter M1 | PostDominance.cs:6:5:8:5 | {...} | | PostDominance.cs:5:10:5:11 | exit M1 (normal) | PostDominance.cs:5:10:5:11 | exit M1 | @@ -2718,8 +2778,10 @@ dominance | PostDominance.cs:21:9:21:29 | ...; | PostDominance.cs:21:27:21:27 | access to parameter s | | PostDominance.cs:21:27:21:27 | access to parameter s | PostDominance.cs:21:9:21:28 | call to method WriteLine | | Qualifiers.cs:1:7:1:16 | call to constructor Object | Qualifiers.cs:1:7:1:16 | {...} | -| Qualifiers.cs:1:7:1:16 | enter Qualifiers | Qualifiers.cs:1:7:1:16 | call to constructor Object | +| Qualifiers.cs:1:7:1:16 | call to method | Qualifiers.cs:1:7:1:16 | call to constructor Object | +| Qualifiers.cs:1:7:1:16 | enter Qualifiers | Qualifiers.cs:1:7:1:16 | this access | | Qualifiers.cs:1:7:1:16 | exit Qualifiers (normal) | Qualifiers.cs:1:7:1:16 | exit Qualifiers | +| Qualifiers.cs:1:7:1:16 | this access | Qualifiers.cs:1:7:1:16 | call to method | | Qualifiers.cs:1:7:1:16 | {...} | Qualifiers.cs:1:7:1:16 | exit Qualifiers (normal) | | Qualifiers.cs:7:16:7:21 | enter Method | Qualifiers.cs:7:28:7:31 | null | | Qualifiers.cs:7:16:7:21 | exit Method (normal) | Qualifiers.cs:7:16:7:21 | exit Method | @@ -2785,8 +2847,10 @@ dominance | Qualifiers.cs:30:13:30:37 | call to method StaticMethod | Qualifiers.cs:30:13:30:46 | call to method Method | | Qualifiers.cs:30:13:30:46 | call to method Method | Qualifiers.cs:30:9:30:46 | ... = ... | | Switch.cs:3:7:3:12 | call to constructor Object | Switch.cs:3:7:3:12 | {...} | -| Switch.cs:3:7:3:12 | enter Switch | Switch.cs:3:7:3:12 | call to constructor Object | +| Switch.cs:3:7:3:12 | call to method | Switch.cs:3:7:3:12 | call to constructor Object | +| Switch.cs:3:7:3:12 | enter Switch | Switch.cs:3:7:3:12 | this access | | Switch.cs:3:7:3:12 | exit Switch (normal) | Switch.cs:3:7:3:12 | exit Switch | +| Switch.cs:3:7:3:12 | this access | Switch.cs:3:7:3:12 | call to method | | Switch.cs:3:7:3:12 | {...} | Switch.cs:3:7:3:12 | exit Switch (normal) | | Switch.cs:5:10:5:11 | enter M1 | Switch.cs:6:5:8:5 | {...} | | Switch.cs:5:10:5:11 | exit M1 (normal) | Switch.cs:5:10:5:11 | exit M1 | @@ -3055,8 +3119,10 @@ dominance | Switch.cs:175:17:175:48 | ...; | Switch.cs:175:42:175:46 | "def" | | Switch.cs:175:42:175:46 | "def" | Switch.cs:175:17:175:47 | call to method WriteLine | | TypeAccesses.cs:1:7:1:18 | call to constructor Object | TypeAccesses.cs:1:7:1:18 | {...} | -| TypeAccesses.cs:1:7:1:18 | enter TypeAccesses | TypeAccesses.cs:1:7:1:18 | call to constructor Object | +| TypeAccesses.cs:1:7:1:18 | call to method | TypeAccesses.cs:1:7:1:18 | call to constructor Object | +| TypeAccesses.cs:1:7:1:18 | enter TypeAccesses | TypeAccesses.cs:1:7:1:18 | this access | | TypeAccesses.cs:1:7:1:18 | exit TypeAccesses (normal) | TypeAccesses.cs:1:7:1:18 | exit TypeAccesses | +| TypeAccesses.cs:1:7:1:18 | this access | TypeAccesses.cs:1:7:1:18 | call to method | | TypeAccesses.cs:1:7:1:18 | {...} | TypeAccesses.cs:1:7:1:18 | exit TypeAccesses (normal) | | TypeAccesses.cs:3:10:3:10 | enter M | TypeAccesses.cs:4:5:9:5 | {...} | | TypeAccesses.cs:3:10:3:10 | exit M (normal) | TypeAccesses.cs:3:10:3:10 | exit M | @@ -3078,8 +3144,10 @@ dominance | TypeAccesses.cs:8:13:8:27 | Type t = ... | TypeAccesses.cs:3:10:3:10 | exit M (normal) | | TypeAccesses.cs:8:17:8:27 | typeof(...) | TypeAccesses.cs:8:13:8:27 | Type t = ... | | VarDecls.cs:3:7:3:14 | call to constructor Object | VarDecls.cs:3:7:3:14 | {...} | -| VarDecls.cs:3:7:3:14 | enter VarDecls | VarDecls.cs:3:7:3:14 | call to constructor Object | +| VarDecls.cs:3:7:3:14 | call to method | VarDecls.cs:3:7:3:14 | call to constructor Object | +| VarDecls.cs:3:7:3:14 | enter VarDecls | VarDecls.cs:3:7:3:14 | this access | | VarDecls.cs:3:7:3:14 | exit VarDecls (normal) | VarDecls.cs:3:7:3:14 | exit VarDecls | +| VarDecls.cs:3:7:3:14 | this access | VarDecls.cs:3:7:3:14 | call to method | | VarDecls.cs:3:7:3:14 | {...} | VarDecls.cs:3:7:3:14 | exit VarDecls (normal) | | VarDecls.cs:5:18:5:19 | enter M1 | VarDecls.cs:6:5:11:5 | {...} | | VarDecls.cs:5:18:5:19 | exit M1 (normal) | VarDecls.cs:5:18:5:19 | exit M1 | @@ -3127,8 +3195,10 @@ dominance | VarDecls.cs:25:20:25:20 | access to parameter b | VarDecls.cs:25:28:25:28 | access to local variable y | | VarDecls.cs:25:20:25:28 | ... ? ... : ... | VarDecls.cs:25:13:25:29 | return ...; | | VarDecls.cs:28:11:28:11 | call to constructor Object | VarDecls.cs:28:11:28:11 | {...} | -| VarDecls.cs:28:11:28:11 | enter C | VarDecls.cs:28:11:28:11 | call to constructor Object | +| VarDecls.cs:28:11:28:11 | call to method | VarDecls.cs:28:11:28:11 | call to constructor Object | +| VarDecls.cs:28:11:28:11 | enter C | VarDecls.cs:28:11:28:11 | this access | | VarDecls.cs:28:11:28:11 | exit C (normal) | VarDecls.cs:28:11:28:11 | exit C | +| VarDecls.cs:28:11:28:11 | this access | VarDecls.cs:28:11:28:11 | call to method | | VarDecls.cs:28:11:28:11 | {...} | VarDecls.cs:28:11:28:11 | exit C (normal) | | VarDecls.cs:28:41:28:47 | enter Dispose | VarDecls.cs:28:51:28:53 | {...} | | VarDecls.cs:28:41:28:47 | exit Dispose (normal) | VarDecls.cs:28:41:28:47 | exit Dispose | @@ -3397,8 +3467,10 @@ dominance | cflow.cs:127:68:127:81 | ...; | cflow.cs:127:68:127:72 | this access | | cflow.cs:127:76:127:80 | access to parameter value | cflow.cs:127:68:127:80 | ... = ... | | cflow.cs:129:5:129:15 | call to constructor Object | cflow.cs:130:5:132:5 | {...} | -| cflow.cs:129:5:129:15 | enter ControlFlow | cflow.cs:129:5:129:15 | call to constructor Object | +| cflow.cs:129:5:129:15 | call to method | cflow.cs:129:5:129:15 | call to constructor Object | +| cflow.cs:129:5:129:15 | enter ControlFlow | cflow.cs:129:5:129:15 | this access | | cflow.cs:129:5:129:15 | exit ControlFlow (normal) | cflow.cs:129:5:129:15 | exit ControlFlow | +| cflow.cs:129:5:129:15 | this access | cflow.cs:129:5:129:15 | call to method | | cflow.cs:130:5:132:5 | {...} | cflow.cs:131:9:131:18 | ...; | | cflow.cs:131:9:131:13 | this access | cflow.cs:131:17:131:17 | access to parameter s | | cflow.cs:131:9:131:17 | ... = ... | cflow.cs:129:5:129:15 | exit ControlFlow (normal) | @@ -3739,8 +3811,10 @@ dominance | cflow.cs:275:13:275:41 | call to method WriteLine | cflow.cs:261:49:261:53 | exit Yield (normal) | | cflow.cs:275:13:275:42 | ...; | cflow.cs:275:31:275:40 | "not dead" | | cflow.cs:275:31:275:40 | "not dead" | cflow.cs:275:13:275:41 | call to method WriteLine | -| cflow.cs:282:5:282:18 | enter ControlFlowSub | cflow.cs:282:24:282:27 | call to constructor ControlFlow | +| cflow.cs:282:5:282:18 | call to method | cflow.cs:282:24:282:27 | call to constructor ControlFlow | +| cflow.cs:282:5:282:18 | enter ControlFlowSub | cflow.cs:282:5:282:18 | this access | | cflow.cs:282:5:282:18 | exit ControlFlowSub (normal) | cflow.cs:282:5:282:18 | exit ControlFlowSub | +| cflow.cs:282:5:282:18 | this access | cflow.cs:282:5:282:18 | call to method | | cflow.cs:282:24:282:27 | call to constructor ControlFlow | cflow.cs:282:31:282:33 | {...} | | cflow.cs:282:31:282:33 | {...} | cflow.cs:282:5:282:18 | exit ControlFlowSub (normal) | | cflow.cs:284:5:284:18 | enter ControlFlowSub | cflow.cs:284:32:284:35 | call to constructor ControlFlowSub | @@ -3754,8 +3828,10 @@ dominance | cflow.cs:286:34:286:45 | call to method ToString | cflow.cs:286:29:286:32 | call to constructor ControlFlowSub | | cflow.cs:286:48:286:50 | {...} | cflow.cs:286:5:286:18 | exit ControlFlowSub (normal) | | cflow.cs:289:7:289:18 | call to constructor Object | cflow.cs:289:7:289:18 | {...} | -| cflow.cs:289:7:289:18 | enter DelegateCall | cflow.cs:289:7:289:18 | call to constructor Object | +| cflow.cs:289:7:289:18 | call to method | cflow.cs:289:7:289:18 | call to constructor Object | +| cflow.cs:289:7:289:18 | enter DelegateCall | cflow.cs:289:7:289:18 | this access | | cflow.cs:289:7:289:18 | exit DelegateCall (normal) | cflow.cs:289:7:289:18 | exit DelegateCall | +| cflow.cs:289:7:289:18 | this access | cflow.cs:289:7:289:18 | call to method | | cflow.cs:289:7:289:18 | {...} | cflow.cs:289:7:289:18 | exit DelegateCall (normal) | | cflow.cs:291:12:291:12 | enter M | cflow.cs:291:38:291:38 | access to parameter f | | cflow.cs:291:12:291:12 | exit M (normal) | cflow.cs:291:12:291:12 | exit M | @@ -3763,8 +3839,10 @@ dominance | cflow.cs:291:38:291:41 | delegate call | cflow.cs:291:12:291:12 | exit M (normal) | | cflow.cs:291:40:291:40 | 0 | cflow.cs:291:38:291:41 | delegate call | | cflow.cs:296:5:296:25 | call to constructor Object | cflow.cs:296:52:296:54 | {...} | -| cflow.cs:296:5:296:25 | enter NegationInConstructor | cflow.cs:296:5:296:25 | call to constructor Object | +| cflow.cs:296:5:296:25 | call to method | cflow.cs:296:5:296:25 | call to constructor Object | +| cflow.cs:296:5:296:25 | enter NegationInConstructor | cflow.cs:296:5:296:25 | this access | | cflow.cs:296:5:296:25 | exit NegationInConstructor (normal) | cflow.cs:296:5:296:25 | exit NegationInConstructor | +| cflow.cs:296:5:296:25 | this access | cflow.cs:296:5:296:25 | call to method | | cflow.cs:296:52:296:54 | {...} | cflow.cs:296:5:296:25 | exit NegationInConstructor (normal) | | cflow.cs:298:10:298:10 | enter M | cflow.cs:299:5:301:5 | {...} | | cflow.cs:298:10:298:10 | exit M (normal) | cflow.cs:298:10:298:10 | exit M | @@ -3782,8 +3860,10 @@ dominance | cflow.cs:300:61:300:64 | null | cflow.cs:300:56:300:64 | ... != ... | | cflow.cs:300:70:300:71 | "" | cflow.cs:300:9:300:72 | object creation of type NegationInConstructor | | cflow.cs:304:7:304:18 | call to constructor Object | cflow.cs:304:7:304:18 | {...} | -| cflow.cs:304:7:304:18 | enter LambdaGetter | cflow.cs:304:7:304:18 | call to constructor Object | +| cflow.cs:304:7:304:18 | call to method | cflow.cs:304:7:304:18 | call to constructor Object | +| cflow.cs:304:7:304:18 | enter LambdaGetter | cflow.cs:304:7:304:18 | this access | | cflow.cs:304:7:304:18 | exit LambdaGetter (normal) | cflow.cs:304:7:304:18 | exit LambdaGetter | +| cflow.cs:304:7:304:18 | this access | cflow.cs:304:7:304:18 | call to method | | cflow.cs:304:7:304:18 | {...} | cflow.cs:304:7:304:18 | exit LambdaGetter (normal) | | cflow.cs:306:60:310:5 | (...) => ... | cflow.cs:306:60:310:5 | exit get__getter (normal) | | cflow.cs:306:60:310:5 | enter (...) => ... | cflow.cs:307:5:310:5 | {...} | @@ -3797,9 +3877,11 @@ dominance | cflow.cs:309:9:309:17 | return ...; | cflow.cs:306:60:310:5 | exit (...) => ... (normal) | | cflow.cs:309:16:309:16 | access to local variable x | cflow.cs:309:9:309:17 | return ...; | postDominance -| AccessorCalls.cs:1:7:1:19 | call to constructor Object | AccessorCalls.cs:1:7:1:19 | enter AccessorCalls | +| AccessorCalls.cs:1:7:1:19 | call to constructor Object | AccessorCalls.cs:1:7:1:19 | call to method | +| AccessorCalls.cs:1:7:1:19 | call to method | AccessorCalls.cs:1:7:1:19 | this access | | AccessorCalls.cs:1:7:1:19 | exit AccessorCalls | AccessorCalls.cs:1:7:1:19 | exit AccessorCalls (normal) | | AccessorCalls.cs:1:7:1:19 | exit AccessorCalls (normal) | AccessorCalls.cs:1:7:1:19 | {...} | +| AccessorCalls.cs:1:7:1:19 | this access | AccessorCalls.cs:1:7:1:19 | enter AccessorCalls | | AccessorCalls.cs:1:7:1:19 | {...} | AccessorCalls.cs:1:7:1:19 | call to constructor Object | | AccessorCalls.cs:5:23:5:25 | exit get_Item | AccessorCalls.cs:5:23:5:25 | exit get_Item (normal) | | AccessorCalls.cs:5:23:5:25 | exit get_Item (normal) | AccessorCalls.cs:5:30:5:30 | access to parameter i | @@ -4102,9 +4184,11 @@ postDominance | AccessorCalls.cs:73:78:73:78 | access to local variable d | AccessorCalls.cs:73:75:73:75 | 0 | | AccessorCalls.cs:73:78:73:81 | dynamic access to element | AccessorCalls.cs:73:80:73:80 | 1 | | AccessorCalls.cs:73:80:73:80 | 1 | AccessorCalls.cs:73:78:73:78 | access to local variable d | -| ArrayCreation.cs:1:7:1:19 | call to constructor Object | ArrayCreation.cs:1:7:1:19 | enter ArrayCreation | +| ArrayCreation.cs:1:7:1:19 | call to constructor Object | ArrayCreation.cs:1:7:1:19 | call to method | +| ArrayCreation.cs:1:7:1:19 | call to method | ArrayCreation.cs:1:7:1:19 | this access | | ArrayCreation.cs:1:7:1:19 | exit ArrayCreation | ArrayCreation.cs:1:7:1:19 | exit ArrayCreation (normal) | | ArrayCreation.cs:1:7:1:19 | exit ArrayCreation (normal) | ArrayCreation.cs:1:7:1:19 | {...} | +| ArrayCreation.cs:1:7:1:19 | this access | ArrayCreation.cs:1:7:1:19 | enter ArrayCreation | | ArrayCreation.cs:1:7:1:19 | {...} | ArrayCreation.cs:1:7:1:19 | call to constructor Object | | ArrayCreation.cs:3:11:3:12 | exit M1 | ArrayCreation.cs:3:11:3:12 | exit M1 (normal) | | ArrayCreation.cs:3:11:3:12 | exit M1 (normal) | ArrayCreation.cs:3:19:3:28 | array creation of type Int32[] | @@ -4134,9 +4218,11 @@ postDominance | ArrayCreation.cs:9:43:9:50 | { ..., ... } | ArrayCreation.cs:9:48:9:48 | 3 | | ArrayCreation.cs:9:45:9:45 | 2 | ArrayCreation.cs:9:33:9:40 | { ..., ... } | | ArrayCreation.cs:9:48:9:48 | 3 | ArrayCreation.cs:9:45:9:45 | 2 | -| Assert.cs:5:7:5:17 | call to constructor Object | Assert.cs:5:7:5:17 | enter AssertTests | +| Assert.cs:5:7:5:17 | call to constructor Object | Assert.cs:5:7:5:17 | call to method | +| Assert.cs:5:7:5:17 | call to method | Assert.cs:5:7:5:17 | this access | | Assert.cs:5:7:5:17 | exit AssertTests | Assert.cs:5:7:5:17 | exit AssertTests (normal) | | Assert.cs:5:7:5:17 | exit AssertTests (normal) | Assert.cs:5:7:5:17 | {...} | +| Assert.cs:5:7:5:17 | this access | Assert.cs:5:7:5:17 | enter AssertTests | | Assert.cs:5:7:5:17 | {...} | Assert.cs:5:7:5:17 | call to constructor Object | | Assert.cs:7:10:7:11 | exit M1 (normal) | Assert.cs:11:9:11:35 | call to method WriteLine | | Assert.cs:8:5:12:5 | {...} | Assert.cs:7:10:7:11 | enter M1 | @@ -4492,9 +4578,11 @@ postDominance | Assert.cs:140:29:140:30 | access to parameter b2 | Assert.cs:140:25:140:26 | access to parameter b1 | | Assert.cs:140:33:140:34 | access to parameter b3 | Assert.cs:140:29:140:30 | access to parameter b2 | | Assert.cs:141:9:141:15 | return ...; | Assert.cs:140:9:140:35 | call to method AssertTrueFalse | -| Assignments.cs:1:7:1:17 | call to constructor Object | Assignments.cs:1:7:1:17 | enter Assignments | +| Assignments.cs:1:7:1:17 | call to constructor Object | Assignments.cs:1:7:1:17 | call to method | +| Assignments.cs:1:7:1:17 | call to method | Assignments.cs:1:7:1:17 | this access | | Assignments.cs:1:7:1:17 | exit Assignments | Assignments.cs:1:7:1:17 | exit Assignments (normal) | | Assignments.cs:1:7:1:17 | exit Assignments (normal) | Assignments.cs:1:7:1:17 | {...} | +| Assignments.cs:1:7:1:17 | this access | Assignments.cs:1:7:1:17 | enter Assignments | | Assignments.cs:1:7:1:17 | {...} | Assignments.cs:1:7:1:17 | call to constructor Object | | Assignments.cs:3:10:3:10 | exit M | Assignments.cs:3:10:3:10 | exit M (normal) | | Assignments.cs:3:10:3:10 | exit M (normal) | Assignments.cs:14:9:14:35 | ... += ... | @@ -4537,9 +4625,11 @@ postDominance | Assignments.cs:18:5:20:5 | {...} | Assignments.cs:17:40:17:40 | enter + | | Assignments.cs:19:9:19:17 | return ...; | Assignments.cs:19:16:19:16 | access to parameter x | | Assignments.cs:19:16:19:16 | access to parameter x | Assignments.cs:18:5:20:5 | {...} | -| BreakInTry.cs:1:7:1:16 | call to constructor Object | BreakInTry.cs:1:7:1:16 | enter BreakInTry | +| BreakInTry.cs:1:7:1:16 | call to constructor Object | BreakInTry.cs:1:7:1:16 | call to method | +| BreakInTry.cs:1:7:1:16 | call to method | BreakInTry.cs:1:7:1:16 | this access | | BreakInTry.cs:1:7:1:16 | exit BreakInTry | BreakInTry.cs:1:7:1:16 | exit BreakInTry (normal) | | BreakInTry.cs:1:7:1:16 | exit BreakInTry (normal) | BreakInTry.cs:1:7:1:16 | {...} | +| BreakInTry.cs:1:7:1:16 | this access | BreakInTry.cs:1:7:1:16 | enter BreakInTry | | BreakInTry.cs:1:7:1:16 | {...} | BreakInTry.cs:1:7:1:16 | call to constructor Object | | BreakInTry.cs:3:10:3:11 | exit M1 | BreakInTry.cs:3:10:3:11 | exit M1 (normal) | | BreakInTry.cs:3:10:3:11 | exit M1 (normal) | BreakInTry.cs:15:17:15:28 | ... == ... | @@ -4620,9 +4710,11 @@ postDominance | BreakInTry.cs:67:21:67:23 | access to local variable arg | BreakInTry.cs:67:17:68:26 | if (...) ... | | BreakInTry.cs:67:21:67:31 | ... == ... | BreakInTry.cs:67:28:67:31 | null | | BreakInTry.cs:67:28:67:31 | null | BreakInTry.cs:67:21:67:23 | access to local variable arg | -| CompileTimeOperators.cs:3:7:3:26 | call to constructor Object | CompileTimeOperators.cs:3:7:3:26 | enter CompileTimeOperators | +| CompileTimeOperators.cs:3:7:3:26 | call to constructor Object | CompileTimeOperators.cs:3:7:3:26 | call to method | +| CompileTimeOperators.cs:3:7:3:26 | call to method | CompileTimeOperators.cs:3:7:3:26 | this access | | CompileTimeOperators.cs:3:7:3:26 | exit CompileTimeOperators | CompileTimeOperators.cs:3:7:3:26 | exit CompileTimeOperators (normal) | | CompileTimeOperators.cs:3:7:3:26 | exit CompileTimeOperators (normal) | CompileTimeOperators.cs:3:7:3:26 | {...} | +| CompileTimeOperators.cs:3:7:3:26 | this access | CompileTimeOperators.cs:3:7:3:26 | enter CompileTimeOperators | | CompileTimeOperators.cs:3:7:3:26 | {...} | CompileTimeOperators.cs:3:7:3:26 | call to constructor Object | | CompileTimeOperators.cs:5:9:5:15 | exit Default | CompileTimeOperators.cs:5:9:5:15 | exit Default (normal) | | CompileTimeOperators.cs:5:9:5:15 | exit Default (normal) | CompileTimeOperators.cs:7:9:7:28 | return ...; | @@ -4644,9 +4736,11 @@ postDominance | CompileTimeOperators.cs:21:5:23:5 | {...} | CompileTimeOperators.cs:20:12:20:17 | enter Nameof | | CompileTimeOperators.cs:22:9:22:25 | return ...; | CompileTimeOperators.cs:22:16:22:24 | nameof(...) | | CompileTimeOperators.cs:22:16:22:24 | nameof(...) | CompileTimeOperators.cs:21:5:23:5 | {...} | -| CompileTimeOperators.cs:26:7:26:22 | call to constructor Object | CompileTimeOperators.cs:26:7:26:22 | enter GotoInTryFinally | +| CompileTimeOperators.cs:26:7:26:22 | call to constructor Object | CompileTimeOperators.cs:26:7:26:22 | call to method | +| CompileTimeOperators.cs:26:7:26:22 | call to method | CompileTimeOperators.cs:26:7:26:22 | this access | | CompileTimeOperators.cs:26:7:26:22 | exit GotoInTryFinally | CompileTimeOperators.cs:26:7:26:22 | exit GotoInTryFinally (normal) | | CompileTimeOperators.cs:26:7:26:22 | exit GotoInTryFinally (normal) | CompileTimeOperators.cs:26:7:26:22 | {...} | +| CompileTimeOperators.cs:26:7:26:22 | this access | CompileTimeOperators.cs:26:7:26:22 | enter GotoInTryFinally | | CompileTimeOperators.cs:26:7:26:22 | {...} | CompileTimeOperators.cs:26:7:26:22 | call to constructor Object | | CompileTimeOperators.cs:28:10:28:10 | exit M (normal) | CompileTimeOperators.cs:40:14:40:37 | call to method WriteLine | | CompileTimeOperators.cs:29:5:41:5 | {...} | CompileTimeOperators.cs:28:10:28:10 | enter M | @@ -4664,9 +4758,11 @@ postDominance | CompileTimeOperators.cs:40:14:40:37 | call to method WriteLine | CompileTimeOperators.cs:40:32:40:36 | "End" | | CompileTimeOperators.cs:40:14:40:38 | ...; | CompileTimeOperators.cs:40:9:40:11 | End: | | CompileTimeOperators.cs:40:32:40:36 | "End" | CompileTimeOperators.cs:40:14:40:38 | ...; | -| ConditionalAccess.cs:1:7:1:23 | call to constructor Object | ConditionalAccess.cs:1:7:1:23 | enter ConditionalAccess | +| ConditionalAccess.cs:1:7:1:23 | call to constructor Object | ConditionalAccess.cs:1:7:1:23 | call to method | +| ConditionalAccess.cs:1:7:1:23 | call to method | ConditionalAccess.cs:1:7:1:23 | this access | | ConditionalAccess.cs:1:7:1:23 | exit ConditionalAccess | ConditionalAccess.cs:1:7:1:23 | exit ConditionalAccess (normal) | | ConditionalAccess.cs:1:7:1:23 | exit ConditionalAccess (normal) | ConditionalAccess.cs:1:7:1:23 | {...} | +| ConditionalAccess.cs:1:7:1:23 | this access | ConditionalAccess.cs:1:7:1:23 | enter ConditionalAccess | | ConditionalAccess.cs:1:7:1:23 | {...} | ConditionalAccess.cs:1:7:1:23 | call to constructor Object | | ConditionalAccess.cs:3:12:3:13 | exit M1 | ConditionalAccess.cs:3:12:3:13 | exit M1 (normal) | | ConditionalAccess.cs:3:12:3:13 | exit M1 (normal) | ConditionalAccess.cs:3:26:3:26 | access to parameter i | @@ -4743,9 +4839,11 @@ postDominance | ConditionalAccess.cs:41:70:41:83 | ... + ... | ConditionalAccess.cs:41:82:41:83 | access to parameter s2 | | ConditionalAccess.cs:41:75:41:78 | ", " | ConditionalAccess.cs:41:70:41:71 | access to parameter s1 | | ConditionalAccess.cs:41:82:41:83 | access to parameter s2 | ConditionalAccess.cs:41:70:41:78 | ... + ... | -| Conditions.cs:1:7:1:16 | call to constructor Object | Conditions.cs:1:7:1:16 | enter Conditions | +| Conditions.cs:1:7:1:16 | call to constructor Object | Conditions.cs:1:7:1:16 | call to method | +| Conditions.cs:1:7:1:16 | call to method | Conditions.cs:1:7:1:16 | this access | | Conditions.cs:1:7:1:16 | exit Conditions | Conditions.cs:1:7:1:16 | exit Conditions (normal) | | Conditions.cs:1:7:1:16 | exit Conditions (normal) | Conditions.cs:1:7:1:16 | {...} | +| Conditions.cs:1:7:1:16 | this access | Conditions.cs:1:7:1:16 | enter Conditions | | Conditions.cs:1:7:1:16 | {...} | Conditions.cs:1:7:1:16 | call to constructor Object | | Conditions.cs:3:10:3:19 | exit IncrOrDecr | Conditions.cs:3:10:3:19 | exit IncrOrDecr (normal) | | Conditions.cs:3:10:3:19 | exit IncrOrDecr (normal) | Conditions.cs:7:13:7:16 | [false] !... | @@ -5040,9 +5138,11 @@ postDominance | Conditions.cs:149:40:149:43 | "b = " | Conditions.cs:149:13:149:49 | ...; | | Conditions.cs:149:44:149:46 | {...} | Conditions.cs:149:45:149:45 | access to local variable s | | Conditions.cs:149:45:149:45 | access to local variable s | Conditions.cs:149:40:149:43 | "b = " | -| ExitMethods.cs:6:7:6:17 | call to constructor Object | ExitMethods.cs:6:7:6:17 | enter ExitMethods | +| ExitMethods.cs:6:7:6:17 | call to constructor Object | ExitMethods.cs:6:7:6:17 | call to method | +| ExitMethods.cs:6:7:6:17 | call to method | ExitMethods.cs:6:7:6:17 | this access | | ExitMethods.cs:6:7:6:17 | exit ExitMethods | ExitMethods.cs:6:7:6:17 | exit ExitMethods (normal) | | ExitMethods.cs:6:7:6:17 | exit ExitMethods (normal) | ExitMethods.cs:6:7:6:17 | {...} | +| ExitMethods.cs:6:7:6:17 | this access | ExitMethods.cs:6:7:6:17 | enter ExitMethods | | ExitMethods.cs:6:7:6:17 | {...} | ExitMethods.cs:6:7:6:17 | call to constructor Object | | ExitMethods.cs:8:10:8:11 | exit M1 | ExitMethods.cs:8:10:8:11 | exit M1 (normal) | | ExitMethods.cs:8:10:8:11 | exit M1 (normal) | ExitMethods.cs:11:9:11:15 | return ...; | @@ -5231,9 +5331,11 @@ postDominance | Extensions.cs:25:9:25:34 | ...; | Extensions.cs:24:9:24:45 | call to method ToBool | | Extensions.cs:25:23:25:32 | access to method Parse | Extensions.cs:25:9:25:14 | "true" | | Extensions.cs:25:23:25:32 | delegate creation of type Func | Extensions.cs:25:23:25:32 | access to method Parse | -| Finally.cs:3:14:3:20 | call to constructor Object | Finally.cs:3:14:3:20 | enter Finally | +| Finally.cs:3:14:3:20 | call to constructor Object | Finally.cs:3:14:3:20 | call to method | +| Finally.cs:3:14:3:20 | call to method | Finally.cs:3:14:3:20 | this access | | Finally.cs:3:14:3:20 | exit Finally | Finally.cs:3:14:3:20 | exit Finally (normal) | | Finally.cs:3:14:3:20 | exit Finally (normal) | Finally.cs:3:14:3:20 | {...} | +| Finally.cs:3:14:3:20 | this access | Finally.cs:3:14:3:20 | enter Finally | | Finally.cs:3:14:3:20 | {...} | Finally.cs:3:14:3:20 | call to constructor Object | | Finally.cs:7:10:7:11 | exit M1 (normal) | Finally.cs:15:13:15:40 | call to method WriteLine | | Finally.cs:8:5:17:5 | {...} | Finally.cs:7:10:7:11 | enter M1 | @@ -5433,17 +5535,23 @@ postDominance | Finally.cs:167:17:167:37 | call to method WriteLine | Finally.cs:167:35:167:36 | "" | | Finally.cs:167:17:167:38 | ...; | Finally.cs:166:13:168:13 | {...} | | Finally.cs:167:35:167:36 | "" | Finally.cs:167:17:167:38 | ...; | -| Finally.cs:172:11:172:20 | call to constructor Exception | Finally.cs:172:11:172:20 | enter ExceptionA | +| Finally.cs:172:11:172:20 | call to constructor Exception | Finally.cs:172:11:172:20 | call to method | +| Finally.cs:172:11:172:20 | call to method | Finally.cs:172:11:172:20 | this access | | Finally.cs:172:11:172:20 | exit ExceptionA | Finally.cs:172:11:172:20 | exit ExceptionA (normal) | | Finally.cs:172:11:172:20 | exit ExceptionA (normal) | Finally.cs:172:11:172:20 | {...} | +| Finally.cs:172:11:172:20 | this access | Finally.cs:172:11:172:20 | enter ExceptionA | | Finally.cs:172:11:172:20 | {...} | Finally.cs:172:11:172:20 | call to constructor Exception | -| Finally.cs:173:11:173:20 | call to constructor Exception | Finally.cs:173:11:173:20 | enter ExceptionB | +| Finally.cs:173:11:173:20 | call to constructor Exception | Finally.cs:173:11:173:20 | call to method | +| Finally.cs:173:11:173:20 | call to method | Finally.cs:173:11:173:20 | this access | | Finally.cs:173:11:173:20 | exit ExceptionB | Finally.cs:173:11:173:20 | exit ExceptionB (normal) | | Finally.cs:173:11:173:20 | exit ExceptionB (normal) | Finally.cs:173:11:173:20 | {...} | +| Finally.cs:173:11:173:20 | this access | Finally.cs:173:11:173:20 | enter ExceptionB | | Finally.cs:173:11:173:20 | {...} | Finally.cs:173:11:173:20 | call to constructor Exception | -| Finally.cs:174:11:174:20 | call to constructor Exception | Finally.cs:174:11:174:20 | enter ExceptionC | +| Finally.cs:174:11:174:20 | call to constructor Exception | Finally.cs:174:11:174:20 | call to method | +| Finally.cs:174:11:174:20 | call to method | Finally.cs:174:11:174:20 | this access | | Finally.cs:174:11:174:20 | exit ExceptionC | Finally.cs:174:11:174:20 | exit ExceptionC (normal) | | Finally.cs:174:11:174:20 | exit ExceptionC (normal) | Finally.cs:174:11:174:20 | {...} | +| Finally.cs:174:11:174:20 | this access | Finally.cs:174:11:174:20 | enter ExceptionC | | Finally.cs:174:11:174:20 | {...} | Finally.cs:174:11:174:20 | call to constructor Exception | | Finally.cs:176:10:176:11 | exit M9 (normal) | Finally.cs:186:21:186:22 | access to parameter b2 | | Finally.cs:176:10:176:11 | exit M9 (normal) | Finally.cs:190:21:190:22 | access to parameter b1 | @@ -5560,9 +5668,11 @@ postDominance | Finally.cs:272:13:272:18 | ... = ... | Finally.cs:272:13:272:18 | ... + ... | | Finally.cs:272:13:272:19 | ...; | Finally.cs:271:13:271:34 | call to method WriteLine | | Finally.cs:272:18:272:18 | 3 | Finally.cs:272:13:272:13 | access to parameter i | -| Foreach.cs:4:7:4:13 | call to constructor Object | Foreach.cs:4:7:4:13 | enter Foreach | +| Foreach.cs:4:7:4:13 | call to constructor Object | Foreach.cs:4:7:4:13 | call to method | +| Foreach.cs:4:7:4:13 | call to method | Foreach.cs:4:7:4:13 | this access | | Foreach.cs:4:7:4:13 | exit Foreach | Foreach.cs:4:7:4:13 | exit Foreach (normal) | | Foreach.cs:4:7:4:13 | exit Foreach (normal) | Foreach.cs:4:7:4:13 | {...} | +| Foreach.cs:4:7:4:13 | this access | Foreach.cs:4:7:4:13 | enter Foreach | | Foreach.cs:4:7:4:13 | {...} | Foreach.cs:4:7:4:13 | call to constructor Object | | Foreach.cs:6:10:6:11 | exit M1 | Foreach.cs:6:10:6:11 | exit M1 (normal) | | Foreach.cs:6:10:6:11 | exit M1 (normal) | Foreach.cs:8:9:9:13 | foreach (... ... in ...) ... | @@ -5614,39 +5724,34 @@ postDominance | Foreach.cs:38:33:38:33 | Int32 y | Foreach.cs:38:26:38:26 | String x | | Foreach.cs:38:39:38:42 | access to parameter args | Foreach.cs:37:5:40:5 | {...} | | Foreach.cs:39:11:39:11 | ; | Foreach.cs:38:18:38:34 | (..., ...) | +| Initializers.cs:3:7:3:18 | exit | Initializers.cs:3:7:3:18 | exit (normal) | +| Initializers.cs:3:7:3:18 | exit (normal) | Initializers.cs:6:25:6:31 | ... = ... | | Initializers.cs:3:7:3:18 | exit Initializers | Initializers.cs:3:7:3:18 | exit Initializers (normal) | | Initializers.cs:3:7:3:18 | exit Initializers (normal) | Initializers.cs:3:7:3:18 | {...} | | Initializers.cs:3:7:3:18 | {...} | Initializers.cs:3:7:3:18 | enter Initializers | -| Initializers.cs:5:9:5:9 | this access | Initializers.cs:8:5:8:16 | call to constructor Object | -| Initializers.cs:5:9:5:9 | this access | Initializers.cs:10:5:10:16 | call to constructor Object | -| Initializers.cs:5:9:5:17 | ... = ... | Initializers.cs:5:13:5:17 | ... + ... | +| Initializers.cs:5:9:5:9 | this access | Initializers.cs:3:7:3:18 | enter | | Initializers.cs:5:9:5:17 | ... = ... | Initializers.cs:5:13:5:17 | ... + ... | | Initializers.cs:5:13:5:13 | access to field H | Initializers.cs:5:9:5:9 | this access | -| Initializers.cs:5:13:5:13 | access to field H | Initializers.cs:5:9:5:9 | this access | -| Initializers.cs:5:13:5:17 | ... + ... | Initializers.cs:5:17:5:17 | 1 | | Initializers.cs:5:13:5:17 | ... + ... | Initializers.cs:5:17:5:17 | 1 | | Initializers.cs:5:17:5:17 | 1 | Initializers.cs:5:13:5:13 | access to field H | -| Initializers.cs:5:17:5:17 | 1 | Initializers.cs:5:13:5:13 | access to field H | -| Initializers.cs:6:9:6:9 | access to property G | Initializers.cs:6:27:6:31 | ... + ... | | Initializers.cs:6:9:6:9 | access to property G | Initializers.cs:6:27:6:31 | ... + ... | | Initializers.cs:6:9:6:9 | this access | Initializers.cs:5:9:5:17 | ... = ... | -| Initializers.cs:6:9:6:9 | this access | Initializers.cs:5:9:5:17 | ... = ... | -| Initializers.cs:6:25:6:31 | ... = ... | Initializers.cs:6:9:6:9 | access to property G | | Initializers.cs:6:25:6:31 | ... = ... | Initializers.cs:6:9:6:9 | access to property G | | Initializers.cs:6:27:6:27 | access to field H | Initializers.cs:6:9:6:9 | this access | -| Initializers.cs:6:27:6:27 | access to field H | Initializers.cs:6:9:6:9 | this access | -| Initializers.cs:6:27:6:31 | ... + ... | Initializers.cs:6:31:6:31 | 2 | | Initializers.cs:6:27:6:31 | ... + ... | Initializers.cs:6:31:6:31 | 2 | | Initializers.cs:6:31:6:31 | 2 | Initializers.cs:6:27:6:27 | access to field H | -| Initializers.cs:6:31:6:31 | 2 | Initializers.cs:6:27:6:27 | access to field H | -| Initializers.cs:8:5:8:16 | call to constructor Object | Initializers.cs:8:5:8:16 | enter Initializers | +| Initializers.cs:8:5:8:16 | call to constructor Object | Initializers.cs:8:5:8:16 | call to method | +| Initializers.cs:8:5:8:16 | call to method | Initializers.cs:8:5:8:16 | this access | | Initializers.cs:8:5:8:16 | exit Initializers | Initializers.cs:8:5:8:16 | exit Initializers (normal) | | Initializers.cs:8:5:8:16 | exit Initializers (normal) | Initializers.cs:8:20:8:22 | {...} | -| Initializers.cs:8:20:8:22 | {...} | Initializers.cs:6:25:6:31 | ... = ... | -| Initializers.cs:10:5:10:16 | call to constructor Object | Initializers.cs:10:5:10:16 | enter Initializers | +| Initializers.cs:8:5:8:16 | this access | Initializers.cs:8:5:8:16 | enter Initializers | +| Initializers.cs:8:20:8:22 | {...} | Initializers.cs:8:5:8:16 | call to constructor Object | +| Initializers.cs:10:5:10:16 | call to constructor Object | Initializers.cs:10:5:10:16 | call to method | +| Initializers.cs:10:5:10:16 | call to method | Initializers.cs:10:5:10:16 | this access | | Initializers.cs:10:5:10:16 | exit Initializers | Initializers.cs:10:5:10:16 | exit Initializers (normal) | | Initializers.cs:10:5:10:16 | exit Initializers (normal) | Initializers.cs:10:28:10:30 | {...} | -| Initializers.cs:10:28:10:30 | {...} | Initializers.cs:6:25:6:31 | ... = ... | +| Initializers.cs:10:5:10:16 | this access | Initializers.cs:10:5:10:16 | enter Initializers | +| Initializers.cs:10:28:10:30 | {...} | Initializers.cs:10:5:10:16 | call to constructor Object | | Initializers.cs:12:10:12:10 | exit M | Initializers.cs:12:10:12:10 | exit M (normal) | | Initializers.cs:12:10:12:10 | exit M (normal) | Initializers.cs:15:13:15:63 | Initializers[] iz = ... | | Initializers.cs:13:5:16:5 | {...} | Initializers.cs:12:10:12:10 | enter M | @@ -5672,26 +5777,31 @@ postDominance | Initializers.cs:18:16:18:16 | exit H (normal) | Initializers.cs:18:16:18:20 | ... = ... | | Initializers.cs:18:16:18:20 | ... = ... | Initializers.cs:18:20:18:20 | 1 | | Initializers.cs:18:20:18:20 | 1 | Initializers.cs:18:16:18:16 | enter H | -| Initializers.cs:20:11:20:23 | call to constructor Object | Initializers.cs:20:11:20:23 | enter NoConstructor | +| Initializers.cs:20:11:20:23 | call to constructor Object | Initializers.cs:20:11:20:23 | call to method | +| Initializers.cs:20:11:20:23 | call to method | Initializers.cs:20:11:20:23 | this access | +| Initializers.cs:20:11:20:23 | exit | Initializers.cs:20:11:20:23 | exit (normal) | +| Initializers.cs:20:11:20:23 | exit (normal) | Initializers.cs:23:23:23:27 | ... = ... | | Initializers.cs:20:11:20:23 | exit NoConstructor | Initializers.cs:20:11:20:23 | exit NoConstructor (normal) | | Initializers.cs:20:11:20:23 | exit NoConstructor (normal) | Initializers.cs:20:11:20:23 | {...} | -| Initializers.cs:20:11:20:23 | {...} | Initializers.cs:23:23:23:27 | ... = ... | -| Initializers.cs:22:23:22:23 | this access | Initializers.cs:20:11:20:23 | call to constructor Object | +| Initializers.cs:20:11:20:23 | this access | Initializers.cs:20:11:20:23 | enter NoConstructor | +| Initializers.cs:20:11:20:23 | {...} | Initializers.cs:20:11:20:23 | call to constructor Object | +| Initializers.cs:22:23:22:23 | this access | Initializers.cs:20:11:20:23 | enter | | Initializers.cs:22:23:22:27 | ... = ... | Initializers.cs:22:27:22:27 | 0 | | Initializers.cs:22:27:22:27 | 0 | Initializers.cs:22:23:22:23 | this access | | Initializers.cs:23:23:23:23 | this access | Initializers.cs:22:23:22:27 | ... = ... | | Initializers.cs:23:23:23:27 | ... = ... | Initializers.cs:23:27:23:27 | 1 | | Initializers.cs:23:27:23:27 | 1 | Initializers.cs:23:23:23:23 | this access | -| Initializers.cs:28:13:28:13 | this access | Initializers.cs:31:17:31:20 | call to constructor NoConstructor | -| Initializers.cs:28:13:28:13 | this access | Initializers.cs:35:9:35:11 | call to constructor NoConstructor | -| Initializers.cs:28:13:28:17 | ... = ... | Initializers.cs:28:17:28:17 | 2 | +| Initializers.cs:26:11:26:13 | exit | Initializers.cs:26:11:26:13 | exit (normal) | +| Initializers.cs:26:11:26:13 | exit (normal) | Initializers.cs:28:13:28:17 | ... = ... | +| Initializers.cs:28:13:28:13 | this access | Initializers.cs:26:11:26:13 | enter | | Initializers.cs:28:13:28:17 | ... = ... | Initializers.cs:28:17:28:17 | 2 | | Initializers.cs:28:17:28:17 | 2 | Initializers.cs:28:13:28:13 | this access | -| Initializers.cs:28:17:28:17 | 2 | Initializers.cs:28:13:28:13 | this access | +| Initializers.cs:31:9:31:11 | call to method | Initializers.cs:31:9:31:11 | this access | | Initializers.cs:31:9:31:11 | exit Sub | Initializers.cs:31:9:31:11 | exit Sub (normal) | | Initializers.cs:31:9:31:11 | exit Sub (normal) | Initializers.cs:31:26:31:30 | ... = ... | -| Initializers.cs:31:17:31:20 | call to constructor NoConstructor | Initializers.cs:31:9:31:11 | enter Sub | -| Initializers.cs:31:24:31:33 | {...} | Initializers.cs:28:13:28:17 | ... = ... | +| Initializers.cs:31:9:31:11 | this access | Initializers.cs:31:9:31:11 | enter Sub | +| Initializers.cs:31:17:31:20 | call to constructor NoConstructor | Initializers.cs:31:9:31:11 | call to method | +| Initializers.cs:31:24:31:33 | {...} | Initializers.cs:31:17:31:20 | call to constructor NoConstructor | | Initializers.cs:31:26:31:26 | this access | Initializers.cs:31:26:31:31 | ...; | | Initializers.cs:31:26:31:30 | ... = ... | Initializers.cs:31:30:31:30 | 3 | | Initializers.cs:31:26:31:31 | ...; | Initializers.cs:31:24:31:33 | {...} | @@ -5704,23 +5814,29 @@ postDominance | Initializers.cs:33:31:33:35 | ... = ... | Initializers.cs:33:35:33:35 | access to parameter i | | Initializers.cs:33:31:33:36 | ...; | Initializers.cs:33:29:33:38 | {...} | | Initializers.cs:33:35:33:35 | access to parameter i | Initializers.cs:33:31:33:31 | this access | -| Initializers.cs:35:9:35:11 | call to constructor NoConstructor | Initializers.cs:35:9:35:11 | enter Sub | +| Initializers.cs:35:9:35:11 | call to constructor NoConstructor | Initializers.cs:35:9:35:11 | call to method | +| Initializers.cs:35:9:35:11 | call to method | Initializers.cs:35:9:35:11 | this access | | Initializers.cs:35:9:35:11 | exit Sub | Initializers.cs:35:9:35:11 | exit Sub (normal) | | Initializers.cs:35:9:35:11 | exit Sub (normal) | Initializers.cs:35:29:35:37 | ... = ... | -| Initializers.cs:35:27:35:40 | {...} | Initializers.cs:28:13:28:17 | ... = ... | +| Initializers.cs:35:9:35:11 | this access | Initializers.cs:35:9:35:11 | enter Sub | +| Initializers.cs:35:27:35:40 | {...} | Initializers.cs:35:9:35:11 | call to constructor NoConstructor | | Initializers.cs:35:29:35:29 | this access | Initializers.cs:35:29:35:38 | ...; | | Initializers.cs:35:29:35:37 | ... = ... | Initializers.cs:35:33:35:37 | ... + ... | | Initializers.cs:35:29:35:38 | ...; | Initializers.cs:35:27:35:40 | {...} | | Initializers.cs:35:33:35:33 | access to parameter i | Initializers.cs:35:29:35:29 | this access | | Initializers.cs:35:33:35:37 | ... + ... | Initializers.cs:35:37:35:37 | access to parameter j | | Initializers.cs:35:37:35:37 | access to parameter j | Initializers.cs:35:33:35:33 | access to parameter i | -| Initializers.cs:39:7:39:23 | call to constructor Object | Initializers.cs:39:7:39:23 | enter IndexInitializers | +| Initializers.cs:39:7:39:23 | call to constructor Object | Initializers.cs:39:7:39:23 | call to method | +| Initializers.cs:39:7:39:23 | call to method | Initializers.cs:39:7:39:23 | this access | | Initializers.cs:39:7:39:23 | exit IndexInitializers | Initializers.cs:39:7:39:23 | exit IndexInitializers (normal) | | Initializers.cs:39:7:39:23 | exit IndexInitializers (normal) | Initializers.cs:39:7:39:23 | {...} | +| Initializers.cs:39:7:39:23 | this access | Initializers.cs:39:7:39:23 | enter IndexInitializers | | Initializers.cs:39:7:39:23 | {...} | Initializers.cs:39:7:39:23 | call to constructor Object | -| Initializers.cs:41:11:41:18 | call to constructor Object | Initializers.cs:41:11:41:18 | enter Compound | +| Initializers.cs:41:11:41:18 | call to constructor Object | Initializers.cs:41:11:41:18 | call to method | +| Initializers.cs:41:11:41:18 | call to method | Initializers.cs:41:11:41:18 | this access | | Initializers.cs:41:11:41:18 | exit Compound | Initializers.cs:41:11:41:18 | exit Compound (normal) | | Initializers.cs:41:11:41:18 | exit Compound (normal) | Initializers.cs:41:11:41:18 | {...} | +| Initializers.cs:41:11:41:18 | this access | Initializers.cs:41:11:41:18 | enter Compound | | Initializers.cs:41:11:41:18 | {...} | Initializers.cs:41:11:41:18 | call to constructor Object | | Initializers.cs:51:10:51:13 | exit Test | Initializers.cs:51:10:51:13 | exit Test (normal) | | Initializers.cs:51:10:51:13 | exit Test (normal) | Initializers.cs:57:13:65:9 | Compound compound = ... | @@ -5826,9 +5942,11 @@ postDominance | Initializers.cs:64:50:64:54 | ... + ... | Initializers.cs:64:54:64:54 | 0 | | Initializers.cs:64:54:64:54 | 0 | Initializers.cs:64:50:64:50 | access to parameter i | | Initializers.cs:64:59:64:61 | "1" | Initializers.cs:64:50:64:54 | ... + ... | -| LoopUnrolling.cs:5:7:5:19 | call to constructor Object | LoopUnrolling.cs:5:7:5:19 | enter LoopUnrolling | +| LoopUnrolling.cs:5:7:5:19 | call to constructor Object | LoopUnrolling.cs:5:7:5:19 | call to method | +| LoopUnrolling.cs:5:7:5:19 | call to method | LoopUnrolling.cs:5:7:5:19 | this access | | LoopUnrolling.cs:5:7:5:19 | exit LoopUnrolling | LoopUnrolling.cs:5:7:5:19 | exit LoopUnrolling (normal) | | LoopUnrolling.cs:5:7:5:19 | exit LoopUnrolling (normal) | LoopUnrolling.cs:5:7:5:19 | {...} | +| LoopUnrolling.cs:5:7:5:19 | this access | LoopUnrolling.cs:5:7:5:19 | enter LoopUnrolling | | LoopUnrolling.cs:5:7:5:19 | {...} | LoopUnrolling.cs:5:7:5:19 | call to constructor Object | | LoopUnrolling.cs:7:10:7:11 | exit M1 | LoopUnrolling.cs:7:10:7:11 | exit M1 (normal) | | LoopUnrolling.cs:7:10:7:11 | exit M1 (normal) | LoopUnrolling.cs:10:13:10:19 | return ...; | @@ -6021,6 +6139,8 @@ postDominance | LoopUnrolling.cs:99:13:99:32 | call to method WriteLine | LoopUnrolling.cs:99:31:99:31 | access to local variable x | | LoopUnrolling.cs:99:13:99:33 | ...; | LoopUnrolling.cs:98:9:100:9 | {...} | | LoopUnrolling.cs:99:31:99:31 | access to local variable x | LoopUnrolling.cs:99:13:99:33 | ...; | +| MultiImplementationA.cs:4:7:4:8 | call to constructor Object | MultiImplementationA.cs:4:7:4:8 | call to method | +| MultiImplementationA.cs:4:7:4:8 | call to method | MultiImplementationA.cs:4:7:4:8 | this access | | MultiImplementationA.cs:4:7:4:8 | exit C1 | MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | | MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | MultiImplementationA.cs:4:7:4:8 | {...} | | MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | MultiImplementationB.cs:1:7:1:8 | {...} | @@ -6039,7 +6159,9 @@ postDominance | MultiImplementationA.cs:8:16:8:16 | exit M (abnormal) | MultiImplementationA.cs:8:23:8:32 | throw ... | | MultiImplementationA.cs:8:16:8:16 | exit M (normal) | MultiImplementationB.cs:5:23:5:23 | 2 | | MultiImplementationA.cs:8:23:8:32 | throw ... | MultiImplementationA.cs:8:29:8:32 | null | -| MultiImplementationA.cs:13:16:13:16 | this access | MultiImplementationA.cs:20:12:20:13 | call to constructor Object | +| MultiImplementationA.cs:11:7:11:8 | exit | MultiImplementationA.cs:11:7:11:8 | exit (normal) | +| MultiImplementationA.cs:11:7:11:8 | exit (normal) | MultiImplementationA.cs:24:32:24:34 | ... = ... | +| MultiImplementationA.cs:11:7:11:8 | exit (normal) | MultiImplementationB.cs:22:32:22:34 | ... = ... | | MultiImplementationA.cs:13:16:13:20 | ... = ... | MultiImplementationA.cs:13:20:13:20 | 0 | | MultiImplementationA.cs:13:20:13:20 | 0 | MultiImplementationA.cs:13:16:13:16 | this access | | MultiImplementationA.cs:14:31:14:31 | access to parameter i | MultiImplementationA.cs:14:31:14:31 | enter get_Item | @@ -6060,10 +6182,12 @@ postDominance | MultiImplementationA.cs:18:9:18:22 | exit M2 | MultiImplementationA.cs:18:9:18:22 | exit M2 (normal) | | MultiImplementationA.cs:18:9:18:22 | exit M2 (normal) | MultiImplementationA.cs:18:21:18:21 | 0 | | MultiImplementationA.cs:18:21:18:21 | 0 | MultiImplementationA.cs:18:9:18:22 | enter M2 | -| MultiImplementationA.cs:20:12:20:13 | call to constructor Object | MultiImplementationA.cs:20:12:20:13 | enter C2 | +| MultiImplementationA.cs:20:12:20:13 | call to constructor Object | MultiImplementationA.cs:20:12:20:13 | call to method | +| MultiImplementationA.cs:20:12:20:13 | call to method | MultiImplementationA.cs:20:12:20:13 | this access | | MultiImplementationA.cs:20:12:20:13 | exit C2 (abnormal) | MultiImplementationB.cs:18:24:18:34 | throw ...; | | MultiImplementationA.cs:20:12:20:13 | exit C2 (normal) | MultiImplementationA.cs:20:24:20:28 | ... = ... | -| MultiImplementationA.cs:20:22:20:31 | {...} | MultiImplementationA.cs:24:32:24:34 | ... = ... | +| MultiImplementationA.cs:20:12:20:13 | this access | MultiImplementationA.cs:20:12:20:13 | enter C2 | +| MultiImplementationA.cs:20:22:20:31 | {...} | MultiImplementationA.cs:20:12:20:13 | call to constructor Object | | MultiImplementationA.cs:20:24:20:24 | this access | MultiImplementationA.cs:20:24:20:29 | ...; | | MultiImplementationA.cs:20:24:20:28 | ... = ... | MultiImplementationA.cs:20:28:20:28 | access to parameter i | | MultiImplementationA.cs:20:24:20:29 | ...; | MultiImplementationA.cs:20:22:20:31 | {...} | @@ -6083,6 +6207,8 @@ postDominance | MultiImplementationA.cs:24:16:24:16 | this access | MultiImplementationA.cs:13:16:13:20 | ... = ... | | MultiImplementationA.cs:24:32:24:34 | ... = ... | MultiImplementationA.cs:24:16:24:16 | access to property P | | MultiImplementationA.cs:24:34:24:34 | 0 | MultiImplementationA.cs:24:16:24:16 | this access | +| MultiImplementationA.cs:28:7:28:8 | call to constructor Object | MultiImplementationA.cs:28:7:28:8 | call to method | +| MultiImplementationA.cs:28:7:28:8 | call to method | MultiImplementationA.cs:28:7:28:8 | this access | | MultiImplementationA.cs:28:7:28:8 | exit C3 | MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | | MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | MultiImplementationA.cs:28:7:28:8 | {...} | | MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | MultiImplementationB.cs:25:7:25:8 | {...} | @@ -6091,6 +6217,8 @@ postDominance | MultiImplementationA.cs:30:21:30:23 | exit get_P3 (abnormal) | MultiImplementationA.cs:30:28:30:37 | throw ... | | MultiImplementationA.cs:30:28:30:37 | throw ... | MultiImplementationA.cs:30:34:30:37 | null | | MultiImplementationA.cs:30:34:30:37 | null | MultiImplementationA.cs:30:21:30:23 | enter get_P3 | +| MultiImplementationA.cs:34:15:34:16 | call to constructor Object | MultiImplementationA.cs:34:15:34:16 | call to method | +| MultiImplementationA.cs:34:15:34:16 | call to method | MultiImplementationA.cs:34:15:34:16 | this access | | MultiImplementationA.cs:34:15:34:16 | exit C4 | MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | | MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | MultiImplementationA.cs:34:15:34:16 | {...} | | MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | MultiImplementationB.cs:30:15:30:16 | {...} | @@ -6104,6 +6232,8 @@ postDominance | MultiImplementationA.cs:37:14:37:28 | {...} | MultiImplementationA.cs:37:9:37:10 | enter M2 | | MultiImplementationA.cs:37:16:37:26 | throw ...; | MultiImplementationA.cs:37:22:37:25 | null | | MultiImplementationA.cs:37:22:37:25 | null | MultiImplementationA.cs:37:14:37:28 | {...} | +| MultiImplementationB.cs:1:7:1:8 | call to constructor Object | MultiImplementationB.cs:1:7:1:8 | call to method | +| MultiImplementationB.cs:1:7:1:8 | call to method | MultiImplementationB.cs:1:7:1:8 | this access | | MultiImplementationB.cs:1:7:1:8 | {...} | MultiImplementationB.cs:1:7:1:8 | call to constructor Object | | MultiImplementationB.cs:3:22:3:22 | 0 | MultiImplementationA.cs:6:22:6:31 | enter get_P1 | | MultiImplementationB.cs:4:25:4:37 | {...} | MultiImplementationA.cs:7:21:7:23 | enter get_P2 | @@ -6111,7 +6241,6 @@ postDominance | MultiImplementationB.cs:4:34:4:34 | 1 | MultiImplementationB.cs:4:25:4:37 | {...} | | MultiImplementationB.cs:4:43:4:45 | {...} | MultiImplementationA.cs:7:41:7:43 | enter set_P2 | | MultiImplementationB.cs:5:23:5:23 | 2 | MultiImplementationA.cs:8:16:8:16 | enter M | -| MultiImplementationB.cs:11:16:11:16 | this access | MultiImplementationB.cs:18:12:18:13 | call to constructor Object | | MultiImplementationB.cs:11:16:11:20 | ... = ... | MultiImplementationB.cs:11:20:11:20 | 1 | | MultiImplementationB.cs:11:20:11:20 | 1 | MultiImplementationB.cs:11:16:11:16 | this access | | MultiImplementationB.cs:12:31:12:40 | throw ... | MultiImplementationB.cs:12:37:12:40 | null | @@ -6122,7 +6251,9 @@ postDominance | MultiImplementationB.cs:16:9:16:31 | exit M2 (abnormal) | MultiImplementationB.cs:16:21:16:30 | throw ... | | MultiImplementationB.cs:16:21:16:30 | throw ... | MultiImplementationB.cs:16:27:16:30 | null | | MultiImplementationB.cs:16:27:16:30 | null | MultiImplementationB.cs:16:9:16:31 | enter M2 | -| MultiImplementationB.cs:18:22:18:36 | {...} | MultiImplementationB.cs:22:32:22:34 | ... = ... | +| MultiImplementationB.cs:18:12:18:13 | call to constructor Object | MultiImplementationB.cs:18:12:18:13 | call to method | +| MultiImplementationB.cs:18:12:18:13 | call to method | MultiImplementationB.cs:18:12:18:13 | this access | +| MultiImplementationB.cs:18:22:18:36 | {...} | MultiImplementationB.cs:18:12:18:13 | call to constructor Object | | MultiImplementationB.cs:18:24:18:34 | throw ...; | MultiImplementationB.cs:18:30:18:33 | null | | MultiImplementationB.cs:18:30:18:33 | null | MultiImplementationB.cs:18:22:18:36 | {...} | | MultiImplementationB.cs:19:19:19:22 | call to constructor C2 | MultiImplementationB.cs:19:24:19:24 | 1 | @@ -6134,12 +6265,18 @@ postDominance | MultiImplementationB.cs:22:16:22:16 | this access | MultiImplementationB.cs:11:16:11:20 | ... = ... | | MultiImplementationB.cs:22:32:22:34 | ... = ... | MultiImplementationB.cs:22:16:22:16 | access to property P | | MultiImplementationB.cs:22:34:22:34 | 1 | MultiImplementationB.cs:22:16:22:16 | this access | +| MultiImplementationB.cs:25:7:25:8 | call to constructor Object | MultiImplementationB.cs:25:7:25:8 | call to method | +| MultiImplementationB.cs:25:7:25:8 | call to method | MultiImplementationB.cs:25:7:25:8 | this access | | MultiImplementationB.cs:25:7:25:8 | {...} | MultiImplementationB.cs:25:7:25:8 | call to constructor Object | +| MultiImplementationB.cs:30:15:30:16 | call to constructor Object | MultiImplementationB.cs:30:15:30:16 | call to method | +| MultiImplementationB.cs:30:15:30:16 | call to method | MultiImplementationB.cs:30:15:30:16 | this access | | MultiImplementationB.cs:30:15:30:16 | {...} | MultiImplementationB.cs:30:15:30:16 | call to constructor Object | | MultiImplementationB.cs:32:17:32:17 | 0 | MultiImplementationA.cs:36:9:36:10 | enter M1 | -| NullCoalescing.cs:1:7:1:20 | call to constructor Object | NullCoalescing.cs:1:7:1:20 | enter NullCoalescing | +| NullCoalescing.cs:1:7:1:20 | call to constructor Object | NullCoalescing.cs:1:7:1:20 | call to method | +| NullCoalescing.cs:1:7:1:20 | call to method | NullCoalescing.cs:1:7:1:20 | this access | | NullCoalescing.cs:1:7:1:20 | exit NullCoalescing | NullCoalescing.cs:1:7:1:20 | exit NullCoalescing (normal) | | NullCoalescing.cs:1:7:1:20 | exit NullCoalescing (normal) | NullCoalescing.cs:1:7:1:20 | {...} | +| NullCoalescing.cs:1:7:1:20 | this access | NullCoalescing.cs:1:7:1:20 | enter NullCoalescing | | NullCoalescing.cs:1:7:1:20 | {...} | NullCoalescing.cs:1:7:1:20 | call to constructor Object | | NullCoalescing.cs:3:9:3:10 | exit M1 | NullCoalescing.cs:3:9:3:10 | exit M1 (normal) | | NullCoalescing.cs:3:9:3:10 | exit M1 (normal) | NullCoalescing.cs:3:23:3:28 | ... ?? ... | @@ -6195,31 +6332,32 @@ postDominance | NullCoalescing.cs:17:13:17:19 | (...) ... | NullCoalescing.cs:17:19:17:19 | access to parameter i | | NullCoalescing.cs:17:13:17:24 | ... ?? ... | NullCoalescing.cs:17:13:17:19 | (...) ... | | NullCoalescing.cs:17:19:17:19 | access to parameter i | NullCoalescing.cs:17:9:17:25 | ...; | -| PartialImplementationA.cs:3:12:3:18 | call to constructor Object | PartialImplementationA.cs:3:12:3:18 | enter Partial | +| PartialImplementationA.cs:1:15:1:21 | exit | PartialImplementationA.cs:1:15:1:21 | exit (normal) | +| PartialImplementationA.cs:1:15:1:21 | exit (normal) | PartialImplementationB.cs:5:32:5:34 | ... = ... | +| PartialImplementationA.cs:3:12:3:18 | call to constructor Object | PartialImplementationA.cs:3:12:3:18 | call to method | +| PartialImplementationA.cs:3:12:3:18 | call to method | PartialImplementationA.cs:3:12:3:18 | this access | | PartialImplementationA.cs:3:12:3:18 | exit Partial | PartialImplementationA.cs:3:12:3:18 | exit Partial (normal) | | PartialImplementationA.cs:3:12:3:18 | exit Partial (normal) | PartialImplementationA.cs:3:27:3:29 | {...} | -| PartialImplementationA.cs:3:27:3:29 | {...} | PartialImplementationB.cs:5:32:5:34 | ... = ... | -| PartialImplementationB.cs:3:16:3:16 | this access | PartialImplementationA.cs:3:12:3:18 | call to constructor Object | -| PartialImplementationB.cs:3:16:3:16 | this access | PartialImplementationB.cs:4:12:4:18 | call to constructor Object | -| PartialImplementationB.cs:3:16:3:20 | ... = ... | PartialImplementationB.cs:3:20:3:20 | 0 | +| PartialImplementationA.cs:3:12:3:18 | this access | PartialImplementationA.cs:3:12:3:18 | enter Partial | +| PartialImplementationA.cs:3:27:3:29 | {...} | PartialImplementationA.cs:3:12:3:18 | call to constructor Object | +| PartialImplementationB.cs:3:16:3:16 | this access | PartialImplementationA.cs:1:15:1:21 | enter | | PartialImplementationB.cs:3:16:3:20 | ... = ... | PartialImplementationB.cs:3:20:3:20 | 0 | | PartialImplementationB.cs:3:20:3:20 | 0 | PartialImplementationB.cs:3:16:3:16 | this access | -| PartialImplementationB.cs:3:20:3:20 | 0 | PartialImplementationB.cs:3:16:3:16 | this access | -| PartialImplementationB.cs:4:12:4:18 | call to constructor Object | PartialImplementationB.cs:4:12:4:18 | enter Partial | +| PartialImplementationB.cs:4:12:4:18 | call to constructor Object | PartialImplementationB.cs:4:12:4:18 | call to method | +| PartialImplementationB.cs:4:12:4:18 | call to method | PartialImplementationB.cs:4:12:4:18 | this access | | PartialImplementationB.cs:4:12:4:18 | exit Partial | PartialImplementationB.cs:4:12:4:18 | exit Partial (normal) | | PartialImplementationB.cs:4:12:4:18 | exit Partial (normal) | PartialImplementationB.cs:4:22:4:24 | {...} | -| PartialImplementationB.cs:4:22:4:24 | {...} | PartialImplementationB.cs:5:32:5:34 | ... = ... | -| PartialImplementationB.cs:5:16:5:16 | access to property P | PartialImplementationB.cs:5:34:5:34 | 0 | +| PartialImplementationB.cs:4:12:4:18 | this access | PartialImplementationB.cs:4:12:4:18 | enter Partial | +| PartialImplementationB.cs:4:22:4:24 | {...} | PartialImplementationB.cs:4:12:4:18 | call to constructor Object | | PartialImplementationB.cs:5:16:5:16 | access to property P | PartialImplementationB.cs:5:34:5:34 | 0 | | PartialImplementationB.cs:5:16:5:16 | this access | PartialImplementationB.cs:3:16:3:20 | ... = ... | -| PartialImplementationB.cs:5:16:5:16 | this access | PartialImplementationB.cs:3:16:3:20 | ... = ... | -| PartialImplementationB.cs:5:32:5:34 | ... = ... | PartialImplementationB.cs:5:16:5:16 | access to property P | | PartialImplementationB.cs:5:32:5:34 | ... = ... | PartialImplementationB.cs:5:16:5:16 | access to property P | | PartialImplementationB.cs:5:34:5:34 | 0 | PartialImplementationB.cs:5:16:5:16 | this access | -| PartialImplementationB.cs:5:34:5:34 | 0 | PartialImplementationB.cs:5:16:5:16 | this access | -| Patterns.cs:3:7:3:14 | call to constructor Object | Patterns.cs:3:7:3:14 | enter Patterns | +| Patterns.cs:3:7:3:14 | call to constructor Object | Patterns.cs:3:7:3:14 | call to method | +| Patterns.cs:3:7:3:14 | call to method | Patterns.cs:3:7:3:14 | this access | | Patterns.cs:3:7:3:14 | exit Patterns | Patterns.cs:3:7:3:14 | exit Patterns (normal) | | Patterns.cs:3:7:3:14 | exit Patterns (normal) | Patterns.cs:3:7:3:14 | {...} | +| Patterns.cs:3:7:3:14 | this access | Patterns.cs:3:7:3:14 | enter Patterns | | Patterns.cs:3:7:3:14 | {...} | Patterns.cs:3:7:3:14 | call to constructor Object | | Patterns.cs:5:10:5:11 | exit M1 | Patterns.cs:5:10:5:11 | exit M1 (normal) | | Patterns.cs:5:10:5:11 | exit M1 (normal) | Patterns.cs:40:17:40:17 | access to local variable o | @@ -6404,9 +6542,11 @@ postDominance | Patterns.cs:97:13:97:38 | call to method WriteLine | Patterns.cs:97:31:97:37 | "not C" | | Patterns.cs:97:13:97:39 | ...; | Patterns.cs:96:9:98:9 | {...} | | Patterns.cs:97:31:97:37 | "not C" | Patterns.cs:97:13:97:39 | ...; | -| PostDominance.cs:3:7:3:19 | call to constructor Object | PostDominance.cs:3:7:3:19 | enter PostDominance | +| PostDominance.cs:3:7:3:19 | call to constructor Object | PostDominance.cs:3:7:3:19 | call to method | +| PostDominance.cs:3:7:3:19 | call to method | PostDominance.cs:3:7:3:19 | this access | | PostDominance.cs:3:7:3:19 | exit PostDominance | PostDominance.cs:3:7:3:19 | exit PostDominance (normal) | | PostDominance.cs:3:7:3:19 | exit PostDominance (normal) | PostDominance.cs:3:7:3:19 | {...} | +| PostDominance.cs:3:7:3:19 | this access | PostDominance.cs:3:7:3:19 | enter PostDominance | | PostDominance.cs:3:7:3:19 | {...} | PostDominance.cs:3:7:3:19 | call to constructor Object | | PostDominance.cs:5:10:5:11 | exit M1 | PostDominance.cs:5:10:5:11 | exit M1 (normal) | | PostDominance.cs:5:10:5:11 | exit M1 (normal) | PostDominance.cs:7:9:7:28 | call to method WriteLine | @@ -6437,9 +6577,11 @@ postDominance | PostDominance.cs:21:9:21:28 | call to method WriteLine | PostDominance.cs:21:27:21:27 | access to parameter s | | PostDominance.cs:21:9:21:29 | ...; | PostDominance.cs:19:13:19:21 | [false] ... is ... | | PostDominance.cs:21:27:21:27 | access to parameter s | PostDominance.cs:21:9:21:29 | ...; | -| Qualifiers.cs:1:7:1:16 | call to constructor Object | Qualifiers.cs:1:7:1:16 | enter Qualifiers | +| Qualifiers.cs:1:7:1:16 | call to constructor Object | Qualifiers.cs:1:7:1:16 | call to method | +| Qualifiers.cs:1:7:1:16 | call to method | Qualifiers.cs:1:7:1:16 | this access | | Qualifiers.cs:1:7:1:16 | exit Qualifiers | Qualifiers.cs:1:7:1:16 | exit Qualifiers (normal) | | Qualifiers.cs:1:7:1:16 | exit Qualifiers (normal) | Qualifiers.cs:1:7:1:16 | {...} | +| Qualifiers.cs:1:7:1:16 | this access | Qualifiers.cs:1:7:1:16 | enter Qualifiers | | Qualifiers.cs:1:7:1:16 | {...} | Qualifiers.cs:1:7:1:16 | call to constructor Object | | Qualifiers.cs:7:16:7:21 | exit Method | Qualifiers.cs:7:16:7:21 | exit Method (normal) | | Qualifiers.cs:7:16:7:21 | exit Method (normal) | Qualifiers.cs:7:28:7:31 | null | @@ -6504,9 +6646,11 @@ postDominance | Qualifiers.cs:30:9:30:47 | ...; | Qualifiers.cs:29:9:29:46 | ... = ... | | Qualifiers.cs:30:13:30:37 | call to method StaticMethod | Qualifiers.cs:30:9:30:47 | ...; | | Qualifiers.cs:30:13:30:46 | call to method Method | Qualifiers.cs:30:13:30:37 | call to method StaticMethod | -| Switch.cs:3:7:3:12 | call to constructor Object | Switch.cs:3:7:3:12 | enter Switch | +| Switch.cs:3:7:3:12 | call to constructor Object | Switch.cs:3:7:3:12 | call to method | +| Switch.cs:3:7:3:12 | call to method | Switch.cs:3:7:3:12 | this access | | Switch.cs:3:7:3:12 | exit Switch | Switch.cs:3:7:3:12 | exit Switch (normal) | | Switch.cs:3:7:3:12 | exit Switch (normal) | Switch.cs:3:7:3:12 | {...} | +| Switch.cs:3:7:3:12 | this access | Switch.cs:3:7:3:12 | enter Switch | | Switch.cs:3:7:3:12 | {...} | Switch.cs:3:7:3:12 | call to constructor Object | | Switch.cs:5:10:5:11 | exit M1 | Switch.cs:5:10:5:11 | exit M1 (normal) | | Switch.cs:5:10:5:11 | exit M1 (normal) | Switch.cs:7:17:7:17 | access to parameter o | @@ -6756,9 +6900,11 @@ postDominance | Switch.cs:175:17:175:48 | ...; | Switch.cs:174:13:174:20 | default: | | Switch.cs:175:42:175:46 | "def" | Switch.cs:175:17:175:48 | ...; | | Switch.cs:176:17:176:22 | break; | Switch.cs:175:17:175:47 | call to method WriteLine | -| TypeAccesses.cs:1:7:1:18 | call to constructor Object | TypeAccesses.cs:1:7:1:18 | enter TypeAccesses | +| TypeAccesses.cs:1:7:1:18 | call to constructor Object | TypeAccesses.cs:1:7:1:18 | call to method | +| TypeAccesses.cs:1:7:1:18 | call to method | TypeAccesses.cs:1:7:1:18 | this access | | TypeAccesses.cs:1:7:1:18 | exit TypeAccesses | TypeAccesses.cs:1:7:1:18 | exit TypeAccesses (normal) | | TypeAccesses.cs:1:7:1:18 | exit TypeAccesses (normal) | TypeAccesses.cs:1:7:1:18 | {...} | +| TypeAccesses.cs:1:7:1:18 | this access | TypeAccesses.cs:1:7:1:18 | enter TypeAccesses | | TypeAccesses.cs:1:7:1:18 | {...} | TypeAccesses.cs:1:7:1:18 | call to constructor Object | | TypeAccesses.cs:3:10:3:10 | exit M | TypeAccesses.cs:3:10:3:10 | exit M (normal) | | TypeAccesses.cs:3:10:3:10 | exit M (normal) | TypeAccesses.cs:8:13:8:27 | Type t = ... | @@ -6779,9 +6925,11 @@ postDominance | TypeAccesses.cs:8:9:8:28 | ... ...; | TypeAccesses.cs:7:25:7:25 | ; | | TypeAccesses.cs:8:13:8:27 | Type t = ... | TypeAccesses.cs:8:17:8:27 | typeof(...) | | TypeAccesses.cs:8:17:8:27 | typeof(...) | TypeAccesses.cs:8:9:8:28 | ... ...; | -| VarDecls.cs:3:7:3:14 | call to constructor Object | VarDecls.cs:3:7:3:14 | enter VarDecls | +| VarDecls.cs:3:7:3:14 | call to constructor Object | VarDecls.cs:3:7:3:14 | call to method | +| VarDecls.cs:3:7:3:14 | call to method | VarDecls.cs:3:7:3:14 | this access | | VarDecls.cs:3:7:3:14 | exit VarDecls | VarDecls.cs:3:7:3:14 | exit VarDecls (normal) | | VarDecls.cs:3:7:3:14 | exit VarDecls (normal) | VarDecls.cs:3:7:3:14 | {...} | +| VarDecls.cs:3:7:3:14 | this access | VarDecls.cs:3:7:3:14 | enter VarDecls | | VarDecls.cs:3:7:3:14 | {...} | VarDecls.cs:3:7:3:14 | call to constructor Object | | VarDecls.cs:5:18:5:19 | exit M1 | VarDecls.cs:5:18:5:19 | exit M1 (normal) | | VarDecls.cs:5:18:5:19 | exit M1 (normal) | VarDecls.cs:9:13:9:29 | return ...; | @@ -6828,9 +6976,11 @@ postDominance | VarDecls.cs:25:20:25:20 | access to parameter b | VarDecls.cs:24:31:24:41 | C y = ... | | VarDecls.cs:25:20:25:28 | ... ? ... : ... | VarDecls.cs:25:24:25:24 | access to local variable x | | VarDecls.cs:25:20:25:28 | ... ? ... : ... | VarDecls.cs:25:28:25:28 | access to local variable y | -| VarDecls.cs:28:11:28:11 | call to constructor Object | VarDecls.cs:28:11:28:11 | enter C | +| VarDecls.cs:28:11:28:11 | call to constructor Object | VarDecls.cs:28:11:28:11 | call to method | +| VarDecls.cs:28:11:28:11 | call to method | VarDecls.cs:28:11:28:11 | this access | | VarDecls.cs:28:11:28:11 | exit C | VarDecls.cs:28:11:28:11 | exit C (normal) | | VarDecls.cs:28:11:28:11 | exit C (normal) | VarDecls.cs:28:11:28:11 | {...} | +| VarDecls.cs:28:11:28:11 | this access | VarDecls.cs:28:11:28:11 | enter C | | VarDecls.cs:28:11:28:11 | {...} | VarDecls.cs:28:11:28:11 | call to constructor Object | | VarDecls.cs:28:41:28:47 | exit Dispose | VarDecls.cs:28:41:28:47 | exit Dispose (normal) | | VarDecls.cs:28:41:28:47 | exit Dispose (normal) | VarDecls.cs:28:51:28:53 | {...} | @@ -7087,9 +7237,11 @@ postDominance | cflow.cs:127:68:127:80 | ... = ... | cflow.cs:127:76:127:80 | access to parameter value | | cflow.cs:127:68:127:81 | ...; | cflow.cs:127:66:127:83 | {...} | | cflow.cs:127:76:127:80 | access to parameter value | cflow.cs:127:68:127:72 | this access | -| cflow.cs:129:5:129:15 | call to constructor Object | cflow.cs:129:5:129:15 | enter ControlFlow | +| cflow.cs:129:5:129:15 | call to constructor Object | cflow.cs:129:5:129:15 | call to method | +| cflow.cs:129:5:129:15 | call to method | cflow.cs:129:5:129:15 | this access | | cflow.cs:129:5:129:15 | exit ControlFlow | cflow.cs:129:5:129:15 | exit ControlFlow (normal) | | cflow.cs:129:5:129:15 | exit ControlFlow (normal) | cflow.cs:131:9:131:17 | ... = ... | +| cflow.cs:129:5:129:15 | this access | cflow.cs:129:5:129:15 | enter ControlFlow | | cflow.cs:130:5:132:5 | {...} | cflow.cs:129:5:129:15 | call to constructor Object | | cflow.cs:131:9:131:13 | this access | cflow.cs:131:9:131:18 | ...; | | cflow.cs:131:9:131:17 | ... = ... | cflow.cs:131:17:131:17 | access to parameter s | @@ -7421,9 +7573,11 @@ postDominance | cflow.cs:275:13:275:41 | call to method WriteLine | cflow.cs:275:31:275:40 | "not dead" | | cflow.cs:275:13:275:42 | ...; | cflow.cs:274:9:276:9 | {...} | | cflow.cs:275:31:275:40 | "not dead" | cflow.cs:275:13:275:42 | ...; | +| cflow.cs:282:5:282:18 | call to method | cflow.cs:282:5:282:18 | this access | | cflow.cs:282:5:282:18 | exit ControlFlowSub | cflow.cs:282:5:282:18 | exit ControlFlowSub (normal) | | cflow.cs:282:5:282:18 | exit ControlFlowSub (normal) | cflow.cs:282:31:282:33 | {...} | -| cflow.cs:282:24:282:27 | call to constructor ControlFlow | cflow.cs:282:5:282:18 | enter ControlFlowSub | +| cflow.cs:282:5:282:18 | this access | cflow.cs:282:5:282:18 | enter ControlFlowSub | +| cflow.cs:282:24:282:27 | call to constructor ControlFlow | cflow.cs:282:5:282:18 | call to method | | cflow.cs:282:31:282:33 | {...} | cflow.cs:282:24:282:27 | call to constructor ControlFlow | | cflow.cs:284:5:284:18 | exit ControlFlowSub | cflow.cs:284:5:284:18 | exit ControlFlowSub (normal) | | cflow.cs:284:5:284:18 | exit ControlFlowSub (normal) | cflow.cs:284:39:284:41 | {...} | @@ -7435,18 +7589,22 @@ postDominance | cflow.cs:286:34:286:34 | access to parameter i | cflow.cs:286:5:286:18 | enter ControlFlowSub | | cflow.cs:286:34:286:45 | call to method ToString | cflow.cs:286:34:286:34 | access to parameter i | | cflow.cs:286:48:286:50 | {...} | cflow.cs:286:29:286:32 | call to constructor ControlFlowSub | -| cflow.cs:289:7:289:18 | call to constructor Object | cflow.cs:289:7:289:18 | enter DelegateCall | +| cflow.cs:289:7:289:18 | call to constructor Object | cflow.cs:289:7:289:18 | call to method | +| cflow.cs:289:7:289:18 | call to method | cflow.cs:289:7:289:18 | this access | | cflow.cs:289:7:289:18 | exit DelegateCall | cflow.cs:289:7:289:18 | exit DelegateCall (normal) | | cflow.cs:289:7:289:18 | exit DelegateCall (normal) | cflow.cs:289:7:289:18 | {...} | +| cflow.cs:289:7:289:18 | this access | cflow.cs:289:7:289:18 | enter DelegateCall | | cflow.cs:289:7:289:18 | {...} | cflow.cs:289:7:289:18 | call to constructor Object | | cflow.cs:291:12:291:12 | exit M | cflow.cs:291:12:291:12 | exit M (normal) | | cflow.cs:291:12:291:12 | exit M (normal) | cflow.cs:291:38:291:41 | delegate call | | cflow.cs:291:38:291:38 | access to parameter f | cflow.cs:291:12:291:12 | enter M | | cflow.cs:291:38:291:41 | delegate call | cflow.cs:291:40:291:40 | 0 | | cflow.cs:291:40:291:40 | 0 | cflow.cs:291:38:291:38 | access to parameter f | -| cflow.cs:296:5:296:25 | call to constructor Object | cflow.cs:296:5:296:25 | enter NegationInConstructor | +| cflow.cs:296:5:296:25 | call to constructor Object | cflow.cs:296:5:296:25 | call to method | +| cflow.cs:296:5:296:25 | call to method | cflow.cs:296:5:296:25 | this access | | cflow.cs:296:5:296:25 | exit NegationInConstructor | cflow.cs:296:5:296:25 | exit NegationInConstructor (normal) | | cflow.cs:296:5:296:25 | exit NegationInConstructor (normal) | cflow.cs:296:52:296:54 | {...} | +| cflow.cs:296:5:296:25 | this access | cflow.cs:296:5:296:25 | enter NegationInConstructor | | cflow.cs:296:52:296:54 | {...} | cflow.cs:296:5:296:25 | call to constructor Object | | cflow.cs:298:10:298:10 | exit M | cflow.cs:298:10:298:10 | exit M (normal) | | cflow.cs:298:10:298:10 | exit M (normal) | cflow.cs:300:9:300:72 | object creation of type NegationInConstructor | @@ -7463,9 +7621,11 @@ postDominance | cflow.cs:300:56:300:64 | ... != ... | cflow.cs:300:61:300:64 | null | | cflow.cs:300:61:300:64 | null | cflow.cs:300:56:300:56 | access to parameter s | | cflow.cs:300:70:300:71 | "" | cflow.cs:300:44:300:64 | ... && ... | -| cflow.cs:304:7:304:18 | call to constructor Object | cflow.cs:304:7:304:18 | enter LambdaGetter | +| cflow.cs:304:7:304:18 | call to constructor Object | cflow.cs:304:7:304:18 | call to method | +| cflow.cs:304:7:304:18 | call to method | cflow.cs:304:7:304:18 | this access | | cflow.cs:304:7:304:18 | exit LambdaGetter | cflow.cs:304:7:304:18 | exit LambdaGetter (normal) | | cflow.cs:304:7:304:18 | exit LambdaGetter (normal) | cflow.cs:304:7:304:18 | {...} | +| cflow.cs:304:7:304:18 | this access | cflow.cs:304:7:304:18 | enter LambdaGetter | | cflow.cs:304:7:304:18 | {...} | cflow.cs:304:7:304:18 | call to constructor Object | | cflow.cs:306:60:310:5 | (...) => ... | cflow.cs:306:60:310:5 | enter get__getter | | cflow.cs:306:60:310:5 | exit (...) => ... | cflow.cs:306:60:310:5 | exit (...) => ... (normal) | @@ -9459,12 +9619,15 @@ blockDominance | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:38:26:38:26 | String x | | Foreach.cs:38:26:38:26 | String x | Foreach.cs:38:26:38:26 | String x | +| Initializers.cs:3:7:3:18 | enter | Initializers.cs:3:7:3:18 | enter | | Initializers.cs:3:7:3:18 | enter Initializers | Initializers.cs:3:7:3:18 | enter Initializers | | Initializers.cs:8:5:8:16 | enter Initializers | Initializers.cs:8:5:8:16 | enter Initializers | | Initializers.cs:10:5:10:16 | enter Initializers | Initializers.cs:10:5:10:16 | enter Initializers | | Initializers.cs:12:10:12:10 | enter M | Initializers.cs:12:10:12:10 | enter M | | Initializers.cs:18:16:18:16 | enter H | Initializers.cs:18:16:18:16 | enter H | +| Initializers.cs:20:11:20:23 | enter | Initializers.cs:20:11:20:23 | enter | | Initializers.cs:20:11:20:23 | enter NoConstructor | Initializers.cs:20:11:20:23 | enter NoConstructor | +| Initializers.cs:26:11:26:13 | enter | Initializers.cs:26:11:26:13 | enter | | Initializers.cs:31:9:31:11 | enter Sub | Initializers.cs:31:9:31:11 | enter Sub | | Initializers.cs:33:9:33:11 | enter Sub | Initializers.cs:33:9:33:11 | enter Sub | | Initializers.cs:35:9:35:11 | enter Sub | Initializers.cs:35:9:35:11 | enter Sub | @@ -9619,12 +9782,12 @@ blockDominance | LoopUnrolling.cs:97:9:100:9 | foreach (... ... in ...) ... | LoopUnrolling.cs:97:9:100:9 | foreach (... ... in ...) ... | | LoopUnrolling.cs:97:9:100:9 | foreach (... ... in ...) ... | LoopUnrolling.cs:97:22:97:22 | String x | | LoopUnrolling.cs:97:22:97:22 | String x | LoopUnrolling.cs:97:22:97:22 | String x | -| MultiImplementationA.cs:4:7:4:8 | call to constructor Object | MultiImplementationA.cs:4:7:4:8 | call to constructor Object | -| MultiImplementationA.cs:4:7:4:8 | enter C1 | MultiImplementationA.cs:4:7:4:8 | call to constructor Object | | MultiImplementationA.cs:4:7:4:8 | enter C1 | MultiImplementationA.cs:4:7:4:8 | enter C1 | | MultiImplementationA.cs:4:7:4:8 | enter C1 | MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | -| MultiImplementationA.cs:4:7:4:8 | enter C1 | MultiImplementationB.cs:1:7:1:8 | call to constructor Object | +| MultiImplementationA.cs:4:7:4:8 | enter C1 | MultiImplementationA.cs:4:7:4:8 | this access | +| MultiImplementationA.cs:4:7:4:8 | enter C1 | MultiImplementationB.cs:1:7:1:8 | this access | | MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | +| MultiImplementationA.cs:4:7:4:8 | this access | MultiImplementationA.cs:4:7:4:8 | this access | | MultiImplementationA.cs:6:22:6:31 | enter get_P1 | MultiImplementationA.cs:6:22:6:31 | enter get_P1 | | MultiImplementationA.cs:6:22:6:31 | enter get_P1 | MultiImplementationA.cs:6:22:6:31 | exit get_P1 | | MultiImplementationA.cs:6:22:6:31 | enter get_P1 | MultiImplementationA.cs:6:28:6:31 | null | @@ -9649,6 +9812,12 @@ blockDominance | MultiImplementationA.cs:8:16:8:16 | enter M | MultiImplementationB.cs:5:23:5:23 | 2 | | MultiImplementationA.cs:8:16:8:16 | exit M | MultiImplementationA.cs:8:16:8:16 | exit M | | MultiImplementationA.cs:8:29:8:32 | null | MultiImplementationA.cs:8:29:8:32 | null | +| MultiImplementationA.cs:11:7:11:8 | enter | MultiImplementationA.cs:11:7:11:8 | enter | +| MultiImplementationA.cs:11:7:11:8 | enter | MultiImplementationA.cs:11:7:11:8 | exit (normal) | +| MultiImplementationA.cs:11:7:11:8 | enter | MultiImplementationA.cs:13:16:13:16 | this access | +| MultiImplementationA.cs:11:7:11:8 | enter | MultiImplementationB.cs:11:16:11:16 | this access | +| MultiImplementationA.cs:11:7:11:8 | exit (normal) | MultiImplementationA.cs:11:7:11:8 | exit (normal) | +| MultiImplementationA.cs:13:16:13:16 | this access | MultiImplementationA.cs:13:16:13:16 | this access | | MultiImplementationA.cs:14:31:14:31 | access to parameter i | MultiImplementationA.cs:14:31:14:31 | access to parameter i | | MultiImplementationA.cs:14:31:14:31 | enter get_Item | MultiImplementationA.cs:14:31:14:31 | access to parameter i | | MultiImplementationA.cs:14:31:14:31 | enter get_Item | MultiImplementationA.cs:14:31:14:31 | enter get_Item | @@ -9674,12 +9843,12 @@ blockDominance | MultiImplementationA.cs:16:17:16:18 | exit M1 (normal) | MultiImplementationA.cs:16:17:16:18 | exit M1 (normal) | | MultiImplementationA.cs:17:5:19:5 | {...} | MultiImplementationA.cs:17:5:19:5 | {...} | | MultiImplementationA.cs:18:9:18:22 | enter M2 | MultiImplementationA.cs:18:9:18:22 | enter M2 | -| MultiImplementationA.cs:20:12:20:13 | call to constructor Object | MultiImplementationA.cs:20:12:20:13 | call to constructor Object | -| MultiImplementationA.cs:20:12:20:13 | enter C2 | MultiImplementationA.cs:20:12:20:13 | call to constructor Object | | MultiImplementationA.cs:20:12:20:13 | enter C2 | MultiImplementationA.cs:20:12:20:13 | enter C2 | | MultiImplementationA.cs:20:12:20:13 | enter C2 | MultiImplementationA.cs:20:12:20:13 | exit C2 | -| MultiImplementationA.cs:20:12:20:13 | enter C2 | MultiImplementationB.cs:18:12:18:13 | call to constructor Object | +| MultiImplementationA.cs:20:12:20:13 | enter C2 | MultiImplementationA.cs:20:12:20:13 | this access | +| MultiImplementationA.cs:20:12:20:13 | enter C2 | MultiImplementationB.cs:18:12:18:13 | this access | | MultiImplementationA.cs:20:12:20:13 | exit C2 | MultiImplementationA.cs:20:12:20:13 | exit C2 | +| MultiImplementationA.cs:20:12:20:13 | this access | MultiImplementationA.cs:20:12:20:13 | this access | | MultiImplementationA.cs:21:12:21:13 | enter C2 | MultiImplementationA.cs:21:12:21:13 | enter C2 | | MultiImplementationA.cs:21:12:21:13 | enter C2 | MultiImplementationA.cs:21:12:21:13 | exit C2 (normal) | | MultiImplementationA.cs:21:12:21:13 | enter C2 | MultiImplementationA.cs:21:24:21:24 | 0 | @@ -9698,19 +9867,19 @@ blockDominance | MultiImplementationA.cs:23:28:23:35 | enter implicit conversion | MultiImplementationB.cs:21:56:21:59 | null | | MultiImplementationA.cs:23:28:23:35 | exit implicit conversion | MultiImplementationA.cs:23:28:23:35 | exit implicit conversion | | MultiImplementationA.cs:23:50:23:53 | null | MultiImplementationA.cs:23:50:23:53 | null | -| MultiImplementationA.cs:28:7:28:8 | call to constructor Object | MultiImplementationA.cs:28:7:28:8 | call to constructor Object | -| MultiImplementationA.cs:28:7:28:8 | enter C3 | MultiImplementationA.cs:28:7:28:8 | call to constructor Object | | MultiImplementationA.cs:28:7:28:8 | enter C3 | MultiImplementationA.cs:28:7:28:8 | enter C3 | | MultiImplementationA.cs:28:7:28:8 | enter C3 | MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | -| MultiImplementationA.cs:28:7:28:8 | enter C3 | MultiImplementationB.cs:25:7:25:8 | call to constructor Object | +| MultiImplementationA.cs:28:7:28:8 | enter C3 | MultiImplementationA.cs:28:7:28:8 | this access | +| MultiImplementationA.cs:28:7:28:8 | enter C3 | MultiImplementationB.cs:25:7:25:8 | this access | | MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | +| MultiImplementationA.cs:28:7:28:8 | this access | MultiImplementationA.cs:28:7:28:8 | this access | | MultiImplementationA.cs:30:21:30:23 | enter get_P3 | MultiImplementationA.cs:30:21:30:23 | enter get_P3 | -| MultiImplementationA.cs:34:15:34:16 | call to constructor Object | MultiImplementationA.cs:34:15:34:16 | call to constructor Object | -| MultiImplementationA.cs:34:15:34:16 | enter C4 | MultiImplementationA.cs:34:15:34:16 | call to constructor Object | | MultiImplementationA.cs:34:15:34:16 | enter C4 | MultiImplementationA.cs:34:15:34:16 | enter C4 | | MultiImplementationA.cs:34:15:34:16 | enter C4 | MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | -| MultiImplementationA.cs:34:15:34:16 | enter C4 | MultiImplementationB.cs:30:15:30:16 | call to constructor Object | +| MultiImplementationA.cs:34:15:34:16 | enter C4 | MultiImplementationA.cs:34:15:34:16 | this access | +| MultiImplementationA.cs:34:15:34:16 | enter C4 | MultiImplementationB.cs:30:15:30:16 | this access | | MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | +| MultiImplementationA.cs:34:15:34:16 | this access | MultiImplementationA.cs:34:15:34:16 | this access | | MultiImplementationA.cs:36:9:36:10 | enter M1 | MultiImplementationA.cs:36:9:36:10 | enter M1 | | MultiImplementationA.cs:36:9:36:10 | enter M1 | MultiImplementationA.cs:36:9:36:10 | exit M1 | | MultiImplementationA.cs:36:9:36:10 | enter M1 | MultiImplementationA.cs:36:14:36:28 | {...} | @@ -9718,22 +9887,23 @@ blockDominance | MultiImplementationA.cs:36:9:36:10 | exit M1 | MultiImplementationA.cs:36:9:36:10 | exit M1 | | MultiImplementationA.cs:36:14:36:28 | {...} | MultiImplementationA.cs:36:14:36:28 | {...} | | MultiImplementationA.cs:37:9:37:10 | enter M2 | MultiImplementationA.cs:37:9:37:10 | enter M2 | -| MultiImplementationB.cs:1:7:1:8 | call to constructor Object | MultiImplementationB.cs:1:7:1:8 | call to constructor Object | +| MultiImplementationB.cs:1:7:1:8 | this access | MultiImplementationB.cs:1:7:1:8 | this access | | MultiImplementationB.cs:3:22:3:22 | 0 | MultiImplementationB.cs:3:22:3:22 | 0 | | MultiImplementationB.cs:4:25:4:37 | {...} | MultiImplementationB.cs:4:25:4:37 | {...} | | MultiImplementationB.cs:4:43:4:45 | {...} | MultiImplementationB.cs:4:43:4:45 | {...} | | MultiImplementationB.cs:5:23:5:23 | 2 | MultiImplementationB.cs:5:23:5:23 | 2 | +| MultiImplementationB.cs:11:16:11:16 | this access | MultiImplementationB.cs:11:16:11:16 | this access | | MultiImplementationB.cs:12:37:12:40 | null | MultiImplementationB.cs:12:37:12:40 | null | | MultiImplementationB.cs:13:40:13:54 | {...} | MultiImplementationB.cs:13:40:13:54 | {...} | | MultiImplementationB.cs:13:60:13:62 | {...} | MultiImplementationB.cs:13:60:13:62 | {...} | | MultiImplementationB.cs:15:5:17:5 | {...} | MultiImplementationB.cs:15:5:17:5 | {...} | | MultiImplementationB.cs:16:9:16:31 | enter M2 | MultiImplementationB.cs:16:9:16:31 | enter M2 | -| MultiImplementationB.cs:18:12:18:13 | call to constructor Object | MultiImplementationB.cs:18:12:18:13 | call to constructor Object | +| MultiImplementationB.cs:18:12:18:13 | this access | MultiImplementationB.cs:18:12:18:13 | this access | | MultiImplementationB.cs:19:24:19:24 | 1 | MultiImplementationB.cs:19:24:19:24 | 1 | | MultiImplementationB.cs:20:11:20:25 | {...} | MultiImplementationB.cs:20:11:20:25 | {...} | | MultiImplementationB.cs:21:56:21:59 | null | MultiImplementationB.cs:21:56:21:59 | null | -| MultiImplementationB.cs:25:7:25:8 | call to constructor Object | MultiImplementationB.cs:25:7:25:8 | call to constructor Object | -| MultiImplementationB.cs:30:15:30:16 | call to constructor Object | MultiImplementationB.cs:30:15:30:16 | call to constructor Object | +| MultiImplementationB.cs:25:7:25:8 | this access | MultiImplementationB.cs:25:7:25:8 | this access | +| MultiImplementationB.cs:30:15:30:16 | this access | MultiImplementationB.cs:30:15:30:16 | this access | | MultiImplementationB.cs:32:17:32:17 | 0 | MultiImplementationB.cs:32:17:32:17 | 0 | | NullCoalescing.cs:1:7:1:20 | enter NullCoalescing | NullCoalescing.cs:1:7:1:20 | enter NullCoalescing | | NullCoalescing.cs:3:9:3:10 | enter M1 | NullCoalescing.cs:3:9:3:10 | enter M1 | @@ -9820,6 +9990,7 @@ blockDominance | NullCoalescing.cs:16:17:16:25 | ... ?? ... | NullCoalescing.cs:16:17:16:25 | ... ?? ... | | NullCoalescing.cs:16:17:16:25 | ... ?? ... | NullCoalescing.cs:17:13:17:24 | ... ?? ... | | NullCoalescing.cs:17:13:17:24 | ... ?? ... | NullCoalescing.cs:17:13:17:24 | ... ?? ... | +| PartialImplementationA.cs:1:15:1:21 | enter | PartialImplementationA.cs:1:15:1:21 | enter | | PartialImplementationA.cs:3:12:3:18 | enter Partial | PartialImplementationA.cs:3:12:3:18 | enter Partial | | PartialImplementationB.cs:4:12:4:18 | enter Partial | PartialImplementationB.cs:4:12:4:18 | enter Partial | | Patterns.cs:3:7:3:14 | enter Patterns | Patterns.cs:3:7:3:14 | enter Patterns | @@ -13132,12 +13303,15 @@ postBlockDominance | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:38:26:38:26 | String x | | Foreach.cs:38:26:38:26 | String x | Foreach.cs:38:26:38:26 | String x | +| Initializers.cs:3:7:3:18 | enter | Initializers.cs:3:7:3:18 | enter | | Initializers.cs:3:7:3:18 | enter Initializers | Initializers.cs:3:7:3:18 | enter Initializers | | Initializers.cs:8:5:8:16 | enter Initializers | Initializers.cs:8:5:8:16 | enter Initializers | | Initializers.cs:10:5:10:16 | enter Initializers | Initializers.cs:10:5:10:16 | enter Initializers | | Initializers.cs:12:10:12:10 | enter M | Initializers.cs:12:10:12:10 | enter M | | Initializers.cs:18:16:18:16 | enter H | Initializers.cs:18:16:18:16 | enter H | +| Initializers.cs:20:11:20:23 | enter | Initializers.cs:20:11:20:23 | enter | | Initializers.cs:20:11:20:23 | enter NoConstructor | Initializers.cs:20:11:20:23 | enter NoConstructor | +| Initializers.cs:26:11:26:13 | enter | Initializers.cs:26:11:26:13 | enter | | Initializers.cs:31:9:31:11 | enter Sub | Initializers.cs:31:9:31:11 | enter Sub | | Initializers.cs:33:9:33:11 | enter Sub | Initializers.cs:33:9:33:11 | enter Sub | | Initializers.cs:35:9:35:11 | enter Sub | Initializers.cs:35:9:35:11 | enter Sub | @@ -13282,12 +13456,12 @@ postBlockDominance | LoopUnrolling.cs:97:9:100:9 | foreach (... ... in ...) ... | LoopUnrolling.cs:97:9:100:9 | foreach (... ... in ...) ... | | LoopUnrolling.cs:97:9:100:9 | foreach (... ... in ...) ... | LoopUnrolling.cs:97:22:97:22 | String x | | LoopUnrolling.cs:97:22:97:22 | String x | LoopUnrolling.cs:97:22:97:22 | String x | -| MultiImplementationA.cs:4:7:4:8 | call to constructor Object | MultiImplementationA.cs:4:7:4:8 | call to constructor Object | | MultiImplementationA.cs:4:7:4:8 | enter C1 | MultiImplementationA.cs:4:7:4:8 | enter C1 | -| MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | MultiImplementationA.cs:4:7:4:8 | call to constructor Object | | MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | MultiImplementationA.cs:4:7:4:8 | enter C1 | | MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | -| MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | MultiImplementationB.cs:1:7:1:8 | call to constructor Object | +| MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | MultiImplementationA.cs:4:7:4:8 | this access | +| MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | MultiImplementationB.cs:1:7:1:8 | this access | +| MultiImplementationA.cs:4:7:4:8 | this access | MultiImplementationA.cs:4:7:4:8 | this access | | MultiImplementationA.cs:6:22:6:31 | enter get_P1 | MultiImplementationA.cs:6:22:6:31 | enter get_P1 | | MultiImplementationA.cs:6:22:6:31 | exit get_P1 | MultiImplementationA.cs:6:22:6:31 | exit get_P1 | | MultiImplementationA.cs:6:28:6:31 | null | MultiImplementationA.cs:6:28:6:31 | null | @@ -13300,6 +13474,12 @@ postBlockDominance | MultiImplementationA.cs:8:16:8:16 | enter M | MultiImplementationA.cs:8:16:8:16 | enter M | | MultiImplementationA.cs:8:16:8:16 | exit M | MultiImplementationA.cs:8:16:8:16 | exit M | | MultiImplementationA.cs:8:29:8:32 | null | MultiImplementationA.cs:8:29:8:32 | null | +| MultiImplementationA.cs:11:7:11:8 | enter | MultiImplementationA.cs:11:7:11:8 | enter | +| MultiImplementationA.cs:11:7:11:8 | exit (normal) | MultiImplementationA.cs:11:7:11:8 | enter | +| MultiImplementationA.cs:11:7:11:8 | exit (normal) | MultiImplementationA.cs:11:7:11:8 | exit (normal) | +| MultiImplementationA.cs:11:7:11:8 | exit (normal) | MultiImplementationA.cs:13:16:13:16 | this access | +| MultiImplementationA.cs:11:7:11:8 | exit (normal) | MultiImplementationB.cs:11:16:11:16 | this access | +| MultiImplementationA.cs:13:16:13:16 | this access | MultiImplementationA.cs:13:16:13:16 | this access | | MultiImplementationA.cs:14:31:14:31 | access to parameter i | MultiImplementationA.cs:14:31:14:31 | access to parameter i | | MultiImplementationA.cs:14:31:14:31 | access to parameter i | MultiImplementationA.cs:14:31:14:31 | enter get_Item | | MultiImplementationA.cs:14:31:14:31 | enter get_Item | MultiImplementationA.cs:14:31:14:31 | enter get_Item | @@ -13321,10 +13501,10 @@ postBlockDominance | MultiImplementationA.cs:16:17:16:18 | exit M1 (normal) | MultiImplementationB.cs:15:5:17:5 | {...} | | MultiImplementationA.cs:17:5:19:5 | {...} | MultiImplementationA.cs:17:5:19:5 | {...} | | MultiImplementationA.cs:18:9:18:22 | enter M2 | MultiImplementationA.cs:18:9:18:22 | enter M2 | -| MultiImplementationA.cs:20:12:20:13 | call to constructor Object | MultiImplementationA.cs:20:12:20:13 | call to constructor Object | -| MultiImplementationA.cs:20:12:20:13 | call to constructor Object | MultiImplementationA.cs:20:12:20:13 | enter C2 | | MultiImplementationA.cs:20:12:20:13 | enter C2 | MultiImplementationA.cs:20:12:20:13 | enter C2 | | MultiImplementationA.cs:20:12:20:13 | exit C2 | MultiImplementationA.cs:20:12:20:13 | exit C2 | +| MultiImplementationA.cs:20:12:20:13 | this access | MultiImplementationA.cs:20:12:20:13 | enter C2 | +| MultiImplementationA.cs:20:12:20:13 | this access | MultiImplementationA.cs:20:12:20:13 | this access | | MultiImplementationA.cs:21:12:21:13 | enter C2 | MultiImplementationA.cs:21:12:21:13 | enter C2 | | MultiImplementationA.cs:21:12:21:13 | exit C2 (normal) | MultiImplementationA.cs:21:12:21:13 | enter C2 | | MultiImplementationA.cs:21:12:21:13 | exit C2 (normal) | MultiImplementationA.cs:21:12:21:13 | exit C2 (normal) | @@ -13339,24 +13519,24 @@ postBlockDominance | MultiImplementationA.cs:23:28:23:35 | exit implicit conversion | MultiImplementationA.cs:23:28:23:35 | exit implicit conversion | | MultiImplementationA.cs:23:50:23:53 | null | MultiImplementationA.cs:23:28:23:35 | enter implicit conversion | | MultiImplementationA.cs:23:50:23:53 | null | MultiImplementationA.cs:23:50:23:53 | null | -| MultiImplementationA.cs:28:7:28:8 | call to constructor Object | MultiImplementationA.cs:28:7:28:8 | call to constructor Object | | MultiImplementationA.cs:28:7:28:8 | enter C3 | MultiImplementationA.cs:28:7:28:8 | enter C3 | -| MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | MultiImplementationA.cs:28:7:28:8 | call to constructor Object | | MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | MultiImplementationA.cs:28:7:28:8 | enter C3 | | MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | -| MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | MultiImplementationB.cs:25:7:25:8 | call to constructor Object | +| MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | MultiImplementationA.cs:28:7:28:8 | this access | +| MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | MultiImplementationB.cs:25:7:25:8 | this access | +| MultiImplementationA.cs:28:7:28:8 | this access | MultiImplementationA.cs:28:7:28:8 | this access | | MultiImplementationA.cs:30:21:30:23 | enter get_P3 | MultiImplementationA.cs:30:21:30:23 | enter get_P3 | -| MultiImplementationA.cs:34:15:34:16 | call to constructor Object | MultiImplementationA.cs:34:15:34:16 | call to constructor Object | | MultiImplementationA.cs:34:15:34:16 | enter C4 | MultiImplementationA.cs:34:15:34:16 | enter C4 | -| MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | MultiImplementationA.cs:34:15:34:16 | call to constructor Object | | MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | MultiImplementationA.cs:34:15:34:16 | enter C4 | | MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | -| MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | MultiImplementationB.cs:30:15:30:16 | call to constructor Object | +| MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | MultiImplementationA.cs:34:15:34:16 | this access | +| MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | MultiImplementationB.cs:30:15:30:16 | this access | +| MultiImplementationA.cs:34:15:34:16 | this access | MultiImplementationA.cs:34:15:34:16 | this access | | MultiImplementationA.cs:36:9:36:10 | enter M1 | MultiImplementationA.cs:36:9:36:10 | enter M1 | | MultiImplementationA.cs:36:9:36:10 | exit M1 | MultiImplementationA.cs:36:9:36:10 | exit M1 | | MultiImplementationA.cs:36:14:36:28 | {...} | MultiImplementationA.cs:36:14:36:28 | {...} | | MultiImplementationA.cs:37:9:37:10 | enter M2 | MultiImplementationA.cs:37:9:37:10 | enter M2 | -| MultiImplementationB.cs:1:7:1:8 | call to constructor Object | MultiImplementationB.cs:1:7:1:8 | call to constructor Object | +| MultiImplementationB.cs:1:7:1:8 | this access | MultiImplementationB.cs:1:7:1:8 | this access | | MultiImplementationB.cs:3:22:3:22 | 0 | MultiImplementationA.cs:6:22:6:31 | enter get_P1 | | MultiImplementationB.cs:3:22:3:22 | 0 | MultiImplementationB.cs:3:22:3:22 | 0 | | MultiImplementationB.cs:4:25:4:37 | {...} | MultiImplementationA.cs:7:21:7:23 | enter get_P2 | @@ -13365,17 +13545,18 @@ postBlockDominance | MultiImplementationB.cs:4:43:4:45 | {...} | MultiImplementationB.cs:4:43:4:45 | {...} | | MultiImplementationB.cs:5:23:5:23 | 2 | MultiImplementationA.cs:8:16:8:16 | enter M | | MultiImplementationB.cs:5:23:5:23 | 2 | MultiImplementationB.cs:5:23:5:23 | 2 | +| MultiImplementationB.cs:11:16:11:16 | this access | MultiImplementationB.cs:11:16:11:16 | this access | | MultiImplementationB.cs:12:37:12:40 | null | MultiImplementationB.cs:12:37:12:40 | null | | MultiImplementationB.cs:13:40:13:54 | {...} | MultiImplementationB.cs:13:40:13:54 | {...} | | MultiImplementationB.cs:13:60:13:62 | {...} | MultiImplementationB.cs:13:60:13:62 | {...} | | MultiImplementationB.cs:15:5:17:5 | {...} | MultiImplementationB.cs:15:5:17:5 | {...} | | MultiImplementationB.cs:16:9:16:31 | enter M2 | MultiImplementationB.cs:16:9:16:31 | enter M2 | -| MultiImplementationB.cs:18:12:18:13 | call to constructor Object | MultiImplementationB.cs:18:12:18:13 | call to constructor Object | +| MultiImplementationB.cs:18:12:18:13 | this access | MultiImplementationB.cs:18:12:18:13 | this access | | MultiImplementationB.cs:19:24:19:24 | 1 | MultiImplementationB.cs:19:24:19:24 | 1 | | MultiImplementationB.cs:20:11:20:25 | {...} | MultiImplementationB.cs:20:11:20:25 | {...} | | MultiImplementationB.cs:21:56:21:59 | null | MultiImplementationB.cs:21:56:21:59 | null | -| MultiImplementationB.cs:25:7:25:8 | call to constructor Object | MultiImplementationB.cs:25:7:25:8 | call to constructor Object | -| MultiImplementationB.cs:30:15:30:16 | call to constructor Object | MultiImplementationB.cs:30:15:30:16 | call to constructor Object | +| MultiImplementationB.cs:25:7:25:8 | this access | MultiImplementationB.cs:25:7:25:8 | this access | +| MultiImplementationB.cs:30:15:30:16 | this access | MultiImplementationB.cs:30:15:30:16 | this access | | MultiImplementationB.cs:32:17:32:17 | 0 | MultiImplementationA.cs:36:9:36:10 | enter M1 | | MultiImplementationB.cs:32:17:32:17 | 0 | MultiImplementationB.cs:32:17:32:17 | 0 | | NullCoalescing.cs:1:7:1:20 | enter NullCoalescing | NullCoalescing.cs:1:7:1:20 | enter NullCoalescing | @@ -13465,6 +13646,7 @@ postBlockDominance | NullCoalescing.cs:17:13:17:24 | ... ?? ... | NullCoalescing.cs:15:31:15:31 | 0 | | NullCoalescing.cs:17:13:17:24 | ... ?? ... | NullCoalescing.cs:16:17:16:25 | ... ?? ... | | NullCoalescing.cs:17:13:17:24 | ... ?? ... | NullCoalescing.cs:17:13:17:24 | ... ?? ... | +| PartialImplementationA.cs:1:15:1:21 | enter | PartialImplementationA.cs:1:15:1:21 | enter | | PartialImplementationA.cs:3:12:3:18 | enter Partial | PartialImplementationA.cs:3:12:3:18 | enter Partial | | PartialImplementationB.cs:4:12:4:18 | enter Partial | PartialImplementationB.cs:4:12:4:18 | enter Partial | | Patterns.cs:3:7:3:14 | enter Patterns | Patterns.cs:3:7:3:14 | enter Patterns | diff --git a/csharp/ql/test/library-tests/controlflow/graph/EnclosingCallable.expected b/csharp/ql/test/library-tests/controlflow/graph/EnclosingCallable.expected index 4a4631e454d..14dcdb56b26 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/EnclosingCallable.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/EnclosingCallable.expected @@ -1,8 +1,10 @@ nodeEnclosing | AccessorCalls.cs:1:7:1:19 | call to constructor Object | AccessorCalls.cs:1:7:1:19 | AccessorCalls | +| AccessorCalls.cs:1:7:1:19 | call to method | AccessorCalls.cs:1:7:1:19 | AccessorCalls | | AccessorCalls.cs:1:7:1:19 | enter AccessorCalls | AccessorCalls.cs:1:7:1:19 | AccessorCalls | | AccessorCalls.cs:1:7:1:19 | exit AccessorCalls | AccessorCalls.cs:1:7:1:19 | AccessorCalls | | AccessorCalls.cs:1:7:1:19 | exit AccessorCalls (normal) | AccessorCalls.cs:1:7:1:19 | AccessorCalls | +| AccessorCalls.cs:1:7:1:19 | this access | AccessorCalls.cs:1:7:1:19 | AccessorCalls | | AccessorCalls.cs:1:7:1:19 | {...} | AccessorCalls.cs:1:7:1:19 | AccessorCalls | | AccessorCalls.cs:5:23:5:25 | enter get_Item | AccessorCalls.cs:5:23:5:25 | get_Item | | AccessorCalls.cs:5:23:5:25 | exit get_Item | AccessorCalls.cs:5:23:5:25 | get_Item | @@ -319,9 +321,11 @@ nodeEnclosing | AccessorCalls.cs:73:78:73:81 | dynamic access to element | AccessorCalls.cs:66:10:66:11 | M9 | | AccessorCalls.cs:73:80:73:80 | 1 | AccessorCalls.cs:66:10:66:11 | M9 | | ArrayCreation.cs:1:7:1:19 | call to constructor Object | ArrayCreation.cs:1:7:1:19 | ArrayCreation | +| ArrayCreation.cs:1:7:1:19 | call to method | ArrayCreation.cs:1:7:1:19 | ArrayCreation | | ArrayCreation.cs:1:7:1:19 | enter ArrayCreation | ArrayCreation.cs:1:7:1:19 | ArrayCreation | | ArrayCreation.cs:1:7:1:19 | exit ArrayCreation | ArrayCreation.cs:1:7:1:19 | ArrayCreation | | ArrayCreation.cs:1:7:1:19 | exit ArrayCreation (normal) | ArrayCreation.cs:1:7:1:19 | ArrayCreation | +| ArrayCreation.cs:1:7:1:19 | this access | ArrayCreation.cs:1:7:1:19 | ArrayCreation | | ArrayCreation.cs:1:7:1:19 | {...} | ArrayCreation.cs:1:7:1:19 | ArrayCreation | | ArrayCreation.cs:3:11:3:12 | enter M1 | ArrayCreation.cs:3:11:3:12 | M1 | | ArrayCreation.cs:3:11:3:12 | exit M1 | ArrayCreation.cs:3:11:3:12 | M1 | @@ -356,9 +360,11 @@ nodeEnclosing | ArrayCreation.cs:9:45:9:45 | 2 | ArrayCreation.cs:9:12:9:13 | M4 | | ArrayCreation.cs:9:48:9:48 | 3 | ArrayCreation.cs:9:12:9:13 | M4 | | Assert.cs:5:7:5:17 | call to constructor Object | Assert.cs:5:7:5:17 | AssertTests | +| Assert.cs:5:7:5:17 | call to method | Assert.cs:5:7:5:17 | AssertTests | | Assert.cs:5:7:5:17 | enter AssertTests | Assert.cs:5:7:5:17 | AssertTests | | Assert.cs:5:7:5:17 | exit AssertTests | Assert.cs:5:7:5:17 | AssertTests | | Assert.cs:5:7:5:17 | exit AssertTests (normal) | Assert.cs:5:7:5:17 | AssertTests | +| Assert.cs:5:7:5:17 | this access | Assert.cs:5:7:5:17 | AssertTests | | Assert.cs:5:7:5:17 | {...} | Assert.cs:5:7:5:17 | AssertTests | | Assert.cs:7:10:7:11 | enter M1 | Assert.cs:7:10:7:11 | M1 | | Assert.cs:7:10:7:11 | exit M1 | Assert.cs:7:10:7:11 | M1 | @@ -777,9 +783,11 @@ nodeEnclosing | Assert.cs:140:33:140:34 | access to parameter b3 | Assert.cs:138:10:138:12 | M13 | | Assert.cs:141:9:141:15 | return ...; | Assert.cs:138:10:138:12 | M13 | | Assignments.cs:1:7:1:17 | call to constructor Object | Assignments.cs:1:7:1:17 | Assignments | +| Assignments.cs:1:7:1:17 | call to method | Assignments.cs:1:7:1:17 | Assignments | | Assignments.cs:1:7:1:17 | enter Assignments | Assignments.cs:1:7:1:17 | Assignments | | Assignments.cs:1:7:1:17 | exit Assignments | Assignments.cs:1:7:1:17 | Assignments | | Assignments.cs:1:7:1:17 | exit Assignments (normal) | Assignments.cs:1:7:1:17 | Assignments | +| Assignments.cs:1:7:1:17 | this access | Assignments.cs:1:7:1:17 | Assignments | | Assignments.cs:1:7:1:17 | {...} | Assignments.cs:1:7:1:17 | Assignments | | Assignments.cs:3:10:3:10 | enter M | Assignments.cs:3:10:3:10 | M | | Assignments.cs:3:10:3:10 | exit M | Assignments.cs:3:10:3:10 | M | @@ -826,9 +834,11 @@ nodeEnclosing | Assignments.cs:19:9:19:17 | return ...; | Assignments.cs:17:40:17:40 | + | | Assignments.cs:19:16:19:16 | access to parameter x | Assignments.cs:17:40:17:40 | + | | BreakInTry.cs:1:7:1:16 | call to constructor Object | BreakInTry.cs:1:7:1:16 | BreakInTry | +| BreakInTry.cs:1:7:1:16 | call to method | BreakInTry.cs:1:7:1:16 | BreakInTry | | BreakInTry.cs:1:7:1:16 | enter BreakInTry | BreakInTry.cs:1:7:1:16 | BreakInTry | | BreakInTry.cs:1:7:1:16 | exit BreakInTry | BreakInTry.cs:1:7:1:16 | BreakInTry | | BreakInTry.cs:1:7:1:16 | exit BreakInTry (normal) | BreakInTry.cs:1:7:1:16 | BreakInTry | +| BreakInTry.cs:1:7:1:16 | this access | BreakInTry.cs:1:7:1:16 | BreakInTry | | BreakInTry.cs:1:7:1:16 | {...} | BreakInTry.cs:1:7:1:16 | BreakInTry | | BreakInTry.cs:3:10:3:11 | enter M1 | BreakInTry.cs:3:10:3:11 | M1 | | BreakInTry.cs:3:10:3:11 | exit M1 | BreakInTry.cs:3:10:3:11 | M1 | @@ -917,9 +927,11 @@ nodeEnclosing | BreakInTry.cs:67:28:67:31 | null | BreakInTry.cs:56:10:56:11 | M4 | | BreakInTry.cs:68:21:68:26 | break; | BreakInTry.cs:56:10:56:11 | M4 | | CompileTimeOperators.cs:3:7:3:26 | call to constructor Object | CompileTimeOperators.cs:3:7:3:26 | CompileTimeOperators | +| CompileTimeOperators.cs:3:7:3:26 | call to method | CompileTimeOperators.cs:3:7:3:26 | CompileTimeOperators | | CompileTimeOperators.cs:3:7:3:26 | enter CompileTimeOperators | CompileTimeOperators.cs:3:7:3:26 | CompileTimeOperators | | CompileTimeOperators.cs:3:7:3:26 | exit CompileTimeOperators | CompileTimeOperators.cs:3:7:3:26 | CompileTimeOperators | | CompileTimeOperators.cs:3:7:3:26 | exit CompileTimeOperators (normal) | CompileTimeOperators.cs:3:7:3:26 | CompileTimeOperators | +| CompileTimeOperators.cs:3:7:3:26 | this access | CompileTimeOperators.cs:3:7:3:26 | CompileTimeOperators | | CompileTimeOperators.cs:3:7:3:26 | {...} | CompileTimeOperators.cs:3:7:3:26 | CompileTimeOperators | | CompileTimeOperators.cs:5:9:5:15 | enter Default | CompileTimeOperators.cs:5:9:5:15 | Default | | CompileTimeOperators.cs:5:9:5:15 | exit Default | CompileTimeOperators.cs:5:9:5:15 | Default | @@ -946,9 +958,11 @@ nodeEnclosing | CompileTimeOperators.cs:22:9:22:25 | return ...; | CompileTimeOperators.cs:20:12:20:17 | Nameof | | CompileTimeOperators.cs:22:16:22:24 | nameof(...) | CompileTimeOperators.cs:20:12:20:17 | Nameof | | CompileTimeOperators.cs:26:7:26:22 | call to constructor Object | CompileTimeOperators.cs:26:7:26:22 | GotoInTryFinally | +| CompileTimeOperators.cs:26:7:26:22 | call to method | CompileTimeOperators.cs:26:7:26:22 | GotoInTryFinally | | CompileTimeOperators.cs:26:7:26:22 | enter GotoInTryFinally | CompileTimeOperators.cs:26:7:26:22 | GotoInTryFinally | | CompileTimeOperators.cs:26:7:26:22 | exit GotoInTryFinally | CompileTimeOperators.cs:26:7:26:22 | GotoInTryFinally | | CompileTimeOperators.cs:26:7:26:22 | exit GotoInTryFinally (normal) | CompileTimeOperators.cs:26:7:26:22 | GotoInTryFinally | +| CompileTimeOperators.cs:26:7:26:22 | this access | CompileTimeOperators.cs:26:7:26:22 | GotoInTryFinally | | CompileTimeOperators.cs:26:7:26:22 | {...} | CompileTimeOperators.cs:26:7:26:22 | GotoInTryFinally | | CompileTimeOperators.cs:28:10:28:10 | enter M | CompileTimeOperators.cs:28:10:28:10 | M | | CompileTimeOperators.cs:28:10:28:10 | exit M | CompileTimeOperators.cs:28:10:28:10 | M | @@ -970,9 +984,11 @@ nodeEnclosing | CompileTimeOperators.cs:40:14:40:38 | ...; | CompileTimeOperators.cs:28:10:28:10 | M | | CompileTimeOperators.cs:40:32:40:36 | "End" | CompileTimeOperators.cs:28:10:28:10 | M | | ConditionalAccess.cs:1:7:1:23 | call to constructor Object | ConditionalAccess.cs:1:7:1:23 | ConditionalAccess | +| ConditionalAccess.cs:1:7:1:23 | call to method | ConditionalAccess.cs:1:7:1:23 | ConditionalAccess | | ConditionalAccess.cs:1:7:1:23 | enter ConditionalAccess | ConditionalAccess.cs:1:7:1:23 | ConditionalAccess | | ConditionalAccess.cs:1:7:1:23 | exit ConditionalAccess | ConditionalAccess.cs:1:7:1:23 | ConditionalAccess | | ConditionalAccess.cs:1:7:1:23 | exit ConditionalAccess (normal) | ConditionalAccess.cs:1:7:1:23 | ConditionalAccess | +| ConditionalAccess.cs:1:7:1:23 | this access | ConditionalAccess.cs:1:7:1:23 | ConditionalAccess | | ConditionalAccess.cs:1:7:1:23 | {...} | ConditionalAccess.cs:1:7:1:23 | ConditionalAccess | | ConditionalAccess.cs:3:12:3:13 | enter M1 | ConditionalAccess.cs:3:12:3:13 | M1 | | ConditionalAccess.cs:3:12:3:13 | exit M1 | ConditionalAccess.cs:3:12:3:13 | M1 | @@ -1064,9 +1080,11 @@ nodeEnclosing | ConditionalAccess.cs:41:75:41:78 | ", " | ConditionalAccess.cs:41:26:41:38 | CommaJoinWith | | ConditionalAccess.cs:41:82:41:83 | access to parameter s2 | ConditionalAccess.cs:41:26:41:38 | CommaJoinWith | | Conditions.cs:1:7:1:16 | call to constructor Object | Conditions.cs:1:7:1:16 | Conditions | +| Conditions.cs:1:7:1:16 | call to method | Conditions.cs:1:7:1:16 | Conditions | | Conditions.cs:1:7:1:16 | enter Conditions | Conditions.cs:1:7:1:16 | Conditions | | Conditions.cs:1:7:1:16 | exit Conditions | Conditions.cs:1:7:1:16 | Conditions | | Conditions.cs:1:7:1:16 | exit Conditions (normal) | Conditions.cs:1:7:1:16 | Conditions | +| Conditions.cs:1:7:1:16 | this access | Conditions.cs:1:7:1:16 | Conditions | | Conditions.cs:1:7:1:16 | {...} | Conditions.cs:1:7:1:16 | Conditions | | Conditions.cs:3:10:3:19 | enter IncrOrDecr | Conditions.cs:3:10:3:19 | IncrOrDecr | | Conditions.cs:3:10:3:19 | exit IncrOrDecr | Conditions.cs:3:10:3:19 | IncrOrDecr | @@ -1384,9 +1402,11 @@ nodeEnclosing | Conditions.cs:149:44:149:46 | {...} | Conditions.cs:143:10:143:12 | M11 | | Conditions.cs:149:45:149:45 | access to local variable s | Conditions.cs:143:10:143:12 | M11 | | ExitMethods.cs:6:7:6:17 | call to constructor Object | ExitMethods.cs:6:7:6:17 | ExitMethods | +| ExitMethods.cs:6:7:6:17 | call to method | ExitMethods.cs:6:7:6:17 | ExitMethods | | ExitMethods.cs:6:7:6:17 | enter ExitMethods | ExitMethods.cs:6:7:6:17 | ExitMethods | | ExitMethods.cs:6:7:6:17 | exit ExitMethods | ExitMethods.cs:6:7:6:17 | ExitMethods | | ExitMethods.cs:6:7:6:17 | exit ExitMethods (normal) | ExitMethods.cs:6:7:6:17 | ExitMethods | +| ExitMethods.cs:6:7:6:17 | this access | ExitMethods.cs:6:7:6:17 | ExitMethods | | ExitMethods.cs:6:7:6:17 | {...} | ExitMethods.cs:6:7:6:17 | ExitMethods | | ExitMethods.cs:8:10:8:11 | enter M1 | ExitMethods.cs:8:10:8:11 | M1 | | ExitMethods.cs:8:10:8:11 | exit M1 | ExitMethods.cs:8:10:8:11 | M1 | @@ -1616,9 +1636,11 @@ nodeEnclosing | Extensions.cs:25:23:25:32 | access to method Parse | Extensions.cs:20:17:20:20 | Main | | Extensions.cs:25:23:25:32 | delegate creation of type Func | Extensions.cs:20:17:20:20 | Main | | Finally.cs:3:14:3:20 | call to constructor Object | Finally.cs:3:14:3:20 | Finally | +| Finally.cs:3:14:3:20 | call to method | Finally.cs:3:14:3:20 | Finally | | Finally.cs:3:14:3:20 | enter Finally | Finally.cs:3:14:3:20 | Finally | | Finally.cs:3:14:3:20 | exit Finally | Finally.cs:3:14:3:20 | Finally | | Finally.cs:3:14:3:20 | exit Finally (normal) | Finally.cs:3:14:3:20 | Finally | +| Finally.cs:3:14:3:20 | this access | Finally.cs:3:14:3:20 | Finally | | Finally.cs:3:14:3:20 | {...} | Finally.cs:3:14:3:20 | Finally | | Finally.cs:7:10:7:11 | enter M1 | Finally.cs:7:10:7:11 | M1 | | Finally.cs:7:10:7:11 | exit M1 | Finally.cs:7:10:7:11 | M1 | @@ -1852,19 +1874,25 @@ nodeEnclosing | Finally.cs:167:17:167:38 | ...; | Finally.cs:147:10:147:11 | M8 | | Finally.cs:167:35:167:36 | "" | Finally.cs:147:10:147:11 | M8 | | Finally.cs:172:11:172:20 | call to constructor Exception | Finally.cs:172:11:172:20 | ExceptionA | +| Finally.cs:172:11:172:20 | call to method | Finally.cs:172:11:172:20 | ExceptionA | | Finally.cs:172:11:172:20 | enter ExceptionA | Finally.cs:172:11:172:20 | ExceptionA | | Finally.cs:172:11:172:20 | exit ExceptionA | Finally.cs:172:11:172:20 | ExceptionA | | Finally.cs:172:11:172:20 | exit ExceptionA (normal) | Finally.cs:172:11:172:20 | ExceptionA | +| Finally.cs:172:11:172:20 | this access | Finally.cs:172:11:172:20 | ExceptionA | | Finally.cs:172:11:172:20 | {...} | Finally.cs:172:11:172:20 | ExceptionA | | Finally.cs:173:11:173:20 | call to constructor Exception | Finally.cs:173:11:173:20 | ExceptionB | +| Finally.cs:173:11:173:20 | call to method | Finally.cs:173:11:173:20 | ExceptionB | | Finally.cs:173:11:173:20 | enter ExceptionB | Finally.cs:173:11:173:20 | ExceptionB | | Finally.cs:173:11:173:20 | exit ExceptionB | Finally.cs:173:11:173:20 | ExceptionB | | Finally.cs:173:11:173:20 | exit ExceptionB (normal) | Finally.cs:173:11:173:20 | ExceptionB | +| Finally.cs:173:11:173:20 | this access | Finally.cs:173:11:173:20 | ExceptionB | | Finally.cs:173:11:173:20 | {...} | Finally.cs:173:11:173:20 | ExceptionB | | Finally.cs:174:11:174:20 | call to constructor Exception | Finally.cs:174:11:174:20 | ExceptionC | +| Finally.cs:174:11:174:20 | call to method | Finally.cs:174:11:174:20 | ExceptionC | | Finally.cs:174:11:174:20 | enter ExceptionC | Finally.cs:174:11:174:20 | ExceptionC | | Finally.cs:174:11:174:20 | exit ExceptionC | Finally.cs:174:11:174:20 | ExceptionC | | Finally.cs:174:11:174:20 | exit ExceptionC (normal) | Finally.cs:174:11:174:20 | ExceptionC | +| Finally.cs:174:11:174:20 | this access | Finally.cs:174:11:174:20 | ExceptionC | | Finally.cs:174:11:174:20 | {...} | Finally.cs:174:11:174:20 | ExceptionC | | Finally.cs:176:10:176:11 | enter M9 | Finally.cs:176:10:176:11 | M9 | | Finally.cs:176:10:176:11 | exit M9 | Finally.cs:176:10:176:11 | M9 | @@ -1997,9 +2025,11 @@ nodeEnclosing | Finally.cs:272:13:272:19 | ...; | Finally.cs:263:10:263:12 | M13 | | Finally.cs:272:18:272:18 | 3 | Finally.cs:263:10:263:12 | M13 | | Foreach.cs:4:7:4:13 | call to constructor Object | Foreach.cs:4:7:4:13 | Foreach | +| Foreach.cs:4:7:4:13 | call to method | Foreach.cs:4:7:4:13 | Foreach | | Foreach.cs:4:7:4:13 | enter Foreach | Foreach.cs:4:7:4:13 | Foreach | | Foreach.cs:4:7:4:13 | exit Foreach | Foreach.cs:4:7:4:13 | Foreach | | Foreach.cs:4:7:4:13 | exit Foreach (normal) | Foreach.cs:4:7:4:13 | Foreach | +| Foreach.cs:4:7:4:13 | this access | Foreach.cs:4:7:4:13 | Foreach | | Foreach.cs:4:7:4:13 | {...} | Foreach.cs:4:7:4:13 | Foreach | | Foreach.cs:6:10:6:11 | enter M1 | Foreach.cs:6:10:6:11 | M1 | | Foreach.cs:6:10:6:11 | exit M1 | Foreach.cs:6:10:6:11 | M1 | @@ -2058,41 +2088,37 @@ nodeEnclosing | Foreach.cs:38:33:38:33 | Int32 y | Foreach.cs:36:10:36:11 | M6 | | Foreach.cs:38:39:38:42 | access to parameter args | Foreach.cs:36:10:36:11 | M6 | | Foreach.cs:39:11:39:11 | ; | Foreach.cs:36:10:36:11 | M6 | +| Initializers.cs:3:7:3:18 | enter | Initializers.cs:3:7:3:18 | | | Initializers.cs:3:7:3:18 | enter Initializers | Initializers.cs:3:7:3:18 | Initializers | +| Initializers.cs:3:7:3:18 | exit | Initializers.cs:3:7:3:18 | | +| Initializers.cs:3:7:3:18 | exit (normal) | Initializers.cs:3:7:3:18 | | | Initializers.cs:3:7:3:18 | exit Initializers | Initializers.cs:3:7:3:18 | Initializers | | Initializers.cs:3:7:3:18 | exit Initializers (normal) | Initializers.cs:3:7:3:18 | Initializers | | Initializers.cs:3:7:3:18 | {...} | Initializers.cs:3:7:3:18 | Initializers | -| Initializers.cs:5:9:5:9 | this access | Initializers.cs:8:5:8:16 | Initializers | -| Initializers.cs:5:9:5:9 | this access | Initializers.cs:10:5:10:16 | Initializers | -| Initializers.cs:5:9:5:17 | ... = ... | Initializers.cs:8:5:8:16 | Initializers | -| Initializers.cs:5:9:5:17 | ... = ... | Initializers.cs:10:5:10:16 | Initializers | -| Initializers.cs:5:13:5:13 | access to field H | Initializers.cs:8:5:8:16 | Initializers | -| Initializers.cs:5:13:5:13 | access to field H | Initializers.cs:10:5:10:16 | Initializers | -| Initializers.cs:5:13:5:17 | ... + ... | Initializers.cs:8:5:8:16 | Initializers | -| Initializers.cs:5:13:5:17 | ... + ... | Initializers.cs:10:5:10:16 | Initializers | -| Initializers.cs:5:17:5:17 | 1 | Initializers.cs:8:5:8:16 | Initializers | -| Initializers.cs:5:17:5:17 | 1 | Initializers.cs:10:5:10:16 | Initializers | -| Initializers.cs:6:9:6:9 | access to property G | Initializers.cs:8:5:8:16 | Initializers | -| Initializers.cs:6:9:6:9 | access to property G | Initializers.cs:10:5:10:16 | Initializers | -| Initializers.cs:6:9:6:9 | this access | Initializers.cs:8:5:8:16 | Initializers | -| Initializers.cs:6:9:6:9 | this access | Initializers.cs:10:5:10:16 | Initializers | -| Initializers.cs:6:25:6:31 | ... = ... | Initializers.cs:8:5:8:16 | Initializers | -| Initializers.cs:6:25:6:31 | ... = ... | Initializers.cs:10:5:10:16 | Initializers | -| Initializers.cs:6:27:6:27 | access to field H | Initializers.cs:8:5:8:16 | Initializers | -| Initializers.cs:6:27:6:27 | access to field H | Initializers.cs:10:5:10:16 | Initializers | -| Initializers.cs:6:27:6:31 | ... + ... | Initializers.cs:8:5:8:16 | Initializers | -| Initializers.cs:6:27:6:31 | ... + ... | Initializers.cs:10:5:10:16 | Initializers | -| Initializers.cs:6:31:6:31 | 2 | Initializers.cs:8:5:8:16 | Initializers | -| Initializers.cs:6:31:6:31 | 2 | Initializers.cs:10:5:10:16 | Initializers | +| Initializers.cs:5:9:5:9 | this access | Initializers.cs:3:7:3:18 | | +| Initializers.cs:5:9:5:17 | ... = ... | Initializers.cs:3:7:3:18 | | +| Initializers.cs:5:13:5:13 | access to field H | Initializers.cs:3:7:3:18 | | +| Initializers.cs:5:13:5:17 | ... + ... | Initializers.cs:3:7:3:18 | | +| Initializers.cs:5:17:5:17 | 1 | Initializers.cs:3:7:3:18 | | +| Initializers.cs:6:9:6:9 | access to property G | Initializers.cs:3:7:3:18 | | +| Initializers.cs:6:9:6:9 | this access | Initializers.cs:3:7:3:18 | | +| Initializers.cs:6:25:6:31 | ... = ... | Initializers.cs:3:7:3:18 | | +| Initializers.cs:6:27:6:27 | access to field H | Initializers.cs:3:7:3:18 | | +| Initializers.cs:6:27:6:31 | ... + ... | Initializers.cs:3:7:3:18 | | +| Initializers.cs:6:31:6:31 | 2 | Initializers.cs:3:7:3:18 | | | Initializers.cs:8:5:8:16 | call to constructor Object | Initializers.cs:8:5:8:16 | Initializers | +| Initializers.cs:8:5:8:16 | call to method | Initializers.cs:8:5:8:16 | Initializers | | Initializers.cs:8:5:8:16 | enter Initializers | Initializers.cs:8:5:8:16 | Initializers | | Initializers.cs:8:5:8:16 | exit Initializers | Initializers.cs:8:5:8:16 | Initializers | | Initializers.cs:8:5:8:16 | exit Initializers (normal) | Initializers.cs:8:5:8:16 | Initializers | +| Initializers.cs:8:5:8:16 | this access | Initializers.cs:8:5:8:16 | Initializers | | Initializers.cs:8:20:8:22 | {...} | Initializers.cs:8:5:8:16 | Initializers | | Initializers.cs:10:5:10:16 | call to constructor Object | Initializers.cs:10:5:10:16 | Initializers | +| Initializers.cs:10:5:10:16 | call to method | Initializers.cs:10:5:10:16 | Initializers | | Initializers.cs:10:5:10:16 | enter Initializers | Initializers.cs:10:5:10:16 | Initializers | | Initializers.cs:10:5:10:16 | exit Initializers | Initializers.cs:10:5:10:16 | Initializers | | Initializers.cs:10:5:10:16 | exit Initializers (normal) | Initializers.cs:10:5:10:16 | Initializers | +| Initializers.cs:10:5:10:16 | this access | Initializers.cs:10:5:10:16 | Initializers | | Initializers.cs:10:28:10:30 | {...} | Initializers.cs:10:5:10:16 | Initializers | | Initializers.cs:12:10:12:10 | enter M | Initializers.cs:12:10:12:10 | M | | Initializers.cs:12:10:12:10 | exit M | Initializers.cs:12:10:12:10 | M | @@ -2117,25 +2143,32 @@ nodeEnclosing | Initializers.cs:15:42:15:61 | object creation of type Initializers | Initializers.cs:12:10:12:10 | M | | Initializers.cs:15:59:15:60 | "" | Initializers.cs:12:10:12:10 | M | | Initializers.cs:20:11:20:23 | call to constructor Object | Initializers.cs:20:11:20:23 | NoConstructor | +| Initializers.cs:20:11:20:23 | call to method | Initializers.cs:20:11:20:23 | NoConstructor | +| Initializers.cs:20:11:20:23 | enter | Initializers.cs:20:11:20:23 | | | Initializers.cs:20:11:20:23 | enter NoConstructor | Initializers.cs:20:11:20:23 | NoConstructor | +| Initializers.cs:20:11:20:23 | exit | Initializers.cs:20:11:20:23 | | +| Initializers.cs:20:11:20:23 | exit (normal) | Initializers.cs:20:11:20:23 | | | Initializers.cs:20:11:20:23 | exit NoConstructor | Initializers.cs:20:11:20:23 | NoConstructor | | Initializers.cs:20:11:20:23 | exit NoConstructor (normal) | Initializers.cs:20:11:20:23 | NoConstructor | +| Initializers.cs:20:11:20:23 | this access | Initializers.cs:20:11:20:23 | NoConstructor | | Initializers.cs:20:11:20:23 | {...} | Initializers.cs:20:11:20:23 | NoConstructor | -| Initializers.cs:22:23:22:23 | this access | Initializers.cs:20:11:20:23 | NoConstructor | -| Initializers.cs:22:23:22:27 | ... = ... | Initializers.cs:20:11:20:23 | NoConstructor | -| Initializers.cs:22:27:22:27 | 0 | Initializers.cs:20:11:20:23 | NoConstructor | -| Initializers.cs:23:23:23:23 | this access | Initializers.cs:20:11:20:23 | NoConstructor | -| Initializers.cs:23:23:23:27 | ... = ... | Initializers.cs:20:11:20:23 | NoConstructor | -| Initializers.cs:23:27:23:27 | 1 | Initializers.cs:20:11:20:23 | NoConstructor | -| Initializers.cs:28:13:28:13 | this access | Initializers.cs:31:9:31:11 | Sub | -| Initializers.cs:28:13:28:13 | this access | Initializers.cs:35:9:35:11 | Sub | -| Initializers.cs:28:13:28:17 | ... = ... | Initializers.cs:31:9:31:11 | Sub | -| Initializers.cs:28:13:28:17 | ... = ... | Initializers.cs:35:9:35:11 | Sub | -| Initializers.cs:28:17:28:17 | 2 | Initializers.cs:31:9:31:11 | Sub | -| Initializers.cs:28:17:28:17 | 2 | Initializers.cs:35:9:35:11 | Sub | +| Initializers.cs:22:23:22:23 | this access | Initializers.cs:20:11:20:23 | | +| Initializers.cs:22:23:22:27 | ... = ... | Initializers.cs:20:11:20:23 | | +| Initializers.cs:22:27:22:27 | 0 | Initializers.cs:20:11:20:23 | | +| Initializers.cs:23:23:23:23 | this access | Initializers.cs:20:11:20:23 | | +| Initializers.cs:23:23:23:27 | ... = ... | Initializers.cs:20:11:20:23 | | +| Initializers.cs:23:27:23:27 | 1 | Initializers.cs:20:11:20:23 | | +| Initializers.cs:26:11:26:13 | enter | Initializers.cs:26:11:26:13 | | +| Initializers.cs:26:11:26:13 | exit | Initializers.cs:26:11:26:13 | | +| Initializers.cs:26:11:26:13 | exit (normal) | Initializers.cs:26:11:26:13 | | +| Initializers.cs:28:13:28:13 | this access | Initializers.cs:26:11:26:13 | | +| Initializers.cs:28:13:28:17 | ... = ... | Initializers.cs:26:11:26:13 | | +| Initializers.cs:28:17:28:17 | 2 | Initializers.cs:26:11:26:13 | | +| Initializers.cs:31:9:31:11 | call to method | Initializers.cs:31:9:31:11 | Sub | | Initializers.cs:31:9:31:11 | enter Sub | Initializers.cs:31:9:31:11 | Sub | | Initializers.cs:31:9:31:11 | exit Sub | Initializers.cs:31:9:31:11 | Sub | | Initializers.cs:31:9:31:11 | exit Sub (normal) | Initializers.cs:31:9:31:11 | Sub | +| Initializers.cs:31:9:31:11 | this access | Initializers.cs:31:9:31:11 | Sub | | Initializers.cs:31:17:31:20 | call to constructor NoConstructor | Initializers.cs:31:9:31:11 | Sub | | Initializers.cs:31:24:31:33 | {...} | Initializers.cs:31:9:31:11 | Sub | | Initializers.cs:31:26:31:26 | this access | Initializers.cs:31:9:31:11 | Sub | @@ -2152,9 +2185,11 @@ nodeEnclosing | Initializers.cs:33:31:33:36 | ...; | Initializers.cs:33:9:33:11 | Sub | | Initializers.cs:33:35:33:35 | access to parameter i | Initializers.cs:33:9:33:11 | Sub | | Initializers.cs:35:9:35:11 | call to constructor NoConstructor | Initializers.cs:35:9:35:11 | Sub | +| Initializers.cs:35:9:35:11 | call to method | Initializers.cs:35:9:35:11 | Sub | | Initializers.cs:35:9:35:11 | enter Sub | Initializers.cs:35:9:35:11 | Sub | | Initializers.cs:35:9:35:11 | exit Sub | Initializers.cs:35:9:35:11 | Sub | | Initializers.cs:35:9:35:11 | exit Sub (normal) | Initializers.cs:35:9:35:11 | Sub | +| Initializers.cs:35:9:35:11 | this access | Initializers.cs:35:9:35:11 | Sub | | Initializers.cs:35:27:35:40 | {...} | Initializers.cs:35:9:35:11 | Sub | | Initializers.cs:35:29:35:29 | this access | Initializers.cs:35:9:35:11 | Sub | | Initializers.cs:35:29:35:37 | ... = ... | Initializers.cs:35:9:35:11 | Sub | @@ -2163,14 +2198,18 @@ nodeEnclosing | Initializers.cs:35:33:35:37 | ... + ... | Initializers.cs:35:9:35:11 | Sub | | Initializers.cs:35:37:35:37 | access to parameter j | Initializers.cs:35:9:35:11 | Sub | | Initializers.cs:39:7:39:23 | call to constructor Object | Initializers.cs:39:7:39:23 | IndexInitializers | +| Initializers.cs:39:7:39:23 | call to method | Initializers.cs:39:7:39:23 | IndexInitializers | | Initializers.cs:39:7:39:23 | enter IndexInitializers | Initializers.cs:39:7:39:23 | IndexInitializers | | Initializers.cs:39:7:39:23 | exit IndexInitializers | Initializers.cs:39:7:39:23 | IndexInitializers | | Initializers.cs:39:7:39:23 | exit IndexInitializers (normal) | Initializers.cs:39:7:39:23 | IndexInitializers | +| Initializers.cs:39:7:39:23 | this access | Initializers.cs:39:7:39:23 | IndexInitializers | | Initializers.cs:39:7:39:23 | {...} | Initializers.cs:39:7:39:23 | IndexInitializers | | Initializers.cs:41:11:41:18 | call to constructor Object | Initializers.cs:41:11:41:18 | Compound | +| Initializers.cs:41:11:41:18 | call to method | Initializers.cs:41:11:41:18 | Compound | | Initializers.cs:41:11:41:18 | enter Compound | Initializers.cs:41:11:41:18 | Compound | | Initializers.cs:41:11:41:18 | exit Compound | Initializers.cs:41:11:41:18 | Compound | | Initializers.cs:41:11:41:18 | exit Compound (normal) | Initializers.cs:41:11:41:18 | Compound | +| Initializers.cs:41:11:41:18 | this access | Initializers.cs:41:11:41:18 | Compound | | Initializers.cs:41:11:41:18 | {...} | Initializers.cs:41:11:41:18 | Compound | | Initializers.cs:51:10:51:13 | enter Test | Initializers.cs:51:10:51:13 | Test | | Initializers.cs:51:10:51:13 | exit Test | Initializers.cs:51:10:51:13 | Test | @@ -2278,9 +2317,11 @@ nodeEnclosing | Initializers.cs:64:54:64:54 | 0 | Initializers.cs:51:10:51:13 | Test | | Initializers.cs:64:59:64:61 | "1" | Initializers.cs:51:10:51:13 | Test | | LoopUnrolling.cs:5:7:5:19 | call to constructor Object | LoopUnrolling.cs:5:7:5:19 | LoopUnrolling | +| LoopUnrolling.cs:5:7:5:19 | call to method | LoopUnrolling.cs:5:7:5:19 | LoopUnrolling | | LoopUnrolling.cs:5:7:5:19 | enter LoopUnrolling | LoopUnrolling.cs:5:7:5:19 | LoopUnrolling | | LoopUnrolling.cs:5:7:5:19 | exit LoopUnrolling | LoopUnrolling.cs:5:7:5:19 | LoopUnrolling | | LoopUnrolling.cs:5:7:5:19 | exit LoopUnrolling (normal) | LoopUnrolling.cs:5:7:5:19 | LoopUnrolling | +| LoopUnrolling.cs:5:7:5:19 | this access | LoopUnrolling.cs:5:7:5:19 | LoopUnrolling | | LoopUnrolling.cs:5:7:5:19 | {...} | LoopUnrolling.cs:5:7:5:19 | LoopUnrolling | | LoopUnrolling.cs:7:10:7:11 | enter M1 | LoopUnrolling.cs:7:10:7:11 | M1 | | LoopUnrolling.cs:7:10:7:11 | exit M1 | LoopUnrolling.cs:7:10:7:11 | M1 | @@ -2489,9 +2530,11 @@ nodeEnclosing | LoopUnrolling.cs:99:13:99:33 | ...; | LoopUnrolling.cs:94:10:94:12 | M11 | | LoopUnrolling.cs:99:31:99:31 | access to local variable x | LoopUnrolling.cs:94:10:94:12 | M11 | | MultiImplementationA.cs:4:7:4:8 | call to constructor Object | MultiImplementationA.cs:4:7:4:8 | C1 | +| MultiImplementationA.cs:4:7:4:8 | call to method | MultiImplementationA.cs:4:7:4:8 | C1 | | MultiImplementationA.cs:4:7:4:8 | enter C1 | MultiImplementationA.cs:4:7:4:8 | C1 | | MultiImplementationA.cs:4:7:4:8 | exit C1 | MultiImplementationA.cs:4:7:4:8 | C1 | | MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | MultiImplementationA.cs:4:7:4:8 | C1 | +| MultiImplementationA.cs:4:7:4:8 | this access | MultiImplementationA.cs:4:7:4:8 | C1 | | MultiImplementationA.cs:4:7:4:8 | {...} | MultiImplementationA.cs:4:7:4:8 | C1 | | MultiImplementationA.cs:6:22:6:31 | enter get_P1 | MultiImplementationA.cs:6:22:6:31 | get_P1 | | MultiImplementationA.cs:6:22:6:31 | exit get_P1 | MultiImplementationA.cs:6:22:6:31 | get_P1 | @@ -2519,9 +2562,12 @@ nodeEnclosing | MultiImplementationA.cs:8:16:8:16 | exit M (normal) | MultiImplementationA.cs:8:16:8:16 | M | | MultiImplementationA.cs:8:23:8:32 | throw ... | MultiImplementationA.cs:8:16:8:16 | M | | MultiImplementationA.cs:8:29:8:32 | null | MultiImplementationA.cs:8:16:8:16 | M | -| MultiImplementationA.cs:13:16:13:16 | this access | MultiImplementationA.cs:20:12:20:13 | C2 | -| MultiImplementationA.cs:13:16:13:20 | ... = ... | MultiImplementationA.cs:20:12:20:13 | C2 | -| MultiImplementationA.cs:13:20:13:20 | 0 | MultiImplementationA.cs:20:12:20:13 | C2 | +| MultiImplementationA.cs:11:7:11:8 | enter | MultiImplementationA.cs:11:7:11:8 | | +| MultiImplementationA.cs:11:7:11:8 | exit | MultiImplementationA.cs:11:7:11:8 | | +| MultiImplementationA.cs:11:7:11:8 | exit (normal) | MultiImplementationA.cs:11:7:11:8 | | +| MultiImplementationA.cs:13:16:13:16 | this access | MultiImplementationA.cs:11:7:11:8 | | +| MultiImplementationA.cs:13:16:13:20 | ... = ... | MultiImplementationA.cs:11:7:11:8 | | +| MultiImplementationA.cs:13:20:13:20 | 0 | MultiImplementationA.cs:11:7:11:8 | | | MultiImplementationA.cs:14:31:14:31 | access to parameter i | MultiImplementationA.cs:14:31:14:31 | get_Item | | MultiImplementationA.cs:14:31:14:31 | enter get_Item | MultiImplementationA.cs:14:31:14:31 | get_Item | | MultiImplementationA.cs:14:31:14:31 | exit get_Item | MultiImplementationA.cs:14:31:14:31 | get_Item | @@ -2548,10 +2594,12 @@ nodeEnclosing | MultiImplementationA.cs:18:9:18:22 | exit M2 (normal) | MultiImplementationA.cs:18:9:18:22 | M2 | | MultiImplementationA.cs:18:21:18:21 | 0 | MultiImplementationA.cs:18:9:18:22 | M2 | | MultiImplementationA.cs:20:12:20:13 | call to constructor Object | MultiImplementationA.cs:20:12:20:13 | C2 | +| MultiImplementationA.cs:20:12:20:13 | call to method | MultiImplementationA.cs:20:12:20:13 | C2 | | MultiImplementationA.cs:20:12:20:13 | enter C2 | MultiImplementationA.cs:20:12:20:13 | C2 | | MultiImplementationA.cs:20:12:20:13 | exit C2 | MultiImplementationA.cs:20:12:20:13 | C2 | | MultiImplementationA.cs:20:12:20:13 | exit C2 (abnormal) | MultiImplementationA.cs:20:12:20:13 | C2 | | MultiImplementationA.cs:20:12:20:13 | exit C2 (normal) | MultiImplementationA.cs:20:12:20:13 | C2 | +| MultiImplementationA.cs:20:12:20:13 | this access | MultiImplementationA.cs:20:12:20:13 | C2 | | MultiImplementationA.cs:20:22:20:31 | {...} | MultiImplementationA.cs:20:12:20:13 | C2 | | MultiImplementationA.cs:20:24:20:24 | this access | MultiImplementationA.cs:20:12:20:13 | C2 | | MultiImplementationA.cs:20:24:20:28 | ... = ... | MultiImplementationA.cs:20:12:20:13 | C2 | @@ -2573,14 +2621,16 @@ nodeEnclosing | MultiImplementationA.cs:23:28:23:35 | exit implicit conversion (abnormal) | MultiImplementationA.cs:23:28:23:35 | implicit conversion | | MultiImplementationA.cs:23:28:23:35 | exit implicit conversion (normal) | MultiImplementationA.cs:23:28:23:35 | implicit conversion | | MultiImplementationA.cs:23:50:23:53 | null | MultiImplementationA.cs:23:28:23:35 | implicit conversion | -| MultiImplementationA.cs:24:16:24:16 | access to property P | MultiImplementationA.cs:20:12:20:13 | C2 | -| MultiImplementationA.cs:24:16:24:16 | this access | MultiImplementationA.cs:20:12:20:13 | C2 | -| MultiImplementationA.cs:24:32:24:34 | ... = ... | MultiImplementationA.cs:20:12:20:13 | C2 | -| MultiImplementationA.cs:24:34:24:34 | 0 | MultiImplementationA.cs:20:12:20:13 | C2 | +| MultiImplementationA.cs:24:16:24:16 | access to property P | MultiImplementationA.cs:11:7:11:8 | | +| MultiImplementationA.cs:24:16:24:16 | this access | MultiImplementationA.cs:11:7:11:8 | | +| MultiImplementationA.cs:24:32:24:34 | ... = ... | MultiImplementationA.cs:11:7:11:8 | | +| MultiImplementationA.cs:24:34:24:34 | 0 | MultiImplementationA.cs:11:7:11:8 | | | MultiImplementationA.cs:28:7:28:8 | call to constructor Object | MultiImplementationA.cs:28:7:28:8 | C3 | +| MultiImplementationA.cs:28:7:28:8 | call to method | MultiImplementationA.cs:28:7:28:8 | C3 | | MultiImplementationA.cs:28:7:28:8 | enter C3 | MultiImplementationA.cs:28:7:28:8 | C3 | | MultiImplementationA.cs:28:7:28:8 | exit C3 | MultiImplementationA.cs:28:7:28:8 | C3 | | MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | MultiImplementationA.cs:28:7:28:8 | C3 | +| MultiImplementationA.cs:28:7:28:8 | this access | MultiImplementationA.cs:28:7:28:8 | C3 | | MultiImplementationA.cs:28:7:28:8 | {...} | MultiImplementationA.cs:28:7:28:8 | C3 | | MultiImplementationA.cs:30:21:30:23 | enter get_P3 | MultiImplementationA.cs:30:21:30:23 | get_P3 | | MultiImplementationA.cs:30:21:30:23 | exit get_P3 | MultiImplementationA.cs:30:21:30:23 | get_P3 | @@ -2588,9 +2638,11 @@ nodeEnclosing | MultiImplementationA.cs:30:28:30:37 | throw ... | MultiImplementationA.cs:30:21:30:23 | get_P3 | | MultiImplementationA.cs:30:34:30:37 | null | MultiImplementationA.cs:30:21:30:23 | get_P3 | | MultiImplementationA.cs:34:15:34:16 | call to constructor Object | MultiImplementationA.cs:34:15:34:16 | C4 | +| MultiImplementationA.cs:34:15:34:16 | call to method | MultiImplementationA.cs:34:15:34:16 | C4 | | MultiImplementationA.cs:34:15:34:16 | enter C4 | MultiImplementationA.cs:34:15:34:16 | C4 | | MultiImplementationA.cs:34:15:34:16 | exit C4 | MultiImplementationA.cs:34:15:34:16 | C4 | | MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | MultiImplementationA.cs:34:15:34:16 | C4 | +| MultiImplementationA.cs:34:15:34:16 | this access | MultiImplementationA.cs:34:15:34:16 | C4 | | MultiImplementationA.cs:34:15:34:16 | {...} | MultiImplementationA.cs:34:15:34:16 | C4 | | MultiImplementationA.cs:36:9:36:10 | enter M1 | MultiImplementationA.cs:36:9:36:10 | M1 | | MultiImplementationA.cs:36:9:36:10 | exit M1 | MultiImplementationA.cs:36:9:36:10 | M1 | @@ -2606,6 +2658,8 @@ nodeEnclosing | MultiImplementationA.cs:37:16:37:26 | throw ...; | MultiImplementationA.cs:37:9:37:10 | M2 | | MultiImplementationA.cs:37:22:37:25 | null | MultiImplementationA.cs:37:9:37:10 | M2 | | MultiImplementationB.cs:1:7:1:8 | call to constructor Object | MultiImplementationA.cs:4:7:4:8 | C1 | +| MultiImplementationB.cs:1:7:1:8 | call to method | MultiImplementationA.cs:4:7:4:8 | C1 | +| MultiImplementationB.cs:1:7:1:8 | this access | MultiImplementationA.cs:4:7:4:8 | C1 | | MultiImplementationB.cs:1:7:1:8 | {...} | MultiImplementationA.cs:4:7:4:8 | C1 | | MultiImplementationB.cs:3:22:3:22 | 0 | MultiImplementationA.cs:6:22:6:31 | get_P1 | | MultiImplementationB.cs:4:25:4:37 | {...} | MultiImplementationA.cs:7:21:7:23 | get_P2 | @@ -2613,9 +2667,9 @@ nodeEnclosing | MultiImplementationB.cs:4:34:4:34 | 1 | MultiImplementationA.cs:7:21:7:23 | get_P2 | | MultiImplementationB.cs:4:43:4:45 | {...} | MultiImplementationA.cs:7:41:7:43 | set_P2 | | MultiImplementationB.cs:5:23:5:23 | 2 | MultiImplementationA.cs:8:16:8:16 | M | -| MultiImplementationB.cs:11:16:11:16 | this access | MultiImplementationA.cs:20:12:20:13 | C2 | -| MultiImplementationB.cs:11:16:11:20 | ... = ... | MultiImplementationA.cs:20:12:20:13 | C2 | -| MultiImplementationB.cs:11:20:11:20 | 1 | MultiImplementationA.cs:20:12:20:13 | C2 | +| MultiImplementationB.cs:11:16:11:16 | this access | MultiImplementationA.cs:11:7:11:8 | | +| MultiImplementationB.cs:11:16:11:20 | ... = ... | MultiImplementationA.cs:11:7:11:8 | | +| MultiImplementationB.cs:11:20:11:20 | 1 | MultiImplementationA.cs:11:7:11:8 | | | MultiImplementationB.cs:12:31:12:40 | throw ... | MultiImplementationA.cs:14:31:14:31 | get_Item | | MultiImplementationB.cs:12:37:12:40 | null | MultiImplementationA.cs:14:31:14:31 | get_Item | | MultiImplementationB.cs:13:40:13:54 | {...} | MultiImplementationA.cs:15:36:15:38 | get_Item | @@ -2630,6 +2684,8 @@ nodeEnclosing | MultiImplementationB.cs:16:21:16:30 | throw ... | MultiImplementationB.cs:16:9:16:31 | M2 | | MultiImplementationB.cs:16:27:16:30 | null | MultiImplementationB.cs:16:9:16:31 | M2 | | MultiImplementationB.cs:18:12:18:13 | call to constructor Object | MultiImplementationA.cs:20:12:20:13 | C2 | +| MultiImplementationB.cs:18:12:18:13 | call to method | MultiImplementationA.cs:20:12:20:13 | C2 | +| MultiImplementationB.cs:18:12:18:13 | this access | MultiImplementationA.cs:20:12:20:13 | C2 | | MultiImplementationB.cs:18:22:18:36 | {...} | MultiImplementationA.cs:20:12:20:13 | C2 | | MultiImplementationB.cs:18:24:18:34 | throw ...; | MultiImplementationA.cs:20:12:20:13 | C2 | | MultiImplementationB.cs:18:30:18:33 | null | MultiImplementationA.cs:20:12:20:13 | C2 | @@ -2641,19 +2697,25 @@ nodeEnclosing | MultiImplementationB.cs:20:19:20:22 | null | MultiImplementationA.cs:22:6:22:7 | ~C2 | | MultiImplementationB.cs:21:50:21:59 | throw ... | MultiImplementationA.cs:23:28:23:35 | implicit conversion | | MultiImplementationB.cs:21:56:21:59 | null | MultiImplementationA.cs:23:28:23:35 | implicit conversion | -| MultiImplementationB.cs:22:16:22:16 | access to property P | MultiImplementationA.cs:20:12:20:13 | C2 | -| MultiImplementationB.cs:22:16:22:16 | this access | MultiImplementationA.cs:20:12:20:13 | C2 | -| MultiImplementationB.cs:22:32:22:34 | ... = ... | MultiImplementationA.cs:20:12:20:13 | C2 | -| MultiImplementationB.cs:22:34:22:34 | 1 | MultiImplementationA.cs:20:12:20:13 | C2 | +| MultiImplementationB.cs:22:16:22:16 | access to property P | MultiImplementationA.cs:11:7:11:8 | | +| MultiImplementationB.cs:22:16:22:16 | this access | MultiImplementationA.cs:11:7:11:8 | | +| MultiImplementationB.cs:22:32:22:34 | ... = ... | MultiImplementationA.cs:11:7:11:8 | | +| MultiImplementationB.cs:22:34:22:34 | 1 | MultiImplementationA.cs:11:7:11:8 | | | MultiImplementationB.cs:25:7:25:8 | call to constructor Object | MultiImplementationA.cs:28:7:28:8 | C3 | +| MultiImplementationB.cs:25:7:25:8 | call to method | MultiImplementationA.cs:28:7:28:8 | C3 | +| MultiImplementationB.cs:25:7:25:8 | this access | MultiImplementationA.cs:28:7:28:8 | C3 | | MultiImplementationB.cs:25:7:25:8 | {...} | MultiImplementationA.cs:28:7:28:8 | C3 | | MultiImplementationB.cs:30:15:30:16 | call to constructor Object | MultiImplementationA.cs:34:15:34:16 | C4 | +| MultiImplementationB.cs:30:15:30:16 | call to method | MultiImplementationA.cs:34:15:34:16 | C4 | +| MultiImplementationB.cs:30:15:30:16 | this access | MultiImplementationA.cs:34:15:34:16 | C4 | | MultiImplementationB.cs:30:15:30:16 | {...} | MultiImplementationA.cs:34:15:34:16 | C4 | | MultiImplementationB.cs:32:17:32:17 | 0 | MultiImplementationA.cs:36:9:36:10 | M1 | | NullCoalescing.cs:1:7:1:20 | call to constructor Object | NullCoalescing.cs:1:7:1:20 | NullCoalescing | +| NullCoalescing.cs:1:7:1:20 | call to method | NullCoalescing.cs:1:7:1:20 | NullCoalescing | | NullCoalescing.cs:1:7:1:20 | enter NullCoalescing | NullCoalescing.cs:1:7:1:20 | NullCoalescing | | NullCoalescing.cs:1:7:1:20 | exit NullCoalescing | NullCoalescing.cs:1:7:1:20 | NullCoalescing | | NullCoalescing.cs:1:7:1:20 | exit NullCoalescing (normal) | NullCoalescing.cs:1:7:1:20 | NullCoalescing | +| NullCoalescing.cs:1:7:1:20 | this access | NullCoalescing.cs:1:7:1:20 | NullCoalescing | | NullCoalescing.cs:1:7:1:20 | {...} | NullCoalescing.cs:1:7:1:20 | NullCoalescing | | NullCoalescing.cs:3:9:3:10 | enter M1 | NullCoalescing.cs:3:9:3:10 | M1 | | NullCoalescing.cs:3:9:3:10 | exit M1 | NullCoalescing.cs:3:9:3:10 | M1 | @@ -2722,34 +2784,36 @@ nodeEnclosing | NullCoalescing.cs:17:13:17:19 | (...) ... | NullCoalescing.cs:13:10:13:11 | M6 | | NullCoalescing.cs:17:13:17:24 | ... ?? ... | NullCoalescing.cs:13:10:13:11 | M6 | | NullCoalescing.cs:17:19:17:19 | access to parameter i | NullCoalescing.cs:13:10:13:11 | M6 | +| PartialImplementationA.cs:1:15:1:21 | enter | PartialImplementationA.cs:1:15:1:21 | | +| PartialImplementationA.cs:1:15:1:21 | exit | PartialImplementationA.cs:1:15:1:21 | | +| PartialImplementationA.cs:1:15:1:21 | exit (normal) | PartialImplementationA.cs:1:15:1:21 | | | PartialImplementationA.cs:3:12:3:18 | call to constructor Object | PartialImplementationA.cs:3:12:3:18 | Partial | +| PartialImplementationA.cs:3:12:3:18 | call to method | PartialImplementationA.cs:3:12:3:18 | Partial | | PartialImplementationA.cs:3:12:3:18 | enter Partial | PartialImplementationA.cs:3:12:3:18 | Partial | | PartialImplementationA.cs:3:12:3:18 | exit Partial | PartialImplementationA.cs:3:12:3:18 | Partial | | PartialImplementationA.cs:3:12:3:18 | exit Partial (normal) | PartialImplementationA.cs:3:12:3:18 | Partial | +| PartialImplementationA.cs:3:12:3:18 | this access | PartialImplementationA.cs:3:12:3:18 | Partial | | PartialImplementationA.cs:3:27:3:29 | {...} | PartialImplementationA.cs:3:12:3:18 | Partial | -| PartialImplementationB.cs:3:16:3:16 | this access | PartialImplementationA.cs:3:12:3:18 | Partial | -| PartialImplementationB.cs:3:16:3:16 | this access | PartialImplementationB.cs:4:12:4:18 | Partial | -| PartialImplementationB.cs:3:16:3:20 | ... = ... | PartialImplementationA.cs:3:12:3:18 | Partial | -| PartialImplementationB.cs:3:16:3:20 | ... = ... | PartialImplementationB.cs:4:12:4:18 | Partial | -| PartialImplementationB.cs:3:20:3:20 | 0 | PartialImplementationA.cs:3:12:3:18 | Partial | -| PartialImplementationB.cs:3:20:3:20 | 0 | PartialImplementationB.cs:4:12:4:18 | Partial | +| PartialImplementationB.cs:3:16:3:16 | this access | PartialImplementationA.cs:1:15:1:21 | | +| PartialImplementationB.cs:3:16:3:20 | ... = ... | PartialImplementationA.cs:1:15:1:21 | | +| PartialImplementationB.cs:3:20:3:20 | 0 | PartialImplementationA.cs:1:15:1:21 | | | PartialImplementationB.cs:4:12:4:18 | call to constructor Object | PartialImplementationB.cs:4:12:4:18 | Partial | +| PartialImplementationB.cs:4:12:4:18 | call to method | PartialImplementationB.cs:4:12:4:18 | Partial | | PartialImplementationB.cs:4:12:4:18 | enter Partial | PartialImplementationB.cs:4:12:4:18 | Partial | | PartialImplementationB.cs:4:12:4:18 | exit Partial | PartialImplementationB.cs:4:12:4:18 | Partial | | PartialImplementationB.cs:4:12:4:18 | exit Partial (normal) | PartialImplementationB.cs:4:12:4:18 | Partial | +| PartialImplementationB.cs:4:12:4:18 | this access | PartialImplementationB.cs:4:12:4:18 | Partial | | PartialImplementationB.cs:4:22:4:24 | {...} | PartialImplementationB.cs:4:12:4:18 | Partial | -| PartialImplementationB.cs:5:16:5:16 | access to property P | PartialImplementationA.cs:3:12:3:18 | Partial | -| PartialImplementationB.cs:5:16:5:16 | access to property P | PartialImplementationB.cs:4:12:4:18 | Partial | -| PartialImplementationB.cs:5:16:5:16 | this access | PartialImplementationA.cs:3:12:3:18 | Partial | -| PartialImplementationB.cs:5:16:5:16 | this access | PartialImplementationB.cs:4:12:4:18 | Partial | -| PartialImplementationB.cs:5:32:5:34 | ... = ... | PartialImplementationA.cs:3:12:3:18 | Partial | -| PartialImplementationB.cs:5:32:5:34 | ... = ... | PartialImplementationB.cs:4:12:4:18 | Partial | -| PartialImplementationB.cs:5:34:5:34 | 0 | PartialImplementationA.cs:3:12:3:18 | Partial | -| PartialImplementationB.cs:5:34:5:34 | 0 | PartialImplementationB.cs:4:12:4:18 | Partial | +| PartialImplementationB.cs:5:16:5:16 | access to property P | PartialImplementationA.cs:1:15:1:21 | | +| PartialImplementationB.cs:5:16:5:16 | this access | PartialImplementationA.cs:1:15:1:21 | | +| PartialImplementationB.cs:5:32:5:34 | ... = ... | PartialImplementationA.cs:1:15:1:21 | | +| PartialImplementationB.cs:5:34:5:34 | 0 | PartialImplementationA.cs:1:15:1:21 | | | Patterns.cs:3:7:3:14 | call to constructor Object | Patterns.cs:3:7:3:14 | Patterns | +| Patterns.cs:3:7:3:14 | call to method | Patterns.cs:3:7:3:14 | Patterns | | Patterns.cs:3:7:3:14 | enter Patterns | Patterns.cs:3:7:3:14 | Patterns | | Patterns.cs:3:7:3:14 | exit Patterns | Patterns.cs:3:7:3:14 | Patterns | | Patterns.cs:3:7:3:14 | exit Patterns (normal) | Patterns.cs:3:7:3:14 | Patterns | +| Patterns.cs:3:7:3:14 | this access | Patterns.cs:3:7:3:14 | Patterns | | Patterns.cs:3:7:3:14 | {...} | Patterns.cs:3:7:3:14 | Patterns | | Patterns.cs:5:10:5:11 | enter M1 | Patterns.cs:5:10:5:11 | M1 | | Patterns.cs:5:10:5:11 | exit M1 | Patterns.cs:5:10:5:11 | M1 | @@ -2966,9 +3030,11 @@ nodeEnclosing | Patterns.cs:97:13:97:39 | ...; | Patterns.cs:93:17:93:19 | M10 | | Patterns.cs:97:31:97:37 | "not C" | Patterns.cs:93:17:93:19 | M10 | | PostDominance.cs:3:7:3:19 | call to constructor Object | PostDominance.cs:3:7:3:19 | PostDominance | +| PostDominance.cs:3:7:3:19 | call to method | PostDominance.cs:3:7:3:19 | PostDominance | | PostDominance.cs:3:7:3:19 | enter PostDominance | PostDominance.cs:3:7:3:19 | PostDominance | | PostDominance.cs:3:7:3:19 | exit PostDominance | PostDominance.cs:3:7:3:19 | PostDominance | | PostDominance.cs:3:7:3:19 | exit PostDominance (normal) | PostDominance.cs:3:7:3:19 | PostDominance | +| PostDominance.cs:3:7:3:19 | this access | PostDominance.cs:3:7:3:19 | PostDominance | | PostDominance.cs:3:7:3:19 | {...} | PostDominance.cs:3:7:3:19 | PostDominance | | PostDominance.cs:5:10:5:11 | enter M1 | PostDominance.cs:5:10:5:11 | M1 | | PostDominance.cs:5:10:5:11 | exit M1 | PostDominance.cs:5:10:5:11 | M1 | @@ -3007,9 +3073,11 @@ nodeEnclosing | PostDominance.cs:21:9:21:29 | ...; | PostDominance.cs:17:10:17:11 | M3 | | PostDominance.cs:21:27:21:27 | access to parameter s | PostDominance.cs:17:10:17:11 | M3 | | Qualifiers.cs:1:7:1:16 | call to constructor Object | Qualifiers.cs:1:7:1:16 | Qualifiers | +| Qualifiers.cs:1:7:1:16 | call to method | Qualifiers.cs:1:7:1:16 | Qualifiers | | Qualifiers.cs:1:7:1:16 | enter Qualifiers | Qualifiers.cs:1:7:1:16 | Qualifiers | | Qualifiers.cs:1:7:1:16 | exit Qualifiers | Qualifiers.cs:1:7:1:16 | Qualifiers | | Qualifiers.cs:1:7:1:16 | exit Qualifiers (normal) | Qualifiers.cs:1:7:1:16 | Qualifiers | +| Qualifiers.cs:1:7:1:16 | this access | Qualifiers.cs:1:7:1:16 | Qualifiers | | Qualifiers.cs:1:7:1:16 | {...} | Qualifiers.cs:1:7:1:16 | Qualifiers | | Qualifiers.cs:7:16:7:21 | enter Method | Qualifiers.cs:7:16:7:21 | Method | | Qualifiers.cs:7:16:7:21 | exit Method | Qualifiers.cs:7:16:7:21 | Method | @@ -3078,9 +3146,11 @@ nodeEnclosing | Qualifiers.cs:30:13:30:37 | call to method StaticMethod | Qualifiers.cs:10:10:10:10 | M | | Qualifiers.cs:30:13:30:46 | call to method Method | Qualifiers.cs:10:10:10:10 | M | | Switch.cs:3:7:3:12 | call to constructor Object | Switch.cs:3:7:3:12 | Switch | +| Switch.cs:3:7:3:12 | call to method | Switch.cs:3:7:3:12 | Switch | | Switch.cs:3:7:3:12 | enter Switch | Switch.cs:3:7:3:12 | Switch | | Switch.cs:3:7:3:12 | exit Switch | Switch.cs:3:7:3:12 | Switch | | Switch.cs:3:7:3:12 | exit Switch (normal) | Switch.cs:3:7:3:12 | Switch | +| Switch.cs:3:7:3:12 | this access | Switch.cs:3:7:3:12 | Switch | | Switch.cs:3:7:3:12 | {...} | Switch.cs:3:7:3:12 | Switch | | Switch.cs:5:10:5:11 | enter M1 | Switch.cs:5:10:5:11 | M1 | | Switch.cs:5:10:5:11 | exit M1 | Switch.cs:5:10:5:11 | M1 | @@ -3385,9 +3455,11 @@ nodeEnclosing | Switch.cs:175:42:175:46 | "def" | Switch.cs:163:10:163:12 | M16 | | Switch.cs:176:17:176:22 | break; | Switch.cs:163:10:163:12 | M16 | | TypeAccesses.cs:1:7:1:18 | call to constructor Object | TypeAccesses.cs:1:7:1:18 | TypeAccesses | +| TypeAccesses.cs:1:7:1:18 | call to method | TypeAccesses.cs:1:7:1:18 | TypeAccesses | | TypeAccesses.cs:1:7:1:18 | enter TypeAccesses | TypeAccesses.cs:1:7:1:18 | TypeAccesses | | TypeAccesses.cs:1:7:1:18 | exit TypeAccesses | TypeAccesses.cs:1:7:1:18 | TypeAccesses | | TypeAccesses.cs:1:7:1:18 | exit TypeAccesses (normal) | TypeAccesses.cs:1:7:1:18 | TypeAccesses | +| TypeAccesses.cs:1:7:1:18 | this access | TypeAccesses.cs:1:7:1:18 | TypeAccesses | | TypeAccesses.cs:1:7:1:18 | {...} | TypeAccesses.cs:1:7:1:18 | TypeAccesses | | TypeAccesses.cs:3:10:3:10 | enter M | TypeAccesses.cs:3:10:3:10 | M | | TypeAccesses.cs:3:10:3:10 | exit M | TypeAccesses.cs:3:10:3:10 | M | @@ -3411,9 +3483,11 @@ nodeEnclosing | TypeAccesses.cs:8:13:8:27 | Type t = ... | TypeAccesses.cs:3:10:3:10 | M | | TypeAccesses.cs:8:17:8:27 | typeof(...) | TypeAccesses.cs:3:10:3:10 | M | | VarDecls.cs:3:7:3:14 | call to constructor Object | VarDecls.cs:3:7:3:14 | VarDecls | +| VarDecls.cs:3:7:3:14 | call to method | VarDecls.cs:3:7:3:14 | VarDecls | | VarDecls.cs:3:7:3:14 | enter VarDecls | VarDecls.cs:3:7:3:14 | VarDecls | | VarDecls.cs:3:7:3:14 | exit VarDecls | VarDecls.cs:3:7:3:14 | VarDecls | | VarDecls.cs:3:7:3:14 | exit VarDecls (normal) | VarDecls.cs:3:7:3:14 | VarDecls | +| VarDecls.cs:3:7:3:14 | this access | VarDecls.cs:3:7:3:14 | VarDecls | | VarDecls.cs:3:7:3:14 | {...} | VarDecls.cs:3:7:3:14 | VarDecls | | VarDecls.cs:5:18:5:19 | enter M1 | VarDecls.cs:5:18:5:19 | M1 | | VarDecls.cs:5:18:5:19 | exit M1 | VarDecls.cs:5:18:5:19 | M1 | @@ -3465,9 +3539,11 @@ nodeEnclosing | VarDecls.cs:25:24:25:24 | access to local variable x | VarDecls.cs:19:7:19:8 | M3 | | VarDecls.cs:25:28:25:28 | access to local variable y | VarDecls.cs:19:7:19:8 | M3 | | VarDecls.cs:28:11:28:11 | call to constructor Object | VarDecls.cs:28:11:28:11 | C | +| VarDecls.cs:28:11:28:11 | call to method | VarDecls.cs:28:11:28:11 | C | | VarDecls.cs:28:11:28:11 | enter C | VarDecls.cs:28:11:28:11 | C | | VarDecls.cs:28:11:28:11 | exit C | VarDecls.cs:28:11:28:11 | C | | VarDecls.cs:28:11:28:11 | exit C (normal) | VarDecls.cs:28:11:28:11 | C | +| VarDecls.cs:28:11:28:11 | this access | VarDecls.cs:28:11:28:11 | C | | VarDecls.cs:28:11:28:11 | {...} | VarDecls.cs:28:11:28:11 | C | | VarDecls.cs:28:41:28:47 | enter Dispose | VarDecls.cs:28:41:28:47 | Dispose | | VarDecls.cs:28:41:28:47 | exit Dispose | VarDecls.cs:28:41:28:47 | Dispose | @@ -3753,9 +3829,11 @@ nodeEnclosing | cflow.cs:127:68:127:81 | ...; | cflow.cs:127:62:127:64 | set_Prop | | cflow.cs:127:76:127:80 | access to parameter value | cflow.cs:127:62:127:64 | set_Prop | | cflow.cs:129:5:129:15 | call to constructor Object | cflow.cs:129:5:129:15 | ControlFlow | +| cflow.cs:129:5:129:15 | call to method | cflow.cs:129:5:129:15 | ControlFlow | | cflow.cs:129:5:129:15 | enter ControlFlow | cflow.cs:129:5:129:15 | ControlFlow | | cflow.cs:129:5:129:15 | exit ControlFlow | cflow.cs:129:5:129:15 | ControlFlow | | cflow.cs:129:5:129:15 | exit ControlFlow (normal) | cflow.cs:129:5:129:15 | ControlFlow | +| cflow.cs:129:5:129:15 | this access | cflow.cs:129:5:129:15 | ControlFlow | | cflow.cs:130:5:132:5 | {...} | cflow.cs:129:5:129:15 | ControlFlow | | cflow.cs:131:9:131:13 | this access | cflow.cs:129:5:129:15 | ControlFlow | | cflow.cs:131:9:131:17 | ... = ... | cflow.cs:129:5:129:15 | ControlFlow | @@ -4121,9 +4199,11 @@ nodeEnclosing | cflow.cs:275:13:275:41 | call to method WriteLine | cflow.cs:261:49:261:53 | Yield | | cflow.cs:275:13:275:42 | ...; | cflow.cs:261:49:261:53 | Yield | | cflow.cs:275:31:275:40 | "not dead" | cflow.cs:261:49:261:53 | Yield | +| cflow.cs:282:5:282:18 | call to method | cflow.cs:282:5:282:18 | ControlFlowSub | | cflow.cs:282:5:282:18 | enter ControlFlowSub | cflow.cs:282:5:282:18 | ControlFlowSub | | cflow.cs:282:5:282:18 | exit ControlFlowSub | cflow.cs:282:5:282:18 | ControlFlowSub | | cflow.cs:282:5:282:18 | exit ControlFlowSub (normal) | cflow.cs:282:5:282:18 | ControlFlowSub | +| cflow.cs:282:5:282:18 | this access | cflow.cs:282:5:282:18 | ControlFlowSub | | cflow.cs:282:24:282:27 | call to constructor ControlFlow | cflow.cs:282:5:282:18 | ControlFlowSub | | cflow.cs:282:31:282:33 | {...} | cflow.cs:282:5:282:18 | ControlFlowSub | | cflow.cs:284:5:284:18 | enter ControlFlowSub | cflow.cs:284:5:284:18 | ControlFlowSub | @@ -4139,9 +4219,11 @@ nodeEnclosing | cflow.cs:286:34:286:45 | call to method ToString | cflow.cs:286:5:286:18 | ControlFlowSub | | cflow.cs:286:48:286:50 | {...} | cflow.cs:286:5:286:18 | ControlFlowSub | | cflow.cs:289:7:289:18 | call to constructor Object | cflow.cs:289:7:289:18 | DelegateCall | +| cflow.cs:289:7:289:18 | call to method | cflow.cs:289:7:289:18 | DelegateCall | | cflow.cs:289:7:289:18 | enter DelegateCall | cflow.cs:289:7:289:18 | DelegateCall | | cflow.cs:289:7:289:18 | exit DelegateCall | cflow.cs:289:7:289:18 | DelegateCall | | cflow.cs:289:7:289:18 | exit DelegateCall (normal) | cflow.cs:289:7:289:18 | DelegateCall | +| cflow.cs:289:7:289:18 | this access | cflow.cs:289:7:289:18 | DelegateCall | | cflow.cs:289:7:289:18 | {...} | cflow.cs:289:7:289:18 | DelegateCall | | cflow.cs:291:12:291:12 | enter M | cflow.cs:291:12:291:12 | M | | cflow.cs:291:12:291:12 | exit M | cflow.cs:291:12:291:12 | M | @@ -4150,9 +4232,11 @@ nodeEnclosing | cflow.cs:291:38:291:41 | delegate call | cflow.cs:291:12:291:12 | M | | cflow.cs:291:40:291:40 | 0 | cflow.cs:291:12:291:12 | M | | cflow.cs:296:5:296:25 | call to constructor Object | cflow.cs:296:5:296:25 | NegationInConstructor | +| cflow.cs:296:5:296:25 | call to method | cflow.cs:296:5:296:25 | NegationInConstructor | | cflow.cs:296:5:296:25 | enter NegationInConstructor | cflow.cs:296:5:296:25 | NegationInConstructor | | cflow.cs:296:5:296:25 | exit NegationInConstructor | cflow.cs:296:5:296:25 | NegationInConstructor | | cflow.cs:296:5:296:25 | exit NegationInConstructor (normal) | cflow.cs:296:5:296:25 | NegationInConstructor | +| cflow.cs:296:5:296:25 | this access | cflow.cs:296:5:296:25 | NegationInConstructor | | cflow.cs:296:52:296:54 | {...} | cflow.cs:296:5:296:25 | NegationInConstructor | | cflow.cs:298:10:298:10 | enter M | cflow.cs:298:10:298:10 | M | | cflow.cs:298:10:298:10 | exit M | cflow.cs:298:10:298:10 | M | @@ -4172,9 +4256,11 @@ nodeEnclosing | cflow.cs:300:61:300:64 | null | cflow.cs:298:10:298:10 | M | | cflow.cs:300:70:300:71 | "" | cflow.cs:298:10:298:10 | M | | cflow.cs:304:7:304:18 | call to constructor Object | cflow.cs:304:7:304:18 | LambdaGetter | +| cflow.cs:304:7:304:18 | call to method | cflow.cs:304:7:304:18 | LambdaGetter | | cflow.cs:304:7:304:18 | enter LambdaGetter | cflow.cs:304:7:304:18 | LambdaGetter | | cflow.cs:304:7:304:18 | exit LambdaGetter | cflow.cs:304:7:304:18 | LambdaGetter | | cflow.cs:304:7:304:18 | exit LambdaGetter (normal) | cflow.cs:304:7:304:18 | LambdaGetter | +| cflow.cs:304:7:304:18 | this access | cflow.cs:304:7:304:18 | LambdaGetter | | cflow.cs:304:7:304:18 | {...} | cflow.cs:304:7:304:18 | LambdaGetter | | cflow.cs:306:60:310:5 | (...) => ... | cflow.cs:306:60:310:5 | get__getter | | cflow.cs:306:60:310:5 | enter (...) => ... | cflow.cs:306:60:310:5 | (...) => ... | @@ -4731,11 +4817,14 @@ blockEnclosing | Foreach.cs:36:10:36:11 | exit M6 (normal) | Foreach.cs:36:10:36:11 | M6 | | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | Foreach.cs:36:10:36:11 | M6 | | Foreach.cs:38:26:38:26 | String x | Foreach.cs:36:10:36:11 | M6 | +| Initializers.cs:3:7:3:18 | enter | Initializers.cs:3:7:3:18 | | | Initializers.cs:3:7:3:18 | enter Initializers | Initializers.cs:3:7:3:18 | Initializers | | Initializers.cs:8:5:8:16 | enter Initializers | Initializers.cs:8:5:8:16 | Initializers | | Initializers.cs:10:5:10:16 | enter Initializers | Initializers.cs:10:5:10:16 | Initializers | | Initializers.cs:12:10:12:10 | enter M | Initializers.cs:12:10:12:10 | M | +| Initializers.cs:20:11:20:23 | enter | Initializers.cs:20:11:20:23 | | | Initializers.cs:20:11:20:23 | enter NoConstructor | Initializers.cs:20:11:20:23 | NoConstructor | +| Initializers.cs:26:11:26:13 | enter | Initializers.cs:26:11:26:13 | | | Initializers.cs:31:9:31:11 | enter Sub | Initializers.cs:31:9:31:11 | Sub | | Initializers.cs:33:9:33:11 | enter Sub | Initializers.cs:33:9:33:11 | Sub | | Initializers.cs:35:9:35:11 | enter Sub | Initializers.cs:35:9:35:11 | Sub | @@ -4800,9 +4889,9 @@ blockEnclosing | LoopUnrolling.cs:94:10:94:12 | exit M11 (normal) | LoopUnrolling.cs:94:10:94:12 | M11 | | LoopUnrolling.cs:97:9:100:9 | foreach (... ... in ...) ... | LoopUnrolling.cs:94:10:94:12 | M11 | | LoopUnrolling.cs:97:22:97:22 | String x | LoopUnrolling.cs:94:10:94:12 | M11 | -| MultiImplementationA.cs:4:7:4:8 | call to constructor Object | MultiImplementationA.cs:4:7:4:8 | C1 | | MultiImplementationA.cs:4:7:4:8 | enter C1 | MultiImplementationA.cs:4:7:4:8 | C1 | | MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | MultiImplementationA.cs:4:7:4:8 | C1 | +| MultiImplementationA.cs:4:7:4:8 | this access | MultiImplementationA.cs:4:7:4:8 | C1 | | MultiImplementationA.cs:6:22:6:31 | enter get_P1 | MultiImplementationA.cs:6:22:6:31 | get_P1 | | MultiImplementationA.cs:6:22:6:31 | exit get_P1 | MultiImplementationA.cs:6:22:6:31 | get_P1 | | MultiImplementationA.cs:6:28:6:31 | null | MultiImplementationA.cs:6:22:6:31 | get_P1 | @@ -4815,6 +4904,9 @@ blockEnclosing | MultiImplementationA.cs:8:16:8:16 | enter M | MultiImplementationA.cs:8:16:8:16 | M | | MultiImplementationA.cs:8:16:8:16 | exit M | MultiImplementationA.cs:8:16:8:16 | M | | MultiImplementationA.cs:8:29:8:32 | null | MultiImplementationA.cs:8:16:8:16 | M | +| MultiImplementationA.cs:11:7:11:8 | enter | MultiImplementationA.cs:11:7:11:8 | | +| MultiImplementationA.cs:11:7:11:8 | exit (normal) | MultiImplementationA.cs:11:7:11:8 | | +| MultiImplementationA.cs:13:16:13:16 | this access | MultiImplementationA.cs:11:7:11:8 | | | MultiImplementationA.cs:14:31:14:31 | access to parameter i | MultiImplementationA.cs:14:31:14:31 | get_Item | | MultiImplementationA.cs:14:31:14:31 | enter get_Item | MultiImplementationA.cs:14:31:14:31 | get_Item | | MultiImplementationA.cs:14:31:14:31 | exit get_Item | MultiImplementationA.cs:14:31:14:31 | get_Item | @@ -4828,9 +4920,9 @@ blockEnclosing | MultiImplementationA.cs:16:17:16:18 | exit M1 (normal) | MultiImplementationA.cs:16:17:16:18 | M1 | | MultiImplementationA.cs:17:5:19:5 | {...} | MultiImplementationA.cs:16:17:16:18 | M1 | | MultiImplementationA.cs:18:9:18:22 | enter M2 | MultiImplementationA.cs:18:9:18:22 | M2 | -| MultiImplementationA.cs:20:12:20:13 | call to constructor Object | MultiImplementationA.cs:20:12:20:13 | C2 | | MultiImplementationA.cs:20:12:20:13 | enter C2 | MultiImplementationA.cs:20:12:20:13 | C2 | | MultiImplementationA.cs:20:12:20:13 | exit C2 | MultiImplementationA.cs:20:12:20:13 | C2 | +| MultiImplementationA.cs:20:12:20:13 | this access | MultiImplementationA.cs:20:12:20:13 | C2 | | MultiImplementationA.cs:21:12:21:13 | enter C2 | MultiImplementationA.cs:21:12:21:13 | C2 | | MultiImplementationA.cs:21:12:21:13 | exit C2 (normal) | MultiImplementationA.cs:21:12:21:13 | C2 | | MultiImplementationA.cs:21:24:21:24 | 0 | MultiImplementationA.cs:21:12:21:13 | C2 | @@ -4840,33 +4932,34 @@ blockEnclosing | MultiImplementationA.cs:23:28:23:35 | enter implicit conversion | MultiImplementationA.cs:23:28:23:35 | implicit conversion | | MultiImplementationA.cs:23:28:23:35 | exit implicit conversion | MultiImplementationA.cs:23:28:23:35 | implicit conversion | | MultiImplementationA.cs:23:50:23:53 | null | MultiImplementationA.cs:23:28:23:35 | implicit conversion | -| MultiImplementationA.cs:28:7:28:8 | call to constructor Object | MultiImplementationA.cs:28:7:28:8 | C3 | | MultiImplementationA.cs:28:7:28:8 | enter C3 | MultiImplementationA.cs:28:7:28:8 | C3 | | MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | MultiImplementationA.cs:28:7:28:8 | C3 | +| MultiImplementationA.cs:28:7:28:8 | this access | MultiImplementationA.cs:28:7:28:8 | C3 | | MultiImplementationA.cs:30:21:30:23 | enter get_P3 | MultiImplementationA.cs:30:21:30:23 | get_P3 | -| MultiImplementationA.cs:34:15:34:16 | call to constructor Object | MultiImplementationA.cs:34:15:34:16 | C4 | | MultiImplementationA.cs:34:15:34:16 | enter C4 | MultiImplementationA.cs:34:15:34:16 | C4 | | MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | MultiImplementationA.cs:34:15:34:16 | C4 | +| MultiImplementationA.cs:34:15:34:16 | this access | MultiImplementationA.cs:34:15:34:16 | C4 | | MultiImplementationA.cs:36:9:36:10 | enter M1 | MultiImplementationA.cs:36:9:36:10 | M1 | | MultiImplementationA.cs:36:9:36:10 | exit M1 | MultiImplementationA.cs:36:9:36:10 | M1 | | MultiImplementationA.cs:36:14:36:28 | {...} | MultiImplementationA.cs:36:9:36:10 | M1 | | MultiImplementationA.cs:37:9:37:10 | enter M2 | MultiImplementationA.cs:37:9:37:10 | M2 | -| MultiImplementationB.cs:1:7:1:8 | call to constructor Object | MultiImplementationA.cs:4:7:4:8 | C1 | +| MultiImplementationB.cs:1:7:1:8 | this access | MultiImplementationA.cs:4:7:4:8 | C1 | | MultiImplementationB.cs:3:22:3:22 | 0 | MultiImplementationA.cs:6:22:6:31 | get_P1 | | MultiImplementationB.cs:4:25:4:37 | {...} | MultiImplementationA.cs:7:21:7:23 | get_P2 | | MultiImplementationB.cs:4:43:4:45 | {...} | MultiImplementationA.cs:7:41:7:43 | set_P2 | | MultiImplementationB.cs:5:23:5:23 | 2 | MultiImplementationA.cs:8:16:8:16 | M | +| MultiImplementationB.cs:11:16:11:16 | this access | MultiImplementationA.cs:11:7:11:8 | | | MultiImplementationB.cs:12:37:12:40 | null | MultiImplementationA.cs:14:31:14:31 | get_Item | | MultiImplementationB.cs:13:40:13:54 | {...} | MultiImplementationA.cs:15:36:15:38 | get_Item | | MultiImplementationB.cs:13:60:13:62 | {...} | MultiImplementationA.cs:15:54:15:56 | set_Item | | MultiImplementationB.cs:15:5:17:5 | {...} | MultiImplementationA.cs:16:17:16:18 | M1 | | MultiImplementationB.cs:16:9:16:31 | enter M2 | MultiImplementationB.cs:16:9:16:31 | M2 | -| MultiImplementationB.cs:18:12:18:13 | call to constructor Object | MultiImplementationA.cs:20:12:20:13 | C2 | +| MultiImplementationB.cs:18:12:18:13 | this access | MultiImplementationA.cs:20:12:20:13 | C2 | | MultiImplementationB.cs:19:24:19:24 | 1 | MultiImplementationA.cs:21:12:21:13 | C2 | | MultiImplementationB.cs:20:11:20:25 | {...} | MultiImplementationA.cs:22:6:22:7 | ~C2 | | MultiImplementationB.cs:21:56:21:59 | null | MultiImplementationA.cs:23:28:23:35 | implicit conversion | -| MultiImplementationB.cs:25:7:25:8 | call to constructor Object | MultiImplementationA.cs:28:7:28:8 | C3 | -| MultiImplementationB.cs:30:15:30:16 | call to constructor Object | MultiImplementationA.cs:34:15:34:16 | C4 | +| MultiImplementationB.cs:25:7:25:8 | this access | MultiImplementationA.cs:28:7:28:8 | C3 | +| MultiImplementationB.cs:30:15:30:16 | this access | MultiImplementationA.cs:34:15:34:16 | C4 | | MultiImplementationB.cs:32:17:32:17 | 0 | MultiImplementationA.cs:36:9:36:10 | M1 | | NullCoalescing.cs:1:7:1:20 | enter NullCoalescing | NullCoalescing.cs:1:7:1:20 | NullCoalescing | | NullCoalescing.cs:3:9:3:10 | enter M1 | NullCoalescing.cs:3:9:3:10 | M1 | @@ -4906,6 +4999,7 @@ blockEnclosing | NullCoalescing.cs:15:31:15:31 | 0 | NullCoalescing.cs:13:10:13:11 | M6 | | NullCoalescing.cs:16:17:16:25 | ... ?? ... | NullCoalescing.cs:13:10:13:11 | M6 | | NullCoalescing.cs:17:13:17:24 | ... ?? ... | NullCoalescing.cs:13:10:13:11 | M6 | +| PartialImplementationA.cs:1:15:1:21 | enter | PartialImplementationA.cs:1:15:1:21 | | | PartialImplementationA.cs:3:12:3:18 | enter Partial | PartialImplementationA.cs:3:12:3:18 | Partial | | PartialImplementationB.cs:4:12:4:18 | enter Partial | PartialImplementationB.cs:4:12:4:18 | Partial | | Patterns.cs:3:7:3:14 | enter Patterns | Patterns.cs:3:7:3:14 | Patterns | diff --git a/csharp/ql/test/library-tests/controlflow/graph/EntryElement.expected b/csharp/ql/test/library-tests/controlflow/graph/EntryElement.expected index ea7ade106ea..da8fe4664f5 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/EntryElement.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/EntryElement.expected @@ -1,4 +1,6 @@ | AccessorCalls.cs:1:7:1:19 | call to constructor Object | AccessorCalls.cs:1:7:1:19 | call to constructor Object | +| AccessorCalls.cs:1:7:1:19 | call to method | AccessorCalls.cs:1:7:1:19 | this access | +| AccessorCalls.cs:1:7:1:19 | this access | AccessorCalls.cs:1:7:1:19 | this access | | AccessorCalls.cs:1:7:1:19 | {...} | AccessorCalls.cs:1:7:1:19 | {...} | | AccessorCalls.cs:5:30:5:30 | access to parameter i | AccessorCalls.cs:5:30:5:30 | access to parameter i | | AccessorCalls.cs:5:37:5:39 | {...} | AccessorCalls.cs:5:37:5:39 | {...} | @@ -290,6 +292,8 @@ | AccessorCalls.cs:73:78:73:81 | dynamic access to element | AccessorCalls.cs:73:78:73:78 | access to local variable d | | AccessorCalls.cs:73:80:73:80 | 1 | AccessorCalls.cs:73:80:73:80 | 1 | | ArrayCreation.cs:1:7:1:19 | call to constructor Object | ArrayCreation.cs:1:7:1:19 | call to constructor Object | +| ArrayCreation.cs:1:7:1:19 | call to method | ArrayCreation.cs:1:7:1:19 | this access | +| ArrayCreation.cs:1:7:1:19 | this access | ArrayCreation.cs:1:7:1:19 | this access | | ArrayCreation.cs:1:7:1:19 | {...} | ArrayCreation.cs:1:7:1:19 | {...} | | ArrayCreation.cs:3:19:3:28 | array creation of type Int32[] | ArrayCreation.cs:3:27:3:27 | 0 | | ArrayCreation.cs:3:27:3:27 | 0 | ArrayCreation.cs:3:27:3:27 | 0 | @@ -312,6 +316,8 @@ | ArrayCreation.cs:9:45:9:45 | 2 | ArrayCreation.cs:9:45:9:45 | 2 | | ArrayCreation.cs:9:48:9:48 | 3 | ArrayCreation.cs:9:48:9:48 | 3 | | Assert.cs:5:7:5:17 | call to constructor Object | Assert.cs:5:7:5:17 | call to constructor Object | +| Assert.cs:5:7:5:17 | call to method | Assert.cs:5:7:5:17 | this access | +| Assert.cs:5:7:5:17 | this access | Assert.cs:5:7:5:17 | this access | | Assert.cs:5:7:5:17 | {...} | Assert.cs:5:7:5:17 | {...} | | Assert.cs:8:5:12:5 | {...} | Assert.cs:8:5:12:5 | {...} | | Assert.cs:9:9:9:33 | ... ...; | Assert.cs:9:9:9:33 | ... ...; | @@ -675,6 +681,8 @@ | Assert.cs:140:33:140:34 | access to parameter b3 | Assert.cs:140:33:140:34 | access to parameter b3 | | Assert.cs:141:9:141:15 | return ...; | Assert.cs:141:9:141:15 | return ...; | | Assignments.cs:1:7:1:17 | call to constructor Object | Assignments.cs:1:7:1:17 | call to constructor Object | +| Assignments.cs:1:7:1:17 | call to method | Assignments.cs:1:7:1:17 | this access | +| Assignments.cs:1:7:1:17 | this access | Assignments.cs:1:7:1:17 | this access | | Assignments.cs:1:7:1:17 | {...} | Assignments.cs:1:7:1:17 | {...} | | Assignments.cs:4:5:15:5 | {...} | Assignments.cs:4:5:15:5 | {...} | | Assignments.cs:5:9:5:18 | ... ...; | Assignments.cs:5:9:5:18 | ... ...; | @@ -715,6 +723,8 @@ | Assignments.cs:19:9:19:17 | return ...; | Assignments.cs:19:16:19:16 | access to parameter x | | Assignments.cs:19:16:19:16 | access to parameter x | Assignments.cs:19:16:19:16 | access to parameter x | | BreakInTry.cs:1:7:1:16 | call to constructor Object | BreakInTry.cs:1:7:1:16 | call to constructor Object | +| BreakInTry.cs:1:7:1:16 | call to method | BreakInTry.cs:1:7:1:16 | this access | +| BreakInTry.cs:1:7:1:16 | this access | BreakInTry.cs:1:7:1:16 | this access | | BreakInTry.cs:1:7:1:16 | {...} | BreakInTry.cs:1:7:1:16 | {...} | | BreakInTry.cs:4:5:18:5 | {...} | BreakInTry.cs:4:5:18:5 | {...} | | BreakInTry.cs:5:9:17:9 | try {...} ... | BreakInTry.cs:5:9:17:9 | try {...} ... | @@ -791,6 +801,8 @@ | BreakInTry.cs:67:28:67:31 | null | BreakInTry.cs:67:28:67:31 | null | | BreakInTry.cs:68:21:68:26 | break; | BreakInTry.cs:68:21:68:26 | break; | | CompileTimeOperators.cs:3:7:3:26 | call to constructor Object | CompileTimeOperators.cs:3:7:3:26 | call to constructor Object | +| CompileTimeOperators.cs:3:7:3:26 | call to method | CompileTimeOperators.cs:3:7:3:26 | this access | +| CompileTimeOperators.cs:3:7:3:26 | this access | CompileTimeOperators.cs:3:7:3:26 | this access | | CompileTimeOperators.cs:3:7:3:26 | {...} | CompileTimeOperators.cs:3:7:3:26 | {...} | | CompileTimeOperators.cs:6:5:8:5 | {...} | CompileTimeOperators.cs:6:5:8:5 | {...} | | CompileTimeOperators.cs:7:9:7:28 | return ...; | CompileTimeOperators.cs:7:16:7:27 | default(...) | @@ -806,6 +818,8 @@ | CompileTimeOperators.cs:22:16:22:24 | nameof(...) | CompileTimeOperators.cs:22:16:22:24 | nameof(...) | | CompileTimeOperators.cs:22:23:22:23 | access to parameter i | CompileTimeOperators.cs:22:23:22:23 | access to parameter i | | CompileTimeOperators.cs:26:7:26:22 | call to constructor Object | CompileTimeOperators.cs:26:7:26:22 | call to constructor Object | +| CompileTimeOperators.cs:26:7:26:22 | call to method | CompileTimeOperators.cs:26:7:26:22 | this access | +| CompileTimeOperators.cs:26:7:26:22 | this access | CompileTimeOperators.cs:26:7:26:22 | this access | | CompileTimeOperators.cs:26:7:26:22 | {...} | CompileTimeOperators.cs:26:7:26:22 | {...} | | CompileTimeOperators.cs:29:5:41:5 | {...} | CompileTimeOperators.cs:29:5:41:5 | {...} | | CompileTimeOperators.cs:30:9:38:9 | try {...} ... | CompileTimeOperators.cs:30:9:38:9 | try {...} ... | @@ -826,6 +840,8 @@ | CompileTimeOperators.cs:40:14:40:38 | ...; | CompileTimeOperators.cs:40:14:40:38 | ...; | | CompileTimeOperators.cs:40:32:40:36 | "End" | CompileTimeOperators.cs:40:32:40:36 | "End" | | ConditionalAccess.cs:1:7:1:23 | call to constructor Object | ConditionalAccess.cs:1:7:1:23 | call to constructor Object | +| ConditionalAccess.cs:1:7:1:23 | call to method | ConditionalAccess.cs:1:7:1:23 | this access | +| ConditionalAccess.cs:1:7:1:23 | this access | ConditionalAccess.cs:1:7:1:23 | this access | | ConditionalAccess.cs:1:7:1:23 | {...} | ConditionalAccess.cs:1:7:1:23 | {...} | | ConditionalAccess.cs:3:26:3:26 | access to parameter i | ConditionalAccess.cs:3:26:3:26 | access to parameter i | | ConditionalAccess.cs:3:26:3:38 | call to method ToString | ConditionalAccess.cs:3:26:3:26 | access to parameter i | @@ -886,6 +902,8 @@ | ConditionalAccess.cs:41:75:41:78 | ", " | ConditionalAccess.cs:41:75:41:78 | ", " | | ConditionalAccess.cs:41:82:41:83 | access to parameter s2 | ConditionalAccess.cs:41:82:41:83 | access to parameter s2 | | Conditions.cs:1:7:1:16 | call to constructor Object | Conditions.cs:1:7:1:16 | call to constructor Object | +| Conditions.cs:1:7:1:16 | call to method | Conditions.cs:1:7:1:16 | this access | +| Conditions.cs:1:7:1:16 | this access | Conditions.cs:1:7:1:16 | this access | | Conditions.cs:1:7:1:16 | {...} | Conditions.cs:1:7:1:16 | {...} | | Conditions.cs:4:5:9:5 | {...} | Conditions.cs:4:5:9:5 | {...} | | Conditions.cs:5:9:6:16 | if (...) ... | Conditions.cs:5:9:6:16 | if (...) ... | @@ -1167,6 +1185,8 @@ | Conditions.cs:149:44:149:46 | {...} | Conditions.cs:149:45:149:45 | access to local variable s | | Conditions.cs:149:45:149:45 | access to local variable s | Conditions.cs:149:45:149:45 | access to local variable s | | ExitMethods.cs:6:7:6:17 | call to constructor Object | ExitMethods.cs:6:7:6:17 | call to constructor Object | +| ExitMethods.cs:6:7:6:17 | call to method | ExitMethods.cs:6:7:6:17 | this access | +| ExitMethods.cs:6:7:6:17 | this access | ExitMethods.cs:6:7:6:17 | this access | | ExitMethods.cs:6:7:6:17 | {...} | ExitMethods.cs:6:7:6:17 | {...} | | ExitMethods.cs:9:5:12:5 | {...} | ExitMethods.cs:9:5:12:5 | {...} | | ExitMethods.cs:10:9:10:24 | call to method ErrorMaybe | ExitMethods.cs:10:20:10:23 | true | @@ -1336,6 +1356,8 @@ | Extensions.cs:25:23:25:32 | access to method Parse | Extensions.cs:25:23:25:32 | access to method Parse | | Extensions.cs:25:23:25:32 | delegate creation of type Func | Extensions.cs:25:23:25:32 | access to method Parse | | Finally.cs:3:14:3:20 | call to constructor Object | Finally.cs:3:14:3:20 | call to constructor Object | +| Finally.cs:3:14:3:20 | call to method | Finally.cs:3:14:3:20 | this access | +| Finally.cs:3:14:3:20 | this access | Finally.cs:3:14:3:20 | this access | | Finally.cs:3:14:3:20 | {...} | Finally.cs:3:14:3:20 | {...} | | Finally.cs:8:5:17:5 | {...} | Finally.cs:8:5:17:5 | {...} | | Finally.cs:9:9:16:9 | try {...} ... | Finally.cs:9:9:16:9 | try {...} ... | @@ -1547,10 +1569,16 @@ | Finally.cs:167:17:167:38 | ...; | Finally.cs:167:17:167:38 | ...; | | Finally.cs:167:35:167:36 | "" | Finally.cs:167:35:167:36 | "" | | Finally.cs:172:11:172:20 | call to constructor Exception | Finally.cs:172:11:172:20 | call to constructor Exception | +| Finally.cs:172:11:172:20 | call to method | Finally.cs:172:11:172:20 | this access | +| Finally.cs:172:11:172:20 | this access | Finally.cs:172:11:172:20 | this access | | Finally.cs:172:11:172:20 | {...} | Finally.cs:172:11:172:20 | {...} | | Finally.cs:173:11:173:20 | call to constructor Exception | Finally.cs:173:11:173:20 | call to constructor Exception | +| Finally.cs:173:11:173:20 | call to method | Finally.cs:173:11:173:20 | this access | +| Finally.cs:173:11:173:20 | this access | Finally.cs:173:11:173:20 | this access | | Finally.cs:173:11:173:20 | {...} | Finally.cs:173:11:173:20 | {...} | | Finally.cs:174:11:174:20 | call to constructor Exception | Finally.cs:174:11:174:20 | call to constructor Exception | +| Finally.cs:174:11:174:20 | call to method | Finally.cs:174:11:174:20 | this access | +| Finally.cs:174:11:174:20 | this access | Finally.cs:174:11:174:20 | this access | | Finally.cs:174:11:174:20 | {...} | Finally.cs:174:11:174:20 | {...} | | Finally.cs:177:5:193:5 | {...} | Finally.cs:177:5:193:5 | {...} | | Finally.cs:178:9:192:9 | try {...} ... | Finally.cs:178:9:192:9 | try {...} ... | @@ -1667,6 +1695,8 @@ | Finally.cs:272:13:272:19 | ...; | Finally.cs:272:13:272:19 | ...; | | Finally.cs:272:18:272:18 | 3 | Finally.cs:272:18:272:18 | 3 | | Foreach.cs:4:7:4:13 | call to constructor Object | Foreach.cs:4:7:4:13 | call to constructor Object | +| Foreach.cs:4:7:4:13 | call to method | Foreach.cs:4:7:4:13 | this access | +| Foreach.cs:4:7:4:13 | this access | Foreach.cs:4:7:4:13 | this access | | Foreach.cs:4:7:4:13 | {...} | Foreach.cs:4:7:4:13 | {...} | | Foreach.cs:7:5:10:5 | {...} | Foreach.cs:7:5:10:5 | {...} | | Foreach.cs:8:9:9:13 | foreach (... ... in ...) ... | Foreach.cs:8:29:8:32 | access to parameter args | @@ -1721,8 +1751,12 @@ | Initializers.cs:6:27:6:31 | ... + ... | Initializers.cs:6:27:6:27 | access to field H | | Initializers.cs:6:31:6:31 | 2 | Initializers.cs:6:31:6:31 | 2 | | Initializers.cs:8:5:8:16 | call to constructor Object | Initializers.cs:8:5:8:16 | call to constructor Object | +| Initializers.cs:8:5:8:16 | call to method | Initializers.cs:8:5:8:16 | this access | +| Initializers.cs:8:5:8:16 | this access | Initializers.cs:8:5:8:16 | this access | | Initializers.cs:8:20:8:22 | {...} | Initializers.cs:8:20:8:22 | {...} | | Initializers.cs:10:5:10:16 | call to constructor Object | Initializers.cs:10:5:10:16 | call to constructor Object | +| Initializers.cs:10:5:10:16 | call to method | Initializers.cs:10:5:10:16 | this access | +| Initializers.cs:10:5:10:16 | this access | Initializers.cs:10:5:10:16 | this access | | Initializers.cs:10:28:10:30 | {...} | Initializers.cs:10:28:10:30 | {...} | | Initializers.cs:13:5:16:5 | {...} | Initializers.cs:13:5:16:5 | {...} | | Initializers.cs:14:9:14:54 | ... ...; | Initializers.cs:14:9:14:54 | ... ...; | @@ -1745,6 +1779,8 @@ | Initializers.cs:18:16:18:20 | ... = ... | Initializers.cs:18:20:18:20 | 1 | | Initializers.cs:18:20:18:20 | 1 | Initializers.cs:18:20:18:20 | 1 | | Initializers.cs:20:11:20:23 | call to constructor Object | Initializers.cs:20:11:20:23 | call to constructor Object | +| Initializers.cs:20:11:20:23 | call to method | Initializers.cs:20:11:20:23 | this access | +| Initializers.cs:20:11:20:23 | this access | Initializers.cs:20:11:20:23 | this access | | Initializers.cs:20:11:20:23 | {...} | Initializers.cs:20:11:20:23 | {...} | | Initializers.cs:22:23:22:23 | access to field F | Initializers.cs:22:23:22:23 | this access | | Initializers.cs:22:23:22:23 | this access | Initializers.cs:22:23:22:23 | this access | @@ -1758,6 +1794,8 @@ | Initializers.cs:28:13:28:13 | this access | Initializers.cs:28:13:28:13 | this access | | Initializers.cs:28:13:28:17 | ... = ... | Initializers.cs:28:13:28:13 | this access | | Initializers.cs:28:17:28:17 | 2 | Initializers.cs:28:17:28:17 | 2 | +| Initializers.cs:31:9:31:11 | call to method | Initializers.cs:31:9:31:11 | this access | +| Initializers.cs:31:9:31:11 | this access | Initializers.cs:31:9:31:11 | this access | | Initializers.cs:31:17:31:20 | call to constructor NoConstructor | Initializers.cs:31:17:31:20 | call to constructor NoConstructor | | Initializers.cs:31:24:31:33 | {...} | Initializers.cs:31:24:31:33 | {...} | | Initializers.cs:31:26:31:26 | access to field I | Initializers.cs:31:26:31:26 | this access | @@ -1773,6 +1811,8 @@ | Initializers.cs:33:31:33:36 | ...; | Initializers.cs:33:31:33:36 | ...; | | Initializers.cs:33:35:33:35 | access to parameter i | Initializers.cs:33:35:33:35 | access to parameter i | | Initializers.cs:35:9:35:11 | call to constructor NoConstructor | Initializers.cs:35:9:35:11 | call to constructor NoConstructor | +| Initializers.cs:35:9:35:11 | call to method | Initializers.cs:35:9:35:11 | this access | +| Initializers.cs:35:9:35:11 | this access | Initializers.cs:35:9:35:11 | this access | | Initializers.cs:35:27:35:40 | {...} | Initializers.cs:35:27:35:40 | {...} | | Initializers.cs:35:29:35:29 | access to field I | Initializers.cs:35:29:35:29 | this access | | Initializers.cs:35:29:35:29 | this access | Initializers.cs:35:29:35:29 | this access | @@ -1782,8 +1822,12 @@ | Initializers.cs:35:33:35:37 | ... + ... | Initializers.cs:35:33:35:33 | access to parameter i | | Initializers.cs:35:37:35:37 | access to parameter j | Initializers.cs:35:37:35:37 | access to parameter j | | Initializers.cs:39:7:39:23 | call to constructor Object | Initializers.cs:39:7:39:23 | call to constructor Object | +| Initializers.cs:39:7:39:23 | call to method | Initializers.cs:39:7:39:23 | this access | +| Initializers.cs:39:7:39:23 | this access | Initializers.cs:39:7:39:23 | this access | | Initializers.cs:39:7:39:23 | {...} | Initializers.cs:39:7:39:23 | {...} | | Initializers.cs:41:11:41:18 | call to constructor Object | Initializers.cs:41:11:41:18 | call to constructor Object | +| Initializers.cs:41:11:41:18 | call to method | Initializers.cs:41:11:41:18 | this access | +| Initializers.cs:41:11:41:18 | this access | Initializers.cs:41:11:41:18 | this access | | Initializers.cs:41:11:41:18 | {...} | Initializers.cs:41:11:41:18 | {...} | | Initializers.cs:52:5:66:5 | {...} | Initializers.cs:52:5:66:5 | {...} | | Initializers.cs:54:9:54:96 | ... ...; | Initializers.cs:54:9:54:96 | ... ...; | @@ -1893,6 +1937,8 @@ | Initializers.cs:64:54:64:54 | 0 | Initializers.cs:64:54:64:54 | 0 | | Initializers.cs:64:59:64:61 | "1" | Initializers.cs:64:59:64:61 | "1" | | LoopUnrolling.cs:5:7:5:19 | call to constructor Object | LoopUnrolling.cs:5:7:5:19 | call to constructor Object | +| LoopUnrolling.cs:5:7:5:19 | call to method | LoopUnrolling.cs:5:7:5:19 | this access | +| LoopUnrolling.cs:5:7:5:19 | this access | LoopUnrolling.cs:5:7:5:19 | this access | | LoopUnrolling.cs:5:7:5:19 | {...} | LoopUnrolling.cs:5:7:5:19 | {...} | | LoopUnrolling.cs:8:5:13:5 | {...} | LoopUnrolling.cs:8:5:13:5 | {...} | | LoopUnrolling.cs:9:9:10:19 | if (...) ... | LoopUnrolling.cs:9:9:10:19 | if (...) ... | @@ -2067,6 +2113,8 @@ | LoopUnrolling.cs:99:13:99:33 | ...; | LoopUnrolling.cs:99:13:99:33 | ...; | | LoopUnrolling.cs:99:31:99:31 | access to local variable x | LoopUnrolling.cs:99:31:99:31 | access to local variable x | | MultiImplementationA.cs:4:7:4:8 | call to constructor Object | MultiImplementationA.cs:4:7:4:8 | call to constructor Object | +| MultiImplementationA.cs:4:7:4:8 | call to method | MultiImplementationA.cs:4:7:4:8 | this access | +| MultiImplementationA.cs:4:7:4:8 | this access | MultiImplementationA.cs:4:7:4:8 | this access | | MultiImplementationA.cs:4:7:4:8 | {...} | MultiImplementationA.cs:4:7:4:8 | {...} | | MultiImplementationA.cs:6:22:6:31 | throw ... | MultiImplementationA.cs:6:28:6:31 | null | | MultiImplementationA.cs:6:28:6:31 | null | MultiImplementationA.cs:6:28:6:31 | null | @@ -2092,6 +2140,8 @@ | MultiImplementationA.cs:18:9:18:22 | M2(...) | MultiImplementationA.cs:18:9:18:22 | M2(...) | | MultiImplementationA.cs:18:21:18:21 | 0 | MultiImplementationA.cs:18:21:18:21 | 0 | | MultiImplementationA.cs:20:12:20:13 | call to constructor Object | MultiImplementationA.cs:20:12:20:13 | call to constructor Object | +| MultiImplementationA.cs:20:12:20:13 | call to method | MultiImplementationA.cs:20:12:20:13 | this access | +| MultiImplementationA.cs:20:12:20:13 | this access | MultiImplementationA.cs:20:12:20:13 | this access | | MultiImplementationA.cs:20:22:20:31 | {...} | MultiImplementationA.cs:20:22:20:31 | {...} | | MultiImplementationA.cs:20:24:20:24 | access to field F | MultiImplementationA.cs:20:24:20:24 | this access | | MultiImplementationA.cs:20:24:20:24 | this access | MultiImplementationA.cs:20:24:20:24 | this access | @@ -2108,10 +2158,14 @@ | MultiImplementationA.cs:24:32:24:34 | ... = ... | MultiImplementationA.cs:24:16:24:16 | this access | | MultiImplementationA.cs:24:34:24:34 | 0 | MultiImplementationA.cs:24:34:24:34 | 0 | | MultiImplementationA.cs:28:7:28:8 | call to constructor Object | MultiImplementationA.cs:28:7:28:8 | call to constructor Object | +| MultiImplementationA.cs:28:7:28:8 | call to method | MultiImplementationA.cs:28:7:28:8 | this access | +| MultiImplementationA.cs:28:7:28:8 | this access | MultiImplementationA.cs:28:7:28:8 | this access | | MultiImplementationA.cs:28:7:28:8 | {...} | MultiImplementationA.cs:28:7:28:8 | {...} | | MultiImplementationA.cs:30:28:30:37 | throw ... | MultiImplementationA.cs:30:34:30:37 | null | | MultiImplementationA.cs:30:34:30:37 | null | MultiImplementationA.cs:30:34:30:37 | null | | MultiImplementationA.cs:34:15:34:16 | call to constructor Object | MultiImplementationA.cs:34:15:34:16 | call to constructor Object | +| MultiImplementationA.cs:34:15:34:16 | call to method | MultiImplementationA.cs:34:15:34:16 | this access | +| MultiImplementationA.cs:34:15:34:16 | this access | MultiImplementationA.cs:34:15:34:16 | this access | | MultiImplementationA.cs:34:15:34:16 | {...} | MultiImplementationA.cs:34:15:34:16 | {...} | | MultiImplementationA.cs:36:14:36:28 | {...} | MultiImplementationA.cs:36:14:36:28 | {...} | | MultiImplementationA.cs:36:16:36:26 | throw ...; | MultiImplementationA.cs:36:22:36:25 | null | @@ -2120,6 +2174,8 @@ | MultiImplementationA.cs:37:16:37:26 | throw ...; | MultiImplementationA.cs:37:22:37:25 | null | | MultiImplementationA.cs:37:22:37:25 | null | MultiImplementationA.cs:37:22:37:25 | null | | MultiImplementationB.cs:1:7:1:8 | call to constructor Object | MultiImplementationB.cs:1:7:1:8 | call to constructor Object | +| MultiImplementationB.cs:1:7:1:8 | call to method | MultiImplementationB.cs:1:7:1:8 | this access | +| MultiImplementationB.cs:1:7:1:8 | this access | MultiImplementationB.cs:1:7:1:8 | this access | | MultiImplementationB.cs:1:7:1:8 | {...} | MultiImplementationB.cs:1:7:1:8 | {...} | | MultiImplementationB.cs:3:22:3:22 | 0 | MultiImplementationB.cs:3:22:3:22 | 0 | | MultiImplementationB.cs:4:25:4:37 | {...} | MultiImplementationB.cs:4:25:4:37 | {...} | @@ -2143,6 +2199,8 @@ | MultiImplementationB.cs:16:21:16:30 | throw ... | MultiImplementationB.cs:16:27:16:30 | null | | MultiImplementationB.cs:16:27:16:30 | null | MultiImplementationB.cs:16:27:16:30 | null | | MultiImplementationB.cs:18:12:18:13 | call to constructor Object | MultiImplementationB.cs:18:12:18:13 | call to constructor Object | +| MultiImplementationB.cs:18:12:18:13 | call to method | MultiImplementationB.cs:18:12:18:13 | this access | +| MultiImplementationB.cs:18:12:18:13 | this access | MultiImplementationB.cs:18:12:18:13 | this access | | MultiImplementationB.cs:18:22:18:36 | {...} | MultiImplementationB.cs:18:22:18:36 | {...} | | MultiImplementationB.cs:18:24:18:34 | throw ...; | MultiImplementationB.cs:18:30:18:33 | null | | MultiImplementationB.cs:18:30:18:33 | null | MultiImplementationB.cs:18:30:18:33 | null | @@ -2159,11 +2217,17 @@ | MultiImplementationB.cs:22:32:22:34 | ... = ... | MultiImplementationB.cs:22:16:22:16 | this access | | MultiImplementationB.cs:22:34:22:34 | 1 | MultiImplementationB.cs:22:34:22:34 | 1 | | MultiImplementationB.cs:25:7:25:8 | call to constructor Object | MultiImplementationB.cs:25:7:25:8 | call to constructor Object | +| MultiImplementationB.cs:25:7:25:8 | call to method | MultiImplementationB.cs:25:7:25:8 | this access | +| MultiImplementationB.cs:25:7:25:8 | this access | MultiImplementationB.cs:25:7:25:8 | this access | | MultiImplementationB.cs:25:7:25:8 | {...} | MultiImplementationB.cs:25:7:25:8 | {...} | | MultiImplementationB.cs:30:15:30:16 | call to constructor Object | MultiImplementationB.cs:30:15:30:16 | call to constructor Object | +| MultiImplementationB.cs:30:15:30:16 | call to method | MultiImplementationB.cs:30:15:30:16 | this access | +| MultiImplementationB.cs:30:15:30:16 | this access | MultiImplementationB.cs:30:15:30:16 | this access | | MultiImplementationB.cs:30:15:30:16 | {...} | MultiImplementationB.cs:30:15:30:16 | {...} | | MultiImplementationB.cs:32:17:32:17 | 0 | MultiImplementationB.cs:32:17:32:17 | 0 | | NullCoalescing.cs:1:7:1:20 | call to constructor Object | NullCoalescing.cs:1:7:1:20 | call to constructor Object | +| NullCoalescing.cs:1:7:1:20 | call to method | NullCoalescing.cs:1:7:1:20 | this access | +| NullCoalescing.cs:1:7:1:20 | this access | NullCoalescing.cs:1:7:1:20 | this access | | NullCoalescing.cs:1:7:1:20 | {...} | NullCoalescing.cs:1:7:1:20 | {...} | | NullCoalescing.cs:3:23:3:23 | access to parameter i | NullCoalescing.cs:3:23:3:23 | access to parameter i | | NullCoalescing.cs:3:23:3:28 | ... ?? ... | NullCoalescing.cs:3:23:3:23 | access to parameter i | @@ -2214,18 +2278,24 @@ | NullCoalescing.cs:17:19:17:19 | access to parameter i | NullCoalescing.cs:17:19:17:19 | access to parameter i | | NullCoalescing.cs:17:24:17:24 | 1 | NullCoalescing.cs:17:24:17:24 | 1 | | PartialImplementationA.cs:3:12:3:18 | call to constructor Object | PartialImplementationA.cs:3:12:3:18 | call to constructor Object | +| PartialImplementationA.cs:3:12:3:18 | call to method | PartialImplementationA.cs:3:12:3:18 | this access | +| PartialImplementationA.cs:3:12:3:18 | this access | PartialImplementationA.cs:3:12:3:18 | this access | | PartialImplementationA.cs:3:27:3:29 | {...} | PartialImplementationA.cs:3:27:3:29 | {...} | | PartialImplementationB.cs:3:16:3:16 | access to field F | PartialImplementationB.cs:3:16:3:16 | this access | | PartialImplementationB.cs:3:16:3:16 | this access | PartialImplementationB.cs:3:16:3:16 | this access | | PartialImplementationB.cs:3:16:3:20 | ... = ... | PartialImplementationB.cs:3:16:3:16 | this access | | PartialImplementationB.cs:3:20:3:20 | 0 | PartialImplementationB.cs:3:20:3:20 | 0 | | PartialImplementationB.cs:4:12:4:18 | call to constructor Object | PartialImplementationB.cs:4:12:4:18 | call to constructor Object | +| PartialImplementationB.cs:4:12:4:18 | call to method | PartialImplementationB.cs:4:12:4:18 | this access | +| PartialImplementationB.cs:4:12:4:18 | this access | PartialImplementationB.cs:4:12:4:18 | this access | | PartialImplementationB.cs:4:22:4:24 | {...} | PartialImplementationB.cs:4:22:4:24 | {...} | | PartialImplementationB.cs:5:16:5:16 | access to property P | PartialImplementationB.cs:5:16:5:16 | this access | | PartialImplementationB.cs:5:16:5:16 | this access | PartialImplementationB.cs:5:16:5:16 | this access | | PartialImplementationB.cs:5:32:5:34 | ... = ... | PartialImplementationB.cs:5:16:5:16 | this access | | PartialImplementationB.cs:5:34:5:34 | 0 | PartialImplementationB.cs:5:34:5:34 | 0 | | Patterns.cs:3:7:3:14 | call to constructor Object | Patterns.cs:3:7:3:14 | call to constructor Object | +| Patterns.cs:3:7:3:14 | call to method | Patterns.cs:3:7:3:14 | this access | +| Patterns.cs:3:7:3:14 | this access | Patterns.cs:3:7:3:14 | this access | | Patterns.cs:3:7:3:14 | {...} | Patterns.cs:3:7:3:14 | {...} | | Patterns.cs:6:5:43:5 | {...} | Patterns.cs:6:5:43:5 | {...} | | Patterns.cs:7:9:7:24 | ... ...; | Patterns.cs:7:9:7:24 | ... ...; | @@ -2398,6 +2468,8 @@ | Patterns.cs:97:13:97:39 | ...; | Patterns.cs:97:13:97:39 | ...; | | Patterns.cs:97:31:97:37 | "not C" | Patterns.cs:97:31:97:37 | "not C" | | PostDominance.cs:3:7:3:19 | call to constructor Object | PostDominance.cs:3:7:3:19 | call to constructor Object | +| PostDominance.cs:3:7:3:19 | call to method | PostDominance.cs:3:7:3:19 | this access | +| PostDominance.cs:3:7:3:19 | this access | PostDominance.cs:3:7:3:19 | this access | | PostDominance.cs:3:7:3:19 | {...} | PostDominance.cs:3:7:3:19 | {...} | | PostDominance.cs:6:5:8:5 | {...} | PostDominance.cs:6:5:8:5 | {...} | | PostDominance.cs:7:9:7:28 | call to method WriteLine | PostDominance.cs:7:27:7:27 | access to parameter s | @@ -2425,6 +2497,8 @@ | PostDominance.cs:21:9:21:29 | ...; | PostDominance.cs:21:9:21:29 | ...; | | PostDominance.cs:21:27:21:27 | access to parameter s | PostDominance.cs:21:27:21:27 | access to parameter s | | Qualifiers.cs:1:7:1:16 | call to constructor Object | Qualifiers.cs:1:7:1:16 | call to constructor Object | +| Qualifiers.cs:1:7:1:16 | call to method | Qualifiers.cs:1:7:1:16 | this access | +| Qualifiers.cs:1:7:1:16 | this access | Qualifiers.cs:1:7:1:16 | this access | | Qualifiers.cs:1:7:1:16 | {...} | Qualifiers.cs:1:7:1:16 | {...} | | Qualifiers.cs:7:28:7:31 | null | Qualifiers.cs:7:28:7:31 | null | | Qualifiers.cs:8:41:8:44 | null | Qualifiers.cs:8:41:8:44 | null | @@ -2484,6 +2558,8 @@ | Qualifiers.cs:30:13:30:37 | call to method StaticMethod | Qualifiers.cs:30:13:30:37 | call to method StaticMethod | | Qualifiers.cs:30:13:30:46 | call to method Method | Qualifiers.cs:30:13:30:37 | call to method StaticMethod | | Switch.cs:3:7:3:12 | call to constructor Object | Switch.cs:3:7:3:12 | call to constructor Object | +| Switch.cs:3:7:3:12 | call to method | Switch.cs:3:7:3:12 | this access | +| Switch.cs:3:7:3:12 | this access | Switch.cs:3:7:3:12 | this access | | Switch.cs:3:7:3:12 | {...} | Switch.cs:3:7:3:12 | {...} | | Switch.cs:6:5:8:5 | {...} | Switch.cs:6:5:8:5 | {...} | | Switch.cs:7:9:7:22 | switch (...) {...} | Switch.cs:7:9:7:22 | switch (...) {...} | @@ -2734,6 +2810,8 @@ | Switch.cs:175:42:175:46 | "def" | Switch.cs:175:42:175:46 | "def" | | Switch.cs:176:17:176:22 | break; | Switch.cs:176:17:176:22 | break; | | TypeAccesses.cs:1:7:1:18 | call to constructor Object | TypeAccesses.cs:1:7:1:18 | call to constructor Object | +| TypeAccesses.cs:1:7:1:18 | call to method | TypeAccesses.cs:1:7:1:18 | this access | +| TypeAccesses.cs:1:7:1:18 | this access | TypeAccesses.cs:1:7:1:18 | this access | | TypeAccesses.cs:1:7:1:18 | {...} | TypeAccesses.cs:1:7:1:18 | {...} | | TypeAccesses.cs:4:5:9:5 | {...} | TypeAccesses.cs:4:5:9:5 | {...} | | TypeAccesses.cs:5:9:5:26 | ... ...; | TypeAccesses.cs:5:9:5:26 | ... ...; | @@ -2753,6 +2831,8 @@ | TypeAccesses.cs:8:13:8:27 | Type t = ... | TypeAccesses.cs:8:17:8:27 | typeof(...) | | TypeAccesses.cs:8:17:8:27 | typeof(...) | TypeAccesses.cs:8:17:8:27 | typeof(...) | | VarDecls.cs:3:7:3:14 | call to constructor Object | VarDecls.cs:3:7:3:14 | call to constructor Object | +| VarDecls.cs:3:7:3:14 | call to method | VarDecls.cs:3:7:3:14 | this access | +| VarDecls.cs:3:7:3:14 | this access | VarDecls.cs:3:7:3:14 | this access | | VarDecls.cs:3:7:3:14 | {...} | VarDecls.cs:3:7:3:14 | {...} | | VarDecls.cs:6:5:11:5 | {...} | VarDecls.cs:6:5:11:5 | {...} | | VarDecls.cs:7:9:10:9 | fixed(...) { ... } | VarDecls.cs:7:9:10:9 | fixed(...) { ... } | @@ -2795,6 +2875,8 @@ | VarDecls.cs:25:24:25:24 | access to local variable x | VarDecls.cs:25:24:25:24 | access to local variable x | | VarDecls.cs:25:28:25:28 | access to local variable y | VarDecls.cs:25:28:25:28 | access to local variable y | | VarDecls.cs:28:11:28:11 | call to constructor Object | VarDecls.cs:28:11:28:11 | call to constructor Object | +| VarDecls.cs:28:11:28:11 | call to method | VarDecls.cs:28:11:28:11 | this access | +| VarDecls.cs:28:11:28:11 | this access | VarDecls.cs:28:11:28:11 | this access | | VarDecls.cs:28:11:28:11 | {...} | VarDecls.cs:28:11:28:11 | {...} | | VarDecls.cs:28:51:28:53 | {...} | VarDecls.cs:28:51:28:53 | {...} | | cflow.cs:6:5:35:5 | {...} | cflow.cs:6:5:35:5 | {...} | @@ -3049,6 +3131,8 @@ | cflow.cs:127:68:127:81 | ...; | cflow.cs:127:68:127:81 | ...; | | cflow.cs:127:76:127:80 | access to parameter value | cflow.cs:127:76:127:80 | access to parameter value | | cflow.cs:129:5:129:15 | call to constructor Object | cflow.cs:129:5:129:15 | call to constructor Object | +| cflow.cs:129:5:129:15 | call to method | cflow.cs:129:5:129:15 | this access | +| cflow.cs:129:5:129:15 | this access | cflow.cs:129:5:129:15 | this access | | cflow.cs:130:5:132:5 | {...} | cflow.cs:130:5:132:5 | {...} | | cflow.cs:131:9:131:13 | access to field Field | cflow.cs:131:9:131:13 | this access | | cflow.cs:131:9:131:13 | this access | cflow.cs:131:9:131:13 | this access | @@ -3372,6 +3456,8 @@ | cflow.cs:275:13:275:41 | call to method WriteLine | cflow.cs:275:31:275:40 | "not dead" | | cflow.cs:275:13:275:42 | ...; | cflow.cs:275:13:275:42 | ...; | | cflow.cs:275:31:275:40 | "not dead" | cflow.cs:275:31:275:40 | "not dead" | +| cflow.cs:282:5:282:18 | call to method | cflow.cs:282:5:282:18 | this access | +| cflow.cs:282:5:282:18 | this access | cflow.cs:282:5:282:18 | this access | | cflow.cs:282:24:282:27 | call to constructor ControlFlow | cflow.cs:282:24:282:27 | call to constructor ControlFlow | | cflow.cs:282:31:282:33 | {...} | cflow.cs:282:31:282:33 | {...} | | cflow.cs:284:32:284:35 | call to constructor ControlFlowSub | cflow.cs:284:32:284:35 | call to constructor ControlFlowSub | @@ -3381,11 +3467,15 @@ | cflow.cs:286:34:286:45 | call to method ToString | cflow.cs:286:34:286:34 | access to parameter i | | cflow.cs:286:48:286:50 | {...} | cflow.cs:286:48:286:50 | {...} | | cflow.cs:289:7:289:18 | call to constructor Object | cflow.cs:289:7:289:18 | call to constructor Object | +| cflow.cs:289:7:289:18 | call to method | cflow.cs:289:7:289:18 | this access | +| cflow.cs:289:7:289:18 | this access | cflow.cs:289:7:289:18 | this access | | cflow.cs:289:7:289:18 | {...} | cflow.cs:289:7:289:18 | {...} | | cflow.cs:291:38:291:38 | access to parameter f | cflow.cs:291:38:291:38 | access to parameter f | | cflow.cs:291:38:291:41 | delegate call | cflow.cs:291:38:291:38 | access to parameter f | | cflow.cs:291:40:291:40 | 0 | cflow.cs:291:40:291:40 | 0 | | cflow.cs:296:5:296:25 | call to constructor Object | cflow.cs:296:5:296:25 | call to constructor Object | +| cflow.cs:296:5:296:25 | call to method | cflow.cs:296:5:296:25 | this access | +| cflow.cs:296:5:296:25 | this access | cflow.cs:296:5:296:25 | this access | | cflow.cs:296:52:296:54 | {...} | cflow.cs:296:52:296:54 | {...} | | cflow.cs:299:5:301:5 | {...} | cflow.cs:299:5:301:5 | {...} | | cflow.cs:300:9:300:72 | object creation of type NegationInConstructor | cflow.cs:300:38:300:38 | 0 | @@ -3401,6 +3491,8 @@ | cflow.cs:300:61:300:64 | null | cflow.cs:300:61:300:64 | null | | cflow.cs:300:70:300:71 | "" | cflow.cs:300:70:300:71 | "" | | cflow.cs:304:7:304:18 | call to constructor Object | cflow.cs:304:7:304:18 | call to constructor Object | +| cflow.cs:304:7:304:18 | call to method | cflow.cs:304:7:304:18 | this access | +| cflow.cs:304:7:304:18 | this access | cflow.cs:304:7:304:18 | this access | | cflow.cs:304:7:304:18 | {...} | cflow.cs:304:7:304:18 | {...} | | cflow.cs:306:60:310:5 | (...) => ... | cflow.cs:306:60:310:5 | (...) => ... | | cflow.cs:307:5:310:5 | {...} | cflow.cs:307:5:310:5 | {...} | diff --git a/csharp/ql/test/library-tests/controlflow/graph/ExitElement.expected b/csharp/ql/test/library-tests/controlflow/graph/ExitElement.expected index 11880f4f825..e3d13701cff 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/ExitElement.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/ExitElement.expected @@ -1,4 +1,6 @@ | AccessorCalls.cs:1:7:1:19 | call to constructor Object | AccessorCalls.cs:1:7:1:19 | call to constructor Object | normal | +| AccessorCalls.cs:1:7:1:19 | call to method | AccessorCalls.cs:1:7:1:19 | call to method | normal | +| AccessorCalls.cs:1:7:1:19 | this access | AccessorCalls.cs:1:7:1:19 | this access | normal | | AccessorCalls.cs:1:7:1:19 | {...} | AccessorCalls.cs:1:7:1:19 | {...} | normal | | AccessorCalls.cs:5:30:5:30 | access to parameter i | AccessorCalls.cs:5:30:5:30 | access to parameter i | normal | | AccessorCalls.cs:5:37:5:39 | {...} | AccessorCalls.cs:5:37:5:39 | {...} | normal | @@ -290,6 +292,8 @@ | AccessorCalls.cs:73:78:73:81 | dynamic access to element | AccessorCalls.cs:73:78:73:81 | dynamic access to element | normal | | AccessorCalls.cs:73:80:73:80 | 1 | AccessorCalls.cs:73:80:73:80 | 1 | normal | | ArrayCreation.cs:1:7:1:19 | call to constructor Object | ArrayCreation.cs:1:7:1:19 | call to constructor Object | normal | +| ArrayCreation.cs:1:7:1:19 | call to method | ArrayCreation.cs:1:7:1:19 | call to method | normal | +| ArrayCreation.cs:1:7:1:19 | this access | ArrayCreation.cs:1:7:1:19 | this access | normal | | ArrayCreation.cs:1:7:1:19 | {...} | ArrayCreation.cs:1:7:1:19 | {...} | normal | | ArrayCreation.cs:3:19:3:28 | array creation of type Int32[] | ArrayCreation.cs:3:19:3:28 | array creation of type Int32[] | normal | | ArrayCreation.cs:3:27:3:27 | 0 | ArrayCreation.cs:3:27:3:27 | 0 | normal | @@ -312,6 +316,8 @@ | ArrayCreation.cs:9:45:9:45 | 2 | ArrayCreation.cs:9:45:9:45 | 2 | normal | | ArrayCreation.cs:9:48:9:48 | 3 | ArrayCreation.cs:9:48:9:48 | 3 | normal | | Assert.cs:5:7:5:17 | call to constructor Object | Assert.cs:5:7:5:17 | call to constructor Object | normal | +| Assert.cs:5:7:5:17 | call to method | Assert.cs:5:7:5:17 | call to method | normal | +| Assert.cs:5:7:5:17 | this access | Assert.cs:5:7:5:17 | this access | normal | | Assert.cs:5:7:5:17 | {...} | Assert.cs:5:7:5:17 | {...} | normal | | Assert.cs:8:5:12:5 | {...} | Assert.cs:10:9:10:31 | call to method Assert | exit | | Assert.cs:8:5:12:5 | {...} | Assert.cs:11:9:11:35 | call to method WriteLine | normal | @@ -774,6 +780,8 @@ | Assert.cs:140:33:140:34 | access to parameter b3 | Assert.cs:140:33:140:34 | access to parameter b3 | normal | | Assert.cs:141:9:141:15 | return ...; | Assert.cs:141:9:141:15 | return ...; | return | | Assignments.cs:1:7:1:17 | call to constructor Object | Assignments.cs:1:7:1:17 | call to constructor Object | normal | +| Assignments.cs:1:7:1:17 | call to method | Assignments.cs:1:7:1:17 | call to method | normal | +| Assignments.cs:1:7:1:17 | this access | Assignments.cs:1:7:1:17 | this access | normal | | Assignments.cs:1:7:1:17 | {...} | Assignments.cs:1:7:1:17 | {...} | normal | | Assignments.cs:4:5:15:5 | {...} | Assignments.cs:14:9:14:35 | ... += ... | normal | | Assignments.cs:5:9:5:18 | ... ...; | Assignments.cs:5:13:5:17 | Int32 x = ... | normal | @@ -814,6 +822,8 @@ | Assignments.cs:19:9:19:17 | return ...; | Assignments.cs:19:9:19:17 | return ...; | return | | Assignments.cs:19:16:19:16 | access to parameter x | Assignments.cs:19:16:19:16 | access to parameter x | normal | | BreakInTry.cs:1:7:1:16 | call to constructor Object | BreakInTry.cs:1:7:1:16 | call to constructor Object | normal | +| BreakInTry.cs:1:7:1:16 | call to method | BreakInTry.cs:1:7:1:16 | call to method | normal | +| BreakInTry.cs:1:7:1:16 | this access | BreakInTry.cs:1:7:1:16 | this access | normal | | BreakInTry.cs:1:7:1:16 | {...} | BreakInTry.cs:1:7:1:16 | {...} | normal | | BreakInTry.cs:4:5:18:5 | {...} | BreakInTry.cs:15:17:15:28 | ... == ... | false | | BreakInTry.cs:4:5:18:5 | {...} | BreakInTry.cs:16:17:16:17 | ; | normal | @@ -941,6 +951,8 @@ | BreakInTry.cs:67:28:67:31 | null | BreakInTry.cs:67:28:67:31 | null | normal | | BreakInTry.cs:68:21:68:26 | break; | BreakInTry.cs:68:21:68:26 | break; | break | | CompileTimeOperators.cs:3:7:3:26 | call to constructor Object | CompileTimeOperators.cs:3:7:3:26 | call to constructor Object | normal | +| CompileTimeOperators.cs:3:7:3:26 | call to method | CompileTimeOperators.cs:3:7:3:26 | call to method | normal | +| CompileTimeOperators.cs:3:7:3:26 | this access | CompileTimeOperators.cs:3:7:3:26 | this access | normal | | CompileTimeOperators.cs:3:7:3:26 | {...} | CompileTimeOperators.cs:3:7:3:26 | {...} | normal | | CompileTimeOperators.cs:6:5:8:5 | {...} | CompileTimeOperators.cs:7:9:7:28 | return ...; | return | | CompileTimeOperators.cs:7:9:7:28 | return ...; | CompileTimeOperators.cs:7:9:7:28 | return ...; | return | @@ -956,6 +968,8 @@ | CompileTimeOperators.cs:22:16:22:24 | nameof(...) | CompileTimeOperators.cs:22:16:22:24 | nameof(...) | normal | | CompileTimeOperators.cs:22:23:22:23 | access to parameter i | CompileTimeOperators.cs:22:23:22:23 | access to parameter i | normal | | CompileTimeOperators.cs:26:7:26:22 | call to constructor Object | CompileTimeOperators.cs:26:7:26:22 | call to constructor Object | normal | +| CompileTimeOperators.cs:26:7:26:22 | call to method | CompileTimeOperators.cs:26:7:26:22 | call to method | normal | +| CompileTimeOperators.cs:26:7:26:22 | this access | CompileTimeOperators.cs:26:7:26:22 | this access | normal | | CompileTimeOperators.cs:26:7:26:22 | {...} | CompileTimeOperators.cs:26:7:26:22 | {...} | normal | | CompileTimeOperators.cs:29:5:41:5 | {...} | CompileTimeOperators.cs:37:13:37:40 | call to method WriteLine | goto(End) [normal] (0) | | CompileTimeOperators.cs:29:5:41:5 | {...} | CompileTimeOperators.cs:37:13:37:40 | call to method WriteLine | throw(Exception) [normal] (0) | @@ -984,6 +998,8 @@ | CompileTimeOperators.cs:40:14:40:38 | ...; | CompileTimeOperators.cs:40:14:40:37 | call to method WriteLine | normal | | CompileTimeOperators.cs:40:32:40:36 | "End" | CompileTimeOperators.cs:40:32:40:36 | "End" | normal | | ConditionalAccess.cs:1:7:1:23 | call to constructor Object | ConditionalAccess.cs:1:7:1:23 | call to constructor Object | normal | +| ConditionalAccess.cs:1:7:1:23 | call to method | ConditionalAccess.cs:1:7:1:23 | call to method | normal | +| ConditionalAccess.cs:1:7:1:23 | this access | ConditionalAccess.cs:1:7:1:23 | this access | normal | | ConditionalAccess.cs:1:7:1:23 | {...} | ConditionalAccess.cs:1:7:1:23 | {...} | normal | | ConditionalAccess.cs:3:26:3:26 | access to parameter i | ConditionalAccess.cs:3:26:3:26 | access to parameter i | non-null | | ConditionalAccess.cs:3:26:3:26 | access to parameter i | ConditionalAccess.cs:3:26:3:26 | access to parameter i | null | @@ -1070,6 +1086,8 @@ | ConditionalAccess.cs:41:75:41:78 | ", " | ConditionalAccess.cs:41:75:41:78 | ", " | normal | | ConditionalAccess.cs:41:82:41:83 | access to parameter s2 | ConditionalAccess.cs:41:82:41:83 | access to parameter s2 | normal | | Conditions.cs:1:7:1:16 | call to constructor Object | Conditions.cs:1:7:1:16 | call to constructor Object | normal | +| Conditions.cs:1:7:1:16 | call to method | Conditions.cs:1:7:1:16 | call to method | normal | +| Conditions.cs:1:7:1:16 | this access | Conditions.cs:1:7:1:16 | this access | normal | | Conditions.cs:1:7:1:16 | {...} | Conditions.cs:1:7:1:16 | {...} | normal | | Conditions.cs:4:5:9:5 | {...} | Conditions.cs:7:13:7:16 | !... | false | | Conditions.cs:4:5:9:5 | {...} | Conditions.cs:8:13:8:15 | ...-- | normal | @@ -1427,6 +1445,8 @@ | Conditions.cs:149:44:149:46 | {...} | Conditions.cs:149:44:149:46 | {...} | normal | | Conditions.cs:149:45:149:45 | access to local variable s | Conditions.cs:149:45:149:45 | access to local variable s | normal | | ExitMethods.cs:6:7:6:17 | call to constructor Object | ExitMethods.cs:6:7:6:17 | call to constructor Object | normal | +| ExitMethods.cs:6:7:6:17 | call to method | ExitMethods.cs:6:7:6:17 | call to method | normal | +| ExitMethods.cs:6:7:6:17 | this access | ExitMethods.cs:6:7:6:17 | this access | normal | | ExitMethods.cs:6:7:6:17 | {...} | ExitMethods.cs:6:7:6:17 | {...} | normal | | ExitMethods.cs:9:5:12:5 | {...} | ExitMethods.cs:11:9:11:15 | return ...; | return | | ExitMethods.cs:10:9:10:24 | call to method ErrorMaybe | ExitMethods.cs:10:9:10:24 | call to method ErrorMaybe | normal | @@ -1629,6 +1649,8 @@ | Extensions.cs:25:23:25:32 | access to method Parse | Extensions.cs:25:23:25:32 | access to method Parse | normal | | Extensions.cs:25:23:25:32 | delegate creation of type Func | Extensions.cs:25:23:25:32 | delegate creation of type Func | normal | | Finally.cs:3:14:3:20 | call to constructor Object | Finally.cs:3:14:3:20 | call to constructor Object | normal | +| Finally.cs:3:14:3:20 | call to method | Finally.cs:3:14:3:20 | call to method | normal | +| Finally.cs:3:14:3:20 | this access | Finally.cs:3:14:3:20 | this access | normal | | Finally.cs:3:14:3:20 | {...} | Finally.cs:3:14:3:20 | {...} | normal | | Finally.cs:8:5:17:5 | {...} | Finally.cs:15:13:15:40 | call to method WriteLine | normal | | Finally.cs:8:5:17:5 | {...} | Finally.cs:15:13:15:40 | call to method WriteLine | throw(Exception) [normal] (0) | @@ -2018,10 +2040,16 @@ | Finally.cs:167:17:167:38 | ...; | Finally.cs:167:17:167:37 | call to method WriteLine | normal | | Finally.cs:167:35:167:36 | "" | Finally.cs:167:35:167:36 | "" | normal | | Finally.cs:172:11:172:20 | call to constructor Exception | Finally.cs:172:11:172:20 | call to constructor Exception | normal | +| Finally.cs:172:11:172:20 | call to method | Finally.cs:172:11:172:20 | call to method | normal | +| Finally.cs:172:11:172:20 | this access | Finally.cs:172:11:172:20 | this access | normal | | Finally.cs:172:11:172:20 | {...} | Finally.cs:172:11:172:20 | {...} | normal | | Finally.cs:173:11:173:20 | call to constructor Exception | Finally.cs:173:11:173:20 | call to constructor Exception | normal | +| Finally.cs:173:11:173:20 | call to method | Finally.cs:173:11:173:20 | call to method | normal | +| Finally.cs:173:11:173:20 | this access | Finally.cs:173:11:173:20 | this access | normal | | Finally.cs:173:11:173:20 | {...} | Finally.cs:173:11:173:20 | {...} | normal | | Finally.cs:174:11:174:20 | call to constructor Exception | Finally.cs:174:11:174:20 | call to constructor Exception | normal | +| Finally.cs:174:11:174:20 | call to method | Finally.cs:174:11:174:20 | call to method | normal | +| Finally.cs:174:11:174:20 | this access | Finally.cs:174:11:174:20 | this access | normal | | Finally.cs:174:11:174:20 | {...} | Finally.cs:174:11:174:20 | {...} | normal | | Finally.cs:177:5:193:5 | {...} | Finally.cs:186:21:186:22 | access to parameter b2 | false | | Finally.cs:177:5:193:5 | {...} | Finally.cs:186:21:186:22 | access to parameter b2 | throw(Exception) [false] (0) | @@ -2267,6 +2295,8 @@ | Finally.cs:272:13:272:19 | ...; | Finally.cs:272:13:272:18 | ... = ... | normal | | Finally.cs:272:18:272:18 | 3 | Finally.cs:272:18:272:18 | 3 | normal | | Foreach.cs:4:7:4:13 | call to constructor Object | Foreach.cs:4:7:4:13 | call to constructor Object | normal | +| Foreach.cs:4:7:4:13 | call to method | Foreach.cs:4:7:4:13 | call to method | normal | +| Foreach.cs:4:7:4:13 | this access | Foreach.cs:4:7:4:13 | this access | normal | | Foreach.cs:4:7:4:13 | {...} | Foreach.cs:4:7:4:13 | {...} | normal | | Foreach.cs:7:5:10:5 | {...} | Foreach.cs:8:9:9:13 | foreach (... ... in ...) ... | empty | | Foreach.cs:8:9:9:13 | foreach (... ... in ...) ... | Foreach.cs:8:9:9:13 | foreach (... ... in ...) ... | empty | @@ -2324,8 +2354,12 @@ | Initializers.cs:6:27:6:31 | ... + ... | Initializers.cs:6:27:6:31 | ... + ... | normal | | Initializers.cs:6:31:6:31 | 2 | Initializers.cs:6:31:6:31 | 2 | normal | | Initializers.cs:8:5:8:16 | call to constructor Object | Initializers.cs:8:5:8:16 | call to constructor Object | normal | +| Initializers.cs:8:5:8:16 | call to method | Initializers.cs:8:5:8:16 | call to method | normal | +| Initializers.cs:8:5:8:16 | this access | Initializers.cs:8:5:8:16 | this access | normal | | Initializers.cs:8:20:8:22 | {...} | Initializers.cs:8:20:8:22 | {...} | normal | | Initializers.cs:10:5:10:16 | call to constructor Object | Initializers.cs:10:5:10:16 | call to constructor Object | normal | +| Initializers.cs:10:5:10:16 | call to method | Initializers.cs:10:5:10:16 | call to method | normal | +| Initializers.cs:10:5:10:16 | this access | Initializers.cs:10:5:10:16 | this access | normal | | Initializers.cs:10:28:10:30 | {...} | Initializers.cs:10:28:10:30 | {...} | normal | | Initializers.cs:13:5:16:5 | {...} | Initializers.cs:15:13:15:63 | Initializers[] iz = ... | normal | | Initializers.cs:14:9:14:54 | ... ...; | Initializers.cs:14:13:14:53 | Initializers i = ... | normal | @@ -2348,6 +2382,8 @@ | Initializers.cs:18:16:18:20 | ... = ... | Initializers.cs:18:16:18:20 | ... = ... | normal | | Initializers.cs:18:20:18:20 | 1 | Initializers.cs:18:20:18:20 | 1 | normal | | Initializers.cs:20:11:20:23 | call to constructor Object | Initializers.cs:20:11:20:23 | call to constructor Object | normal | +| Initializers.cs:20:11:20:23 | call to method | Initializers.cs:20:11:20:23 | call to method | normal | +| Initializers.cs:20:11:20:23 | this access | Initializers.cs:20:11:20:23 | this access | normal | | Initializers.cs:20:11:20:23 | {...} | Initializers.cs:20:11:20:23 | {...} | normal | | Initializers.cs:22:23:22:23 | access to field F | Initializers.cs:22:23:22:23 | this access | normal | | Initializers.cs:22:23:22:23 | this access | Initializers.cs:22:23:22:23 | this access | normal | @@ -2361,6 +2397,8 @@ | Initializers.cs:28:13:28:13 | this access | Initializers.cs:28:13:28:13 | this access | normal | | Initializers.cs:28:13:28:17 | ... = ... | Initializers.cs:28:13:28:17 | ... = ... | normal | | Initializers.cs:28:17:28:17 | 2 | Initializers.cs:28:17:28:17 | 2 | normal | +| Initializers.cs:31:9:31:11 | call to method | Initializers.cs:31:9:31:11 | call to method | normal | +| Initializers.cs:31:9:31:11 | this access | Initializers.cs:31:9:31:11 | this access | normal | | Initializers.cs:31:17:31:20 | call to constructor NoConstructor | Initializers.cs:31:17:31:20 | call to constructor NoConstructor | normal | | Initializers.cs:31:24:31:33 | {...} | Initializers.cs:31:26:31:30 | ... = ... | normal | | Initializers.cs:31:26:31:26 | access to field I | Initializers.cs:31:26:31:26 | this access | normal | @@ -2376,6 +2414,8 @@ | Initializers.cs:33:31:33:36 | ...; | Initializers.cs:33:31:33:35 | ... = ... | normal | | Initializers.cs:33:35:33:35 | access to parameter i | Initializers.cs:33:35:33:35 | access to parameter i | normal | | Initializers.cs:35:9:35:11 | call to constructor NoConstructor | Initializers.cs:35:9:35:11 | call to constructor NoConstructor | normal | +| Initializers.cs:35:9:35:11 | call to method | Initializers.cs:35:9:35:11 | call to method | normal | +| Initializers.cs:35:9:35:11 | this access | Initializers.cs:35:9:35:11 | this access | normal | | Initializers.cs:35:27:35:40 | {...} | Initializers.cs:35:29:35:37 | ... = ... | normal | | Initializers.cs:35:29:35:29 | access to field I | Initializers.cs:35:29:35:29 | this access | normal | | Initializers.cs:35:29:35:29 | this access | Initializers.cs:35:29:35:29 | this access | normal | @@ -2385,8 +2425,12 @@ | Initializers.cs:35:33:35:37 | ... + ... | Initializers.cs:35:33:35:37 | ... + ... | normal | | Initializers.cs:35:37:35:37 | access to parameter j | Initializers.cs:35:37:35:37 | access to parameter j | normal | | Initializers.cs:39:7:39:23 | call to constructor Object | Initializers.cs:39:7:39:23 | call to constructor Object | normal | +| Initializers.cs:39:7:39:23 | call to method | Initializers.cs:39:7:39:23 | call to method | normal | +| Initializers.cs:39:7:39:23 | this access | Initializers.cs:39:7:39:23 | this access | normal | | Initializers.cs:39:7:39:23 | {...} | Initializers.cs:39:7:39:23 | {...} | normal | | Initializers.cs:41:11:41:18 | call to constructor Object | Initializers.cs:41:11:41:18 | call to constructor Object | normal | +| Initializers.cs:41:11:41:18 | call to method | Initializers.cs:41:11:41:18 | call to method | normal | +| Initializers.cs:41:11:41:18 | this access | Initializers.cs:41:11:41:18 | this access | normal | | Initializers.cs:41:11:41:18 | {...} | Initializers.cs:41:11:41:18 | {...} | normal | | Initializers.cs:52:5:66:5 | {...} | Initializers.cs:57:13:65:9 | Compound compound = ... | normal | | Initializers.cs:54:9:54:96 | ... ...; | Initializers.cs:54:13:54:95 | Dictionary dict = ... | normal | @@ -2496,6 +2540,8 @@ | Initializers.cs:64:54:64:54 | 0 | Initializers.cs:64:54:64:54 | 0 | normal | | Initializers.cs:64:59:64:61 | "1" | Initializers.cs:64:59:64:61 | "1" | normal | | LoopUnrolling.cs:5:7:5:19 | call to constructor Object | LoopUnrolling.cs:5:7:5:19 | call to constructor Object | normal | +| LoopUnrolling.cs:5:7:5:19 | call to method | LoopUnrolling.cs:5:7:5:19 | call to method | normal | +| LoopUnrolling.cs:5:7:5:19 | this access | LoopUnrolling.cs:5:7:5:19 | this access | normal | | LoopUnrolling.cs:5:7:5:19 | {...} | LoopUnrolling.cs:5:7:5:19 | {...} | normal | | LoopUnrolling.cs:8:5:13:5 | {...} | LoopUnrolling.cs:10:13:10:19 | return ...; | return | | LoopUnrolling.cs:8:5:13:5 | {...} | LoopUnrolling.cs:11:9:12:35 | foreach (... ... in ...) ... | empty | @@ -2684,6 +2730,8 @@ | LoopUnrolling.cs:99:13:99:33 | ...; | LoopUnrolling.cs:99:13:99:32 | call to method WriteLine | normal | | LoopUnrolling.cs:99:31:99:31 | access to local variable x | LoopUnrolling.cs:99:31:99:31 | access to local variable x | normal | | MultiImplementationA.cs:4:7:4:8 | call to constructor Object | MultiImplementationA.cs:4:7:4:8 | call to constructor Object | normal | +| MultiImplementationA.cs:4:7:4:8 | call to method | MultiImplementationA.cs:4:7:4:8 | call to method | normal | +| MultiImplementationA.cs:4:7:4:8 | this access | MultiImplementationA.cs:4:7:4:8 | this access | normal | | MultiImplementationA.cs:4:7:4:8 | {...} | MultiImplementationA.cs:4:7:4:8 | {...} | normal | | MultiImplementationA.cs:6:22:6:31 | throw ... | MultiImplementationA.cs:6:22:6:31 | throw ... | throw(NullReferenceException) | | MultiImplementationA.cs:6:28:6:31 | null | MultiImplementationA.cs:6:28:6:31 | null | normal | @@ -2709,6 +2757,8 @@ | MultiImplementationA.cs:18:9:18:22 | M2(...) | MultiImplementationA.cs:18:9:18:22 | M2(...) | normal | | MultiImplementationA.cs:18:21:18:21 | 0 | MultiImplementationA.cs:18:21:18:21 | 0 | normal | | MultiImplementationA.cs:20:12:20:13 | call to constructor Object | MultiImplementationA.cs:20:12:20:13 | call to constructor Object | normal | +| MultiImplementationA.cs:20:12:20:13 | call to method | MultiImplementationA.cs:20:12:20:13 | call to method | normal | +| MultiImplementationA.cs:20:12:20:13 | this access | MultiImplementationA.cs:20:12:20:13 | this access | normal | | MultiImplementationA.cs:20:22:20:31 | {...} | MultiImplementationA.cs:20:24:20:28 | ... = ... | normal | | MultiImplementationA.cs:20:24:20:24 | access to field F | MultiImplementationA.cs:20:24:20:24 | this access | normal | | MultiImplementationA.cs:20:24:20:24 | this access | MultiImplementationA.cs:20:24:20:24 | this access | normal | @@ -2725,10 +2775,14 @@ | MultiImplementationA.cs:24:32:24:34 | ... = ... | MultiImplementationA.cs:24:32:24:34 | ... = ... | normal | | MultiImplementationA.cs:24:34:24:34 | 0 | MultiImplementationA.cs:24:34:24:34 | 0 | normal | | MultiImplementationA.cs:28:7:28:8 | call to constructor Object | MultiImplementationA.cs:28:7:28:8 | call to constructor Object | normal | +| MultiImplementationA.cs:28:7:28:8 | call to method | MultiImplementationA.cs:28:7:28:8 | call to method | normal | +| MultiImplementationA.cs:28:7:28:8 | this access | MultiImplementationA.cs:28:7:28:8 | this access | normal | | MultiImplementationA.cs:28:7:28:8 | {...} | MultiImplementationA.cs:28:7:28:8 | {...} | normal | | MultiImplementationA.cs:30:28:30:37 | throw ... | MultiImplementationA.cs:30:28:30:37 | throw ... | throw(NullReferenceException) | | MultiImplementationA.cs:30:34:30:37 | null | MultiImplementationA.cs:30:34:30:37 | null | normal | | MultiImplementationA.cs:34:15:34:16 | call to constructor Object | MultiImplementationA.cs:34:15:34:16 | call to constructor Object | normal | +| MultiImplementationA.cs:34:15:34:16 | call to method | MultiImplementationA.cs:34:15:34:16 | call to method | normal | +| MultiImplementationA.cs:34:15:34:16 | this access | MultiImplementationA.cs:34:15:34:16 | this access | normal | | MultiImplementationA.cs:34:15:34:16 | {...} | MultiImplementationA.cs:34:15:34:16 | {...} | normal | | MultiImplementationA.cs:36:14:36:28 | {...} | MultiImplementationA.cs:36:16:36:26 | throw ...; | throw(NullReferenceException) | | MultiImplementationA.cs:36:16:36:26 | throw ...; | MultiImplementationA.cs:36:16:36:26 | throw ...; | throw(NullReferenceException) | @@ -2737,6 +2791,8 @@ | MultiImplementationA.cs:37:16:37:26 | throw ...; | MultiImplementationA.cs:37:16:37:26 | throw ...; | throw(NullReferenceException) | | MultiImplementationA.cs:37:22:37:25 | null | MultiImplementationA.cs:37:22:37:25 | null | normal | | MultiImplementationB.cs:1:7:1:8 | call to constructor Object | MultiImplementationB.cs:1:7:1:8 | call to constructor Object | normal | +| MultiImplementationB.cs:1:7:1:8 | call to method | MultiImplementationB.cs:1:7:1:8 | call to method | normal | +| MultiImplementationB.cs:1:7:1:8 | this access | MultiImplementationB.cs:1:7:1:8 | this access | normal | | MultiImplementationB.cs:1:7:1:8 | {...} | MultiImplementationB.cs:1:7:1:8 | {...} | normal | | MultiImplementationB.cs:3:22:3:22 | 0 | MultiImplementationB.cs:3:22:3:22 | 0 | normal | | MultiImplementationB.cs:4:25:4:37 | {...} | MultiImplementationB.cs:4:27:4:35 | return ...; | return | @@ -2760,6 +2816,8 @@ | MultiImplementationB.cs:16:21:16:30 | throw ... | MultiImplementationB.cs:16:21:16:30 | throw ... | throw(NullReferenceException) | | MultiImplementationB.cs:16:27:16:30 | null | MultiImplementationB.cs:16:27:16:30 | null | normal | | MultiImplementationB.cs:18:12:18:13 | call to constructor Object | MultiImplementationB.cs:18:12:18:13 | call to constructor Object | normal | +| MultiImplementationB.cs:18:12:18:13 | call to method | MultiImplementationB.cs:18:12:18:13 | call to method | normal | +| MultiImplementationB.cs:18:12:18:13 | this access | MultiImplementationB.cs:18:12:18:13 | this access | normal | | MultiImplementationB.cs:18:22:18:36 | {...} | MultiImplementationB.cs:18:24:18:34 | throw ...; | throw(NullReferenceException) | | MultiImplementationB.cs:18:24:18:34 | throw ...; | MultiImplementationB.cs:18:24:18:34 | throw ...; | throw(NullReferenceException) | | MultiImplementationB.cs:18:30:18:33 | null | MultiImplementationB.cs:18:30:18:33 | null | normal | @@ -2776,11 +2834,17 @@ | MultiImplementationB.cs:22:32:22:34 | ... = ... | MultiImplementationB.cs:22:32:22:34 | ... = ... | normal | | MultiImplementationB.cs:22:34:22:34 | 1 | MultiImplementationB.cs:22:34:22:34 | 1 | normal | | MultiImplementationB.cs:25:7:25:8 | call to constructor Object | MultiImplementationB.cs:25:7:25:8 | call to constructor Object | normal | +| MultiImplementationB.cs:25:7:25:8 | call to method | MultiImplementationB.cs:25:7:25:8 | call to method | normal | +| MultiImplementationB.cs:25:7:25:8 | this access | MultiImplementationB.cs:25:7:25:8 | this access | normal | | MultiImplementationB.cs:25:7:25:8 | {...} | MultiImplementationB.cs:25:7:25:8 | {...} | normal | | MultiImplementationB.cs:30:15:30:16 | call to constructor Object | MultiImplementationB.cs:30:15:30:16 | call to constructor Object | normal | +| MultiImplementationB.cs:30:15:30:16 | call to method | MultiImplementationB.cs:30:15:30:16 | call to method | normal | +| MultiImplementationB.cs:30:15:30:16 | this access | MultiImplementationB.cs:30:15:30:16 | this access | normal | | MultiImplementationB.cs:30:15:30:16 | {...} | MultiImplementationB.cs:30:15:30:16 | {...} | normal | | MultiImplementationB.cs:32:17:32:17 | 0 | MultiImplementationB.cs:32:17:32:17 | 0 | normal | | NullCoalescing.cs:1:7:1:20 | call to constructor Object | NullCoalescing.cs:1:7:1:20 | call to constructor Object | normal | +| NullCoalescing.cs:1:7:1:20 | call to method | NullCoalescing.cs:1:7:1:20 | call to method | normal | +| NullCoalescing.cs:1:7:1:20 | this access | NullCoalescing.cs:1:7:1:20 | this access | normal | | NullCoalescing.cs:1:7:1:20 | {...} | NullCoalescing.cs:1:7:1:20 | {...} | normal | | NullCoalescing.cs:3:23:3:23 | access to parameter i | NullCoalescing.cs:3:23:3:23 | access to parameter i | non-null | | NullCoalescing.cs:3:23:3:23 | access to parameter i | NullCoalescing.cs:3:23:3:23 | access to parameter i | null | @@ -2847,18 +2911,24 @@ | NullCoalescing.cs:17:19:17:19 | access to parameter i | NullCoalescing.cs:17:19:17:19 | access to parameter i | normal | | NullCoalescing.cs:17:24:17:24 | 1 | NullCoalescing.cs:17:24:17:24 | 1 | normal | | PartialImplementationA.cs:3:12:3:18 | call to constructor Object | PartialImplementationA.cs:3:12:3:18 | call to constructor Object | normal | +| PartialImplementationA.cs:3:12:3:18 | call to method | PartialImplementationA.cs:3:12:3:18 | call to method | normal | +| PartialImplementationA.cs:3:12:3:18 | this access | PartialImplementationA.cs:3:12:3:18 | this access | normal | | PartialImplementationA.cs:3:27:3:29 | {...} | PartialImplementationA.cs:3:27:3:29 | {...} | normal | | PartialImplementationB.cs:3:16:3:16 | access to field F | PartialImplementationB.cs:3:16:3:16 | this access | normal | | PartialImplementationB.cs:3:16:3:16 | this access | PartialImplementationB.cs:3:16:3:16 | this access | normal | | PartialImplementationB.cs:3:16:3:20 | ... = ... | PartialImplementationB.cs:3:16:3:20 | ... = ... | normal | | PartialImplementationB.cs:3:20:3:20 | 0 | PartialImplementationB.cs:3:20:3:20 | 0 | normal | | PartialImplementationB.cs:4:12:4:18 | call to constructor Object | PartialImplementationB.cs:4:12:4:18 | call to constructor Object | normal | +| PartialImplementationB.cs:4:12:4:18 | call to method | PartialImplementationB.cs:4:12:4:18 | call to method | normal | +| PartialImplementationB.cs:4:12:4:18 | this access | PartialImplementationB.cs:4:12:4:18 | this access | normal | | PartialImplementationB.cs:4:22:4:24 | {...} | PartialImplementationB.cs:4:22:4:24 | {...} | normal | | PartialImplementationB.cs:5:16:5:16 | access to property P | PartialImplementationB.cs:5:16:5:16 | this access | normal | | PartialImplementationB.cs:5:16:5:16 | this access | PartialImplementationB.cs:5:16:5:16 | this access | normal | | PartialImplementationB.cs:5:32:5:34 | ... = ... | PartialImplementationB.cs:5:32:5:34 | ... = ... | normal | | PartialImplementationB.cs:5:34:5:34 | 0 | PartialImplementationB.cs:5:34:5:34 | 0 | normal | | Patterns.cs:3:7:3:14 | call to constructor Object | Patterns.cs:3:7:3:14 | call to constructor Object | normal | +| Patterns.cs:3:7:3:14 | call to method | Patterns.cs:3:7:3:14 | call to method | normal | +| Patterns.cs:3:7:3:14 | this access | Patterns.cs:3:7:3:14 | this access | normal | | Patterns.cs:3:7:3:14 | {...} | Patterns.cs:3:7:3:14 | {...} | normal | | Patterns.cs:6:5:43:5 | {...} | Patterns.cs:40:17:40:17 | access to local variable o | normal | | Patterns.cs:7:9:7:24 | ... ...; | Patterns.cs:7:16:7:23 | Object o = ... | normal | @@ -3091,6 +3161,8 @@ | Patterns.cs:97:13:97:39 | ...; | Patterns.cs:97:13:97:38 | call to method WriteLine | normal | | Patterns.cs:97:31:97:37 | "not C" | Patterns.cs:97:31:97:37 | "not C" | normal | | PostDominance.cs:3:7:3:19 | call to constructor Object | PostDominance.cs:3:7:3:19 | call to constructor Object | normal | +| PostDominance.cs:3:7:3:19 | call to method | PostDominance.cs:3:7:3:19 | call to method | normal | +| PostDominance.cs:3:7:3:19 | this access | PostDominance.cs:3:7:3:19 | this access | normal | | PostDominance.cs:3:7:3:19 | {...} | PostDominance.cs:3:7:3:19 | {...} | normal | | PostDominance.cs:6:5:8:5 | {...} | PostDominance.cs:7:9:7:28 | call to method WriteLine | normal | | PostDominance.cs:7:9:7:28 | call to method WriteLine | PostDominance.cs:7:9:7:28 | call to method WriteLine | normal | @@ -3126,6 +3198,8 @@ | PostDominance.cs:21:9:21:29 | ...; | PostDominance.cs:21:9:21:28 | call to method WriteLine | normal | | PostDominance.cs:21:27:21:27 | access to parameter s | PostDominance.cs:21:27:21:27 | access to parameter s | normal | | Qualifiers.cs:1:7:1:16 | call to constructor Object | Qualifiers.cs:1:7:1:16 | call to constructor Object | normal | +| Qualifiers.cs:1:7:1:16 | call to method | Qualifiers.cs:1:7:1:16 | call to method | normal | +| Qualifiers.cs:1:7:1:16 | this access | Qualifiers.cs:1:7:1:16 | this access | normal | | Qualifiers.cs:1:7:1:16 | {...} | Qualifiers.cs:1:7:1:16 | {...} | normal | | Qualifiers.cs:7:28:7:31 | null | Qualifiers.cs:7:28:7:31 | null | normal | | Qualifiers.cs:8:41:8:44 | null | Qualifiers.cs:8:41:8:44 | null | normal | @@ -3185,6 +3259,8 @@ | Qualifiers.cs:30:13:30:37 | call to method StaticMethod | Qualifiers.cs:30:13:30:37 | call to method StaticMethod | normal | | Qualifiers.cs:30:13:30:46 | call to method Method | Qualifiers.cs:30:13:30:46 | call to method Method | normal | | Switch.cs:3:7:3:12 | call to constructor Object | Switch.cs:3:7:3:12 | call to constructor Object | normal | +| Switch.cs:3:7:3:12 | call to method | Switch.cs:3:7:3:12 | call to method | normal | +| Switch.cs:3:7:3:12 | this access | Switch.cs:3:7:3:12 | this access | normal | | Switch.cs:3:7:3:12 | {...} | Switch.cs:3:7:3:12 | {...} | normal | | Switch.cs:6:5:8:5 | {...} | Switch.cs:7:17:7:17 | access to parameter o | normal | | Switch.cs:7:9:7:22 | switch (...) {...} | Switch.cs:7:17:7:17 | access to parameter o | normal | @@ -3579,6 +3655,8 @@ | Switch.cs:175:42:175:46 | "def" | Switch.cs:175:42:175:46 | "def" | normal | | Switch.cs:176:17:176:22 | break; | Switch.cs:176:17:176:22 | break; | break | | TypeAccesses.cs:1:7:1:18 | call to constructor Object | TypeAccesses.cs:1:7:1:18 | call to constructor Object | normal | +| TypeAccesses.cs:1:7:1:18 | call to method | TypeAccesses.cs:1:7:1:18 | call to method | normal | +| TypeAccesses.cs:1:7:1:18 | this access | TypeAccesses.cs:1:7:1:18 | this access | normal | | TypeAccesses.cs:1:7:1:18 | {...} | TypeAccesses.cs:1:7:1:18 | {...} | normal | | TypeAccesses.cs:4:5:9:5 | {...} | TypeAccesses.cs:8:13:8:27 | Type t = ... | normal | | TypeAccesses.cs:5:9:5:26 | ... ...; | TypeAccesses.cs:5:13:5:25 | String s = ... | normal | @@ -3601,6 +3679,8 @@ | TypeAccesses.cs:8:13:8:27 | Type t = ... | TypeAccesses.cs:8:13:8:27 | Type t = ... | normal | | TypeAccesses.cs:8:17:8:27 | typeof(...) | TypeAccesses.cs:8:17:8:27 | typeof(...) | normal | | VarDecls.cs:3:7:3:14 | call to constructor Object | VarDecls.cs:3:7:3:14 | call to constructor Object | normal | +| VarDecls.cs:3:7:3:14 | call to method | VarDecls.cs:3:7:3:14 | call to method | normal | +| VarDecls.cs:3:7:3:14 | this access | VarDecls.cs:3:7:3:14 | this access | normal | | VarDecls.cs:3:7:3:14 | {...} | VarDecls.cs:3:7:3:14 | {...} | normal | | VarDecls.cs:6:5:11:5 | {...} | VarDecls.cs:9:13:9:29 | return ...; | return | | VarDecls.cs:7:9:10:9 | fixed(...) { ... } | VarDecls.cs:9:13:9:29 | return ...; | return | @@ -3644,6 +3724,8 @@ | VarDecls.cs:25:24:25:24 | access to local variable x | VarDecls.cs:25:24:25:24 | access to local variable x | normal | | VarDecls.cs:25:28:25:28 | access to local variable y | VarDecls.cs:25:28:25:28 | access to local variable y | normal | | VarDecls.cs:28:11:28:11 | call to constructor Object | VarDecls.cs:28:11:28:11 | call to constructor Object | normal | +| VarDecls.cs:28:11:28:11 | call to method | VarDecls.cs:28:11:28:11 | call to method | normal | +| VarDecls.cs:28:11:28:11 | this access | VarDecls.cs:28:11:28:11 | this access | normal | | VarDecls.cs:28:11:28:11 | {...} | VarDecls.cs:28:11:28:11 | {...} | normal | | VarDecls.cs:28:51:28:53 | {...} | VarDecls.cs:28:51:28:53 | {...} | normal | | cflow.cs:6:5:35:5 | {...} | cflow.cs:24:25:24:31 | ... <= ... | false | @@ -3959,6 +4041,8 @@ | cflow.cs:127:68:127:81 | ...; | cflow.cs:127:68:127:80 | ... = ... | normal | | cflow.cs:127:76:127:80 | access to parameter value | cflow.cs:127:76:127:80 | access to parameter value | normal | | cflow.cs:129:5:129:15 | call to constructor Object | cflow.cs:129:5:129:15 | call to constructor Object | normal | +| cflow.cs:129:5:129:15 | call to method | cflow.cs:129:5:129:15 | call to method | normal | +| cflow.cs:129:5:129:15 | this access | cflow.cs:129:5:129:15 | this access | normal | | cflow.cs:130:5:132:5 | {...} | cflow.cs:131:9:131:17 | ... = ... | normal | | cflow.cs:131:9:131:13 | access to field Field | cflow.cs:131:9:131:13 | this access | normal | | cflow.cs:131:9:131:13 | this access | cflow.cs:131:9:131:13 | this access | normal | @@ -4352,6 +4436,8 @@ | cflow.cs:275:13:275:41 | call to method WriteLine | cflow.cs:275:13:275:41 | call to method WriteLine | normal | | cflow.cs:275:13:275:42 | ...; | cflow.cs:275:13:275:41 | call to method WriteLine | normal | | cflow.cs:275:31:275:40 | "not dead" | cflow.cs:275:31:275:40 | "not dead" | normal | +| cflow.cs:282:5:282:18 | call to method | cflow.cs:282:5:282:18 | call to method | normal | +| cflow.cs:282:5:282:18 | this access | cflow.cs:282:5:282:18 | this access | normal | | cflow.cs:282:24:282:27 | call to constructor ControlFlow | cflow.cs:282:24:282:27 | call to constructor ControlFlow | normal | | cflow.cs:282:31:282:33 | {...} | cflow.cs:282:31:282:33 | {...} | normal | | cflow.cs:284:32:284:35 | call to constructor ControlFlowSub | cflow.cs:284:32:284:35 | call to constructor ControlFlowSub | normal | @@ -4361,11 +4447,15 @@ | cflow.cs:286:34:286:45 | call to method ToString | cflow.cs:286:34:286:45 | call to method ToString | normal | | cflow.cs:286:48:286:50 | {...} | cflow.cs:286:48:286:50 | {...} | normal | | cflow.cs:289:7:289:18 | call to constructor Object | cflow.cs:289:7:289:18 | call to constructor Object | normal | +| cflow.cs:289:7:289:18 | call to method | cflow.cs:289:7:289:18 | call to method | normal | +| cflow.cs:289:7:289:18 | this access | cflow.cs:289:7:289:18 | this access | normal | | cflow.cs:289:7:289:18 | {...} | cflow.cs:289:7:289:18 | {...} | normal | | cflow.cs:291:38:291:38 | access to parameter f | cflow.cs:291:38:291:38 | access to parameter f | normal | | cflow.cs:291:38:291:41 | delegate call | cflow.cs:291:38:291:41 | delegate call | normal | | cflow.cs:291:40:291:40 | 0 | cflow.cs:291:40:291:40 | 0 | normal | | cflow.cs:296:5:296:25 | call to constructor Object | cflow.cs:296:5:296:25 | call to constructor Object | normal | +| cflow.cs:296:5:296:25 | call to method | cflow.cs:296:5:296:25 | call to method | normal | +| cflow.cs:296:5:296:25 | this access | cflow.cs:296:5:296:25 | this access | normal | | cflow.cs:296:52:296:54 | {...} | cflow.cs:296:52:296:54 | {...} | normal | | cflow.cs:299:5:301:5 | {...} | cflow.cs:300:9:300:72 | object creation of type NegationInConstructor | normal | | cflow.cs:300:9:300:72 | object creation of type NegationInConstructor | cflow.cs:300:9:300:72 | object creation of type NegationInConstructor | normal | @@ -4383,6 +4473,8 @@ | cflow.cs:300:61:300:64 | null | cflow.cs:300:61:300:64 | null | normal | | cflow.cs:300:70:300:71 | "" | cflow.cs:300:70:300:71 | "" | normal | | cflow.cs:304:7:304:18 | call to constructor Object | cflow.cs:304:7:304:18 | call to constructor Object | normal | +| cflow.cs:304:7:304:18 | call to method | cflow.cs:304:7:304:18 | call to method | normal | +| cflow.cs:304:7:304:18 | this access | cflow.cs:304:7:304:18 | this access | normal | | cflow.cs:304:7:304:18 | {...} | cflow.cs:304:7:304:18 | {...} | normal | | cflow.cs:306:60:310:5 | (...) => ... | cflow.cs:306:60:310:5 | (...) => ... | normal | | cflow.cs:307:5:310:5 | {...} | cflow.cs:309:9:309:17 | return ...; | return | diff --git a/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected b/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected index 63855522ba6..b764e2fb2a5 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected @@ -1,6 +1,8 @@ | AccessorCalls.cs:1:7:1:19 | call to constructor Object | AccessorCalls.cs:1:7:1:19 | {...} | | -| AccessorCalls.cs:1:7:1:19 | enter AccessorCalls | AccessorCalls.cs:1:7:1:19 | call to constructor Object | | +| AccessorCalls.cs:1:7:1:19 | call to method | AccessorCalls.cs:1:7:1:19 | call to constructor Object | | +| AccessorCalls.cs:1:7:1:19 | enter AccessorCalls | AccessorCalls.cs:1:7:1:19 | this access | | | AccessorCalls.cs:1:7:1:19 | exit AccessorCalls (normal) | AccessorCalls.cs:1:7:1:19 | exit AccessorCalls | | +| AccessorCalls.cs:1:7:1:19 | this access | AccessorCalls.cs:1:7:1:19 | call to method | | | AccessorCalls.cs:1:7:1:19 | {...} | AccessorCalls.cs:1:7:1:19 | exit AccessorCalls (normal) | | | AccessorCalls.cs:5:23:5:25 | enter get_Item | AccessorCalls.cs:5:30:5:30 | access to parameter i | | | AccessorCalls.cs:5:23:5:25 | exit get_Item (normal) | AccessorCalls.cs:5:23:5:25 | exit get_Item | | @@ -304,8 +306,10 @@ | AccessorCalls.cs:73:78:73:81 | dynamic access to element | AccessorCalls.cs:73:74:73:82 | (..., ...) | | | AccessorCalls.cs:73:80:73:80 | 1 | AccessorCalls.cs:73:78:73:81 | dynamic access to element | | | ArrayCreation.cs:1:7:1:19 | call to constructor Object | ArrayCreation.cs:1:7:1:19 | {...} | | -| ArrayCreation.cs:1:7:1:19 | enter ArrayCreation | ArrayCreation.cs:1:7:1:19 | call to constructor Object | | +| ArrayCreation.cs:1:7:1:19 | call to method | ArrayCreation.cs:1:7:1:19 | call to constructor Object | | +| ArrayCreation.cs:1:7:1:19 | enter ArrayCreation | ArrayCreation.cs:1:7:1:19 | this access | | | ArrayCreation.cs:1:7:1:19 | exit ArrayCreation (normal) | ArrayCreation.cs:1:7:1:19 | exit ArrayCreation | | +| ArrayCreation.cs:1:7:1:19 | this access | ArrayCreation.cs:1:7:1:19 | call to method | | | ArrayCreation.cs:1:7:1:19 | {...} | ArrayCreation.cs:1:7:1:19 | exit ArrayCreation (normal) | | | ArrayCreation.cs:3:11:3:12 | enter M1 | ArrayCreation.cs:3:27:3:27 | 0 | | | ArrayCreation.cs:3:11:3:12 | exit M1 (normal) | ArrayCreation.cs:3:11:3:12 | exit M1 | | @@ -336,8 +340,10 @@ | ArrayCreation.cs:9:45:9:45 | 2 | ArrayCreation.cs:9:48:9:48 | 3 | | | ArrayCreation.cs:9:48:9:48 | 3 | ArrayCreation.cs:9:43:9:50 | { ..., ... } | | | Assert.cs:5:7:5:17 | call to constructor Object | Assert.cs:5:7:5:17 | {...} | | -| Assert.cs:5:7:5:17 | enter AssertTests | Assert.cs:5:7:5:17 | call to constructor Object | | +| Assert.cs:5:7:5:17 | call to method | Assert.cs:5:7:5:17 | call to constructor Object | | +| Assert.cs:5:7:5:17 | enter AssertTests | Assert.cs:5:7:5:17 | this access | | | Assert.cs:5:7:5:17 | exit AssertTests (normal) | Assert.cs:5:7:5:17 | exit AssertTests | | +| Assert.cs:5:7:5:17 | this access | Assert.cs:5:7:5:17 | call to method | | | Assert.cs:5:7:5:17 | {...} | Assert.cs:5:7:5:17 | exit AssertTests (normal) | | | Assert.cs:7:10:7:11 | enter M1 | Assert.cs:8:5:12:5 | {...} | | | Assert.cs:7:10:7:11 | exit M1 (abnormal) | Assert.cs:7:10:7:11 | exit M1 | | @@ -795,8 +801,10 @@ | Assert.cs:140:33:140:34 | access to parameter b3 | Assert.cs:140:9:140:35 | call to method AssertTrueFalse | | | Assert.cs:141:9:141:15 | return ...; | Assert.cs:138:10:138:12 | exit M13 (normal) | return | | Assignments.cs:1:7:1:17 | call to constructor Object | Assignments.cs:1:7:1:17 | {...} | | -| Assignments.cs:1:7:1:17 | enter Assignments | Assignments.cs:1:7:1:17 | call to constructor Object | | +| Assignments.cs:1:7:1:17 | call to method | Assignments.cs:1:7:1:17 | call to constructor Object | | +| Assignments.cs:1:7:1:17 | enter Assignments | Assignments.cs:1:7:1:17 | this access | | | Assignments.cs:1:7:1:17 | exit Assignments (normal) | Assignments.cs:1:7:1:17 | exit Assignments | | +| Assignments.cs:1:7:1:17 | this access | Assignments.cs:1:7:1:17 | call to method | | | Assignments.cs:1:7:1:17 | {...} | Assignments.cs:1:7:1:17 | exit Assignments (normal) | | | Assignments.cs:3:10:3:10 | enter M | Assignments.cs:4:5:15:5 | {...} | | | Assignments.cs:3:10:3:10 | exit M (normal) | Assignments.cs:3:10:3:10 | exit M | | @@ -840,8 +848,10 @@ | Assignments.cs:19:9:19:17 | return ...; | Assignments.cs:17:40:17:40 | exit + (normal) | return | | Assignments.cs:19:16:19:16 | access to parameter x | Assignments.cs:19:9:19:17 | return ...; | | | BreakInTry.cs:1:7:1:16 | call to constructor Object | BreakInTry.cs:1:7:1:16 | {...} | | -| BreakInTry.cs:1:7:1:16 | enter BreakInTry | BreakInTry.cs:1:7:1:16 | call to constructor Object | | +| BreakInTry.cs:1:7:1:16 | call to method | BreakInTry.cs:1:7:1:16 | call to constructor Object | | +| BreakInTry.cs:1:7:1:16 | enter BreakInTry | BreakInTry.cs:1:7:1:16 | this access | | | BreakInTry.cs:1:7:1:16 | exit BreakInTry (normal) | BreakInTry.cs:1:7:1:16 | exit BreakInTry | | +| BreakInTry.cs:1:7:1:16 | this access | BreakInTry.cs:1:7:1:16 | call to method | | | BreakInTry.cs:1:7:1:16 | {...} | BreakInTry.cs:1:7:1:16 | exit BreakInTry (normal) | | | BreakInTry.cs:3:10:3:11 | enter M1 | BreakInTry.cs:4:5:18:5 | {...} | | | BreakInTry.cs:3:10:3:11 | exit M1 (normal) | BreakInTry.cs:3:10:3:11 | exit M1 | | @@ -942,8 +952,10 @@ | BreakInTry.cs:67:28:67:31 | null | BreakInTry.cs:67:21:67:31 | ... == ... | | | BreakInTry.cs:68:21:68:26 | break; | BreakInTry.cs:56:10:56:11 | exit M4 (normal) | break, return | | CompileTimeOperators.cs:3:7:3:26 | call to constructor Object | CompileTimeOperators.cs:3:7:3:26 | {...} | | -| CompileTimeOperators.cs:3:7:3:26 | enter CompileTimeOperators | CompileTimeOperators.cs:3:7:3:26 | call to constructor Object | | +| CompileTimeOperators.cs:3:7:3:26 | call to method | CompileTimeOperators.cs:3:7:3:26 | call to constructor Object | | +| CompileTimeOperators.cs:3:7:3:26 | enter CompileTimeOperators | CompileTimeOperators.cs:3:7:3:26 | this access | | | CompileTimeOperators.cs:3:7:3:26 | exit CompileTimeOperators (normal) | CompileTimeOperators.cs:3:7:3:26 | exit CompileTimeOperators | | +| CompileTimeOperators.cs:3:7:3:26 | this access | CompileTimeOperators.cs:3:7:3:26 | call to method | | | CompileTimeOperators.cs:3:7:3:26 | {...} | CompileTimeOperators.cs:3:7:3:26 | exit CompileTimeOperators (normal) | | | CompileTimeOperators.cs:5:9:5:15 | enter Default | CompileTimeOperators.cs:6:5:8:5 | {...} | | | CompileTimeOperators.cs:5:9:5:15 | exit Default (normal) | CompileTimeOperators.cs:5:9:5:15 | exit Default | | @@ -966,8 +978,10 @@ | CompileTimeOperators.cs:22:9:22:25 | return ...; | CompileTimeOperators.cs:20:12:20:17 | exit Nameof (normal) | return | | CompileTimeOperators.cs:22:16:22:24 | nameof(...) | CompileTimeOperators.cs:22:9:22:25 | return ...; | | | CompileTimeOperators.cs:26:7:26:22 | call to constructor Object | CompileTimeOperators.cs:26:7:26:22 | {...} | | -| CompileTimeOperators.cs:26:7:26:22 | enter GotoInTryFinally | CompileTimeOperators.cs:26:7:26:22 | call to constructor Object | | +| CompileTimeOperators.cs:26:7:26:22 | call to method | CompileTimeOperators.cs:26:7:26:22 | call to constructor Object | | +| CompileTimeOperators.cs:26:7:26:22 | enter GotoInTryFinally | CompileTimeOperators.cs:26:7:26:22 | this access | | | CompileTimeOperators.cs:26:7:26:22 | exit GotoInTryFinally (normal) | CompileTimeOperators.cs:26:7:26:22 | exit GotoInTryFinally | | +| CompileTimeOperators.cs:26:7:26:22 | this access | CompileTimeOperators.cs:26:7:26:22 | call to method | | | CompileTimeOperators.cs:26:7:26:22 | {...} | CompileTimeOperators.cs:26:7:26:22 | exit GotoInTryFinally (normal) | | | CompileTimeOperators.cs:28:10:28:10 | enter M | CompileTimeOperators.cs:29:5:41:5 | {...} | | | CompileTimeOperators.cs:28:10:28:10 | exit M (abnormal) | CompileTimeOperators.cs:28:10:28:10 | exit M | | @@ -990,8 +1004,10 @@ | CompileTimeOperators.cs:40:14:40:38 | ...; | CompileTimeOperators.cs:40:32:40:36 | "End" | | | CompileTimeOperators.cs:40:32:40:36 | "End" | CompileTimeOperators.cs:40:14:40:37 | call to method WriteLine | | | ConditionalAccess.cs:1:7:1:23 | call to constructor Object | ConditionalAccess.cs:1:7:1:23 | {...} | | -| ConditionalAccess.cs:1:7:1:23 | enter ConditionalAccess | ConditionalAccess.cs:1:7:1:23 | call to constructor Object | | +| ConditionalAccess.cs:1:7:1:23 | call to method | ConditionalAccess.cs:1:7:1:23 | call to constructor Object | | +| ConditionalAccess.cs:1:7:1:23 | enter ConditionalAccess | ConditionalAccess.cs:1:7:1:23 | this access | | | ConditionalAccess.cs:1:7:1:23 | exit ConditionalAccess (normal) | ConditionalAccess.cs:1:7:1:23 | exit ConditionalAccess | | +| ConditionalAccess.cs:1:7:1:23 | this access | ConditionalAccess.cs:1:7:1:23 | call to method | | | ConditionalAccess.cs:1:7:1:23 | {...} | ConditionalAccess.cs:1:7:1:23 | exit ConditionalAccess (normal) | | | ConditionalAccess.cs:3:12:3:13 | enter M1 | ConditionalAccess.cs:3:26:3:26 | access to parameter i | | | ConditionalAccess.cs:3:12:3:13 | exit M1 (normal) | ConditionalAccess.cs:3:12:3:13 | exit M1 | | @@ -1085,8 +1101,10 @@ | ConditionalAccess.cs:41:75:41:78 | ", " | ConditionalAccess.cs:41:70:41:78 | ... + ... | | | ConditionalAccess.cs:41:82:41:83 | access to parameter s2 | ConditionalAccess.cs:41:70:41:83 | ... + ... | | | Conditions.cs:1:7:1:16 | call to constructor Object | Conditions.cs:1:7:1:16 | {...} | | -| Conditions.cs:1:7:1:16 | enter Conditions | Conditions.cs:1:7:1:16 | call to constructor Object | | +| Conditions.cs:1:7:1:16 | call to method | Conditions.cs:1:7:1:16 | call to constructor Object | | +| Conditions.cs:1:7:1:16 | enter Conditions | Conditions.cs:1:7:1:16 | this access | | | Conditions.cs:1:7:1:16 | exit Conditions (normal) | Conditions.cs:1:7:1:16 | exit Conditions | | +| Conditions.cs:1:7:1:16 | this access | Conditions.cs:1:7:1:16 | call to method | | | Conditions.cs:1:7:1:16 | {...} | Conditions.cs:1:7:1:16 | exit Conditions (normal) | | | Conditions.cs:3:10:3:19 | enter IncrOrDecr | Conditions.cs:4:5:9:5 | {...} | | | Conditions.cs:3:10:3:19 | exit IncrOrDecr (normal) | Conditions.cs:3:10:3:19 | exit IncrOrDecr | | @@ -1427,8 +1445,10 @@ | Conditions.cs:149:44:149:46 | {...} | Conditions.cs:149:38:149:47 | $"..." | | | Conditions.cs:149:45:149:45 | access to local variable s | Conditions.cs:149:44:149:46 | {...} | | | ExitMethods.cs:6:7:6:17 | call to constructor Object | ExitMethods.cs:6:7:6:17 | {...} | | -| ExitMethods.cs:6:7:6:17 | enter ExitMethods | ExitMethods.cs:6:7:6:17 | call to constructor Object | | +| ExitMethods.cs:6:7:6:17 | call to method | ExitMethods.cs:6:7:6:17 | call to constructor Object | | +| ExitMethods.cs:6:7:6:17 | enter ExitMethods | ExitMethods.cs:6:7:6:17 | this access | | | ExitMethods.cs:6:7:6:17 | exit ExitMethods (normal) | ExitMethods.cs:6:7:6:17 | exit ExitMethods | | +| ExitMethods.cs:6:7:6:17 | this access | ExitMethods.cs:6:7:6:17 | call to method | | | ExitMethods.cs:6:7:6:17 | {...} | ExitMethods.cs:6:7:6:17 | exit ExitMethods (normal) | | | ExitMethods.cs:8:10:8:11 | enter M1 | ExitMethods.cs:9:5:12:5 | {...} | | | ExitMethods.cs:8:10:8:11 | exit M1 (normal) | ExitMethods.cs:8:10:8:11 | exit M1 | | @@ -1639,8 +1659,10 @@ | Extensions.cs:25:23:25:32 | access to method Parse | Extensions.cs:25:23:25:32 | delegate creation of type Func | | | Extensions.cs:25:23:25:32 | delegate creation of type Func | Extensions.cs:25:9:25:33 | call to method ToBool | | | Finally.cs:3:14:3:20 | call to constructor Object | Finally.cs:3:14:3:20 | {...} | | -| Finally.cs:3:14:3:20 | enter Finally | Finally.cs:3:14:3:20 | call to constructor Object | | +| Finally.cs:3:14:3:20 | call to method | Finally.cs:3:14:3:20 | call to constructor Object | | +| Finally.cs:3:14:3:20 | enter Finally | Finally.cs:3:14:3:20 | this access | | | Finally.cs:3:14:3:20 | exit Finally (normal) | Finally.cs:3:14:3:20 | exit Finally | | +| Finally.cs:3:14:3:20 | this access | Finally.cs:3:14:3:20 | call to method | | | Finally.cs:3:14:3:20 | {...} | Finally.cs:3:14:3:20 | exit Finally (normal) | | | Finally.cs:7:10:7:11 | enter M1 | Finally.cs:8:5:17:5 | {...} | | | Finally.cs:7:10:7:11 | exit M1 (abnormal) | Finally.cs:7:10:7:11 | exit M1 | | @@ -1906,16 +1928,22 @@ | Finally.cs:167:17:167:38 | ...; | Finally.cs:167:35:167:36 | "" | | | Finally.cs:167:35:167:36 | "" | Finally.cs:167:17:167:37 | call to method WriteLine | | | Finally.cs:172:11:172:20 | call to constructor Exception | Finally.cs:172:11:172:20 | {...} | | -| Finally.cs:172:11:172:20 | enter ExceptionA | Finally.cs:172:11:172:20 | call to constructor Exception | | +| Finally.cs:172:11:172:20 | call to method | Finally.cs:172:11:172:20 | call to constructor Exception | | +| Finally.cs:172:11:172:20 | enter ExceptionA | Finally.cs:172:11:172:20 | this access | | | Finally.cs:172:11:172:20 | exit ExceptionA (normal) | Finally.cs:172:11:172:20 | exit ExceptionA | | +| Finally.cs:172:11:172:20 | this access | Finally.cs:172:11:172:20 | call to method | | | Finally.cs:172:11:172:20 | {...} | Finally.cs:172:11:172:20 | exit ExceptionA (normal) | | | Finally.cs:173:11:173:20 | call to constructor Exception | Finally.cs:173:11:173:20 | {...} | | -| Finally.cs:173:11:173:20 | enter ExceptionB | Finally.cs:173:11:173:20 | call to constructor Exception | | +| Finally.cs:173:11:173:20 | call to method | Finally.cs:173:11:173:20 | call to constructor Exception | | +| Finally.cs:173:11:173:20 | enter ExceptionB | Finally.cs:173:11:173:20 | this access | | | Finally.cs:173:11:173:20 | exit ExceptionB (normal) | Finally.cs:173:11:173:20 | exit ExceptionB | | +| Finally.cs:173:11:173:20 | this access | Finally.cs:173:11:173:20 | call to method | | | Finally.cs:173:11:173:20 | {...} | Finally.cs:173:11:173:20 | exit ExceptionB (normal) | | | Finally.cs:174:11:174:20 | call to constructor Exception | Finally.cs:174:11:174:20 | {...} | | -| Finally.cs:174:11:174:20 | enter ExceptionC | Finally.cs:174:11:174:20 | call to constructor Exception | | +| Finally.cs:174:11:174:20 | call to method | Finally.cs:174:11:174:20 | call to constructor Exception | | +| Finally.cs:174:11:174:20 | enter ExceptionC | Finally.cs:174:11:174:20 | this access | | | Finally.cs:174:11:174:20 | exit ExceptionC (normal) | Finally.cs:174:11:174:20 | exit ExceptionC | | +| Finally.cs:174:11:174:20 | this access | Finally.cs:174:11:174:20 | call to method | | | Finally.cs:174:11:174:20 | {...} | Finally.cs:174:11:174:20 | exit ExceptionC (normal) | | | Finally.cs:176:10:176:11 | enter M9 | Finally.cs:177:5:193:5 | {...} | | | Finally.cs:176:10:176:11 | exit M9 (abnormal) | Finally.cs:176:10:176:11 | exit M9 | | @@ -2067,8 +2095,10 @@ | Finally.cs:272:13:272:19 | ...; | Finally.cs:272:13:272:13 | access to parameter i | | | Finally.cs:272:18:272:18 | 3 | Finally.cs:272:13:272:18 | ... + ... | | | Foreach.cs:4:7:4:13 | call to constructor Object | Foreach.cs:4:7:4:13 | {...} | | -| Foreach.cs:4:7:4:13 | enter Foreach | Foreach.cs:4:7:4:13 | call to constructor Object | | +| Foreach.cs:4:7:4:13 | call to method | Foreach.cs:4:7:4:13 | call to constructor Object | | +| Foreach.cs:4:7:4:13 | enter Foreach | Foreach.cs:4:7:4:13 | this access | | | Foreach.cs:4:7:4:13 | exit Foreach (normal) | Foreach.cs:4:7:4:13 | exit Foreach | | +| Foreach.cs:4:7:4:13 | this access | Foreach.cs:4:7:4:13 | call to method | | | Foreach.cs:4:7:4:13 | {...} | Foreach.cs:4:7:4:13 | exit Foreach (normal) | | | Foreach.cs:6:10:6:11 | enter M1 | Foreach.cs:7:5:10:5 | {...} | | | Foreach.cs:6:10:6:11 | exit M1 (normal) | Foreach.cs:6:10:6:11 | exit M1 | | @@ -2129,38 +2159,33 @@ | Foreach.cs:38:33:38:33 | Int32 y | Foreach.cs:38:18:38:34 | (..., ...) | | | Foreach.cs:38:39:38:42 | access to parameter args | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | | | Foreach.cs:39:11:39:11 | ; | Foreach.cs:38:9:39:11 | foreach (... ... in ...) ... | | +| Initializers.cs:3:7:3:18 | enter | Initializers.cs:5:9:5:9 | this access | | | Initializers.cs:3:7:3:18 | enter Initializers | Initializers.cs:3:7:3:18 | {...} | | +| Initializers.cs:3:7:3:18 | exit (normal) | Initializers.cs:3:7:3:18 | exit | | | Initializers.cs:3:7:3:18 | exit Initializers (normal) | Initializers.cs:3:7:3:18 | exit Initializers | | | Initializers.cs:3:7:3:18 | {...} | Initializers.cs:3:7:3:18 | exit Initializers (normal) | | | Initializers.cs:5:9:5:9 | this access | Initializers.cs:5:13:5:13 | access to field H | | -| Initializers.cs:5:9:5:9 | this access | Initializers.cs:5:13:5:13 | access to field H | | -| Initializers.cs:5:9:5:17 | ... = ... | Initializers.cs:6:9:6:9 | this access | | | Initializers.cs:5:9:5:17 | ... = ... | Initializers.cs:6:9:6:9 | this access | | | Initializers.cs:5:13:5:13 | access to field H | Initializers.cs:5:17:5:17 | 1 | | -| Initializers.cs:5:13:5:13 | access to field H | Initializers.cs:5:17:5:17 | 1 | | -| Initializers.cs:5:13:5:17 | ... + ... | Initializers.cs:5:9:5:17 | ... = ... | | | Initializers.cs:5:13:5:17 | ... + ... | Initializers.cs:5:9:5:17 | ... = ... | | | Initializers.cs:5:17:5:17 | 1 | Initializers.cs:5:13:5:17 | ... + ... | | -| Initializers.cs:5:17:5:17 | 1 | Initializers.cs:5:13:5:17 | ... + ... | | -| Initializers.cs:6:9:6:9 | access to property G | Initializers.cs:6:25:6:31 | ... = ... | | | Initializers.cs:6:9:6:9 | access to property G | Initializers.cs:6:25:6:31 | ... = ... | | | Initializers.cs:6:9:6:9 | this access | Initializers.cs:6:27:6:27 | access to field H | | -| Initializers.cs:6:9:6:9 | this access | Initializers.cs:6:27:6:27 | access to field H | | -| Initializers.cs:6:25:6:31 | ... = ... | Initializers.cs:8:20:8:22 | {...} | | -| Initializers.cs:6:25:6:31 | ... = ... | Initializers.cs:10:28:10:30 | {...} | | -| Initializers.cs:6:27:6:27 | access to field H | Initializers.cs:6:31:6:31 | 2 | | +| Initializers.cs:6:25:6:31 | ... = ... | Initializers.cs:3:7:3:18 | exit (normal) | | | Initializers.cs:6:27:6:27 | access to field H | Initializers.cs:6:31:6:31 | 2 | | | Initializers.cs:6:27:6:31 | ... + ... | Initializers.cs:6:9:6:9 | access to property G | | -| Initializers.cs:6:27:6:31 | ... + ... | Initializers.cs:6:9:6:9 | access to property G | | | Initializers.cs:6:31:6:31 | 2 | Initializers.cs:6:27:6:31 | ... + ... | | -| Initializers.cs:6:31:6:31 | 2 | Initializers.cs:6:27:6:31 | ... + ... | | -| Initializers.cs:8:5:8:16 | call to constructor Object | Initializers.cs:5:9:5:9 | this access | | -| Initializers.cs:8:5:8:16 | enter Initializers | Initializers.cs:8:5:8:16 | call to constructor Object | | +| Initializers.cs:8:5:8:16 | call to constructor Object | Initializers.cs:8:20:8:22 | {...} | | +| Initializers.cs:8:5:8:16 | call to method | Initializers.cs:8:5:8:16 | call to constructor Object | | +| Initializers.cs:8:5:8:16 | enter Initializers | Initializers.cs:8:5:8:16 | this access | | | Initializers.cs:8:5:8:16 | exit Initializers (normal) | Initializers.cs:8:5:8:16 | exit Initializers | | +| Initializers.cs:8:5:8:16 | this access | Initializers.cs:8:5:8:16 | call to method | | | Initializers.cs:8:20:8:22 | {...} | Initializers.cs:8:5:8:16 | exit Initializers (normal) | | -| Initializers.cs:10:5:10:16 | call to constructor Object | Initializers.cs:5:9:5:9 | this access | | -| Initializers.cs:10:5:10:16 | enter Initializers | Initializers.cs:10:5:10:16 | call to constructor Object | | +| Initializers.cs:10:5:10:16 | call to constructor Object | Initializers.cs:10:28:10:30 | {...} | | +| Initializers.cs:10:5:10:16 | call to method | Initializers.cs:10:5:10:16 | call to constructor Object | | +| Initializers.cs:10:5:10:16 | enter Initializers | Initializers.cs:10:5:10:16 | this access | | | Initializers.cs:10:5:10:16 | exit Initializers (normal) | Initializers.cs:10:5:10:16 | exit Initializers | | +| Initializers.cs:10:5:10:16 | this access | Initializers.cs:10:5:10:16 | call to method | | | Initializers.cs:10:28:10:30 | {...} | Initializers.cs:10:5:10:16 | exit Initializers (normal) | | | Initializers.cs:12:10:12:10 | enter M | Initializers.cs:13:5:16:5 | {...} | | | Initializers.cs:12:10:12:10 | exit M (normal) | Initializers.cs:12:10:12:10 | exit M | | @@ -2187,25 +2212,30 @@ | Initializers.cs:18:16:18:16 | exit H (normal) | Initializers.cs:18:16:18:16 | exit H | | | Initializers.cs:18:16:18:20 | ... = ... | Initializers.cs:18:16:18:16 | exit H (normal) | | | Initializers.cs:18:20:18:20 | 1 | Initializers.cs:18:16:18:20 | ... = ... | | -| Initializers.cs:20:11:20:23 | call to constructor Object | Initializers.cs:22:23:22:23 | this access | | -| Initializers.cs:20:11:20:23 | enter NoConstructor | Initializers.cs:20:11:20:23 | call to constructor Object | | +| Initializers.cs:20:11:20:23 | call to constructor Object | Initializers.cs:20:11:20:23 | {...} | | +| Initializers.cs:20:11:20:23 | call to method | Initializers.cs:20:11:20:23 | call to constructor Object | | +| Initializers.cs:20:11:20:23 | enter | Initializers.cs:22:23:22:23 | this access | | +| Initializers.cs:20:11:20:23 | enter NoConstructor | Initializers.cs:20:11:20:23 | this access | | +| Initializers.cs:20:11:20:23 | exit (normal) | Initializers.cs:20:11:20:23 | exit | | | Initializers.cs:20:11:20:23 | exit NoConstructor (normal) | Initializers.cs:20:11:20:23 | exit NoConstructor | | +| Initializers.cs:20:11:20:23 | this access | Initializers.cs:20:11:20:23 | call to method | | | Initializers.cs:20:11:20:23 | {...} | Initializers.cs:20:11:20:23 | exit NoConstructor (normal) | | | Initializers.cs:22:23:22:23 | this access | Initializers.cs:22:27:22:27 | 0 | | | Initializers.cs:22:23:22:27 | ... = ... | Initializers.cs:23:23:23:23 | this access | | | Initializers.cs:22:27:22:27 | 0 | Initializers.cs:22:23:22:27 | ... = ... | | | Initializers.cs:23:23:23:23 | this access | Initializers.cs:23:27:23:27 | 1 | | -| Initializers.cs:23:23:23:27 | ... = ... | Initializers.cs:20:11:20:23 | {...} | | +| Initializers.cs:23:23:23:27 | ... = ... | Initializers.cs:20:11:20:23 | exit (normal) | | | Initializers.cs:23:27:23:27 | 1 | Initializers.cs:23:23:23:27 | ... = ... | | +| Initializers.cs:26:11:26:13 | enter | Initializers.cs:28:13:28:13 | this access | | +| Initializers.cs:26:11:26:13 | exit (normal) | Initializers.cs:26:11:26:13 | exit | | | Initializers.cs:28:13:28:13 | this access | Initializers.cs:28:17:28:17 | 2 | | -| Initializers.cs:28:13:28:13 | this access | Initializers.cs:28:17:28:17 | 2 | | -| Initializers.cs:28:13:28:17 | ... = ... | Initializers.cs:31:24:31:33 | {...} | | -| Initializers.cs:28:13:28:17 | ... = ... | Initializers.cs:35:27:35:40 | {...} | | +| Initializers.cs:28:13:28:17 | ... = ... | Initializers.cs:26:11:26:13 | exit (normal) | | | Initializers.cs:28:17:28:17 | 2 | Initializers.cs:28:13:28:17 | ... = ... | | -| Initializers.cs:28:17:28:17 | 2 | Initializers.cs:28:13:28:17 | ... = ... | | -| Initializers.cs:31:9:31:11 | enter Sub | Initializers.cs:31:17:31:20 | call to constructor NoConstructor | | +| Initializers.cs:31:9:31:11 | call to method | Initializers.cs:31:17:31:20 | call to constructor NoConstructor | | +| Initializers.cs:31:9:31:11 | enter Sub | Initializers.cs:31:9:31:11 | this access | | | Initializers.cs:31:9:31:11 | exit Sub (normal) | Initializers.cs:31:9:31:11 | exit Sub | | -| Initializers.cs:31:17:31:20 | call to constructor NoConstructor | Initializers.cs:28:13:28:13 | this access | | +| Initializers.cs:31:9:31:11 | this access | Initializers.cs:31:9:31:11 | call to method | | +| Initializers.cs:31:17:31:20 | call to constructor NoConstructor | Initializers.cs:31:24:31:33 | {...} | | | Initializers.cs:31:24:31:33 | {...} | Initializers.cs:31:26:31:31 | ...; | | | Initializers.cs:31:26:31:26 | this access | Initializers.cs:31:30:31:30 | 3 | | | Initializers.cs:31:26:31:30 | ... = ... | Initializers.cs:31:9:31:11 | exit Sub (normal) | | @@ -2219,9 +2249,11 @@ | Initializers.cs:33:31:33:35 | ... = ... | Initializers.cs:33:9:33:11 | exit Sub (normal) | | | Initializers.cs:33:31:33:36 | ...; | Initializers.cs:33:31:33:31 | this access | | | Initializers.cs:33:35:33:35 | access to parameter i | Initializers.cs:33:31:33:35 | ... = ... | | -| Initializers.cs:35:9:35:11 | call to constructor NoConstructor | Initializers.cs:28:13:28:13 | this access | | -| Initializers.cs:35:9:35:11 | enter Sub | Initializers.cs:35:9:35:11 | call to constructor NoConstructor | | +| Initializers.cs:35:9:35:11 | call to constructor NoConstructor | Initializers.cs:35:27:35:40 | {...} | | +| Initializers.cs:35:9:35:11 | call to method | Initializers.cs:35:9:35:11 | call to constructor NoConstructor | | +| Initializers.cs:35:9:35:11 | enter Sub | Initializers.cs:35:9:35:11 | this access | | | Initializers.cs:35:9:35:11 | exit Sub (normal) | Initializers.cs:35:9:35:11 | exit Sub | | +| Initializers.cs:35:9:35:11 | this access | Initializers.cs:35:9:35:11 | call to method | | | Initializers.cs:35:27:35:40 | {...} | Initializers.cs:35:29:35:38 | ...; | | | Initializers.cs:35:29:35:29 | this access | Initializers.cs:35:33:35:33 | access to parameter i | | | Initializers.cs:35:29:35:37 | ... = ... | Initializers.cs:35:9:35:11 | exit Sub (normal) | | @@ -2230,12 +2262,16 @@ | Initializers.cs:35:33:35:37 | ... + ... | Initializers.cs:35:29:35:37 | ... = ... | | | Initializers.cs:35:37:35:37 | access to parameter j | Initializers.cs:35:33:35:37 | ... + ... | | | Initializers.cs:39:7:39:23 | call to constructor Object | Initializers.cs:39:7:39:23 | {...} | | -| Initializers.cs:39:7:39:23 | enter IndexInitializers | Initializers.cs:39:7:39:23 | call to constructor Object | | +| Initializers.cs:39:7:39:23 | call to method | Initializers.cs:39:7:39:23 | call to constructor Object | | +| Initializers.cs:39:7:39:23 | enter IndexInitializers | Initializers.cs:39:7:39:23 | this access | | | Initializers.cs:39:7:39:23 | exit IndexInitializers (normal) | Initializers.cs:39:7:39:23 | exit IndexInitializers | | +| Initializers.cs:39:7:39:23 | this access | Initializers.cs:39:7:39:23 | call to method | | | Initializers.cs:39:7:39:23 | {...} | Initializers.cs:39:7:39:23 | exit IndexInitializers (normal) | | | Initializers.cs:41:11:41:18 | call to constructor Object | Initializers.cs:41:11:41:18 | {...} | | -| Initializers.cs:41:11:41:18 | enter Compound | Initializers.cs:41:11:41:18 | call to constructor Object | | +| Initializers.cs:41:11:41:18 | call to method | Initializers.cs:41:11:41:18 | call to constructor Object | | +| Initializers.cs:41:11:41:18 | enter Compound | Initializers.cs:41:11:41:18 | this access | | | Initializers.cs:41:11:41:18 | exit Compound (normal) | Initializers.cs:41:11:41:18 | exit Compound | | +| Initializers.cs:41:11:41:18 | this access | Initializers.cs:41:11:41:18 | call to method | | | Initializers.cs:41:11:41:18 | {...} | Initializers.cs:41:11:41:18 | exit Compound (normal) | | | Initializers.cs:51:10:51:13 | enter Test | Initializers.cs:52:5:66:5 | {...} | | | Initializers.cs:51:10:51:13 | exit Test (normal) | Initializers.cs:51:10:51:13 | exit Test | | @@ -2342,8 +2378,10 @@ | Initializers.cs:64:54:64:54 | 0 | Initializers.cs:64:50:64:54 | ... + ... | | | Initializers.cs:64:59:64:61 | "1" | Initializers.cs:64:46:64:61 | ... = ... | | | LoopUnrolling.cs:5:7:5:19 | call to constructor Object | LoopUnrolling.cs:5:7:5:19 | {...} | | -| LoopUnrolling.cs:5:7:5:19 | enter LoopUnrolling | LoopUnrolling.cs:5:7:5:19 | call to constructor Object | | +| LoopUnrolling.cs:5:7:5:19 | call to method | LoopUnrolling.cs:5:7:5:19 | call to constructor Object | | +| LoopUnrolling.cs:5:7:5:19 | enter LoopUnrolling | LoopUnrolling.cs:5:7:5:19 | this access | | | LoopUnrolling.cs:5:7:5:19 | exit LoopUnrolling (normal) | LoopUnrolling.cs:5:7:5:19 | exit LoopUnrolling | | +| LoopUnrolling.cs:5:7:5:19 | this access | LoopUnrolling.cs:5:7:5:19 | call to method | | | LoopUnrolling.cs:5:7:5:19 | {...} | LoopUnrolling.cs:5:7:5:19 | exit LoopUnrolling (normal) | | | LoopUnrolling.cs:7:10:7:11 | enter M1 | LoopUnrolling.cs:8:5:13:5 | {...} | | | LoopUnrolling.cs:7:10:7:11 | exit M1 (normal) | LoopUnrolling.cs:7:10:7:11 | exit M1 | | @@ -2558,9 +2596,11 @@ | LoopUnrolling.cs:99:13:99:33 | ...; | LoopUnrolling.cs:99:31:99:31 | access to local variable x | | | LoopUnrolling.cs:99:31:99:31 | access to local variable x | LoopUnrolling.cs:99:13:99:32 | call to method WriteLine | | | MultiImplementationA.cs:4:7:4:8 | call to constructor Object | MultiImplementationA.cs:4:7:4:8 | {...} | | -| MultiImplementationA.cs:4:7:4:8 | enter C1 | MultiImplementationA.cs:4:7:4:8 | call to constructor Object | | -| MultiImplementationA.cs:4:7:4:8 | enter C1 | MultiImplementationB.cs:1:7:1:8 | call to constructor Object | | +| MultiImplementationA.cs:4:7:4:8 | call to method | MultiImplementationA.cs:4:7:4:8 | call to constructor Object | | +| MultiImplementationA.cs:4:7:4:8 | enter C1 | MultiImplementationA.cs:4:7:4:8 | this access | | +| MultiImplementationA.cs:4:7:4:8 | enter C1 | MultiImplementationB.cs:1:7:1:8 | this access | | | MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | MultiImplementationA.cs:4:7:4:8 | exit C1 | | +| MultiImplementationA.cs:4:7:4:8 | this access | MultiImplementationA.cs:4:7:4:8 | call to method | | | MultiImplementationA.cs:4:7:4:8 | {...} | MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | | | MultiImplementationA.cs:6:22:6:31 | enter get_P1 | MultiImplementationA.cs:6:28:6:31 | null | | | MultiImplementationA.cs:6:22:6:31 | enter get_P1 | MultiImplementationB.cs:3:22:3:22 | 0 | | @@ -2588,6 +2628,9 @@ | MultiImplementationA.cs:8:16:8:16 | exit M (normal) | MultiImplementationA.cs:8:16:8:16 | exit M | | | MultiImplementationA.cs:8:23:8:32 | throw ... | MultiImplementationA.cs:8:16:8:16 | exit M (abnormal) | exception | | MultiImplementationA.cs:8:29:8:32 | null | MultiImplementationA.cs:8:23:8:32 | throw ... | | +| MultiImplementationA.cs:11:7:11:8 | enter | MultiImplementationA.cs:13:16:13:16 | this access | | +| MultiImplementationA.cs:11:7:11:8 | enter | MultiImplementationB.cs:11:16:11:16 | this access | | +| MultiImplementationA.cs:11:7:11:8 | exit (normal) | MultiImplementationA.cs:11:7:11:8 | exit | | | MultiImplementationA.cs:13:16:13:16 | this access | MultiImplementationA.cs:13:20:13:20 | 0 | | | MultiImplementationA.cs:13:16:13:20 | ... = ... | MultiImplementationA.cs:24:16:24:16 | this access | | | MultiImplementationA.cs:13:20:13:20 | 0 | MultiImplementationA.cs:13:16:13:20 | ... = ... | | @@ -2615,11 +2658,13 @@ | MultiImplementationA.cs:18:9:18:22 | enter M2 | MultiImplementationA.cs:18:21:18:21 | 0 | | | MultiImplementationA.cs:18:9:18:22 | exit M2 (normal) | MultiImplementationA.cs:18:9:18:22 | exit M2 | | | MultiImplementationA.cs:18:21:18:21 | 0 | MultiImplementationA.cs:18:9:18:22 | exit M2 (normal) | | -| MultiImplementationA.cs:20:12:20:13 | call to constructor Object | MultiImplementationA.cs:13:16:13:16 | this access | | -| MultiImplementationA.cs:20:12:20:13 | enter C2 | MultiImplementationA.cs:20:12:20:13 | call to constructor Object | | -| MultiImplementationA.cs:20:12:20:13 | enter C2 | MultiImplementationB.cs:18:12:18:13 | call to constructor Object | | +| MultiImplementationA.cs:20:12:20:13 | call to constructor Object | MultiImplementationA.cs:20:22:20:31 | {...} | | +| MultiImplementationA.cs:20:12:20:13 | call to method | MultiImplementationA.cs:20:12:20:13 | call to constructor Object | | +| MultiImplementationA.cs:20:12:20:13 | enter C2 | MultiImplementationA.cs:20:12:20:13 | this access | | +| MultiImplementationA.cs:20:12:20:13 | enter C2 | MultiImplementationB.cs:18:12:18:13 | this access | | | MultiImplementationA.cs:20:12:20:13 | exit C2 (abnormal) | MultiImplementationA.cs:20:12:20:13 | exit C2 | | | MultiImplementationA.cs:20:12:20:13 | exit C2 (normal) | MultiImplementationA.cs:20:12:20:13 | exit C2 | | +| MultiImplementationA.cs:20:12:20:13 | this access | MultiImplementationA.cs:20:12:20:13 | call to method | | | MultiImplementationA.cs:20:22:20:31 | {...} | MultiImplementationA.cs:20:24:20:29 | ...; | | | MultiImplementationA.cs:20:24:20:24 | this access | MultiImplementationA.cs:20:28:20:28 | access to parameter i | | | MultiImplementationA.cs:20:24:20:28 | ... = ... | MultiImplementationA.cs:20:12:20:13 | exit C2 (normal) | | @@ -2643,21 +2688,25 @@ | MultiImplementationA.cs:23:50:23:53 | null | MultiImplementationA.cs:23:28:23:35 | exit implicit conversion (normal) | | | MultiImplementationA.cs:24:16:24:16 | access to property P | MultiImplementationA.cs:24:32:24:34 | ... = ... | | | MultiImplementationA.cs:24:16:24:16 | this access | MultiImplementationA.cs:24:34:24:34 | 0 | | -| MultiImplementationA.cs:24:32:24:34 | ... = ... | MultiImplementationA.cs:20:22:20:31 | {...} | | +| MultiImplementationA.cs:24:32:24:34 | ... = ... | MultiImplementationA.cs:11:7:11:8 | exit (normal) | | | MultiImplementationA.cs:24:34:24:34 | 0 | MultiImplementationA.cs:24:16:24:16 | access to property P | | | MultiImplementationA.cs:28:7:28:8 | call to constructor Object | MultiImplementationA.cs:28:7:28:8 | {...} | | -| MultiImplementationA.cs:28:7:28:8 | enter C3 | MultiImplementationA.cs:28:7:28:8 | call to constructor Object | | -| MultiImplementationA.cs:28:7:28:8 | enter C3 | MultiImplementationB.cs:25:7:25:8 | call to constructor Object | | +| MultiImplementationA.cs:28:7:28:8 | call to method | MultiImplementationA.cs:28:7:28:8 | call to constructor Object | | +| MultiImplementationA.cs:28:7:28:8 | enter C3 | MultiImplementationA.cs:28:7:28:8 | this access | | +| MultiImplementationA.cs:28:7:28:8 | enter C3 | MultiImplementationB.cs:25:7:25:8 | this access | | | MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | MultiImplementationA.cs:28:7:28:8 | exit C3 | | +| MultiImplementationA.cs:28:7:28:8 | this access | MultiImplementationA.cs:28:7:28:8 | call to method | | | MultiImplementationA.cs:28:7:28:8 | {...} | MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | | | MultiImplementationA.cs:30:21:30:23 | enter get_P3 | MultiImplementationA.cs:30:34:30:37 | null | | | MultiImplementationA.cs:30:21:30:23 | exit get_P3 (abnormal) | MultiImplementationA.cs:30:21:30:23 | exit get_P3 | | | MultiImplementationA.cs:30:28:30:37 | throw ... | MultiImplementationA.cs:30:21:30:23 | exit get_P3 (abnormal) | exception | | MultiImplementationA.cs:30:34:30:37 | null | MultiImplementationA.cs:30:28:30:37 | throw ... | | | MultiImplementationA.cs:34:15:34:16 | call to constructor Object | MultiImplementationA.cs:34:15:34:16 | {...} | | -| MultiImplementationA.cs:34:15:34:16 | enter C4 | MultiImplementationA.cs:34:15:34:16 | call to constructor Object | | -| MultiImplementationA.cs:34:15:34:16 | enter C4 | MultiImplementationB.cs:30:15:30:16 | call to constructor Object | | +| MultiImplementationA.cs:34:15:34:16 | call to method | MultiImplementationA.cs:34:15:34:16 | call to constructor Object | | +| MultiImplementationA.cs:34:15:34:16 | enter C4 | MultiImplementationA.cs:34:15:34:16 | this access | | +| MultiImplementationA.cs:34:15:34:16 | enter C4 | MultiImplementationB.cs:30:15:30:16 | this access | | | MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | MultiImplementationA.cs:34:15:34:16 | exit C4 | | +| MultiImplementationA.cs:34:15:34:16 | this access | MultiImplementationA.cs:34:15:34:16 | call to method | | | MultiImplementationA.cs:34:15:34:16 | {...} | MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | | | MultiImplementationA.cs:36:9:36:10 | enter M1 | MultiImplementationA.cs:36:14:36:28 | {...} | | | MultiImplementationA.cs:36:9:36:10 | enter M1 | MultiImplementationB.cs:32:17:32:17 | 0 | | @@ -2672,6 +2721,8 @@ | MultiImplementationA.cs:37:16:37:26 | throw ...; | MultiImplementationA.cs:37:9:37:10 | exit M2 (abnormal) | exception | | MultiImplementationA.cs:37:22:37:25 | null | MultiImplementationA.cs:37:16:37:26 | throw ...; | | | MultiImplementationB.cs:1:7:1:8 | call to constructor Object | MultiImplementationB.cs:1:7:1:8 | {...} | | +| MultiImplementationB.cs:1:7:1:8 | call to method | MultiImplementationB.cs:1:7:1:8 | call to constructor Object | | +| MultiImplementationB.cs:1:7:1:8 | this access | MultiImplementationB.cs:1:7:1:8 | call to method | | | MultiImplementationB.cs:1:7:1:8 | {...} | MultiImplementationA.cs:4:7:4:8 | exit C1 (normal) | | | MultiImplementationB.cs:3:22:3:22 | 0 | MultiImplementationA.cs:6:22:6:31 | exit get_P1 (normal) | | | MultiImplementationB.cs:4:25:4:37 | {...} | MultiImplementationB.cs:4:34:4:34 | 1 | | @@ -2694,7 +2745,9 @@ | MultiImplementationB.cs:16:9:16:31 | exit M2 (abnormal) | MultiImplementationB.cs:16:9:16:31 | exit M2 | | | MultiImplementationB.cs:16:21:16:30 | throw ... | MultiImplementationB.cs:16:9:16:31 | exit M2 (abnormal) | exception | | MultiImplementationB.cs:16:27:16:30 | null | MultiImplementationB.cs:16:21:16:30 | throw ... | | -| MultiImplementationB.cs:18:12:18:13 | call to constructor Object | MultiImplementationB.cs:11:16:11:16 | this access | | +| MultiImplementationB.cs:18:12:18:13 | call to constructor Object | MultiImplementationB.cs:18:22:18:36 | {...} | | +| MultiImplementationB.cs:18:12:18:13 | call to method | MultiImplementationB.cs:18:12:18:13 | call to constructor Object | | +| MultiImplementationB.cs:18:12:18:13 | this access | MultiImplementationB.cs:18:12:18:13 | call to method | | | MultiImplementationB.cs:18:22:18:36 | {...} | MultiImplementationB.cs:18:30:18:33 | null | | | MultiImplementationB.cs:18:24:18:34 | throw ...; | MultiImplementationA.cs:20:12:20:13 | exit C2 (abnormal) | exception | | MultiImplementationB.cs:18:30:18:33 | null | MultiImplementationB.cs:18:24:18:34 | throw ...; | | @@ -2708,16 +2761,22 @@ | MultiImplementationB.cs:21:56:21:59 | null | MultiImplementationB.cs:21:50:21:59 | throw ... | | | MultiImplementationB.cs:22:16:22:16 | access to property P | MultiImplementationB.cs:22:32:22:34 | ... = ... | | | MultiImplementationB.cs:22:16:22:16 | this access | MultiImplementationB.cs:22:34:22:34 | 1 | | -| MultiImplementationB.cs:22:32:22:34 | ... = ... | MultiImplementationB.cs:18:22:18:36 | {...} | | +| MultiImplementationB.cs:22:32:22:34 | ... = ... | MultiImplementationA.cs:11:7:11:8 | exit (normal) | | | MultiImplementationB.cs:22:34:22:34 | 1 | MultiImplementationB.cs:22:16:22:16 | access to property P | | | MultiImplementationB.cs:25:7:25:8 | call to constructor Object | MultiImplementationB.cs:25:7:25:8 | {...} | | +| MultiImplementationB.cs:25:7:25:8 | call to method | MultiImplementationB.cs:25:7:25:8 | call to constructor Object | | +| MultiImplementationB.cs:25:7:25:8 | this access | MultiImplementationB.cs:25:7:25:8 | call to method | | | MultiImplementationB.cs:25:7:25:8 | {...} | MultiImplementationA.cs:28:7:28:8 | exit C3 (normal) | | | MultiImplementationB.cs:30:15:30:16 | call to constructor Object | MultiImplementationB.cs:30:15:30:16 | {...} | | +| MultiImplementationB.cs:30:15:30:16 | call to method | MultiImplementationB.cs:30:15:30:16 | call to constructor Object | | +| MultiImplementationB.cs:30:15:30:16 | this access | MultiImplementationB.cs:30:15:30:16 | call to method | | | MultiImplementationB.cs:30:15:30:16 | {...} | MultiImplementationA.cs:34:15:34:16 | exit C4 (normal) | | | MultiImplementationB.cs:32:17:32:17 | 0 | MultiImplementationA.cs:36:9:36:10 | exit M1 (normal) | | | NullCoalescing.cs:1:7:1:20 | call to constructor Object | NullCoalescing.cs:1:7:1:20 | {...} | | -| NullCoalescing.cs:1:7:1:20 | enter NullCoalescing | NullCoalescing.cs:1:7:1:20 | call to constructor Object | | +| NullCoalescing.cs:1:7:1:20 | call to method | NullCoalescing.cs:1:7:1:20 | call to constructor Object | | +| NullCoalescing.cs:1:7:1:20 | enter NullCoalescing | NullCoalescing.cs:1:7:1:20 | this access | | | NullCoalescing.cs:1:7:1:20 | exit NullCoalescing (normal) | NullCoalescing.cs:1:7:1:20 | exit NullCoalescing | | +| NullCoalescing.cs:1:7:1:20 | this access | NullCoalescing.cs:1:7:1:20 | call to method | | | NullCoalescing.cs:1:7:1:20 | {...} | NullCoalescing.cs:1:7:1:20 | exit NullCoalescing (normal) | | | NullCoalescing.cs:3:9:3:10 | enter M1 | NullCoalescing.cs:3:23:3:23 | access to parameter i | | | NullCoalescing.cs:3:9:3:10 | exit M1 (normal) | NullCoalescing.cs:3:9:3:10 | exit M1 | | @@ -2792,31 +2851,32 @@ | NullCoalescing.cs:17:13:17:19 | (...) ... | NullCoalescing.cs:17:13:17:24 | ... ?? ... | non-null | | NullCoalescing.cs:17:13:17:24 | ... ?? ... | NullCoalescing.cs:17:9:17:24 | ... = ... | | | NullCoalescing.cs:17:19:17:19 | access to parameter i | NullCoalescing.cs:17:13:17:19 | (...) ... | | -| PartialImplementationA.cs:3:12:3:18 | call to constructor Object | PartialImplementationB.cs:3:16:3:16 | this access | | -| PartialImplementationA.cs:3:12:3:18 | enter Partial | PartialImplementationA.cs:3:12:3:18 | call to constructor Object | | +| PartialImplementationA.cs:1:15:1:21 | enter | PartialImplementationB.cs:3:16:3:16 | this access | | +| PartialImplementationA.cs:1:15:1:21 | exit (normal) | PartialImplementationA.cs:1:15:1:21 | exit | | +| PartialImplementationA.cs:3:12:3:18 | call to constructor Object | PartialImplementationA.cs:3:27:3:29 | {...} | | +| PartialImplementationA.cs:3:12:3:18 | call to method | PartialImplementationA.cs:3:12:3:18 | call to constructor Object | | +| PartialImplementationA.cs:3:12:3:18 | enter Partial | PartialImplementationA.cs:3:12:3:18 | this access | | | PartialImplementationA.cs:3:12:3:18 | exit Partial (normal) | PartialImplementationA.cs:3:12:3:18 | exit Partial | | +| PartialImplementationA.cs:3:12:3:18 | this access | PartialImplementationA.cs:3:12:3:18 | call to method | | | PartialImplementationA.cs:3:27:3:29 | {...} | PartialImplementationA.cs:3:12:3:18 | exit Partial (normal) | | | PartialImplementationB.cs:3:16:3:16 | this access | PartialImplementationB.cs:3:20:3:20 | 0 | | -| PartialImplementationB.cs:3:16:3:16 | this access | PartialImplementationB.cs:3:20:3:20 | 0 | | -| PartialImplementationB.cs:3:16:3:20 | ... = ... | PartialImplementationB.cs:5:16:5:16 | this access | | | PartialImplementationB.cs:3:16:3:20 | ... = ... | PartialImplementationB.cs:5:16:5:16 | this access | | | PartialImplementationB.cs:3:20:3:20 | 0 | PartialImplementationB.cs:3:16:3:20 | ... = ... | | -| PartialImplementationB.cs:3:20:3:20 | 0 | PartialImplementationB.cs:3:16:3:20 | ... = ... | | -| PartialImplementationB.cs:4:12:4:18 | call to constructor Object | PartialImplementationB.cs:3:16:3:16 | this access | | -| PartialImplementationB.cs:4:12:4:18 | enter Partial | PartialImplementationB.cs:4:12:4:18 | call to constructor Object | | +| PartialImplementationB.cs:4:12:4:18 | call to constructor Object | PartialImplementationB.cs:4:22:4:24 | {...} | | +| PartialImplementationB.cs:4:12:4:18 | call to method | PartialImplementationB.cs:4:12:4:18 | call to constructor Object | | +| PartialImplementationB.cs:4:12:4:18 | enter Partial | PartialImplementationB.cs:4:12:4:18 | this access | | | PartialImplementationB.cs:4:12:4:18 | exit Partial (normal) | PartialImplementationB.cs:4:12:4:18 | exit Partial | | +| PartialImplementationB.cs:4:12:4:18 | this access | PartialImplementationB.cs:4:12:4:18 | call to method | | | PartialImplementationB.cs:4:22:4:24 | {...} | PartialImplementationB.cs:4:12:4:18 | exit Partial (normal) | | | PartialImplementationB.cs:5:16:5:16 | access to property P | PartialImplementationB.cs:5:32:5:34 | ... = ... | | -| PartialImplementationB.cs:5:16:5:16 | access to property P | PartialImplementationB.cs:5:32:5:34 | ... = ... | | | PartialImplementationB.cs:5:16:5:16 | this access | PartialImplementationB.cs:5:34:5:34 | 0 | | -| PartialImplementationB.cs:5:16:5:16 | this access | PartialImplementationB.cs:5:34:5:34 | 0 | | -| PartialImplementationB.cs:5:32:5:34 | ... = ... | PartialImplementationA.cs:3:27:3:29 | {...} | | -| PartialImplementationB.cs:5:32:5:34 | ... = ... | PartialImplementationB.cs:4:22:4:24 | {...} | | -| PartialImplementationB.cs:5:34:5:34 | 0 | PartialImplementationB.cs:5:16:5:16 | access to property P | | +| PartialImplementationB.cs:5:32:5:34 | ... = ... | PartialImplementationA.cs:1:15:1:21 | exit (normal) | | | PartialImplementationB.cs:5:34:5:34 | 0 | PartialImplementationB.cs:5:16:5:16 | access to property P | | | Patterns.cs:3:7:3:14 | call to constructor Object | Patterns.cs:3:7:3:14 | {...} | | -| Patterns.cs:3:7:3:14 | enter Patterns | Patterns.cs:3:7:3:14 | call to constructor Object | | +| Patterns.cs:3:7:3:14 | call to method | Patterns.cs:3:7:3:14 | call to constructor Object | | +| Patterns.cs:3:7:3:14 | enter Patterns | Patterns.cs:3:7:3:14 | this access | | | Patterns.cs:3:7:3:14 | exit Patterns (normal) | Patterns.cs:3:7:3:14 | exit Patterns | | +| Patterns.cs:3:7:3:14 | this access | Patterns.cs:3:7:3:14 | call to method | | | Patterns.cs:3:7:3:14 | {...} | Patterns.cs:3:7:3:14 | exit Patterns (normal) | | | Patterns.cs:5:10:5:11 | enter M1 | Patterns.cs:6:5:43:5 | {...} | | | Patterns.cs:5:10:5:11 | exit M1 (normal) | Patterns.cs:5:10:5:11 | exit M1 | | @@ -3045,8 +3105,10 @@ | Patterns.cs:97:13:97:39 | ...; | Patterns.cs:97:31:97:37 | "not C" | | | Patterns.cs:97:31:97:37 | "not C" | Patterns.cs:97:13:97:38 | call to method WriteLine | | | PostDominance.cs:3:7:3:19 | call to constructor Object | PostDominance.cs:3:7:3:19 | {...} | | -| PostDominance.cs:3:7:3:19 | enter PostDominance | PostDominance.cs:3:7:3:19 | call to constructor Object | | +| PostDominance.cs:3:7:3:19 | call to method | PostDominance.cs:3:7:3:19 | call to constructor Object | | +| PostDominance.cs:3:7:3:19 | enter PostDominance | PostDominance.cs:3:7:3:19 | this access | | | PostDominance.cs:3:7:3:19 | exit PostDominance (normal) | PostDominance.cs:3:7:3:19 | exit PostDominance | | +| PostDominance.cs:3:7:3:19 | this access | PostDominance.cs:3:7:3:19 | call to method | | | PostDominance.cs:3:7:3:19 | {...} | PostDominance.cs:3:7:3:19 | exit PostDominance (normal) | | | PostDominance.cs:5:10:5:11 | enter M1 | PostDominance.cs:6:5:8:5 | {...} | | | PostDominance.cs:5:10:5:11 | exit M1 (normal) | PostDominance.cs:5:10:5:11 | exit M1 | | @@ -3084,8 +3146,10 @@ | PostDominance.cs:21:9:21:29 | ...; | PostDominance.cs:21:27:21:27 | access to parameter s | | | PostDominance.cs:21:27:21:27 | access to parameter s | PostDominance.cs:21:9:21:28 | call to method WriteLine | | | Qualifiers.cs:1:7:1:16 | call to constructor Object | Qualifiers.cs:1:7:1:16 | {...} | | -| Qualifiers.cs:1:7:1:16 | enter Qualifiers | Qualifiers.cs:1:7:1:16 | call to constructor Object | | +| Qualifiers.cs:1:7:1:16 | call to method | Qualifiers.cs:1:7:1:16 | call to constructor Object | | +| Qualifiers.cs:1:7:1:16 | enter Qualifiers | Qualifiers.cs:1:7:1:16 | this access | | | Qualifiers.cs:1:7:1:16 | exit Qualifiers (normal) | Qualifiers.cs:1:7:1:16 | exit Qualifiers | | +| Qualifiers.cs:1:7:1:16 | this access | Qualifiers.cs:1:7:1:16 | call to method | | | Qualifiers.cs:1:7:1:16 | {...} | Qualifiers.cs:1:7:1:16 | exit Qualifiers (normal) | | | Qualifiers.cs:7:16:7:21 | enter Method | Qualifiers.cs:7:28:7:31 | null | | | Qualifiers.cs:7:16:7:21 | exit Method (normal) | Qualifiers.cs:7:16:7:21 | exit Method | | @@ -3151,8 +3215,10 @@ | Qualifiers.cs:30:13:30:37 | call to method StaticMethod | Qualifiers.cs:30:13:30:46 | call to method Method | | | Qualifiers.cs:30:13:30:46 | call to method Method | Qualifiers.cs:30:9:30:46 | ... = ... | | | Switch.cs:3:7:3:12 | call to constructor Object | Switch.cs:3:7:3:12 | {...} | | -| Switch.cs:3:7:3:12 | enter Switch | Switch.cs:3:7:3:12 | call to constructor Object | | +| Switch.cs:3:7:3:12 | call to method | Switch.cs:3:7:3:12 | call to constructor Object | | +| Switch.cs:3:7:3:12 | enter Switch | Switch.cs:3:7:3:12 | this access | | | Switch.cs:3:7:3:12 | exit Switch (normal) | Switch.cs:3:7:3:12 | exit Switch | | +| Switch.cs:3:7:3:12 | this access | Switch.cs:3:7:3:12 | call to method | | | Switch.cs:3:7:3:12 | {...} | Switch.cs:3:7:3:12 | exit Switch (normal) | | | Switch.cs:5:10:5:11 | enter M1 | Switch.cs:6:5:8:5 | {...} | | | Switch.cs:5:10:5:11 | exit M1 (normal) | Switch.cs:5:10:5:11 | exit M1 | | @@ -3478,8 +3544,10 @@ | Switch.cs:175:42:175:46 | "def" | Switch.cs:175:17:175:47 | call to method WriteLine | | | Switch.cs:176:17:176:22 | break; | Switch.cs:163:10:163:12 | exit M16 (normal) | break | | TypeAccesses.cs:1:7:1:18 | call to constructor Object | TypeAccesses.cs:1:7:1:18 | {...} | | -| TypeAccesses.cs:1:7:1:18 | enter TypeAccesses | TypeAccesses.cs:1:7:1:18 | call to constructor Object | | +| TypeAccesses.cs:1:7:1:18 | call to method | TypeAccesses.cs:1:7:1:18 | call to constructor Object | | +| TypeAccesses.cs:1:7:1:18 | enter TypeAccesses | TypeAccesses.cs:1:7:1:18 | this access | | | TypeAccesses.cs:1:7:1:18 | exit TypeAccesses (normal) | TypeAccesses.cs:1:7:1:18 | exit TypeAccesses | | +| TypeAccesses.cs:1:7:1:18 | this access | TypeAccesses.cs:1:7:1:18 | call to method | | | TypeAccesses.cs:1:7:1:18 | {...} | TypeAccesses.cs:1:7:1:18 | exit TypeAccesses (normal) | | | TypeAccesses.cs:3:10:3:10 | enter M | TypeAccesses.cs:4:5:9:5 | {...} | | | TypeAccesses.cs:3:10:3:10 | exit M (normal) | TypeAccesses.cs:3:10:3:10 | exit M | | @@ -3503,8 +3571,10 @@ | TypeAccesses.cs:8:13:8:27 | Type t = ... | TypeAccesses.cs:3:10:3:10 | exit M (normal) | | | TypeAccesses.cs:8:17:8:27 | typeof(...) | TypeAccesses.cs:8:13:8:27 | Type t = ... | | | VarDecls.cs:3:7:3:14 | call to constructor Object | VarDecls.cs:3:7:3:14 | {...} | | -| VarDecls.cs:3:7:3:14 | enter VarDecls | VarDecls.cs:3:7:3:14 | call to constructor Object | | +| VarDecls.cs:3:7:3:14 | call to method | VarDecls.cs:3:7:3:14 | call to constructor Object | | +| VarDecls.cs:3:7:3:14 | enter VarDecls | VarDecls.cs:3:7:3:14 | this access | | | VarDecls.cs:3:7:3:14 | exit VarDecls (normal) | VarDecls.cs:3:7:3:14 | exit VarDecls | | +| VarDecls.cs:3:7:3:14 | this access | VarDecls.cs:3:7:3:14 | call to method | | | VarDecls.cs:3:7:3:14 | {...} | VarDecls.cs:3:7:3:14 | exit VarDecls (normal) | | | VarDecls.cs:5:18:5:19 | enter M1 | VarDecls.cs:6:5:11:5 | {...} | | | VarDecls.cs:5:18:5:19 | exit M1 (normal) | VarDecls.cs:5:18:5:19 | exit M1 | | @@ -3554,8 +3624,10 @@ | VarDecls.cs:25:24:25:24 | access to local variable x | VarDecls.cs:25:20:25:28 | ... ? ... : ... | | | VarDecls.cs:25:28:25:28 | access to local variable y | VarDecls.cs:25:20:25:28 | ... ? ... : ... | | | VarDecls.cs:28:11:28:11 | call to constructor Object | VarDecls.cs:28:11:28:11 | {...} | | -| VarDecls.cs:28:11:28:11 | enter C | VarDecls.cs:28:11:28:11 | call to constructor Object | | +| VarDecls.cs:28:11:28:11 | call to method | VarDecls.cs:28:11:28:11 | call to constructor Object | | +| VarDecls.cs:28:11:28:11 | enter C | VarDecls.cs:28:11:28:11 | this access | | | VarDecls.cs:28:11:28:11 | exit C (normal) | VarDecls.cs:28:11:28:11 | exit C | | +| VarDecls.cs:28:11:28:11 | this access | VarDecls.cs:28:11:28:11 | call to method | | | VarDecls.cs:28:11:28:11 | {...} | VarDecls.cs:28:11:28:11 | exit C (normal) | | | VarDecls.cs:28:41:28:47 | enter Dispose | VarDecls.cs:28:51:28:53 | {...} | | | VarDecls.cs:28:41:28:47 | exit Dispose (normal) | VarDecls.cs:28:41:28:47 | exit Dispose | | @@ -3855,8 +3927,10 @@ | cflow.cs:127:68:127:81 | ...; | cflow.cs:127:68:127:72 | this access | | | cflow.cs:127:76:127:80 | access to parameter value | cflow.cs:127:68:127:80 | ... = ... | | | cflow.cs:129:5:129:15 | call to constructor Object | cflow.cs:130:5:132:5 | {...} | | -| cflow.cs:129:5:129:15 | enter ControlFlow | cflow.cs:129:5:129:15 | call to constructor Object | | +| cflow.cs:129:5:129:15 | call to method | cflow.cs:129:5:129:15 | call to constructor Object | | +| cflow.cs:129:5:129:15 | enter ControlFlow | cflow.cs:129:5:129:15 | this access | | | cflow.cs:129:5:129:15 | exit ControlFlow (normal) | cflow.cs:129:5:129:15 | exit ControlFlow | | +| cflow.cs:129:5:129:15 | this access | cflow.cs:129:5:129:15 | call to method | | | cflow.cs:130:5:132:5 | {...} | cflow.cs:131:9:131:18 | ...; | | | cflow.cs:131:9:131:13 | this access | cflow.cs:131:17:131:17 | access to parameter s | | | cflow.cs:131:9:131:17 | ... = ... | cflow.cs:129:5:129:15 | exit ControlFlow (normal) | | @@ -4231,8 +4305,10 @@ | cflow.cs:275:13:275:41 | call to method WriteLine | cflow.cs:261:49:261:53 | exit Yield (normal) | , return | | cflow.cs:275:13:275:42 | ...; | cflow.cs:275:31:275:40 | "not dead" | | | cflow.cs:275:31:275:40 | "not dead" | cflow.cs:275:13:275:41 | call to method WriteLine | | -| cflow.cs:282:5:282:18 | enter ControlFlowSub | cflow.cs:282:24:282:27 | call to constructor ControlFlow | | +| cflow.cs:282:5:282:18 | call to method | cflow.cs:282:24:282:27 | call to constructor ControlFlow | | +| cflow.cs:282:5:282:18 | enter ControlFlowSub | cflow.cs:282:5:282:18 | this access | | | cflow.cs:282:5:282:18 | exit ControlFlowSub (normal) | cflow.cs:282:5:282:18 | exit ControlFlowSub | | +| cflow.cs:282:5:282:18 | this access | cflow.cs:282:5:282:18 | call to method | | | cflow.cs:282:24:282:27 | call to constructor ControlFlow | cflow.cs:282:31:282:33 | {...} | | | cflow.cs:282:31:282:33 | {...} | cflow.cs:282:5:282:18 | exit ControlFlowSub (normal) | | | cflow.cs:284:5:284:18 | enter ControlFlowSub | cflow.cs:284:32:284:35 | call to constructor ControlFlowSub | | @@ -4246,8 +4322,10 @@ | cflow.cs:286:34:286:45 | call to method ToString | cflow.cs:286:29:286:32 | call to constructor ControlFlowSub | | | cflow.cs:286:48:286:50 | {...} | cflow.cs:286:5:286:18 | exit ControlFlowSub (normal) | | | cflow.cs:289:7:289:18 | call to constructor Object | cflow.cs:289:7:289:18 | {...} | | -| cflow.cs:289:7:289:18 | enter DelegateCall | cflow.cs:289:7:289:18 | call to constructor Object | | +| cflow.cs:289:7:289:18 | call to method | cflow.cs:289:7:289:18 | call to constructor Object | | +| cflow.cs:289:7:289:18 | enter DelegateCall | cflow.cs:289:7:289:18 | this access | | | cflow.cs:289:7:289:18 | exit DelegateCall (normal) | cflow.cs:289:7:289:18 | exit DelegateCall | | +| cflow.cs:289:7:289:18 | this access | cflow.cs:289:7:289:18 | call to method | | | cflow.cs:289:7:289:18 | {...} | cflow.cs:289:7:289:18 | exit DelegateCall (normal) | | | cflow.cs:291:12:291:12 | enter M | cflow.cs:291:38:291:38 | access to parameter f | | | cflow.cs:291:12:291:12 | exit M (normal) | cflow.cs:291:12:291:12 | exit M | | @@ -4255,8 +4333,10 @@ | cflow.cs:291:38:291:41 | delegate call | cflow.cs:291:12:291:12 | exit M (normal) | | | cflow.cs:291:40:291:40 | 0 | cflow.cs:291:38:291:41 | delegate call | | | cflow.cs:296:5:296:25 | call to constructor Object | cflow.cs:296:52:296:54 | {...} | | -| cflow.cs:296:5:296:25 | enter NegationInConstructor | cflow.cs:296:5:296:25 | call to constructor Object | | +| cflow.cs:296:5:296:25 | call to method | cflow.cs:296:5:296:25 | call to constructor Object | | +| cflow.cs:296:5:296:25 | enter NegationInConstructor | cflow.cs:296:5:296:25 | this access | | | cflow.cs:296:5:296:25 | exit NegationInConstructor (normal) | cflow.cs:296:5:296:25 | exit NegationInConstructor | | +| cflow.cs:296:5:296:25 | this access | cflow.cs:296:5:296:25 | call to method | | | cflow.cs:296:52:296:54 | {...} | cflow.cs:296:5:296:25 | exit NegationInConstructor (normal) | | | cflow.cs:298:10:298:10 | enter M | cflow.cs:299:5:301:5 | {...} | | | cflow.cs:298:10:298:10 | exit M (normal) | cflow.cs:298:10:298:10 | exit M | | @@ -4276,8 +4356,10 @@ | cflow.cs:300:61:300:64 | null | cflow.cs:300:56:300:64 | ... != ... | | | cflow.cs:300:70:300:71 | "" | cflow.cs:300:9:300:72 | object creation of type NegationInConstructor | | | cflow.cs:304:7:304:18 | call to constructor Object | cflow.cs:304:7:304:18 | {...} | | -| cflow.cs:304:7:304:18 | enter LambdaGetter | cflow.cs:304:7:304:18 | call to constructor Object | | +| cflow.cs:304:7:304:18 | call to method | cflow.cs:304:7:304:18 | call to constructor Object | | +| cflow.cs:304:7:304:18 | enter LambdaGetter | cflow.cs:304:7:304:18 | this access | | | cflow.cs:304:7:304:18 | exit LambdaGetter (normal) | cflow.cs:304:7:304:18 | exit LambdaGetter | | +| cflow.cs:304:7:304:18 | this access | cflow.cs:304:7:304:18 | call to method | | | cflow.cs:304:7:304:18 | {...} | cflow.cs:304:7:304:18 | exit LambdaGetter (normal) | | | cflow.cs:306:60:310:5 | (...) => ... | cflow.cs:306:60:310:5 | exit get__getter (normal) | | | cflow.cs:306:60:310:5 | enter (...) => ... | cflow.cs:307:5:310:5 | {...} | | diff --git a/csharp/ql/test/library-tests/controlflow/graph/Nodes.expected b/csharp/ql/test/library-tests/controlflow/graph/Nodes.expected index 26e8d074b19..aff87481461 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/Nodes.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/Nodes.expected @@ -1,4 +1,4 @@ -| AccessorCalls.cs:1:7:1:19 | AccessorCalls | AccessorCalls.cs:1:7:1:19 | call to constructor Object | +| AccessorCalls.cs:1:7:1:19 | AccessorCalls | AccessorCalls.cs:1:7:1:19 | this access | | AccessorCalls.cs:5:23:5:25 | get_Item | AccessorCalls.cs:5:30:5:30 | access to parameter i | | AccessorCalls.cs:5:33:5:35 | set_Item | AccessorCalls.cs:5:37:5:39 | {...} | | AccessorCalls.cs:7:32:7:34 | add_Event | AccessorCalls.cs:7:36:7:38 | {...} | @@ -12,12 +12,12 @@ | AccessorCalls.cs:56:10:56:11 | M7 | AccessorCalls.cs:57:5:59:5 | {...} | | AccessorCalls.cs:61:10:61:11 | M8 | AccessorCalls.cs:62:5:64:5 | {...} | | AccessorCalls.cs:66:10:66:11 | M9 | AccessorCalls.cs:67:5:74:5 | {...} | -| ArrayCreation.cs:1:7:1:19 | ArrayCreation | ArrayCreation.cs:1:7:1:19 | call to constructor Object | +| ArrayCreation.cs:1:7:1:19 | ArrayCreation | ArrayCreation.cs:1:7:1:19 | this access | | ArrayCreation.cs:3:11:3:12 | M1 | ArrayCreation.cs:3:27:3:27 | 0 | | ArrayCreation.cs:5:12:5:13 | M2 | ArrayCreation.cs:5:28:5:28 | 0 | | ArrayCreation.cs:7:11:7:12 | M3 | ArrayCreation.cs:7:19:7:36 | 2 | | ArrayCreation.cs:9:12:9:13 | M4 | ArrayCreation.cs:9:20:9:52 | 2 | -| Assert.cs:5:7:5:17 | AssertTests | Assert.cs:5:7:5:17 | call to constructor Object | +| Assert.cs:5:7:5:17 | AssertTests | Assert.cs:5:7:5:17 | this access | | Assert.cs:7:10:7:11 | M1 | Assert.cs:8:5:12:5 | {...} | | Assert.cs:14:10:14:11 | M2 | Assert.cs:15:5:19:5 | {...} | | Assert.cs:21:10:21:11 | M3 | Assert.cs:22:5:26:5 | {...} | @@ -32,23 +32,23 @@ | Assert.cs:84:10:84:12 | M12 | Assert.cs:85:5:129:5 | {...} | | Assert.cs:131:18:131:32 | AssertTrueFalse | Assert.cs:135:5:136:5 | {...} | | Assert.cs:138:10:138:12 | M13 | Assert.cs:139:5:142:5 | {...} | -| Assignments.cs:1:7:1:17 | Assignments | Assignments.cs:1:7:1:17 | call to constructor Object | +| Assignments.cs:1:7:1:17 | Assignments | Assignments.cs:1:7:1:17 | this access | | Assignments.cs:3:10:3:10 | M | Assignments.cs:4:5:15:5 | {...} | | Assignments.cs:14:18:14:35 | (...) => ... | Assignments.cs:14:33:14:35 | {...} | | Assignments.cs:17:40:17:40 | + | Assignments.cs:18:5:20:5 | {...} | -| BreakInTry.cs:1:7:1:16 | BreakInTry | BreakInTry.cs:1:7:1:16 | call to constructor Object | +| BreakInTry.cs:1:7:1:16 | BreakInTry | BreakInTry.cs:1:7:1:16 | this access | | BreakInTry.cs:3:10:3:11 | M1 | BreakInTry.cs:4:5:18:5 | {...} | | BreakInTry.cs:20:10:20:11 | M2 | BreakInTry.cs:21:5:36:5 | {...} | | BreakInTry.cs:38:10:38:11 | M3 | BreakInTry.cs:39:5:54:5 | {...} | | BreakInTry.cs:56:10:56:11 | M4 | BreakInTry.cs:57:5:71:5 | {...} | -| CompileTimeOperators.cs:3:7:3:26 | CompileTimeOperators | CompileTimeOperators.cs:3:7:3:26 | call to constructor Object | +| CompileTimeOperators.cs:3:7:3:26 | CompileTimeOperators | CompileTimeOperators.cs:3:7:3:26 | this access | | CompileTimeOperators.cs:5:9:5:15 | Default | CompileTimeOperators.cs:6:5:8:5 | {...} | | CompileTimeOperators.cs:10:9:10:14 | Sizeof | CompileTimeOperators.cs:11:5:13:5 | {...} | | CompileTimeOperators.cs:15:10:15:15 | Typeof | CompileTimeOperators.cs:16:5:18:5 | {...} | | CompileTimeOperators.cs:20:12:20:17 | Nameof | CompileTimeOperators.cs:21:5:23:5 | {...} | -| CompileTimeOperators.cs:26:7:26:22 | GotoInTryFinally | CompileTimeOperators.cs:26:7:26:22 | call to constructor Object | +| CompileTimeOperators.cs:26:7:26:22 | GotoInTryFinally | CompileTimeOperators.cs:26:7:26:22 | this access | | CompileTimeOperators.cs:28:10:28:10 | M | CompileTimeOperators.cs:29:5:41:5 | {...} | -| ConditionalAccess.cs:1:7:1:23 | ConditionalAccess | ConditionalAccess.cs:1:7:1:23 | call to constructor Object | +| ConditionalAccess.cs:1:7:1:23 | ConditionalAccess | ConditionalAccess.cs:1:7:1:23 | this access | | ConditionalAccess.cs:3:12:3:13 | M1 | ConditionalAccess.cs:3:26:3:26 | access to parameter i | | ConditionalAccess.cs:5:10:5:11 | M2 | ConditionalAccess.cs:5:26:5:26 | access to parameter s | | ConditionalAccess.cs:7:10:7:11 | M3 | ConditionalAccess.cs:7:39:7:40 | access to parameter s1 | @@ -59,7 +59,7 @@ | ConditionalAccess.cs:30:10:30:12 | Out | ConditionalAccess.cs:30:32:30:32 | 0 | | ConditionalAccess.cs:32:10:32:11 | M8 | ConditionalAccess.cs:33:5:36:5 | {...} | | ConditionalAccess.cs:41:26:41:38 | CommaJoinWith | ConditionalAccess.cs:41:70:41:71 | access to parameter s1 | -| Conditions.cs:1:7:1:16 | Conditions | Conditions.cs:1:7:1:16 | call to constructor Object | +| Conditions.cs:1:7:1:16 | Conditions | Conditions.cs:1:7:1:16 | this access | | Conditions.cs:3:10:3:19 | IncrOrDecr | Conditions.cs:4:5:9:5 | {...} | | Conditions.cs:11:9:11:10 | M1 | Conditions.cs:12:5:20:5 | {...} | | Conditions.cs:22:9:22:10 | M2 | Conditions.cs:23:5:31:5 | {...} | @@ -72,7 +72,7 @@ | Conditions.cs:113:10:113:11 | M9 | Conditions.cs:114:5:124:5 | {...} | | Conditions.cs:129:10:129:12 | M10 | Conditions.cs:130:5:141:5 | {...} | | Conditions.cs:143:10:143:12 | M11 | Conditions.cs:144:5:150:5 | {...} | -| ExitMethods.cs:6:7:6:17 | ExitMethods | ExitMethods.cs:6:7:6:17 | call to constructor Object | +| ExitMethods.cs:6:7:6:17 | ExitMethods | ExitMethods.cs:6:7:6:17 | this access | | ExitMethods.cs:8:10:8:11 | M1 | ExitMethods.cs:9:5:12:5 | {...} | | ExitMethods.cs:14:10:14:11 | M2 | ExitMethods.cs:15:5:18:5 | {...} | | ExitMethods.cs:20:10:20:11 | M3 | ExitMethods.cs:21:5:24:5 | {...} | @@ -99,7 +99,7 @@ | Extensions.cs:10:24:10:29 | ToBool | Extensions.cs:11:5:13:5 | {...} | | Extensions.cs:15:23:15:33 | CallToInt32 | Extensions.cs:15:48:15:50 | "0" | | Extensions.cs:20:17:20:20 | Main | Extensions.cs:21:5:26:5 | {...} | -| Finally.cs:3:14:3:20 | Finally | Finally.cs:3:14:3:20 | call to constructor Object | +| Finally.cs:3:14:3:20 | Finally | Finally.cs:3:14:3:20 | this access | | Finally.cs:7:10:7:11 | M1 | Finally.cs:8:5:17:5 | {...} | | Finally.cs:19:10:19:11 | M2 | Finally.cs:20:5:52:5 | {...} | | Finally.cs:54:10:54:11 | M3 | Finally.cs:55:5:72:5 | {...} | @@ -108,33 +108,36 @@ | Finally.cs:121:10:121:11 | M6 | Finally.cs:122:5:131:5 | {...} | | Finally.cs:133:10:133:11 | M7 | Finally.cs:134:5:145:5 | {...} | | Finally.cs:147:10:147:11 | M8 | Finally.cs:148:5:170:5 | {...} | -| Finally.cs:172:11:172:20 | ExceptionA | Finally.cs:172:11:172:20 | call to constructor Exception | -| Finally.cs:173:11:173:20 | ExceptionB | Finally.cs:173:11:173:20 | call to constructor Exception | -| Finally.cs:174:11:174:20 | ExceptionC | Finally.cs:174:11:174:20 | call to constructor Exception | +| Finally.cs:172:11:172:20 | ExceptionA | Finally.cs:172:11:172:20 | this access | +| Finally.cs:173:11:173:20 | ExceptionB | Finally.cs:173:11:173:20 | this access | +| Finally.cs:174:11:174:20 | ExceptionC | Finally.cs:174:11:174:20 | this access | | Finally.cs:176:10:176:11 | M9 | Finally.cs:177:5:193:5 | {...} | | Finally.cs:195:10:195:12 | M10 | Finally.cs:196:5:214:5 | {...} | | Finally.cs:216:10:216:12 | M11 | Finally.cs:217:5:231:5 | {...} | | Finally.cs:233:10:233:12 | M12 | Finally.cs:234:5:261:5 | {...} | | Finally.cs:263:10:263:12 | M13 | Finally.cs:264:5:274:5 | {...} | -| Foreach.cs:4:7:4:13 | Foreach | Foreach.cs:4:7:4:13 | call to constructor Object | +| Foreach.cs:4:7:4:13 | Foreach | Foreach.cs:4:7:4:13 | this access | | Foreach.cs:6:10:6:11 | M1 | Foreach.cs:7:5:10:5 | {...} | | Foreach.cs:12:10:12:11 | M2 | Foreach.cs:13:5:16:5 | {...} | | Foreach.cs:18:10:18:11 | M3 | Foreach.cs:19:5:22:5 | {...} | | Foreach.cs:24:10:24:11 | M4 | Foreach.cs:25:5:28:5 | {...} | | Foreach.cs:30:10:30:11 | M5 | Foreach.cs:31:5:34:5 | {...} | | Foreach.cs:36:10:36:11 | M6 | Foreach.cs:37:5:40:5 | {...} | +| Initializers.cs:3:7:3:18 | | Initializers.cs:5:9:5:9 | this access | | Initializers.cs:3:7:3:18 | Initializers | Initializers.cs:3:7:3:18 | {...} | -| Initializers.cs:8:5:8:16 | Initializers | Initializers.cs:8:5:8:16 | call to constructor Object | -| Initializers.cs:10:5:10:16 | Initializers | Initializers.cs:10:5:10:16 | call to constructor Object | +| Initializers.cs:8:5:8:16 | Initializers | Initializers.cs:8:5:8:16 | this access | +| Initializers.cs:10:5:10:16 | Initializers | Initializers.cs:10:5:10:16 | this access | | Initializers.cs:12:10:12:10 | M | Initializers.cs:13:5:16:5 | {...} | -| Initializers.cs:20:11:20:23 | NoConstructor | Initializers.cs:20:11:20:23 | call to constructor Object | -| Initializers.cs:31:9:31:11 | Sub | Initializers.cs:31:17:31:20 | call to constructor NoConstructor | +| Initializers.cs:20:11:20:23 | | Initializers.cs:22:23:22:23 | this access | +| Initializers.cs:20:11:20:23 | NoConstructor | Initializers.cs:20:11:20:23 | this access | +| Initializers.cs:26:11:26:13 | | Initializers.cs:28:13:28:13 | this access | +| Initializers.cs:31:9:31:11 | Sub | Initializers.cs:31:9:31:11 | this access | | Initializers.cs:33:9:33:11 | Sub | Initializers.cs:33:22:33:25 | call to constructor Sub | -| Initializers.cs:35:9:35:11 | Sub | Initializers.cs:35:9:35:11 | call to constructor NoConstructor | -| Initializers.cs:39:7:39:23 | IndexInitializers | Initializers.cs:39:7:39:23 | call to constructor Object | -| Initializers.cs:41:11:41:18 | Compound | Initializers.cs:41:11:41:18 | call to constructor Object | +| Initializers.cs:35:9:35:11 | Sub | Initializers.cs:35:9:35:11 | this access | +| Initializers.cs:39:7:39:23 | IndexInitializers | Initializers.cs:39:7:39:23 | this access | +| Initializers.cs:41:11:41:18 | Compound | Initializers.cs:41:11:41:18 | this access | | Initializers.cs:51:10:51:13 | Test | Initializers.cs:52:5:66:5 | {...} | -| LoopUnrolling.cs:5:7:5:19 | LoopUnrolling | LoopUnrolling.cs:5:7:5:19 | call to constructor Object | +| LoopUnrolling.cs:5:7:5:19 | LoopUnrolling | LoopUnrolling.cs:5:7:5:19 | this access | | LoopUnrolling.cs:7:10:7:11 | M1 | LoopUnrolling.cs:8:5:13:5 | {...} | | LoopUnrolling.cs:15:10:15:11 | M2 | LoopUnrolling.cs:16:5:20:5 | {...} | | LoopUnrolling.cs:22:10:22:11 | M3 | LoopUnrolling.cs:23:5:27:5 | {...} | @@ -146,8 +149,8 @@ | LoopUnrolling.cs:76:10:76:11 | M9 | LoopUnrolling.cs:77:5:83:5 | {...} | | LoopUnrolling.cs:85:10:85:12 | M10 | LoopUnrolling.cs:86:5:92:5 | {...} | | LoopUnrolling.cs:94:10:94:12 | M11 | LoopUnrolling.cs:95:5:101:5 | {...} | -| MultiImplementationA.cs:4:7:4:8 | C1 | MultiImplementationA.cs:4:7:4:8 | call to constructor Object | -| MultiImplementationA.cs:4:7:4:8 | C1 | MultiImplementationB.cs:1:7:1:8 | call to constructor Object | +| MultiImplementationA.cs:4:7:4:8 | C1 | MultiImplementationA.cs:4:7:4:8 | this access | +| MultiImplementationA.cs:4:7:4:8 | C1 | MultiImplementationB.cs:1:7:1:8 | this access | | MultiImplementationA.cs:6:22:6:31 | get_P1 | MultiImplementationA.cs:6:28:6:31 | null | | MultiImplementationA.cs:6:22:6:31 | get_P1 | MultiImplementationB.cs:3:22:3:22 | 0 | | MultiImplementationA.cs:7:21:7:23 | get_P2 | MultiImplementationA.cs:7:25:7:39 | {...} | @@ -156,6 +159,8 @@ | MultiImplementationA.cs:7:41:7:43 | set_P2 | MultiImplementationB.cs:4:43:4:45 | {...} | | MultiImplementationA.cs:8:16:8:16 | M | MultiImplementationA.cs:8:29:8:32 | null | | MultiImplementationA.cs:8:16:8:16 | M | MultiImplementationB.cs:5:23:5:23 | 2 | +| MultiImplementationA.cs:11:7:11:8 | | MultiImplementationA.cs:13:16:13:16 | this access | +| MultiImplementationA.cs:11:7:11:8 | | MultiImplementationB.cs:11:16:11:16 | this access | | MultiImplementationA.cs:14:31:14:31 | get_Item | MultiImplementationA.cs:14:31:14:31 | access to parameter i | | MultiImplementationA.cs:14:31:14:31 | get_Item | MultiImplementationB.cs:12:37:12:40 | null | | MultiImplementationA.cs:15:36:15:38 | get_Item | MultiImplementationA.cs:15:40:15:52 | {...} | @@ -165,33 +170,34 @@ | MultiImplementationA.cs:16:17:16:18 | M1 | MultiImplementationA.cs:17:5:19:5 | {...} | | MultiImplementationA.cs:16:17:16:18 | M1 | MultiImplementationB.cs:15:5:17:5 | {...} | | MultiImplementationA.cs:18:9:18:22 | M2 | MultiImplementationA.cs:18:21:18:21 | 0 | -| MultiImplementationA.cs:20:12:20:13 | C2 | MultiImplementationA.cs:20:12:20:13 | call to constructor Object | -| MultiImplementationA.cs:20:12:20:13 | C2 | MultiImplementationB.cs:18:12:18:13 | call to constructor Object | +| MultiImplementationA.cs:20:12:20:13 | C2 | MultiImplementationA.cs:20:12:20:13 | this access | +| MultiImplementationA.cs:20:12:20:13 | C2 | MultiImplementationB.cs:18:12:18:13 | this access | | MultiImplementationA.cs:21:12:21:13 | C2 | MultiImplementationA.cs:21:24:21:24 | 0 | | MultiImplementationA.cs:21:12:21:13 | C2 | MultiImplementationB.cs:19:24:19:24 | 1 | | MultiImplementationA.cs:22:6:22:7 | ~C2 | MultiImplementationA.cs:22:11:22:13 | {...} | | MultiImplementationA.cs:22:6:22:7 | ~C2 | MultiImplementationB.cs:20:11:20:25 | {...} | | MultiImplementationA.cs:23:28:23:35 | implicit conversion | MultiImplementationA.cs:23:50:23:53 | null | | MultiImplementationA.cs:23:28:23:35 | implicit conversion | MultiImplementationB.cs:21:56:21:59 | null | -| MultiImplementationA.cs:28:7:28:8 | C3 | MultiImplementationA.cs:28:7:28:8 | call to constructor Object | -| MultiImplementationA.cs:28:7:28:8 | C3 | MultiImplementationB.cs:25:7:25:8 | call to constructor Object | +| MultiImplementationA.cs:28:7:28:8 | C3 | MultiImplementationA.cs:28:7:28:8 | this access | +| MultiImplementationA.cs:28:7:28:8 | C3 | MultiImplementationB.cs:25:7:25:8 | this access | | MultiImplementationA.cs:30:21:30:23 | get_P3 | MultiImplementationA.cs:30:34:30:37 | null | -| MultiImplementationA.cs:34:15:34:16 | C4 | MultiImplementationA.cs:34:15:34:16 | call to constructor Object | -| MultiImplementationA.cs:34:15:34:16 | C4 | MultiImplementationB.cs:30:15:30:16 | call to constructor Object | +| MultiImplementationA.cs:34:15:34:16 | C4 | MultiImplementationA.cs:34:15:34:16 | this access | +| MultiImplementationA.cs:34:15:34:16 | C4 | MultiImplementationB.cs:30:15:30:16 | this access | | MultiImplementationA.cs:36:9:36:10 | M1 | MultiImplementationA.cs:36:14:36:28 | {...} | | MultiImplementationA.cs:36:9:36:10 | M1 | MultiImplementationB.cs:32:17:32:17 | 0 | | MultiImplementationA.cs:37:9:37:10 | M2 | MultiImplementationA.cs:37:14:37:28 | {...} | | MultiImplementationB.cs:16:9:16:31 | M2 | MultiImplementationB.cs:16:27:16:30 | null | -| NullCoalescing.cs:1:7:1:20 | NullCoalescing | NullCoalescing.cs:1:7:1:20 | call to constructor Object | +| NullCoalescing.cs:1:7:1:20 | NullCoalescing | NullCoalescing.cs:1:7:1:20 | this access | | NullCoalescing.cs:3:9:3:10 | M1 | NullCoalescing.cs:3:23:3:23 | access to parameter i | | NullCoalescing.cs:5:9:5:10 | M2 | NullCoalescing.cs:5:25:5:25 | access to parameter b | | NullCoalescing.cs:7:12:7:13 | M3 | NullCoalescing.cs:7:40:7:41 | access to parameter s1 | | NullCoalescing.cs:9:12:9:13 | M4 | NullCoalescing.cs:9:37:9:37 | access to parameter b | | NullCoalescing.cs:11:9:11:10 | M5 | NullCoalescing.cs:11:44:11:45 | access to parameter b1 | | NullCoalescing.cs:13:10:13:11 | M6 | NullCoalescing.cs:14:5:18:5 | {...} | -| PartialImplementationA.cs:3:12:3:18 | Partial | PartialImplementationA.cs:3:12:3:18 | call to constructor Object | -| PartialImplementationB.cs:4:12:4:18 | Partial | PartialImplementationB.cs:4:12:4:18 | call to constructor Object | -| Patterns.cs:3:7:3:14 | Patterns | Patterns.cs:3:7:3:14 | call to constructor Object | +| PartialImplementationA.cs:1:15:1:21 | | PartialImplementationB.cs:3:16:3:16 | this access | +| PartialImplementationA.cs:3:12:3:18 | Partial | PartialImplementationA.cs:3:12:3:18 | this access | +| PartialImplementationB.cs:4:12:4:18 | Partial | PartialImplementationB.cs:4:12:4:18 | this access | +| Patterns.cs:3:7:3:14 | Patterns | Patterns.cs:3:7:3:14 | this access | | Patterns.cs:5:10:5:11 | M1 | Patterns.cs:6:5:43:5 | {...} | | Patterns.cs:47:24:47:25 | M2 | Patterns.cs:48:9:48:9 | access to parameter c | | Patterns.cs:50:24:50:25 | M3 | Patterns.cs:51:9:51:9 | access to parameter c | @@ -202,15 +208,15 @@ | Patterns.cs:85:26:85:27 | M8 | Patterns.cs:85:39:85:39 | access to parameter i | | Patterns.cs:87:26:87:27 | M9 | Patterns.cs:87:39:87:39 | access to parameter i | | Patterns.cs:93:17:93:19 | M10 | Patterns.cs:94:5:99:5 | {...} | -| PostDominance.cs:3:7:3:19 | PostDominance | PostDominance.cs:3:7:3:19 | call to constructor Object | +| PostDominance.cs:3:7:3:19 | PostDominance | PostDominance.cs:3:7:3:19 | this access | | PostDominance.cs:5:10:5:11 | M1 | PostDominance.cs:6:5:8:5 | {...} | | PostDominance.cs:10:10:10:11 | M2 | PostDominance.cs:11:5:15:5 | {...} | | PostDominance.cs:17:10:17:11 | M3 | PostDominance.cs:18:5:22:5 | {...} | -| Qualifiers.cs:1:7:1:16 | Qualifiers | Qualifiers.cs:1:7:1:16 | call to constructor Object | +| Qualifiers.cs:1:7:1:16 | Qualifiers | Qualifiers.cs:1:7:1:16 | this access | | Qualifiers.cs:7:16:7:21 | Method | Qualifiers.cs:7:28:7:31 | null | | Qualifiers.cs:8:23:8:34 | StaticMethod | Qualifiers.cs:8:41:8:44 | null | | Qualifiers.cs:10:10:10:10 | M | Qualifiers.cs:11:5:31:5 | {...} | -| Switch.cs:3:7:3:12 | Switch | Switch.cs:3:7:3:12 | call to constructor Object | +| Switch.cs:3:7:3:12 | Switch | Switch.cs:3:7:3:12 | this access | | Switch.cs:5:10:5:11 | M1 | Switch.cs:6:5:8:5 | {...} | | Switch.cs:10:10:10:11 | M2 | Switch.cs:11:5:33:5 | {...} | | Switch.cs:35:10:35:11 | M3 | Switch.cs:36:5:42:5 | {...} | @@ -228,13 +234,13 @@ | Switch.cs:144:9:144:11 | M14 | Switch.cs:145:5:152:5 | {...} | | Switch.cs:154:10:154:12 | M15 | Switch.cs:155:5:161:5 | {...} | | Switch.cs:163:10:163:12 | M16 | Switch.cs:164:5:178:5 | {...} | -| TypeAccesses.cs:1:7:1:18 | TypeAccesses | TypeAccesses.cs:1:7:1:18 | call to constructor Object | +| TypeAccesses.cs:1:7:1:18 | TypeAccesses | TypeAccesses.cs:1:7:1:18 | this access | | TypeAccesses.cs:3:10:3:10 | M | TypeAccesses.cs:4:5:9:5 | {...} | -| VarDecls.cs:3:7:3:14 | VarDecls | VarDecls.cs:3:7:3:14 | call to constructor Object | +| VarDecls.cs:3:7:3:14 | VarDecls | VarDecls.cs:3:7:3:14 | this access | | VarDecls.cs:5:18:5:19 | M1 | VarDecls.cs:6:5:11:5 | {...} | | VarDecls.cs:13:12:13:13 | M2 | VarDecls.cs:14:5:17:5 | {...} | | VarDecls.cs:19:7:19:8 | M3 | VarDecls.cs:20:5:26:5 | {...} | -| VarDecls.cs:28:11:28:11 | C | VarDecls.cs:28:11:28:11 | call to constructor Object | +| VarDecls.cs:28:11:28:11 | C | VarDecls.cs:28:11:28:11 | this access | | VarDecls.cs:28:41:28:47 | Dispose | VarDecls.cs:28:51:28:53 | {...} | | cflow.cs:5:17:5:20 | Main | cflow.cs:6:5:35:5 | {...} | | cflow.cs:37:17:37:22 | Switch | cflow.cs:38:5:68:5 | {...} | @@ -245,7 +251,7 @@ | cflow.cs:119:20:119:21 | M5 | cflow.cs:120:5:124:5 | {...} | | cflow.cs:127:19:127:21 | get_Prop | cflow.cs:127:23:127:60 | {...} | | cflow.cs:127:62:127:64 | set_Prop | cflow.cs:127:66:127:83 | {...} | -| cflow.cs:129:5:129:15 | ControlFlow | cflow.cs:129:5:129:15 | call to constructor Object | +| cflow.cs:129:5:129:15 | ControlFlow | cflow.cs:129:5:129:15 | this access | | cflow.cs:134:5:134:15 | ControlFlow | cflow.cs:134:31:134:31 | access to parameter i | | cflow.cs:136:12:136:22 | ControlFlow | cflow.cs:136:33:136:33 | 0 | | cflow.cs:138:40:138:40 | + | cflow.cs:139:5:142:5 | {...} | @@ -261,13 +267,13 @@ | cflow.cs:224:10:224:16 | Foreach | cflow.cs:225:5:238:5 | {...} | | cflow.cs:240:10:240:13 | Goto | cflow.cs:241:5:259:5 | {...} | | cflow.cs:261:49:261:53 | Yield | cflow.cs:262:5:277:5 | {...} | -| cflow.cs:282:5:282:18 | ControlFlowSub | cflow.cs:282:24:282:27 | call to constructor ControlFlow | +| cflow.cs:282:5:282:18 | ControlFlowSub | cflow.cs:282:5:282:18 | this access | | cflow.cs:284:5:284:18 | ControlFlowSub | cflow.cs:284:32:284:35 | call to constructor ControlFlowSub | | cflow.cs:286:5:286:18 | ControlFlowSub | cflow.cs:286:34:286:34 | access to parameter i | -| cflow.cs:289:7:289:18 | DelegateCall | cflow.cs:289:7:289:18 | call to constructor Object | +| cflow.cs:289:7:289:18 | DelegateCall | cflow.cs:289:7:289:18 | this access | | cflow.cs:291:12:291:12 | M | cflow.cs:291:38:291:38 | access to parameter f | -| cflow.cs:296:5:296:25 | NegationInConstructor | cflow.cs:296:5:296:25 | call to constructor Object | +| cflow.cs:296:5:296:25 | NegationInConstructor | cflow.cs:296:5:296:25 | this access | | cflow.cs:298:10:298:10 | M | cflow.cs:299:5:301:5 | {...} | -| cflow.cs:304:7:304:18 | LambdaGetter | cflow.cs:304:7:304:18 | call to constructor Object | +| cflow.cs:304:7:304:18 | LambdaGetter | cflow.cs:304:7:304:18 | this access | | cflow.cs:306:60:310:5 | (...) => ... | cflow.cs:307:5:310:5 | {...} | | cflow.cs:306:60:310:5 | get__getter | cflow.cs:306:60:310:5 | (...) => ... | diff --git a/csharp/ql/test/library-tests/controlflow/guards/AbstractValue.expected b/csharp/ql/test/library-tests/controlflow/guards/AbstractValue.expected index a930349e930..712e379e331 100644 --- a/csharp/ql/test/library-tests/controlflow/guards/AbstractValue.expected +++ b/csharp/ql/test/library-tests/controlflow/guards/AbstractValue.expected @@ -117,6 +117,8 @@ | not | Guards.cs:162:24:162:24 | access to parameter o | | not | Guards.cs:285:17:285:17 | access to parameter o | | not | Guards.cs:287:17:287:17 | access to parameter o | +| not null | Assert.cs:5:7:5:17 | call to method | +| not null | Assert.cs:5:7:5:17 | this access | | not null | Assert.cs:9:20:9:20 | access to parameter b | | not null | Assert.cs:9:31:9:32 | "" | | not null | Assert.cs:10:9:10:13 | access to type Debug | @@ -228,6 +230,8 @@ | not null | Assert.cs:94:16:94:24 | ... && ... | | not null | Assert.cs:94:22:94:24 | !... | | not null | Assert.cs:94:23:94:24 | access to parameter b2 | +| not null | Collections.cs:7:14:7:24 | call to method | +| not null | Collections.cs:7:14:7:24 | this access | | not null | Collections.cs:11:13:11:13 | access to local variable b | | not null | Collections.cs:11:13:11:32 | Boolean b = ... | | not null | Collections.cs:11:17:11:20 | access to parameter args | @@ -496,6 +500,8 @@ | not null | Collections.cs:102:9:102:15 | access to type Console | | not null | Collections.cs:102:9:102:31 | call to method WriteLine | | not null | Collections.cs:102:27:102:30 | access to parameter args | +| not null | Guards.cs:3:14:3:19 | call to method | +| not null | Guards.cs:3:14:3:19 | this access | | not null | Guards.cs:10:13:10:25 | !... | | not null | Guards.cs:10:14:10:25 | !... | | not null | Guards.cs:10:16:10:24 | ... == ... | diff --git a/csharp/ql/test/library-tests/conversion/operator/PrintAst.expected b/csharp/ql/test/library-tests/conversion/operator/PrintAst.expected index 47f1db09efe..89a12e9a170 100644 --- a/csharp/ql/test/library-tests/conversion/operator/PrintAst.expected +++ b/csharp/ql/test/library-tests/conversion/operator/PrintAst.expected @@ -1,6 +1,6 @@ Operator.cs: # 3| [Class] C -# 5| 5: [ImplicitConversionOperator] implicit conversion +# 5| 6: [ImplicitConversionOperator] implicit conversion # 5| -1: [TypeMention] C #-----| 2: (Parameters) # 5| 0: [Parameter] i @@ -8,11 +8,11 @@ Operator.cs: # 5| 4: [BlockStmt] {...} # 5| 0: [ReturnStmt] return ...; # 5| 0: [NullLiteral] null -# 7| 6: [Field] x1 +# 7| 7: [Field] x1 # 7| -1: [TypeMention] int -# 8| 7: [Field] x2 +# 8| 8: [Field] x2 # 8| -1: [TypeMention] C -# 11| 8: [Method] M +# 11| 9: [Method] M # 11| -1: [TypeMention] Void # 12| 4: [BlockStmt] {...} # 13| 0: [ExprStmt] ...; diff --git a/csharp/ql/test/library-tests/csharp10/fileScopedNamespace.expected b/csharp/ql/test/library-tests/csharp10/fileScopedNamespace.expected index 34f517f59bb..5db33c2a421 100644 --- a/csharp/ql/test/library-tests/csharp10/fileScopedNamespace.expected +++ b/csharp/ql/test/library-tests/csharp10/fileScopedNamespace.expected @@ -1,4 +1,5 @@ fileScopedNamespace +| FileScopedNamespace.cs:1:11:1:31 | MyFileScopedNamespace | FileScopedNamespace.cs:3:14:3:39 | | | FileScopedNamespace.cs:1:11:1:31 | MyFileScopedNamespace | FileScopedNamespace.cs:3:14:3:39 | MyFileScopedNamespaceClass | | FileScopedNamespace.cs:1:11:1:31 | MyFileScopedNamespace | FileScopedNamespace.cs:5:29:5:35 | myField | | FileScopedNamespace.cs:1:11:1:31 | MyFileScopedNamespace | FileScopedNamespace.cs:6:19:6:24 | MyProp | diff --git a/csharp/ql/test/library-tests/csharp11/PrintAst.expected b/csharp/ql/test/library-tests/csharp11/PrintAst.expected index 1de7ff42928..391c41540ec 100644 --- a/csharp/ql/test/library-tests/csharp11/PrintAst.expected +++ b/csharp/ql/test/library-tests/csharp11/PrintAst.expected @@ -1,10 +1,10 @@ CheckedOperators.cs: # 1| [NamespaceDeclaration] namespace ... { ... } # 3| 1: [Class] Number -# 5| 4: [Property] Value +# 5| 5: [Property] Value # 5| -1: [TypeMention] int # 5| 3: [Getter] get_Value -# 7| 5: [InstanceConstructor] Number +# 7| 6: [InstanceConstructor] Number #-----| 2: (Parameters) # 7| 0: [Parameter] n # 7| -1: [TypeMention] int @@ -12,7 +12,7 @@ CheckedOperators.cs: # 7| 0: [PropertyCall] access to property Value # 7| -1: [ThisAccess] this access # 7| 1: [ParameterAccess] access to parameter n -# 9| 6: [CheckedAddOperator] checked + +# 9| 7: [CheckedAddOperator] checked + # 9| -1: [TypeMention] Number #-----| 2: (Parameters) # 9| 0: [Parameter] n1 @@ -27,7 +27,7 @@ CheckedOperators.cs: # 10| -1: [ParameterAccess] access to parameter n1 # 10| 1: [PropertyCall] access to property Value # 10| -1: [ParameterAccess] access to parameter n2 -# 12| 7: [AddOperator] + +# 12| 8: [AddOperator] + # 12| -1: [TypeMention] Number #-----| 2: (Parameters) # 12| 0: [Parameter] n1 @@ -41,7 +41,7 @@ CheckedOperators.cs: # 13| -1: [ParameterAccess] access to parameter n1 # 13| 1: [PropertyCall] access to property Value # 13| -1: [ParameterAccess] access to parameter n2 -# 15| 8: [CheckedSubOperator] checked - +# 15| 9: [CheckedSubOperator] checked - # 15| -1: [TypeMention] Number #-----| 2: (Parameters) # 15| 0: [Parameter] n1 @@ -56,7 +56,7 @@ CheckedOperators.cs: # 16| -1: [ParameterAccess] access to parameter n1 # 16| 1: [PropertyCall] access to property Value # 16| -1: [ParameterAccess] access to parameter n2 -# 18| 9: [SubOperator] - +# 18| 10: [SubOperator] - # 18| -1: [TypeMention] Number #-----| 2: (Parameters) # 18| 0: [Parameter] n1 @@ -70,7 +70,7 @@ CheckedOperators.cs: # 19| -1: [ParameterAccess] access to parameter n1 # 19| 1: [PropertyCall] access to property Value # 19| -1: [ParameterAccess] access to parameter n2 -# 21| 10: [CheckedMulOperator] checked * +# 21| 11: [CheckedMulOperator] checked * # 21| -1: [TypeMention] Number #-----| 2: (Parameters) # 21| 0: [Parameter] n1 @@ -85,7 +85,7 @@ CheckedOperators.cs: # 22| -1: [ParameterAccess] access to parameter n1 # 22| 1: [PropertyCall] access to property Value # 22| -1: [ParameterAccess] access to parameter n2 -# 24| 11: [MulOperator] * +# 24| 12: [MulOperator] * # 24| -1: [TypeMention] Number #-----| 2: (Parameters) # 24| 0: [Parameter] n1 @@ -99,7 +99,7 @@ CheckedOperators.cs: # 25| -1: [ParameterAccess] access to parameter n1 # 25| 1: [PropertyCall] access to property Value # 25| -1: [ParameterAccess] access to parameter n2 -# 27| 12: [CheckedDivOperator] checked / +# 27| 13: [CheckedDivOperator] checked / # 27| -1: [TypeMention] Number #-----| 2: (Parameters) # 27| 0: [Parameter] n1 @@ -114,7 +114,7 @@ CheckedOperators.cs: # 28| -1: [ParameterAccess] access to parameter n1 # 28| 1: [PropertyCall] access to property Value # 28| -1: [ParameterAccess] access to parameter n2 -# 30| 13: [DivOperator] / +# 30| 14: [DivOperator] / # 30| -1: [TypeMention] Number #-----| 2: (Parameters) # 30| 0: [Parameter] n1 @@ -128,7 +128,7 @@ CheckedOperators.cs: # 31| -1: [ParameterAccess] access to parameter n1 # 31| 1: [PropertyCall] access to property Value # 31| -1: [ParameterAccess] access to parameter n2 -# 33| 14: [CheckedMinusOperator] checked - +# 33| 15: [CheckedMinusOperator] checked - # 33| -1: [TypeMention] Number #-----| 2: (Parameters) # 33| 0: [Parameter] n @@ -139,7 +139,7 @@ CheckedOperators.cs: # 34| 0: [UnaryMinusExpr] -... # 34| 0: [PropertyCall] access to property Value # 34| -1: [ParameterAccess] access to parameter n -# 36| 15: [MinusOperator] - +# 36| 16: [MinusOperator] - # 36| -1: [TypeMention] Number #-----| 2: (Parameters) # 36| 0: [Parameter] n @@ -149,7 +149,7 @@ CheckedOperators.cs: # 37| 0: [UnaryMinusExpr] -... # 37| 0: [PropertyCall] access to property Value # 37| -1: [ParameterAccess] access to parameter n -# 39| 16: [CheckedIncrementOperator] checked ++ +# 39| 17: [CheckedIncrementOperator] checked ++ # 39| -1: [TypeMention] Number #-----| 2: (Parameters) # 39| 0: [Parameter] n @@ -161,7 +161,7 @@ CheckedOperators.cs: # 40| 0: [PropertyCall] access to property Value # 40| -1: [ParameterAccess] access to parameter n # 40| 1: [IntLiteral] 1 -# 42| 17: [IncrementOperator] ++ +# 42| 18: [IncrementOperator] ++ # 42| -1: [TypeMention] Number #-----| 2: (Parameters) # 42| 0: [Parameter] n @@ -172,7 +172,7 @@ CheckedOperators.cs: # 43| 0: [PropertyCall] access to property Value # 43| -1: [ParameterAccess] access to parameter n # 43| 1: [IntLiteral] 1 -# 45| 18: [CheckedDecrementOperator] checked -- +# 45| 19: [CheckedDecrementOperator] checked -- # 45| -1: [TypeMention] Number #-----| 2: (Parameters) # 45| 0: [Parameter] n @@ -184,7 +184,7 @@ CheckedOperators.cs: # 46| 0: [PropertyCall] access to property Value # 46| -1: [ParameterAccess] access to parameter n # 46| 1: [IntLiteral] 1 -# 48| 19: [DecrementOperator] -- +# 48| 20: [DecrementOperator] -- # 48| -1: [TypeMention] Number #-----| 2: (Parameters) # 48| 0: [Parameter] n @@ -195,7 +195,7 @@ CheckedOperators.cs: # 49| 0: [PropertyCall] access to property Value # 49| -1: [ParameterAccess] access to parameter n # 49| 1: [IntLiteral] 1 -# 51| 20: [ExplicitConversionOperator] explicit conversion +# 51| 21: [ExplicitConversionOperator] explicit conversion # 51| -1: [TypeMention] short #-----| 2: (Parameters) # 51| 0: [Parameter] n @@ -205,7 +205,7 @@ CheckedOperators.cs: # 52| 0: [TypeMention] short # 52| 1: [PropertyCall] access to property Value # 52| -1: [ParameterAccess] access to parameter n -# 54| 21: [CheckedExplicitConversionOperator] checked explicit conversion +# 54| 22: [CheckedExplicitConversionOperator] checked explicit conversion # 54| -1: [TypeMention] short #-----| 2: (Parameters) # 54| 0: [Parameter] n @@ -240,22 +240,22 @@ FileScoped1.cs: # 19| [Enum] E1 # 21| [DelegateType] D1 # 23| [RecordClass] R1 -# 23| 12: [NEOperator] != +# 23| 13: [NEOperator] != #-----| 2: (Parameters) # 23| 0: [Parameter] left # 23| 1: [Parameter] right -# 23| 13: [EQOperator] == +# 23| 14: [EQOperator] == #-----| 2: (Parameters) # 23| 0: [Parameter] left # 23| 1: [Parameter] right -# 23| 14: [Property] EqualityContract +# 23| 15: [Property] EqualityContract # 23| 3: [Getter] get_EqualityContract # 25| [RecordStruct] RS1 -# 25| 10: [NEOperator] != +# 25| 11: [NEOperator] != #-----| 2: (Parameters) # 25| 0: [Parameter] left # 25| 1: [Parameter] right -# 25| 11: [EQOperator] == +# 25| 12: [EQOperator] == #-----| 2: (Parameters) # 25| 0: [Parameter] left # 25| 1: [Parameter] right @@ -280,22 +280,22 @@ FileScoped2.cs: # 17| [Enum] E1 # 19| [DelegateType] D1 # 21| [RecordClass] R1 -# 21| 12: [NEOperator] != +# 21| 13: [NEOperator] != #-----| 2: (Parameters) # 21| 0: [Parameter] left # 21| 1: [Parameter] right -# 21| 13: [EQOperator] == +# 21| 14: [EQOperator] == #-----| 2: (Parameters) # 21| 0: [Parameter] left # 21| 1: [Parameter] right -# 21| 14: [Property] EqualityContract +# 21| 15: [Property] EqualityContract # 21| 3: [Getter] get_EqualityContract # 23| [RecordStruct] RS1 -# 23| 10: [NEOperator] != +# 23| 11: [NEOperator] != #-----| 2: (Parameters) # 23| 0: [Parameter] left # 23| 1: [Parameter] right -# 23| 11: [EQOperator] == +# 23| 12: [EQOperator] == #-----| 2: (Parameters) # 23| 0: [Parameter] left # 23| 1: [Parameter] right @@ -333,21 +333,21 @@ GenericAttribute.cs: #-----| 3: (Base types) # 7| 0: [TypeMention] Attribute # 9| [Class] TestGenericAttribute -# 13| 5: [Method] M1 +# 13| 6: [Method] M1 # 13| -1: [TypeMention] Void #-----| 0: (Attributes) # 12| 1: [GenericDefaultAttribute] [MyGeneric(...)] # 12| 0: [TypeMention] MyGenericAttribute # 12| 1: [TypeMention] int # 13| 4: [BlockStmt] {...} -# 16| 6: [Method] M2 +# 16| 7: [Method] M2 # 16| -1: [TypeMention] Void #-----| 0: (Attributes) # 15| 1: [GenericDefaultAttribute] [MyGeneric(...)] # 15| 0: [TypeMention] MyGenericAttribute # 15| 1: [TypeMention] string # 16| 4: [BlockStmt] {...} -# 19| 7: [Method] M3 +# 19| 8: [Method] M3 # 19| -1: [TypeMention] Void #-----| 0: (Attributes) # 18| 1: [GenericDefaultAttribute] [MyGeneric2(...)] @@ -355,7 +355,7 @@ GenericAttribute.cs: # 18| 1: [TypeMention] int # 18| 2: [TypeMention] string # 19| 4: [BlockStmt] {...} -# 22| 8: [Method] M4 +# 22| 9: [Method] M4 # 22| -1: [TypeMention] int #-----| 0: (Attributes) # 21| 1: [GenericReturnAttribute] [return: MyGeneric(...)] @@ -366,7 +366,7 @@ GenericAttribute.cs: # 22| 0: [IntLiteral] 0 ListPattern.cs: # 3| [Class] ListPattern -# 5| 5: [Method] M1 +# 5| 6: [Method] M1 # 5| -1: [TypeMention] Void #-----| 2: (Parameters) # 5| 0: [Parameter] x @@ -430,7 +430,7 @@ ListPattern.cs: # 13| 1: [ConstantPatternExpr,IntLiteral] 5 # 13| 2: [ConstantPatternExpr,IntLiteral] 2 # 13| 1: [BlockStmt] {...} -# 16| 6: [Method] M2 +# 16| 7: [Method] M2 # 16| -1: [TypeMention] Void #-----| 2: (Parameters) # 16| 0: [Parameter] x @@ -482,19 +482,19 @@ ListPattern.cs: # 35| 15: [BreakStmt] break; NameofScope.cs: # 3| [Class] MyAttributeTestClass -# 5| 5: [Class] MyAttribute +# 5| 6: [Class] MyAttribute #-----| 3: (Base types) # 5| 0: [TypeMention] Attribute -# 7| 4: [Field] S +# 7| 5: [Field] S # 7| -1: [TypeMention] string -# 8| 5: [InstanceConstructor] MyAttribute +# 8| 6: [InstanceConstructor] MyAttribute #-----| 2: (Parameters) # 8| 0: [Parameter] s # 8| -1: [TypeMention] string # 8| 4: [AssignExpr] ... = ... # 8| 0: [FieldAccess] access to field S # 8| 1: [ParameterAccess] access to parameter s -# 12| 6: [Method] M1`1 +# 12| 7: [Method] M1`1 # 12| -1: [TypeMention] Void #-----| 0: (Attributes) # 11| 1: [DefaultAttribute] [My(...)] @@ -508,7 +508,7 @@ NameofScope.cs: # 12| 0: [Parameter] x # 12| -1: [TypeMention] string # 12| 4: [BlockStmt] {...} -# 15| 7: [Method] M2 +# 15| 8: [Method] M2 # 15| -1: [TypeMention] string #-----| 0: (Attributes) # 14| 1: [ReturnAttribute] [return: My(...)] @@ -519,7 +519,7 @@ NameofScope.cs: # 15| 0: [Parameter] y # 15| -1: [TypeMention] string # 15| 4: [ParameterAccess] access to parameter y -# 17| 8: [Method] M3 +# 17| 9: [Method] M3 # 17| -1: [TypeMention] object #-----| 2: (Parameters) # 17| 0: [Parameter] z @@ -530,7 +530,7 @@ NameofScope.cs: # 17| 0: [NameOfExpr] nameof(...) # 17| 0: [ParameterAccess] access to parameter z # 17| 4: [ParameterAccess] access to parameter z -# 19| 9: [Method] M4`1 +# 19| 10: [Method] M4`1 # 19| -1: [TypeMention] object #-----| 1: (Type parameters) # 19| 0: [TypeParameter] S @@ -546,7 +546,7 @@ NameofScope.cs: # 19| 4: [ParameterAccess] access to parameter z NativeInt.cs: # 1| [Class] NativeInt -# 3| 5: [Method] M1 +# 3| 6: [Method] M1 # 3| -1: [TypeMention] Void # 4| 4: [BlockStmt] {...} # 5| 0: [LocalVariableDeclStmt] ... ...; @@ -579,7 +579,7 @@ NativeInt.cs: # 9| 1: [IntLiteral] 0 Operators.cs: # 2| [Class] MyClass -# 4| 5: [Method] M1 +# 4| 6: [Method] M1 # 4| -1: [TypeMention] Void # 5| 4: [BlockStmt] {...} # 6| 0: [LocalVariableDeclStmt] ... ...; @@ -618,7 +618,7 @@ Operators.cs: # 13| 0: [LocalVariableAccess] access to local variable z # 13| 1: [IntLiteral] 5 # 17| [Class] MyOperatorClass -# 19| 5: [UnsignedRightShiftOperator] >>> +# 19| 6: [UnsignedRightShiftOperator] >>> # 19| -1: [TypeMention] MyOperatorClass #-----| 2: (Parameters) # 19| 0: [Parameter] a @@ -630,7 +630,7 @@ Operators.cs: # 19| 0: [NullLiteral] null PatternMatchSpan.cs: # 3| [Class] PatternMatchSpan -# 6| 5: [Method] M1 +# 6| 6: [Method] M1 # 6| -1: [TypeMention] Void #-----| 2: (Parameters) # 6| 0: [Parameter] x1 @@ -642,7 +642,7 @@ PatternMatchSpan.cs: # 8| 0: [ParameterAccess] access to parameter x1 # 8| 1: [ConstantPatternExpr,StringLiteralUtf16] "ABC" # 8| 1: [BlockStmt] {...} -# 11| 6: [Method] M2 +# 11| 7: [Method] M2 # 11| -1: [TypeMention] Void #-----| 2: (Parameters) # 11| 0: [Parameter] x2 @@ -687,7 +687,7 @@ RelaxedShift.cs: # 7| -1: [TypeMention] TOther # 10| [Class] Number #-----| 3: (Base types) -# 12| 5: [LeftShiftOperator] << +# 12| 6: [LeftShiftOperator] << # 12| -1: [TypeMention] Number #-----| 2: (Parameters) # 12| 0: [Parameter] value @@ -695,7 +695,7 @@ RelaxedShift.cs: # 12| 1: [Parameter] shiftAmount # 12| -1: [TypeMention] string # 12| 4: [ParameterAccess] access to parameter value -# 14| 6: [RightShiftOperator] >> +# 14| 7: [RightShiftOperator] >> # 14| -1: [TypeMention] Number #-----| 2: (Parameters) # 14| 0: [Parameter] value @@ -703,7 +703,7 @@ RelaxedShift.cs: # 14| 1: [Parameter] shiftAmount # 14| -1: [TypeMention] string # 14| 4: [ParameterAccess] access to parameter value -# 16| 7: [UnsignedRightShiftOperator] >>> +# 16| 8: [UnsignedRightShiftOperator] >>> # 16| -1: [TypeMention] Number #-----| 2: (Parameters) # 16| 0: [Parameter] value @@ -712,7 +712,7 @@ RelaxedShift.cs: # 16| -1: [TypeMention] string # 16| 4: [ParameterAccess] access to parameter value # 19| [Class] TestRelaxedShift -# 21| 5: [Method] M1 +# 21| 6: [Method] M1 # 21| -1: [TypeMention] Void # 22| 4: [BlockStmt] {...} # 23| 0: [LocalVariableDeclStmt] ... ...; @@ -756,23 +756,23 @@ RelaxedShift.cs: # 30| 1: [StringLiteralUtf16] "3" RequiredMembers.cs: # 4| [Class] ClassRequiredMembers -# 6| 4: [Field] RequiredField +# 6| 5: [Field] RequiredField # 6| -1: [TypeMention] object -# 7| 5: [Property] RequiredProperty +# 7| 6: [Property] RequiredProperty # 7| -1: [TypeMention] string # 7| 3: [Getter] get_RequiredProperty # 7| 4: [Setter] set_RequiredProperty #-----| 2: (Parameters) # 7| 0: [Parameter] value -# 8| 6: [Property] VirtualProperty +# 8| 7: [Property] VirtualProperty # 8| -1: [TypeMention] object # 8| 3: [Getter] get_VirtualProperty # 8| 4: [Setter] set_VirtualProperty #-----| 2: (Parameters) # 8| 0: [Parameter] value -# 10| 7: [InstanceConstructor] ClassRequiredMembers +# 10| 8: [InstanceConstructor] ClassRequiredMembers # 10| 4: [BlockStmt] {...} -# 13| 8: [InstanceConstructor] ClassRequiredMembers +# 13| 9: [InstanceConstructor] ClassRequiredMembers #-----| 0: (Attributes) # 12| 1: [DefaultAttribute] [SetsRequiredMembers(...)] # 12| 0: [TypeMention] SetsRequiredMembersAttribute @@ -793,16 +793,16 @@ RequiredMembers.cs: # 20| [Class] ClassRequiredMembersSub #-----| 3: (Base types) # 20| 0: [TypeMention] ClassRequiredMembers -# 22| 4: [Property] VirtualProperty +# 22| 5: [Property] VirtualProperty # 22| -1: [TypeMention] object # 22| 3: [Getter] get_VirtualProperty # 22| 4: [Setter] set_VirtualProperty #-----| 2: (Parameters) # 22| 0: [Parameter] value -# 24| 5: [InstanceConstructor] ClassRequiredMembersSub +# 24| 6: [InstanceConstructor] ClassRequiredMembersSub # 24| 3: [ConstructorInitializer] call to constructor ClassRequiredMembers # 24| 4: [BlockStmt] {...} -# 27| 6: [InstanceConstructor] ClassRequiredMembersSub +# 27| 7: [InstanceConstructor] ClassRequiredMembersSub #-----| 0: (Attributes) # 26| 1: [DefaultAttribute] [SetsRequiredMembers(...)] # 26| 0: [TypeMention] SetsRequiredMembersAttribute @@ -822,24 +822,24 @@ RequiredMembers.cs: # 29| 0: [PropertyCall] access to property VirtualProperty # 29| 1: [ParameterAccess] access to parameter virtualProperty # 33| [RecordClass] RecordRequiredMembers -# 33| 12: [NEOperator] != +# 33| 13: [NEOperator] != #-----| 2: (Parameters) # 33| 0: [Parameter] left # 33| 1: [Parameter] right -# 33| 13: [EQOperator] == +# 33| 14: [EQOperator] == #-----| 2: (Parameters) # 33| 0: [Parameter] left # 33| 1: [Parameter] right -# 33| 14: [Property] EqualityContract +# 33| 15: [Property] EqualityContract # 33| 3: [Getter] get_EqualityContract -# 35| 15: [Property] X +# 35| 16: [Property] X # 35| -1: [TypeMention] object # 35| 3: [Getter] get_X # 35| 4: [Setter] set_X #-----| 2: (Parameters) # 35| 0: [Parameter] value # 38| [Struct] StructRequiredMembers -# 40| 5: [Property] Y +# 40| 6: [Property] Y # 40| -1: [TypeMention] string # 40| 3: [Getter] get_Y # 40| 4: [Setter] set_Y @@ -849,7 +849,7 @@ Scoped.cs: # 1| [Struct] S1 # 2| [RefStruct] S2 # 7| [Class] ScopedModifierTest -# 9| 5: [Method] M1 +# 9| 6: [Method] M1 # 9| -1: [TypeMention] int #-----| 2: (Parameters) # 9| 0: [Parameter] x1 @@ -860,7 +860,7 @@ Scoped.cs: # 13| 0: [ReturnStmt] return ...; # 13| 0: [RefExpr] ref ... # 13| 0: [ParameterAccess] access to parameter y1 -# 16| 6: [Method] M2 +# 16| 7: [Method] M2 # 16| -1: [TypeMention] int #-----| 2: (Parameters) # 16| 0: [Parameter] x2 @@ -875,7 +875,7 @@ Scoped.cs: # 21| 1: [ReturnStmt] return ...; # 21| 0: [RefExpr] ref ... # 21| 0: [ParameterAccess] access to parameter y2 -# 24| 7: [Method] M3 +# 24| 8: [Method] M3 # 24| -1: [TypeMention] int #-----| 2: (Parameters) # 24| 0: [Parameter] x3 @@ -883,7 +883,7 @@ Scoped.cs: # 25| 4: [BlockStmt] {...} # 27| 0: [ReturnStmt] return ...; # 27| 0: [ParameterAccess] access to parameter x3 -# 30| 8: [Method] M4 +# 30| 9: [Method] M4 # 30| -1: [TypeMention] S1 #-----| 2: (Parameters) # 30| 0: [Parameter] x4 @@ -891,7 +891,7 @@ Scoped.cs: # 31| 4: [BlockStmt] {...} # 33| 0: [ReturnStmt] return ...; # 33| 0: [ParameterAccess] access to parameter x4 -# 36| 9: [Method] M5 +# 36| 10: [Method] M5 # 36| -1: [TypeMention] S2 #-----| 2: (Parameters) # 36| 0: [Parameter] x5 @@ -900,7 +900,7 @@ Scoped.cs: # 40| 0: [ReturnStmt] return ...; # 40| 0: [ObjectCreation] object creation of type S2 # 40| 0: [TypeMention] S2 -# 43| 10: [Method] M6 +# 43| 11: [Method] M6 # 43| -1: [TypeMention] S2 #-----| 2: (Parameters) # 43| 0: [Parameter] x6 @@ -909,7 +909,7 @@ Scoped.cs: # 47| 0: [ReturnStmt] return ...; # 47| 0: [ObjectCreation] object creation of type S2 # 47| 0: [TypeMention] S2 -# 50| 11: [Method] Locals +# 50| 12: [Method] Locals # 50| -1: [TypeMention] S2 # 51| 4: [BlockStmt] {...} # 52| 0: [LocalVariableDeclStmt] ... ...; @@ -928,7 +928,7 @@ Scoped.cs: # 56| 0: [LocalVariableAccess] access to local variable y7 SignAnalysis.cs: # 1| [Class] MySignAnalysis -# 4| 5: [Method] UnsignedRightShiftSign +# 4| 6: [Method] UnsignedRightShiftSign # 4| -1: [TypeMention] Void #-----| 2: (Parameters) # 4| 0: [Parameter] x @@ -1109,27 +1109,27 @@ StaticInterfaceMembers.cs: # 23| 0: [TypeMention] T # 26| [Class] Complex #-----| 3: (Base types) -# 28| 4: [Property] Real +# 28| 5: [Property] Real # 28| -1: [TypeMention] double # 28| 2: [DoubleLiteral] 0 # 28| 3: [Getter] get_Real # 28| 4: [Setter] set_Real #-----| 2: (Parameters) # 28| 0: [Parameter] value -# 29| 5: [Property] Imaginary +# 29| 6: [Property] Imaginary # 29| -1: [TypeMention] double # 29| 2: [DoubleLiteral] 0 # 29| 3: [Getter] get_Imaginary # 29| 4: [Setter] set_Imaginary #-----| 2: (Parameters) # 29| 0: [Parameter] value -# 31| 6: [InstanceConstructor] Complex +# 31| 7: [InstanceConstructor] Complex # 31| 4: [BlockStmt] {...} -# 33| 7: [Method] Zero +# 33| 8: [Method] Zero # 33| -1: [TypeMention] Complex # 33| 4: [ObjectCreation] object creation of type Complex # 33| 0: [TypeMention] Complex -# 35| 8: [IncrementOperator] ++ +# 35| 9: [IncrementOperator] ++ # 35| -1: [TypeMention] Complex #-----| 2: (Parameters) # 35| 0: [Parameter] other @@ -1147,7 +1147,7 @@ StaticInterfaceMembers.cs: # 36| 0: [PropertyCall] access to property Imaginary # 36| 1: [PropertyCall] access to property Imaginary # 36| -1: [ParameterAccess] access to parameter other -# 38| 9: [DecrementOperator] -- +# 38| 10: [DecrementOperator] -- # 38| -1: [TypeMention] Complex #-----| 2: (Parameters) # 38| 0: [Parameter] other @@ -1165,7 +1165,7 @@ StaticInterfaceMembers.cs: # 39| 0: [PropertyCall] access to property Imaginary # 39| 1: [PropertyCall] access to property Imaginary # 39| -1: [ParameterAccess] access to parameter other -# 41| 10: [AddOperator] + +# 41| 11: [AddOperator] + # 41| -1: [TypeMention] Complex #-----| 2: (Parameters) # 41| 0: [Parameter] left @@ -1189,7 +1189,7 @@ StaticInterfaceMembers.cs: # 42| -1: [ParameterAccess] access to parameter left # 42| 1: [PropertyCall] access to property Imaginary # 42| -1: [ParameterAccess] access to parameter right -# 44| 11: [SubOperator] - +# 44| 12: [SubOperator] - # 44| -1: [TypeMention] Complex #-----| 2: (Parameters) # 44| 0: [Parameter] left @@ -1213,7 +1213,7 @@ StaticInterfaceMembers.cs: # 45| -1: [ParameterAccess] access to parameter left # 45| 1: [PropertyCall] access to property Imaginary # 45| -1: [ParameterAccess] access to parameter right -# 47| 12: [ExplicitConversionOperator] explicit conversion +# 47| 13: [ExplicitConversionOperator] explicit conversion # 47| -1: [TypeMention] int #-----| 2: (Parameters) # 47| 0: [Parameter] n @@ -1223,7 +1223,7 @@ StaticInterfaceMembers.cs: # 47| 0: [TypeMention] int # 47| 1: [PropertyCall] access to property Real # 47| -1: [ParameterAccess] access to parameter n -# 49| 13: [ExplicitConversionOperator] explicit conversion +# 49| 14: [ExplicitConversionOperator] explicit conversion # 49| -1: [TypeMention] short #-----| 2: (Parameters) # 49| 0: [Parameter] n @@ -1233,7 +1233,7 @@ StaticInterfaceMembers.cs: # 49| 0: [TypeMention] short # 49| 1: [PropertyCall] access to property Real # 49| -1: [ParameterAccess] access to parameter n -# 51| 14: [Method] Inc +# 51| 15: [Method] Inc # 51| -1: [TypeMention] INumber # 51| 1: [TypeMention] Complex # 51| -1: [TypeMention] Complex @@ -1253,7 +1253,7 @@ StaticInterfaceMembers.cs: # 52| 0: [PropertyCall] access to property Imaginary # 52| 1: [PropertyCall] access to property Imaginary # 52| -1: [ParameterAccess] access to parameter other -# 54| 15: [Method] Dec +# 54| 16: [Method] Dec # 54| -1: [TypeMention] INumber # 54| 1: [TypeMention] Complex # 54| -1: [TypeMention] Complex @@ -1273,7 +1273,7 @@ StaticInterfaceMembers.cs: # 55| 0: [PropertyCall] access to property Imaginary # 55| 1: [PropertyCall] access to property Imaginary # 55| -1: [ParameterAccess] access to parameter other -# 57| 16: [Method] Add +# 57| 17: [Method] Add # 57| -1: [TypeMention] Complex #-----| 2: (Parameters) # 57| 0: [Parameter] left @@ -1297,7 +1297,7 @@ StaticInterfaceMembers.cs: # 58| -1: [ParameterAccess] access to parameter left # 58| 1: [PropertyCall] access to property Imaginary # 58| -1: [ParameterAccess] access to parameter right -# 60| 17: [Method] Subtract +# 60| 18: [Method] Subtract # 60| -1: [TypeMention] Complex #-----| 2: (Parameters) # 60| 0: [Parameter] left @@ -1323,7 +1323,7 @@ StaticInterfaceMembers.cs: # 61| -1: [ParameterAccess] access to parameter right Strings.cs: # 3| [Class] MyTestClass -# 5| 5: [Method] M1 +# 5| 6: [Method] M1 # 5| -1: [TypeMention] string #-----| 2: (Parameters) # 5| 0: [Parameter] x @@ -1342,7 +1342,7 @@ Strings.cs: # 11| 0: [DiscardPatternExpr] _ # 11| 2: [StringLiteralUtf16] "something else" # 12| 2: [StringLiteralUtf16] "." -# 15| 6: [Method] M2 +# 15| 7: [Method] M2 # 15| -1: [TypeMention] Void # 16| 4: [BlockStmt] {...} # 18| 0: [LocalVariableDeclStmt] ... ...; @@ -1377,7 +1377,7 @@ Strings.cs: # 35| 3: [InterpolatedStringInsertExpr] {...} # 35| 0: [LocalVariableAccess] access to local variable message2 # 35| 4: [StringLiteralUtf16] "}" -# 40| 7: [Method] M3 +# 40| 8: [Method] M3 # 40| -1: [TypeMention] Void # 41| 4: [BlockStmt] {...} # 43| 0: [LocalVariableDeclStmt] ... ...; @@ -1407,30 +1407,30 @@ Struct.cs: # 1| [NamespaceDeclaration] namespace ... { ... } # 3| 1: [Class] MyEmptyClass # 5| 2: [RefStruct] RefStruct -# 7| 5: [Field] MyInt +# 7| 6: [Field] MyInt # 7| -1: [TypeMention] int -# 8| 6: [Field] MyByte +# 8| 7: [Field] MyByte # 8| -1: [TypeMention] byte -# 9| 7: [Field] MyObject +# 9| 8: [Field] MyObject # 9| -1: [TypeMention] object -# 10| 8: [Field] MyEmptyClass +# 10| 9: [Field] MyEmptyClass # 10| -1: [TypeMention] MyEmptyClass -# 11| 9: [Field] MyReadonlyByte +# 11| 10: [Field] MyReadonlyByte # 11| -1: [TypeMention] byte -# 12| 10: [Field] MyReadonlyObject +# 12| 11: [Field] MyReadonlyObject # 12| -1: [TypeMention] object -# 13| 11: [Field] MyReadonlyString +# 13| 12: [Field] MyReadonlyString # 13| -1: [TypeMention] string StructDefault.cs: # 1| [Class] MyEmptyClass # 2| [Struct] StructDefaultValue -# 4| 5: [Field] X +# 4| 6: [Field] X # 4| -1: [TypeMention] int -# 5| 6: [Field] Y +# 5| 7: [Field] Y # 5| -1: [TypeMention] int -# 6| 7: [Field] Z +# 6| 8: [Field] Z # 6| -1: [TypeMention] MyEmptyClass -# 8| 8: [InstanceConstructor] StructDefaultValue +# 8| 9: [InstanceConstructor] StructDefaultValue #-----| 2: (Parameters) # 8| 0: [Parameter] x # 8| -1: [TypeMention] int diff --git a/csharp/ql/test/library-tests/csharp6/MemberAccess.expected b/csharp/ql/test/library-tests/csharp6/MemberAccess.expected index 1eda117fadd..d54af10ffc3 100644 --- a/csharp/ql/test/library-tests/csharp6/MemberAccess.expected +++ b/csharp/ql/test/library-tests/csharp6/MemberAccess.expected @@ -4,7 +4,10 @@ memberAccess | csharp6.cs:32:38:32:70 | access to indexer | csharp6.cs:32:38:32:66 | object creation of type Dictionary | Conditional | | csharp6.cs:32:38:32:73 | access to indexer | csharp6.cs:32:38:32:70 | access to indexer | Unconditional | methodCall +| csharp6.cs:10:7:10:17 | call to method | csharp6.cs:10:7:10:17 | this access | Unconditional | | csharp6.cs:30:31:30:44 | call to method ToUpper | csharp6.cs:30:31:30:33 | access to local variable foo | Conditional | +| csharp6.cs:53:7:53:23 | call to method | csharp6.cs:53:7:53:23 | this access | Unconditional | +| csharp6.cs:55:11:55:18 | call to method | csharp6.cs:55:11:55:18 | this access | Unconditional | extensionMethodCall | csharp6.cs:29:35:29:44 | call to method Any | csharp6.cs:29:35:29:37 | access to local variable bar | Conditional | | csharp6.cs:30:31:30:66 | call to method Select | csharp6.cs:30:31:30:44 | call to method ToUpper | Unconditional | diff --git a/csharp/ql/test/library-tests/csharp6/PrintAst.expected b/csharp/ql/test/library-tests/csharp6/PrintAst.expected index 424a18bcb02..78747650190 100644 --- a/csharp/ql/test/library-tests/csharp6/PrintAst.expected +++ b/csharp/ql/test/library-tests/csharp6/PrintAst.expected @@ -1,17 +1,17 @@ csharp6.cs: # 10| [Class] TestCSharp6 -# 12| 6: [Property] Value +# 12| 7: [Property] Value # 12| -1: [TypeMention] int # 15| 2: [IntLiteral] 20 # 14| 3: [Getter] get_Value -# 17| 7: [Method] Fn +# 17| 8: [Method] Fn # 17| -1: [TypeMention] Void #-----| 2: (Parameters) # 17| 0: [Parameter] x # 17| -1: [TypeMention] string # 17| 4: [MethodCall] call to method WriteLine # 17| 0: [ParameterAccess] access to parameter x -# 19| 8: [Method] Main +# 19| 9: [Method] Main # 19| -1: [TypeMention] Void # 20| 4: [BlockStmt] {...} # 21| 0: [TryStmt] try {...} ... @@ -112,7 +112,7 @@ csharp6.cs: # 37| 1: [IntLiteral] 30 # 40| 3: [GeneralCatchClause] catch {...} # 41| 1: [BlockStmt] {...} -# 45| 9: [EQOperator] == +# 45| 10: [EQOperator] == # 45| -1: [TypeMention] bool #-----| 2: (Parameters) # 45| 0: [Parameter] t1 @@ -120,7 +120,7 @@ csharp6.cs: # 45| 1: [Parameter] t2 # 45| -1: [TypeMention] TestCSharp6 # 45| 4: [BoolLiteral] true -# 46| 10: [NEOperator] != +# 46| 11: [NEOperator] != # 46| -1: [TypeMention] bool #-----| 2: (Parameters) # 46| 0: [Parameter] t1 @@ -128,11 +128,11 @@ csharp6.cs: # 46| 1: [Parameter] t2 # 46| -1: [TypeMention] TestCSharp6 # 46| 4: [BoolLiteral] false -# 48| 11: [Property] ExprProperty +# 48| 12: [Property] ExprProperty # 48| -1: [TypeMention] int # 48| 3: [Getter] get_ExprProperty # 48| 4: [IntLiteral] 3 -# 50| 12: [Indexer] Item +# 50| 13: [Indexer] Item # 50| -1: [TypeMention] int #-----| 1: (Parameters) # 50| 0: [Parameter] i @@ -142,12 +142,12 @@ csharp6.cs: # 50| 0: [Parameter] i # 50| 4: [ParameterAccess] access to parameter i # 53| [Class] IndexInitializers -# 55| 5: [Class] Compound -# 57| 5: [Field] DictionaryField +# 55| 6: [Class] Compound +# 57| 6: [Field] DictionaryField # 57| -1: [TypeMention] Dictionary # 57| 1: [TypeMention] int # 57| 2: [TypeMention] string -# 58| 6: [Property] DictionaryProperty +# 58| 7: [Property] DictionaryProperty # 58| -1: [TypeMention] Dictionary # 58| 1: [TypeMention] int # 58| 2: [TypeMention] string @@ -155,27 +155,27 @@ csharp6.cs: # 58| 4: [Setter] set_DictionaryProperty #-----| 2: (Parameters) # 58| 0: [Parameter] value -# 59| 7: [Field] ArrayField +# 59| 8: [Field] ArrayField # 59| -1: [TypeMention] String[] # 59| 1: [TypeMention] string -# 60| 8: [Property] ArrayProperty +# 60| 9: [Property] ArrayProperty # 60| -1: [TypeMention] String[] # 60| 1: [TypeMention] string # 60| 3: [Getter] get_ArrayProperty # 60| 4: [Setter] set_ArrayProperty #-----| 2: (Parameters) # 60| 0: [Parameter] value -# 61| 9: [Field] ArrayField2 +# 61| 10: [Field] ArrayField2 # 61| -1: [TypeMention] String[,] # 61| 1: [TypeMention] string -# 62| 10: [Property] ArrayProperty2 +# 62| 11: [Property] ArrayProperty2 # 62| -1: [TypeMention] String[,] # 62| 1: [TypeMention] string # 62| 3: [Getter] get_ArrayProperty2 # 62| 4: [Setter] set_ArrayProperty2 #-----| 2: (Parameters) # 62| 0: [Parameter] value -# 65| 6: [Method] Test +# 65| 7: [Method] Test # 65| -1: [TypeMention] Void # 66| 4: [BlockStmt] {...} # 68| 0: [LocalVariableDeclStmt] ... ...; diff --git a/csharp/ql/test/library-tests/csharp7.1/PrintAst.expected b/csharp/ql/test/library-tests/csharp7.1/PrintAst.expected index 7f4e1467218..b33c09db0ec 100644 --- a/csharp/ql/test/library-tests/csharp7.1/PrintAst.expected +++ b/csharp/ql/test/library-tests/csharp7.1/PrintAst.expected @@ -1,6 +1,6 @@ csharp71.cs: # 1| [Class] DefaultLiterals -# 3| 5: [Method] f +# 3| 6: [Method] f # 3| -1: [TypeMention] Void # 4| 4: [BlockStmt] {...} # 5| 0: [LocalVariableDeclStmt] ... ...; @@ -50,7 +50,7 @@ csharp71.cs: # 15| 1: [CastExpr] (...) ... # 15| 1: [DefaultValueExpr] default # 19| [Class] IsConstants -# 21| 5: [Method] f +# 21| 6: [Method] f # 21| -1: [TypeMention] Void # 22| 4: [BlockStmt] {...} # 23| 0: [LocalVariableDeclStmt] ... ...; diff --git a/csharp/ql/test/library-tests/csharp7.2/PrintAst.expected b/csharp/ql/test/library-tests/csharp7.2/PrintAst.expected index 834b03b4471..bbfb098c3af 100644 --- a/csharp/ql/test/library-tests/csharp7.2/PrintAst.expected +++ b/csharp/ql/test/library-tests/csharp7.2/PrintAst.expected @@ -1,13 +1,13 @@ csharp72.cs: # 3| [Class] InModifiers -# 5| 5: [Struct] S -# 9| 6: [Method] F +# 5| 6: [Struct] S +# 9| 7: [Method] F # 9| -1: [TypeMention] Void #-----| 2: (Parameters) # 9| 0: [Parameter] s # 9| -1: [TypeMention] S # 10| 4: [BlockStmt] {...} -# 13| 7: [Method] CallF +# 13| 8: [Method] CallF # 13| -1: [TypeMention] Void # 14| 4: [BlockStmt] {...} # 15| 0: [LocalVariableDeclStmt] ... ...; @@ -20,26 +20,26 @@ csharp72.cs: # 16| 0: [MethodCall] call to method F # 16| 0: [LocalVariableAccess] access to local variable s # 20| [Class] RefReadonlyReturns -# 22| 5: [Field] s +# 22| 6: [Field] s # 22| -1: [TypeMention] int -# 24| 6: [Method] F +# 24| 7: [Method] F # 24| -1: [TypeMention] int # 25| 4: [BlockStmt] {...} # 26| 0: [ReturnStmt] return ...; # 26| 0: [RefExpr] ref ... # 26| 0: [FieldAccess] access to field s -# 29| 7: [DelegateType] Del +# 29| 8: [DelegateType] Del # 32| [Struct] ReadonlyStruct # 36| [RefStruct] RefStruct # 40| [RefStruct] ReadonlyRefStruct # 44| [Class] NumericLiterals -# 46| 5: [Field] binaryValue +# 46| 6: [Field] binaryValue # 46| -1: [TypeMention] int # 46| 1: [IntLiteral] 85 # 49| [Class] PrivateProtected -# 51| 5: [Field] X +# 51| 6: [Field] X # 51| -1: [TypeMention] int # 51| 1: [IntLiteral] 1 -# 53| 6: [Method] F +# 53| 7: [Method] F # 53| -1: [TypeMention] Void # 53| 4: [BlockStmt] {...} diff --git a/csharp/ql/test/library-tests/csharp7.3/PrintAst.expected b/csharp/ql/test/library-tests/csharp7.3/PrintAst.expected index 70bfee85c04..29ad30dc223 100644 --- a/csharp/ql/test/library-tests/csharp7.3/PrintAst.expected +++ b/csharp/ql/test/library-tests/csharp7.3/PrintAst.expected @@ -1,6 +1,6 @@ csharp73.cs: # 3| [Class] StackAllocs -# 5| 5: [Method] Fn +# 5| 6: [Method] Fn # 5| -1: [TypeMention] Void # 6| 4: [BlockStmt] {...} # 7| 0: [LocalVariableDeclStmt] ... ...; @@ -58,7 +58,7 @@ csharp73.cs: # 12| 1: [IntLiteral] 2 # 12| 2: [IntLiteral] 3 # 16| [Class] PinnedReference -# 18| 5: [Method] F +# 18| 6: [Method] F # 18| -1: [TypeMention] Void # 19| 4: [BlockStmt] {...} # 20| 0: [LocalVariableDeclStmt] ... ...; @@ -91,7 +91,7 @@ csharp73.cs: #-----| 1: (Type parameters) # 38| 0: [TypeParameter] T # 42| [Class] ExpressionVariables -# 44| 4: [InstanceConstructor] ExpressionVariables +# 44| 5: [InstanceConstructor] ExpressionVariables #-----| 2: (Parameters) # 44| 0: [Parameter] x # 44| -1: [TypeMention] int @@ -100,7 +100,7 @@ csharp73.cs: # 46| 0: [AssignExpr] ... = ... # 46| 0: [ParameterAccess] access to parameter x # 46| 1: [IntLiteral] 5 -# 49| 5: [InstanceConstructor] ExpressionVariables +# 49| 6: [InstanceConstructor] ExpressionVariables # 49| 3: [ConstructorInitializer] call to constructor ExpressionVariables # 49| 0: [LocalVariableAccess,LocalVariableDeclExpr] Int32 x # 50| 4: [BlockStmt] {...} diff --git a/csharp/ql/test/library-tests/csharp7/LocalTaintFlow.expected b/csharp/ql/test/library-tests/csharp7/LocalTaintFlow.expected index 0a5266ed359..a37109c8481 100644 --- a/csharp/ql/test/library-tests/csharp7/LocalTaintFlow.expected +++ b/csharp/ql/test/library-tests/csharp7/LocalTaintFlow.expected @@ -1,3 +1,4 @@ +| CSharp7.cs:5:7:5:14 | this | CSharp7.cs:5:7:5:14 | this access | | CSharp7.cs:5:7:5:14 | this | CSharp7.cs:7:9:7:9 | this access | | CSharp7.cs:7:9:7:9 | [post] this access | CSharp7.cs:8:9:8:9 | this access | | CSharp7.cs:7:9:7:9 | this access | CSharp7.cs:8:9:8:9 | this access | @@ -6,8 +7,7 @@ | CSharp7.cs:8:9:8:9 | this access | CSharp7.cs:9:9:9:9 | this access | | CSharp7.cs:8:13:8:19 | 123456 | CSharp7.cs:8:9:8:9 | access to field y | | CSharp7.cs:9:13:9:23 | 128 | CSharp7.cs:9:9:9:9 | access to field z | -| CSharp7.cs:14:9:14:13 | [post] this access | CSharp7.cs:23:39:23:43 | this access | -| CSharp7.cs:14:9:14:13 | this access | CSharp7.cs:23:39:23:43 | this access | +| CSharp7.cs:12:7:12:29 | this | CSharp7.cs:14:9:14:13 | this access | | CSharp7.cs:14:17:14:17 | 0 | CSharp7.cs:14:9:14:13 | access to field field | | CSharp7.cs:15:9:15:11 | SSA entry def(this.field) | CSharp7.cs:15:18:15:22 | access to field field | | CSharp7.cs:15:9:15:11 | this | CSharp7.cs:15:18:15:22 | this access | @@ -16,13 +16,17 @@ | CSharp7.cs:20:9:20:11 | this | CSharp7.cs:20:16:20:20 | this access | | CSharp7.cs:20:9:20:11 | value | CSharp7.cs:20:9:20:11 | SSA param(value) | | CSharp7.cs:20:24:20:28 | access to parameter value | CSharp7.cs:20:16:20:20 | access to field field | -| CSharp7.cs:23:5:23:27 | this | CSharp7.cs:14:9:14:13 | this access | +| CSharp7.cs:23:5:23:27 | [post] this access | CSharp7.cs:23:39:23:43 | this access | +| CSharp7.cs:23:5:23:27 | this | CSharp7.cs:23:5:23:27 | this access | +| CSharp7.cs:23:5:23:27 | this access | CSharp7.cs:23:39:23:43 | this access | | CSharp7.cs:24:6:24:28 | this | CSharp7.cs:24:35:24:39 | this access | +| CSharp7.cs:27:7:27:15 | this | CSharp7.cs:27:7:27:15 | this access | | CSharp7.cs:29:19:29:19 | SSA param(i) | CSharp7.cs:31:16:31:16 | access to parameter i | | CSharp7.cs:29:19:29:19 | i | CSharp7.cs:29:19:29:19 | SSA param(i) | | CSharp7.cs:31:16:31:16 | access to parameter i | CSharp7.cs:31:16:31:20 | ... > ... | | CSharp7.cs:31:16:31:16 | access to parameter i | CSharp7.cs:31:24:31:24 | access to parameter i | | CSharp7.cs:31:24:31:24 | access to parameter i | CSharp7.cs:31:16:31:59 | ... ? ... : ... | +| CSharp7.cs:35:7:35:18 | this | CSharp7.cs:35:7:35:18 | this access | | CSharp7.cs:39:9:39:9 | access to parameter x | CSharp7.cs:39:9:39:21 | SSA def(x) | | CSharp7.cs:39:13:39:21 | "tainted" | CSharp7.cs:39:9:39:9 | access to parameter x | | CSharp7.cs:42:19:42:19 | SSA param(x) | CSharp7.cs:44:13:44:13 | access to parameter x | @@ -48,6 +52,7 @@ | CSharp7.cs:55:30:55:31 | SSA def(t4) | CSharp7.cs:56:18:56:19 | access to local variable t4 | | CSharp7.cs:55:30:55:31 | String t4 | CSharp7.cs:55:30:55:31 | SSA def(t4) | | CSharp7.cs:56:18:56:19 | access to local variable t4 | CSharp7.cs:56:13:56:14 | access to local variable t5 | +| CSharp7.cs:60:7:60:12 | this | CSharp7.cs:60:7:60:12 | this access | | CSharp7.cs:67:10:67:20 | this | CSharp7.cs:69:26:69:28 | this access | | CSharp7.cs:69:26:69:28 | [post] this access | CSharp7.cs:70:17:70:19 | this access | | CSharp7.cs:69:26:69:28 | call to method F | CSharp7.cs:69:9:69:22 | (..., ...) | @@ -136,6 +141,7 @@ | CSharp7.cs:121:22:121:36 | ... = ... | CSharp7.cs:121:16:121:18 | access to local variable m13 | | CSharp7.cs:121:28:121:36 | "DefUse3" | CSharp7.cs:121:22:121:24 | access to local variable m12 | | CSharp7.cs:121:28:121:36 | "DefUse3" | CSharp7.cs:121:22:121:36 | ... = ... | +| CSharp7.cs:125:7:125:20 | this | CSharp7.cs:125:7:125:20 | this access | | CSharp7.cs:127:9:127:12 | this | CSharp7.cs:133:24:133:25 | this access | | CSharp7.cs:129:20:129:20 | SSA param(x) | CSharp7.cs:129:32:129:32 | access to parameter x | | CSharp7.cs:129:20:129:20 | x | CSharp7.cs:129:20:129:20 | SSA param(x) | @@ -191,6 +197,7 @@ | CSharp7.cs:181:23:181:25 | [post] access to local variable src | CSharp7.cs:182:23:182:25 | access to local variable src | | CSharp7.cs:181:23:181:25 | access to local variable src | CSharp7.cs:182:23:182:25 | access to local variable src | | CSharp7.cs:182:21:182:26 | call to local function h | CSharp7.cs:182:13:182:17 | access to local variable sink3 | +| CSharp7.cs:186:7:186:10 | this | CSharp7.cs:186:7:186:10 | this access | | CSharp7.cs:188:10:188:11 | this | CSharp7.cs:197:14:197:23 | this access | | CSharp7.cs:190:13:190:14 | access to local variable v1 | CSharp7.cs:190:13:190:18 | SSA def(v1) | | CSharp7.cs:190:13:190:18 | SSA def(v1) | CSharp7.cs:191:26:191:27 | access to local variable v1 | @@ -224,6 +231,7 @@ | CSharp7.cs:202:24:202:24 | p | CSharp7.cs:202:24:202:24 | SSA param(p) | | CSharp7.cs:204:28:204:28 | SSA param(q) | CSharp7.cs:204:44:204:44 | access to parameter q | | CSharp7.cs:204:28:204:28 | q | CSharp7.cs:204:28:204:28 | SSA param(q) | +| CSharp7.cs:211:7:211:14 | this | CSharp7.cs:211:7:211:14 | this access | | CSharp7.cs:215:9:215:9 | access to parameter x | CSharp7.cs:215:9:215:17 | SSA def(x) | | CSharp7.cs:215:13:215:17 | false | CSharp7.cs:215:9:215:9 | access to parameter x | | CSharp7.cs:219:10:219:13 | this | CSharp7.cs:221:13:221:20 | this access | @@ -237,6 +245,7 @@ | CSharp7.cs:223:22:223:29 | call to method f | CSharp7.cs:223:9:223:18 | (..., ...) | | CSharp7.cs:223:22:223:29 | this access | CSharp7.cs:224:22:224:33 | this access | | CSharp7.cs:224:22:224:33 | call to method f | CSharp7.cs:224:9:224:18 | (..., ...) | +| CSharp7.cs:228:7:228:14 | this | CSharp7.cs:228:7:228:14 | this access | | CSharp7.cs:232:16:232:16 | access to local variable o | CSharp7.cs:232:16:232:23 | SSA def(o) | | CSharp7.cs:232:16:232:23 | SSA def(o) | CSharp7.cs:233:13:233:13 | access to local variable o | | CSharp7.cs:232:20:232:23 | null | CSharp7.cs:232:16:232:16 | access to local variable o | @@ -303,6 +312,7 @@ | CSharp7.cs:264:37:264:43 | "string " | CSharp7.cs:264:35:264:48 | $"..." | | CSharp7.cs:264:44:264:47 | {...} | CSharp7.cs:264:35:264:48 | $"..." | | CSharp7.cs:264:45:264:46 | access to local variable s2 | CSharp7.cs:264:44:264:47 | {...} | +| CSharp7.cs:278:7:278:23 | this | CSharp7.cs:278:7:278:23 | this access | | CSharp7.cs:282:13:282:16 | access to local variable dict | CSharp7.cs:282:13:282:48 | SSA def(dict) | | CSharp7.cs:282:13:282:48 | SSA def(dict) | CSharp7.cs:283:20:283:23 | access to local variable dict | | CSharp7.cs:282:20:282:48 | object creation of type Dictionary | CSharp7.cs:282:13:282:16 | access to local variable dict | @@ -316,6 +326,7 @@ | CSharp7.cs:283:51:283:54 | access to parameter item | CSharp7.cs:283:51:283:60 | access to property Value | | CSharp7.cs:285:39:285:42 | access to local variable list | CSharp7.cs:287:36:287:39 | access to local variable list | | CSharp7.cs:287:36:287:39 | access to local variable list | CSharp7.cs:289:32:289:35 | access to local variable list | +| CSharp7.cs:293:7:293:14 | this | CSharp7.cs:293:7:293:14 | this access | | CSharp7.cs:297:18:297:18 | access to local variable x | CSharp7.cs:297:18:297:22 | SSA def(x) | | CSharp7.cs:297:18:297:22 | SSA def(x) | CSharp7.cs:297:25:297:25 | access to local variable x | | CSharp7.cs:297:22:297:22 | 0 | CSharp7.cs:297:18:297:18 | access to local variable x | diff --git a/csharp/ql/test/library-tests/csharp7/PrintAst.expected b/csharp/ql/test/library-tests/csharp7/PrintAst.expected index bf0b07abbeb..47ab207bb55 100644 --- a/csharp/ql/test/library-tests/csharp7/PrintAst.expected +++ b/csharp/ql/test/library-tests/csharp7/PrintAst.expected @@ -1,26 +1,26 @@ CSharp7.cs: # 5| [Class] Literals -# 7| 5: [Field] x +# 7| 6: [Field] x # 7| -1: [TypeMention] int # 7| 1: [IntLiteral] 11 -# 8| 6: [Field] y +# 8| 7: [Field] y # 8| -1: [TypeMention] int # 8| 1: [IntLiteral] 123456 -# 9| 7: [Field] z +# 9| 8: [Field] z # 9| -1: [TypeMention] int # 9| 1: [IntLiteral] 128 # 12| [Class] ExpressionBodiedMembers -# 14| 4: [Field] field +# 14| 5: [Field] field # 14| -1: [TypeMention] int # 14| 1: [IntLiteral] 0 -# 15| 5: [Method] Foo +# 15| 6: [Method] Foo # 15| -1: [TypeMention] int # 15| 4: [FieldAccess] access to field field -# 16| 6: [Property] P +# 16| 7: [Property] P # 16| -1: [TypeMention] int # 16| 3: [Getter] get_P # 16| 4: [IntLiteral] 5 -# 17| 7: [Property] Q +# 17| 8: [Property] Q # 17| -1: [TypeMention] int # 19| 3: [Getter] get_Q # 19| 4: [MethodCall] call to method Foo @@ -30,19 +30,19 @@ CSharp7.cs: # 20| 4: [AssignExpr] ... = ... # 20| 0: [FieldAccess] access to field field # 20| 1: [ParameterAccess] access to parameter value -# 22| 8: [InstanceConstructor] ExpressionBodiedMembers +# 22| 9: [InstanceConstructor] ExpressionBodiedMembers # 22| 3: [ConstructorInitializer] call to constructor ExpressionBodiedMembers # 22| 0: [IntLiteral] 1 # 22| 4: [BlockStmt] {...} -# 23| 9: [InstanceConstructor] ExpressionBodiedMembers +# 23| 10: [InstanceConstructor] ExpressionBodiedMembers #-----| 2: (Parameters) # 23| 0: [Parameter] x # 23| -1: [TypeMention] int # 23| 4: [MethodCall] call to method Foo -# 24| 10: [Destructor] ~ExpressionBodiedMembers +# 24| 11: [Destructor] ~ExpressionBodiedMembers # 24| 4: [MethodCall] call to method Foo # 27| [Class] ThrowExpr -# 29| 5: [Method] Throw +# 29| 6: [Method] Throw # 29| -1: [TypeMention] int #-----| 2: (Parameters) # 29| 0: [Parameter] i @@ -59,7 +59,7 @@ CSharp7.cs: # 31| -1: [TypeMention] ArgumentException # 31| 0: [StringLiteralUtf16] "i" # 35| [Class] OutVariables -# 37| 5: [Method] F +# 37| 6: [Method] F # 37| -1: [TypeMention] Void #-----| 2: (Parameters) # 37| 0: [Parameter] x @@ -69,7 +69,7 @@ CSharp7.cs: # 39| 0: [AssignExpr] ... = ... # 39| 0: [ParameterAccess] access to parameter x # 39| 1: [StringLiteralUtf16] "tainted" -# 42| 6: [Method] G +# 42| 7: [Method] G # 42| -1: [TypeMention] Void #-----| 2: (Parameters) # 42| 0: [Parameter] x @@ -81,7 +81,7 @@ CSharp7.cs: # 44| 0: [AssignExpr] ... = ... # 44| 0: [ParameterAccess] access to parameter y # 44| 1: [ParameterAccess] access to parameter x -# 47| 7: [Method] G +# 47| 8: [Method] G # 47| -1: [TypeMention] Void # 48| 4: [BlockStmt] {...} # 49| 0: [ExprStmt] ...; @@ -116,7 +116,7 @@ CSharp7.cs: # 56| 0: [LocalVariableAccess] access to local variable t5 # 56| 1: [LocalVariableAccess] access to local variable t4 # 60| [Class] Tuples -# 62| 5: [Method] F +# 62| 6: [Method] F # 62| -1: [TypeMention] (int, int) # 62| 1: [TypeMention] int # 62| 2: [TypeMention] int @@ -125,7 +125,7 @@ CSharp7.cs: # 64| 0: [TupleExpr] (..., ...) # 64| 0: [IntLiteral] 1 # 64| 1: [IntLiteral] 2 -# 67| 6: [Method] Expressions +# 67| 7: [Method] Expressions # 67| -1: [TypeMention] Void # 68| 4: [BlockStmt] {...} # 69| 0: [ExprStmt] ...; @@ -203,7 +203,7 @@ CSharp7.cs: # 77| 1: [TupleExpr] (..., ...) # 77| 0: [StringLiteralUtf16] "" # 77| 1: [LocalVariableAccess] access to local variable x -# 80| 7: [Method] I +# 80| 8: [Method] I # 80| -1: [TypeMention] string #-----| 2: (Parameters) # 80| 0: [Parameter] x @@ -214,7 +214,7 @@ CSharp7.cs: # 82| -1: [TupleExpr] (..., ...) # 82| 0: [ParameterAccess] access to parameter x # 82| 1: [IntLiteral] 2 -# 85| 8: [Method] TaintFlow +# 85| 9: [Method] TaintFlow # 85| -1: [TypeMention] Void # 86| 4: [BlockStmt] {...} # 87| 0: [LocalVariableDeclStmt] ... ...; @@ -242,7 +242,7 @@ CSharp7.cs: # 90| 1: [MethodCall] call to method I # 90| 0: [FieldAccess] access to field Item1 # 90| -1: [LocalVariableAccess] access to local variable t1 -# 93| 9: [Method] TupleExprNode +# 93| 10: [Method] TupleExprNode # 93| -1: [TypeMention] Void # 94| 4: [BlockStmt] {...} # 95| 0: [LocalVariableDeclStmt] ... ...; @@ -261,7 +261,7 @@ CSharp7.cs: # 96| 1: [TupleExpr] (..., ...) # 96| 0: [StringLiteralUtf16] "TupleExprNode2" # 96| 1: [IntLiteral] 2 -# 99| 10: [Method] TupleMemberAccess +# 99| 11: [Method] TupleMemberAccess # 99| -1: [TypeMention] Void # 100| 4: [BlockStmt] {...} # 101| 0: [LocalVariableDeclStmt] ... ...; @@ -282,7 +282,7 @@ CSharp7.cs: # 102| 1: [TupleExpr] (..., ...) # 102| 0: [StringLiteralUtf16] "TupleMemberAccess2" # 102| 1: [IntLiteral] 1 -# 105| 11: [Method] DefUse +# 105| 12: [Method] DefUse # 105| -1: [TypeMention] Void # 106| 4: [BlockStmt] {...} # 107| 0: [ExprStmt] ...; @@ -361,7 +361,7 @@ CSharp7.cs: # 121| 0: [LocalVariableAccess] access to local variable m12 # 121| 1: [StringLiteralUtf16] "DefUse3" # 125| [Class] LocalFunctions -# 127| 5: [Method] Main +# 127| 6: [Method] Main # 127| -1: [TypeMention] int # 128| 4: [BlockStmt] {...} # 129| 0: [LocalFunctionStmt] f1(...) @@ -462,7 +462,7 @@ CSharp7.cs: # 154| 0: [LocalFunctionCall] call to local function f1 # 154| -1: [LocalFunctionAccess] access to local function f1 # 154| 0: [IntLiteral] 2 -# 157| 6: [Method] Generics +# 157| 7: [Method] Generics # 157| -1: [TypeMention] Void # 158| 4: [BlockStmt] {...} # 159| 0: [LocalFunctionStmt] f(...) @@ -517,7 +517,7 @@ CSharp7.cs: # 170| -1: [LocalFunctionAccess] access to local function h # 170| 0: [StringLiteralUtf16] "" # 170| 1: [BoolLiteral] true -# 173| 7: [Method] GlobalFlow +# 173| 8: [Method] GlobalFlow # 173| -1: [TypeMention] Void # 174| 4: [BlockStmt] {...} # 175| 0: [LocalVariableDeclStmt] ... ...; @@ -571,7 +571,7 @@ CSharp7.cs: # 182| -1: [LocalFunctionAccess] access to local function h # 182| 0: [LocalVariableAccess] access to local variable src # 186| [Class] Refs -# 188| 5: [Method] F1 +# 188| 6: [Method] F1 # 188| -1: [TypeMention] Void # 189| 4: [BlockStmt] {...} # 190| 0: [LocalVariableDeclStmt] ... ...; @@ -634,7 +634,7 @@ CSharp7.cs: # 199| 0: [MethodCall] call to method F2 # 199| 0: [LocalVariableAccess] access to local variable r1 # 199| 1: [IntLiteral] 3 -# 202| 6: [Method] F2 +# 202| 7: [Method] F2 # 202| -1: [TypeMention] int #-----| 2: (Parameters) # 202| 0: [Parameter] p @@ -652,12 +652,12 @@ CSharp7.cs: # 205| 1: [ReturnStmt] return ...; # 205| 0: [RefExpr] ref ... # 205| 0: [ParameterAccess] access to parameter p -# 208| 7: [DelegateType] RefFn +# 208| 8: [DelegateType] RefFn #-----| 2: (Parameters) # 208| 0: [Parameter] p # 208| -1: [TypeMention] int # 211| [Class] Discards -# 213| 5: [Method] f +# 213| 6: [Method] f # 213| -1: [TypeMention] (int, double) # 213| 1: [TypeMention] int # 213| 2: [TypeMention] double @@ -673,7 +673,7 @@ CSharp7.cs: # 216| 0: [TupleExpr] (..., ...) # 216| 0: [IntLiteral] 0 # 216| 1: [DoubleLiteral] 0 -# 219| 6: [Method] Test +# 219| 7: [Method] Test # 219| -1: [TypeMention] Void # 220| 4: [BlockStmt] {...} # 221| 0: [ExprStmt] ...; @@ -703,7 +703,7 @@ CSharp7.cs: # 224| 1: [MethodCall] call to method f # 224| 0: [LocalVariableAccess,LocalVariableDeclExpr] Boolean z # 228| [Class] Patterns -# 230| 5: [Method] Test +# 230| 6: [Method] Test # 230| -1: [TypeMention] Void # 231| 4: [BlockStmt] {...} # 232| 0: [LocalVariableDeclStmt] ... ...; @@ -839,7 +839,7 @@ CSharp7.cs: # 272| 0: [StringLiteralUtf16] "Something else" # 273| 23: [BreakStmt] break; # 278| [Class] ForeachStatements -# 280| 5: [Method] Test +# 280| 6: [Method] Test # 280| -1: [TypeMention] Void # 281| 4: [BlockStmt] {...} # 282| 0: [LocalVariableDeclStmt] ... ...; @@ -883,7 +883,7 @@ CSharp7.cs: # 289| 1: [LocalVariableAccess] access to local variable list # 289| 2: [BlockStmt] {...} # 293| [Class] ForLoops -# 295| 5: [Method] Test +# 295| 6: [Method] Test # 295| -1: [TypeMention] Void # 296| 4: [BlockStmt] {...} # 297| 0: [ForStmt] for (...;...;...) ... diff --git a/csharp/ql/test/library-tests/csharp8/NullableRefTypes.expected b/csharp/ql/test/library-tests/csharp8/NullableRefTypes.expected index 6ad47e73d01..fb2ca2f1759 100644 --- a/csharp/ql/test/library-tests/csharp8/NullableRefTypes.expected +++ b/csharp/ql/test/library-tests/csharp8/NullableRefTypes.expected @@ -153,6 +153,7 @@ arrayElements | NullableRefTypes.cs:150:27:150:27 | k | NullableRefTypes.cs:6:7:6:13 | MyClass[,,,][][,][,,] | NullableRefTypes.cs:6:7:6:13 | MyClass[][,][,,] | | NullableRefTypes.cs:151:29:151:29 | l | NullableRefTypes.cs:6:7:6:13 | MyClass?[,,,][][,]?[,,] | NullableRefTypes.cs:6:7:6:13 | MyClass?[,,,][][,]? | returnTypes +| NullableRefTypes.cs:6:7:6:13 | | Void | | NullableRefTypes.cs:6:7:6:13 | MyClass | Void! | | NullableRefTypes.cs:13:19:13:22 | get_C | MyClass? | | NullableRefTypes.cs:14:18:14:21 | get_D | MyClass! | @@ -179,14 +180,18 @@ returnTypes | NullableRefTypes.cs:51:12:51:15 | Q | object! | | NullableRefTypes.cs:51:12:51:15 | Q`1 | object! | | NullableRefTypes.cs:54:11:54:17 | Generic | Void! | +| NullableRefTypes.cs:54:11:54:33 | | Void | | NullableRefTypes.cs:58:11:58:18 | Generic2 | Void! | +| NullableRefTypes.cs:58:11:58:26 | | Void | | NullableRefTypes.cs:67:10:67:21 | GenericFn | Void | | NullableRefTypes.cs:67:10:67:21 | GenericFn | Void! | | NullableRefTypes.cs:67:10:67:21 | GenericFn`1 | Void! | | NullableRefTypes.cs:71:14:71:18 | CallF | MyStruct! | +| NullableRefTypes.cs:80:7:80:22 | | Void | | NullableRefTypes.cs:80:7:80:22 | NullableRefTypes | Void! | | NullableRefTypes.cs:82:10:82:40 | TestSuppressNullableWarningExpr | Void! | | NullableRefTypes.cs:91:10:91:34 | FunctionInNullableContext | Void! | +| NullableRefTypes.cs:100:7:100:14 | | Void | | NullableRefTypes.cs:100:7:100:14 | RefTypes | Void! | | NullableRefTypes.cs:103:18:103:28 | ReturnsRef1 | ref MyClass? | | NullableRefTypes.cs:104:17:104:27 | ReturnsRef2 | ref MyClass! | @@ -196,12 +201,17 @@ returnTypes | NullableRefTypes.cs:108:26:108:36 | ReturnsRef6 | readonly MyClass! | | NullableRefTypes.cs:110:10:110:20 | Parameters1 | Void! | | NullableRefTypes.cs:113:32:113:44 | get_RefProperty | MyClass! | +| NullableRefTypes.cs:116:7:116:23 | | Void | | NullableRefTypes.cs:116:7:116:23 | ToStringWithTypes | Void! | +| NullableRefTypes.cs:136:7:136:24 | | Void | | NullableRefTypes.cs:136:7:136:24 | ToStringWithTypes2 | Void! | +| NullableRefTypes.cs:154:7:154:25 | | Void | | NullableRefTypes.cs:154:7:154:25 | DisabledNullability | Void! | | NullableRefTypes.cs:157:18:157:30 | get_P | MyClass | | NullableRefTypes.cs:158:13:158:14 | Fn | MyClass | +| NullableRefTypes.cs:165:8:165:15 | | Void | | NullableRefTypes.cs:165:8:165:15 | MyStruct | Void! | +| NullableRefTypes.cs:171:16:171:37 | | Void | | NullableRefTypes.cs:171:16:171:37 | TestNullableFlowStates | Void! | | NullableRefTypes.cs:173:29:173:37 | MaybeNull | string? | | NullableRefTypes.cs:175:26:175:30 | Check | Void! | @@ -245,6 +255,8 @@ annotatedTypeConstraints typeNotAnnotated expressionTypes | NullableRefTypes.cs:6:7:6:13 | call to constructor Object | object | +| NullableRefTypes.cs:6:7:6:13 | call to method | Void | +| NullableRefTypes.cs:6:7:6:13 | this access | MyClass | | NullableRefTypes.cs:13:19:13:22 | null | null | | NullableRefTypes.cs:14:18:14:21 | this access | MyClass! | | NullableRefTypes.cs:17:29:17:32 | null | null | @@ -272,7 +284,11 @@ expressionTypes | NullableRefTypes.cs:40:30:40:30 | access to local variable b | MyClass? | | NullableRefTypes.cs:51:44:51:47 | null | null | | NullableRefTypes.cs:54:11:54:17 | call to constructor Object | object | +| NullableRefTypes.cs:54:11:54:17 | call to method | Void | +| NullableRefTypes.cs:54:11:54:17 | this access | Generic | | NullableRefTypes.cs:58:11:58:18 | call to constructor Object | object | +| NullableRefTypes.cs:58:11:58:18 | call to method | Void | +| NullableRefTypes.cs:58:11:58:18 | this access | Generic2 | | NullableRefTypes.cs:73:18:73:18 | access to local variable x | MyClass! | | NullableRefTypes.cs:73:18:73:25 | MyClass x = ... | MyClass! | | NullableRefTypes.cs:73:22:73:25 | null | null | @@ -285,6 +301,8 @@ expressionTypes | NullableRefTypes.cs:76:16:76:32 | default(...) | MyStruct! | | NullableRefTypes.cs:76:24:76:31 | access to type MyStruct | MyStruct | | NullableRefTypes.cs:80:7:80:22 | call to constructor Object | object | +| NullableRefTypes.cs:80:7:80:22 | call to method | Void | +| NullableRefTypes.cs:80:7:80:22 | this access | NullableRefTypes | | NullableRefTypes.cs:84:17:84:17 | access to local variable x | string! | | NullableRefTypes.cs:84:17:84:28 | String x = ... | string! | | NullableRefTypes.cs:84:21:84:28 | "source" | string! | @@ -318,6 +336,8 @@ expressionTypes | NullableRefTypes.cs:96:9:96:28 | call to method WriteLine | Void! | | NullableRefTypes.cs:96:27:96:27 | access to local variable x | string? | | NullableRefTypes.cs:100:7:100:14 | call to constructor Object | object | +| NullableRefTypes.cs:100:7:100:14 | call to method | Void | +| NullableRefTypes.cs:100:7:100:14 | this access | RefTypes | | NullableRefTypes.cs:103:48:103:52 | ref ... | MyClass | | NullableRefTypes.cs:103:52:103:52 | access to parameter r | MyClass! | | NullableRefTypes.cs:104:48:104:52 | ref ... | MyClass | @@ -337,15 +357,25 @@ expressionTypes | NullableRefTypes.cs:113:36:113:43 | this access | RefTypes | | NullableRefTypes.cs:113:36:113:44 | ...! | MyClass? | | NullableRefTypes.cs:116:7:116:23 | call to constructor Object | object | +| NullableRefTypes.cs:116:7:116:23 | call to method | Void | +| NullableRefTypes.cs:116:7:116:23 | this access | ToStringWithTypes | | NullableRefTypes.cs:136:7:136:24 | call to constructor Object | object | +| NullableRefTypes.cs:136:7:136:24 | call to method | Void | +| NullableRefTypes.cs:136:7:136:24 | this access | ToStringWithTypes2 | | NullableRefTypes.cs:154:7:154:25 | call to constructor Object | object | +| NullableRefTypes.cs:154:7:154:25 | call to method | Void | +| NullableRefTypes.cs:154:7:154:25 | this access | DisabledNullability | | NullableRefTypes.cs:157:18:157:30 | object creation of type MyClass | MyClass | | NullableRefTypes.cs:160:17:160:17 | access to local variable a | MyClass | | NullableRefTypes.cs:160:17:160:21 | MyClass a = ... | MyClass | | NullableRefTypes.cs:160:21:160:21 | access to parameter p | MyClass | | NullableRefTypes.cs:161:16:161:16 | access to local variable a | MyClass | | NullableRefTypes.cs:165:8:165:15 | call to constructor ValueType | ValueType | +| NullableRefTypes.cs:165:8:165:15 | call to method | Void | +| NullableRefTypes.cs:165:8:165:15 | this access | MyStruct | | NullableRefTypes.cs:171:16:171:37 | call to constructor Object | object | +| NullableRefTypes.cs:171:16:171:37 | call to method | Void | +| NullableRefTypes.cs:171:16:171:37 | this access | TestNullableFlowStates | | NullableRefTypes.cs:181:17:181:17 | access to local variable x | string! | | NullableRefTypes.cs:181:17:181:31 | String x = ... | string! | | NullableRefTypes.cs:181:21:181:31 | call to method MaybeNull | string? | diff --git a/csharp/ql/test/library-tests/csharp8/PrintAst.expected b/csharp/ql/test/library-tests/csharp8/PrintAst.expected index 4ec30c915b3..f5eb7caab57 100644 --- a/csharp/ql/test/library-tests/csharp8/PrintAst.expected +++ b/csharp/ql/test/library-tests/csharp8/PrintAst.expected @@ -1,12 +1,12 @@ AlternateInterpolatedStrings.cs: # 3| [Class] AlternateInterpolatedStrings -# 5| 5: [Field] s1 +# 5| 6: [Field] s1 # 5| -1: [TypeMention] string # 5| 1: [InterpolatedStringExpr] $"..." # 5| 0: [StringLiteralUtf16] "C:" # 5| 1: [InterpolatedStringInsertExpr] {...} # 5| 0: [IntLiteral] 12 -# 6| 6: [Field] s2 +# 6| 7: [Field] s2 # 6| -1: [TypeMention] string # 6| 1: [InterpolatedStringExpr] $"..." # 6| 0: [StringLiteralUtf16] "C:" @@ -14,7 +14,7 @@ AlternateInterpolatedStrings.cs: # 6| 0: [IntLiteral] 12 AsyncStreams.cs: # 6| [Class] AsyncStreams -# 8| 5: [Method] Items +# 8| 6: [Method] Items # 8| -1: [TypeMention] IAsyncEnumerable # 8| 1: [TypeMention] int # 8| 4: [BlockStmt] {...} @@ -30,7 +30,7 @@ AsyncStreams.cs: # 11| 0: [IntLiteral] 1000 # 12| 3: [YieldReturnStmt] yield return ...; # 12| 0: [IntLiteral] 3 -# 15| 6: [Method] F +# 15| 7: [Method] F # 15| -1: [TypeMention] Void # 16| 4: [BlockStmt] {...} # 17| 0: [ForeachStmt] foreach (... ... in ...) ... @@ -103,11 +103,11 @@ DefaultInterfaceMethods.cs: # 20| [Class] Person #-----| 3: (Base types) # 20| 1: [TypeMention] IPerson -# 22| 5: [Property] Name +# 22| 6: [Property] Name # 22| -1: [TypeMention] string # 22| 3: [Getter] get_Name # 22| 4: [StringLiteralUtf16] "Petra" -# 24| 6: [Property] Greeting +# 24| 7: [Property] Greeting # 24| -1: [TypeMention] IPerson # 24| -1: [TypeMention] string # 24| 3: [Getter] get_Greeting @@ -116,14 +116,14 @@ DefaultInterfaceMethods.cs: #-----| 2: (Parameters) # 24| 0: [Parameter] value # 24| 4: [BlockStmt] {...} -# 26| 7: [Method] Greet +# 26| 8: [Method] Greet # 26| -1: [TypeMention] Void # 26| 4: [BlockStmt] {...} NameResolutionSuppressNullable.cs: # 5| [Class] MyClass2 -# 7| 5: [Field] s_signalMethod +# 7| 6: [Field] s_signalMethod # 7| -1: [TypeMention] WaitCallback -# 8| 6: [Property] SignalMethod +# 8| 7: [Property] SignalMethod # 8| -1: [TypeMention] WaitCallback # 8| 3: [Getter] get_SignalMethod # 8| 4: [MethodCall] call to method EnsureInitialized @@ -133,7 +133,7 @@ NameResolutionSuppressNullable.cs: # 8| -1: [TypeMention] WaitCallback # 8| 0: [SuppressNullableWarningExpr] ...! # 8| 0: [MethodAccess] access to method M1 -# 10| 8: [Method] EnsureInitialized`1 +# 10| 9: [Method] EnsureInitialized`1 # 10| -1: [TypeMention] T #-----| 1: (Type parameters) # 10| 0: [TypeParameter] T @@ -149,7 +149,7 @@ NameResolutionSuppressNullable.cs: # 10| 0: [ParameterAccess] access to parameter target # 10| 1: [DelegateCall] delegate call # 10| -1: [ParameterAccess] access to parameter valueFactory -# 12| 9: [Method] M1 +# 12| 10: [Method] M1 # 12| -1: [TypeMention] Void #-----| 2: (Parameters) # 12| 0: [Parameter] state @@ -157,7 +157,7 @@ NameResolutionSuppressNullable.cs: # 13| 4: [BlockStmt] {...} NullCoalescingAssignment.cs: # 3| [Class] NullCoalescingAssignment -# 5| 5: [Method] NullCoalescing +# 5| 6: [Method] NullCoalescing # 5| -1: [TypeMention] Void # 6| 4: [BlockStmt] {...} # 7| 0: [LocalVariableDeclStmt] ... ...; @@ -171,19 +171,19 @@ NullCoalescingAssignment.cs: # 8| 1: [ThisAccess] this access NullableRefTypes.cs: # 6| [Class] MyClass -# 9| 5: [Field] A +# 9| 6: [Field] A # 9| -1: [TypeMention] MyClass -# 10| 6: [Field] B +# 10| 7: [Field] B # 10| -1: [TypeMention] MyClass -# 13| 7: [Property] C +# 13| 8: [Property] C # 13| -1: [TypeMention] MyClass # 13| 3: [Getter] get_C # 13| 4: [NullLiteral] null -# 14| 8: [Property] D +# 14| 9: [Property] D # 14| -1: [TypeMention] MyClass # 14| 3: [Getter] get_D # 14| 4: [ThisAccess] this access -# 17| 9: [Indexer] Item +# 17| 10: [Indexer] Item # 17| -1: [TypeMention] MyClass #-----| 1: (Parameters) # 17| 0: [Parameter] i @@ -192,7 +192,7 @@ NullableRefTypes.cs: #-----| 2: (Parameters) # 17| 0: [Parameter] i # 17| 4: [NullLiteral] null -# 18| 10: [Indexer] Item +# 18| 11: [Indexer] Item # 18| -1: [TypeMention] MyClass #-----| 1: (Parameters) # 18| 0: [Parameter] i @@ -201,7 +201,7 @@ NullableRefTypes.cs: #-----| 2: (Parameters) # 18| 0: [Parameter] i # 18| 4: [ThisAccess] this access -# 19| 11: [Indexer] Item +# 19| 12: [Indexer] Item # 19| -1: [TypeMention] MyClass #-----| 1: (Parameters) # 19| 0: [Parameter] i @@ -210,19 +210,19 @@ NullableRefTypes.cs: #-----| 2: (Parameters) # 19| 0: [Parameter] i # 19| 4: [ThisAccess] this access -# 22| 12: [Field] G1 +# 22| 13: [Field] G1 # 22| -1: [TypeMention] MyClass[] # 22| 1: [TypeMention] MyClass -# 23| 13: [Field] G2 +# 23| 14: [Field] G2 # 23| -1: [TypeMention] MyClass[] # 23| 1: [TypeMention] MyClass -# 24| 14: [Field] G3 +# 24| 15: [Field] G3 # 24| -1: [TypeMention] MyClass[] # 24| 1: [TypeMention] MyClass -# 25| 15: [Field] H +# 25| 16: [Field] H # 25| -1: [TypeMention] MyClass[][] # 25| 1: [TypeMention] MyClass -# 26| 16: [Method] ArrayFn1 +# 26| 17: [Method] ArrayFn1 # 26| -1: [TypeMention] MyClass[] # 26| 1: [TypeMention] MyClass #-----| 2: (Parameters) @@ -231,7 +231,7 @@ NullableRefTypes.cs: # 26| 1: [TypeMention] MyClass # 26| 4: [ThrowExpr] throw ... # 26| 0: [NullLiteral] null -# 27| 17: [Method] ArrayFn2 +# 27| 18: [Method] ArrayFn2 # 27| -1: [TypeMention] MyClass[] # 27| 1: [TypeMention] MyClass #-----| 2: (Parameters) @@ -240,13 +240,13 @@ NullableRefTypes.cs: # 27| 1: [TypeMention] MyClass # 27| 4: [ThrowExpr] throw ... # 27| 0: [NullLiteral] null -# 30| 18: [Method] M +# 30| 19: [Method] M # 30| -1: [TypeMention] MyClass # 30| 4: [NullLiteral] null -# 31| 19: [Method] N +# 31| 20: [Method] N # 31| -1: [TypeMention] MyClass # 31| 4: [ThisAccess] this access -# 32| 20: [Method] O +# 32| 21: [Method] O # 32| -1: [TypeMention] Void #-----| 2: (Parameters) # 32| 0: [Parameter] a @@ -254,7 +254,7 @@ NullableRefTypes.cs: # 32| 1: [Parameter] b # 32| -1: [TypeMention] MyClass # 32| 4: [BlockStmt] {...} -# 35| 21: [Method] Locals +# 35| 22: [Method] Locals # 35| -1: [TypeMention] Void # 36| 4: [BlockStmt] {...} # 37| 0: [LocalVariableDeclStmt] ... ...; @@ -280,12 +280,12 @@ NullableRefTypes.cs: # 40| 0: [LocalVariableAccess] access to local variable d # 40| 1: [RefExpr] ref ... # 40| 0: [LocalVariableAccess] access to local variable b -# 44| 22: [DelegateType] Del1 -# 47| 23: [DelegateType] Del +# 44| 23: [DelegateType] Del1 +# 47| 24: [DelegateType] Del #-----| 2: (Parameters) # 47| 0: [Parameter] x # 47| -1: [TypeMention] MyClass -# 48| 24: [Event] P +# 48| 25: [Event] P # 48| -1: [TypeMention] Del # 48| 3: [AddEventAccessor] add_P #-----| 2: (Parameters) @@ -293,7 +293,7 @@ NullableRefTypes.cs: # 48| 4: [RemoveEventAccessor] remove_P #-----| 2: (Parameters) # 48| 0: [Parameter] value -# 51| 26: [Method] Q`1 +# 51| 27: [Method] Q`1 # 51| -1: [TypeMention] object #-----| 1: (Type parameters) # 51| 0: [TypeParameter] T @@ -301,23 +301,23 @@ NullableRefTypes.cs: # 51| 0: [Parameter] t # 51| -1: [TypeMention] T # 51| 4: [NullLiteral] null -# 54| 29: [Class] Generic`4 +# 54| 30: [Class] Generic`4 #-----| 1: (Type parameters) # 54| 0: [TypeParameter] T1 # 54| 1: [TypeParameter] T2 # 54| 2: [TypeParameter] T3 # 54| 3: [TypeParameter] T4 -# 58| 30: [Class] Generic2`2 +# 58| 31: [Class] Generic2`2 #-----| 1: (Type parameters) # 58| 0: [TypeParameter] T1 # 58| 1: [TypeParameter] T2 -# 65| 31: [Field] items2 +# 65| 32: [Field] items2 # 65| -1: [TypeMention] Generic # 65| 1: [TypeMention] MyClass # 65| 2: [TypeMention] MyClass # 65| 3: [TypeMention] IDisposable # 65| 4: [TypeMention] MyClass -# 67| 33: [Method] GenericFn`1 +# 67| 34: [Method] GenericFn`1 # 67| -1: [TypeMention] Void #-----| 1: (Type parameters) # 67| 0: [TypeParameter] T @@ -325,7 +325,7 @@ NullableRefTypes.cs: # 67| 0: [Parameter] x # 67| -1: [TypeMention] T # 68| 4: [BlockStmt] {...} -# 71| 34: [Method] CallF +# 71| 35: [Method] CallF # 71| -1: [TypeMention] MyStruct # 72| 4: [BlockStmt] {...} # 73| 0: [LocalVariableDeclStmt] ... ...; @@ -344,7 +344,7 @@ NullableRefTypes.cs: # 76| 0: [TypeAccess] access to type MyStruct # 76| 0: [TypeMention] MyStruct # 80| [Class] NullableRefTypes -# 82| 5: [Method] TestSuppressNullableWarningExpr +# 82| 6: [Method] TestSuppressNullableWarningExpr # 82| -1: [TypeMention] Void # 83| 4: [BlockStmt] {...} # 84| 0: [LocalVariableDeclStmt] ... ...; @@ -372,7 +372,7 @@ NullableRefTypes.cs: # 88| 0: [LocalVariableAccess] access to local variable y # 88| 1: [SuppressNullableWarningExpr] ...! # 88| 0: [LocalVariableAccess] access to local variable x -# 91| 6: [Method] FunctionInNullableContext +# 91| 7: [Method] FunctionInNullableContext # 91| -1: [TypeMention] Void # 92| 4: [BlockStmt] {...} # 93| 0: [LocalVariableDeclStmt] ... ...; @@ -398,49 +398,49 @@ NullableRefTypes.cs: # 96| 0: [TypeMention] Console # 96| 0: [LocalVariableAccess] access to local variable x # 100| [Class] RefTypes -# 103| 5: [Method] ReturnsRef1 +# 103| 6: [Method] ReturnsRef1 # 103| -1: [TypeMention] MyClass #-----| 2: (Parameters) # 103| 0: [Parameter] r # 103| -1: [TypeMention] MyClass # 103| 4: [RefExpr] ref ... # 103| 0: [ParameterAccess] access to parameter r -# 104| 6: [Method] ReturnsRef2 +# 104| 7: [Method] ReturnsRef2 # 104| -1: [TypeMention] MyClass #-----| 2: (Parameters) # 104| 0: [Parameter] r # 104| -1: [TypeMention] MyClass # 104| 4: [RefExpr] ref ... # 104| 0: [ParameterAccess] access to parameter r -# 105| 7: [Method] ReturnsRef3 +# 105| 8: [Method] ReturnsRef3 # 105| -1: [TypeMention] MyClass #-----| 2: (Parameters) # 105| 0: [Parameter] r # 105| -1: [TypeMention] MyClass # 105| 4: [RefExpr] ref ... # 105| 0: [ParameterAccess] access to parameter r -# 106| 8: [Method] ReturnsRef4 +# 106| 9: [Method] ReturnsRef4 # 106| -1: [TypeMention] MyClass #-----| 2: (Parameters) # 106| 0: [Parameter] r # 106| -1: [TypeMention] MyClass # 106| 4: [RefExpr] ref ... # 106| 0: [ParameterAccess] access to parameter r -# 107| 9: [Method] ReturnsRef5 +# 107| 10: [Method] ReturnsRef5 # 107| -1: [TypeMention] MyClass #-----| 2: (Parameters) # 107| 0: [Parameter] r # 107| -1: [TypeMention] MyClass # 107| 4: [RefExpr] ref ... # 107| 0: [ParameterAccess] access to parameter r -# 108| 10: [Method] ReturnsRef6 +# 108| 11: [Method] ReturnsRef6 # 108| -1: [TypeMention] MyClass #-----| 2: (Parameters) # 108| 0: [Parameter] r # 108| -1: [TypeMention] MyClass # 108| 4: [RefExpr] ref ... # 108| 0: [ParameterAccess] access to parameter r -# 110| 11: [Method] Parameters1 +# 110| 12: [Method] Parameters1 # 110| -1: [TypeMention] Void #-----| 2: (Parameters) # 110| 0: [Parameter] p1 @@ -449,99 +449,99 @@ NullableRefTypes.cs: # 110| -1: [TypeMention] MyClass # 110| 4: [ThrowExpr] throw ... # 110| 0: [NullLiteral] null -# 112| 12: [Field] Property +# 112| 13: [Field] Property # 112| -1: [TypeMention] MyClass -# 113| 13: [Property] RefProperty +# 113| 14: [Property] RefProperty # 113| -1: [TypeMention] MyClass # 113| 3: [Getter] get_RefProperty # 113| 4: [RefExpr] ref ... # 113| 0: [SuppressNullableWarningExpr] ...! # 113| 0: [FieldAccess] access to field Property # 116| [Class] ToStringWithTypes -# 118| 5: [Field] a +# 118| 6: [Field] a # 118| -1: [TypeMention] MyStruct? # 118| 1: [TypeMention] MyStruct -# 119| 6: [Field] b +# 119| 7: [Field] b # 119| -1: [TypeMention] MyStruct[] # 119| 1: [TypeMention] MyStruct -# 120| 7: [Field] c +# 120| 8: [Field] c # 120| -1: [TypeMention] Nullable[] # 120| 1: [TypeMention] MyStruct? # 120| 1: [TypeMention] MyStruct -# 121| 8: [Field] d +# 121| 9: [Field] d # 121| -1: [TypeMention] Nullable[] # 121| 1: [TypeMention] MyStruct? # 121| 1: [TypeMention] MyStruct -# 123| 9: [Field] e +# 123| 10: [Field] e # 123| -1: [TypeMention] MyClass -# 124| 10: [Field] f +# 124| 11: [Field] f # 124| -1: [TypeMention] MyClass[] # 124| 1: [TypeMention] MyClass -# 125| 11: [Field] g +# 125| 12: [Field] g # 125| -1: [TypeMention] MyClass[] # 125| 1: [TypeMention] MyClass -# 126| 12: [Field] h +# 126| 13: [Field] h # 126| -1: [TypeMention] MyClass[] # 126| 1: [TypeMention] MyClass -# 128| 13: [Field] i +# 128| 14: [Field] i # 128| -1: [TypeMention] MyClass[,][][,,] # 128| 1: [TypeMention] MyClass -# 129| 14: [Field] j +# 129| 15: [Field] j # 129| -1: [TypeMention] MyClass[,,][,][] # 129| 1: [TypeMention] MyClass -# 130| 15: [Field] k +# 130| 16: [Field] k # 130| -1: [TypeMention] MyClass[,,,][][,][,,] # 130| 1: [TypeMention] MyClass -# 131| 16: [Field] l +# 131| 17: [Field] l # 131| -1: [TypeMention] MyClass[,,][,,,][][,] # 131| 1: [TypeMention] MyClass # 136| [Class] ToStringWithTypes2 -# 138| 5: [Field] a +# 138| 6: [Field] a # 138| -1: [TypeMention] MyStruct? # 138| 1: [TypeMention] MyStruct -# 139| 6: [Field] b +# 139| 7: [Field] b # 139| -1: [TypeMention] MyStruct[] # 139| 1: [TypeMention] MyStruct -# 140| 7: [Field] c +# 140| 8: [Field] c # 140| -1: [TypeMention] Nullable[] # 140| 1: [TypeMention] MyStruct? # 140| 1: [TypeMention] MyStruct -# 141| 8: [Field] d +# 141| 9: [Field] d # 141| -1: [TypeMention] Nullable[] # 141| 1: [TypeMention] MyStruct? # 141| 1: [TypeMention] MyStruct -# 143| 9: [Field] e +# 143| 10: [Field] e # 143| -1: [TypeMention] MyClass -# 144| 10: [Field] f +# 144| 11: [Field] f # 144| -1: [TypeMention] MyClass[] # 144| 1: [TypeMention] MyClass -# 145| 11: [Field] g +# 145| 12: [Field] g # 145| -1: [TypeMention] MyClass[] # 145| 1: [TypeMention] MyClass -# 146| 12: [Field] h +# 146| 13: [Field] h # 146| -1: [TypeMention] MyClass[] # 146| 1: [TypeMention] MyClass -# 148| 13: [Field] i +# 148| 14: [Field] i # 148| -1: [TypeMention] MyClass[,][][,,] # 148| 1: [TypeMention] MyClass -# 149| 14: [Field] j +# 149| 15: [Field] j # 149| -1: [TypeMention] MyClass[,,][,][] # 149| 1: [TypeMention] MyClass -# 150| 15: [Field] k +# 150| 16: [Field] k # 150| -1: [TypeMention] MyClass[,,,][][,][,,] # 150| 1: [TypeMention] MyClass -# 151| 16: [Field] l +# 151| 17: [Field] l # 151| -1: [TypeMention] MyClass[,,][,,,][][,] # 151| 1: [TypeMention] MyClass # 154| [Class] DisabledNullability -# 156| 5: [Field] f1 +# 156| 6: [Field] f1 # 156| -1: [TypeMention] MyClass -# 157| 6: [Property] P +# 157| 7: [Property] P # 157| -1: [TypeMention] MyClass # 157| 3: [Getter] get_P # 157| 4: [ObjectCreation] object creation of type MyClass # 157| 0: [TypeMention] MyClass -# 158| 7: [Method] Fn +# 158| 8: [Method] Fn # 158| -1: [TypeMention] MyClass #-----| 2: (Parameters) # 158| 0: [Parameter] p @@ -556,16 +556,16 @@ NullableRefTypes.cs: # 161| 0: [LocalVariableAccess] access to local variable a # 165| [Struct] MyStruct # 171| [Class] TestNullableFlowStates -# 173| 5: [Method] MaybeNull +# 173| 6: [Method] MaybeNull # 173| -1: [TypeMention] string -# 175| 6: [Method] Check +# 175| 7: [Method] Check # 175| -1: [TypeMention] Void #-----| 2: (Parameters) # 175| 0: [Parameter] isNull # 175| -1: [TypeMention] string -# 177| 7: [Method] Count +# 177| 8: [Method] Count # 177| -1: [TypeMention] int -# 179| 8: [Method] LoopUnrolling +# 179| 9: [Method] LoopUnrolling # 179| -1: [TypeMention] Void # 180| 4: [BlockStmt] {...} # 181| 0: [LocalVariableDeclStmt] ... ...; @@ -594,7 +594,7 @@ NullableRefTypes.cs: # 190| 3: [ExprStmt] ...; # 190| 0: [MethodCall] call to method Check # 190| 0: [LocalVariableAccess] access to local variable x -# 193| 9: [Method] ExceptionFlow +# 193| 10: [Method] ExceptionFlow # 193| -1: [TypeMention] Void # 194| 4: [BlockStmt] {...} # 195| 0: [LocalVariableDeclStmt] ... ...; @@ -615,7 +615,7 @@ NullableRefTypes.cs: # 206| 2: [ExprStmt] ...; # 206| 0: [MethodCall] call to method Check # 206| 0: [LocalVariableAccess] access to local variable y -# 209| 10: [Method] InvocationTest +# 209| 11: [Method] InvocationTest # 209| -1: [TypeMention] string #-----| 2: (Parameters) # 209| 0: [Parameter] o @@ -630,7 +630,7 @@ NullableRefTypes.cs: # 212| 1: [ReturnStmt] return ...; # 212| 0: [MethodCall] call to method ToString # 212| -1: [LocalVariableAccess] access to local variable t -# 215| 11: [Method] ElementTest +# 215| 12: [Method] ElementTest # 215| -1: [TypeMention] Void #-----| 2: (Parameters) # 215| 0: [Parameter] list @@ -663,13 +663,13 @@ NullableRefTypes.cs: # 220| 0: [LocalVariableAccess] access to local variable d # 220| 1: [FieldAccess] access to field Field # 220| -1: [MethodCall] call to method GetSelf -# 223| 12: [Method] GetSelf +# 223| 13: [Method] GetSelf # 223| -1: [TypeMention] TestNullableFlowStates -# 225| 13: [Field] Field +# 225| 14: [Field] Field # 225| -1: [TypeMention] string StaticLocalFunctions.cs: # 3| [Class] StaticLocalFunctions -# 5| 5: [Method] Fn +# 5| 6: [Method] Fn # 5| -1: [TypeMention] int #-----| 2: (Parameters) # 5| 0: [Parameter] x @@ -702,15 +702,15 @@ UnmanagedGenericStructs.cs: #-----| 1: (Type parameters) # 3| 0: [TypeParameter] T # 3| 1: [TypeParameter] U -# 5| 5: [Field] id +# 5| 6: [Field] id # 5| -1: [TypeMention] int -# 6| 6: [Field] value1 +# 6| 7: [Field] value1 # 6| -1: [TypeMention] T -# 7| 7: [Field] value2 +# 7| 8: [Field] value2 # 7| -1: [TypeMention] U UsingDeclarations.cs: # 4| [Class] UsingDeclarations -# 6| 5: [Method] TestUsingDeclarations +# 6| 6: [Method] TestUsingDeclarations # 6| -1: [TypeMention] Void # 7| 4: [BlockStmt] {...} # 8| 0: [UsingDeclStmt] using ... ...; @@ -762,7 +762,7 @@ UsingDeclarations.cs: # 15| 1: [EmptyStmt] ; patterns.cs: # 3| [Class] Patterns -# 5| 5: [Method] IsPatterns +# 5| 6: [Method] IsPatterns # 5| -1: [TypeMention] Void # 6| 4: [BlockStmt] {...} # 7| 0: [LocalVariableDeclStmt] ... ...; @@ -836,7 +836,7 @@ patterns.cs: # 27| 3: [PropertyPatternExpr] { ... } # 27| 0: [DiscardPatternExpr,LabeledPatternExpr] _ # 28| 1: [BlockStmt] {...} -# 32| 6: [Method] SwitchStatements +# 32| 7: [Method] SwitchStatements # 32| -1: [TypeMention] Void # 33| 4: [BlockStmt] {...} # 34| 0: [LocalVariableDeclStmt] ... ...; @@ -1019,7 +1019,7 @@ patterns.cs: # 94| 0: [ConstantPatternExpr,IntLiteral] 2 # 94| 1: [DiscardPatternExpr] _ # 94| 3: [BreakStmt] break; -# 98| 7: [Method] Expressions +# 98| 8: [Method] Expressions # 98| -1: [TypeMention] Void #-----| 2: (Parameters) # 98| 0: [Parameter] x @@ -1108,7 +1108,7 @@ patterns.cs: # 119| 2: [TupleExpr] (..., ...) # 119| 0: [IntLiteral] 0 # 119| 1: [IntLiteral] 0 -# 123| 8: [Method] Expressions2 +# 123| 9: [Method] Expressions2 # 123| -1: [TypeMention] Void #-----| 2: (Parameters) # 123| 0: [Parameter] o @@ -1203,18 +1203,18 @@ patterns.cs: # 147| -1: [TypeAccess] access to type Console # 147| 0: [TypeMention] Console # 147| 0: [StringLiteralUtf16] "Invalid operation" -# 151| 9: [Struct] MyStruct -# 153| 5: [Field] X +# 151| 10: [Struct] MyStruct +# 153| 6: [Field] X # 153| -1: [TypeMention] int -# 154| 6: [Property] Y +# 154| 7: [Property] Y # 154| -1: [TypeMention] int # 154| 3: [Getter] get_Y # 154| 4: [IntLiteral] 10 -# 156| 7: [Property] S +# 156| 8: [Property] S # 156| -1: [TypeMention] MyStruct # 156| 3: [Getter] get_S # 156| 4: [ThisAccess] this access -# 158| 8: [Method] Deconstruct +# 158| 9: [Method] Deconstruct # 158| -1: [TypeMention] Void #-----| 2: (Parameters) # 158| 0: [Parameter] x @@ -1230,12 +1230,12 @@ patterns.cs: # 161| 0: [AssignExpr] ... = ... # 161| 0: [ParameterAccess] access to parameter y # 161| 1: [PropertyCall] access to property Y -# 164| 9: [Method] Deconstruct +# 164| 10: [Method] Deconstruct # 164| -1: [TypeMention] Void # 165| 4: [BlockStmt] {...} ranges.cs: # 3| [Class] Ranges -# 5| 5: [Method] F +# 5| 6: [Method] F # 5| -1: [TypeMention] Void # 6| 4: [BlockStmt] {...} # 7| 0: [LocalVariableDeclStmt] ... ...; diff --git a/csharp/ql/test/library-tests/csharp9-standalone/globalStmt.expected b/csharp/ql/test/library-tests/csharp9-standalone/globalStmt.expected index eaa01512c18..a8db6605f8d 100644 --- a/csharp/ql/test/library-tests/csharp9-standalone/globalStmt.expected +++ b/csharp/ql/test/library-tests/csharp9-standalone/globalStmt.expected @@ -7,4 +7,6 @@ globalBlock | GlobalStmt.cs:5:1:24:0 | {...} | GlobalStmt.cs:5:1:24:0 |
$ | GlobalStmt.cs:1:1:1:0 | args | GlobalStmt.cs:5:1:24:0 | Program | methods | GlobalStmt.cs:5:1:24:0 |
$ | entry | +| GlobalStmt.cs:5:1:24:0 | | non-entry | +| GlobalStmt.cs:17:14:17:17 | | non-entry | | GlobalStmt.cs:19:8:19:9 | M1 | non-entry | diff --git a/csharp/ql/test/library-tests/csharp9/PrintAst.expected b/csharp/ql/test/library-tests/csharp9/PrintAst.expected index e3b89de2009..459349fb9fc 100644 --- a/csharp/ql/test/library-tests/csharp9/PrintAst.expected +++ b/csharp/ql/test/library-tests/csharp9/PrintAst.expected @@ -1,17 +1,17 @@ AnonymousObjectCreation.cs: # 5| [Class] AnonObj -# 7| 5: [Field] l +# 7| 6: [Field] l # 7| -1: [TypeMention] List # 7| 1: [TypeMention] AnonObj # 7| 1: [CastExpr] (...) ... # 7| 1: [ObjectCreation] object creation of type List -# 9| 6: [Property] Prop1 +# 9| 7: [Property] Prop1 # 9| -1: [TypeMention] int # 9| 3: [Getter] get_Prop1 # 9| 4: [Setter] set_Prop1 #-----| 2: (Parameters) # 9| 0: [Parameter] value -# 11| 7: [Method] M1 +# 11| 8: [Method] M1 # 11| -1: [TypeMention] AnonObj #-----| 2: (Parameters) # 11| 0: [Parameter] t @@ -29,17 +29,17 @@ AnonymousObjectCreation.cs: # 14| 1: [ReturnStmt] return ...; # 14| 0: [CastExpr] (...) ... # 14| 1: [ObjectCreation] object creation of type AnonObj -# 17| 8: [DelegateType] D +# 17| 9: [DelegateType] D #-----| 2: (Parameters) # 17| 0: [Parameter] x # 17| -1: [TypeMention] int -# 19| 9: [Method] M2 +# 19| 10: [Method] M2 # 19| -1: [TypeMention] Void #-----| 2: (Parameters) # 19| 0: [Parameter] x # 19| -1: [TypeMention] int # 19| 4: [BlockStmt] {...} -# 21| 10: [Method] GetM +# 21| 11: [Method] GetM # 21| -1: [TypeMention] D # 21| 4: [BlockStmt] {...} # 21| 0: [ReturnStmt] return ...; @@ -47,7 +47,7 @@ AnonymousObjectCreation.cs: # 21| 1: [ExplicitDelegateCreation] delegate creation of type D # 21| 0: [ImplicitDelegateCreation] delegate creation of type D # 21| 0: [MethodAccess] access to method M2 -# 23| 11: [Method] MethodAdd +# 23| 12: [Method] MethodAdd # 23| -1: [TypeMention] Void # 24| 4: [BlockStmt] {...} # 25| 0: [LocalVariableDeclStmt] ... ...; @@ -59,13 +59,13 @@ AnonymousObjectCreation.cs: # 25| 1: [ObjectCreation] object creation of type List BinaryPattern.cs: # 3| [Class] BinaryPattern -# 5| 5: [Property] P1 +# 5| 6: [Property] P1 # 5| -1: [TypeMention] int # 5| 3: [Getter] get_P1 # 5| 4: [Setter] set_P1 #-----| 2: (Parameters) # 5| 0: [Parameter] value -# 7| 6: [Method] M1 +# 7| 7: [Method] M1 # 7| -1: [TypeMention] bool #-----| 2: (Parameters) # 7| 0: [Parameter] c @@ -75,7 +75,7 @@ BinaryPattern.cs: # 8| 1: [OrPatternExpr] ... or ... # 8| 0: [CharLiteral,ConstantPatternExpr] a # 8| 1: [CharLiteral,ConstantPatternExpr] b -# 9| 7: [Method] M2 +# 9| 8: [Method] M2 # 9| -1: [TypeMention] bool #-----| 2: (Parameters) # 9| 0: [Parameter] c @@ -91,7 +91,7 @@ BinaryPattern.cs: # 10| 0: [TypeMention] BinaryPattern # 10| 3: [PropertyPatternExpr] { ... } # 10| 0: [ConstantPatternExpr,IntLiteral,LabeledPatternExpr] 1 -# 11| 8: [Method] M3 +# 11| 9: [Method] M3 # 11| -1: [TypeMention] bool #-----| 2: (Parameters) # 11| 0: [Parameter] c @@ -103,7 +103,7 @@ BinaryPattern.cs: # 12| 0: [TypeMention] object # 12| 1: [VariablePatternExpr] BinaryPattern u # 12| 0: [TypeMention] BinaryPattern -# 14| 9: [Method] M4 +# 14| 10: [Method] M4 # 14| -1: [TypeMention] string #-----| 2: (Parameters) # 14| 0: [Parameter] i @@ -122,7 +122,7 @@ BinaryPattern.cs: # 19| 2: [StringLiteralUtf16] "other" CovariantReturn.cs: # 1| [Class] A -# 3| 5: [Method] M1 +# 3| 6: [Method] M1 # 3| -1: [TypeMention] A # 3| 4: [BlockStmt] {...} # 3| 0: [ThrowStmt] throw ...; @@ -130,14 +130,14 @@ CovariantReturn.cs: # 6| [Class] B #-----| 3: (Base types) # 6| 0: [TypeMention] A -# 8| 5: [Method] M1 +# 8| 6: [Method] M1 # 8| -1: [TypeMention] B # 8| 4: [BlockStmt] {...} # 8| 0: [ThrowStmt] throw ...; # 8| 0: [NullLiteral] null Discard.cs: # 3| [Class] Discard -# 5| 5: [Method] M1 +# 5| 6: [Method] M1 # 5| -1: [TypeMention] Void # 6| 4: [BlockStmt] {...} # 7| 0: [LocalVariableDeclStmt] ... ...; @@ -227,7 +227,7 @@ ForeachExtension.cs: # 14| 0: [YieldReturnStmt] yield return ...; # 14| 0: [LocalVariableAccess] access to local variable i # 19| [Class] Program -# 21| 5: [Method] Main +# 21| 6: [Method] Main # 21| -1: [TypeMention] Task # 22| 4: [BlockStmt] {...} # 23| 0: [LocalVariableDeclStmt] ... ...; @@ -273,7 +273,7 @@ ForeachExtension.cs: # 37| 1: [IntLiteral] 2 # 37| 2: [IntLiteral] 3 # 38| 2: [BlockStmt] {...} -# 42| 6: [Method] GetAsyncEnumerator +# 42| 7: [Method] GetAsyncEnumerator # 42| -1: [TypeMention] IAsyncEnumerator # 42| 1: [TypeMention] int # 43| 4: [BlockStmt] {...} @@ -289,7 +289,7 @@ ForeachExtension.cs: # 46| 0: [IntLiteral] 1 FunctionPointer.cs: # 3| [Class] FnPointer -# 5| 5: [Class] Program +# 5| 6: [Class] Program # 7| 5: [Field] pointer # 7| -1: [TypeMention] delegate* default # 7| 1: [AddressOfExpr] &... @@ -407,7 +407,7 @@ FunctionPointer.cs: # 48| 0: [TypeMention] A InitOnlyProperty.cs: # 3| [Class] Base -# 5| 5: [Property] Prop0 +# 5| 6: [Property] Prop0 # 5| -1: [TypeMention] int # 5| 3: [Getter] get_Prop0 # 5| 4: [BlockStmt] {...} @@ -421,13 +421,13 @@ InitOnlyProperty.cs: # 5| 0: [AssignExpr] ... = ... # 5| 0: [PropertyCall] access to property Prop1 # 5| 1: [ParameterAccess] access to parameter value -# 6| 6: [Property] Prop1 +# 6| 7: [Property] Prop1 # 6| -1: [TypeMention] int # 6| 3: [Getter] get_Prop1 # 6| 4: [Setter] set_Prop1 #-----| 2: (Parameters) # 6| 0: [Parameter] value -# 7| 7: [Property] Prop2 +# 7| 8: [Property] Prop2 # 7| -1: [TypeMention] int # 7| 3: [Getter] get_Prop2 # 7| 4: [Setter] set_Prop2 @@ -436,13 +436,13 @@ InitOnlyProperty.cs: # 11| [Class] Derived #-----| 3: (Base types) # 11| 0: [TypeMention] Base -# 13| 5: [Property] Prop1 +# 13| 6: [Property] Prop1 # 13| -1: [TypeMention] int # 13| 3: [Getter] get_Prop1 # 13| 4: [Setter] set_Prop1 #-----| 2: (Parameters) # 13| 0: [Parameter] value -# 14| 6: [Property] Prop2 +# 14| 7: [Property] Prop2 # 14| -1: [TypeMention] int # 16| 3: [Getter] get_Prop2 # 16| 4: [BlockStmt] {...} @@ -466,7 +466,7 @@ InitOnlyProperty.cs: # 21| 0: [PropertyCall] access to property Prop0 # 21| 1: [ParameterAccess] access to parameter value # 26| [Class] C1 -# 28| 5: [Method] M1 +# 28| 6: [Method] M1 # 28| -1: [TypeMention] Void # 29| 4: [BlockStmt] {...} # 30| 0: [LocalVariableDeclStmt] ... ...; @@ -490,7 +490,7 @@ IsExternalInit.cs: # 6| 1: [Class] IsExternalInit LambdaModifier.cs: # 4| [Class] Class1 -# 6| 5: [Method] M1 +# 6| 6: [Method] M1 # 6| -1: [TypeMention] Task # 7| 4: [BlockStmt] {...} # 8| 0: [LocalFunctionStmt] m(...) @@ -550,7 +550,7 @@ LambdaModifier.cs: # 15| 0: [TypeMention] Task LocalFunction.cs: # 4| [Class] LocalFunction -# 6| 5: [Method] M1 +# 6| 6: [Method] M1 # 6| -1: [TypeMention] Task # 7| 4: [BlockStmt] {...} # 8| 0: [LocalVariableDeclStmt] ... ...; @@ -578,7 +578,7 @@ LocalFunction.cs: # 14| 0: [IntLiteral] 2 # 16| 3: [LocalFunctionStmt] localExtern(...) # 16| 0: [LocalFunction] localExtern -# 19| 6: [Method] M2 +# 19| 7: [Method] M2 # 19| -1: [TypeMention] Void # 20| 4: [BlockStmt] {...} # 21| 0: [LocalFunctionStmt] dup(...) @@ -610,7 +610,7 @@ LocalFunction.cs: # 27| 1: [IntLiteral] 42 NativeInt.cs: # 3| [Class] NativeInt -# 5| 5: [Method] M1 +# 5| 6: [Method] M1 # 5| -1: [TypeMention] Void #-----| 2: (Parameters) # 5| 0: [Parameter] j @@ -654,7 +654,7 @@ NativeInt.cs: # 12| 0: [TypeAccess] access to type IntPtr # 12| 0: [TypeMention] IntPtr # 12| 1: [IntLiteral] 42 -# 15| 6: [Method] M2 +# 15| 7: [Method] M2 # 15| -1: [TypeMention] Void # 16| 4: [BlockStmt] {...} # 17| 0: [LocalVariableDeclStmt] ... ...; @@ -718,7 +718,7 @@ NativeInt.cs: ParenthesizedPattern.cs: # 3| [Class] T # 5| [Class] ParenthesizedPattern -# 7| 5: [Method] M1 +# 7| 6: [Method] M1 # 7| -1: [TypeMention] Void #-----| 2: (Parameters) # 7| 0: [Parameter] o @@ -738,7 +738,7 @@ ParenthesizedPattern.cs: # 13| 0: [VariablePatternExpr] Object p2 # 13| 3: [PropertyPatternExpr] { ... } # 14| 1: [BlockStmt] {...} -# 18| 6: [Method] M2 +# 18| 7: [Method] M2 # 18| -1: [TypeMention] Void #-----| 2: (Parameters) # 18| 0: [Parameter] o @@ -778,23 +778,23 @@ ParenthesizedPattern.cs: # 26| 2: [IntLiteral] 5 Record.cs: # 4| [RecordClass] Person -# 4| 11: [NEOperator] != +# 4| 12: [NEOperator] != #-----| 2: (Parameters) # 4| 0: [Parameter] left # 4| 1: [Parameter] right -# 4| 12: [EQOperator] == +# 4| 13: [EQOperator] == #-----| 2: (Parameters) # 4| 0: [Parameter] left # 4| 1: [Parameter] right -# 4| 13: [Property] EqualityContract +# 4| 14: [Property] EqualityContract # 4| 3: [Getter] get_EqualityContract -# 6| 14: [Property] LastName +# 6| 15: [Property] LastName # 6| -1: [TypeMention] string # 6| 3: [Getter] get_LastName -# 7| 15: [Property] FirstName +# 7| 16: [Property] FirstName # 7| -1: [TypeMention] string # 7| 3: [Getter] get_FirstName -# 9| 16: [InstanceConstructor] Person +# 9| 17: [InstanceConstructor] Person #-----| 2: (Parameters) # 9| 0: [Parameter] first # 9| -1: [TypeMention] string @@ -808,20 +808,20 @@ Record.cs: # 9| 0: [ParameterAccess] access to parameter first # 9| 1: [ParameterAccess] access to parameter last # 12| [RecordClass] Teacher -# 12| 12: [NEOperator] != +# 12| 13: [NEOperator] != #-----| 2: (Parameters) # 12| 0: [Parameter] left # 12| 1: [Parameter] right -# 12| 13: [EQOperator] == +# 12| 14: [EQOperator] == #-----| 2: (Parameters) # 12| 0: [Parameter] left # 12| 1: [Parameter] right -# 12| 14: [Property] EqualityContract +# 12| 15: [Property] EqualityContract # 12| 3: [Getter] get_EqualityContract -# 14| 15: [Property] Subject +# 14| 16: [Property] Subject # 14| -1: [TypeMention] string # 14| 3: [Getter] get_Subject -# 16| 16: [InstanceConstructor] Teacher +# 16| 17: [InstanceConstructor] Teacher #-----| 2: (Parameters) # 16| 0: [Parameter] first # 16| -1: [TypeMention] string @@ -836,20 +836,20 @@ Record.cs: # 17| 0: [PropertyCall] access to property Subject # 17| 1: [ParameterAccess] access to parameter sub # 20| [RecordClass] Student -# 20| 12: [NEOperator] != +# 20| 13: [NEOperator] != #-----| 2: (Parameters) # 20| 0: [Parameter] left # 20| 1: [Parameter] right -# 20| 13: [EQOperator] == +# 20| 14: [EQOperator] == #-----| 2: (Parameters) # 20| 0: [Parameter] left # 20| 1: [Parameter] right -# 20| 14: [Property] EqualityContract +# 20| 15: [Property] EqualityContract # 20| 3: [Getter] get_EqualityContract -# 22| 15: [Property] Level +# 22| 16: [Property] Level # 22| -1: [TypeMention] int # 22| 3: [Getter] get_Level -# 24| 16: [InstanceConstructor] Student +# 24| 17: [InstanceConstructor] Student #-----| 2: (Parameters) # 24| 0: [Parameter] first # 24| -1: [TypeMention] string @@ -864,44 +864,44 @@ Record.cs: # 24| 0: [PropertyCall] access to property Level # 24| 1: [ParameterAccess] access to parameter level # 27| [RecordClass] Person1 -# 27| 12: [NEOperator] != +# 27| 13: [NEOperator] != #-----| 2: (Parameters) # 27| 0: [Parameter] left # 27| 1: [Parameter] right -# 27| 13: [EQOperator] == +# 27| 14: [EQOperator] == #-----| 2: (Parameters) # 27| 0: [Parameter] left # 27| 1: [Parameter] right -# 27| 14: [Property] EqualityContract +# 27| 15: [Property] EqualityContract # 27| 3: [Getter] get_EqualityContract -# 27| 15: [InstanceConstructor,PrimaryConstructor] Person1 +# 27| 16: [InstanceConstructor,PrimaryConstructor] Person1 #-----| 2: (Parameters) # 27| 0: [Parameter] FirstName # 27| -1: [TypeMention] string # 27| 1: [Parameter] LastName # 27| -1: [TypeMention] string -# 27| 16: [Property] FirstName +# 27| 17: [Property] FirstName # 27| 3: [Getter] get_FirstName # 27| 4: [Setter] set_FirstName #-----| 2: (Parameters) # 27| 0: [Parameter] value -# 27| 17: [Property] LastName +# 27| 18: [Property] LastName # 27| 3: [Getter] get_LastName # 27| 4: [Setter] set_LastName #-----| 2: (Parameters) # 27| 0: [Parameter] value # 29| [RecordClass] Teacher1 -# 29| 13: [NEOperator] != +# 29| 14: [NEOperator] != #-----| 2: (Parameters) # 29| 0: [Parameter] left # 29| 1: [Parameter] right -# 29| 14: [EQOperator] == +# 29| 15: [EQOperator] == #-----| 2: (Parameters) # 29| 0: [Parameter] left # 29| 1: [Parameter] right -# 29| 15: [Property] EqualityContract +# 29| 16: [Property] EqualityContract # 29| 3: [Getter] get_EqualityContract -# 29| 16: [InstanceConstructor,PrimaryConstructor] Teacher1 +# 29| 17: [InstanceConstructor,PrimaryConstructor] Teacher1 #-----| 2: (Parameters) # 29| 0: [Parameter] FirstName # 29| -1: [TypeMention] string @@ -912,23 +912,23 @@ Record.cs: # 30| 3: [ConstructorInitializer] call to constructor Person1 # 30| 0: [ParameterAccess] access to parameter FirstName # 30| 1: [ParameterAccess] access to parameter LastName -# 29| 17: [Property] Subject +# 29| 18: [Property] Subject # 29| 3: [Getter] get_Subject # 29| 4: [Setter] set_Subject #-----| 2: (Parameters) # 29| 0: [Parameter] value # 32| [RecordClass] Student1 -# 32| 13: [NEOperator] != +# 32| 14: [NEOperator] != #-----| 2: (Parameters) # 32| 0: [Parameter] left # 32| 1: [Parameter] right -# 32| 14: [EQOperator] == +# 32| 15: [EQOperator] == #-----| 2: (Parameters) # 32| 0: [Parameter] left # 32| 1: [Parameter] right -# 32| 15: [Property] EqualityContract +# 32| 16: [Property] EqualityContract # 32| 3: [Getter] get_EqualityContract -# 32| 16: [InstanceConstructor,PrimaryConstructor] Student1 +# 32| 17: [InstanceConstructor,PrimaryConstructor] Student1 #-----| 2: (Parameters) # 32| 0: [Parameter] FirstName # 32| -1: [TypeMention] string @@ -939,61 +939,61 @@ Record.cs: # 33| 3: [ConstructorInitializer] call to constructor Person1 # 33| 0: [ParameterAccess] access to parameter FirstName # 33| 1: [ParameterAccess] access to parameter LastName -# 32| 17: [Property] Level +# 32| 18: [Property] Level # 32| 3: [Getter] get_Level # 32| 4: [Setter] set_Level #-----| 2: (Parameters) # 32| 0: [Parameter] value # 35| [RecordClass] Pet -# 35| 12: [NEOperator] != +# 35| 13: [NEOperator] != #-----| 2: (Parameters) # 35| 0: [Parameter] left # 35| 1: [Parameter] right -# 35| 13: [EQOperator] == +# 35| 14: [EQOperator] == #-----| 2: (Parameters) # 35| 0: [Parameter] left # 35| 1: [Parameter] right -# 35| 14: [Property] EqualityContract +# 35| 15: [Property] EqualityContract # 35| 3: [Getter] get_EqualityContract -# 35| 15: [InstanceConstructor,PrimaryConstructor] Pet +# 35| 16: [InstanceConstructor,PrimaryConstructor] Pet #-----| 2: (Parameters) # 35| 0: [Parameter] Name # 35| -1: [TypeMention] string -# 35| 16: [Property] Name +# 35| 17: [Property] Name # 35| 3: [Getter] get_Name # 35| 4: [Setter] set_Name #-----| 2: (Parameters) # 35| 0: [Parameter] value -# 37| 17: [Method] ShredTheFurniture +# 37| 18: [Method] ShredTheFurniture # 37| -1: [TypeMention] Void # 38| 4: [MethodCall] call to method WriteLine # 38| -1: [TypeAccess] access to type Console # 38| 0: [TypeMention] Console # 38| 0: [StringLiteralUtf16] "Shredding furniture" # 41| [RecordClass] Dog -# 41| 12: [NEOperator] != +# 41| 13: [NEOperator] != #-----| 2: (Parameters) # 41| 0: [Parameter] left # 41| 1: [Parameter] right -# 41| 13: [EQOperator] == +# 41| 14: [EQOperator] == #-----| 2: (Parameters) # 41| 0: [Parameter] left # 41| 1: [Parameter] right -# 41| 14: [InstanceConstructor,PrimaryConstructor] Dog +# 41| 15: [InstanceConstructor,PrimaryConstructor] Dog #-----| 2: (Parameters) # 41| 0: [Parameter] Name # 41| -1: [TypeMention] string # 41| 3: [ConstructorInitializer] call to constructor Pet # 41| 0: [ParameterAccess] access to parameter Name -# 41| 15: [Property] EqualityContract +# 41| 16: [Property] EqualityContract # 41| 3: [Getter] get_EqualityContract -# 43| 16: [Method] WagTail +# 43| 17: [Method] WagTail # 43| -1: [TypeMention] Void # 44| 4: [MethodCall] call to method WriteLine # 44| -1: [TypeAccess] access to type Console # 44| 0: [TypeMention] Console # 44| 0: [StringLiteralUtf16] "It's tail wagging time" -# 46| 17: [Method] ToString +# 46| 18: [Method] ToString # 46| -1: [TypeMention] string # 47| 4: [BlockStmt] {...} # 48| 0: [LocalVariableDeclStmt] ... ...; @@ -1013,37 +1013,37 @@ Record.cs: # 50| -1: [LocalVariableAccess] access to local variable s # 50| 1: [StringLiteralUtf16] " is a dog" # 54| [RecordClass] R1 -# 54| 12: [NEOperator] != +# 54| 13: [NEOperator] != #-----| 2: (Parameters) # 54| 0: [Parameter] left # 54| 1: [Parameter] right -# 54| 13: [EQOperator] == +# 54| 14: [EQOperator] == #-----| 2: (Parameters) # 54| 0: [Parameter] left # 54| 1: [Parameter] right -# 54| 14: [Property] EqualityContract +# 54| 15: [Property] EqualityContract # 54| 3: [Getter] get_EqualityContract -# 54| 15: [InstanceConstructor,PrimaryConstructor] R1 +# 54| 16: [InstanceConstructor,PrimaryConstructor] R1 #-----| 2: (Parameters) # 54| 0: [Parameter] A # 54| -1: [TypeMention] string -# 54| 16: [Property] A +# 54| 17: [Property] A # 54| 3: [Getter] get_A # 54| 4: [Setter] set_A #-----| 2: (Parameters) # 54| 0: [Parameter] value # 56| [RecordClass] R2 -# 56| 13: [NEOperator] != +# 56| 14: [NEOperator] != #-----| 2: (Parameters) # 56| 0: [Parameter] left # 56| 1: [Parameter] right -# 56| 14: [EQOperator] == +# 56| 15: [EQOperator] == #-----| 2: (Parameters) # 56| 0: [Parameter] left # 56| 1: [Parameter] right -# 56| 15: [Property] EqualityContract +# 56| 16: [Property] EqualityContract # 56| 3: [Getter] get_EqualityContract -# 56| 16: [InstanceConstructor,PrimaryConstructor] R2 +# 56| 17: [InstanceConstructor,PrimaryConstructor] R2 #-----| 2: (Parameters) # 56| 0: [Parameter] A # 56| -1: [TypeMention] string @@ -1051,13 +1051,13 @@ Record.cs: # 56| -1: [TypeMention] string # 56| 3: [ConstructorInitializer] call to constructor R1 # 56| 0: [ParameterAccess] access to parameter A -# 56| 17: [Property] B +# 56| 18: [Property] B # 56| 3: [Getter] get_B # 56| 4: [Setter] set_B #-----| 2: (Parameters) # 56| 0: [Parameter] value # 58| [Class] Record1 -# 60| 5: [Method] M1 +# 60| 6: [Method] M1 # 60| -1: [TypeMention] Void # 61| 4: [BlockStmt] {...} # 62| 0: [LocalVariableDeclStmt] ... ...; @@ -1084,7 +1084,7 @@ Record.cs: # 65| 0: [OperatorCall] call to operator == # 65| 0: [LocalVariableAccess] access to local variable student # 65| 1: [LocalVariableAccess] access to local variable person -# 68| 6: [Method] M2 +# 68| 7: [Method] M2 # 68| -1: [TypeMention] Void # 69| 4: [BlockStmt] {...} # 70| 0: [LocalVariableDeclStmt] ... ...; @@ -1140,7 +1140,7 @@ Record.cs: # 77| 1: [WithExpr] ... with { ... } # 77| 0: [LocalVariableAccess] access to local variable p1 # 77| 1: [ObjectInitializer] { ..., ... } -# 80| 7: [Method] M3 +# 80| 8: [Method] M3 # 80| -1: [TypeMention] Void # 81| 4: [BlockStmt] {...} # 82| 0: [LocalVariableDeclStmt] ... ...; @@ -1168,7 +1168,7 @@ Record.cs: # 84| 1: [StringLiteralUtf16] "C" RelationalPattern.cs: # 3| [Class] RelationalPattern -# 5| 5: [Method] M1 +# 5| 6: [Method] M1 # 5| -1: [TypeMention] bool #-----| 2: (Parameters) # 5| 0: [Parameter] c @@ -1177,7 +1177,7 @@ RelationalPattern.cs: # 6| 0: [ParameterAccess] access to parameter c # 6| 1: [GEPattern] >= ... # 6| 0: [CharLiteral] a -# 7| 6: [Method] M2 +# 7| 7: [Method] M2 # 7| -1: [TypeMention] bool #-----| 2: (Parameters) # 7| 0: [Parameter] c @@ -1186,7 +1186,7 @@ RelationalPattern.cs: # 8| 0: [ParameterAccess] access to parameter c # 8| 1: [GTPattern] > ... # 8| 0: [CharLiteral] a -# 9| 7: [Method] M3 +# 9| 8: [Method] M3 # 9| -1: [TypeMention] bool #-----| 2: (Parameters) # 9| 0: [Parameter] c @@ -1195,7 +1195,7 @@ RelationalPattern.cs: # 10| 0: [ParameterAccess] access to parameter c # 10| 1: [LEPattern] <= ... # 10| 0: [CharLiteral] a -# 11| 8: [Method] M4 +# 11| 9: [Method] M4 # 11| -1: [TypeMention] bool #-----| 2: (Parameters) # 11| 0: [Parameter] c @@ -1204,7 +1204,7 @@ RelationalPattern.cs: # 12| 0: [ParameterAccess] access to parameter c # 12| 1: [LTPattern] < ... # 12| 0: [CharLiteral] a -# 14| 9: [Method] M5 +# 14| 10: [Method] M5 # 14| -1: [TypeMention] string #-----| 2: (Parameters) # 14| 0: [Parameter] i @@ -1225,7 +1225,7 @@ RelationalPattern.cs: # 20| 2: [StringLiteralUtf16] "other" TargetType.cs: # 5| [Class] TargetType -# 7| 5: [Method] M2 +# 7| 6: [Method] M2 # 7| -1: [TypeMention] Void # 8| 4: [BlockStmt] {...} # 9| 0: [LocalVariableDeclStmt] ... ...; @@ -1356,7 +1356,7 @@ TargetType.cs: # 36| 0: [ObjectCreation] object creation of type TargetType # 36| 0: [TypeMention] TargetType # 37| 2: [IntLiteral] 12 -# 40| 6: [ImplicitConversionOperator] implicit conversion +# 40| 7: [ImplicitConversionOperator] implicit conversion # 40| -1: [TypeMention] int #-----| 2: (Parameters) # 40| 0: [Parameter] d @@ -1365,14 +1365,14 @@ TargetType.cs: TypeParameterNullability.cs: # 1| [Interface] I1 # 3| [Class] A2 -# 5| 5: [Method] F1`1 +# 5| 6: [Method] F1`1 # 5| -1: [TypeMention] Void #-----| 1: (Type parameters) # 5| 0: [TypeParameter] T #-----| 2: (Parameters) # 5| 0: [Parameter] t # 5| 4: [BlockStmt] {...} -# 6| 6: [Method] F2`1 +# 6| 7: [Method] F2`1 # 6| -1: [TypeMention] Void #-----| 1: (Type parameters) # 6| 0: [TypeParameter] T @@ -1381,28 +1381,28 @@ TypeParameterNullability.cs: # 6| -1: [TypeMention] T? # 6| 1: [TypeMention] T # 6| 4: [BlockStmt] {...} -# 7| 7: [Method] F3`1 +# 7| 8: [Method] F3`1 # 7| -1: [TypeMention] Void #-----| 1: (Type parameters) # 7| 0: [TypeParameter] T #-----| 2: (Parameters) # 7| 0: [Parameter] t # 7| 4: [BlockStmt] {...} -# 8| 8: [Method] F4`1 +# 8| 9: [Method] F4`1 # 8| -1: [TypeMention] Void #-----| 1: (Type parameters) # 8| 0: [TypeParameter] T #-----| 2: (Parameters) # 8| 0: [Parameter] t # 8| 4: [BlockStmt] {...} -# 9| 9: [Method] F5`1 +# 9| 10: [Method] F5`1 # 9| -1: [TypeMention] Void #-----| 1: (Type parameters) # 9| 0: [TypeParameter] T #-----| 2: (Parameters) # 9| 0: [Parameter] t # 9| 4: [BlockStmt] {...} -# 10| 10: [Method] F6`1 +# 10| 11: [Method] F6`1 # 10| -1: [TypeMention] Void #-----| 1: (Type parameters) # 10| 0: [TypeParameter] T @@ -1414,14 +1414,14 @@ TypeParameterNullability.cs: # 13| [Class] B2 #-----| 3: (Base types) # 13| 0: [TypeMention] A2 -# 15| 5: [Method] F1`1 +# 15| 6: [Method] F1`1 # 15| -1: [TypeMention] Void #-----| 1: (Type parameters) # 15| 0: [TypeParameter] T #-----| 2: (Parameters) # 15| 0: [Parameter] t # 15| 4: [BlockStmt] {...} -# 16| 6: [Method] F2`1 +# 16| 7: [Method] F2`1 # 16| -1: [TypeMention] Void #-----| 1: (Type parameters) # 16| 0: [TypeParameter] T @@ -1430,21 +1430,21 @@ TypeParameterNullability.cs: # 16| -1: [TypeMention] T? # 16| 1: [TypeMention] T # 16| 4: [BlockStmt] {...} -# 17| 7: [Method] F3`1 +# 17| 8: [Method] F3`1 # 17| -1: [TypeMention] Void #-----| 1: (Type parameters) # 17| 0: [TypeParameter] T #-----| 2: (Parameters) # 17| 0: [Parameter] t # 17| 4: [BlockStmt] {...} -# 18| 8: [Method] F4`1 +# 18| 9: [Method] F4`1 # 18| -1: [TypeMention] Void #-----| 1: (Type parameters) # 18| 0: [TypeParameter] T #-----| 2: (Parameters) # 18| 0: [Parameter] t # 18| 4: [BlockStmt] {...} -# 19| 9: [Method] F6`1 +# 19| 10: [Method] F6`1 # 19| -1: [TypeMention] Void #-----| 1: (Type parameters) # 19| 0: [TypeParameter] T @@ -1456,7 +1456,7 @@ TypeParameterNullability.cs: # 22| [Class] B3 #-----| 3: (Base types) # 22| 0: [TypeMention] A2 -# 24| 5: [Method] F2`1 +# 24| 6: [Method] F2`1 # 24| -1: [TypeMention] Void #-----| 1: (Type parameters) # 24| 0: [TypeParameter] T @@ -1467,7 +1467,7 @@ TypeParameterNullability.cs: # 24| 4: [BlockStmt] {...} TypePattern.cs: # 3| [Class] TypePattern -# 5| 5: [Method] M1 +# 5| 6: [Method] M1 # 5| -1: [TypeMention] object #-----| 2: (Parameters) # 5| 0: [Parameter] o1 @@ -1516,13 +1516,13 @@ TypePattern.cs: # 14| 2: [LocalVariableAccess] access to local variable o UnaryPattern.cs: # 3| [Class] UnaryPattern -# 5| 5: [Property] P1 +# 5| 6: [Property] P1 # 5| -1: [TypeMention] int # 5| 3: [Getter] get_P1 # 5| 4: [Setter] set_P1 #-----| 2: (Parameters) # 5| 0: [Parameter] value -# 7| 6: [Method] M1 +# 7| 7: [Method] M1 # 7| -1: [TypeMention] bool #-----| 2: (Parameters) # 7| 0: [Parameter] c @@ -1531,7 +1531,7 @@ UnaryPattern.cs: # 8| 0: [ParameterAccess] access to parameter c # 8| 1: [NotPatternExpr] not ... # 8| 0: [CharLiteral,ConstantPatternExpr] a -# 9| 7: [Method] M2 +# 9| 8: [Method] M2 # 9| -1: [TypeMention] bool #-----| 2: (Parameters) # 9| 0: [Parameter] c @@ -1540,7 +1540,7 @@ UnaryPattern.cs: # 10| 0: [ParameterAccess] access to parameter c # 10| 1: [NotPatternExpr] not ... # 10| 0: [ConstantPatternExpr,NullLiteral] null -# 11| 8: [Method] M3 +# 11| 9: [Method] M3 # 11| -1: [TypeMention] bool #-----| 2: (Parameters) # 11| 0: [Parameter] c @@ -1554,7 +1554,7 @@ UnaryPattern.cs: # 12| 0: [TypeMention] UnaryPattern # 12| 3: [PropertyPatternExpr] { ... } # 12| 0: [ConstantPatternExpr,IntLiteral,LabeledPatternExpr] 1 -# 14| 9: [Method] M4 +# 14| 10: [Method] M4 # 14| -1: [TypeMention] string #-----| 2: (Parameters) # 14| 0: [Parameter] i diff --git a/csharp/ql/test/library-tests/csharp9/nativeInt.expected b/csharp/ql/test/library-tests/csharp9/nativeInt.expected index 2c63241e1fe..7809e4f9487 100644 --- a/csharp/ql/test/library-tests/csharp9/nativeInt.expected +++ b/csharp/ql/test/library-tests/csharp9/nativeInt.expected @@ -1,4 +1,6 @@ | NativeInt.cs:3:14:3:22 | call to constructor Object | Object | +| NativeInt.cs:3:14:3:22 | call to method | Void | +| NativeInt.cs:3:14:3:22 | this access | NativeInt | | NativeInt.cs:7:14:7:14 | access to local variable x | IntPtr | | NativeInt.cs:7:14:7:18 | IntPtr x = ... | IntPtr | | NativeInt.cs:7:18:7:18 | (...) ... | IntPtr | diff --git a/csharp/ql/test/library-tests/csharp9/record.expected b/csharp/ql/test/library-tests/csharp9/record.expected index 9b6b5c00571..b34815c4f1a 100644 --- a/csharp/ql/test/library-tests/csharp9/record.expected +++ b/csharp/ql/test/library-tests/csharp9/record.expected @@ -12,6 +12,7 @@ records members | Record.cs:4:1:10:1 | Person | Person.!=(Person, Person) | Record.cs:4:15:4:20 | | Record.cs:4:1:10:1 | Person | Person.$() | no location | +| Record.cs:4:1:10:1 | Person | Person.() | no location | | Record.cs:4:1:10:1 | Person | Person.==(Person, Person) | Record.cs:4:15:4:20 | | Record.cs:4:1:10:1 | Person | Person.EqualityContract | Record.cs:4:15:4:20 | | Record.cs:4:1:10:1 | Person | Person.Equals(Person) | no location | @@ -30,6 +31,7 @@ members | Record.cs:4:1:10:1 | Person | System.Object.ReferenceEquals(object, object) | no location | | Record.cs:4:1:10:1 | Person | System.Object.~Object() | no location | | Record.cs:12:1:18:1 | Teacher | Person.!=(Person, Person) | Record.cs:4:15:4:20 | +| Record.cs:12:1:18:1 | Teacher | Person.() | no location | | Record.cs:12:1:18:1 | Teacher | Person.==(Person, Person) | Record.cs:4:15:4:20 | | Record.cs:12:1:18:1 | Teacher | Person.FirstName | Record.cs:7:19:7:27 | | Record.cs:12:1:18:1 | Teacher | Person.LastName | Record.cs:6:19:6:26 | @@ -43,6 +45,7 @@ members | Record.cs:12:1:18:1 | Teacher | System.Object.~Object() | no location | | Record.cs:12:1:18:1 | Teacher | Teacher.!=(Teacher, Teacher) | Record.cs:12:15:12:21 | | Record.cs:12:1:18:1 | Teacher | Teacher.$() | no location | +| Record.cs:12:1:18:1 | Teacher | Teacher.() | no location | | Record.cs:12:1:18:1 | Teacher | Teacher.==(Teacher, Teacher) | Record.cs:12:15:12:21 | | Record.cs:12:1:18:1 | Teacher | Teacher.EqualityContract | Record.cs:12:15:12:21 | | Record.cs:12:1:18:1 | Teacher | Teacher.Equals(Person) | no location | @@ -55,6 +58,7 @@ members | Record.cs:12:1:18:1 | Teacher | Teacher.Teacher(string, string, string) | Record.cs:16:12:16:18 | | Record.cs:12:1:18:1 | Teacher | Teacher.ToString() | no location | | Record.cs:20:1:25:1 | Student | Person.!=(Person, Person) | Record.cs:4:15:4:20 | +| Record.cs:20:1:25:1 | Student | Person.() | no location | | Record.cs:20:1:25:1 | Student | Person.==(Person, Person) | Record.cs:4:15:4:20 | | Record.cs:20:1:25:1 | Student | Person.FirstName | Record.cs:7:19:7:27 | | Record.cs:20:1:25:1 | Student | Person.LastName | Record.cs:6:19:6:26 | @@ -62,6 +66,7 @@ members | Record.cs:20:1:25:1 | Student | Person.Person(string, string) | Record.cs:9:12:9:17 | | Record.cs:20:1:25:1 | Student | Student.!=(Student, Student) | Record.cs:20:22:20:28 | | Record.cs:20:1:25:1 | Student | Student.$() | no location | +| Record.cs:20:1:25:1 | Student | Student.() | no location | | Record.cs:20:1:25:1 | Student | Student.==(Student, Student) | Record.cs:20:22:20:28 | | Record.cs:20:1:25:1 | Student | Student.EqualityContract | Record.cs:20:22:20:28 | | Record.cs:20:1:25:1 | Student | Student.Equals(Person) | no location | @@ -81,6 +86,7 @@ members | Record.cs:20:1:25:1 | Student | System.Object.~Object() | no location | | Record.cs:27:1:27:57 | Person1 | Person1.!=(Person1, Person1) | Record.cs:27:15:27:21 | | Record.cs:27:1:27:57 | Person1 | Person1.$() | no location | +| Record.cs:27:1:27:57 | Person1 | Person1.() | no location | | Record.cs:27:1:27:57 | Person1 | Person1.==(Person1, Person1) | Record.cs:27:15:27:21 | | Record.cs:27:1:27:57 | Person1 | Person1.Deconstruct(out string, out string) | no location | | Record.cs:27:1:27:57 | Person1 | Person1.EqualityContract | Record.cs:27:15:27:21 | @@ -100,6 +106,7 @@ members | Record.cs:27:1:27:57 | Person1 | System.Object.ReferenceEquals(object, object) | no location | | Record.cs:27:1:27:57 | Person1 | System.Object.~Object() | no location | | Record.cs:29:1:30:35 | Teacher1 | Person1.!=(Person1, Person1) | Record.cs:27:15:27:21 | +| Record.cs:29:1:30:35 | Teacher1 | Person1.() | no location | | Record.cs:29:1:30:35 | Teacher1 | Person1.==(Person1, Person1) | Record.cs:27:15:27:21 | | Record.cs:29:1:30:35 | Teacher1 | Person1.Deconstruct(out string, out string) | no location | | Record.cs:29:1:30:35 | Teacher1 | Person1.FirstName | Record.cs:27:30:27:38 | @@ -114,6 +121,7 @@ members | Record.cs:29:1:30:35 | Teacher1 | System.Object.~Object() | no location | | Record.cs:29:1:30:35 | Teacher1 | Teacher1.!=(Teacher1, Teacher1) | Record.cs:29:15:29:22 | | Record.cs:29:1:30:35 | Teacher1 | Teacher1.$() | no location | +| Record.cs:29:1:30:35 | Teacher1 | Teacher1.() | no location | | Record.cs:29:1:30:35 | Teacher1 | Teacher1.==(Teacher1, Teacher1) | Record.cs:29:15:29:22 | | Record.cs:29:1:30:35 | Teacher1 | Teacher1.Deconstruct(out string, out string, out string) | no location | | Record.cs:29:1:30:35 | Teacher1 | Teacher1.EqualityContract | Record.cs:29:15:29:22 | @@ -127,6 +135,7 @@ members | Record.cs:29:1:30:35 | Teacher1 | Teacher1.Teacher1(string, string, string) | Record.cs:29:15:29:22 | | Record.cs:29:1:30:35 | Teacher1 | Teacher1.ToString() | no location | | Record.cs:32:1:33:35 | Student1 | Person1.!=(Person1, Person1) | Record.cs:27:15:27:21 | +| Record.cs:32:1:33:35 | Student1 | Person1.() | no location | | Record.cs:32:1:33:35 | Student1 | Person1.==(Person1, Person1) | Record.cs:27:15:27:21 | | Record.cs:32:1:33:35 | Student1 | Person1.Deconstruct(out string, out string) | no location | | Record.cs:32:1:33:35 | Student1 | Person1.FirstName | Record.cs:27:30:27:38 | @@ -135,6 +144,7 @@ members | Record.cs:32:1:33:35 | Student1 | Person1.Person1(string, string) | Record.cs:27:15:27:21 | | Record.cs:32:1:33:35 | Student1 | Student1.!=(Student1, Student1) | Record.cs:32:22:32:29 | | Record.cs:32:1:33:35 | Student1 | Student1.$() | no location | +| Record.cs:32:1:33:35 | Student1 | Student1.() | no location | | Record.cs:32:1:33:35 | Student1 | Student1.==(Student1, Student1) | Record.cs:32:22:32:29 | | Record.cs:32:1:33:35 | Student1 | Student1.Deconstruct(out string, out string, out int) | no location | | Record.cs:32:1:33:35 | Student1 | Student1.EqualityContract | Record.cs:32:22:32:29 | @@ -155,6 +165,7 @@ members | Record.cs:32:1:33:35 | Student1 | System.Object.~Object() | no location | | Record.cs:35:1:39:1 | Pet | Pet.!=(Pet, Pet) | Record.cs:35:15:35:17 | | Record.cs:35:1:39:1 | Pet | Pet.$() | no location | +| Record.cs:35:1:39:1 | Pet | Pet.() | no location | | Record.cs:35:1:39:1 | Pet | Pet.==(Pet, Pet) | Record.cs:35:15:35:17 | | Record.cs:35:1:39:1 | Pet | Pet.Deconstruct(out string) | no location | | Record.cs:35:1:39:1 | Pet | Pet.EqualityContract | Record.cs:35:15:35:17 | @@ -175,6 +186,7 @@ members | Record.cs:35:1:39:1 | Pet | System.Object.~Object() | no location | | Record.cs:41:1:52:1 | Dog | Dog.!=(Dog, Dog) | Record.cs:41:15:41:17 | | Record.cs:41:1:52:1 | Dog | Dog.$() | no location | +| Record.cs:41:1:52:1 | Dog | Dog.() | no location | | Record.cs:41:1:52:1 | Dog | Dog.==(Dog, Dog) | Record.cs:41:15:41:17 | | Record.cs:41:1:52:1 | Dog | Dog.Deconstruct(out string) | no location | | Record.cs:41:1:52:1 | Dog | Dog.Dog(Dog) | no location | @@ -188,6 +200,7 @@ members | Record.cs:41:1:52:1 | Dog | Dog.ToString() | Record.cs:46:28:46:35 | | Record.cs:41:1:52:1 | Dog | Dog.WagTail() | Record.cs:43:17:43:23 | | Record.cs:41:1:52:1 | Dog | Pet.!=(Pet, Pet) | Record.cs:35:15:35:17 | +| Record.cs:41:1:52:1 | Dog | Pet.() | no location | | Record.cs:41:1:52:1 | Dog | Pet.==(Pet, Pet) | Record.cs:35:15:35:17 | | Record.cs:41:1:52:1 | Dog | Pet.Deconstruct(out string) | no location | | Record.cs:41:1:52:1 | Dog | Pet.Name | Record.cs:35:26:35:29 | @@ -202,6 +215,7 @@ members | Record.cs:41:1:52:1 | Dog | System.Object.~Object() | no location | | Record.cs:54:1:54:39 | R1 | R1.!=(R1, R1) | Record.cs:54:24:54:25 | | Record.cs:54:1:54:39 | R1 | R1.$() | no location | +| Record.cs:54:1:54:39 | R1 | R1.() | no location | | Record.cs:54:1:54:39 | R1 | R1.==(R1, R1) | Record.cs:54:24:54:25 | | Record.cs:54:1:54:39 | R1 | R1.A | Record.cs:54:34:54:34 | | Record.cs:54:1:54:39 | R1 | R1.Deconstruct(out string) | no location | @@ -220,6 +234,7 @@ members | Record.cs:54:1:54:39 | R1 | System.Object.ReferenceEquals(object, object) | no location | | Record.cs:54:1:54:39 | R1 | System.Object.~Object() | no location | | Record.cs:56:1:56:48 | R2 | R1.!=(R1, R1) | Record.cs:54:24:54:25 | +| Record.cs:56:1:56:48 | R2 | R1.() | no location | | Record.cs:56:1:56:48 | R2 | R1.==(R1, R1) | Record.cs:54:24:54:25 | | Record.cs:56:1:56:48 | R2 | R1.A | Record.cs:54:34:54:34 | | Record.cs:56:1:56:48 | R2 | R1.Deconstruct(out string) | no location | @@ -227,6 +242,7 @@ members | Record.cs:56:1:56:48 | R2 | R1.R1(string) | Record.cs:54:24:54:25 | | Record.cs:56:1:56:48 | R2 | R2.!=(R2, R2) | Record.cs:56:15:56:16 | | Record.cs:56:1:56:48 | R2 | R2.$() | no location | +| Record.cs:56:1:56:48 | R2 | R2.() | no location | | Record.cs:56:1:56:48 | R2 | R2.==(R2, R2) | Record.cs:56:15:56:16 | | Record.cs:56:1:56:48 | R2 | R2.B | Record.cs:56:35:56:35 | | Record.cs:56:1:56:48 | R2 | R2.Deconstruct(out string, out string) | no location | diff --git a/csharp/ql/test/library-tests/dataflow/constructors/ConstructorFlow.expected b/csharp/ql/test/library-tests/dataflow/constructors/ConstructorFlow.expected index 574ef53eae6..678dca279ff 100644 --- a/csharp/ql/test/library-tests/dataflow/constructors/ConstructorFlow.expected +++ b/csharp/ql/test/library-tests/dataflow/constructors/ConstructorFlow.expected @@ -1,27 +1,30 @@ models edges -| Constructors.cs:5:24:5:25 | [post] this access : C_no_ctor [field s1] : Object | Constructors.cs:9:27:9:41 | object creation of type C_no_ctor : C_no_ctor [field s1] : Object | provenance | | +| Constructors.cs:3:18:3:26 | [post] this access : C_no_ctor [field s1] : Object | Constructors.cs:9:27:9:41 | object creation of type C_no_ctor : C_no_ctor [field s1] : Object | provenance | | +| Constructors.cs:5:24:5:25 | [post] this access : C_no_ctor [field s1] : Object | Constructors.cs:3:18:3:26 | [post] this access : C_no_ctor [field s1] : Object | provenance | | | Constructors.cs:5:29:5:45 | call to method Source : Object | Constructors.cs:5:24:5:25 | [post] this access : C_no_ctor [field s1] : Object | provenance | | | Constructors.cs:9:23:9:23 | access to local variable c : C_no_ctor [field s1] : Object | Constructors.cs:10:13:10:13 | access to local variable c : C_no_ctor [field s1] : Object | provenance | | | Constructors.cs:9:27:9:41 | object creation of type C_no_ctor : C_no_ctor [field s1] : Object | Constructors.cs:9:23:9:23 | access to local variable c : C_no_ctor [field s1] : Object | provenance | | | Constructors.cs:10:13:10:13 | access to local variable c : C_no_ctor [field s1] : Object | Constructors.cs:13:21:13:22 | this : C_no_ctor [field s1] : Object | provenance | | | Constructors.cs:13:21:13:22 | this : C_no_ctor [field s1] : Object | Constructors.cs:15:18:15:19 | this access : C_no_ctor [field s1] : Object | provenance | | | Constructors.cs:15:18:15:19 | this access : C_no_ctor [field s1] : Object | Constructors.cs:15:18:15:19 | access to field s1 | provenance | | -| Constructors.cs:21:24:21:25 | [post] this access : C_with_ctor [field s1] : Object | Constructors.cs:29:16:29:26 | this [Return] : C_with_ctor [field s1] : Object | provenance | | +| Constructors.cs:21:24:21:25 | [post] this access : C_with_ctor [field s1] : Object | Constructors.cs:29:16:29:26 | [post] this access : C_with_ctor [field s1] : Object | provenance | | | Constructors.cs:21:29:21:45 | call to method Source : Object | Constructors.cs:21:24:21:25 | [post] this access : C_with_ctor [field s1] : Object | provenance | | | Constructors.cs:25:25:25:25 | access to local variable c : C_with_ctor [field s1] : Object | Constructors.cs:26:13:26:13 | access to local variable c : C_with_ctor [field s1] : Object | provenance | | | Constructors.cs:25:29:25:45 | object creation of type C_with_ctor : C_with_ctor [field s1] : Object | Constructors.cs:25:25:25:25 | access to local variable c : C_with_ctor [field s1] : Object | provenance | | | Constructors.cs:26:13:26:13 | access to local variable c : C_with_ctor [field s1] : Object | Constructors.cs:31:21:31:22 | this : C_with_ctor [field s1] : Object | provenance | | +| Constructors.cs:29:16:29:26 | [post] this access : C_with_ctor [field s1] : Object | Constructors.cs:29:16:29:26 | this [Return] : C_with_ctor [field s1] : Object | provenance | | | Constructors.cs:29:16:29:26 | this [Return] : C_with_ctor [field s1] : Object | Constructors.cs:25:29:25:45 | object creation of type C_with_ctor : C_with_ctor [field s1] : Object | provenance | | | Constructors.cs:31:21:31:22 | this : C_with_ctor [field s1] : Object | Constructors.cs:33:18:33:19 | this access : C_with_ctor [field s1] : Object | provenance | | | Constructors.cs:33:18:33:19 | this access : C_with_ctor [field s1] : Object | Constructors.cs:33:18:33:19 | access to field s1 | provenance | | | Constructors.cs:41:26:41:26 | o : Object | Constructors.cs:41:38:41:38 | access to parameter o : Object | provenance | | | Constructors.cs:41:32:41:34 | [post] this access : C1 [field Obj] : Object | Constructors.cs:41:16:41:17 | this [Return] : C1 [field Obj] : Object | provenance | | | Constructors.cs:41:38:41:38 | access to parameter o : Object | Constructors.cs:41:32:41:34 | [post] this access : C1 [field Obj] : Object | provenance | | -| Constructors.cs:44:28:44:35 | o21param : Object | Constructors.cs:46:23:46:27 | this access : C2 [parameter o21param] : Object | provenance | | -| Constructors.cs:44:28:44:35 | o21param : Object | Constructors.cs:46:31:46:38 | access to parameter o21param : Object | provenance | | +| Constructors.cs:44:18:44:19 | [post] this access : C2 [field Obj21] : Object | Constructors.cs:44:18:44:19 | this [Return] : C2 [field Obj21] : Object | provenance | | +| Constructors.cs:44:18:44:19 | this access : C2 [parameter o21param] : Object | Constructors.cs:44:18:44:19 | [post] this access : C2 [field Obj21] : Object | provenance | | +| Constructors.cs:44:18:44:19 | this access : C2 [parameter o21param] : Object | Constructors.cs:46:23:46:27 | this access : C2 [parameter o21param] : Object | provenance | | +| Constructors.cs:44:28:44:35 | o21param : Object | Constructors.cs:44:18:44:19 | this access : C2 [parameter o21param] : Object | provenance | | | Constructors.cs:44:45:44:52 | o22param : Object | Constructors.cs:44:18:44:19 | this [Return] : C2 [parameter o22param] : Object | provenance | | -| Constructors.cs:46:23:46:27 | [post] this access : C2 [field Obj21] : Object | Constructors.cs:44:18:44:19 | this [Return] : C2 [field Obj21] : Object | provenance | | | Constructors.cs:46:23:46:27 | this access : C2 [parameter o21param] : Object | Constructors.cs:46:31:46:38 | access to parameter o21param : Object | provenance | | | Constructors.cs:46:31:46:38 | access to parameter o21param : Object | Constructors.cs:46:23:46:27 | [post] this access : C2 [field Obj21] : Object | provenance | | | Constructors.cs:48:32:48:39 | this : C2 [parameter o22param] : Object | Constructors.cs:48:32:48:39 | access to parameter o22param : Object | provenance | | @@ -120,6 +123,7 @@ edges | Constructors.cs:144:14:144:15 | access to local variable r1 : R1 [property Obj1] : Object | Constructors.cs:144:14:144:20 | access to property Obj1 | provenance | | | Constructors.cs:145:14:145:15 | access to local variable r1 : R1 [property Obj2] : Object | Constructors.cs:145:14:145:20 | access to property Obj2 | provenance | | nodes +| Constructors.cs:3:18:3:26 | [post] this access : C_no_ctor [field s1] : Object | semmle.label | [post] this access : C_no_ctor [field s1] : Object | | Constructors.cs:5:24:5:25 | [post] this access : C_no_ctor [field s1] : Object | semmle.label | [post] this access : C_no_ctor [field s1] : Object | | Constructors.cs:5:29:5:45 | call to method Source : Object | semmle.label | call to method Source : Object | | Constructors.cs:9:23:9:23 | access to local variable c : C_no_ctor [field s1] : Object | semmle.label | access to local variable c : C_no_ctor [field s1] : Object | @@ -133,6 +137,7 @@ nodes | Constructors.cs:25:25:25:25 | access to local variable c : C_with_ctor [field s1] : Object | semmle.label | access to local variable c : C_with_ctor [field s1] : Object | | Constructors.cs:25:29:25:45 | object creation of type C_with_ctor : C_with_ctor [field s1] : Object | semmle.label | object creation of type C_with_ctor : C_with_ctor [field s1] : Object | | Constructors.cs:26:13:26:13 | access to local variable c : C_with_ctor [field s1] : Object | semmle.label | access to local variable c : C_with_ctor [field s1] : Object | +| Constructors.cs:29:16:29:26 | [post] this access : C_with_ctor [field s1] : Object | semmle.label | [post] this access : C_with_ctor [field s1] : Object | | Constructors.cs:29:16:29:26 | this [Return] : C_with_ctor [field s1] : Object | semmle.label | this [Return] : C_with_ctor [field s1] : Object | | Constructors.cs:31:21:31:22 | this : C_with_ctor [field s1] : Object | semmle.label | this : C_with_ctor [field s1] : Object | | Constructors.cs:33:18:33:19 | access to field s1 | semmle.label | access to field s1 | @@ -141,8 +146,10 @@ nodes | Constructors.cs:41:26:41:26 | o : Object | semmle.label | o : Object | | Constructors.cs:41:32:41:34 | [post] this access : C1 [field Obj] : Object | semmle.label | [post] this access : C1 [field Obj] : Object | | Constructors.cs:41:38:41:38 | access to parameter o : Object | semmle.label | access to parameter o : Object | +| Constructors.cs:44:18:44:19 | [post] this access : C2 [field Obj21] : Object | semmle.label | [post] this access : C2 [field Obj21] : Object | | Constructors.cs:44:18:44:19 | this [Return] : C2 [field Obj21] : Object | semmle.label | this [Return] : C2 [field Obj21] : Object | | Constructors.cs:44:18:44:19 | this [Return] : C2 [parameter o22param] : Object | semmle.label | this [Return] : C2 [parameter o22param] : Object | +| Constructors.cs:44:18:44:19 | this access : C2 [parameter o21param] : Object | semmle.label | this access : C2 [parameter o21param] : Object | | Constructors.cs:44:28:44:35 | o21param : Object | semmle.label | o21param : Object | | Constructors.cs:44:45:44:52 | o22param : Object | semmle.label | o22param : Object | | Constructors.cs:46:23:46:27 | [post] this access : C2 [field Obj21] : Object | semmle.label | [post] this access : C2 [field Obj21] : Object | @@ -249,6 +256,7 @@ nodes | Constructors.cs:145:14:145:15 | access to local variable r1 : R1 [property Obj2] : Object | semmle.label | access to local variable r1 : R1 [property Obj2] : Object | | Constructors.cs:145:14:145:20 | access to property Obj2 | semmle.label | access to property Obj2 | subpaths +| Constructors.cs:44:18:44:19 | this access : C2 [parameter o21param] : Object | Constructors.cs:46:23:46:27 | this access : C2 [parameter o21param] : Object | Constructors.cs:46:23:46:27 | [post] this access : C2 [field Obj21] : Object | Constructors.cs:44:18:44:19 | [post] this access : C2 [field Obj21] : Object | | Constructors.cs:64:37:64:37 | access to parameter o : Object | Constructors.cs:57:54:57:55 | o2 : Object | Constructors.cs:59:13:59:14 | access to parameter o1 : Object | Constructors.cs:64:27:64:34 | access to parameter o22param : Object | | Constructors.cs:71:25:71:25 | access to local variable o : Object | Constructors.cs:41:26:41:26 | o : Object | Constructors.cs:41:16:41:17 | this [Return] : C1 [field Obj] : Object | Constructors.cs:71:18:71:26 | object creation of type C1 : C1 [field Obj] : Object | | Constructors.cs:79:25:79:27 | access to local variable o21 : Object | Constructors.cs:44:28:44:35 | o21param : Object | Constructors.cs:44:18:44:19 | this [Return] : C2 [field Obj21] : Object | Constructors.cs:79:18:79:33 | object creation of type C2 : C2 [field Obj21] : Object | diff --git a/csharp/ql/test/library-tests/dataflow/fields/FieldFlow.expected b/csharp/ql/test/library-tests/dataflow/fields/FieldFlow.expected index ff9e6ab405e..4e469e11887 100644 --- a/csharp/ql/test/library-tests/dataflow/fields/FieldFlow.expected +++ b/csharp/ql/test/library-tests/dataflow/fields/FieldFlow.expected @@ -332,18 +332,18 @@ edges | B.cs:41:25:41:26 | access to parameter b1 : Box1 [field elem1] : Elem | B.cs:41:13:41:16 | [post] this access : Box2 [field box1, field elem1] : Elem | provenance | | | B.cs:41:25:41:26 | access to parameter b1 : Box1 [field elem2] : Elem | B.cs:41:13:41:16 | [post] this access : Box2 [field box1, field elem2] : Elem | provenance | | | B.cs:41:25:41:26 | access to parameter b1 : Box1 [field elem2] : Elem | B.cs:41:13:41:16 | [post] this access : Box2 [field box1, field elem2] : Elem | provenance | | -| C.cs:3:18:3:19 | [post] this access : C [field s1] : Elem | C.cs:16:13:16:13 | this [Return] : C [field s1] : Elem | provenance | | -| C.cs:3:18:3:19 | [post] this access : C [field s1] : Elem | C.cs:16:13:16:13 | this [Return] : C [field s1] : Elem | provenance | | +| C.cs:3:18:3:19 | [post] this access : C [field s1] : Elem | C.cs:16:13:16:13 | [post] this access : C [field s1] : Elem | provenance | | +| C.cs:3:18:3:19 | [post] this access : C [field s1] : Elem | C.cs:16:13:16:13 | [post] this access : C [field s1] : Elem | provenance | | | C.cs:3:23:3:37 | call to method Source : Elem | C.cs:3:18:3:19 | [post] this access : C [field s1] : Elem | provenance | | | C.cs:3:23:3:37 | call to method Source : Elem | C.cs:3:18:3:19 | [post] this access : C [field s1] : Elem | provenance | | -| C.cs:4:27:4:28 | [post] this access : C [field s2] : Elem | C.cs:16:13:16:13 | this [Return] : C [field s2] : Elem | provenance | | -| C.cs:4:27:4:28 | [post] this access : C [field s2] : Elem | C.cs:16:13:16:13 | this [Return] : C [field s2] : Elem | provenance | | +| C.cs:4:27:4:28 | [post] this access : C [field s2] : Elem | C.cs:16:13:16:13 | [post] this access : C [field s2] : Elem | provenance | | +| C.cs:4:27:4:28 | [post] this access : C [field s2] : Elem | C.cs:16:13:16:13 | [post] this access : C [field s2] : Elem | provenance | | | C.cs:4:32:4:46 | call to method Source : Elem | C.cs:4:27:4:28 | [post] this access : C [field s2] : Elem | provenance | | | C.cs:4:32:4:46 | call to method Source : Elem | C.cs:4:27:4:28 | [post] this access : C [field s2] : Elem | provenance | | | C.cs:6:30:6:44 | call to method Source : Elem | C.cs:26:14:26:15 | access to field s4 | provenance | | | C.cs:6:30:6:44 | call to method Source : Elem | C.cs:26:14:26:15 | access to field s4 | provenance | | -| C.cs:7:18:7:19 | [post] this access : C [property s5] : Elem | C.cs:16:13:16:13 | this [Return] : C [property s5] : Elem | provenance | | -| C.cs:7:18:7:19 | [post] this access : C [property s5] : Elem | C.cs:16:13:16:13 | this [Return] : C [property s5] : Elem | provenance | | +| C.cs:7:18:7:19 | [post] this access : C [property s5] : Elem | C.cs:16:13:16:13 | [post] this access : C [property s5] : Elem | provenance | | +| C.cs:7:18:7:19 | [post] this access : C [property s5] : Elem | C.cs:16:13:16:13 | [post] this access : C [property s5] : Elem | provenance | | | C.cs:7:37:7:51 | call to method Source : Elem | C.cs:7:18:7:19 | [post] this access : C [property s5] : Elem | provenance | | | C.cs:7:37:7:51 | call to method Source : Elem | C.cs:7:18:7:19 | [post] this access : C [property s5] : Elem | provenance | | | C.cs:8:30:8:44 | call to method Source : Elem | C.cs:28:14:28:15 | access to property s6 | provenance | | @@ -372,6 +372,12 @@ edges | C.cs:13:9:13:9 | access to local variable c : C [field s3] : Elem | C.cs:21:17:21:18 | this : C [field s3] : Elem | provenance | | | C.cs:13:9:13:9 | access to local variable c : C [property s5] : Elem | C.cs:21:17:21:18 | this : C [property s5] : Elem | provenance | | | C.cs:13:9:13:9 | access to local variable c : C [property s5] : Elem | C.cs:21:17:21:18 | this : C [property s5] : Elem | provenance | | +| C.cs:16:13:16:13 | [post] this access : C [field s1] : Elem | C.cs:16:13:16:13 | this [Return] : C [field s1] : Elem | provenance | | +| C.cs:16:13:16:13 | [post] this access : C [field s1] : Elem | C.cs:16:13:16:13 | this [Return] : C [field s1] : Elem | provenance | | +| C.cs:16:13:16:13 | [post] this access : C [field s2] : Elem | C.cs:16:13:16:13 | this [Return] : C [field s2] : Elem | provenance | | +| C.cs:16:13:16:13 | [post] this access : C [field s2] : Elem | C.cs:16:13:16:13 | this [Return] : C [field s2] : Elem | provenance | | +| C.cs:16:13:16:13 | [post] this access : C [property s5] : Elem | C.cs:16:13:16:13 | this [Return] : C [property s5] : Elem | provenance | | +| C.cs:16:13:16:13 | [post] this access : C [property s5] : Elem | C.cs:16:13:16:13 | this [Return] : C [property s5] : Elem | provenance | | | C.cs:16:13:16:13 | this [Return] : C [field s1] : Elem | C.cs:12:15:12:21 | object creation of type C : C [field s1] : Elem | provenance | | | C.cs:16:13:16:13 | this [Return] : C [field s1] : Elem | C.cs:12:15:12:21 | object creation of type C : C [field s1] : Elem | provenance | | | C.cs:16:13:16:13 | this [Return] : C [field s2] : Elem | C.cs:12:15:12:21 | object creation of type C : C [field s2] : Elem | provenance | | @@ -1627,6 +1633,12 @@ nodes | C.cs:13:9:13:9 | access to local variable c : C [field s3] : Elem | semmle.label | access to local variable c : C [field s3] : Elem | | C.cs:13:9:13:9 | access to local variable c : C [property s5] : Elem | semmle.label | access to local variable c : C [property s5] : Elem | | C.cs:13:9:13:9 | access to local variable c : C [property s5] : Elem | semmle.label | access to local variable c : C [property s5] : Elem | +| C.cs:16:13:16:13 | [post] this access : C [field s1] : Elem | semmle.label | [post] this access : C [field s1] : Elem | +| C.cs:16:13:16:13 | [post] this access : C [field s1] : Elem | semmle.label | [post] this access : C [field s1] : Elem | +| C.cs:16:13:16:13 | [post] this access : C [field s2] : Elem | semmle.label | [post] this access : C [field s2] : Elem | +| C.cs:16:13:16:13 | [post] this access : C [field s2] : Elem | semmle.label | [post] this access : C [field s2] : Elem | +| C.cs:16:13:16:13 | [post] this access : C [property s5] : Elem | semmle.label | [post] this access : C [property s5] : Elem | +| C.cs:16:13:16:13 | [post] this access : C [property s5] : Elem | semmle.label | [post] this access : C [property s5] : Elem | | C.cs:16:13:16:13 | this [Return] : C [field s1] : Elem | semmle.label | this [Return] : C [field s1] : Elem | | C.cs:16:13:16:13 | this [Return] : C [field s1] : Elem | semmle.label | this [Return] : C [field s1] : Elem | | C.cs:16:13:16:13 | this [Return] : C [field s2] : Elem | semmle.label | this [Return] : C [field s2] : Elem | diff --git a/csharp/ql/test/library-tests/dataflow/implicittostring/PrintAst.expected b/csharp/ql/test/library-tests/dataflow/implicittostring/PrintAst.expected index cd7658f6f5e..3500820e250 100644 --- a/csharp/ql/test/library-tests/dataflow/implicittostring/PrintAst.expected +++ b/csharp/ql/test/library-tests/dataflow/implicittostring/PrintAst.expected @@ -1,19 +1,19 @@ implicitToString.cs: # 3| [Class] TestClass -# 5| 5: [Class] MyClass -# 5| 4: [InstanceConstructor,PrimaryConstructor] MyClass -# 7| 5: [Method] ToString +# 5| 6: [Class] MyClass +# 5| 5: [InstanceConstructor,PrimaryConstructor] MyClass +# 7| 6: [Method] ToString # 7| -1: [TypeMention] string # 8| 4: [BlockStmt] {...} # 9| 0: [ReturnStmt] return ...; # 9| 0: [StringLiteralUtf16] "tainted" -# 13| 6: [Method] Sink +# 13| 7: [Method] Sink # 13| -1: [TypeMention] Void #-----| 2: (Parameters) # 13| 0: [Parameter] o # 13| -1: [TypeMention] object # 13| 4: [BlockStmt] {...} -# 15| 7: [Method] M1 +# 15| 8: [Method] M1 # 15| -1: [TypeMention] Void # 16| 4: [BlockStmt] {...} # 17| 0: [LocalVariableDeclStmt] ... ...; @@ -33,7 +33,7 @@ implicitToString.cs: # 19| 2: [ExprStmt] ...; # 19| 0: [MethodCall] call to method Sink # 19| 0: [LocalVariableAccess] access to local variable x2 -# 22| 8: [Method] M2 +# 22| 9: [Method] M2 # 22| -1: [TypeMention] Void # 23| 4: [BlockStmt] {...} # 24| 0: [LocalVariableDeclStmt] ... ...; @@ -53,7 +53,7 @@ implicitToString.cs: # 26| 2: [ExprStmt] ...; # 26| 0: [MethodCall] call to method Sink # 26| 0: [LocalVariableAccess] access to local variable x2 -# 29| 9: [Method] M3 +# 29| 10: [Method] M3 # 29| -1: [TypeMention] Void # 30| 4: [BlockStmt] {...} # 31| 0: [LocalVariableDeclStmt] ... ...; @@ -74,7 +74,7 @@ implicitToString.cs: # 33| 2: [ExprStmt] ...; # 33| 0: [MethodCall] call to method Sink # 33| 0: [LocalVariableAccess] access to local variable x2 -# 36| 10: [Method] M4 +# 36| 11: [Method] M4 # 36| -1: [TypeMention] Void # 37| 4: [BlockStmt] {...} # 38| 0: [LocalVariableDeclStmt] ... ...; diff --git a/csharp/ql/test/library-tests/dataflow/local/DataFlowStep.expected b/csharp/ql/test/library-tests/dataflow/local/DataFlowStep.expected index 6bf236135a2..16e0aa842c5 100644 --- a/csharp/ql/test/library-tests/dataflow/local/DataFlowStep.expected +++ b/csharp/ql/test/library-tests/dataflow/local/DataFlowStep.expected @@ -1,3 +1,4 @@ +| Capture.cs:3:14:3:20 | this | Capture.cs:3:14:3:20 | this access | | Capture.cs:5:17:5:17 | this | Capture.cs:13:9:13:14 | this access | | Capture.cs:7:17:7:17 | 0 | Capture.cs:7:13:7:13 | access to local variable i | | Capture.cs:13:9:13:14 | this access | Capture.cs:23:9:23:14 | this access | @@ -10,6 +11,11 @@ | Capture.cs:51:9:51:15 | this access | Capture.cs:63:9:63:15 | this access | | Capture.cs:58:21:58:21 | 1 | Capture.cs:58:17:58:17 | access to local variable i | | Capture.cs:61:17:61:17 | 1 | Capture.cs:61:13:61:13 | access to local variable i | +| LocalDataFlow.cs:13:25:13:35 | this | LocalDataFlow.cs:13:25:13:35 | this access | +| LocalDataFlow.cs:29:18:29:24 | this | LocalDataFlow.cs:29:18:29:24 | this access | +| LocalDataFlow.cs:37:25:37:45 | this | LocalDataFlow.cs:37:25:37:45 | this access | +| LocalDataFlow.cs:38:25:38:43 | this | LocalDataFlow.cs:38:25:38:43 | this access | +| LocalDataFlow.cs:46:14:46:26 | this | LocalDataFlow.cs:46:14:46:26 | this access | | LocalDataFlow.cs:48:24:48:24 | SSA param(b) | LocalDataFlow.cs:84:21:84:21 | access to parameter b | | LocalDataFlow.cs:48:24:48:24 | b | LocalDataFlow.cs:48:24:48:24 | SSA param(b) | | LocalDataFlow.cs:51:13:51:17 | access to local variable sink0 | LocalDataFlow.cs:51:13:51:34 | SSA def(sink0) | @@ -482,6 +488,7 @@ | LocalDataFlow.cs:314:22:314:26 | access to local variable sink0 | LocalDataFlow.cs:314:22:314:38 | ... ?? ... | | LocalDataFlow.cs:314:22:314:38 | ... ?? ... | LocalDataFlow.cs:314:13:314:18 | access to local variable sink74 | | LocalDataFlow.cs:314:31:314:38 | access to local variable nonSink0 | LocalDataFlow.cs:314:22:314:38 | ... ?? ... | +| LocalDataFlow.cs:328:18:328:29 | this | LocalDataFlow.cs:328:18:328:29 | this access | | LocalDataFlow.cs:334:28:334:30 | SSA entry def(this.anInt) | LocalDataFlow.cs:334:41:334:45 | access to field anInt | | LocalDataFlow.cs:334:28:334:30 | this | LocalDataFlow.cs:334:41:334:45 | this access | | LocalDataFlow.cs:334:50:334:52 | SSA param(value) | LocalDataFlow.cs:334:64:334:68 | access to parameter value | @@ -519,6 +526,7 @@ | LocalDataFlow.cs:381:13:381:13 | access to local variable x | LocalDataFlow.cs:381:13:381:29 | SSA def(x) | | LocalDataFlow.cs:381:13:381:29 | SSA def(x) | LocalDataFlow.cs:382:15:382:15 | access to local variable x | | LocalDataFlow.cs:381:17:381:29 | "not tainted" | LocalDataFlow.cs:381:13:381:13 | access to local variable x | +| SSA.cs:3:14:3:16 | this | SSA.cs:3:14:3:16 | this access | | SSA.cs:5:17:5:17 | SSA entry def(this.S) | SSA.cs:67:9:67:14 | access to field S | | SSA.cs:5:17:5:17 | this | SSA.cs:67:9:67:12 | this access | | SSA.cs:5:26:5:32 | SSA param(tainted) | SSA.cs:8:24:8:30 | access to parameter tainted | @@ -917,6 +925,7 @@ | SSA.cs:176:21:176:28 | access to local variable ssaSink5 | SSA.cs:177:21:177:28 | access to local variable ssaSink5 | | SSA.cs:177:21:177:28 | [post] access to local variable ssaSink5 | SSA.cs:174:20:174:20 | SSA phi read(ssaSink5) | | SSA.cs:177:21:177:28 | access to local variable ssaSink5 | SSA.cs:174:20:174:20 | SSA phi read(ssaSink5) | +| Splitting.cs:1:7:1:15 | this | Splitting.cs:1:7:1:15 | this access | | Splitting.cs:3:18:3:18 | SSA param(b) | Splitting.cs:6:13:6:13 | access to parameter b | | Splitting.cs:3:18:3:18 | b | Splitting.cs:3:18:3:18 | SSA param(b) | | Splitting.cs:3:28:3:34 | SSA param(tainted) | Splitting.cs:5:17:5:23 | access to parameter tainted | @@ -1001,6 +1010,7 @@ | Splitting.cs:57:17:57:17 | access to local variable y | Splitting.cs:58:27:58:27 | access to local variable y | | Splitting.cs:58:22:58:22 | SSA def(s) | Splitting.cs:59:19:59:19 | access to local variable s | | Splitting.cs:58:22:58:22 | String s | Splitting.cs:58:22:58:22 | SSA def(s) | +| UseUseExplosion.cs:1:7:1:7 | this | UseUseExplosion.cs:1:7:1:7 | this access | | UseUseExplosion.cs:21:10:21:10 | SSA entry def(this.Prop) | UseUseExplosion.cs:24:13:24:16 | access to property Prop | | UseUseExplosion.cs:21:10:21:10 | this | UseUseExplosion.cs:24:13:24:16 | this access | | UseUseExplosion.cs:23:13:23:13 | access to local variable x | UseUseExplosion.cs:23:13:23:17 | SSA def(x) | diff --git a/csharp/ql/test/library-tests/dataflow/local/TaintTrackingStep.expected b/csharp/ql/test/library-tests/dataflow/local/TaintTrackingStep.expected index 1e9e48f5456..2dc753a1889 100644 --- a/csharp/ql/test/library-tests/dataflow/local/TaintTrackingStep.expected +++ b/csharp/ql/test/library-tests/dataflow/local/TaintTrackingStep.expected @@ -1,3 +1,4 @@ +| Capture.cs:3:14:3:20 | this | Capture.cs:3:14:3:20 | this access | | Capture.cs:5:17:5:17 | this | Capture.cs:13:9:13:14 | this access | | Capture.cs:7:17:7:17 | 0 | Capture.cs:7:13:7:13 | access to local variable i | | Capture.cs:13:9:13:14 | this access | Capture.cs:23:9:23:14 | this access | @@ -10,6 +11,11 @@ | Capture.cs:51:9:51:15 | this access | Capture.cs:63:9:63:15 | this access | | Capture.cs:58:21:58:21 | 1 | Capture.cs:58:17:58:17 | access to local variable i | | Capture.cs:61:17:61:17 | 1 | Capture.cs:61:13:61:13 | access to local variable i | +| LocalDataFlow.cs:13:25:13:35 | this | LocalDataFlow.cs:13:25:13:35 | this access | +| LocalDataFlow.cs:29:18:29:24 | this | LocalDataFlow.cs:29:18:29:24 | this access | +| LocalDataFlow.cs:37:25:37:45 | this | LocalDataFlow.cs:37:25:37:45 | this access | +| LocalDataFlow.cs:38:25:38:43 | this | LocalDataFlow.cs:38:25:38:43 | this access | +| LocalDataFlow.cs:46:14:46:26 | this | LocalDataFlow.cs:46:14:46:26 | this access | | LocalDataFlow.cs:48:24:48:24 | SSA param(b) | LocalDataFlow.cs:84:21:84:21 | access to parameter b | | LocalDataFlow.cs:48:24:48:24 | b | LocalDataFlow.cs:48:24:48:24 | SSA param(b) | | LocalDataFlow.cs:51:13:51:17 | access to local variable sink0 | LocalDataFlow.cs:51:13:51:34 | SSA def(sink0) | @@ -593,6 +599,7 @@ | LocalDataFlow.cs:314:22:314:26 | access to local variable sink0 | LocalDataFlow.cs:314:22:314:38 | ... ?? ... | | LocalDataFlow.cs:314:22:314:38 | ... ?? ... | LocalDataFlow.cs:314:13:314:18 | access to local variable sink74 | | LocalDataFlow.cs:314:31:314:38 | access to local variable nonSink0 | LocalDataFlow.cs:314:22:314:38 | ... ?? ... | +| LocalDataFlow.cs:328:18:328:29 | this | LocalDataFlow.cs:328:18:328:29 | this access | | LocalDataFlow.cs:334:28:334:30 | SSA entry def(this.anInt) | LocalDataFlow.cs:334:41:334:45 | access to field anInt | | LocalDataFlow.cs:334:28:334:30 | this | LocalDataFlow.cs:334:41:334:45 | this access | | LocalDataFlow.cs:334:50:334:52 | SSA param(value) | LocalDataFlow.cs:334:64:334:68 | access to parameter value | @@ -631,6 +638,7 @@ | LocalDataFlow.cs:381:13:381:13 | access to local variable x | LocalDataFlow.cs:381:13:381:29 | SSA def(x) | | LocalDataFlow.cs:381:13:381:29 | SSA def(x) | LocalDataFlow.cs:382:15:382:15 | access to local variable x | | LocalDataFlow.cs:381:17:381:29 | "not tainted" | LocalDataFlow.cs:381:13:381:13 | access to local variable x | +| SSA.cs:3:14:3:16 | this | SSA.cs:3:14:3:16 | this access | | SSA.cs:5:17:5:17 | SSA entry def(this.S) | SSA.cs:67:9:67:14 | access to field S | | SSA.cs:5:17:5:17 | this | SSA.cs:67:9:67:12 | this access | | SSA.cs:5:26:5:32 | SSA param(tainted) | SSA.cs:8:24:8:30 | access to parameter tainted | @@ -1047,6 +1055,7 @@ | SSA.cs:176:21:176:28 | access to local variable ssaSink5 | SSA.cs:177:21:177:28 | access to local variable ssaSink5 | | SSA.cs:177:21:177:28 | [post] access to local variable ssaSink5 | SSA.cs:174:20:174:20 | SSA phi read(ssaSink5) | | SSA.cs:177:21:177:28 | access to local variable ssaSink5 | SSA.cs:174:20:174:20 | SSA phi read(ssaSink5) | +| Splitting.cs:1:7:1:15 | this | Splitting.cs:1:7:1:15 | this access | | Splitting.cs:3:18:3:18 | SSA param(b) | Splitting.cs:6:13:6:13 | access to parameter b | | Splitting.cs:3:18:3:18 | b | Splitting.cs:3:18:3:18 | SSA param(b) | | Splitting.cs:3:28:3:34 | SSA param(tainted) | Splitting.cs:5:17:5:23 | access to parameter tainted | @@ -1143,6 +1152,7 @@ | Splitting.cs:58:22:58:22 | SSA def(s) | Splitting.cs:59:19:59:19 | access to local variable s | | Splitting.cs:58:22:58:22 | String s | Splitting.cs:58:22:58:22 | SSA def(s) | | Splitting.cs:58:27:58:27 | access to local variable y | Splitting.cs:58:22:58:22 | SSA def(s) | +| UseUseExplosion.cs:1:7:1:7 | this | UseUseExplosion.cs:1:7:1:7 | this access | | UseUseExplosion.cs:21:10:21:10 | SSA entry def(this.Prop) | UseUseExplosion.cs:24:13:24:16 | access to property Prop | | UseUseExplosion.cs:21:10:21:10 | this | UseUseExplosion.cs:24:13:24:16 | this access | | UseUseExplosion.cs:23:13:23:13 | access to local variable x | UseUseExplosion.cs:23:13:23:17 | SSA def(x) | diff --git a/csharp/ql/test/library-tests/dataflow/tuples/DataFlowStep.expected b/csharp/ql/test/library-tests/dataflow/tuples/DataFlowStep.expected index 73b0a757b5a..583bae92d93 100644 --- a/csharp/ql/test/library-tests/dataflow/tuples/DataFlowStep.expected +++ b/csharp/ql/test/library-tests/dataflow/tuples/DataFlowStep.expected @@ -1,3 +1,4 @@ +| Tuples.cs:3:7:3:12 | this | Tuples.cs:3:7:3:12 | this access | | Tuples.cs:7:13:7:14 | access to local variable o1 | Tuples.cs:7:13:7:34 | SSA def(o1) | | Tuples.cs:7:13:7:34 | SSA def(o1) | Tuples.cs:10:21:10:22 | access to local variable o1 | | Tuples.cs:7:18:7:34 | call to method Source | Tuples.cs:7:13:7:14 | access to local variable o1 | @@ -168,9 +169,12 @@ | Tuples.cs:87:30:87:30 | SSA def(r) | Tuples.cs:90:18:90:18 | access to local variable r | | Tuples.cs:87:30:87:30 | String r | Tuples.cs:87:30:87:30 | SSA def(r) | | Tuples.cs:91:18:91:18 | access to local variable q | Tuples.cs:91:18:91:18 | (...) ... | +| Tuples.cs:95:12:95:13 | this | Tuples.cs:95:12:95:13 | this access | | Tuples.cs:95:12:95:13 | this | Tuples.cs:95:22:95:22 | this | | Tuples.cs:95:22:95:22 | [post] this | Tuples.cs:95:29:95:29 | this | | Tuples.cs:95:22:95:22 | this | Tuples.cs:95:29:95:29 | this | +| Tuples.cs:95:29:95:29 | [post] this | Tuples.cs:95:12:95:13 | this access | +| Tuples.cs:95:29:95:29 | this | Tuples.cs:95:12:95:13 | this access | | Tuples.cs:99:13:99:13 | access to local variable o | Tuples.cs:99:13:99:33 | SSA def(o) | | Tuples.cs:99:13:99:33 | SSA def(o) | Tuples.cs:100:24:100:24 | access to local variable o | | Tuples.cs:99:17:99:33 | call to method Source | Tuples.cs:99:13:99:13 | access to local variable o | @@ -225,3 +229,4 @@ | Tuples.cs:133:24:133:29 | (..., ...) | Tuples.cs:133:9:133:20 | (..., ...) | | Tuples.cs:133:25:133:25 | 1 | Tuples.cs:133:9:133:29 | ... = ... | | Tuples.cs:133:28:133:28 | access to local variable o | Tuples.cs:133:18:133:19 | access to local variable y4 | +| Tuples.cs:144:18:144:31 | this | Tuples.cs:144:18:144:31 | this access | diff --git a/csharp/ql/test/library-tests/dataflow/tuples/PrintAst.expected b/csharp/ql/test/library-tests/dataflow/tuples/PrintAst.expected index 7cbddb9d3d5..11e14eeb6c5 100644 --- a/csharp/ql/test/library-tests/dataflow/tuples/PrintAst.expected +++ b/csharp/ql/test/library-tests/dataflow/tuples/PrintAst.expected @@ -1,6 +1,6 @@ Tuples.cs: # 3| [Class] Tuples -# 5| 5: [Method] M1 +# 5| 6: [Method] M1 # 5| -1: [TypeMention] Void # 6| 4: [BlockStmt] {...} # 7| 0: [LocalVariableDeclStmt] ... ...; @@ -99,7 +99,7 @@ Tuples.cs: # 29| 0: [FieldAccess] access to field Item2 # 29| -1: [FieldAccess] access to field Item2 # 29| -1: [LocalVariableAccess] access to local variable x -# 32| 6: [Method] M2 +# 32| 7: [Method] M2 # 32| -1: [TypeMention] Void # 33| 4: [BlockStmt] {...} # 34| 0: [LocalVariableDeclStmt] ... ...; @@ -144,7 +144,7 @@ Tuples.cs: # 40| 0: [MethodCall] call to method Sink # 40| 0: [FieldAccess] access to field Item10 # 40| -1: [LocalVariableAccess] access to local variable x -# 43| 7: [Method] M3 +# 43| 8: [Method] M3 # 43| -1: [TypeMention] Void # 44| 4: [BlockStmt] {...} # 45| 0: [LocalVariableDeclStmt] ... ...; @@ -201,7 +201,7 @@ Tuples.cs: # 52| 0: [CastExpr] (...) ... # 52| 1: [FieldAccess] access to field Item2 # 52| -1: [LocalVariableAccess] access to local variable y -# 55| 8: [Method] M4 +# 55| 9: [Method] M4 # 55| -1: [TypeMention] Void #-----| 2: (Parameters) # 55| 0: [Parameter] s @@ -352,34 +352,34 @@ Tuples.cs: # 91| 0: [MethodCall] call to method Sink # 91| 0: [CastExpr] (...) ... # 91| 1: [LocalVariableAccess] access to local variable q -# 95| 9: [RecordClass] R1 -# 95| 12: [NEOperator] != +# 95| 10: [RecordClass] R1 +# 95| 13: [NEOperator] != #-----| 2: (Parameters) # 95| 0: [Parameter] left # 95| 1: [Parameter] right -# 95| 13: [EQOperator] == +# 95| 14: [EQOperator] == #-----| 2: (Parameters) # 95| 0: [Parameter] left # 95| 1: [Parameter] right -# 95| 14: [Property] EqualityContract +# 95| 15: [Property] EqualityContract # 95| 3: [Getter] get_EqualityContract -# 95| 15: [InstanceConstructor,PrimaryConstructor] R1 +# 95| 16: [InstanceConstructor,PrimaryConstructor] R1 #-----| 2: (Parameters) # 95| 0: [Parameter] i # 95| -1: [TypeMention] string # 95| 1: [Parameter] j # 95| -1: [TypeMention] int -# 95| 16: [Property] i +# 95| 17: [Property] i # 95| 3: [Getter] get_i # 95| 4: [Setter] set_i #-----| 2: (Parameters) # 95| 0: [Parameter] value -# 95| 17: [Property] j +# 95| 18: [Property] j # 95| 3: [Getter] get_j # 95| 4: [Setter] set_j #-----| 2: (Parameters) # 95| 0: [Parameter] value -# 97| 10: [Method] M5 +# 97| 11: [Method] M5 # 97| -1: [TypeMention] Void # 98| 4: [BlockStmt] {...} # 99| 0: [LocalVariableDeclStmt] ... ...; @@ -428,7 +428,7 @@ Tuples.cs: # 111| 0: [CastExpr] (...) ... # 111| 1: [LocalVariableAccess] access to local variable y # 112| 3: [BreakStmt] break; -# 116| 11: [Method] M6 +# 116| 12: [Method] M6 # 116| -1: [TypeMention] Void # 117| 4: [BlockStmt] {...} # 118| 0: [LocalVariableDeclStmt] ... ...; @@ -504,13 +504,13 @@ Tuples.cs: # 134| 12: [ExprStmt] ...; # 134| 0: [MethodCall] call to method Sink # 134| 0: [LocalVariableAccess] access to local variable y4 -# 137| 12: [Method] Sink +# 137| 13: [Method] Sink # 137| -1: [TypeMention] Void #-----| 2: (Parameters) # 137| 0: [Parameter] o # 137| -1: [TypeMention] object # 137| 4: [BlockStmt] {...} -# 139| 15: [Method] Source`1 +# 139| 16: [Method] Source`1 # 139| -1: [TypeMention] T #-----| 1: (Type parameters) # 139| 0: [TypeParameter] T diff --git a/csharp/ql/test/library-tests/definitions/PrintAst.expected b/csharp/ql/test/library-tests/definitions/PrintAst.expected index 9b5606d30f5..28196c75a85 100644 --- a/csharp/ql/test/library-tests/definitions/PrintAst.expected +++ b/csharp/ql/test/library-tests/definitions/PrintAst.expected @@ -17,15 +17,15 @@ definitions.cs: # 15| 1: [IntLiteral] 2 # 15| 7: [Field] e3 # 18| 3: [Class] C1 -# 20| 4: [InstanceConstructor] C1 +# 20| 5: [InstanceConstructor] C1 #-----| 2: (Parameters) # 20| 0: [Parameter] args # 20| -1: [TypeMention] Int32[] # 20| 1: [TypeMention] int # 20| 4: [BlockStmt] {...} -# 22| 5: [Field] field1 +# 22| 6: [Field] field1 # 22| -1: [TypeMention] int -# 24| 6: [Property] property1 +# 24| 7: [Property] property1 # 24| -1: [TypeMention] int # 26| 3: [Getter] get_property1 # 26| 4: [BlockStmt] {...} @@ -39,7 +39,7 @@ definitions.cs: # 27| 0: [AssignExpr] ... = ... # 27| 0: [FieldAccess] access to field field1 # 27| 1: [ParameterAccess] access to parameter value -# 30| 7: [Method] f1 +# 30| 8: [Method] f1 # 30| -1: [TypeMention] Void #-----| 2: (Parameters) # 30| 0: [Parameter] args @@ -157,7 +157,7 @@ definitions.cs: # 67| 0: [LocalVariableAccess] access to local variable m1 # 67| 1: [ImplicitDelegateCreation] delegate creation of type Action # 67| 0: [MethodAccess] access to method GenericFn -# 70| 8: [Method] VariableTypeUse +# 70| 9: [Method] VariableTypeUse # 70| -1: [TypeMention] Void #-----| 2: (Parameters) # 70| 0: [Parameter] c1 @@ -168,7 +168,7 @@ definitions.cs: # 72| -1: [TypeMention] C1 # 72| 0: [LocalVariableAccess] access to local variable c2 # 72| 1: [NullLiteral] null -# 75| 10: [Method] GenericFn`1 +# 75| 11: [Method] GenericFn`1 # 75| -1: [TypeMention] Void #-----| 1: (Type parameters) # 75| 0: [TypeParameter] T @@ -177,7 +177,7 @@ definitions.cs: # 75| -1: [TypeMention] T # 75| 4: [BlockStmt] {...} # 78| 4: [Struct] S1 -# 80| 5: [Method] M +# 80| 6: [Method] M # 80| -1: [TypeMention] S1 #-----| 2: (Parameters) # 80| 0: [Parameter] ss @@ -216,8 +216,8 @@ definitions.cs: # 93| 0: [ObjectCreation] object creation of type S1 # 93| 0: [TypeMention] S1 # 97| 5: [Class] A -# 99| 5: [DelegateType] EventHandler -# 101| 6: [Event] Click +# 99| 6: [DelegateType] EventHandler +# 101| 7: [Event] Click # 101| -1: [TypeMention] EventHandler # 101| 3: [AddEventAccessor] add_Click #-----| 2: (Parameters) @@ -225,7 +225,7 @@ definitions.cs: # 101| 4: [RemoveEventAccessor] remove_Click #-----| 2: (Parameters) # 101| 0: [Parameter] value -# 103| 7: [Method] M +# 103| 8: [Method] M # 103| -1: [TypeMention] Void # 104| 4: [BlockStmt] {...} # 105| 0: [ExprStmt] ...; @@ -265,24 +265,24 @@ definitions.cs: # 121| 1: [TypeMention] I1 # 121| 2: [TypeMention] I2 # 121| 1: [TypeMention] A -# 123| 5: [Method] M +# 123| 6: [Method] M # 123| -1: [TypeMention] Void # 124| 4: [BlockStmt] {...} # 125| 0: [ExprStmt] ...; # 125| 0: [MethodCall] call to method M # 125| -1: [BaseAccess] base access -# 128| 6: [Method] M2`1 +# 128| 7: [Method] M2`1 # 128| -1: [TypeMention] I1 # 128| -1: [TypeMention] Void #-----| 1: (Type parameters) # 128| 0: [TypeParameter] T # 128| 4: [BlockStmt] {...} -# 130| 7: [Struct] S`1 +# 130| 8: [Struct] S`1 #-----| 1: (Type parameters) # 130| 0: [TypeParameter] T2 #-----| 3: (Base types) # 130| 1: [TypeMention] I3 -# 132| 8: [Method] Tuple +# 132| 9: [Method] Tuple # 132| -1: [TypeMention] (I1, B) # 132| 1: [TypeMention] I1 # 132| 2: [TypeMention] B @@ -290,7 +290,7 @@ definitions.cs: # 132| 4: [ThrowExpr] throw ... # 132| 0: [ObjectCreation] object creation of type Exception # 132| 0: [TypeMention] Exception -# 134| 9: [Indexer] Item +# 134| 10: [Indexer] Item # 134| -1: [TypeMention] B # 134| 1: [TypeMention] A #-----| 1: (Parameters) @@ -306,8 +306,8 @@ definitions.cs: # 134| 0: [TypeMention] B # 134| 1: [TypeMention] A # 137| 10: [Class] C -# 139| 5: [Enum] E -# 140| 6: [Method] Pointer +# 139| 6: [Enum] E +# 140| 7: [Method] Pointer # 140| -1: [TypeMention] E* # 140| 1: [TypeMention] E # 140| 4: [ThrowExpr] throw ... @@ -345,7 +345,7 @@ definitions.cs: # 151| 12: [Class] C4 #-----| 3: (Base types) # 151| 1: [TypeMention] I4 -# 153| 5: [Event] EH +# 153| 6: [Event] EH # 153| -1: [TypeMention] I4 # 153| 3: [AddEventAccessor] add_EH #-----| 2: (Parameters) @@ -355,20 +355,20 @@ definitions.cs: #-----| 2: (Parameters) # 153| 0: [Parameter] value # 153| 4: [BlockStmt] {...} -# 154| 6: [Method] M +# 154| 7: [Method] M # 154| -1: [TypeMention] I4 # 154| -1: [TypeMention] A # 154| 4: [ThrowExpr] throw ... # 154| 0: [ObjectCreation] object creation of type Exception # 154| 0: [TypeMention] Exception -# 155| 7: [Property] P +# 155| 8: [Property] P # 155| -1: [TypeMention] I4 # 155| -1: [TypeMention] I3 # 155| 3: [Getter] get_P # 155| 4: [ThrowExpr] throw ... # 155| 0: [ObjectCreation] object creation of type Exception # 155| 0: [TypeMention] Exception -# 156| 8: [Indexer] Item +# 156| 9: [Indexer] Item # 156| -1: [TypeMention] I4 # 156| -1: [TypeMention] S1 #-----| 1: (Parameters) @@ -385,10 +385,10 @@ definitions.cs: # 156| 0: [TypeMention] S1 # 156| 1: [ObjectCreation] object creation of type S1 # 156| 0: [TypeMention] S1 -# 158| 10: [Class] Nested`1 +# 158| 11: [Class] Nested`1 #-----| 1: (Type parameters) # 158| 0: [TypeParameter] T -# 160| 5: [Method] Create +# 160| 6: [Method] Create # 160| -1: [TypeMention] Nested # 160| 1: [TypeMention] T # 160| 4: [BlockStmt] {...} @@ -397,7 +397,7 @@ definitions.cs: # 160| 0: [TypeMention] Nested # 160| 1: [TypeMention] T # 164| 13: [Class] C5 -# 166| 5: [Field] f +# 166| 6: [Field] f # 166| -1: [TypeMention] Nested # 166| 1: [TypeMention] C4 # 166| 2: [TypeMention] I4 @@ -407,9 +407,9 @@ definitions.cs: # 166| 1: [TypeMention] I4 # 166| -1: [TypeAccess] access to type C4 # 166| 0: [TypeMention] C4 -# 167| 6: [Field] c1 +# 167| 7: [Field] c1 # 167| -1: [TypeMention] C1 -# 169| 7: [Method] M +# 169| 8: [Method] M # 169| -1: [TypeMention] Void # 170| 4: [BlockStmt] {...} # 171| 0: [LocalVariableDeclStmt] ... ...; @@ -450,7 +450,7 @@ definitions.cs: # 175| 1: [TypeMention] C4 # 175| 2: [TypeMention] I4 # 179| 14: [Class] C6 -# 181| 5: [ExplicitConversionOperator] explicit conversion +# 181| 6: [ExplicitConversionOperator] explicit conversion # 181| -1: [TypeMention] C5 #-----| 2: (Parameters) # 181| 0: [Parameter] c @@ -461,14 +461,14 @@ definitions.cs: # 182| 4: [BlockStmt] {...} # 183| 0: [ReturnStmt] return ...; # 183| 0: [NullLiteral] null -# 186| 6: [Method] M +# 186| 7: [Method] M # 186| -1: [TypeMention] C5 # 187| 4: [BlockStmt] {...} # 188| 0: [ReturnStmt] return ...; # 188| 0: [OperatorCall] call to operator explicit conversion # 188| -1: [TypeMention] C5 # 188| 0: [ThisAccess] this access -# 191| 7: [AddOperator] + +# 191| 8: [AddOperator] + # 191| -1: [TypeMention] C6 #-----| 2: (Parameters) # 191| 0: [Parameter] x @@ -480,10 +480,10 @@ definitions.cs: #-----| 3: (Base types) # 194| 0: [TypeMention] Attribute # 196| 16: [Class] C7 -# 198| 5: [Method] M +# 198| 6: [Method] M # 198| -1: [TypeMention] Void # 198| 4: [BlockStmt] {...} -# 200| 6: [Method] M2 +# 200| 7: [Method] M2 # 200| -1: [TypeMention] Void # 201| 4: [BlockStmt] {...} # 202| 0: [ExprStmt] ...; @@ -491,7 +491,7 @@ definitions.cs: # 202| -1: [TypeAccess] access to type C7 # 202| 0: [TypeMention] C7 # 206| 17: [Class] C8 -# 208| 5: [Method] F +# 208| 6: [Method] F # 208| -1: [TypeMention] Void # 209| 4: [BlockStmt] {...} # 210| 0: [LocalVariableDeclStmt] ... ...; diff --git a/csharp/ql/test/library-tests/delegates/PrintAst.expected b/csharp/ql/test/library-tests/delegates/PrintAst.expected index fee97ca9daf..86a5f9c241e 100644 --- a/csharp/ql/test/library-tests/delegates/PrintAst.expected +++ b/csharp/ql/test/library-tests/delegates/PrintAst.expected @@ -16,7 +16,7 @@ delegates.cs: # 9| 1: [Parameter] d # 9| -1: [TypeMention] double # 11| 3: [Class] A -# 14| 5: [Method] M1 +# 14| 6: [Method] M1 # 14| -1: [TypeMention] int #-----| 2: (Parameters) # 14| 0: [Parameter] a @@ -33,13 +33,13 @@ delegates.cs: # 14| 1: [ParameterAccess] access to parameter a # 14| 1: [ParameterAccess] access to parameter b # 18| 4: [Class] B -# 21| 5: [DelegateType] D2 +# 21| 6: [DelegateType] D2 #-----| 2: (Parameters) # 21| 0: [Parameter] c # 21| -1: [TypeMention] int # 21| 1: [Parameter] d # 21| -1: [TypeMention] double -# 23| 6: [Method] M1 +# 23| 7: [Method] M1 # 23| -1: [TypeMention] int #-----| 2: (Parameters) # 23| 0: [Parameter] f @@ -54,7 +54,7 @@ delegates.cs: # 23| 0: [TypeAccess] access to type Int32 # 23| 0: [TypeMention] int # 23| 1: [ParameterAccess] access to parameter g -# 25| 7: [Method] M2 +# 25| 8: [Method] M2 # 25| -1: [TypeMention] Void #-----| 2: (Parameters) # 25| 0: [Parameter] k @@ -62,7 +62,7 @@ delegates.cs: # 25| 1: [Parameter] l # 25| -1: [TypeMention] double # 25| 4: [BlockStmt] {...} -# 27| 8: [Method] M3 +# 27| 9: [Method] M3 # 27| -1: [TypeMention] int #-----| 2: (Parameters) # 27| 0: [Parameter] g @@ -74,7 +74,7 @@ delegates.cs: # 27| 0: [ParameterAccess] access to parameter g # 27| 1: [UnaryPlusExpr] +... # 27| 0: [ParameterAccess] access to parameter g -# 29| 9: [Method] M4 +# 29| 10: [Method] M4 # 29| -1: [TypeMention] Void #-----| 2: (Parameters) # 29| 0: [Parameter] g @@ -87,7 +87,7 @@ delegates.cs: # 33| 0: [Parameter] value # 33| -1: [TypeMention] T # 35| 6: [Class] X -# 38| 5: [Method] F +# 38| 6: [Method] F # 38| -1: [TypeMention] bool #-----| 2: (Parameters) # 38| 0: [Parameter] i @@ -97,7 +97,7 @@ delegates.cs: # 38| 0: [LTExpr] ... < ... # 38| 0: [ParameterAccess] access to parameter i # 38| 1: [IntLiteral] 2 -# 40| 6: [Method] G +# 40| 7: [Method] G # 40| -1: [TypeMention] bool #-----| 2: (Parameters) # 40| 0: [Parameter] s @@ -110,26 +110,26 @@ delegates.cs: # 44| 0: [Parameter] x # 44| -1: [TypeMention] int # 46| 8: [Class] C -# 49| 5: [Method] M1 +# 49| 6: [Method] M1 # 49| -1: [TypeMention] Void #-----| 2: (Parameters) # 49| 0: [Parameter] i # 49| -1: [TypeMention] int # 49| 4: [BlockStmt] {...} -# 50| 6: [Method] M2 +# 50| 7: [Method] M2 # 50| -1: [TypeMention] Void #-----| 2: (Parameters) # 50| 0: [Parameter] i # 50| -1: [TypeMention] int # 50| 4: [BlockStmt] {...} -# 51| 7: [Method] M3 +# 51| 8: [Method] M3 # 51| -1: [TypeMention] Void #-----| 2: (Parameters) # 51| 0: [Parameter] i # 51| -1: [TypeMention] int # 51| 4: [BlockStmt] {...} # 55| 9: [Class] Test -# 58| 5: [Method] Main +# 58| 6: [Method] Main # 58| -1: [TypeMention] Void # 59| 4: [BlockStmt] {...} # 60| 0: [LocalVariableDeclStmt] ... ...; @@ -250,25 +250,25 @@ delegates.cs: # 81| 0: [LocalVariableDeclExpr] ContextCallback d # 81| 0: [TypeMention] ContextCallback # 86| 10: [Class] E -# 88| 5: [Field] Field +# 88| 6: [Field] Field # 88| -1: [TypeMention] Action # 88| 1: [TypeMention] int -# 89| 6: [Property] Property +# 89| 7: [Property] Property # 89| -1: [TypeMention] Action # 89| 1: [TypeMention] int # 89| 3: [Getter] get_Property # 89| 4: [Setter] set_Property #-----| 2: (Parameters) # 89| 0: [Parameter] value -# 90| 7: [Field] FieldPtr +# 90| 8: [Field] FieldPtr # 90| -1: [TypeMention] delegate* default -# 91| 8: [Property] PropertyPtr +# 91| 9: [Property] PropertyPtr # 91| -1: [TypeMention] delegate* default # 91| 3: [Getter] get_PropertyPtr # 91| 4: [Setter] set_PropertyPtr #-----| 2: (Parameters) # 91| 0: [Parameter] value -# 93| 9: [Method] M +# 93| 10: [Method] M # 93| -1: [TypeMention] Void # 94| 4: [BlockStmt] {...} # 95| 0: [ExprStmt] ...; diff --git a/csharp/ql/test/library-tests/dynamic/PrintAst.expected b/csharp/ql/test/library-tests/dynamic/PrintAst.expected index 160242e47f7..3bde4d42d86 100644 --- a/csharp/ql/test/library-tests/dynamic/PrintAst.expected +++ b/csharp/ql/test/library-tests/dynamic/PrintAst.expected @@ -1,11 +1,11 @@ dynamic.cs: # 4| [Class] DynamicTest -# 6| 4: [InstanceConstructor] DynamicTest +# 6| 5: [InstanceConstructor] DynamicTest #-----| 2: (Parameters) # 6| 0: [Parameter] x # 6| -1: [TypeMention] int # 6| 4: [BlockStmt] {...} -# 8| 5: [Method] Main +# 8| 6: [Method] Main # 8| -1: [TypeMention] Void #-----| 2: (Parameters) # 8| 0: [Parameter] args @@ -235,25 +235,25 @@ dynamic.cs: # 75| 0: [DelegateCall] delegate call # 75| -1: [LocalVariableAccess] access to local variable d # 75| 0: [IntLiteral] 42 -# 78| 6: [Method] Foo +# 78| 7: [Method] Foo # 78| -1: [TypeMention] Void #-----| 2: (Parameters) # 78| 0: [Parameter] x # 78| -1: [TypeMention] int # 78| 4: [BlockStmt] {...} -# 79| 7: [Method] Foo +# 79| 8: [Method] Foo # 79| -1: [TypeMention] Void #-----| 2: (Parameters) # 79| 0: [Parameter] x # 79| -1: [TypeMention] string # 79| 4: [BlockStmt] {...} -# 81| 8: [Method] Bar +# 81| 9: [Method] Bar # 81| -1: [TypeMention] Void #-----| 2: (Parameters) # 81| 0: [Parameter] x # 81| -1: [TypeMention] string # 81| 4: [BlockStmt] {...} -# 83| 9: [IncrementOperator] ++ +# 83| 10: [IncrementOperator] ++ # 83| -1: [TypeMention] DynamicTest #-----| 2: (Parameters) # 83| 0: [Parameter] dt @@ -261,15 +261,15 @@ dynamic.cs: # 84| 4: [BlockStmt] {...} # 85| 0: [ReturnStmt] return ...; # 85| 0: [ParameterAccess] access to parameter dt -# 88| 10: [Field] Field +# 88| 11: [Field] Field # 88| -1: [TypeMention] int -# 90| 11: [Property] Prop +# 90| 12: [Property] Prop # 90| -1: [TypeMention] int # 90| 3: [Getter] get_Prop # 90| 4: [Setter] set_Prop #-----| 2: (Parameters) # 90| 0: [Parameter] value -# 92| 12: [Indexer] Item +# 92| 13: [Indexer] Item # 92| -1: [TypeMention] int #-----| 1: (Parameters) # 92| 0: [Parameter] x diff --git a/csharp/ql/test/library-tests/enums/PrintAst.expected b/csharp/ql/test/library-tests/enums/PrintAst.expected index bb9e5a3a9c9..3495c43a493 100644 --- a/csharp/ql/test/library-tests/enums/PrintAst.expected +++ b/csharp/ql/test/library-tests/enums/PrintAst.expected @@ -31,7 +31,7 @@ enums.cs: # 40| 1: [CastExpr] (...) ... # 40| 1: [MemberConstantAccess] access to constant Red # 44| 6: [Class] Test -# 47| 5: [Method] Main +# 47| 6: [Method] Main # 47| -1: [TypeMention] Void # 48| 4: [BlockStmt] {...} # 49| 0: [ExprStmt] ...; @@ -58,7 +58,7 @@ enums.cs: # 51| 0: [MemberConstantAccess] access to constant Blue # 51| -1: [TypeAccess] access to type SparseColor # 51| 0: [TypeMention] SparseColor -# 54| 6: [Method] StringFromColor +# 54| 7: [Method] StringFromColor # 54| -1: [TypeMention] string #-----| 2: (Parameters) # 54| 0: [Parameter] c diff --git a/csharp/ql/test/library-tests/events/PrintAst.expected b/csharp/ql/test/library-tests/events/PrintAst.expected index 84825067e42..4767ea99084 100644 --- a/csharp/ql/test/library-tests/events/PrintAst.expected +++ b/csharp/ql/test/library-tests/events/PrintAst.expected @@ -7,7 +7,7 @@ events.cs: # 7| 1: [Parameter] e # 7| -1: [TypeMention] object # 9| 2: [Class] Button -# 12| 5: [Event] Click +# 12| 6: [Event] Click # 12| -1: [TypeMention] EventHandler # 12| 3: [AddEventAccessor] add_Click #-----| 2: (Parameters) @@ -15,7 +15,7 @@ events.cs: # 12| 4: [RemoveEventAccessor] remove_Click #-----| 2: (Parameters) # 12| 0: [Parameter] value -# 14| 6: [Method] OnClick +# 14| 7: [Method] OnClick # 14| -1: [TypeMention] Void #-----| 2: (Parameters) # 14| 0: [Parameter] e @@ -30,7 +30,7 @@ events.cs: # 17| -1: [EventAccess,EventCall] access to event Click # 17| 0: [ThisAccess] this access # 17| 1: [ParameterAccess] access to parameter e -# 20| 7: [Method] Reset +# 20| 8: [Method] Reset # 20| -1: [TypeMention] Void # 21| 4: [BlockStmt] {...} # 22| 0: [ExprStmt] ...; @@ -38,11 +38,11 @@ events.cs: # 22| 0: [EventAccess,EventCall] access to event Click # 22| 1: [NullLiteral] null # 26| 3: [Class] LoginDialog -# 29| 4: [Field] OkButton +# 29| 5: [Field] OkButton # 29| -1: [TypeMention] Button -# 30| 5: [Field] CancelButton +# 30| 6: [Field] CancelButton # 30| -1: [TypeMention] Button -# 32| 6: [InstanceConstructor] LoginDialog +# 32| 7: [InstanceConstructor] LoginDialog # 33| 4: [BlockStmt] {...} # 34| 0: [ExprStmt] ...; # 34| 0: [AssignExpr] ... = ... @@ -68,7 +68,7 @@ events.cs: # 37| 1: [ExplicitDelegateCreation] delegate creation of type EventHandler # 37| -1: [TypeMention] EventHandler # 37| 0: [MethodAccess] access to method CancelButtonClick -# 40| 7: [Method] OkButtonClick +# 40| 8: [Method] OkButtonClick # 40| -1: [TypeMention] Void #-----| 2: (Parameters) # 40| 0: [Parameter] sender @@ -76,7 +76,7 @@ events.cs: # 40| 1: [Parameter] e # 40| -1: [TypeMention] object # 41| 4: [BlockStmt] {...} -# 44| 8: [Method] CancelButtonClick +# 44| 9: [Method] CancelButtonClick # 44| -1: [TypeMention] Void #-----| 2: (Parameters) # 44| 0: [Parameter] sender @@ -85,15 +85,15 @@ events.cs: # 44| -1: [TypeMention] object # 45| 4: [BlockStmt] {...} # 50| 4: [Class] Control -# 53| 6: [Field] mouseDownEventKey +# 53| 7: [Field] mouseDownEventKey # 53| -1: [TypeMention] object # 53| 1: [ObjectCreation] object creation of type Object # 53| 0: [TypeMention] object -# 54| 7: [Field] mouseUpEventKey +# 54| 8: [Field] mouseUpEventKey # 54| -1: [TypeMention] object # 54| 1: [ObjectCreation] object creation of type Object # 54| 0: [TypeMention] object -# 57| 8: [Method] GetEventHandler +# 57| 9: [Method] GetEventHandler # 57| -1: [TypeMention] Delegate #-----| 2: (Parameters) # 57| 0: [Parameter] key @@ -101,7 +101,7 @@ events.cs: # 57| 4: [BlockStmt] {...} # 57| 0: [ReturnStmt] return ...; # 57| 0: [NullLiteral] null -# 60| 9: [Method] AddEventHandler +# 60| 10: [Method] AddEventHandler # 60| -1: [TypeMention] Void #-----| 2: (Parameters) # 60| 0: [Parameter] key @@ -109,7 +109,7 @@ events.cs: # 60| 1: [Parameter] handler # 60| -1: [TypeMention] Delegate # 60| 4: [BlockStmt] {...} -# 63| 10: [Method] RemoveEventHandler +# 63| 11: [Method] RemoveEventHandler # 63| -1: [TypeMention] Void #-----| 2: (Parameters) # 63| 0: [Parameter] key @@ -117,7 +117,7 @@ events.cs: # 63| 1: [Parameter] handler # 63| -1: [TypeMention] Delegate # 63| 4: [BlockStmt] {...} -# 66| 11: [Event] MouseDown +# 66| 12: [Event] MouseDown # 68| 3: [AddEventAccessor] add_MouseDown #-----| 2: (Parameters) # 68| 0: [Parameter] value @@ -134,7 +134,7 @@ events.cs: # 69| 0: [MethodCall] call to method RemoveEventHandler # 69| 0: [FieldAccess] access to field mouseDownEventKey # 69| 1: [ParameterAccess] access to parameter value -# 73| 12: [Event] MouseUp +# 73| 13: [Event] MouseUp # 75| 3: [AddEventAccessor] add_MouseUp #-----| 2: (Parameters) # 75| 0: [Parameter] value @@ -151,7 +151,7 @@ events.cs: # 76| 0: [MethodCall] call to method RemoveEventHandler # 76| 0: [FieldAccess] access to field mouseUpEventKey # 76| 1: [ParameterAccess] access to parameter value -# 80| 13: [Method] OnMouseUp +# 80| 14: [Method] OnMouseUp # 80| -1: [TypeMention] Void #-----| 2: (Parameters) # 80| 0: [Parameter] args diff --git a/csharp/ql/test/library-tests/exceptions/PrintAst.expected b/csharp/ql/test/library-tests/exceptions/PrintAst.expected index bbe09076bc6..bdc7ecb3688 100644 --- a/csharp/ql/test/library-tests/exceptions/PrintAst.expected +++ b/csharp/ql/test/library-tests/exceptions/PrintAst.expected @@ -1,11 +1,11 @@ exceptions.cs: # 3| [Class] Class1 -# 5| 5: [Method] G +# 5| 6: [Method] G # 5| -1: [TypeMention] Void # 6| 4: [BlockStmt] {...} -# 9| 6: [Field] p +# 9| 7: [Field] p # 9| -1: [TypeMention] int -# 11| 7: [Method] TestNoThrow +# 11| 8: [Method] TestNoThrow # 11| -1: [TypeMention] Void # 12| 4: [BlockStmt] {...} # 13| 0: [TryStmt] try {...} ... @@ -38,7 +38,7 @@ exceptions.cs: # 33| 0: [TypeMention] Exception # 34| 1: [BlockStmt] {...} # 35| 0: [EmptyStmt] ; -# 43| 8: [Method] TestCall +# 43| 9: [Method] TestCall # 43| -1: [TypeMention] Void # 44| 4: [BlockStmt] {...} # 45| 0: [TryStmt] try {...} ... @@ -69,7 +69,7 @@ exceptions.cs: # 66| 5: [GeneralCatchClause] catch {...} # 67| 1: [BlockStmt] {...} # 68| 0: [EmptyStmt] ; -# 72| 9: [Method] TestCreation +# 72| 10: [Method] TestCreation # 72| -1: [TypeMention] Void # 73| 4: [BlockStmt] {...} # 74| 0: [TryStmt] try {...} ... @@ -106,7 +106,7 @@ exceptions.cs: # 95| 0: [TypeMention] Exception # 96| 1: [BlockStmt] {...} # 97| 0: [EmptyStmt] ; -# 101| 10: [Method] TestIntAdd +# 101| 11: [Method] TestIntAdd # 101| -1: [TypeMention] Void # 102| 4: [BlockStmt] {...} # 103| 0: [TryStmt] try {...} ... @@ -144,7 +144,7 @@ exceptions.cs: # 124| 0: [TypeMention] Exception # 125| 1: [BlockStmt] {...} # 126| 0: [EmptyStmt] ; -# 130| 11: [Method] TestIntSub +# 130| 12: [Method] TestIntSub # 130| -1: [TypeMention] Void # 131| 4: [BlockStmt] {...} # 132| 0: [TryStmt] try {...} ... @@ -182,7 +182,7 @@ exceptions.cs: # 153| 0: [TypeMention] Exception # 154| 1: [BlockStmt] {...} # 155| 0: [EmptyStmt] ; -# 159| 12: [Method] TestIntMul +# 159| 13: [Method] TestIntMul # 159| -1: [TypeMention] Void # 160| 4: [BlockStmt] {...} # 161| 0: [TryStmt] try {...} ... @@ -220,7 +220,7 @@ exceptions.cs: # 182| 0: [TypeMention] Exception # 183| 1: [BlockStmt] {...} # 184| 0: [EmptyStmt] ; -# 188| 13: [Method] TestStringLiteral +# 188| 14: [Method] TestStringLiteral # 188| -1: [TypeMention] Void # 189| 4: [BlockStmt] {...} # 190| 0: [TryStmt] try {...} ... @@ -256,7 +256,7 @@ exceptions.cs: # 211| 0: [TypeMention] Exception # 212| 1: [BlockStmt] {...} # 213| 0: [EmptyStmt] ; -# 217| 14: [Method] TestStringAdd +# 217| 15: [Method] TestStringAdd # 217| -1: [TypeMention] Void # 218| 4: [BlockStmt] {...} # 219| 0: [TryStmt] try {...} ... @@ -299,7 +299,7 @@ exceptions.cs: # 241| 0: [TypeMention] Exception # 242| 1: [BlockStmt] {...} # 243| 0: [EmptyStmt] ; -# 247| 15: [Method] TestDivide +# 247| 16: [Method] TestDivide # 247| -1: [TypeMention] Void # 248| 4: [BlockStmt] {...} # 249| 0: [TryStmt] try {...} ... @@ -337,7 +337,7 @@ exceptions.cs: # 270| 0: [TypeMention] Exception # 271| 1: [BlockStmt] {...} # 272| 0: [EmptyStmt] ; -# 276| 16: [Method] TestRemainder +# 276| 17: [Method] TestRemainder # 276| -1: [TypeMention] Void # 277| 4: [BlockStmt] {...} # 278| 0: [TryStmt] try {...} ... @@ -375,7 +375,7 @@ exceptions.cs: # 299| 0: [TypeMention] Exception # 300| 1: [BlockStmt] {...} # 301| 0: [EmptyStmt] ; -# 305| 17: [Method] TestMemberAccess +# 305| 18: [Method] TestMemberAccess # 305| -1: [TypeMention] Void # 306| 4: [BlockStmt] {...} # 307| 0: [TryStmt] try {...} ... @@ -412,7 +412,7 @@ exceptions.cs: # 328| 0: [TypeMention] Exception # 329| 1: [BlockStmt] {...} # 330| 0: [EmptyStmt] ; -# 334| 18: [Method] TestCast +# 334| 19: [Method] TestCast # 334| -1: [TypeMention] Void # 335| 4: [BlockStmt] {...} # 336| 0: [TryStmt] try {...} ... @@ -451,7 +451,7 @@ exceptions.cs: # 357| 0: [TypeMention] Exception # 358| 1: [BlockStmt] {...} # 359| 0: [EmptyStmt] ; -# 363| 19: [Method] TestThrow +# 363| 20: [Method] TestThrow # 363| -1: [TypeMention] Void # 364| 4: [BlockStmt] {...} # 365| 0: [TryStmt] try {...} ... @@ -490,7 +490,7 @@ exceptions.cs: # 387| 0: [TypeMention] Exception # 388| 1: [BlockStmt] {...} # 389| 0: [EmptyStmt] ; -# 393| 20: [Method] TestUnaryOperation +# 393| 21: [Method] TestUnaryOperation # 393| -1: [TypeMention] Void # 394| 4: [BlockStmt] {...} # 395| 0: [TryStmt] try {...} ... @@ -529,7 +529,7 @@ exceptions.cs: # 417| 0: [TypeMention] Exception # 418| 1: [BlockStmt] {...} # 419| 0: [EmptyStmt] ; -# 423| 21: [Method] TestRethrow +# 423| 22: [Method] TestRethrow # 423| -1: [TypeMention] Void # 424| 4: [BlockStmt] {...} # 425| 0: [TryStmt] try {...} ... @@ -548,7 +548,7 @@ exceptions.cs: # 440| 2: [GeneralCatchClause] catch {...} # 441| 1: [BlockStmt] {...} # 442| 0: [EmptyStmt] ; -# 446| 22: [Method] TestSubtypeCast +# 446| 23: [Method] TestSubtypeCast # 446| -1: [TypeMention] Void # 447| 4: [BlockStmt] {...} # 448| 0: [TryStmt] try {...} ... @@ -577,7 +577,7 @@ exceptions.cs: # 458| 0: [TypeMention] Exception # 459| 1: [BlockStmt] {...} # 460| 0: [EmptyStmt] ; -# 464| 23: [Method] TestDivideMaybeZero +# 464| 24: [Method] TestDivideMaybeZero # 464| -1: [TypeMention] Void #-----| 2: (Parameters) # 464| 0: [Parameter] i diff --git a/csharp/ql/test/library-tests/expressions/PrintAst.expected b/csharp/ql/test/library-tests/expressions/PrintAst.expected index bee0a1e429c..208ea388114 100644 --- a/csharp/ql/test/library-tests/expressions/PrintAst.expected +++ b/csharp/ql/test/library-tests/expressions/PrintAst.expected @@ -1,6 +1,6 @@ FoldedLiterals.cs: # 1| [Class] FoldedLiterals -# 3| 5: [Method] Test +# 3| 6: [Method] Test # 3| -1: [TypeMention] Void # 4| 4: [BlockStmt] {...} # 6| 0: [LocalVariableDeclStmt] ... ...; @@ -338,7 +338,7 @@ FoldedLiterals.cs: # 77| 0: [DecimalLiteral] 11 MethodAccess.cs: # 3| [Class] MethodAccess -# 5| 5: [Method] M +# 5| 6: [Method] M # 5| -1: [TypeMention] Void # 6| 4: [BlockStmt] {...} # 7| 0: [LocalFunctionStmt] M1(...) @@ -374,29 +374,29 @@ MethodAccess.cs: # 12| 0: [MethodAccess] access to method M3 # 12| -1: [TypeAccess] access to type MethodAccess # 12| 0: [TypeMention] MethodAccess -# 15| 6: [Method] M2 +# 15| 7: [Method] M2 # 15| -1: [TypeMention] Void # 15| 4: [BlockStmt] {...} -# 17| 7: [Method] M3 +# 17| 8: [Method] M3 # 17| -1: [TypeMention] Void # 17| 4: [BlockStmt] {...} Qualifiers.cs: # 3| [Class] Qualifiers -# 5| 5: [Property] S +# 5| 6: [Property] S # 5| -1: [TypeMention] short # 5| 3: [Getter] get_S # 5| 4: [MethodCall] call to method Static # 5| 0: [NullLiteral] null -# 7| 6: [Property] I +# 7| 7: [Property] I # 7| -1: [TypeMention] int # 7| 3: [Getter] get_I # 7| 4: [MethodCall] call to method Instance -# 9| 7: [Property] B +# 9| 8: [Property] B # 9| -1: [TypeMention] bool # 9| 3: [Getter] get_B # 9| 4: [MethodCall] call to method Instance # 9| -1: [ThisAccess] this access -# 11| 9: [Method] Static`1 +# 11| 10: [Method] Static`1 # 11| -1: [TypeMention] T #-----| 1: (Type parameters) # 11| 0: [TypeParameter] T @@ -406,7 +406,7 @@ Qualifiers.cs: # 11| 4: [DefaultValueExpr] default(...) # 11| 0: [TypeAccess] access to type T # 11| 0: [TypeMention] T -# 13| 12: [Method] Instance`1 +# 13| 13: [Method] Instance`1 # 13| -1: [TypeMention] T #-----| 1: (Type parameters) # 13| 0: [TypeParameter] T @@ -415,7 +415,7 @@ Qualifiers.cs: # 13| 0: [TypeMention] T ReducedExpression.cs: # 2| [Class] ReducedClass -# 5| 5: [Field] ReducedExpression +# 5| 6: [Field] ReducedExpression # 5| -1: [TypeMention] int # 5| 1: [ConditionalExpr] ... ? ... : ... # 5| 0: [BoolLiteral] true @@ -424,7 +424,7 @@ ReducedExpression.cs: expressions.cs: # 5| [NamespaceDeclaration] namespace ... { ... } # 7| 1: [Class] Class -# 10| 4: [Method] MainLiterals +# 10| 5: [Method] MainLiterals # 10| -1: [TypeMention] Void # 11| 4: [BlockStmt] {...} # 12| 0: [LocalVariableDeclStmt] ... ...; @@ -514,7 +514,7 @@ expressions.cs: # 34| 0: [AssignExpr] ... = ... # 34| 0: [LocalVariableAccess] access to local variable o # 34| 1: [NullLiteral] null -# 37| 5: [Method] LogicalOperators +# 37| 6: [Method] LogicalOperators # 37| -1: [TypeMention] bool #-----| 2: (Parameters) # 37| 0: [Parameter] a @@ -546,15 +546,15 @@ expressions.cs: # 41| 1: [ParameterAccess] access to parameter b # 41| 1: [LogicalNotExpr] !... # 41| 0: [LocalVariableAccess] access to local variable c -# 44| 6: [Field] constant +# 44| 7: [Field] constant # 44| -1: [TypeMention] string # 44| 1: [StringLiteralUtf16] "constant" -# 45| 7: [Field] f +# 45| 8: [Field] f # 45| -1: [TypeMention] int # 45| 1: [IntLiteral] 0 -# 46| 8: [Field] name +# 46| 9: [Field] name # 46| -1: [TypeMention] string -# 48| 9: [StaticConstructor] Class +# 48| 10: [StaticConstructor] Class # 49| 4: [BlockStmt] {...} # 51| 0: [ExprStmt] ...; # 51| 0: [AssignExpr] ... = ... @@ -568,19 +568,19 @@ expressions.cs: # 52| 0: [TypeMention] Class # 53| 2: [ExprStmt] ...; # 53| 0: [MethodCall] call to method Foo -# 56| 10: [InstanceConstructor] Class +# 56| 11: [InstanceConstructor] Class # 56| 3: [ConstructorInitializer] call to constructor Class # 56| 0: [IntLiteral] 0 # 56| 4: [BlockStmt] {...} -# 58| 11: [InstanceConstructor] Class +# 58| 12: [InstanceConstructor] Class #-----| 2: (Parameters) # 58| 0: [Parameter] i # 58| -1: [TypeMention] int # 58| 4: [BlockStmt] {...} -# 60| 12: [Method] Foo +# 60| 13: [Method] Foo # 60| -1: [TypeMention] Void # 60| 4: [BlockStmt] {...} -# 62| 13: [Method] Bar +# 62| 14: [Method] Bar # 62| -1: [TypeMention] int #-----| 2: (Parameters) # 62| 0: [Parameter] x @@ -593,7 +593,7 @@ expressions.cs: # 64| 0: [PropertyCall] access to property Length # 64| -1: [ParameterAccess] access to parameter s # 64| 1: [ParameterAccess] access to parameter x -# 67| 14: [Property] Name +# 67| 15: [Property] Name # 67| -1: [TypeMention] string # 69| 3: [Getter] get_Name # 69| 4: [BlockStmt] {...} @@ -607,7 +607,7 @@ expressions.cs: # 70| 0: [AssignExpr] ... = ... # 70| 0: [FieldAccess] access to field name # 70| 1: [ParameterAccess] access to parameter value -# 73| 15: [Indexer] Item +# 73| 16: [Indexer] Item # 73| -1: [TypeMention] bool #-----| 1: (Parameters) # 73| 0: [Parameter] i @@ -638,7 +638,7 @@ expressions.cs: # 76| 1: [ExprStmt] ...; # 76| 0: [PostIncrExpr] ...++ # 76| 0: [FieldAccess] access to field f -# 79| 16: [Method] MainAccesses +# 79| 17: [Method] MainAccesses # 79| -1: [TypeMention] Void #-----| 2: (Parameters) # 79| 0: [Parameter] other @@ -718,7 +718,7 @@ expressions.cs: # 89| -1: [LocalVariableAccess] access to local variable inlinearray # 89| 0: [IntLiteral] 2 # 89| 1: [IntLiteral] 7 -# 92| 17: [Method] MainIsAsCast +# 92| 18: [Method] MainIsAsCast # 92| -1: [TypeMention] Void #-----| 2: (Parameters) # 92| 0: [Parameter] s @@ -780,14 +780,14 @@ expressions.cs: # 101| 1: [StringLiteralUtf16] " " # 101| 1: [CastExpr] (...) ... # 101| 1: [LocalVariableAccess] access to local variable i -# 104| 18: [Class] Y`2 +# 104| 19: [Class] Y`2 #-----| 1: (Type parameters) # 104| 0: [TypeParameter] T # 104| 1: [TypeParameter] U -# 108| 20: [Class] X`1 +# 108| 21: [Class] X`1 #-----| 1: (Type parameters) # 108| 0: [TypeParameter] T -# 111| 5: [Method] PrintTypes +# 111| 6: [Method] PrintTypes # 111| -1: [TypeMention] Void # 112| 4: [BlockStmt] {...} # 113| 0: [LocalVariableDeclStmt] ... ...; @@ -840,17 +840,17 @@ expressions.cs: # 125| 1: [DefaultValueExpr] default(...) # 125| 0: [TypeAccess] access to type T # 125| 0: [TypeMention] T -# 130| 21: [Class] Nested +# 130| 22: [Class] Nested #-----| 3: (Base types) # 130| 0: [TypeMention] Class -# 132| 4: [StaticConstructor] Nested +# 132| 5: [StaticConstructor] Nested # 132| 4: [BlockStmt] {...} -# 133| 5: [InstanceConstructor] Nested +# 133| 6: [InstanceConstructor] Nested #-----| 2: (Parameters) # 133| 0: [Parameter] b # 133| -1: [TypeMention] bool # 133| 4: [BlockStmt] {...} -# 134| 6: [InstanceConstructor] Nested +# 134| 7: [InstanceConstructor] Nested #-----| 2: (Parameters) # 134| 0: [Parameter] i # 134| -1: [TypeMention] int @@ -859,7 +859,7 @@ expressions.cs: # 134| 0: [ParameterAccess] access to parameter i # 134| 1: [IntLiteral] 1 # 134| 4: [BlockStmt] {...} -# 136| 7: [Method] OtherAccesses +# 136| 8: [Method] OtherAccesses # 136| -1: [TypeMention] Void # 137| 4: [BlockStmt] {...} # 138| 0: [ExprStmt] ...; @@ -880,7 +880,7 @@ expressions.cs: # 139| 4: [CastExpr] (...) ... # 139| 1: [IntLiteral] 4 # 139| 5: [StringLiteralUtf16] "" -# 144| 22: [Method] MainLocalVarDecl +# 144| 23: [Method] MainLocalVarDecl # 144| -1: [TypeMention] Void # 145| 4: [BlockStmt] {...} # 146| 0: [LocalVariableDeclStmt] ... ...; @@ -918,7 +918,7 @@ expressions.cs: # 151| -1: [TypeMention] string # 151| 0: [LocalVariableAccess] access to local variable y # 151| 1: [StringLiteralUtf16] "test" -# 154| 23: [Method] MainLocalConstDecl +# 154| 24: [Method] MainLocalConstDecl # 154| -1: [TypeMention] Void # 155| 4: [BlockStmt] {...} # 156| 0: [LocalConstantDeclStmt] const ... ...; @@ -944,7 +944,7 @@ expressions.cs: # 158| 1: [LocalVariableAccess] access to local variable r # 158| 1: [CastExpr] (...) ... # 158| 1: [LocalVariableAccess] access to local variable r -# 161| 24: [Method] MainChecked +# 161| 25: [Method] MainChecked # 161| -1: [TypeMention] Void # 162| 4: [BlockStmt] {...} # 163| 0: [LocalVariableDeclStmt] ... ...; @@ -961,7 +961,7 @@ expressions.cs: # 164| 0: [AddExpr] ... + ... # 164| 0: [FieldAccess] access to field f # 164| 1: [IntLiteral] 20 -# 167| 25: [Method] MainElementAccess +# 167| 26: [Method] MainElementAccess # 167| -1: [TypeMention] Void #-----| 2: (Parameters) # 167| 0: [Parameter] i @@ -978,7 +978,7 @@ expressions.cs: # 169| -1: [ArrayInitializer] { ..., ... } # 169| 0: [CastExpr] (...) ... # 169| 1: [ParameterAccess] access to parameter i -# 172| 26: [Method] MainDelegateAndMethodAccesses +# 172| 27: [Method] MainDelegateAndMethodAccesses # 172| -1: [TypeMention] Void # 173| 4: [BlockStmt] {...} # 174| 0: [LocalVariableDeclStmt] ... ...; @@ -1127,26 +1127,26 @@ expressions.cs: # 205| 0: [Parameter] x # 205| -1: [TypeMention] int # 207| 4: [Class] C -# 210| 5: [Method] M1 +# 210| 6: [Method] M1 # 210| -1: [TypeMention] Void #-----| 2: (Parameters) # 210| 0: [Parameter] i # 210| -1: [TypeMention] int # 210| 4: [BlockStmt] {...} -# 211| 6: [Method] M2 +# 211| 7: [Method] M2 # 211| -1: [TypeMention] Void #-----| 2: (Parameters) # 211| 0: [Parameter] i # 211| -1: [TypeMention] int # 211| 4: [BlockStmt] {...} -# 212| 7: [Method] M3 +# 212| 8: [Method] M3 # 212| -1: [TypeMention] Void #-----| 2: (Parameters) # 212| 0: [Parameter] i # 212| -1: [TypeMention] int # 212| 4: [BlockStmt] {...} # 216| 5: [Class] X -# 219| 5: [Method] F +# 219| 6: [Method] F # 219| -1: [TypeMention] bool #-----| 2: (Parameters) # 219| 0: [Parameter] i @@ -1156,7 +1156,7 @@ expressions.cs: # 219| 0: [LTExpr] ... < ... # 219| 0: [ParameterAccess] access to parameter i # 219| 1: [IntLiteral] 2 -# 221| 6: [Method] G +# 221| 7: [Method] G # 221| -1: [TypeMention] bool #-----| 2: (Parameters) # 221| 0: [Parameter] s @@ -1171,7 +1171,7 @@ expressions.cs: # 225| 1: [Parameter] e # 225| -1: [TypeMention] object # 227| 7: [Class] Button -# 230| 5: [Event] Click +# 230| 6: [Event] Click # 230| -1: [TypeMention] EventHandler # 230| 3: [AddEventAccessor] add_Click #-----| 2: (Parameters) @@ -1179,7 +1179,7 @@ expressions.cs: # 230| 4: [RemoveEventAccessor] remove_Click #-----| 2: (Parameters) # 230| 0: [Parameter] value -# 232| 6: [Method] OnClick +# 232| 7: [Method] OnClick # 232| -1: [TypeMention] Void #-----| 2: (Parameters) # 232| 0: [Parameter] e @@ -1194,7 +1194,7 @@ expressions.cs: # 235| -1: [EventAccess,EventCall] access to event Click # 235| 0: [ThisAccess] this access # 235| 1: [ParameterAccess] access to parameter e -# 238| 7: [Method] Reset +# 238| 8: [Method] Reset # 238| -1: [TypeMention] Void # 239| 4: [BlockStmt] {...} # 240| 0: [ExprStmt] ...; @@ -1202,11 +1202,11 @@ expressions.cs: # 240| 0: [EventAccess,EventCall] access to event Click # 240| 1: [NullLiteral] null # 244| 8: [Class] LoginDialog -# 247| 4: [Field] OkButton +# 247| 5: [Field] OkButton # 247| -1: [TypeMention] Button -# 248| 5: [Field] CancelButton +# 248| 6: [Field] CancelButton # 248| -1: [TypeMention] Button -# 250| 6: [InstanceConstructor] LoginDialog +# 250| 7: [InstanceConstructor] LoginDialog # 251| 4: [BlockStmt] {...} # 252| 0: [ExprStmt] ...; # 252| 0: [AssignExpr] ... = ... @@ -1232,7 +1232,7 @@ expressions.cs: # 255| 1: [ExplicitDelegateCreation] delegate creation of type EventHandler # 255| -1: [TypeMention] EventHandler # 255| 0: [MethodAccess] access to method CancelButtonClick -# 258| 7: [Method] OkButtonClick +# 258| 8: [Method] OkButtonClick # 258| -1: [TypeMention] Void #-----| 2: (Parameters) # 258| 0: [Parameter] sender @@ -1240,7 +1240,7 @@ expressions.cs: # 258| 1: [Parameter] e # 258| -1: [TypeMention] object # 259| 4: [BlockStmt] {...} -# 262| 8: [Method] CancelButtonClick +# 262| 9: [Method] CancelButtonClick # 262| -1: [TypeMention] Void #-----| 2: (Parameters) # 262| 0: [Parameter] sender @@ -1249,18 +1249,18 @@ expressions.cs: # 262| -1: [TypeMention] object # 263| 4: [BlockStmt] {...} # 268| 9: [Class] IntVector -# 271| 4: [InstanceConstructor] IntVector +# 271| 5: [InstanceConstructor] IntVector #-----| 2: (Parameters) # 271| 0: [Parameter] length # 271| -1: [TypeMention] int # 271| 4: [BlockStmt] {...} -# 273| 5: [Property] Length +# 273| 6: [Property] Length # 273| -1: [TypeMention] int # 273| 3: [Getter] get_Length # 273| 4: [BlockStmt] {...} # 273| 0: [ReturnStmt] return ...; # 273| 0: [IntLiteral] 4 -# 275| 6: [Indexer] Item +# 275| 7: [Indexer] Item # 275| -1: [TypeMention] int #-----| 1: (Parameters) # 275| 0: [Parameter] index @@ -1276,7 +1276,7 @@ expressions.cs: # 275| 0: [Parameter] index # 275| 1: [Parameter] value # 275| 4: [BlockStmt] {...} -# 277| 7: [IncrementOperator] ++ +# 277| 8: [IncrementOperator] ++ # 277| -1: [TypeMention] IntVector #-----| 2: (Parameters) # 277| 0: [Parameter] iv @@ -1313,7 +1313,7 @@ expressions.cs: # 281| 1: [IntLiteral] 1 # 282| 2: [ReturnStmt] return ...; # 282| 0: [LocalVariableAccess] access to local variable temp -# 285| 8: [AddOperator] + +# 285| 9: [AddOperator] + # 285| -1: [TypeMention] IntVector #-----| 2: (Parameters) # 285| 0: [Parameter] iv1 @@ -1324,7 +1324,7 @@ expressions.cs: # 287| 0: [ReturnStmt] return ...; # 287| 0: [ParameterAccess] access to parameter iv1 # 292| 10: [Class] TestUnaryOperator -# 295| 5: [Method] MainUnaryOperator +# 295| 6: [Method] MainUnaryOperator # 295| -1: [TypeMention] Void # 296| 4: [BlockStmt] {...} # 297| 0: [LocalVariableDeclStmt] ... ...; @@ -1355,9 +1355,9 @@ expressions.cs: # 301| 0: [LocalVariableAccess] access to local variable iv1 # 301| 1: [LocalVariableAccess] access to local variable iv2 # 306| 11: [Struct] Digit -# 309| 5: [Field] value +# 309| 6: [Field] value # 309| -1: [TypeMention] byte -# 311| 6: [InstanceConstructor] Digit +# 311| 7: [InstanceConstructor] Digit #-----| 2: (Parameters) # 311| 0: [Parameter] value # 311| -1: [TypeMention] byte @@ -1380,7 +1380,7 @@ expressions.cs: # 315| 0: [FieldAccess] access to field value # 315| -1: [ThisAccess] this access # 315| 1: [ParameterAccess] access to parameter value -# 318| 7: [ImplicitConversionOperator] implicit conversion +# 318| 8: [ImplicitConversionOperator] implicit conversion # 318| -1: [TypeMention] byte #-----| 2: (Parameters) # 318| 0: [Parameter] d @@ -1389,7 +1389,7 @@ expressions.cs: # 320| 0: [ReturnStmt] return ...; # 320| 0: [FieldAccess] access to field value # 320| -1: [ParameterAccess] access to parameter d -# 323| 8: [ExplicitConversionOperator] explicit conversion +# 323| 9: [ExplicitConversionOperator] explicit conversion # 323| -1: [TypeMention] Digit #-----| 2: (Parameters) # 323| 0: [Parameter] b @@ -1400,7 +1400,7 @@ expressions.cs: # 325| -1: [TypeMention] Digit # 325| 0: [ParameterAccess] access to parameter b # 330| 12: [Class] TestConversionOperator -# 333| 5: [Method] MainConversionOperator +# 333| 6: [Method] MainConversionOperator # 333| -1: [TypeMention] Void # 334| 4: [BlockStmt] {...} # 335| 0: [LocalVariableDeclStmt] ... ...; @@ -1418,11 +1418,11 @@ expressions.cs: # 336| 1: [OperatorCall] call to operator implicit conversion # 336| 0: [LocalVariableAccess] access to local variable d # 341| 13: [Class] Point -# 344| 5: [Field] x +# 344| 6: [Field] x # 344| -1: [TypeMention] int -# 344| 6: [Field] y +# 344| 7: [Field] y # 344| -1: [TypeMention] int -# 346| 7: [Property] X +# 346| 8: [Property] X # 346| -1: [TypeMention] int # 346| 3: [Getter] get_X # 346| 4: [BlockStmt] {...} @@ -1436,7 +1436,7 @@ expressions.cs: # 346| 0: [AssignExpr] ... = ... # 346| 0: [FieldAccess] access to field x # 346| 1: [ParameterAccess] access to parameter value -# 347| 8: [Property] Y +# 347| 9: [Property] Y # 347| -1: [TypeMention] int # 347| 3: [Getter] get_Y # 347| 4: [BlockStmt] {...} @@ -1451,11 +1451,11 @@ expressions.cs: # 347| 0: [FieldAccess] access to field y # 347| 1: [ParameterAccess] access to parameter value # 351| 14: [Class] Rectangle -# 354| 5: [Field] p1 +# 354| 6: [Field] p1 # 354| -1: [TypeMention] Point -# 354| 6: [Field] p2 +# 354| 7: [Field] p2 # 354| -1: [TypeMention] Point -# 356| 7: [Property] P1 +# 356| 8: [Property] P1 # 356| -1: [TypeMention] Point # 356| 3: [Getter] get_P1 # 356| 4: [BlockStmt] {...} @@ -1469,7 +1469,7 @@ expressions.cs: # 356| 0: [AssignExpr] ... = ... # 356| 0: [FieldAccess] access to field p1 # 356| 1: [ParameterAccess] access to parameter value -# 357| 8: [Property] P2 +# 357| 9: [Property] P2 # 357| -1: [TypeMention] Point # 357| 3: [Getter] get_P2 # 357| 4: [BlockStmt] {...} @@ -1484,36 +1484,36 @@ expressions.cs: # 357| 0: [FieldAccess] access to field p2 # 357| 1: [ParameterAccess] access to parameter value # 361| 15: [Class] Rectangle2 -# 364| 5: [Field] p1 +# 364| 6: [Field] p1 # 364| -1: [TypeMention] Point # 364| 1: [ObjectCreation] object creation of type Point # 364| 0: [TypeMention] Point -# 365| 6: [Field] p2 +# 365| 7: [Field] p2 # 365| -1: [TypeMention] Point # 365| 1: [ObjectCreation] object creation of type Point # 365| 0: [TypeMention] Point -# 367| 7: [Property] P1 +# 367| 8: [Property] P1 # 367| -1: [TypeMention] Point # 367| 3: [Getter] get_P1 # 367| 4: [BlockStmt] {...} # 367| 0: [ReturnStmt] return ...; # 367| 0: [FieldAccess] access to field p1 -# 368| 8: [Property] P2 +# 368| 9: [Property] P2 # 368| -1: [TypeMention] Point # 368| 3: [Getter] get_P2 # 368| 4: [BlockStmt] {...} # 368| 0: [ReturnStmt] return ...; # 368| 0: [FieldAccess] access to field p2 # 372| 16: [Class] Contact -# 375| 5: [Field] name +# 375| 6: [Field] name # 375| -1: [TypeMention] string -# 376| 6: [Field] phoneNumbers +# 376| 7: [Field] phoneNumbers # 376| -1: [TypeMention] List # 376| 1: [TypeMention] string # 376| 1: [ObjectCreation] object creation of type List # 376| 0: [TypeMention] List # 376| 1: [TypeMention] string -# 378| 7: [Property] Name +# 378| 8: [Property] Name # 378| -1: [TypeMention] string # 378| 3: [Getter] get_Name # 378| 4: [BlockStmt] {...} @@ -1527,7 +1527,7 @@ expressions.cs: # 378| 0: [AssignExpr] ... = ... # 378| 0: [FieldAccess] access to field name # 378| 1: [ParameterAccess] access to parameter value -# 379| 8: [Property] PhoneNumbers +# 379| 9: [Property] PhoneNumbers # 379| -1: [TypeMention] List # 379| 1: [TypeMention] string # 379| 3: [Getter] get_PhoneNumbers @@ -1535,7 +1535,7 @@ expressions.cs: # 379| 0: [ReturnStmt] return ...; # 379| 0: [FieldAccess] access to field phoneNumbers # 383| 17: [Class] TestCreations -# 386| 5: [Method] MainCreations +# 386| 6: [Method] MainCreations # 386| -1: [TypeMention] Void # 387| 4: [BlockStmt] {...} # 388| 0: [LocalVariableDeclStmt] ... ...; @@ -1827,14 +1827,14 @@ expressions.cs: # 430| 0: [EQExpr] ... == ... # 430| 0: [LocalVariableAccess] access to local variable i # 430| 1: [IntLiteral] 2 -# 433| 6: [DelegateType] S +# 433| 7: [DelegateType] S #-----| 2: (Parameters) # 433| 0: [Parameter] x # 433| -1: [TypeMention] int # 433| 1: [Parameter] y # 433| -1: [TypeMention] int -# 434| 7: [DelegateType] Unit -# 436| 8: [Method] MultiDimensionalArrayCreations +# 434| 8: [DelegateType] Unit +# 436| 9: [Method] MultiDimensionalArrayCreations # 436| -1: [TypeMention] Void # 437| 4: [BlockStmt] {...} # 438| 0: [LocalVariableDeclStmt] ... ...; @@ -1994,7 +1994,7 @@ expressions.cs: # 445| 0: [IntLiteral] 1 # 445| 1: [IntLiteral] 2 # 445| 2: [IntLiteral] 3 -# 448| 9: [Method] MainAnonymousFunctions +# 448| 10: [Method] MainAnonymousFunctions # 448| -1: [TypeMention] Void # 449| 4: [BlockStmt] {...} # 450| 0: [LocalVariableDeclStmt] ... ...; @@ -2108,7 +2108,7 @@ expressions.cs: # 458| 0: [LocalVariableAccess] access to local variable j # 458| 1: [IntLiteral] 1 # 463| 18: [Class] OperatorCalls -# 465| 5: [Method] delegateCombine +# 465| 6: [Method] delegateCombine # 465| -1: [TypeMention] Void #-----| 2: (Parameters) # 465| 0: [Parameter] fun @@ -2123,7 +2123,7 @@ expressions.cs: # 468| 0: [AssignAddExpr] ... += ... # 468| 0: [LocalVariableAccess] access to local variable PropertyChanged # 468| 1: [ParameterAccess] access to parameter fun -# 471| 6: [Method] addition +# 471| 7: [Method] addition # 471| -1: [TypeMention] Num #-----| 2: (Parameters) # 471| 0: [Parameter] a @@ -2146,10 +2146,10 @@ expressions.cs: # 474| 1: [ParameterAccess] access to parameter c # 475| 2: [ReturnStmt] return ...; # 475| 0: [LocalVariableAccess] access to local variable result -# 477| 7: [Class] Num -# 479| 4: [Field] value +# 477| 8: [Class] Num +# 479| 5: [Field] value # 479| -1: [TypeMention] int -# 481| 5: [InstanceConstructor] Num +# 481| 6: [InstanceConstructor] Num #-----| 2: (Parameters) # 481| 0: [Parameter] value # 481| -1: [TypeMention] int @@ -2159,7 +2159,7 @@ expressions.cs: # 483| 0: [FieldAccess] access to field value # 483| -1: [ThisAccess] this access # 483| 1: [ParameterAccess] access to parameter value -# 486| 6: [AddOperator] + +# 486| 7: [AddOperator] + # 486| -1: [TypeMention] Num #-----| 2: (Parameters) # 486| 0: [Parameter] c1 @@ -2175,12 +2175,12 @@ expressions.cs: # 488| -1: [ParameterAccess] access to parameter c1 # 488| 1: [FieldAccess] access to field value # 488| -1: [ParameterAccess] access to parameter c2 -# 492| 8: [DelegateType] MyDelegate +# 492| 9: [DelegateType] MyDelegate #-----| 2: (Parameters) # 492| 0: [Parameter] e # 492| -1: [TypeMention] string # 495| 19: [Class] ExpressionDepth -# 497| 5: [Field] d +# 497| 6: [Field] d # 497| -1: [TypeMention] int # 497| 1: [AddExpr] ... + ... # 497| 0: [AddExpr] ... + ... @@ -2342,7 +2342,7 @@ expressions.cs: # 498| 1: [IntLiteral] 1 # 498| 1: [IntLiteral] 1 # 501| 20: [Class] TupleExprs -# 503| 5: [Method] Test +# 503| 6: [Method] Test # 503| -1: [TypeMention] Void # 504| 4: [BlockStmt] {...} # 505| 0: [LocalVariableDeclStmt] ... ...; @@ -2390,28 +2390,28 @@ expressions.cs: # 512| 1: [DefaultAttribute] [InlineArray(...)] # 512| -1: [TypeMention] InlineArrayAttribute # 512| 0: [IntLiteral] 10 -# 515| 5: [Field] myInlineArrayElements +# 515| 6: [Field] myInlineArrayElements # 515| -1: [TypeMention] int # 518| 22: [Class] ClassC1 -# 518| 4: [InstanceConstructor,PrimaryConstructor] ClassC1 +# 518| 5: [InstanceConstructor,PrimaryConstructor] ClassC1 #-----| 2: (Parameters) # 518| 0: [Parameter] oc1 # 518| -1: [TypeMention] object # 520| 23: [Class] ClassC2 #-----| 3: (Base types) # 520| 0: [TypeMention] ClassC1 -# 520| 4: [InstanceConstructor,PrimaryConstructor] ClassC2 +# 520| 5: [InstanceConstructor,PrimaryConstructor] ClassC2 #-----| 2: (Parameters) # 520| 0: [Parameter] oc2 # 520| -1: [TypeMention] object # 520| 3: [ConstructorInitializer] call to constructor ClassC1 # 520| 0: [ParameterAccess] access to parameter oc2 # 522| 24: [Class] SuppressNullableWarning -# 525| 5: [Method] Api +# 525| 6: [Method] Api # 525| -1: [TypeMention] object # 525| 4: [ObjectCreation] object creation of type Object # 525| 0: [TypeMention] object -# 527| 6: [Method] Test +# 527| 7: [Method] Test # 527| -1: [TypeMention] Void #-----| 2: (Parameters) # 527| 0: [Parameter] arg0 diff --git a/csharp/ql/test/library-tests/expressions/QualifiableExpr.expected b/csharp/ql/test/library-tests/expressions/QualifiableExpr.expected index c85d73bd7f7..8030da8c4fa 100644 --- a/csharp/ql/test/library-tests/expressions/QualifiableExpr.expected +++ b/csharp/ql/test/library-tests/expressions/QualifiableExpr.expected @@ -1,12 +1,17 @@ +| FoldedLiterals.cs:1:7:1:20 | call to method | FoldedLiterals.cs:1:7:1:20 | this access | +| MethodAccess.cs:3:7:3:18 | call to method | MethodAccess.cs:3:7:3:18 | this access | | MethodAccess.cs:8:20:8:21 | access to local function M1 | MethodAccess.cs:8:20:8:21 | this access | | MethodAccess.cs:9:13:9:14 | access to method M2 | MethodAccess.cs:9:13:9:14 | this access | | MethodAccess.cs:10:13:10:19 | access to method M2 | MethodAccess.cs:10:13:10:16 | this access | | MethodAccess.cs:12:13:12:27 | access to method M3 | MethodAccess.cs:12:13:12:24 | access to type MethodAccess | +| Qualifiers.cs:3:7:3:16 | call to method | Qualifiers.cs:3:7:3:16 | this access | | Qualifiers.cs:7:21:7:35 | call to method Instance | Qualifiers.cs:7:21:7:35 | this access | | Qualifiers.cs:9:22:9:42 | call to method Instance | Qualifiers.cs:9:22:9:25 | this access | +| ReducedExpression.cs:2:7:2:18 | call to method | ReducedExpression.cs:2:7:2:18 | this access | | expressions.cs:45:20:45:20 | access to field f | expressions.cs:45:20:45:20 | this access | | expressions.cs:51:13:51:34 | access to field name | expressions.cs:51:13:51:29 | access to type Class | | expressions.cs:52:13:52:23 | call to method Foo | expressions.cs:52:13:52:17 | access to type Class | +| expressions.cs:58:19:58:23 | call to method | expressions.cs:58:19:58:23 | this access | | expressions.cs:64:20:64:27 | access to property Length | expressions.cs:64:20:64:20 | access to parameter s | | expressions.cs:75:35:75:46 | call to method Equals | expressions.cs:75:35:75:35 | access to parameter s | | expressions.cs:76:30:76:30 | access to field f | expressions.cs:76:30:76:30 | this access | @@ -20,6 +25,10 @@ | expressions.cs:85:41:85:51 | access to indexer | expressions.cs:85:41:85:44 | this access | | expressions.cs:87:13:87:20 | access to array element | expressions.cs:87:13:87:17 | access to local variable array | | expressions.cs:89:13:89:26 | access to array element | expressions.cs:89:13:89:23 | access to local variable inlinearray | +| expressions.cs:104:15:104:15 | call to method | expressions.cs:104:15:104:15 | this access | +| expressions.cs:108:15:108:15 | call to method | expressions.cs:108:15:108:15 | this access | +| expressions.cs:133:13:133:18 | call to method | expressions.cs:133:13:133:18 | this access | +| expressions.cs:134:13:134:18 | call to method | expressions.cs:134:13:134:18 | this access | | expressions.cs:138:17:138:22 | access to field f | expressions.cs:138:17:138:20 | this access | | expressions.cs:139:17:139:55 | call to method MainAccesses | expressions.cs:139:17:139:20 | base access | | expressions.cs:149:13:149:40 | call to method WriteLine | expressions.cs:149:13:149:19 | access to type Console | @@ -33,9 +42,13 @@ | expressions.cs:191:36:191:38 | access to method G | expressions.cs:191:36:191:36 | access to type X | | expressions.cs:198:25:198:37 | access to local function LocalFunction | expressions.cs:198:25:198:37 | this access | | expressions.cs:199:19:199:31 | access to local function LocalFunction | expressions.cs:199:19:199:31 | this access | +| expressions.cs:207:11:207:11 | call to method | expressions.cs:207:11:207:11 | this access | +| expressions.cs:216:18:216:18 | call to method | expressions.cs:216:18:216:18 | this access | +| expressions.cs:227:18:227:23 | call to method | expressions.cs:227:18:227:23 | this access | | expressions.cs:234:17:234:21 | access to event Click | expressions.cs:234:17:234:21 | this access | | expressions.cs:235:17:235:21 | access to event Click | expressions.cs:235:17:235:21 | this access | | expressions.cs:240:13:240:17 | access to event Click | expressions.cs:240:13:240:17 | this access | +| expressions.cs:250:16:250:26 | call to method | expressions.cs:250:16:250:26 | this access | | expressions.cs:252:13:252:20 | access to field OkButton | expressions.cs:252:13:252:20 | this access | | expressions.cs:253:13:253:20 | access to field OkButton | expressions.cs:253:13:253:20 | this access | | expressions.cs:253:13:253:26 | access to event Click | expressions.cs:253:13:253:20 | access to field OkButton | @@ -44,30 +57,48 @@ | expressions.cs:255:13:255:24 | access to field CancelButton | expressions.cs:255:13:255:24 | this access | | expressions.cs:255:13:255:30 | access to event Click | expressions.cs:255:13:255:24 | access to field CancelButton | | expressions.cs:255:52:255:68 | access to method CancelButtonClick | expressions.cs:255:52:255:68 | this access | +| expressions.cs:271:16:271:24 | call to method | expressions.cs:271:16:271:24 | this access | | expressions.cs:279:44:279:52 | access to property Length | expressions.cs:279:44:279:45 | access to parameter iv | | expressions.cs:280:33:280:41 | access to property Length | expressions.cs:280:33:280:34 | access to parameter iv | | expressions.cs:281:17:281:23 | access to indexer | expressions.cs:281:17:281:20 | access to local variable temp | | expressions.cs:281:27:281:31 | access to indexer | expressions.cs:281:27:281:28 | access to parameter iv | +| expressions.cs:292:11:292:27 | call to method | expressions.cs:292:11:292:27 | this access | +| expressions.cs:306:19:306:23 | call to method | expressions.cs:306:19:306:23 | this access | +| expressions.cs:311:16:311:20 | call to method | expressions.cs:311:16:311:20 | this access | | expressions.cs:315:13:315:22 | access to field value | expressions.cs:315:13:315:16 | this access | | expressions.cs:320:20:320:26 | access to field value | expressions.cs:320:20:320:20 | access to parameter d | +| expressions.cs:330:11:330:32 | call to method | expressions.cs:330:11:330:32 | this access | +| expressions.cs:341:18:341:22 | call to method | expressions.cs:341:18:341:22 | this access | | expressions.cs:346:37:346:37 | access to field x | expressions.cs:346:37:346:37 | this access | | expressions.cs:346:48:346:48 | access to field x | expressions.cs:346:48:346:48 | this access | | expressions.cs:347:37:347:37 | access to field y | expressions.cs:347:37:347:37 | this access | | expressions.cs:347:48:347:48 | access to field y | expressions.cs:347:48:347:48 | this access | +| expressions.cs:351:18:351:26 | call to method | expressions.cs:351:18:351:26 | this access | | expressions.cs:356:40:356:41 | access to field p1 | expressions.cs:356:40:356:41 | this access | | expressions.cs:356:52:356:53 | access to field p1 | expressions.cs:356:52:356:53 | this access | | expressions.cs:357:40:357:41 | access to field p2 | expressions.cs:357:40:357:41 | this access | | expressions.cs:357:52:357:53 | access to field p2 | expressions.cs:357:52:357:53 | this access | +| expressions.cs:361:18:361:27 | call to method | expressions.cs:361:18:361:27 | this access | | expressions.cs:364:15:364:16 | access to field p1 | expressions.cs:364:15:364:16 | this access | | expressions.cs:365:15:365:16 | access to field p2 | expressions.cs:365:15:365:16 | this access | | expressions.cs:367:40:367:41 | access to field p1 | expressions.cs:367:40:367:41 | this access | | expressions.cs:368:40:368:41 | access to field p2 | expressions.cs:368:40:368:41 | this access | +| expressions.cs:372:18:372:24 | call to method | expressions.cs:372:18:372:24 | this access | | expressions.cs:376:22:376:33 | access to field phoneNumbers | expressions.cs:376:22:376:33 | this access | | expressions.cs:378:43:378:46 | access to field name | expressions.cs:378:43:378:46 | this access | | expressions.cs:378:57:378:60 | access to field name | expressions.cs:378:57:378:60 | this access | | expressions.cs:379:57:379:68 | access to field phoneNumbers | expressions.cs:379:57:379:68 | this access | +| expressions.cs:383:18:383:30 | call to method | expressions.cs:383:18:383:30 | this access | | expressions.cs:455:29:455:47 | call to method WriteLine | expressions.cs:455:29:455:35 | access to type Console | +| expressions.cs:463:11:463:23 | call to method | expressions.cs:463:11:463:23 | this access | +| expressions.cs:481:20:481:22 | call to method | expressions.cs:481:20:481:22 | this access | | expressions.cs:483:17:483:26 | access to field value | expressions.cs:483:17:483:20 | this access | | expressions.cs:488:32:488:39 | access to field value | expressions.cs:488:32:488:33 | access to parameter c1 | | expressions.cs:488:43:488:50 | access to field value | expressions.cs:488:43:488:44 | access to parameter c2 | +| expressions.cs:495:11:495:25 | call to method | expressions.cs:495:11:495:25 | this access | +| expressions.cs:501:11:501:20 | call to method | expressions.cs:501:11:501:20 | this access | +| expressions.cs:513:12:513:24 | call to method | expressions.cs:513:12:513:24 | this access | +| expressions.cs:518:11:518:17 | call to method | expressions.cs:518:11:518:17 | this access | +| expressions.cs:520:11:520:17 | call to method | expressions.cs:520:11:520:17 | this access | +| expressions.cs:522:11:522:33 | call to method | expressions.cs:522:11:522:33 | this access | | expressions.cs:530:21:530:25 | call to method Api | expressions.cs:530:21:530:25 | this access | diff --git a/csharp/ql/test/library-tests/extension-method-call/ExtensionMethodCalls.expected b/csharp/ql/test/library-tests/extension-method-call/ExtensionMethodCalls.expected index ae15431d964..0407c9b3e39 100644 --- a/csharp/ql/test/library-tests/extension-method-call/ExtensionMethodCalls.expected +++ b/csharp/ql/test/library-tests/extension-method-call/ExtensionMethodCalls.expected @@ -1,6 +1,7 @@ methodCallTargets | methods.cs:14:60:14:73 | call to method Ext3`1 | methods.cs:14:28:14:34 | Ext3`1 | Ext3(T, int) | | methods.cs:16:60:16:74 | call to method Ext4`1 | methods.cs:16:28:16:34 | Ext4`1 | Ext4(T, int) | +| methods.cs:19:18:19:24 | call to method | methods.cs:19:18:19:24 | | () | | methods.cs:23:13:23:22 | call to method Ext0 | methods.cs:8:28:8:34 | Ext0 | Ext0(string, int) | | methods.cs:24:13:24:27 | call to method Ext0 | methods.cs:8:28:8:34 | Ext0 | Ext0(string, int) | | methods.cs:25:13:25:30 | call to method Ext0 | methods.cs:8:28:8:34 | Ext0 | Ext0(string, double) | diff --git a/csharp/ql/test/library-tests/fields/PrintAst.expected b/csharp/ql/test/library-tests/fields/PrintAst.expected index 4f33d662a06..e9e6ad49a2b 100644 --- a/csharp/ql/test/library-tests/fields/PrintAst.expected +++ b/csharp/ql/test/library-tests/fields/PrintAst.expected @@ -1,56 +1,56 @@ fields.cs: # 5| [NamespaceDeclaration] namespace ... { ... } # 7| 1: [Class] A -# 10| 6: [Field] X +# 10| 7: [Field] X # 10| -1: [TypeMention] int # 10| 1: [IntLiteral] 1 -# 10| 7: [Field] Y +# 10| 8: [Field] Y # 10| -1: [TypeMention] int -# 10| 8: [Field] Z +# 10| 9: [Field] Z # 10| -1: [TypeMention] int # 10| 1: [IntLiteral] 100 # 13| 2: [Class] B -# 15| 6: [Field] X +# 15| 7: [Field] X # 15| -1: [TypeMention] int # 15| 1: [IntLiteral] 1 -# 16| 7: [Field] Y +# 16| 8: [Field] Y # 16| -1: [TypeMention] int -# 17| 8: [Field] Z +# 17| 9: [Field] Z # 17| -1: [TypeMention] int # 17| 1: [IntLiteral] 100 # 20| 3: [Class] C`1 #-----| 1: (Type parameters) # 20| 0: [TypeParameter] V -# 23| 5: [Field] count +# 23| 6: [Field] count # 23| -1: [TypeMention] int # 23| 1: [IntLiteral] 0 -# 25| 6: [InstanceConstructor] C +# 25| 7: [InstanceConstructor] C # 25| 4: [BlockStmt] {...} # 25| 0: [ExprStmt] ...; # 25| 0: [PostIncrExpr] ...++ # 25| 0: [FieldAccess] access to field count -# 27| 7: [Property] Count +# 27| 8: [Property] Count # 27| -1: [TypeMention] int # 27| 3: [Getter] get_Count # 27| 4: [BlockStmt] {...} # 27| 0: [ReturnStmt] return ...; # 27| 0: [FieldAccess] access to field count # 31| 4: [Class] Application -# 34| 6: [Field] finished +# 34| 7: [Field] finished # 34| -1: [TypeMention] bool -# 35| 7: [Field] x +# 35| 8: [Field] x # 35| -1: [TypeMention] double # 35| 1: [MethodCall] call to method Sqrt # 35| -1: [TypeAccess] access to type Math # 35| 0: [TypeMention] Math # 35| 0: [DoubleLiteral] 2 -# 36| 8: [Field] i +# 36| 9: [Field] i # 36| -1: [TypeMention] int # 36| 1: [IntLiteral] 100 -# 37| 9: [Field] s +# 37| 10: [Field] s # 37| -1: [TypeMention] string # 37| 1: [StringLiteralUtf16] "Hello" -# 39| 10: [Method] Main +# 39| 11: [Method] Main # 39| -1: [TypeMention] Void # 40| 4: [BlockStmt] {...} # 41| 0: [LocalVariableDeclStmt] ... ...; @@ -93,7 +93,7 @@ fields.cs: # 45| 0: [TypeMention] C # 45| 1: [TypeMention] int # 50| 5: [Class] Color -# 53| 5: [Field] Black +# 53| 6: [Field] Black # 53| -1: [TypeMention] Color # 53| 1: [ObjectCreation] object creation of type Color # 53| -1: [TypeMention] Color @@ -103,7 +103,7 @@ fields.cs: # 53| 1: [IntLiteral] 0 # 53| 2: [CastExpr] (...) ... # 53| 1: [IntLiteral] 0 -# 54| 6: [Field] White +# 54| 7: [Field] White # 54| -1: [TypeMention] Color # 54| 1: [ObjectCreation] object creation of type Color # 54| -1: [TypeMention] Color @@ -113,7 +113,7 @@ fields.cs: # 54| 1: [IntLiteral] 255 # 54| 2: [CastExpr] (...) ... # 54| 1: [IntLiteral] 255 -# 56| 7: [InstanceConstructor] Color +# 56| 8: [InstanceConstructor] Color #-----| 2: (Parameters) # 56| 0: [Parameter] r # 56| -1: [TypeMention] byte @@ -123,30 +123,30 @@ fields.cs: # 56| -1: [TypeMention] byte # 56| 4: [BlockStmt] {...} # 60| 6: [Class] TestBindings -# 63| 6: [Field] a +# 63| 7: [Field] a # 63| -1: [TypeMention] int # 63| 1: [AddExpr] ... + ... # 63| 0: [FieldAccess] access to field b # 63| 1: [IntLiteral] 1 -# 64| 7: [Field] b +# 64| 8: [Field] b # 64| -1: [TypeMention] int # 64| 1: [AddExpr] ... + ... # 64| 0: [FieldAccess] access to field a # 64| 1: [IntLiteral] 1 # 70| [NamespaceDeclaration] namespace ... { ... } # 72| 1: [Class] A -# 74| 5: [Field] X +# 74| 6: [Field] X # 74| -1: [TypeMention] int # 74| 1: [AddExpr] ... + ... # 74| 0: [MemberConstantAccess] access to constant Z # 74| -1: [TypeAccess] access to type B # 74| 0: [TypeMention] B # 74| 1: [IntLiteral] 1 -# 75| 6: [Field] Y +# 75| 7: [Field] Y # 75| -1: [TypeMention] int # 75| 1: [IntLiteral] 10 # 78| 2: [Class] B -# 80| 5: [Field] Z +# 80| 6: [Field] Z # 80| -1: [TypeMention] int # 80| 1: [AddExpr] ... + ... # 80| 0: [MemberConstantAccess] access to constant Y @@ -154,13 +154,13 @@ fields.cs: # 80| 0: [TypeMention] A # 80| 1: [IntLiteral] 1 # 83| 3: [Class] C -# 85| 4: [Field] Foo +# 85| 5: [Field] Foo # 85| -1: [TypeMention] int # 85| 1: [IntLiteral] 1 -# 86| 5: [Field] x +# 86| 6: [Field] x # 86| -1: [TypeMention] long? # 86| 1: [TypeMention] long -# 87| 6: [InstanceConstructor] C +# 87| 7: [InstanceConstructor] C # 88| 4: [BlockStmt] {...} # 89| 0: [ExprStmt] ...; # 89| 0: [AssignExpr] ... = ... @@ -191,12 +191,12 @@ fields.cs: # 92| 1: [CastExpr] (...) ... # 92| 1: [MemberConstantAccess] access to constant Foo # 96| 4: [Class] D -# 98| 4: [InstanceConstructor] D +# 98| 5: [InstanceConstructor] D #-----| 2: (Parameters) # 98| 0: [Parameter] d # 98| -1: [TypeMention] int # 99| 4: [BlockStmt] {...} -# 101| 5: [ImplicitConversionOperator] implicit conversion +# 101| 6: [ImplicitConversionOperator] implicit conversion # 101| -1: [TypeMention] D #-----| 2: (Parameters) # 101| 0: [Parameter] d diff --git a/csharp/ql/test/library-tests/generics/Generics.expected b/csharp/ql/test/library-tests/generics/Generics.expected index d390859b4df..8e82103a19e 100644 --- a/csharp/ql/test/library-tests/generics/Generics.expected +++ b/csharp/ql/test/library-tests/generics/Generics.expected @@ -31,6 +31,7 @@ test14 test15 | generics.cs:7:23:7:40 | GenericDelegate | test16 +| generics.cs:135:11:135:16 | Subtle | generics.cs:135:11:135:16 | | | generics.cs:135:11:135:16 | Subtle | generics.cs:138:21:138:25 | fs`1 | | generics.cs:135:11:135:16 | Subtle | generics.cs:140:21:140:25 | fs`1 | | generics.cs:135:11:135:16 | Subtle | generics.cs:142:21:142:22 | fs | diff --git a/csharp/ql/test/library-tests/generics/Generics.ql b/csharp/ql/test/library-tests/generics/Generics.ql index ab1f0af982a..95ae84ebd9a 100644 --- a/csharp/ql/test/library-tests/generics/Generics.ql +++ b/csharp/ql/test/library-tests/generics/Generics.ql @@ -118,7 +118,7 @@ query predicate test15(ConstructedDelegateType d) { query predicate test16(Class c, Method m) { c.hasName("Subtle") and - count(c.getAMethod()) = 3 and + count(c.getAMethod()) = 4 and m = c.getAMethod() } diff --git a/csharp/ql/test/library-tests/generics/PrintAst.expected b/csharp/ql/test/library-tests/generics/PrintAst.expected index 3653b3b7a2d..0d50888edd3 100644 --- a/csharp/ql/test/library-tests/generics/PrintAst.expected +++ b/csharp/ql/test/library-tests/generics/PrintAst.expected @@ -2,13 +2,13 @@ Nesting.cs: # 1| [Class] A`1 #-----| 1: (Type parameters) # 1| 0: [TypeParameter] T1 -# 3| 5: [Method] MA1 +# 3| 6: [Method] MA1 # 3| -1: [TypeMention] Void #-----| 2: (Parameters) # 3| 0: [Parameter] x # 3| -1: [TypeMention] T1 # 3| 4: [BlockStmt] {...} -# 4| 6: [Method] MA2`1 +# 4| 7: [Method] MA2`1 # 4| -1: [TypeMention] Void #-----| 1: (Type parameters) # 4| 0: [TypeParameter] T2 @@ -18,10 +18,10 @@ Nesting.cs: # 4| 1: [Parameter] y # 4| -1: [TypeMention] T2 # 4| 4: [BlockStmt] {...} -# 6| 7: [Class] B`1 +# 6| 8: [Class] B`1 #-----| 1: (Type parameters) # 6| 0: [TypeParameter] T3 -# 8| 5: [Method] MB1 +# 8| 6: [Method] MB1 # 8| -1: [TypeMention] Void #-----| 2: (Parameters) # 8| 0: [Parameter] x @@ -29,7 +29,7 @@ Nesting.cs: # 8| 1: [Parameter] y # 8| -1: [TypeMention] T3 # 8| 4: [BlockStmt] {...} -# 9| 6: [Method] MB2`1 +# 9| 7: [Method] MB2`1 # 9| -1: [TypeMention] Void #-----| 1: (Type parameters) # 9| 0: [TypeParameter] T4 @@ -41,14 +41,14 @@ Nesting.cs: # 9| 2: [Parameter] z # 9| -1: [TypeMention] T4 # 9| 4: [BlockStmt] {...} -# 12| 8: [Class] C -# 14| 5: [Method] MC1 +# 12| 9: [Class] C +# 14| 6: [Method] MC1 # 14| -1: [TypeMention] Void #-----| 2: (Parameters) # 14| 0: [Parameter] x # 14| -1: [TypeMention] T1 # 14| 4: [BlockStmt] {...} -# 15| 6: [Method] MC2`1 +# 15| 7: [Method] MC2`1 # 15| -1: [TypeMention] Void #-----| 1: (Type parameters) # 15| 0: [TypeParameter] T5 @@ -58,10 +58,10 @@ Nesting.cs: # 15| 1: [Parameter] y # 15| -1: [TypeMention] T5 # 15| 4: [BlockStmt] {...} -# 17| 7: [Class] D`1 +# 17| 8: [Class] D`1 #-----| 1: (Type parameters) # 17| 0: [TypeParameter] T6 -# 19| 5: [Method] MD1 +# 19| 6: [Method] MD1 # 19| -1: [TypeMention] Void #-----| 2: (Parameters) # 19| 0: [Parameter] x @@ -69,7 +69,7 @@ Nesting.cs: # 19| 1: [Parameter] y # 19| -1: [TypeMention] T6 # 19| 4: [BlockStmt] {...} -# 20| 6: [Method] MD2`1 +# 20| 7: [Method] MD2`1 # 20| -1: [TypeMention] Void #-----| 1: (Type parameters) # 20| 0: [TypeParameter] T7 @@ -81,7 +81,7 @@ Nesting.cs: # 20| 2: [Parameter] z # 20| -1: [TypeMention] T7 # 20| 4: [BlockStmt] {...} -# 24| 9: [Method] Construct +# 24| 10: [Method] Construct # 24| -1: [TypeMention] Void # 25| 4: [BlockStmt] {...} # 26| 0: [LocalVariableDeclStmt] ... ...; @@ -244,7 +244,7 @@ generics.cs: # 13| 3: [Class] A`1 #-----| 1: (Type parameters) # 13| 0: [TypeParameter] T -# 16| 5: [DelegateType] GenericDelegateInGenericClass`1 +# 16| 6: [DelegateType] GenericDelegateInGenericClass`1 #-----| 1: (Type parameters) # 16| 0: [TypeParameter] U #-----| 2: (Parameters) @@ -252,7 +252,7 @@ generics.cs: # 16| -1: [TypeMention] T # 16| 1: [Parameter] u # 16| -1: [TypeMention] U -# 18| 6: [Method] bar`1 +# 18| 7: [Method] bar`1 # 18| -1: [TypeMention] T #-----| 1: (Type parameters) # 18| 0: [TypeParameter] X @@ -271,25 +271,25 @@ generics.cs: # 22| 4: [Class] B`1 #-----| 1: (Type parameters) # 22| 0: [TypeParameter] T -# 25| 5: [Field] at +# 25| 6: [Field] at # 25| -1: [TypeMention] A # 25| 1: [TypeMention] T -# 27| 6: [Field] name +# 27| 7: [Field] name # 27| -1: [TypeMention] string -# 29| 7: [Method] foo +# 29| 8: [Method] foo # 29| -1: [TypeMention] Void # 29| 4: [BlockStmt] {...} -# 31| 8: [Method] fooParams +# 31| 9: [Method] fooParams # 31| -1: [TypeMention] Void #-----| 2: (Parameters) # 31| 0: [Parameter] ts # 31| -1: [TypeMention] T[] # 31| 1: [TypeMention] T # 31| 4: [BlockStmt] {...} -# 33| 9: [Method] staticFoo +# 33| 10: [Method] staticFoo # 33| -1: [TypeMention] Void # 33| 4: [BlockStmt] {...} -# 35| 10: [Property] Name +# 35| 11: [Property] Name # 35| -1: [TypeMention] string # 35| 3: [Getter] get_Name # 35| 4: [BlockStmt] {...} @@ -303,7 +303,7 @@ generics.cs: # 35| 0: [AssignExpr] ... = ... # 35| 0: [FieldAccess] access to field name # 35| 1: [ParameterAccess] access to parameter value -# 37| 11: [Event] myEvent +# 37| 12: [Event] myEvent # 37| -1: [TypeMention] GenericDelegate # 37| 1: [TypeMention] T # 37| 3: [AddEventAccessor] add_myEvent @@ -312,7 +312,7 @@ generics.cs: # 37| 4: [RemoveEventAccessor] remove_myEvent #-----| 2: (Parameters) # 37| 0: [Parameter] value -# 39| 12: [IncrementOperator] ++ +# 39| 13: [IncrementOperator] ++ # 39| -1: [TypeMention] B # 39| 1: [TypeMention] T #-----| 2: (Parameters) @@ -324,9 +324,9 @@ generics.cs: # 41| 0: [ObjectCreation] object creation of type B`1 # 41| 0: [TypeMention] B # 41| 1: [TypeMention] T -# 44| 13: [Destructor] ~B +# 44| 14: [Destructor] ~B # 44| 4: [BlockStmt] {...} -# 45| 14: [Method] f`1 +# 45| 15: [Method] f`1 # 45| -1: [TypeMention] Void #-----| 1: (Type parameters) # 45| 0: [TypeParameter] X @@ -339,17 +339,17 @@ generics.cs: #-----| 1: (Type parameters) # 48| 0: [TypeParameter] T1 # 48| 1: [TypeParameter] T2 -# 51| 5: [Class] Inner`2 +# 51| 6: [Class] Inner`2 #-----| 1: (Type parameters) # 51| 0: [TypeParameter] U1 # 51| 1: [TypeParameter] U2 -# 54| 5: [Field] t +# 54| 6: [Field] t # 54| -1: [TypeMention] T1 -# 55| 6: [Field] myFunc +# 55| 7: [Field] myFunc # 55| -1: [TypeMention] Func # 55| 1: [TypeMention] U1 # 55| 2: [TypeMention] T1 -# 56| 7: [Method] MyMethod`2 +# 56| 8: [Method] MyMethod`2 # 56| -1: [TypeMention] Void #-----| 1: (Type parameters) # 56| 0: [TypeParameter] W1 @@ -368,13 +368,13 @@ generics.cs: # 60| 6: [Class] Grid`1 #-----| 1: (Type parameters) # 60| 0: [TypeParameter] T -# 63| 5: [Field] NumRows +# 63| 6: [Field] NumRows # 63| -1: [TypeMention] int # 63| 1: [IntLiteral] 26 -# 64| 6: [Field] NumCols +# 64| 7: [Field] NumCols # 64| -1: [TypeMention] int # 64| 1: [IntLiteral] 10 -# 66| 7: [Field] cells +# 66| 8: [Field] cells # 66| -1: [TypeMention] T[,] # 66| 1: [TypeMention] T # 66| 1: [ArrayCreation] array creation of type T[,] @@ -382,7 +382,7 @@ generics.cs: # 66| 1: [TypeMention] T # 66| 0: [MemberConstantAccess] access to constant NumRows # 66| 1: [MemberConstantAccess] access to constant NumCols -# 68| 8: [Indexer] Item +# 68| 9: [Indexer] Item # 68| -1: [TypeMention] int #-----| 1: (Parameters) # 68| 0: [Parameter] i @@ -393,7 +393,7 @@ generics.cs: # 70| 4: [BlockStmt] {...} # 70| 0: [ReturnStmt] return ...; # 70| 0: [ParameterAccess] access to parameter i -# 73| 9: [Indexer] Item +# 73| 10: [Indexer] Item # 73| -1: [TypeMention] T #-----| 1: (Parameters) # 73| 0: [Parameter] c @@ -502,7 +502,7 @@ generics.cs: # 99| 1: [ParameterAccess] access to parameter col # 99| 1: [ParameterAccess] access to parameter value # 105| 7: [Class] Test -# 108| 5: [Method] Main +# 108| 6: [Method] Main # 108| -1: [TypeMention] Void # 109| 4: [BlockStmt] {...} # 110| 0: [LocalVariableDeclStmt] ... ...; @@ -605,7 +605,7 @@ generics.cs: # 128| 0: [ObjectCreation] object creation of type Test # 128| 0: [TypeMention] Test # 128| 1: [IntLiteral] 2 -# 131| 6: [Method] f +# 131| 7: [Method] f # 131| -1: [TypeMention] string #-----| 2: (Parameters) # 131| 0: [Parameter] s @@ -614,7 +614,7 @@ generics.cs: # 131| 0: [ReturnStmt] return ...; # 131| 0: [ParameterAccess] access to parameter s # 135| 8: [Class] Subtle -# 138| 5: [Method] fs`1 +# 138| 6: [Method] fs`1 # 138| -1: [TypeMention] Void #-----| 1: (Type parameters) # 138| 0: [TypeParameter] X @@ -622,7 +622,7 @@ generics.cs: # 138| 0: [Parameter] i # 138| -1: [TypeMention] int # 138| 4: [BlockStmt] {...} -# 140| 6: [Method] fs`1 +# 140| 7: [Method] fs`1 # 140| -1: [TypeMention] Void #-----| 1: (Type parameters) # 140| 0: [TypeParameter] X @@ -632,7 +632,7 @@ generics.cs: # 140| 1: [Parameter] j # 140| -1: [TypeMention] int # 140| 4: [BlockStmt] {...} -# 142| 7: [Method] fs +# 142| 8: [Method] fs # 142| -1: [TypeMention] Void #-----| 2: (Parameters) # 142| 0: [Parameter] i @@ -641,15 +641,15 @@ generics.cs: # 146| 9: [Class] Param`1 #-----| 1: (Type parameters) # 146| 0: [TypeParameter] T -# 148| 5: [Enum] E +# 148| 6: [Enum] E # 148| 5: [Field] x # 151| 10: [Class] ConstructedMethods -# 153| 7: [Method] CM1`1 +# 153| 8: [Method] CM1`1 # 153| -1: [TypeMention] Void #-----| 1: (Type parameters) # 153| 0: [TypeParameter] T # 153| 4: [BlockStmt] {...} -# 154| 10: [Method] CM2`1 +# 154| 11: [Method] CM2`1 # 154| -1: [TypeMention] T #-----| 1: (Type parameters) # 154| 0: [TypeParameter] T @@ -659,10 +659,10 @@ generics.cs: # 154| 4: [BlockStmt] {...} # 154| 0: [ReturnStmt] return ...; # 154| 0: [ParameterAccess] access to parameter t -# 156| 13: [Class] Class`1 +# 156| 14: [Class] Class`1 #-----| 1: (Type parameters) # 156| 0: [TypeParameter] T1 -# 158| 5: [Method] CM3`1 +# 158| 6: [Method] CM3`1 # 158| -1: [TypeMention] T2 #-----| 1: (Type parameters) # 158| 0: [TypeParameter] T2 @@ -674,10 +674,10 @@ generics.cs: # 158| 4: [BlockStmt] {...} # 158| 0: [ReturnStmt] return ...; # 158| 0: [ParameterAccess] access to parameter t -# 161| 14: [Method] NonCM +# 161| 15: [Method] NonCM # 161| -1: [TypeMention] Void # 161| 4: [BlockStmt] {...} -# 163| 15: [Method] CM +# 163| 16: [Method] CM # 163| -1: [TypeMention] Void # 164| 4: [BlockStmt] {...} # 165| 0: [ExprStmt] ...; @@ -718,14 +718,14 @@ generics.cs: #-----| 3: (Base types) # 179| 1: [TypeMention] Interface # 179| 1: [TypeMention] T -# 181| 5: [Method] set +# 181| 6: [Method] set # 181| -1: [TypeMention] Void #-----| 2: (Parameters) # 181| 0: [Parameter] t # 181| -1: [TypeMention] T # 181| 4: [BlockStmt] {...} # 184| 13: [Class] InheritanceTest -# 186| 5: [Field] member +# 186| 6: [Field] member # 186| -1: [TypeMention] Inheritance # 186| 1: [TypeMention] int # 189| 14: [Interface] Interface2`2 diff --git a/csharp/ql/test/library-tests/goto/Goto1.expected b/csharp/ql/test/library-tests/goto/Goto1.expected index 0baaf5ef723..137c1b7241c 100644 --- a/csharp/ql/test/library-tests/goto/Goto1.expected +++ b/csharp/ql/test/library-tests/goto/Goto1.expected @@ -1,6 +1,8 @@ | goto.cs:2:7:2:10 | call to constructor Object | goto.cs:2:7:2:10 | {...} | semmle.label | successor | -| goto.cs:2:7:2:10 | enter Goto | goto.cs:2:7:2:10 | call to constructor Object | semmle.label | successor | +| goto.cs:2:7:2:10 | call to method | goto.cs:2:7:2:10 | call to constructor Object | semmle.label | successor | +| goto.cs:2:7:2:10 | enter Goto | goto.cs:2:7:2:10 | this access | semmle.label | successor | | goto.cs:2:7:2:10 | exit Goto (normal) | goto.cs:2:7:2:10 | exit Goto | semmle.label | successor | +| goto.cs:2:7:2:10 | this access | goto.cs:2:7:2:10 | call to method | semmle.label | successor | | goto.cs:2:7:2:10 | {...} | goto.cs:2:7:2:10 | exit Goto (normal) | semmle.label | successor | | goto.cs:4:17:4:20 | enter Main | goto.cs:5:5:20:5 | {...} | semmle.label | successor | | goto.cs:4:17:4:20 | exit Main (normal) | goto.cs:4:17:4:20 | exit Main | semmle.label | successor | diff --git a/csharp/ql/test/library-tests/goto/PrintAst.expected b/csharp/ql/test/library-tests/goto/PrintAst.expected index a6ecfb8c301..e90947ed979 100644 --- a/csharp/ql/test/library-tests/goto/PrintAst.expected +++ b/csharp/ql/test/library-tests/goto/PrintAst.expected @@ -1,6 +1,6 @@ goto.cs: # 2| [Class] Goto -# 4| 5: [Method] Main +# 4| 6: [Method] Main # 4| -1: [TypeMention] Void # 5| 4: [BlockStmt] {...} # 6| 0: [BlockStmt] {...} diff --git a/csharp/ql/test/library-tests/implicittostring/implicitToString.expected b/csharp/ql/test/library-tests/implicittostring/implicitToString.expected index 14efebf2320..e42817cc306 100644 --- a/csharp/ql/test/library-tests/implicittostring/implicitToString.expected +++ b/csharp/ql/test/library-tests/implicittostring/implicitToString.expected @@ -1,3 +1,8 @@ +| implicitToString.cs:3:14:3:33 | call to method | TestImplicitToString | +| implicitToString.cs:5:18:5:26 | call to method | Container | +| implicitToString.cs:13:18:13:27 | call to method | Container2 | +| implicitToString.cs:15:18:15:27 | call to method | Container3 | +| implicitToString.cs:17:18:17:37 | call to method | FormattableContainer | | implicitToString.cs:35:27:35:35 | call to method ToString | Container | | implicitToString.cs:37:22:37:30 | call to method ToString | Container | | implicitToString.cs:39:22:39:30 | call to method ToString | Container | diff --git a/csharp/ql/test/library-tests/indexers/PrintAst.expected b/csharp/ql/test/library-tests/indexers/PrintAst.expected index 6f9fde00e24..93160309c79 100644 --- a/csharp/ql/test/library-tests/indexers/PrintAst.expected +++ b/csharp/ql/test/library-tests/indexers/PrintAst.expected @@ -1,12 +1,12 @@ indexers.cs: # 5| [NamespaceDeclaration] namespace ... { ... } # 8| 1: [Class] BitArray -# 11| 4: [Field] bits +# 11| 5: [Field] bits # 11| -1: [TypeMention] Int32[] # 11| 1: [TypeMention] int -# 12| 5: [Field] length +# 12| 6: [Field] length # 12| -1: [TypeMention] int -# 14| 6: [InstanceConstructor] BitArray +# 14| 7: [InstanceConstructor] BitArray #-----| 2: (Parameters) # 14| 0: [Parameter] length # 14| -1: [TypeMention] int @@ -36,13 +36,13 @@ indexers.cs: # 19| 0: [FieldAccess] access to field length # 19| -1: [ThisAccess] this access # 19| 1: [ParameterAccess] access to parameter length -# 22| 7: [Property] Length +# 22| 8: [Property] Length # 22| -1: [TypeMention] int # 22| 3: [Getter] get_Length # 22| 4: [BlockStmt] {...} # 22| 0: [ReturnStmt] return ...; # 22| 0: [FieldAccess] access to field length -# 24| 8: [Indexer] Item +# 24| 9: [Indexer] Item # 24| -1: [TypeMention] bool #-----| 1: (Parameters) # 24| 0: [Parameter] index @@ -118,7 +118,7 @@ indexers.cs: # 46| 0: [IntLiteral] 1 # 46| 1: [ParameterAccess] access to parameter index # 53| 2: [Class] CountPrimes -# 56| 5: [Method] Count +# 56| 6: [Method] Count # 56| -1: [TypeMention] int #-----| 2: (Parameters) # 56| 0: [Parameter] max @@ -179,7 +179,7 @@ indexers.cs: # 66| 0: [LocalVariableAccess] access to local variable count # 69| 3: [ReturnStmt] return ...; # 69| 0: [LocalVariableAccess] access to local variable count -# 72| 6: [Method] Main +# 72| 7: [Method] Main # 72| -1: [TypeMention] Void #-----| 2: (Parameters) # 72| 0: [Parameter] args @@ -212,13 +212,13 @@ indexers.cs: # 76| 2: [CastExpr] (...) ... # 76| 1: [LocalVariableAccess] access to local variable max # 81| 3: [Class] Grid -# 84| 5: [Field] NumRows +# 84| 6: [Field] NumRows # 84| -1: [TypeMention] int # 84| 1: [IntLiteral] 26 -# 85| 6: [Field] NumCols +# 85| 7: [Field] NumCols # 85| -1: [TypeMention] int # 85| 1: [IntLiteral] 10 -# 87| 7: [Field] cells +# 87| 8: [Field] cells # 87| -1: [TypeMention] Int32[,] # 87| 1: [TypeMention] int # 87| 1: [ArrayCreation] array creation of type Int32[,] @@ -226,7 +226,7 @@ indexers.cs: # 87| 1: [TypeMention] int # 87| 0: [MemberConstantAccess] access to constant NumRows # 87| 1: [MemberConstantAccess] access to constant NumCols -# 89| 8: [Indexer] Item +# 89| 9: [Indexer] Item # 89| -1: [TypeMention] int #-----| 1: (Parameters) # 89| 0: [Parameter] c @@ -335,7 +335,7 @@ indexers.cs: # 115| 1: [ParameterAccess] access to parameter col # 115| 1: [ParameterAccess] access to parameter value # 121| 4: [Class] DuplicateIndexerSignatures -# 123| 5: [Indexer] Item +# 123| 6: [Indexer] Item # 123| -1: [TypeMention] bool #-----| 1: (Parameters) # 123| 0: [Parameter] index @@ -346,7 +346,7 @@ indexers.cs: # 125| 4: [BlockStmt] {...} # 125| 0: [ReturnStmt] return ...; # 125| 0: [BoolLiteral] false -# 128| 6: [Indexer] Item +# 128| 7: [Indexer] Item # 128| -1: [TypeMention] int #-----| 1: (Parameters) # 128| 0: [Parameter] c diff --git a/csharp/ql/test/library-tests/initializers/PrintAst.expected b/csharp/ql/test/library-tests/initializers/PrintAst.expected index 29b7ca47003..f59bb2f135f 100644 --- a/csharp/ql/test/library-tests/initializers/PrintAst.expected +++ b/csharp/ql/test/library-tests/initializers/PrintAst.expected @@ -1,14 +1,14 @@ initializers.cs: # 3| [Class] S1 -# 5| 5: [Field] P1 +# 5| 6: [Field] P1 # 5| -1: [TypeMention] int -# 6| 6: [Property] P2 +# 6| 7: [Property] P2 # 6| -1: [TypeMention] int # 6| 3: [Getter] get_P2 # 6| 4: [Setter] set_P2 #-----| 2: (Parameters) # 6| 0: [Parameter] value -# 7| 7: [Property] P3 +# 7| 8: [Property] P3 # 7| -1: [TypeMention] int # 7| 3: [Setter] set_P3 #-----| 2: (Parameters) @@ -17,13 +17,13 @@ initializers.cs: # 10| [Class] S2 #-----| 3: (Base types) # 10| 1: [TypeMention] IEnumerable -# 12| 5: [Method] Add +# 12| 6: [Method] Add # 12| -1: [TypeMention] Void #-----| 2: (Parameters) # 12| 0: [Parameter] x # 12| -1: [TypeMention] int # 12| 4: [BlockStmt] {...} -# 13| 6: [Method] Add +# 13| 7: [Method] Add # 13| -1: [TypeMention] Void #-----| 2: (Parameters) # 13| 0: [Parameter] x @@ -31,13 +31,13 @@ initializers.cs: # 13| 1: [Parameter] y # 13| -1: [TypeMention] int # 13| 4: [BlockStmt] {...} -# 14| 7: [Method] GetEnumerator +# 14| 8: [Method] GetEnumerator # 14| -1: [TypeMention] IEnumerator # 14| 4: [BlockStmt] {...} # 14| 0: [ReturnStmt] return ...; # 14| 0: [NullLiteral] null # 17| [Class] Test -# 19| 5: [Method] Main +# 19| 6: [Method] Main # 19| -1: [TypeMention] Void #-----| 2: (Parameters) # 19| 0: [Parameter] args diff --git a/csharp/ql/test/library-tests/linq/PrintAst.expected b/csharp/ql/test/library-tests/linq/PrintAst.expected index fee8ab80ee2..c16babcf270 100644 --- a/csharp/ql/test/library-tests/linq/PrintAst.expected +++ b/csharp/ql/test/library-tests/linq/PrintAst.expected @@ -1,6 +1,6 @@ queries.cs: # 5| [Class] Queries -# 7| 5: [Method] Queries1 +# 7| 6: [Method] Queries1 # 7| -1: [TypeMention] Void # 8| 4: [BlockStmt] {...} # 9| 0: [LocalVariableDeclStmt] ... ...; @@ -204,19 +204,19 @@ queries.cs: # 56| 1: [TupleExpr] (..., ...) # 56| 0: [LocalVariableAccess] access to local variable a # 56| 1: [LocalVariableAccess] access to local variable d -# 59| 6: [Class] A +# 59| 7: [Class] A #-----| 3: (Base types) # 59| 1: [TypeMention] IEnumerable -# 61| 5: [Method] GetEnumerator +# 61| 6: [Method] GetEnumerator # 61| -1: [TypeMention] IEnumerator # 62| 4: [BlockStmt] {...} # 63| 0: [ThrowStmt] throw ...; # 63| 0: [ObjectCreation] object creation of type NotImplementedException # 63| 0: [TypeMention] NotImplementedException -# 67| 7: [Class] B +# 67| 8: [Class] B #-----| 3: (Base types) # 67| 0: [TypeMention] A -# 69| 8: [Class] C +# 69| 9: [Class] C #-----| 3: (Base types) # 69| 0: [TypeMention] List # 69| 1: [TypeMention] int diff --git a/csharp/ql/test/library-tests/locations/locations.expected b/csharp/ql/test/library-tests/locations/locations.expected index d41369ddcd4..1d19fc3f0c5 100644 --- a/csharp/ql/test/library-tests/locations/locations.expected +++ b/csharp/ql/test/library-tests/locations/locations.expected @@ -19,6 +19,7 @@ member_locations | A.cs:3:23:3:26 | A | A.cs:12:12:12:12 | A | A.cs:12:12:12:12 | A.cs:12:12:12:12 | | A.cs:3:23:3:26 | A | A.cs:13:6:13:6 | ~A | A.cs:13:6:13:6 | A.cs:13:6:13:6 | | A.cs:3:23:3:26 | A | A.cs:14:33:14:33 | + | A.cs:14:33:14:33 | A.cs:14:33:14:33 | +| A.cs:3:23:3:26 | A`1 | A.cs:3:23:3:26 | | A.cs:3:23:3:26 | A.cs:3:23:3:26 | | A.cs:3:23:3:26 | A`1 | A.cs:5:23:5:26 | Prop | A.cs:5:23:5:26 | A.cs:5:23:5:26 | | A.cs:3:23:3:26 | A`1 | A.cs:6:23:6:26 | Item | A.cs:6:23:6:26 | A.cs:6:23:6:26 | | A.cs:3:23:3:26 | A`1 | A.cs:7:40:7:44 | Event | A.cs:7:40:7:44 | A.cs:7:40:7:44 | @@ -29,12 +30,14 @@ member_locations | A.cs:3:23:3:26 | A`1 | A.cs:12:12:12:12 | A | A.cs:12:12:12:12 | A.cs:12:12:12:12 | | A.cs:3:23:3:26 | A`1 | A.cs:13:6:13:6 | ~A | A.cs:13:6:13:6 | A.cs:13:6:13:6 | | A.cs:3:23:3:26 | A`1 | A.cs:14:33:14:33 | + | A.cs:14:33:14:33 | A.cs:14:33:14:33 | +| A.cs:17:14:17:15 | A2 | A.cs:17:14:17:15 | | A.cs:17:14:17:15 | A.cs:17:14:17:15 | | A.cs:17:14:17:15 | A2 | A.cs:17:14:17:15 | A2 | A.cs:17:14:17:15 | A.cs:17:14:17:15 | | A.cs:17:14:17:15 | A2 | A.cs:19:28:19:31 | Prop | A.cs:19:28:19:31 | A.cs:19:28:19:31 | | A.cs:17:14:17:15 | A2 | A.cs:21:28:21:31 | Item | A.cs:21:28:21:31 | A.cs:21:28:21:31 | | A.cs:17:14:17:15 | A2 | A.cs:27:40:27:44 | Event | A.cs:27:40:27:44 | A.cs:27:40:27:44 | | A.cs:17:14:17:15 | A2 | A.cs:33:28:33:35 | ToObject | A.cs:33:28:33:35 | A.cs:33:28:33:35 | | A.cs:17:14:17:15 | A2 | A.cs:35:17:35:17 | M | A.cs:35:17:35:17 | A.cs:35:17:35:17 | +| B.cs:3:14:3:14 | B | B.cs:3:14:3:14 | | B.cs:3:14:3:14 | B.cs:3:14:3:14 | | B.cs:3:14:3:14 | B | B.cs:3:14:3:14 | B | B.cs:3:14:3:14 | B.cs:3:14:3:14 | | B.cs:3:14:3:14 | B | B.cs:5:25:5:28 | Prop | B.cs:5:25:5:28 | B.cs:5:25:5:28 | | B.cs:3:14:3:14 | B | B.cs:7:25:7:28 | Item | B.cs:7:25:7:28 | B.cs:7:25:7:28 | @@ -44,21 +47,32 @@ member_locations | Base.cs:1:23:1:29 | Base | Base.cs:3:17:3:17 | M | Base.cs:3:17:3:17 | Base.cs:3:17:3:17 | | Base.cs:1:23:1:29 | Base | Base.cs:5:18:5:26 | InnerBase | Base.cs:5:18:5:26 | Base.cs:5:18:5:26 | | Base.cs:1:23:1:29 | Base`1 | Base.cs:1:23:1:26 | Base | Base.cs:1:23:1:26 | Base.cs:1:23:1:26 | +| Base.cs:1:23:1:29 | Base`1 | Base.cs:1:23:1:29 | | Base.cs:1:23:1:29 | Base.cs:1:23:1:29 | | Base.cs:1:23:1:29 | Base`1 | Base.cs:3:17:3:17 | M | Base.cs:3:17:3:17 | Base.cs:3:17:3:17 | | Base.cs:1:23:1:29 | Base`1 | Base.cs:5:18:5:26 | InnerBase | Base.cs:5:18:5:26 | Base.cs:5:18:5:26 | +| Base.cs:5:18:5:26 | InnerBase | Base.cs:5:18:5:26 | | Base.cs:5:18:5:26 | Base.cs:5:18:5:26 | | Base.cs:5:18:5:26 | InnerBase | Base.cs:5:18:5:26 | InnerBase | Base.cs:5:18:5:26 | Base.cs:5:18:5:26 | | Base.cs:5:18:5:26 | InnerBase | Base.cs:5:18:5:26 | InnerBase | Base.cs:5:18:5:26 | Base.cs:5:18:5:26 | | Base.cs:8:23:8:30 | Base2`1 | Base.cs:8:23:8:27 | Base2 | Base.cs:8:23:8:27 | Base.cs:8:23:8:27 | +| Base.cs:8:23:8:30 | Base2`1 | Base.cs:8:23:8:30 | | Base.cs:8:23:8:30 | Base.cs:8:23:8:30 | +| C.cs:3:7:3:7 | C | C.cs:3:7:3:7 | | C.cs:3:7:3:7 | C.cs:3:7:3:7 | | C.cs:3:7:3:7 | C | C.cs:3:7:3:7 | C | C.cs:3:7:3:7 | C.cs:3:7:3:7 | | C.cs:3:7:3:7 | C | C.cs:5:17:5:17 | M | C.cs:5:17:5:17 | C.cs:5:17:5:17 | +| Multiple1.cs:1:22:1:29 | Multiple | Multiple1.cs:1:22:1:29 | | Multiple1.cs:1:22:1:29 | Multiple1.cs:1:22:1:29 | | Multiple1.cs:1:22:1:29 | Multiple | Multiple1.cs:1:22:1:29 | Multiple | Multiple1.cs:1:22:1:29 | Multiple1.cs:1:22:1:29 | | Multiple1.cs:3:22:3:39 | MultipleGeneric`1 | Multiple1.cs:3:22:3:36 | MultipleGeneric | Multiple1.cs:3:22:3:36 | Multiple1.cs:3:22:3:36 | +| Multiple1.cs:3:22:3:39 | MultipleGeneric`1 | Multiple1.cs:3:22:3:39 | | Multiple1.cs:3:22:3:39 | Multiple1.cs:3:22:3:39 | +| Multiple1.cs:5:14:5:30 | Multiple1Specific | Multiple1.cs:5:14:5:30 | | Multiple1.cs:5:14:5:30 | Multiple1.cs:5:14:5:30 | | Multiple1.cs:5:14:5:30 | Multiple1Specific | Multiple1.cs:5:14:5:30 | Multiple1Specific | Multiple1.cs:5:14:5:30 | Multiple1.cs:5:14:5:30 | | Multiple1.cs:5:14:5:30 | Multiple1Specific | Multiple1.cs:7:33:7:33 | M | Multiple1.cs:7:33:7:33 | Multiple1.cs:7:33:7:33 | +| Multiple2.cs:1:22:1:29 | Multiple | Multiple1.cs:1:22:1:29 | | Multiple1.cs:1:22:1:29 | Multiple1.cs:1:22:1:29 | | Multiple2.cs:1:22:1:29 | Multiple | Multiple1.cs:1:22:1:29 | Multiple | Multiple1.cs:1:22:1:29 | Multiple1.cs:1:22:1:29 | | Multiple2.cs:3:22:3:39 | MultipleGeneric`1 | Multiple1.cs:3:22:3:36 | MultipleGeneric | Multiple1.cs:3:22:3:36 | Multiple1.cs:3:22:3:36 | +| Multiple2.cs:3:22:3:39 | MultipleGeneric`1 | Multiple1.cs:3:22:3:39 | | Multiple1.cs:3:22:3:39 | Multiple1.cs:3:22:3:39 | +| Multiple2.cs:5:14:5:30 | Multiple2Specific | Multiple2.cs:5:14:5:30 | | Multiple2.cs:5:14:5:30 | Multiple2.cs:5:14:5:30 | | Multiple2.cs:5:14:5:30 | Multiple2Specific | Multiple2.cs:5:14:5:30 | Multiple2Specific | Multiple2.cs:5:14:5:30 | Multiple2.cs:5:14:5:30 | | Multiple2.cs:5:14:5:30 | Multiple2Specific | Multiple2.cs:7:17:7:17 | M | Multiple2.cs:7:17:7:17 | Multiple2.cs:7:17:7:17 | +| Sub.cs:1:14:1:16 | Sub | Sub.cs:1:14:1:16 | | Sub.cs:1:14:1:16 | Sub.cs:1:14:1:16 | | Sub.cs:1:14:1:16 | Sub | Sub.cs:1:14:1:16 | Sub | Sub.cs:1:14:1:16 | Sub.cs:1:14:1:16 | | Sub.cs:1:14:1:16 | Sub | Sub.cs:3:17:3:20 | SubM | Sub.cs:3:17:3:20 | Sub.cs:3:17:3:20 | accessor_location diff --git a/csharp/ql/test/library-tests/members/PrintAst.expected b/csharp/ql/test/library-tests/members/PrintAst.expected index c8fe6fbf5d9..3d1f4a344a4 100644 --- a/csharp/ql/test/library-tests/members/PrintAst.expected +++ b/csharp/ql/test/library-tests/members/PrintAst.expected @@ -7,8 +7,8 @@ Members.cs: # 3| 1: [Parameter] e # 3| -1: [TypeMention] object # 6| 2: [Class] Class -# 9| 5: [Class] NestedClass -# 12| 5: [Method] Method`1 +# 9| 6: [Class] NestedClass +# 12| 6: [Method] Method`1 # 12| -1: [TypeMention] string #-----| 1: (Type parameters) # 12| 0: [TypeParameter] T @@ -17,7 +17,7 @@ Members.cs: # 12| -1: [TypeMention] T # 12| 4: [MethodCall] call to method ToString # 12| -1: [ParameterAccess] access to parameter t -# 14| 6: [Indexer] Item +# 14| 7: [Indexer] Item # 14| -1: [TypeMention] string #-----| 1: (Parameters) # 14| 0: [Parameter] i @@ -32,15 +32,15 @@ Members.cs: # 14| 0: [Parameter] i # 14| 1: [Parameter] value # 14| 4: [BlockStmt] {...} -# 16| 7: [Field] Field +# 16| 8: [Field] Field # 16| -1: [TypeMention] string -# 18| 8: [Property] Prop +# 18| 9: [Property] Prop # 18| -1: [TypeMention] string # 18| 3: [Getter] get_Prop # 18| 4: [Setter] set_Prop #-----| 2: (Parameters) # 18| 0: [Parameter] value -# 20| 9: [Event] Event +# 20| 10: [Event] Event # 20| -1: [TypeMention] EventHandler # 20| 3: [AddEventAccessor] add_Event #-----| 2: (Parameters) @@ -48,10 +48,10 @@ Members.cs: # 20| 4: [RemoveEventAccessor] remove_Event #-----| 2: (Parameters) # 20| 0: [Parameter] value -# 24| 6: [Method] Method +# 24| 7: [Method] Method # 24| -1: [TypeMention] Void # 24| 4: [BlockStmt] {...} -# 26| 7: [Indexer] Item +# 26| 8: [Indexer] Item # 26| -1: [TypeMention] string #-----| 1: (Parameters) # 26| 0: [Parameter] i @@ -66,15 +66,15 @@ Members.cs: # 26| 0: [Parameter] i # 26| 1: [Parameter] value # 26| 4: [BlockStmt] {...} -# 28| 8: [Field] Field +# 28| 9: [Field] Field # 28| -1: [TypeMention] string -# 30| 9: [Property] Prop +# 30| 10: [Property] Prop # 30| -1: [TypeMention] string # 30| 3: [Getter] get_Prop # 30| 4: [Setter] set_Prop #-----| 2: (Parameters) # 30| 0: [Parameter] value -# 32| 10: [Event] Event +# 32| 11: [Event] Event # 32| -1: [TypeMention] EventHandler # 32| 3: [AddEventAccessor] add_Event #-----| 2: (Parameters) @@ -83,8 +83,8 @@ Members.cs: #-----| 2: (Parameters) # 32| 0: [Parameter] value # 35| 3: [Class] Class2 -# 37| 5: [Class] NestedClass2 -# 39| 5: [Method] Method`1 +# 37| 6: [Class] NestedClass2 +# 39| 6: [Method] Method`1 # 39| -1: [TypeMention] string #-----| 1: (Type parameters) # 39| 0: [TypeParameter] T @@ -93,7 +93,7 @@ Members.cs: # 39| -1: [TypeMention] T # 39| 4: [MethodCall] call to method ToString # 39| -1: [ParameterAccess] access to parameter t -# 40| 6: [Indexer] Item +# 40| 7: [Indexer] Item # 40| -1: [TypeMention] string #-----| 1: (Parameters) # 40| 0: [Parameter] i @@ -108,15 +108,15 @@ Members.cs: # 40| 0: [Parameter] i # 40| 1: [Parameter] value # 40| 4: [BlockStmt] {...} -# 41| 7: [Field] Field +# 41| 8: [Field] Field # 41| -1: [TypeMention] string -# 42| 8: [Property] Prop +# 42| 9: [Property] Prop # 42| -1: [TypeMention] string # 42| 3: [Getter] get_Prop # 42| 4: [Setter] set_Prop #-----| 2: (Parameters) # 42| 0: [Parameter] value -# 43| 9: [Event] Event +# 43| 10: [Event] Event # 43| -1: [TypeMention] EventHandler # 43| 3: [AddEventAccessor] add_Event #-----| 2: (Parameters) @@ -124,10 +124,10 @@ Members.cs: # 43| 4: [RemoveEventAccessor] remove_Event #-----| 2: (Parameters) # 43| 0: [Parameter] value -# 46| 6: [Method] Method +# 46| 7: [Method] Method # 46| -1: [TypeMention] Void # 46| 4: [BlockStmt] {...} -# 47| 7: [Indexer] Item +# 47| 8: [Indexer] Item # 47| -1: [TypeMention] string #-----| 1: (Parameters) # 47| 0: [Parameter] i @@ -142,15 +142,15 @@ Members.cs: # 47| 0: [Parameter] i # 47| 1: [Parameter] value # 47| 4: [BlockStmt] {...} -# 48| 8: [Field] Field +# 48| 9: [Field] Field # 48| -1: [TypeMention] string -# 49| 9: [Property] Prop +# 49| 10: [Property] Prop # 49| -1: [TypeMention] string # 49| 3: [Getter] get_Prop # 49| 4: [Setter] set_Prop #-----| 2: (Parameters) # 49| 0: [Parameter] value -# 50| 10: [Event] Event +# 50| 11: [Event] Event # 50| -1: [TypeMention] EventHandler # 50| 3: [AddEventAccessor] add_Event #-----| 2: (Parameters) diff --git a/csharp/ql/test/library-tests/methods/Methods5.ql b/csharp/ql/test/library-tests/methods/Methods5.ql index b7c74d24d13..eb2980a17da 100644 --- a/csharp/ql/test/library-tests/methods/Methods5.ql +++ b/csharp/ql/test/library-tests/methods/Methods5.ql @@ -1,5 +1,5 @@ /** - * @name Tests call graph. + * @name Tests call graph */ import csharp diff --git a/csharp/ql/test/library-tests/methods/PrintAst.expected b/csharp/ql/test/library-tests/methods/PrintAst.expected index 42268fdc89d..4810c6c0b5b 100644 --- a/csharp/ql/test/library-tests/methods/PrintAst.expected +++ b/csharp/ql/test/library-tests/methods/PrintAst.expected @@ -1,7 +1,7 @@ methods.cs: # 4| [NamespaceDeclaration] namespace ... { ... } # 7| 1: [Class] TestRef -# 10| 5: [Method] Swap +# 10| 6: [Method] Swap # 10| -1: [TypeMention] Void #-----| 2: (Parameters) # 10| 0: [Parameter] x @@ -22,7 +22,7 @@ methods.cs: # 14| 0: [AssignExpr] ... = ... # 14| 0: [ParameterAccess] access to parameter y # 14| 1: [LocalVariableAccess] access to local variable temp -# 17| 6: [Method] Main +# 17| 7: [Method] Main # 17| -1: [TypeMention] Void # 18| 4: [BlockStmt] {...} # 19| 0: [LocalVariableDeclStmt] ... ...; @@ -57,7 +57,7 @@ methods.cs: # 22| 2: [CastExpr] (...) ... # 22| 1: [LocalVariableAccess] access to local variable j # 26| 2: [Class] TestOut -# 29| 5: [Method] Divide +# 29| 6: [Method] Divide # 29| -1: [TypeMention] Void #-----| 2: (Parameters) # 29| 0: [Parameter] x @@ -81,7 +81,7 @@ methods.cs: # 32| 1: [RemExpr] ... % ... # 32| 0: [ParameterAccess] access to parameter x # 32| 1: [ParameterAccess] access to parameter y -# 35| 6: [Method] Main +# 35| 7: [Method] Main # 35| -1: [TypeMention] Void # 36| 4: [BlockStmt] {...} # 37| 0: [LocalVariableDeclStmt] ... ...; @@ -105,7 +105,7 @@ methods.cs: # 39| 2: [CastExpr] (...) ... # 39| 1: [LocalVariableAccess] access to local variable rem # 43| 3: [Class] Console -# 46| 5: [Method] Write +# 46| 6: [Method] Write # 46| -1: [TypeMention] Void #-----| 2: (Parameters) # 46| 0: [Parameter] fmt @@ -114,7 +114,7 @@ methods.cs: # 46| -1: [TypeMention] Object[] # 46| 1: [TypeMention] object # 46| 4: [BlockStmt] {...} -# 47| 6: [Method] WriteLine +# 47| 7: [Method] WriteLine # 47| -1: [TypeMention] Void #-----| 2: (Parameters) # 47| 0: [Parameter] fmt @@ -124,7 +124,7 @@ methods.cs: # 47| 1: [TypeMention] object # 47| 4: [BlockStmt] {...} # 50| 4: [Class] TestOverloading -# 53| 5: [Method] F +# 53| 6: [Method] F # 53| -1: [TypeMention] Void # 54| 4: [BlockStmt] {...} # 55| 0: [ExprStmt] ...; @@ -132,7 +132,7 @@ methods.cs: # 55| -1: [TypeAccess] access to type Console # 55| 0: [TypeMention] Console # 55| 0: [StringLiteralUtf16] "F()" -# 58| 6: [Method] F +# 58| 7: [Method] F # 58| -1: [TypeMention] Void #-----| 2: (Parameters) # 58| 0: [Parameter] x @@ -143,7 +143,7 @@ methods.cs: # 60| -1: [TypeAccess] access to type Console # 60| 0: [TypeMention] Console # 60| 0: [StringLiteralUtf16] "F(object)" -# 63| 7: [Method] F +# 63| 8: [Method] F # 63| -1: [TypeMention] Void #-----| 2: (Parameters) # 63| 0: [Parameter] x @@ -154,7 +154,7 @@ methods.cs: # 65| -1: [TypeAccess] access to type Console # 65| 0: [TypeMention] Console # 65| 0: [StringLiteralUtf16] "F(int)" -# 68| 8: [Method] F +# 68| 9: [Method] F # 68| -1: [TypeMention] Void #-----| 2: (Parameters) # 68| 0: [Parameter] x @@ -165,7 +165,7 @@ methods.cs: # 70| -1: [TypeAccess] access to type Console # 70| 0: [TypeMention] Console # 70| 0: [StringLiteralUtf16] "F(double)" -# 73| 11: [Method] F`1 +# 73| 12: [Method] F`1 # 73| -1: [TypeMention] Void #-----| 1: (Type parameters) # 73| 0: [TypeParameter] T @@ -178,7 +178,7 @@ methods.cs: # 75| -1: [TypeAccess] access to type Console # 75| 0: [TypeMention] Console # 75| 0: [StringLiteralUtf16] "F(T)" -# 78| 12: [Method] F +# 78| 13: [Method] F # 78| -1: [TypeMention] Void #-----| 2: (Parameters) # 78| 0: [Parameter] x @@ -191,7 +191,7 @@ methods.cs: # 80| -1: [TypeAccess] access to type Console # 80| 0: [TypeMention] Console # 80| 0: [StringLiteralUtf16] "F(double, double)" -# 83| 13: [Method] Main +# 83| 14: [Method] Main # 83| -1: [TypeMention] Void # 84| 4: [BlockStmt] {...} # 85| 0: [ExprStmt] ...; @@ -352,7 +352,7 @@ methods.cs: # 135| -1: [TypeAccess] access to type Boolean # 135| 0: [TypeMention] bool # 140| 7: [Class] TestDefaultParameters -# 142| 4: [Method] Method1 +# 142| 5: [Method] Method1 # 142| -1: [TypeMention] Void #-----| 2: (Parameters) # 142| 0: [Parameter] x @@ -360,7 +360,7 @@ methods.cs: # 142| 1: [Parameter] y # 142| -1: [TypeMention] int # 143| 4: [BlockStmt] {...} -# 146| 5: [Method] Method2 +# 146| 6: [Method] Method2 # 146| -1: [TypeMention] Void #-----| 2: (Parameters) # 146| 0: [Parameter] a @@ -379,12 +379,12 @@ methods.cs: # 146| 0: [StringLiteralUtf16] "a" # 146| 1: [StringLiteralUtf16] "b" # 147| 4: [BlockStmt] {...} -# 150| 6: [InstanceConstructor] TestDefaultParameters +# 150| 7: [InstanceConstructor] TestDefaultParameters #-----| 2: (Parameters) # 150| 0: [Parameter] x # 150| -1: [TypeMention] int # 151| 4: [BlockStmt] {...} -# 154| 7: [InstanceConstructor] TestDefaultParameters +# 154| 8: [InstanceConstructor] TestDefaultParameters #-----| 2: (Parameters) # 154| 0: [Parameter] x # 154| -1: [TypeMention] string @@ -394,7 +394,7 @@ methods.cs: # 154| 1: [ObjectCreation] object creation of type Double # 154| 0: [TypeMention] double # 155| 4: [BlockStmt] {...} -# 158| 8: [DelegateType] Del +# 158| 9: [DelegateType] Del #-----| 2: (Parameters) # 158| 0: [Parameter] a # 158| -1: [TypeMention] string @@ -405,7 +405,7 @@ methods.cs: # 158| -1: [TypeMention] double # 158| 1: [ObjectCreation] object creation of type Double # 158| 0: [TypeMention] double -# 160| 9: [Indexer] Item +# 160| 10: [Indexer] Item # 160| -1: [TypeMention] int #-----| 1: (Parameters) # 160| 0: [Parameter] x @@ -477,7 +477,7 @@ methods.cs: # 185| 9: [Class] TestCollidingMethods`1 #-----| 1: (Type parameters) # 185| 0: [TypeParameter] T -# 187| 5: [Method] M +# 187| 6: [Method] M # 187| -1: [TypeMention] Void #-----| 2: (Parameters) # 187| 0: [Parameter] p1 @@ -485,7 +485,7 @@ methods.cs: # 187| 1: [Parameter] p2 # 187| -1: [TypeMention] int # 187| 4: [BlockStmt] {...} -# 188| 6: [Method] M +# 188| 7: [Method] M # 188| -1: [TypeMention] Void #-----| 2: (Parameters) # 188| 0: [Parameter] p1 @@ -493,7 +493,7 @@ methods.cs: # 188| 1: [Parameter] p2 # 188| -1: [TypeMention] int # 188| 4: [BlockStmt] {...} -# 190| 7: [Method] Calls +# 190| 8: [Method] Calls # 190| -1: [TypeMention] Void # 191| 4: [BlockStmt] {...} # 192| 0: [LocalVariableDeclStmt] ... ...; @@ -525,13 +525,13 @@ methods.cs: # 197| -1: [LocalVariableAccess] access to local variable y # 197| 0: [IntLiteral] 1 # 197| 1: [IntLiteral] 1 -# 200| 8: [Class] Nested -# 202| 4: [InstanceConstructor] Nested +# 200| 9: [Class] Nested +# 202| 5: [InstanceConstructor] Nested #-----| 2: (Parameters) # 202| 0: [Parameter] p1 # 202| -1: [TypeMention] int # 202| 4: [BlockStmt] {...} -# 203| 5: [InstanceConstructor] Nested +# 203| 6: [InstanceConstructor] Nested #-----| 2: (Parameters) # 203| 0: [Parameter] p1 # 203| -1: [TypeMention] T diff --git a/csharp/ql/test/library-tests/namespaces/PrintAst.expected b/csharp/ql/test/library-tests/namespaces/PrintAst.expected index 2b0e505ec27..88d8dbe02a7 100644 --- a/csharp/ql/test/library-tests/namespaces/PrintAst.expected +++ b/csharp/ql/test/library-tests/namespaces/PrintAst.expected @@ -26,7 +26,7 @@ namespaces.cs: # 72| 1: [Class] A`1 #-----| 1: (Type parameters) # 72| 0: [TypeParameter] T -# 75| 5: [Class] B +# 75| 6: [Class] B # 79| 2: [Class] A # 83| [NamespaceDeclaration] namespace ... { ... } # 90| [NamespaceDeclaration] namespace ... { ... } diff --git a/csharp/ql/test/library-tests/nestedtypes/PrintAst.expected b/csharp/ql/test/library-tests/nestedtypes/PrintAst.expected index 8a2f4343556..9a0c4a7f029 100644 --- a/csharp/ql/test/library-tests/nestedtypes/PrintAst.expected +++ b/csharp/ql/test/library-tests/nestedtypes/PrintAst.expected @@ -1,13 +1,13 @@ nestedtypes.cs: # 5| [NamespaceDeclaration] namespace ... { ... } # 8| 1: [Class] Base -# 11| 5: [Struct] S -# 13| 6: [Interface] I -# 15| 7: [DelegateType] MyDelegate +# 11| 6: [Struct] S +# 13| 7: [Interface] I +# 15| 8: [DelegateType] MyDelegate #-----| 2: (Parameters) # 15| 0: [Parameter] s # 15| -1: [TypeMention] S -# 17| 8: [Method] F +# 17| 9: [Method] F # 17| -1: [TypeMention] Void # 18| 4: [BlockStmt] {...} # 19| 0: [ExprStmt] ...; @@ -15,12 +15,12 @@ nestedtypes.cs: # 19| -1: [TypeAccess] access to type Console # 19| 0: [TypeMention] Console # 19| 0: [StringLiteralUtf16] "Base.F" -# 22| 9: [Class] C +# 22| 10: [Class] C # 26| 2: [Class] Derived #-----| 3: (Base types) # 26| 0: [TypeMention] Base -# 29| 5: [Class] Nested -# 32| 5: [Method] G +# 29| 6: [Class] Nested +# 32| 6: [Method] G # 32| -1: [TypeMention] Void # 33| 4: [BlockStmt] {...} # 34| 0: [LocalVariableDeclStmt] ... ...; @@ -33,7 +33,7 @@ nestedtypes.cs: # 35| 0: [MethodCall] call to method F # 35| -1: [LocalVariableAccess] access to local variable d # 42| 3: [Class] Test -# 45| 5: [Method] Main +# 45| 6: [Method] Main # 45| -1: [TypeMention] Void # 46| 4: [BlockStmt] {...} # 47| 0: [LocalVariableDeclStmt] ... ...; @@ -50,10 +50,10 @@ nestedtypes.cs: # 53| 4: [Class] Outer`1 #-----| 1: (Type parameters) # 53| 0: [TypeParameter] T -# 56| 6: [Class] Inner`1 +# 56| 7: [Class] Inner`1 #-----| 1: (Type parameters) # 56| 0: [TypeParameter] U -# 59| 5: [Method] F +# 59| 6: [Method] F # 59| -1: [TypeMention] Void #-----| 2: (Parameters) # 59| 0: [Parameter] t @@ -61,7 +61,7 @@ nestedtypes.cs: # 59| 1: [Parameter] u # 59| -1: [TypeMention] U # 59| 4: [BlockStmt] {...} -# 63| 7: [Method] F +# 63| 8: [Method] F # 63| -1: [TypeMention] Void #-----| 2: (Parameters) # 63| 0: [Parameter] t @@ -100,8 +100,8 @@ nestedtypes.cs: # 74| 5: [Class] Outer2`1 #-----| 1: (Type parameters) # 74| 0: [TypeParameter] T -# 77| 5: [Class] Inner2`1 +# 77| 6: [Class] Inner2`1 #-----| 1: (Type parameters) # 77| 0: [TypeParameter] T -# 80| 5: [Field] t +# 80| 6: [Field] t # 80| -1: [TypeMention] T diff --git a/csharp/ql/test/library-tests/nullable/NullableExpressions.expected b/csharp/ql/test/library-tests/nullable/NullableExpressions.expected index 675450ab2ee..7d66522f0b9 100644 --- a/csharp/ql/test/library-tests/nullable/NullableExpressions.expected +++ b/csharp/ql/test/library-tests/nullable/NullableExpressions.expected @@ -1,4 +1,6 @@ | 1 | 14 | nullable.cs:1:14:1:21 | Nullable | nullable.cs:1:14:1:21 | call to constructor Object | Object | +| 1 | 14 | nullable.cs:1:14:1:21 | Nullable | nullable.cs:1:14:1:21 | call to method | Void | +| 1 | 14 | nullable.cs:1:14:1:21 | call to method | nullable.cs:1:14:1:21 | this access | Nullable | | 5 | 13 | nullable.cs:5:9:6:24 | if (...) ... | nullable.cs:5:13:5:21 | ... == ... | Boolean | | 5 | 13 | nullable.cs:5:13:5:21 | ... == ... | nullable.cs:5:13:5:13 | access to parameter x | Nullable | | 5 | 18 | nullable.cs:5:13:5:21 | ... == ... | nullable.cs:5:18:5:21 | null | null | diff --git a/csharp/ql/test/library-tests/obinit/Flow.expected b/csharp/ql/test/library-tests/obinit/Flow.expected new file mode 100644 index 00000000000..a9306a762ff --- /dev/null +++ b/csharp/ql/test/library-tests/obinit/Flow.expected @@ -0,0 +1,20 @@ +edges +| obinit.cs:5:23:5:23 | [post] this access : A [field s] : String | obinit.cs:7:16:7:16 | [post] this access : A [field s] : String | provenance | | +| obinit.cs:5:27:5:34 | "source" : String | obinit.cs:5:23:5:23 | [post] this access : A [field s] : String | provenance | | +| obinit.cs:7:16:7:16 | [post] this access : A [field s] : String | obinit.cs:7:16:7:16 | this [Return] : A [field s] : String | provenance | | +| obinit.cs:7:16:7:16 | this [Return] : A [field s] : String | obinit.cs:20:19:20:25 | object creation of type A : A [field s] : String | provenance | | +| obinit.cs:20:15:20:15 | access to local variable a : A [field s] : String | obinit.cs:21:18:21:18 | access to local variable a : A [field s] : String | provenance | | +| obinit.cs:20:19:20:25 | object creation of type A : A [field s] : String | obinit.cs:20:15:20:15 | access to local variable a : A [field s] : String | provenance | | +| obinit.cs:21:18:21:18 | access to local variable a : A [field s] : String | obinit.cs:21:18:21:20 | access to field s | provenance | | +flow +| obinit.cs:21:18:21:20 | access to field s | +nodes +| obinit.cs:5:23:5:23 | [post] this access : A [field s] : String | semmle.label | [post] this access : A [field s] : String | +| obinit.cs:5:27:5:34 | "source" : String | semmle.label | "source" : String | +| obinit.cs:7:16:7:16 | [post] this access : A [field s] : String | semmle.label | [post] this access : A [field s] : String | +| obinit.cs:7:16:7:16 | this [Return] : A [field s] : String | semmle.label | this [Return] : A [field s] : String | +| obinit.cs:20:15:20:15 | access to local variable a : A [field s] : String | semmle.label | access to local variable a : A [field s] : String | +| obinit.cs:20:19:20:25 | object creation of type A : A [field s] : String | semmle.label | object creation of type A : A [field s] : String | +| obinit.cs:21:18:21:18 | access to local variable a : A [field s] : String | semmle.label | access to local variable a : A [field s] : String | +| obinit.cs:21:18:21:20 | access to field s | semmle.label | access to field s | +subpaths diff --git a/csharp/ql/test/library-tests/obinit/Flow.ql b/csharp/ql/test/library-tests/obinit/Flow.ql new file mode 100644 index 00000000000..54f0300546c --- /dev/null +++ b/csharp/ql/test/library-tests/obinit/Flow.ql @@ -0,0 +1,20 @@ +import csharp + +module FlowConfig implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { + source.asExpr().(StringLiteral).getValue() = "source" + } + + predicate isSink(DataFlow::Node sink) { + exists(MethodCall mc | + mc.getTarget().getUndecoratedName() = "Sink" and + mc.getAnArgument() = sink.asExpr() + ) + } +} + +module Flow = DataFlow::Global; + +import Flow::PathGraph + +query predicate flow(DataFlow::Node sink) { Flow::flowTo(sink) } diff --git a/csharp/ql/test/library-tests/obinit/Flow.qlref b/csharp/ql/test/library-tests/obinit/Flow.qlref new file mode 100644 index 00000000000..f48796a83f7 --- /dev/null +++ b/csharp/ql/test/library-tests/obinit/Flow.qlref @@ -0,0 +1,2 @@ +query: Flow.ql +postprocess: utils/test/InlineExpectationsTestQuery.ql diff --git a/csharp/ql/test/library-tests/obinit/ObInit.expected b/csharp/ql/test/library-tests/obinit/ObInit.expected new file mode 100644 index 00000000000..38dd8268680 --- /dev/null +++ b/csharp/ql/test/library-tests/obinit/ObInit.expected @@ -0,0 +1,25 @@ +method +| obinit.cs:2:18:2:18 | | obinit.cs:2:18:2:18 | A | +| obinit.cs:14:18:14:18 | | obinit.cs:14:18:14:18 | B | +call +| obinit.cs:7:16:7:16 | call to method | obinit.cs:2:18:2:18 | | obinit.cs:7:16:7:16 | A | +| obinit.cs:9:16:9:16 | call to method | obinit.cs:2:18:2:18 | | obinit.cs:9:16:9:16 | A | +| obinit.cs:15:16:15:16 | call to method | obinit.cs:14:18:14:18 | | obinit.cs:15:16:15:16 | B | +cfg +| obinit.cs:2:18:2:18 | | obinit.cs:3:13:3:13 | this access | obinit.cs:3:17:3:17 | 1 | normal | 0 | +| obinit.cs:2:18:2:18 | | obinit.cs:3:13:3:17 | ... = ... | obinit.cs:5:23:5:23 | this access | normal | 2 | +| obinit.cs:2:18:2:18 | | obinit.cs:3:17:3:17 | 1 | obinit.cs:3:13:3:17 | ... = ... | normal | 1 | +| obinit.cs:2:18:2:18 | | obinit.cs:5:23:5:23 | this access | obinit.cs:5:27:5:34 | "source" | normal | 3 | +| obinit.cs:2:18:2:18 | | obinit.cs:5:27:5:34 | "source" | obinit.cs:5:23:5:34 | ... = ... | normal | 4 | +| obinit.cs:7:16:7:16 | A | obinit.cs:7:16:7:16 | call to constructor Object | obinit.cs:7:20:7:22 | {...} | normal | 2 | +| obinit.cs:7:16:7:16 | A | obinit.cs:7:16:7:16 | call to method | obinit.cs:7:16:7:16 | call to constructor Object | normal | 1 | +| obinit.cs:7:16:7:16 | A | obinit.cs:7:16:7:16 | this access | obinit.cs:7:16:7:16 | call to method | normal | 0 | +| obinit.cs:9:16:9:16 | A | obinit.cs:9:16:9:16 | call to constructor Object | obinit.cs:9:25:9:27 | {...} | normal | 2 | +| obinit.cs:9:16:9:16 | A | obinit.cs:9:16:9:16 | call to method | obinit.cs:9:16:9:16 | call to constructor Object | normal | 1 | +| obinit.cs:9:16:9:16 | A | obinit.cs:9:16:9:16 | this access | obinit.cs:9:16:9:16 | call to method | normal | 0 | +| obinit.cs:11:16:11:16 | A | obinit.cs:11:34:11:37 | call to constructor A | obinit.cs:11:42:11:44 | {...} | normal | 1 | +| obinit.cs:11:16:11:16 | A | obinit.cs:11:39:11:39 | access to parameter y | obinit.cs:11:34:11:37 | call to constructor A | normal | 0 | +| obinit.cs:15:16:15:16 | B | obinit.cs:15:16:15:16 | call to method | obinit.cs:15:27:15:28 | 10 | normal | 1 | +| obinit.cs:15:16:15:16 | B | obinit.cs:15:16:15:16 | this access | obinit.cs:15:16:15:16 | call to method | normal | 0 | +| obinit.cs:15:16:15:16 | B | obinit.cs:15:22:15:25 | call to constructor A | obinit.cs:15:31:15:33 | {...} | normal | 3 | +| obinit.cs:15:16:15:16 | B | obinit.cs:15:27:15:28 | 10 | obinit.cs:15:22:15:25 | call to constructor A | normal | 2 | diff --git a/csharp/ql/test/library-tests/obinit/ObInit.ql b/csharp/ql/test/library-tests/obinit/ObInit.ql new file mode 100644 index 00000000000..cfd21d14b5e --- /dev/null +++ b/csharp/ql/test/library-tests/obinit/ObInit.ql @@ -0,0 +1,28 @@ +import csharp +import semmle.code.csharp.controlflow.internal.ControlFlowGraphImpl +import semmle.code.csharp.controlflow.internal.Completion +import semmle.code.csharp.dataflow.internal.DataFlowPrivate +import semmle.code.csharp.dataflow.internal.DataFlowDispatch + +query predicate method(ObjectInitMethod m, RefType t) { m.getDeclaringType() = t } + +query predicate call(Call c, ObjectInitMethod m, Callable src) { + c.getTarget() = m and c.getEnclosingCallable() = src +} + +predicate scope(Callable callable, AstNode n, int i) { + (callable instanceof ObjectInitMethod or callable instanceof Constructor) and + scopeFirst(callable, n) and + i = 0 + or + exists(AstNode prev | + scope(callable, prev, i - 1) and + succ(prev, n, _) and + i < 30 + ) +} + +query predicate cfg(Callable callable, AstNode pred, AstNode succ, Completion c, int i) { + scope(callable, pred, i) and + succ(pred, succ, c) +} diff --git a/csharp/ql/test/library-tests/obinit/obinit.cs b/csharp/ql/test/library-tests/obinit/obinit.cs new file mode 100644 index 00000000000..9a9c628e71f --- /dev/null +++ b/csharp/ql/test/library-tests/obinit/obinit.cs @@ -0,0 +1,30 @@ +namespace ObInit { + public class A { + int x = 1; + + public string s = "source"; + + public A() { } + + public A(int y) { } + + public A(int y, int z) : this(y) { } + } + + public class B : A { + public B() : base(10) { } + + static void Sink(string s) { } + + static void Foo() { + A a = new A(); + Sink(a.s); // $ flow + + A a2 = new A(0, 0); + Sink(a2.s); // $ MISSING: flow + + B b = new B(); + Sink(b.s); // $ MISSING: flow + } + } +} diff --git a/csharp/ql/test/library-tests/operators/PrintAst.expected b/csharp/ql/test/library-tests/operators/PrintAst.expected index 0b490c13d2c..d3b41fe05fb 100644 --- a/csharp/ql/test/library-tests/operators/PrintAst.expected +++ b/csharp/ql/test/library-tests/operators/PrintAst.expected @@ -1,18 +1,18 @@ operators.cs: # 5| [NamespaceDeclaration] namespace ... { ... } # 7| 1: [Class] IntVector -# 10| 4: [InstanceConstructor] IntVector +# 10| 5: [InstanceConstructor] IntVector #-----| 2: (Parameters) # 10| 0: [Parameter] length # 10| -1: [TypeMention] int # 10| 4: [BlockStmt] {...} -# 12| 5: [Property] Length +# 12| 6: [Property] Length # 12| -1: [TypeMention] int # 12| 3: [Getter] get_Length # 12| 4: [BlockStmt] {...} # 12| 0: [ReturnStmt] return ...; # 12| 0: [IntLiteral] 4 -# 14| 6: [Indexer] Item +# 14| 7: [Indexer] Item # 14| -1: [TypeMention] int #-----| 1: (Parameters) # 14| 0: [Parameter] index @@ -28,7 +28,7 @@ operators.cs: # 14| 0: [Parameter] index # 14| 1: [Parameter] value # 14| 4: [BlockStmt] {...} -# 16| 7: [IncrementOperator] ++ +# 16| 8: [IncrementOperator] ++ # 16| -1: [TypeMention] IntVector #-----| 2: (Parameters) # 16| 0: [Parameter] iv @@ -66,7 +66,7 @@ operators.cs: # 21| 2: [ReturnStmt] return ...; # 21| 0: [LocalVariableAccess] access to local variable temp # 26| 2: [Class] TestUnaryOperator -# 29| 5: [Method] Main +# 29| 6: [Method] Main # 29| -1: [TypeMention] Void # 30| 4: [BlockStmt] {...} # 31| 0: [LocalVariableDeclStmt] ... ...; @@ -90,9 +90,9 @@ operators.cs: # 34| 1: [OperatorCall] call to operator ++ # 34| 0: [LocalVariableAccess] access to local variable iv1 # 39| 3: [Struct] Digit -# 42| 5: [Field] value +# 42| 6: [Field] value # 42| -1: [TypeMention] byte -# 44| 6: [InstanceConstructor] Digit +# 44| 7: [InstanceConstructor] Digit #-----| 2: (Parameters) # 44| 0: [Parameter] value # 44| -1: [TypeMention] byte @@ -115,7 +115,7 @@ operators.cs: # 48| 0: [FieldAccess] access to field value # 48| -1: [ThisAccess] this access # 48| 1: [ParameterAccess] access to parameter value -# 51| 7: [ImplicitConversionOperator] implicit conversion +# 51| 8: [ImplicitConversionOperator] implicit conversion # 51| -1: [TypeMention] byte #-----| 2: (Parameters) # 51| 0: [Parameter] d @@ -124,7 +124,7 @@ operators.cs: # 53| 0: [ReturnStmt] return ...; # 53| 0: [FieldAccess] access to field value # 53| -1: [ParameterAccess] access to parameter d -# 56| 8: [ExplicitConversionOperator] explicit conversion +# 56| 9: [ExplicitConversionOperator] explicit conversion # 56| -1: [TypeMention] Digit #-----| 2: (Parameters) # 56| 0: [Parameter] b @@ -135,7 +135,7 @@ operators.cs: # 58| -1: [TypeMention] Digit # 58| 0: [ParameterAccess] access to parameter b # 63| 4: [Class] TestConversionOperator -# 66| 5: [Method] Main +# 66| 6: [Method] Main # 66| -1: [TypeMention] Void # 67| 4: [BlockStmt] {...} # 68| 0: [LocalVariableDeclStmt] ... ...; diff --git a/csharp/ql/test/library-tests/overlay/base/test.expected b/csharp/ql/test/library-tests/overlay/base/test.expected index 0c2b5750f2c..67a440b87db 100644 --- a/csharp/ql/test/library-tests/overlay/base/test.expected +++ b/csharp/ql/test/library-tests/overlay/base/test.expected @@ -1,5 +1,7 @@ expressions | A.cs:8:16:8:16 | call to constructor Object | +| A.cs:8:16:8:16 | call to method | +| A.cs:8:16:8:16 | this access | | A.cs:10:13:10:16 | access to field name | | A.cs:10:13:10:16 | this access | | A.cs:10:13:10:20 | ... = ... | @@ -34,7 +36,11 @@ expressions | A.cs:58:27:58:30 | this access | | A.cs:59:20:59:20 | access to local variable x | | A.cs:63:18:63:36 | call to constructor Attribute | +| A.cs:63:18:63:36 | call to method | +| A.cs:63:18:63:36 | this access | | A.cs:65:18:65:18 | call to constructor Object | +| A.cs:65:18:65:18 | call to method | +| A.cs:65:18:65:18 | this access | | Program.cs:9:17:9:20 | access to parameter args | | Program.cs:9:17:9:27 | access to property Length | | Program.cs:9:17:9:32 | ... == ... | @@ -56,6 +62,8 @@ expressions | Program.cs:16:31:16:31 | access to local variable a | | Program.cs:16:31:16:42 | call to method ToString | | Program.cs:21:16:21:22 | call to constructor Object | +| Program.cs:21:16:21:22 | call to method | +| Program.cs:21:16:21:22 | this access | | Program.cs:23:13:23:23 | access to field programName | | Program.cs:23:13:23:23 | this access | | Program.cs:23:13:23:27 | ... = ... | @@ -77,6 +85,8 @@ expressions | Program.cs:51:35:51:59 | "Program handler removed" | | Program.cs:57:20:57:20 | access to parameter b | | Program.cs:64:18:64:33 | call to constructor Attribute | +| Program.cs:64:18:64:33 | call to method | +| Program.cs:64:18:64:33 | this access | statements | A.cs:9:9:11:9 | {...} | | A.cs:10:13:10:21 | ...; | diff --git a/csharp/ql/test/library-tests/overlay/overlay/test.expected b/csharp/ql/test/library-tests/overlay/overlay/test.expected index d9d4d0ec6fe..bb9a82b3a23 100644 --- a/csharp/ql/test/library-tests/overlay/overlay/test.expected +++ b/csharp/ql/test/library-tests/overlay/overlay/test.expected @@ -1,6 +1,10 @@ expressions | A.cs:5:18:5:18 | call to constructor Object | +| A.cs:5:18:5:18 | call to method | +| A.cs:5:18:5:18 | this access | | A.cs:10:16:10:16 | call to constructor Object | +| A.cs:10:16:10:16 | call to method | +| A.cs:10:16:10:16 | this access | | A.cs:12:13:12:16 | access to field name | | A.cs:12:13:12:16 | this access | | A.cs:12:13:12:20 | ... = ... | @@ -40,6 +44,8 @@ expressions | A.cs:64:24:64:27 | this access | | A.cs:64:24:64:37 | call to method ToUpper | | A.cs:69:18:69:36 | call to constructor Attribute | +| A.cs:69:18:69:36 | call to method | +| A.cs:69:18:69:36 | this access | | Program.cs:9:17:9:20 | access to parameter args | | Program.cs:9:17:9:27 | access to property Length | | Program.cs:9:17:9:32 | ... == ... | @@ -61,6 +67,8 @@ expressions | Program.cs:16:31:16:31 | access to local variable a | | Program.cs:16:31:16:42 | call to method ToString | | Program.cs:21:16:21:22 | call to constructor Object | +| Program.cs:21:16:21:22 | call to method | +| Program.cs:21:16:21:22 | this access | | Program.cs:23:13:23:23 | access to field programName | | Program.cs:23:13:23:23 | this access | | Program.cs:23:13:23:27 | ... = ... | @@ -82,6 +90,8 @@ expressions | Program.cs:51:35:51:59 | "Program handler removed" | | Program.cs:57:20:57:20 | access to parameter b | | Program.cs:64:18:64:33 | call to constructor Attribute | +| Program.cs:64:18:64:33 | call to method | +| Program.cs:64:18:64:33 | this access | statements | A.cs:5:18:5:18 | {...} | | A.cs:11:9:13:9 | {...} | diff --git a/csharp/ql/test/library-tests/partial/Partial2.expected b/csharp/ql/test/library-tests/partial/Partial2.expected index 9dc3a24a4ce..87194dd3f9e 100644 --- a/csharp/ql/test/library-tests/partial/Partial2.expected +++ b/csharp/ql/test/library-tests/partial/Partial2.expected @@ -1,10 +1,15 @@ +| Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:1:15:1:26 | | | Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:4:18:4:42 | PartialMethodWithoutBody1 | | Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:5:17:5:23 | Method2 | | Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:14:18:14:39 | PartialMethodWithBody1 | | Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:15:17:15:23 | Method3 | +| Partial.cs:12:15:12:26 | TwoPartClass | Partial.cs:1:15:1:26 | | | Partial.cs:12:15:12:26 | TwoPartClass | Partial.cs:4:18:4:42 | PartialMethodWithoutBody1 | | Partial.cs:12:15:12:26 | TwoPartClass | Partial.cs:5:17:5:23 | Method2 | | Partial.cs:12:15:12:26 | TwoPartClass | Partial.cs:14:18:14:39 | PartialMethodWithBody1 | | Partial.cs:12:15:12:26 | TwoPartClass | Partial.cs:15:17:15:23 | Method3 | +| Partial.cs:32:15:32:33 | OnePartPartialClass | Partial.cs:32:15:32:33 | | | Partial.cs:32:15:32:33 | OnePartPartialClass | Partial.cs:34:18:34:42 | PartialMethodWithoutBody2 | | Partial.cs:32:15:32:33 | OnePartPartialClass | Partial.cs:35:17:35:23 | Method4 | +| PartialMultipleFiles1.cs:1:22:1:41 | PartialMultipleFiles | PartialMultipleFiles1.cs:1:22:1:41 | | +| PartialMultipleFiles2.cs:1:22:1:41 | PartialMultipleFiles | PartialMultipleFiles1.cs:1:22:1:41 | | diff --git a/csharp/ql/test/library-tests/partial/PrintAst.expected b/csharp/ql/test/library-tests/partial/PrintAst.expected index d97f6fc01f0..0729946b18b 100644 --- a/csharp/ql/test/library-tests/partial/PrintAst.expected +++ b/csharp/ql/test/library-tests/partial/PrintAst.expected @@ -1,19 +1,19 @@ Partial.cs: # 1| [Class] TwoPartClass -# 4| 5: [Method] PartialMethodWithoutBody1 +# 4| 6: [Method] PartialMethodWithoutBody1 # 4| -1: [TypeMention] Void -# 5| 6: [Method] Method2 +# 5| 7: [Method] Method2 # 5| -1: [TypeMention] Void # 5| 4: [BlockStmt] {...} -# 14| 7: [Method] PartialMethodWithBody1 +# 14| 8: [Method] PartialMethodWithBody1 # 3| -1: [TypeMention] Void # 14| 4: [BlockStmt] {...} -# 15| 8: [Method] Method3 +# 15| 9: [Method] Method3 # 15| -1: [TypeMention] Void # 15| 4: [BlockStmt] {...} -# 16| 9: [Field] _backingField +# 16| 10: [Field] _backingField # 16| -1: [TypeMention] object -# 18| 10: [Property] PartialProperty1 +# 18| 11: [Property] PartialProperty1 # 7| -1: [TypeMention] object # 18| -1: [TypeMention] object # 20| 3: [Getter] get_PartialProperty1 @@ -28,10 +28,10 @@ Partial.cs: # 21| 0: [AssignExpr] ... = ... # 21| 0: [FieldAccess] access to field _backingField # 21| 1: [ParameterAccess] access to parameter value -# 23| 11: [Field] _backingArray +# 23| 12: [Field] _backingArray # 23| -1: [TypeMention] Object[] # 23| 1: [TypeMention] object -# 25| 12: [Indexer] Item +# 25| 13: [Indexer] Item # 9| -1: [TypeMention] object # 25| -1: [TypeMention] object #-----| 1: (Parameters) @@ -58,22 +58,22 @@ Partial.cs: # 28| 0: [ParameterAccess] access to parameter index # 28| 1: [ParameterAccess] access to parameter value # 32| [Class] OnePartPartialClass -# 34| 5: [Method] PartialMethodWithoutBody2 +# 34| 6: [Method] PartialMethodWithoutBody2 # 34| -1: [TypeMention] Void -# 35| 6: [Method] Method4 +# 35| 7: [Method] Method4 # 35| -1: [TypeMention] Void # 35| 4: [BlockStmt] {...} # 38| [Class] NonPartialClass -# 40| 5: [Method] Method5 +# 40| 6: [Method] Method5 # 40| -1: [TypeMention] Void # 40| 4: [BlockStmt] {...} -# 41| 6: [Property] Property +# 41| 7: [Property] Property # 41| -1: [TypeMention] object # 41| 3: [Getter] get_Property # 41| 4: [Setter] set_Property #-----| 2: (Parameters) # 41| 0: [Parameter] value -# 42| 7: [Indexer] Item +# 42| 8: [Indexer] Item # 42| -1: [TypeMention] object #-----| 1: (Parameters) # 42| 0: [Parameter] index diff --git a/csharp/ql/test/library-tests/properties/PrintAst.expected b/csharp/ql/test/library-tests/properties/PrintAst.expected index 370d180a08e..2df3ee3f5e8 100644 --- a/csharp/ql/test/library-tests/properties/PrintAst.expected +++ b/csharp/ql/test/library-tests/properties/PrintAst.expected @@ -1,9 +1,9 @@ properties.cs: # 5| [NamespaceDeclaration] namespace ... { ... } # 7| 1: [Class] Button -# 10| 5: [Field] caption +# 10| 6: [Field] caption # 10| -1: [TypeMention] string -# 12| 6: [Property] Caption +# 12| 7: [Property] Caption # 12| -1: [TypeMention] string # 15| 3: [Getter] get_Caption # 15| 4: [BlockStmt] {...} @@ -22,7 +22,7 @@ properties.cs: # 21| 0: [AssignExpr] ... = ... # 21| 0: [FieldAccess] access to field caption # 21| 1: [ParameterAccess] access to parameter value -# 26| 7: [Method] Paint +# 26| 8: [Method] Paint # 26| -1: [TypeMention] Void # 27| 4: [BlockStmt] {...} # 28| 0: [LocalVariableDeclStmt] ... ...; @@ -43,9 +43,9 @@ properties.cs: # 30| 1: [PropertyCall] access to property Caption # 30| -1: [LocalVariableAccess] access to local variable okButton # 34| 2: [Class] Counter -# 37| 5: [Field] next +# 37| 6: [Field] next # 37| -1: [TypeMention] int -# 39| 6: [Property] Next +# 39| 7: [Property] Next # 39| -1: [TypeMention] int # 41| 3: [Getter] get_Next # 41| 4: [BlockStmt] {...} @@ -53,32 +53,32 @@ properties.cs: # 41| 0: [PostIncrExpr] ...++ # 41| 0: [FieldAccess] access to field next # 46| 3: [Class] Point -# 49| 5: [Property] X +# 49| 6: [Property] X # 49| -1: [TypeMention] int # 49| 3: [Getter] get_X # 49| 4: [Setter] set_X #-----| 2: (Parameters) # 49| 0: [Parameter] value -# 50| 6: [Property] Y +# 50| 7: [Property] Y # 50| -1: [TypeMention] int # 50| 3: [Getter] get_Y # 50| 4: [Setter] set_Y #-----| 2: (Parameters) # 50| 0: [Parameter] value # 54| 4: [Class] ReadOnlyPoint -# 57| 4: [Property] X +# 57| 5: [Property] X # 57| -1: [TypeMention] int # 57| 3: [Getter] get_X # 57| 4: [Setter] set_X #-----| 2: (Parameters) # 57| 0: [Parameter] value -# 58| 5: [Property] Y +# 58| 6: [Property] Y # 58| -1: [TypeMention] int # 58| 3: [Getter] get_Y # 58| 4: [Setter] set_Y #-----| 2: (Parameters) # 58| 0: [Parameter] value -# 59| 6: [InstanceConstructor] ReadOnlyPoint +# 59| 7: [InstanceConstructor] ReadOnlyPoint #-----| 2: (Parameters) # 59| 0: [Parameter] x # 59| -1: [TypeMention] int @@ -94,15 +94,15 @@ properties.cs: # 62| 0: [PropertyCall] access to property Y # 62| 1: [ParameterAccess] access to parameter y # 67| 5: [Class] A -# 69| 5: [Field] y +# 69| 6: [Field] y # 69| -1: [TypeMention] int -# 70| 6: [Property] X +# 70| 7: [Property] X # 70| -1: [TypeMention] int # 70| 3: [Getter] get_X # 70| 4: [BlockStmt] {...} # 70| 0: [ReturnStmt] return ...; # 70| 0: [IntLiteral] 0 -# 71| 7: [Property] Y +# 71| 8: [Property] Y # 71| -1: [TypeMention] int # 73| 3: [Getter] get_Y # 73| 4: [BlockStmt] {...} @@ -116,7 +116,7 @@ properties.cs: # 74| 0: [AssignExpr] ... = ... # 74| 0: [FieldAccess] access to field y # 74| 1: [ParameterAccess] access to parameter value -# 76| 8: [Property] Z +# 76| 9: [Property] Z # 76| -1: [TypeMention] int # 76| 3: [Getter] get_Z # 76| 4: [Setter] set_Z @@ -125,9 +125,9 @@ properties.cs: # 79| 6: [Class] B #-----| 3: (Base types) # 79| 0: [TypeMention] A -# 81| 5: [Field] z +# 81| 6: [Field] z # 81| -1: [TypeMention] int -# 82| 6: [Property] X +# 82| 7: [Property] X # 82| -1: [TypeMention] int # 82| 3: [Getter] get_X # 82| 4: [BlockStmt] {...} @@ -136,7 +136,7 @@ properties.cs: # 82| 0: [PropertyCall] access to property X # 82| -1: [BaseAccess] base access # 82| 1: [IntLiteral] 1 -# 83| 7: [Property] Y +# 83| 8: [Property] Y # 83| -1: [TypeMention] int # 83| 3: [Setter] set_Y #-----| 2: (Parameters) @@ -152,7 +152,7 @@ properties.cs: # 83| 1: [IntLiteral] 0 # 83| 1: [IntLiteral] 0 # 83| 2: [ParameterAccess] access to parameter value -# 84| 8: [Property] Z +# 84| 9: [Property] Z # 84| -1: [TypeMention] int # 86| 3: [Getter] get_Z # 86| 4: [BlockStmt] {...} @@ -167,13 +167,13 @@ properties.cs: # 87| 0: [FieldAccess] access to field z # 87| 1: [ParameterAccess] access to parameter value # 91| 7: [Class] Test -# 93| 5: [Property] Init +# 93| 6: [Property] Init # 93| -1: [TypeMention] int # 93| 3: [Setter] set_Init #-----| 2: (Parameters) # 93| 0: [Parameter] value # 93| 4: [BlockStmt] {...} -# 94| 6: [Method] Main +# 94| 7: [Method] Main # 94| -1: [TypeMention] Void # 95| 4: [BlockStmt] {...} # 96| 0: [LocalVariableDeclStmt] ... ...; @@ -211,19 +211,19 @@ properties.cs: # 110| 9: [Class] ImplementsProperties #-----| 3: (Base types) # 110| 1: [TypeMention] InterfaceWithProperties -# 112| 5: [Property] Prop1 +# 112| 6: [Property] Prop1 # 112| -1: [TypeMention] int # 114| 3: [Getter] get_Prop1 # 114| 4: [BlockStmt] {...} # 114| 0: [ReturnStmt] return ...; # 114| 0: [IntLiteral] 0 -# 117| 6: [Property] Prop2 +# 117| 7: [Property] Prop2 # 117| -1: [TypeMention] int # 119| 3: [Setter] set_Prop2 #-----| 2: (Parameters) # 119| 0: [Parameter] value # 119| 4: [BlockStmt] {...} -# 122| 7: [Property] Prop2 +# 122| 8: [Property] Prop2 # 122| -1: [TypeMention] InterfaceWithProperties # 122| -1: [TypeMention] int # 124| 3: [Setter] set_Prop2 diff --git a/csharp/ql/test/library-tests/standalone/brokentypes/brokenTypes.expected b/csharp/ql/test/library-tests/standalone/brokentypes/brokenTypes.expected index bb3acba4f64..524249492d3 100644 --- a/csharp/ql/test/library-tests/standalone/brokentypes/brokenTypes.expected +++ b/csharp/ql/test/library-tests/standalone/brokentypes/brokenTypes.expected @@ -1,7 +1,15 @@ | BrokenTypes.cs:2:14:2:13 | call to constructor Object | object | ObjectType | +| BrokenTypes.cs:2:14:2:13 | call to method | Void | VoidType | +| BrokenTypes.cs:2:14:2:13 | this access | | UnknownType | | BrokenTypes.cs:5:14:5:16 | call to constructor Object | object | ObjectType | +| BrokenTypes.cs:5:14:5:16 | call to method | Void | VoidType | +| BrokenTypes.cs:5:14:5:16 | this access | var | UnknownType | | BrokenTypes.cs:7:14:7:14 | call to constructor Object | object | ObjectType | +| BrokenTypes.cs:7:14:7:14 | call to method | Void | VoidType | +| BrokenTypes.cs:7:14:7:14 | this access | C | Class | | BrokenTypes.cs:13:14:13:20 | call to constructor Object | object | ObjectType | +| BrokenTypes.cs:13:14:13:20 | call to method | Void | VoidType | +| BrokenTypes.cs:13:14:13:20 | this access | Program | Class | | BrokenTypes.cs:17:11:17:12 | access to local variable x1 | C | Class | | BrokenTypes.cs:17:11:17:22 | C x1 = ... | C | Class | | BrokenTypes.cs:17:16:17:22 | object creation of type C | C | Class | diff --git a/csharp/ql/test/library-tests/standalone/controlflow/cfg.expected b/csharp/ql/test/library-tests/standalone/controlflow/cfg.expected index fab1dec1100..a42a3c662d4 100644 --- a/csharp/ql/test/library-tests/standalone/controlflow/cfg.expected +++ b/csharp/ql/test/library-tests/standalone/controlflow/cfg.expected @@ -1,6 +1,8 @@ | ControlFlow.cs:3:7:3:9 | call to constructor Object | ControlFlow.cs:3:7:3:9 | {...} | -| ControlFlow.cs:3:7:3:9 | enter Cfg | ControlFlow.cs:3:7:3:9 | call to constructor Object | +| ControlFlow.cs:3:7:3:9 | call to method | ControlFlow.cs:3:7:3:9 | call to constructor Object | +| ControlFlow.cs:3:7:3:9 | enter Cfg | ControlFlow.cs:3:7:3:9 | this access | | ControlFlow.cs:3:7:3:9 | exit Cfg (normal) | ControlFlow.cs:3:7:3:9 | exit Cfg | +| ControlFlow.cs:3:7:3:9 | this access | ControlFlow.cs:3:7:3:9 | call to method | | ControlFlow.cs:3:7:3:9 | {...} | ControlFlow.cs:3:7:3:9 | exit Cfg (normal) | | ControlFlow.cs:5:10:5:10 | enter F | ControlFlow.cs:6:5:11:5 | {...} | | ControlFlow.cs:5:10:5:10 | exit F (normal) | ControlFlow.cs:5:10:5:10 | exit F | diff --git a/csharp/ql/test/library-tests/standalone/errorrecovery/ErrorCalls.expected b/csharp/ql/test/library-tests/standalone/errorrecovery/ErrorCalls.expected index a4a2aa6e7a8..791cd3450e8 100644 --- a/csharp/ql/test/library-tests/standalone/errorrecovery/ErrorCalls.expected +++ b/csharp/ql/test/library-tests/standalone/errorrecovery/ErrorCalls.expected @@ -1,10 +1,15 @@ | errors.cs:13:11:13:12 | errors.cs:13:11:13:12 | call to constructor Object | Object | +| errors.cs:13:11:13:12 | errors.cs:13:11:13:12 | call to method | | | errors.cs:22:31:22:40 | errors.cs:22:31:22:40 | call to method | none | | errors.cs:41:21:41:28 | errors.cs:41:21:41:28 | object creation of type C1 | C1 | | errors.cs:42:13:42:19 | errors.cs:42:13:42:19 | call to method m1 | m1 | | errors.cs:43:13:43:19 | errors.cs:43:13:43:19 | call to method m2 | m2 | | errors.cs:44:13:44:38 | errors.cs:44:13:44:38 | call to method WriteLine | WriteLine | | errors.cs:48:11:48:12 | errors.cs:48:11:48:12 | call to constructor Object | Object | +| errors.cs:48:11:48:12 | errors.cs:48:11:48:12 | call to method | | | errors.cs:51:17:51:25 | errors.cs:51:17:51:25 | object creation of type C2 | none | | errors.cs:65:11:65:12 | errors.cs:65:11:65:12 | call to constructor Object | Object | +| errors.cs:65:11:65:12 | errors.cs:65:11:65:12 | call to method | | | errors.cs:70:11:70:12 | errors.cs:70:11:70:12 | call to constructor Object | Object | +| errors.cs:70:11:70:12 | errors.cs:70:11:70:12 | call to method | | +| errors.cs:79:11:79:12 | errors.cs:79:11:79:12 | call to method | | diff --git a/csharp/ql/test/library-tests/standalone/externalLocationSink/externalLocationSink.expected b/csharp/ql/test/library-tests/standalone/externalLocationSink/externalLocationSink.expected index 8c4346f7832..3f724bc4902 100644 --- a/csharp/ql/test/library-tests/standalone/externalLocationSink/externalLocationSink.expected +++ b/csharp/ql/test/library-tests/standalone/externalLocationSink/externalLocationSink.expected @@ -4,5 +4,6 @@ compilationErrors | standalone.cs:16:12:16:18 | CS0104: 'ILogger' is an ambiguous reference between 'A.ILogger' and 'B.ILogger' | methodCalls +| standalone.cs:14:14:14:14 | call to method | | standalone.cs:20:9:20:21 | call to method | | standalone.cs:25:9:25:33 | call to method | diff --git a/csharp/ql/test/library-tests/statements/PrintAst.expected b/csharp/ql/test/library-tests/statements/PrintAst.expected index 6aea0fa286e..59af8ce4a2e 100644 --- a/csharp/ql/test/library-tests/statements/PrintAst.expected +++ b/csharp/ql/test/library-tests/statements/PrintAst.expected @@ -1,6 +1,6 @@ fixed.cs: # 3| [Class] Fixed -# 5| 5: [Method] fixed1 +# 5| 6: [Method] fixed1 # 5| -1: [TypeMention] Void # 6| 4: [BlockStmt] {...} # 7| 0: [LocalVariableDeclStmt] ... ...; @@ -52,7 +52,7 @@ fixed.cs: statements.cs: # 6| [NamespaceDeclaration] namespace ... { ... } # 8| 1: [Class] Class -# 11| 5: [Method] Main +# 11| 6: [Method] Main # 11| -1: [TypeMention] Void # 12| 4: [BlockStmt] {...} # 13| 0: [LabelStmt] block: @@ -60,7 +60,7 @@ statements.cs: # 15| 0: [BlockStmt] {...} # 17| 1: [BlockStmt] {...} # 18| 0: [BlockStmt] {...} -# 24| 6: [Method] MainEmpty +# 24| 7: [Method] MainEmpty # 24| -1: [TypeMention] Void # 25| 4: [BlockStmt] {...} # 26| 0: [LocalVariableDeclStmt] ... ...; @@ -75,7 +75,7 @@ statements.cs: # 28| 4: [IfStmt] if (...) ... # 28| 0: [BoolLiteral] true # 28| 1: [EmptyStmt] ; -# 31| 7: [Method] MainLocalVarDecl +# 31| 8: [Method] MainLocalVarDecl # 31| -1: [TypeMention] Void # 32| 4: [BlockStmt] {...} # 33| 0: [LocalVariableDeclStmt] ... ...; @@ -113,7 +113,7 @@ statements.cs: # 38| -1: [TypeMention] string # 38| 0: [LocalVariableAccess] access to local variable y # 38| 1: [StringLiteralUtf16] "test" -# 41| 8: [Method] MainLocalConstDecl +# 41| 9: [Method] MainLocalConstDecl # 41| -1: [TypeMention] Void # 42| 4: [BlockStmt] {...} # 43| 0: [LocalConstantDeclStmt] const ... ...; @@ -139,7 +139,7 @@ statements.cs: # 45| 1: [LocalVariableAccess] access to local variable r # 45| 1: [CastExpr] (...) ... # 45| 1: [LocalVariableAccess] access to local variable r -# 48| 9: [Method] MainExpr +# 48| 10: [Method] MainExpr # 48| -1: [TypeMention] Void # 49| 4: [BlockStmt] {...} # 50| 0: [LocalVariableDeclStmt] ... ...; @@ -162,7 +162,7 @@ statements.cs: # 54| -1: [TypeAccess] access to type Console # 54| 0: [TypeMention] Console # 54| 0: [LocalVariableAccess] access to local variable i -# 57| 10: [Method] MainIf +# 57| 11: [Method] MainIf # 57| -1: [TypeMention] Void #-----| 2: (Parameters) # 57| 0: [Parameter] args @@ -186,7 +186,7 @@ statements.cs: # 65| -1: [TypeAccess] access to type Console # 65| 0: [TypeMention] Console # 65| 0: [StringLiteralUtf16] "One or more arguments" -# 69| 11: [Method] MainSwitch +# 69| 12: [Method] MainSwitch # 69| -1: [TypeMention] Void #-----| 2: (Parameters) # 69| 0: [Parameter] args @@ -226,7 +226,7 @@ statements.cs: # 81| 1: [CastExpr] (...) ... # 81| 1: [LocalVariableAccess] access to local variable n # 82| 8: [BreakStmt] break; -# 86| 12: [Method] StringSwitch +# 86| 13: [Method] StringSwitch # 86| -1: [TypeMention] int #-----| 2: (Parameters) # 86| 0: [Parameter] foo @@ -270,7 +270,7 @@ statements.cs: # 106| 0: [IntLiteral] 7 # 108| 1: [ReturnStmt] return ...; # 108| 0: [IntLiteral] 7 -# 111| 13: [Method] MainWhile +# 111| 14: [Method] MainWhile # 111| -1: [TypeMention] Void #-----| 2: (Parameters) # 111| 0: [Parameter] args @@ -298,7 +298,7 @@ statements.cs: # 117| 1: [ExprStmt] ...; # 117| 0: [PostIncrExpr] ...++ # 117| 0: [LocalVariableAccess] access to local variable i -# 121| 14: [Method] MainDo +# 121| 15: [Method] MainDo # 121| -1: [TypeMention] Void # 122| 4: [BlockStmt] {...} # 123| 0: [LocalVariableDeclStmt] ... ...; @@ -324,7 +324,7 @@ statements.cs: # 127| -1: [TypeAccess] access to type Console # 127| 0: [TypeMention] Console # 127| 0: [LocalVariableAccess] access to local variable s -# 131| 15: [Method] MainFor +# 131| 16: [Method] MainFor # 131| -1: [TypeMention] Void #-----| 2: (Parameters) # 131| 0: [Parameter] args @@ -350,7 +350,7 @@ statements.cs: # 135| 0: [ArrayAccess] access to array element # 135| -1: [ParameterAccess] access to parameter args # 135| 0: [LocalVariableAccess] access to local variable i -# 139| 16: [Method] MainForeach +# 139| 17: [Method] MainForeach # 139| -1: [TypeMention] Void #-----| 2: (Parameters) # 139| 0: [Parameter] args @@ -367,7 +367,7 @@ statements.cs: # 143| -1: [TypeAccess] access to type Console # 143| 0: [TypeMention] Console # 143| 0: [LocalVariableAccess] access to local variable s -# 147| 17: [Method] MainBreak +# 147| 18: [Method] MainBreak # 147| -1: [TypeMention] Void # 148| 4: [BlockStmt] {...} # 149| 0: [WhileStmt] while (...) ... @@ -390,7 +390,7 @@ statements.cs: # 153| -1: [TypeAccess] access to type Console # 153| 0: [TypeMention] Console # 153| 0: [LocalVariableAccess] access to local variable s -# 157| 18: [Method] MainContinue +# 157| 19: [Method] MainContinue # 157| -1: [TypeMention] Void #-----| 2: (Parameters) # 157| 0: [Parameter] args @@ -423,7 +423,7 @@ statements.cs: # 162| 0: [ArrayAccess] access to array element # 162| -1: [ParameterAccess] access to parameter args # 162| 0: [LocalVariableAccess] access to local variable i -# 166| 19: [Method] MainGoto +# 166| 20: [Method] MainGoto # 166| -1: [TypeMention] Void #-----| 2: (Parameters) # 166| 0: [Parameter] args @@ -452,7 +452,7 @@ statements.cs: # 171| 1: [PropertyCall] access to property Length # 171| -1: [ParameterAccess] access to parameter args # 171| 1: [GotoLabelStmt] goto ...; -# 174| 20: [Method] Add +# 174| 21: [Method] Add # 174| -1: [TypeMention] int #-----| 2: (Parameters) # 174| 0: [Parameter] a @@ -464,7 +464,7 @@ statements.cs: # 176| 0: [AddExpr] ... + ... # 176| 0: [ParameterAccess] access to parameter a # 176| 1: [ParameterAccess] access to parameter b -# 178| 21: [Method] MainReturn +# 178| 22: [Method] MainReturn # 178| -1: [TypeMention] Void # 179| 4: [BlockStmt] {...} # 180| 0: [ExprStmt] ...; @@ -475,7 +475,7 @@ statements.cs: # 180| 0: [IntLiteral] 1 # 180| 1: [IntLiteral] 2 # 181| 1: [ReturnStmt] return ...; -# 184| 22: [Method] Range +# 184| 23: [Method] Range # 184| -1: [TypeMention] IEnumerable # 184| 1: [TypeMention] int #-----| 2: (Parameters) @@ -498,7 +498,7 @@ statements.cs: # 188| 0: [YieldReturnStmt] yield return ...; # 188| 0: [LocalVariableAccess] access to local variable i # 190| 1: [YieldBreakStmt] yield break; -# 192| 23: [Method] MainYield +# 192| 24: [Method] MainYield # 192| -1: [TypeMention] Void # 193| 4: [BlockStmt] {...} # 194| 0: [ForeachStmt] foreach (... ... in ...) ... @@ -514,7 +514,7 @@ statements.cs: # 196| -1: [TypeAccess] access to type Console # 196| 0: [TypeMention] Console # 196| 0: [LocalVariableAccess] access to local variable x -# 200| 24: [Method] Divide +# 200| 25: [Method] Divide # 200| -1: [TypeMention] double #-----| 2: (Parameters) # 200| 0: [Parameter] x @@ -534,7 +534,7 @@ statements.cs: # 203| 0: [DivExpr] ... / ... # 203| 0: [ParameterAccess] access to parameter x # 203| 1: [ParameterAccess] access to parameter y -# 205| 25: [Method] MainTryThrow +# 205| 26: [Method] MainTryThrow # 205| -1: [TypeMention] Void #-----| 2: (Parameters) # 205| 0: [Parameter] args @@ -603,7 +603,7 @@ statements.cs: # 223| -1: [TypeAccess] access to type Console # 223| 0: [TypeMention] Console # 223| 0: [StringLiteralUtf16] "Exception" -# 231| 26: [Method] MainCheckedUnchecked +# 231| 27: [Method] MainCheckedUnchecked # 231| -1: [TypeMention] Void # 232| 4: [BlockStmt] {...} # 233| 0: [LocalVariableDeclStmt] ... ...; @@ -631,10 +631,10 @@ statements.cs: # 240| 0: [AddExpr] ... + ... # 240| 0: [LocalVariableAccess] access to local variable i # 240| 1: [IntLiteral] 1 -# 244| 27: [Class] AccountLock -# 246| 5: [Field] balance +# 244| 28: [Class] AccountLock +# 246| 6: [Field] balance # 246| -1: [TypeMention] decimal -# 247| 6: [Method] Withdraw +# 247| 7: [Method] Withdraw # 247| -1: [TypeMention] Void #-----| 2: (Parameters) # 247| 0: [Parameter] amount @@ -656,7 +656,7 @@ statements.cs: # 255| 0: [AssignSubExpr] ... -= ... # 255| 0: [FieldAccess] access to field balance # 255| 1: [ParameterAccess] access to parameter amount -# 260| 28: [Method] MainUsing +# 260| 29: [Method] MainUsing # 260| -1: [TypeMention] Void # 261| 4: [BlockStmt] {...} # 262| 0: [UsingBlockStmt] using (...) {...} @@ -686,7 +686,7 @@ statements.cs: # 268| 0: [TypeMention] File # 268| 0: [StringLiteralUtf16] "test.txt" # 269| 1: [BlockStmt] {...} -# 273| 29: [Method] MainLabeled +# 273| 30: [Method] MainLabeled # 273| -1: [TypeMention] Void # 274| 4: [BlockStmt] {...} # 275| 0: [GotoLabelStmt] goto ...; @@ -700,11 +700,11 @@ statements.cs: # 278| 0: [AssignExpr] ... = ... # 278| 0: [LocalVariableAccess] access to local variable x # 278| 1: [IntLiteral] 9 -# 281| 30: [Field] lockObject +# 281| 31: [Field] lockObject # 281| -1: [TypeMention] Lock # 281| 1: [ObjectCreation] object creation of type Lock # 281| 0: [TypeMention] Lock -# 283| 31: [Method] LockMethod +# 283| 32: [Method] LockMethod # 283| -1: [TypeMention] Void # 284| 4: [BlockStmt] {...} # 285| 0: [LockStmt] lock (...) {...} diff --git a/csharp/ql/test/library-tests/statements/Switch4.ql b/csharp/ql/test/library-tests/statements/Switch4.ql index 742190ad4d5..af44a5f92cf 100644 --- a/csharp/ql/test/library-tests/statements/Switch4.ql +++ b/csharp/ql/test/library-tests/statements/Switch4.ql @@ -1,5 +1,5 @@ /** - * @name Test the implicit switch field isn't populated. + * @name Test the implicit switch field isn't populated */ import csharp diff --git a/csharp/ql/test/library-tests/stringinterpolation/PrintAst.expected b/csharp/ql/test/library-tests/stringinterpolation/PrintAst.expected index 6529f9feed5..4e975eedd4c 100644 --- a/csharp/ql/test/library-tests/stringinterpolation/PrintAst.expected +++ b/csharp/ql/test/library-tests/stringinterpolation/PrintAst.expected @@ -1,6 +1,6 @@ StringInterpolation.cs: # 3| [Class] MyStringInterpolationClass -# 6| 5: [Method] M +# 6| 6: [Method] M # 6| -1: [TypeMention] Void # 7| 4: [BlockStmt] {...} # 8| 0: [LocalVariableDeclStmt] ... ...; diff --git a/csharp/ql/test/library-tests/structuralcomparison/structuralComparison.expected b/csharp/ql/test/library-tests/structuralcomparison/structuralComparison.expected index 9d3c935266a..0f131d8c25c 100644 --- a/csharp/ql/test/library-tests/structuralcomparison/structuralComparison.expected +++ b/csharp/ql/test/library-tests/structuralcomparison/structuralComparison.expected @@ -52,6 +52,8 @@ same | StructuralComparison.cs:50:18:50:21 | access to property Prop | StructuralComparison.cs:51:18:51:26 | access to property Prop | gvn | StructuralComparison.cs:3:14:3:18 | call to constructor Object | (kind:Expr(79)) | +| StructuralComparison.cs:3:14:3:18 | call to method | ((kind:Expr(12),false,Class) :: (kind:Expr(24),false,)) | +| StructuralComparison.cs:3:14:3:18 | this access | (kind:Expr(12),false,Class) | | StructuralComparison.cs:3:14:3:18 | {...} | (kind:Stmt(1)) | | StructuralComparison.cs:5:26:5:26 | access to field x | (kind:Expr(16),true,x) | | StructuralComparison.cs:5:26:5:26 | this access | (kind:Expr(12)) | @@ -148,8 +150,12 @@ gvn | StructuralComparison.cs:28:15:28:15 | access to field x | (kind:Expr(16),true,x) | | StructuralComparison.cs:28:15:28:15 | this access | (kind:Expr(12),false,Class) | | StructuralComparison.cs:32:14:32:22 | call to constructor Object | (kind:Expr(79)) | +| StructuralComparison.cs:32:14:32:22 | call to method | ((kind:Expr(12),false,BaseClass) :: (kind:Expr(24),false,)) | +| StructuralComparison.cs:32:14:32:22 | this access | (kind:Expr(12),false,BaseClass) | | StructuralComparison.cs:32:14:32:22 | {...} | (kind:Stmt(1)) | | StructuralComparison.cs:38:14:38:25 | call to constructor BaseClass | (kind:Expr(79)) | +| StructuralComparison.cs:38:14:38:25 | call to method | ((kind:Expr(12),false,DerivedClass) :: (kind:Expr(24),false,)) | +| StructuralComparison.cs:38:14:38:25 | this access | (kind:Expr(12),false,DerivedClass) | | StructuralComparison.cs:38:14:38:25 | {...} | (kind:Stmt(1)) | | StructuralComparison.cs:41:5:45:5 | {...} | ((((kind:Expr(14),false,x3) :: ((kind:Expr(16),true,Field) :: (kind:Expr(83)))) :: (kind:Stmt(22))) :: ((((kind:Expr(14),false,x2) :: ((kind:Expr(16),true,Field) :: (kind:Expr(83)))) :: (kind:Stmt(22))) :: ((((kind:Expr(14),false,x1) :: ((kind:Expr(16),true,Field) :: (kind:Expr(83)))) :: (kind:Stmt(22))) :: (kind:Stmt(1))))) | | StructuralComparison.cs:42:9:42:28 | ... ...; | (((kind:Expr(14),false,x1) :: ((kind:Expr(16),true,Field) :: (kind:Expr(83)))) :: (kind:Stmt(22))) | diff --git a/csharp/ql/test/library-tests/types/PrintAst.expected b/csharp/ql/test/library-tests/types/PrintAst.expected index 47c3c11261b..c6dc07ab1a5 100644 --- a/csharp/ql/test/library-tests/types/PrintAst.expected +++ b/csharp/ql/test/library-tests/types/PrintAst.expected @@ -1,91 +1,91 @@ types.cs: # 1| [NamespaceDeclaration] namespace ... { ... } # 3| 1: [Class] Class -# 5| 5: [Method] BoolType +# 5| 6: [Method] BoolType # 5| -1: [TypeMention] bool -# 6| 6: [Method] CharType +# 6| 7: [Method] CharType # 6| -1: [TypeMention] char -# 7| 7: [Method] DecimalType +# 7| 8: [Method] DecimalType # 7| -1: [TypeMention] decimal -# 8| 8: [Method] SByteType +# 8| 9: [Method] SByteType # 8| -1: [TypeMention] sbyte -# 9| 9: [Method] ShortType +# 9| 10: [Method] ShortType # 9| -1: [TypeMention] short -# 10| 10: [Method] IntType +# 10| 11: [Method] IntType # 10| -1: [TypeMention] int -# 11| 11: [Method] LongType +# 11| 12: [Method] LongType # 11| -1: [TypeMention] long -# 12| 12: [Method] ByteType +# 12| 13: [Method] ByteType # 12| -1: [TypeMention] byte -# 13| 13: [Method] UShortType +# 13| 14: [Method] UShortType # 13| -1: [TypeMention] ushort -# 14| 14: [Method] UIntType +# 14| 15: [Method] UIntType # 14| -1: [TypeMention] uint -# 15| 15: [Method] ULongType +# 15| 16: [Method] ULongType # 15| -1: [TypeMention] ulong -# 16| 16: [Method] FloatType +# 16| 17: [Method] FloatType # 16| -1: [TypeMention] float -# 17| 17: [Method] DoubleType +# 17| 18: [Method] DoubleType # 17| -1: [TypeMention] double -# 18| 18: [Method] NullableType +# 18| 19: [Method] NullableType # 18| -1: [TypeMention] Struct? # 18| 1: [TypeMention] Struct -# 19| 19: [Method] VoidType +# 19| 20: [Method] VoidType # 19| -1: [TypeMention] Void -# 20| 20: [Method] ArrayType +# 20| 21: [Method] ArrayType # 20| -1: [TypeMention] Class[] # 20| 1: [TypeMention] Class -# 21| 21: [Method] ArrayArrayType +# 21| 22: [Method] ArrayArrayType # 21| -1: [TypeMention] Class[][] # 21| 1: [TypeMention] Class -# 22| 22: [Method] ConstructedClassType +# 22| 23: [Method] ConstructedClassType # 22| -1: [TypeMention] GenericClass # 22| 1: [TypeMention] Class -# 23| 23: [Method] ConstructedInterfaceType +# 23| 24: [Method] ConstructedInterfaceType # 23| -1: [TypeMention] GenericInterface # 23| 1: [TypeMention] Class -# 24| 24: [Method] ConstructedStructType +# 24| 25: [Method] ConstructedStructType # 24| -1: [TypeMention] GenericStruct # 24| 1: [TypeMention] Class -# 25| 25: [Method] DelegateType +# 25| 26: [Method] DelegateType # 25| -1: [TypeMention] Delegate -# 26| 26: [Method] PointerType +# 26| 27: [Method] PointerType # 26| -1: [TypeMention] byte* # 26| 1: [TypeMention] byte -# 27| 27: [Method] PointerPointerType +# 27| 28: [Method] PointerPointerType # 27| -1: [TypeMention] byte** # 27| 1: [TypeMention] byte -# 28| 28: [Method] PointerArrayArrayType +# 28| 29: [Method] PointerArrayArrayType # 28| -1: [TypeMention] Byte*[][] # 28| 1: [TypeMention] byte -# 29| 29: [Method] NullableArrayType +# 29| 30: [Method] NullableArrayType # 29| -1: [TypeMention] Nullable[] # 29| 1: [TypeMention] byte? # 29| 1: [TypeMention] byte -# 30| 30: [Method] NullableArrayArrayType +# 30| 31: [Method] NullableArrayArrayType # 30| -1: [TypeMention] Nullable[][] # 30| 1: [TypeMention] byte? # 30| 1: [TypeMention] byte -# 32| 31: [Method] ArrayNullArrayType1 +# 32| 32: [Method] ArrayNullArrayType1 # 32| -1: [TypeMention] Byte[][] # 32| 1: [TypeMention] byte -# 33| 32: [Method] ArrayNullArrayType2 +# 33| 33: [Method] ArrayNullArrayType2 # 33| -1: [TypeMention] Object[][] # 33| 1: [TypeMention] object -# 34| 33: [Method] ArrayNullableRefType +# 34| 34: [Method] ArrayNullableRefType # 34| -1: [TypeMention] Object[] # 34| 1: [TypeMention] object -# 35| 34: [Method] NullableRefType +# 35| 35: [Method] NullableRefType # 35| -1: [TypeMention] object -# 37| 35: [Method] NullableArrayArrayType2 +# 37| 36: [Method] NullableArrayArrayType2 # 37| -1: [TypeMention] Nullable[][] # 37| 1: [TypeMention] byte? # 37| 1: [TypeMention] byte -# 38| 36: [Method] Map +# 38| 37: [Method] Map # 38| -1: [TypeMention] Map # 38| 1: [TypeMention] string # 38| 2: [TypeMention] Class -# 39| 37: [Method] Null +# 39| 38: [Method] Null # 39| -1: [TypeMention] Class # 40| 4: [BlockStmt] {...} # 41| 0: [ReturnStmt] return ...; @@ -112,21 +112,21 @@ types.cs: # 59| 1: [DefaultAttribute] [InlineArray(...)] # 59| -1: [TypeMention] InlineArrayAttribute # 59| 0: [IntLiteral] 10 -# 62| 5: [Field] myInlineArrayElements +# 62| 6: [Field] myInlineArrayElements # 62| -1: [TypeMention] int # 66| 11: [InlineArrayType] MyMultiDimensionalInlineArray #-----| 0: (Attributes) # 65| 1: [DefaultAttribute] [InlineArray(...)] # 65| -1: [TypeMention] InlineArrayAttribute # 65| 0: [IntLiteral] 5 -# 68| 5: [Field] myMultiDimentionalInlineArrayElements +# 68| 6: [Field] myMultiDimentionalInlineArrayElements # 68| -1: [TypeMention] MyInlineArray # 72| 12: [InlineArrayType] MyMultiDimensionalInlineArray2 #-----| 0: (Attributes) # 71| 1: [DefaultAttribute] [InlineArray(...)] # 71| -1: [TypeMention] InlineArrayAttribute # 71| 0: [IntLiteral] 7 -# 74| 5: [Field] myMultiDimentionalInlineArrayElements +# 74| 6: [Field] myMultiDimentionalInlineArrayElements # 74| -1: [TypeMention] String[] # 74| 1: [TypeMention] string # 78| 13: [InlineArrayType] MyMultiDimensionalInlineArray3 @@ -134,7 +134,7 @@ types.cs: # 77| 1: [DefaultAttribute] [InlineArray(...)] # 77| -1: [TypeMention] InlineArrayAttribute # 77| 0: [IntLiteral] 4 -# 80| 5: [Field] myMultiDimentionalInlineArrayElements +# 80| 6: [Field] myMultiDimentionalInlineArrayElements # 80| -1: [TypeMention] Object[,] # 80| 1: [TypeMention] object # 84| 14: [InlineArrayType] MyMultiDimensionalInlineArray4 @@ -142,6 +142,6 @@ types.cs: # 83| 1: [DefaultAttribute] [InlineArray(...)] # 83| -1: [TypeMention] InlineArrayAttribute # 83| 0: [IntLiteral] 11 -# 86| 5: [Field] myMultiDimentionalInlineArrayElements +# 86| 6: [Field] myMultiDimentionalInlineArrayElements # 86| -1: [TypeMention] Object[][] # 86| 1: [TypeMention] object diff --git a/csharp/ql/test/library-tests/unsafe/PrintAst.expected b/csharp/ql/test/library-tests/unsafe/PrintAst.expected index d18e3b33072..76e1387cb76 100644 --- a/csharp/ql/test/library-tests/unsafe/PrintAst.expected +++ b/csharp/ql/test/library-tests/unsafe/PrintAst.expected @@ -1,7 +1,7 @@ unsafe.cs: # 1| [NamespaceDeclaration] namespace ... { ... } # 3| 1: [Class] Test -# 5| 5: [Method] Main +# 5| 6: [Method] Main # 5| -1: [TypeMention] Void #-----| 2: (Parameters) # 5| 0: [Parameter] args @@ -93,7 +93,7 @@ unsafe.cs: # 19| 1: [SubExpr] ... - ... # 19| 0: [LocalVariableAccess] access to local variable ip # 19| 1: [LocalVariableAccess] access to local variable ip42 -# 22| 6: [Method] f +# 22| 7: [Method] f # 22| -1: [TypeMention] Void #-----| 2: (Parameters) # 22| 0: [Parameter] p @@ -114,10 +114,10 @@ unsafe.cs: # 26| 0: [AddExpr] ... + ... # 26| 0: [ParameterAccess] access to parameter p # 26| 1: [IntLiteral] 0 -# 30| 7: [Method] g +# 30| 8: [Method] g # 30| -1: [TypeMention] Void # 30| 4: [BlockStmt] {...} -# 32| 8: [Method] h +# 32| 9: [Method] h # 32| -1: [TypeMention] Void # 33| 4: [BlockStmt] {...} # 34| 0: [UnsafeStmt] unsafe {...} diff --git a/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/MissingAntiForgeryTokenValidation.cs b/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/MissingAntiForgeryTokenValidation.cs new file mode 100644 index 00000000000..84d904f900d --- /dev/null +++ b/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/MissingAntiForgeryTokenValidation.cs @@ -0,0 +1,31 @@ +using Microsoft.AspNetCore.Mvc; + +public class HomeController : Controller +{ + // BAD: Anti forgery token has been forgotten + [HttpPost] + public ActionResult Login() + { + return View(); + } + + // GOOD: Anti forgery token is validated + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult UpdateDetails() + { + return View(); + } + + // No validation required, as this is a GET method. + public ActionResult ShowHelp() + { + return View(); + } + + // Should be ignored, because it is not an action method + [NonAction] + public void UtilityMethod() + { + } +} diff --git a/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/MissingAntiForgeryTokenValidation.expected b/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/MissingAntiForgeryTokenValidation.expected new file mode 100644 index 00000000000..859fd4be920 --- /dev/null +++ b/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/MissingAntiForgeryTokenValidation.expected @@ -0,0 +1 @@ +| MissingAntiForgeryTokenValidation.cs:7:25:7:29 | Login | Method 'Login' handles a POST request without performing CSRF token validation. | diff --git a/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/MissingAntiForgeryTokenValidation.qlref b/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/MissingAntiForgeryTokenValidation.qlref new file mode 100644 index 00000000000..5e1ab2426c6 --- /dev/null +++ b/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/MissingAntiForgeryTokenValidation.qlref @@ -0,0 +1 @@ +query: Security Features/CWE-352/MissingAntiForgeryTokenValidation.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/options b/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/options new file mode 100644 index 00000000000..698ad488b6d --- /dev/null +++ b/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/options @@ -0,0 +1,2 @@ +semmle-extractor-options: /nostdlib /noconfig +semmle-extractor-options: --load-sources-from-project:${testdir}/../../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj diff --git a/csharp/tools/tracing-config.lua b/csharp/tools/tracing-config.lua index 13ede12a237..94cc4fabc16 100644 --- a/csharp/tools/tracing-config.lua +++ b/csharp/tools/tracing-config.lua @@ -183,7 +183,7 @@ function RegisterExtractorPack(id) MsBuildMatcher, CreatePatternMatcher({ '^csc.*%.exe$' }, MatchCompilerName, extractor, { prepend = { '--compiler', '"${compiler}"' }, - order = ORDER_BEFORE + order = ORDER_AFTER }), CreatePatternMatcher({ '^fakes.*%.exe$', 'moles.*%.exe' }, MatchCompilerName, nil, { trace = false }), @@ -224,7 +224,7 @@ function RegisterExtractorPack(id) CreatePatternMatcher({ '^mcs%.exe$', '^csc%.exe$', '^csc$' }, MatchCompilerName, extractor, { prepend = { '--compiler', '${compiler}' }, - order = ORDER_BEFORE + order = ORDER_AFTER }), MsBuildMatcher, function(compilerName, compilerPath, compilerArguments, _languageId) diff --git a/docs/codeql/codeql-language-guides/abstract-syntax-tree-classes-for-working-with-java-programs.rst b/docs/codeql/codeql-language-guides/abstract-syntax-tree-classes-for-working-with-java-programs.rst index 9921ba9734b..c94b9d1891e 100644 --- a/docs/codeql/codeql-language-guides/abstract-syntax-tree-classes-for-working-with-java-programs.rst +++ b/docs/codeql/codeql-language-guides/abstract-syntax-tree-classes-for-working-with-java-programs.rst @@ -231,7 +231,7 @@ Accesses +--------------------------------+---------------------+ | ``a[i]`` | ArrayAccess_ | +--------------------------------+---------------------+ -| ``f(...)`` | MethodAccess_ | +| ``f(...)`` | MethodCall_ | +--------------------------------+ | | ``e.m(...)`` | | +--------------------------------+---------------------+ @@ -374,7 +374,7 @@ Further reading .. _ThisAccess: https://codeql.github.com/codeql-standard-libraries/java/semmle/code/java/Expr.qll/type.Expr$ThisAccess.html .. _SuperAccess: https://codeql.github.com/codeql-standard-libraries/java/semmle/code/java/Expr.qll/type.Expr$SuperAccess.html .. _ArrayAccess: https://codeql.github.com/codeql-standard-libraries/java/semmle/code/java/Expr.qll/type.Expr$ArrayAccess.html -.. _MethodAccess: https://codeql.github.com/codeql-standard-libraries/java/semmle/code/java/Expr.qll/type.Expr$MethodAccess.html +.. _MethodCall: https://codeql.github.com/codeql-standard-libraries/java/semmle/code/java/Expr.qll/type.Expr$MethodCall.html .. _WildcardTypeAccess: https://codeql.github.com/codeql-standard-libraries/java/semmle/code/java/Expr.qll/type.Expr$WildcardTypeAccess.html .. _FieldAccess: https://codeql.github.com/codeql-standard-libraries/java/semmle/code/java/Expr.qll/type.Expr$FieldAccess.html .. _CastExpr: https://codeql.github.com/codeql-standard-libraries/java/semmle/code/java/Expr.qll/type.Expr$CastExpr.html diff --git a/docs/codeql/codeql-language-guides/basic-query-for-java-code.rst b/docs/codeql/codeql-language-guides/basic-query-for-java-code.rst index 63944d25d43..b61e0f01ee7 100644 --- a/docs/codeql/codeql-language-guides/basic-query-for-java-code.rst +++ b/docs/codeql/codeql-language-guides/basic-query-for-java-code.rst @@ -42,11 +42,11 @@ Running a quick query .. code-block:: ql - from MethodAccess ma + from MethodCall mc where - ma.getMethod().hasName("equals") and - ma.getArgument(0).(StringLiteral).getValue() = "" - select ma, "This comparison to empty string is inefficient, use isEmpty() instead." + mc.getMethod().hasName("equals") and + mc.getArgument(0).(StringLiteral).getValue() = "" + select mc, "This comparison to empty string is inefficient, use isEmpty() instead." Note that CodeQL treats Java and Kotlin as part of the same language, so even though this query starts with ``import java``, it will work for both Java and Kotlin code. @@ -55,7 +55,7 @@ Running a quick query .. image:: ../images/codeql-for-visual-studio-code/basic-java-query-results-1.png :align: center -If any matching code is found, click a link in the ``ma`` column to view the ``.equals`` expression in the code viewer. +If any matching code is found, click a link in the ``mc`` column to view the ``.equals`` expression in the code viewer. .. image:: ../images/codeql-for-visual-studio-code/basic-java-query-results-2.png :align: center @@ -72,15 +72,15 @@ After the initial ``import`` statement, this simple query comprises three parts +==================================================================================================+===================================================================================================================+===================================================================================================+ | ``import java`` | Imports the standard CodeQL libraries for Java and Kotlin. | Every query begins with one or more ``import`` statements. | +--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+ -| ``from MethodAccess ma`` | Defines the variables for the query. | We use: | +| ``from MethodCall mc`` | Defines the variables for the query. | We use: | | | Declarations are of the form: | | -| | `` `` | - a ``MethodAccess`` variable for call expressions | +| | `` `` | - a ``MethodCall`` variable for call expressions | +--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+ -| ``where ma.getMethod().hasName("equals") and ma.getArgument(0).(StringLiteral).getValue() = ""`` | Defines a condition on the variables. | ``ma.getMethod().hasName("equals")`` restricts ``ma`` to only calls to methods call ``equals``. | +| ``where mc.getMethod().hasName("equals") and mc.getArgument(0).(StringLiteral).getValue() = ""`` | Defines a condition on the variables. | ``mc.getMethod().hasName("equals")`` restricts ``mc`` to only calls to methods call ``equals``. | | | | | -| | | ``ma.getArgument(0).(StringLiteral).getValue() = ""`` says the argument must be literal ``""``. | +| | | ``mc.getArgument(0).(StringLiteral).getValue() = ""`` says the argument must be literal ``""``. | +--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+ -| ``select ma, "This comparison to empty string is inefficient, use isEmpty() instead."`` | Defines what to report for each match. | Reports the resulting ``.equals`` expression with a string that explains the problem. | +| ``select mc, "This comparison to empty string is inefficient, use isEmpty() instead."`` | Defines what to report for each match. | Reports the resulting ``.equals`` expression with a string that explains the problem. | | | | | | | ``select`` statements for queries that are used to find instances of poor coding practice are always in the form: | | | | ``select , ""`` | | @@ -110,16 +110,16 @@ In this case, it is not possible to simply use ``o.isEmpty()`` instead, as ``o`` .. code-block:: ql - ma.getQualifier().getType() instanceof TypeString + mc.getQualifier().getType() instanceof TypeString The ``where`` clause is now: .. code-block:: ql where - ma.getQualifier().getType() instanceof TypeString and - ma.getMethod().hasName("equals") and - ma.getArgument(0).(StringLiteral).getValue() = "" + mc.getQualifier().getType() instanceof TypeString and + mc.getMethod().hasName("equals") and + mc.getArgument(0).(StringLiteral).getValue() = "" #. Re-run the query. @@ -141,4 +141,4 @@ Further reading .. |image-quick-query| image:: ../images/codeql-for-visual-studio-code/quick-query-tab-java.png -.. |result-col-1| replace:: The first column corresponds to the expression ``ma`` and is linked to the location in the source code of the project where ``ma`` occurs. \ No newline at end of file +.. |result-col-1| replace:: The first column corresponds to the expression ``mc`` and is linked to the location in the source code of the project where ``mc`` occurs. \ No newline at end of file diff --git a/docs/codeql/codeql-language-guides/navigating-the-call-graph.rst b/docs/codeql/codeql-language-guides/navigating-the-call-graph.rst index 6e1b443f96b..a36b029b1d3 100644 --- a/docs/codeql/codeql-language-guides/navigating-the-call-graph.rst +++ b/docs/codeql/codeql-language-guides/navigating-the-call-graph.rst @@ -8,7 +8,7 @@ CodeQL has classes for identifying code that calls other code, and code that can Call graph classes ------------------ -The CodeQL library for Java/Kotlin provides two abstract classes for representing a program's call graph: ``Callable`` and ``Call``. The former is simply the common superclass of ``Method`` and ``Constructor``, the latter is a common superclass of ``MethodAccess``, ``ClassInstanceExpression``, ``ThisConstructorInvocationStmt`` and ``SuperConstructorInvocationStmt``. Simply put, a ``Callable`` is something that can be invoked, and a ``Call`` is something that invokes a ``Callable``. +The CodeQL library for Java/Kotlin provides two abstract classes for representing a program's call graph: ``Callable`` and ``Call``. The former is simply the common superclass of ``Method`` and ``Constructor``, the latter is a common superclass of ``MethodCall``, ``ClassInstanceExpression``, ``ThisConstructorInvocationStmt`` and ``SuperConstructorInvocationStmt``. Simply put, a ``Callable`` is something that can be invoked, and a ``Call`` is something that invokes a ``Callable``. For example, in the following program all callables and calls have been annotated with comments: diff --git a/docs/codeql/codeql-language-guides/types-in-java.rst b/docs/codeql/codeql-language-guides/types-in-java.rst index bed021489ea..2633f8d012f 100644 --- a/docs/codeql/codeql-language-guides/types-in-java.rst +++ b/docs/codeql/codeql-language-guides/types-in-java.rst @@ -113,7 +113,7 @@ To identify these cases, we can create two CodeQL classes that represent, respec } /** class representing calls to java.util.Collection.toArray(T[]) */ - class CollectionToArrayCall extends MethodAccess { + class CollectionToArrayCall extends MethodCall { CollectionToArrayCall() { exists(CollectionToArray m | this.getMethod().getSourceDeclaration().overridesOrInstantiates*(m) @@ -210,7 +210,7 @@ Now we want to identify all calls to ``Collection.contains``, including any meth .. code-block:: ql - class JavaUtilCollectionContainsCall extends MethodAccess { + class JavaUtilCollectionContainsCall extends MethodCall { JavaUtilCollectionContainsCall() { exists(JavaUtilCollectionContains jucc | this.getMethod().getSourceDeclaration().overrides*(jucc) @@ -297,7 +297,7 @@ Adding these three improvements, our final query becomes: } } - class JavaUtilCollectionContainsCall extends MethodAccess { + class JavaUtilCollectionContainsCall extends MethodCall { JavaUtilCollectionContainsCall() { exists(JavaUtilCollectionContains jucc | this.getMethod().getSourceDeclaration().overrides*(jucc) diff --git a/docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.23.6.rst b/docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.23.6.rst new file mode 100644 index 00000000000..67fe1ed487f --- /dev/null +++ b/docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.23.6.rst @@ -0,0 +1,144 @@ +.. _codeql-cli-2.23.6: + +========================== +CodeQL 2.23.6 (2025-11-24) +========================== + +.. contents:: Contents + :depth: 2 + :local: + :backlinks: none + +This is an overview of changes in the CodeQL CLI and relevant CodeQL query and library packs. For additional updates on changes to the CodeQL code scanning experience, check out the `code scanning section on the GitHub blog `__, `relevant GitHub Changelog updates `__, `changes in the CodeQL extension for Visual Studio Code `__, and the `CodeQL Action changelog `__. + +Security Coverage +----------------- + +CodeQL 2.23.6 runs a total of 485 security queries when configured with the Default suite (covering 166 CWE). The Extended suite enables an additional 135 queries (covering 35 more CWE). 2 security queries have been added with this release. + +CodeQL CLI +---------- + +Breaking Changes +~~~~~~~~~~~~~~~~ + +* The LGTM results format for uploading to LGTM has been removed. + +Query Packs +----------- + +Minor Analysis Improvements +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +C# +"" + +* An improvement to the Guards library for recognizing disjunctions means improved precision for :code:`cs/constant-condition`, :code:`cs/inefficient-containskey`, and :code:`cs/dereferenced-value-may-be-null`. The two former can have additional findings, and the latter will have fewer false positives. + +Rust +"""" + +* Taint flow barriers have been added to the :code:`rust/regex-injection`, :code:`rust/sql-injection` and :code:`rust/log-injection`, reducing the frequency of false positive results for these queries. + +New Queries +~~~~~~~~~~~ + +C# +"" + +* The :code:`cs/web/cookie-secure-not-set` and :code:`cs/web/cookie-httponly-not-set` queries have been promoted from experimental to the main query pack. + +Query Metadata Changes +~~~~~~~~~~~~~~~~~~~~~~ + +Java/Kotlin +""""""""""" + +* Reduced the :code:`security-severity` score of the :code:`java/overly-large-range` query from 5.0 to 4.0 to better reflect its impact. +* Reduced the :code:`security-severity` score of the :code:`java/insecure-cookie` query from 5.0 to 4.0 to better reflect its impact. + +JavaScript/TypeScript +""""""""""""""""""""" + +* Increased the :code:`security-severity` score of the :code:`js/xss-through-dom` query from 6.1 to 7.8 to align with other XSS queries. +* Reduced the :code:`security-severity` score of the :code:`js/overly-large-range` query from 5.0 to 4.0 to better reflect its impact. + +Python +"""""" + +* Reduced the :code:`security-severity` score of the :code:`py/overly-large-range` query from 5.0 to 4.0 to better reflect its impact. + +Ruby +"""" + +* Reduced the :code:`security-severity` score of the :code:`rb/overly-large-range` query from 5.0 to 4.0 to better reflect its impact. + +Language Libraries +------------------ + +Bug Fixes +~~~~~~~~~ + +C/C++ +""""" + +* Improve performance of the range analysis in cases where it would otherwise take an exorbitant amount of time. + +Golang +"""""" + +* Some fixes relating to use of path transformers when extracting a database: + + * Fixed a problem where the path transformer would be ignored when extracting older codebases that predate the use of Go modules. + * The environment variable :code:`CODEQL_PATH_TRANSFORMER` is now recognized, in addition to :code:`SEMMLE_PATH_TRANSFORMER`. + * Fixed some cases where the extractor emitted paths without applying the path transformer. + +Breaking Changes +~~~~~~~~~~~~~~~~ + +Python +"""""" + +* The classes :code:`ControlFlowNode`, :code:`Expr`, and :code:`Module` no longer expose predicates that invoke the points-to analysis. To access these predicates, import the module :code:`LegacyPointsTo` and follow the instructions given therein. + +Major Analysis Improvements +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Swift +""""" + +* Upgraded to allow analysis of Swift 6.2.1. + +Minor Analysis Improvements +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +C# +"" + +* Updated *roslyn* and *binlog* dependencies in the extractor, which may improve database and analysis quality. + +Rust +"""" + +* Added models for cookie methods in the :code:`poem` crate. + +Deprecated APIs +~~~~~~~~~~~~~~~ + +C# +"" + +* :code:`ControlFlowElement.controlsBlock` has been deprecated in favor of the Guards library. + +New Features +~~~~~~~~~~~~ + +C/C++ +""""" + +* New predicates :code:`getAnExpandedArgument` and :code:`getExpandedArgument` were added to the :code:`Compilation` class, yielding compilation arguments after expansion of response files. + +C# +"" + +* Initial support for incremental C# databases via :code:`codeql database create --overlay-base`\ /\ :code:`--overlay-changes`. diff --git a/docs/codeql/codeql-overview/codeql-changelog/index.rst b/docs/codeql/codeql-overview/codeql-changelog/index.rst index e48181dc026..195a9782088 100644 --- a/docs/codeql/codeql-overview/codeql-changelog/index.rst +++ b/docs/codeql/codeql-overview/codeql-changelog/index.rst @@ -11,6 +11,7 @@ A list of queries for each suite and language `is available here { } +private module Input implements InputSig { + predicate missingLocationExclude(DataFlow::Node n) { + n instanceof DataFlow::GlobalFunctionNode or n instanceof Private::FlowSummaryNode + } + + predicate uniqueNodeLocationExclude(DataFlow::Node n) { missingLocationExclude(n) } + + predicate localFlowIsLocalExclude(DataFlow::Node n1, DataFlow::Node n2) { + n1 instanceof DataFlow::FunctionNode and simpleLocalFlowStep(n1, n2, _) + } + + predicate argHasPostUpdateExclude(DataFlow::ArgumentNode n) { + not DataFlow::insnHasPostUpdateNode(n.asInstruction()) + } +} module Consistency = MakeConsistency; diff --git a/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll b/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll index d48335d299f..a388e4bab04 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll @@ -1347,7 +1347,6 @@ module Public { } } -private import Private private import Public class SummaryPostUpdateNode extends FlowSummaryNode, PostUpdateNode { diff --git a/go/ql/lib/semmle/go/frameworks/Gin.qll b/go/ql/lib/semmle/go/frameworks/Gin.qll new file mode 100644 index 00000000000..71ed5d931fa --- /dev/null +++ b/go/ql/lib/semmle/go/frameworks/Gin.qll @@ -0,0 +1,24 @@ +/** + * Provides classes for modeling the `github.com/gin-gonic/gin` package. + */ + +import go +import semmle.go.concepts.HTTP + +/** Provides models for the `gin-gonic/gin` package. */ +module Gin { + /** Gets the package name `github.com/gin-gonic/gin`. */ + string packagePath() { result = package("github.com/gin-gonic/gin", "") } + + private class GinCookieWrite extends Http::CookieWrite::Range, DataFlow::MethodCallNode { + GinCookieWrite() { this.getTarget().hasQualifiedName(packagePath(), "Context", "SetCookie") } + + override DataFlow::Node getName() { result = this.getArgument(0) } + + override DataFlow::Node getValue() { result = this.getArgument(1) } + + override DataFlow::Node getSecure() { result = this.getArgument(5) } + + override DataFlow::Node getHttpOnly() { result = this.getArgument(6) } + } +} diff --git a/go/ql/lib/semmle/go/frameworks/stdlib/NetHttp.qll b/go/ql/lib/semmle/go/frameworks/stdlib/NetHttp.qll index 88c9605502f..e798d116352 100644 --- a/go/ql/lib/semmle/go/frameworks/stdlib/NetHttp.qll +++ b/go/ql/lib/semmle/go/frameworks/stdlib/NetHttp.qll @@ -293,4 +293,38 @@ module NetHttp { override DataFlow::Node getAPathArgument() { result = this.getArgument(2) } } + + private class CookieWrite extends Http::CookieWrite::Range, DataFlow::CallNode { + CookieWrite() { this.getTarget().hasQualifiedName(package("net/http", ""), "SetCookie") } + + override DataFlow::Node getName() { result = this.getArgument(1) } + + override DataFlow::Node getValue() { result = this.getArgument(1) } + + override DataFlow::Node getSecure() { result = this.getArgument(1) } + + override DataFlow::Node getHttpOnly() { result = this.getArgument(1) } + } + + private class CookieFieldWrite extends Http::CookieOptionWrite::Range { + DataFlow::Node written; + string fieldName; + + CookieFieldWrite() { + exists(Write w, Field f | + f.hasQualifiedName(package("net/http", ""), "Cookie", fieldName) and + w.writesField(this, f, written) + ) + } + + override DataFlow::Node getCookieOutput() { result = this } + + override DataFlow::Node getName() { fieldName = "Name" and result = written } + + override DataFlow::Node getValue() { fieldName = "Value" and result = written } + + override DataFlow::Node getSecure() { fieldName = "Secure" and result = written } + + override DataFlow::Node getHttpOnly() { fieldName = "HttpOnly" and result = written } + } } diff --git a/go/ql/lib/semmle/go/internal/OverlayXml.qll b/go/ql/lib/semmle/go/internal/OverlayXml.qll new file mode 100644 index 00000000000..95d49f2d611 --- /dev/null +++ b/go/ql/lib/semmle/go/internal/OverlayXml.qll @@ -0,0 +1,46 @@ +overlay[local] +module; + +/** + * A local predicate that always holds for the overlay variant and never holds for the base variant. + * This is used to define local predicates that behave differently for the base and overlay variant. + */ +private predicate isOverlay() { databaseMetadata("isOverlay", "true") } + +private string getXmlFile(@xmllocatable locatable) { + exists(@location_default location, @file file | xmllocations(locatable, location) | + locations_default(location, file, _, _, _, _) and + files(file, result) + ) +} + +private string getXmlFileInBase(@xmllocatable locatable) { + not isOverlay() and + result = getXmlFile(locatable) +} + +/** + * Holds if the given `file` was extracted as part of the overlay and was extracted by the HTML/XML + * extractor. + */ +private predicate overlayXmlExtracted(string file) { + isOverlay() and + exists(@xmllocatable locatable | + not files(locatable, _) and not xmlNs(locatable, _, _, _) and file = getXmlFile(locatable) + ) +} + +/** + * Holds if the given XML `locatable` should be discarded, because it is part of the overlay base + * and is in a file that was also extracted as part of the overlay database. + */ +overlay[discard_entity] +private predicate discardXmlLocatable(@xmllocatable locatable) { + exists(string file | file = getXmlFileInBase(locatable) | + overlayChangedFiles(file) + or + // The HTML/XML extractor is currently not incremental and may extract more files than those + // included in overlayChangedFiles. + overlayXmlExtracted(file) + ) +} diff --git a/go/ql/lib/semmle/go/security/AllocationSizeOverflow.qll b/go/ql/lib/semmle/go/security/AllocationSizeOverflow.qll index 079ab35ee36..03df0817975 100644 --- a/go/ql/lib/semmle/go/security/AllocationSizeOverflow.qll +++ b/go/ql/lib/semmle/go/security/AllocationSizeOverflow.qll @@ -27,7 +27,7 @@ module AllocationSizeOverflow { private module FindLargeLensFlow = TaintTracking::Global; private DataFlow::CallNode getALargeLenCall() { - exists(DataFlow::Node lenArg | FindLargeLensFlow::flow(_, lenArg) | + exists(DataFlow::Node lenArg | FindLargeLensFlow::flowTo(lenArg) | result.getArgument(0) = lenArg ) } diff --git a/go/ql/lib/semmle/go/security/CookieWithoutHttpOnly.qll b/go/ql/lib/semmle/go/security/CookieWithoutHttpOnly.qll new file mode 100644 index 00000000000..8eed50b8791 --- /dev/null +++ b/go/ql/lib/semmle/go/security/CookieWithoutHttpOnly.qll @@ -0,0 +1,77 @@ +/** Provides classes and predicates for identifying HTTP cookies without the `HttpOnly` attribute. */ + +import go +import semmle.go.concepts.HTTP +import semmle.go.dataflow.DataFlow + +private module SensitiveCookieNameConfig implements DataFlow::ConfigSig { + /** + * Holds if `source` is an expression with a name or literal value `val` indicating a sensitive cookie. + */ + additional predicate isSource(DataFlow::Node source, string val) { + ( + val = source.asExpr().getStringValue() or + val = source.asExpr().(Name).getTarget().getName() + ) and + val.regexpMatch("(?i).*(session|login|token|user|auth|credential).*") and + not val.regexpMatch("(?i).*(xsrf|csrf|forgery).*") + } + + predicate isSource(DataFlow::Node source) { isSource(source, _) } + + additional predicate isSink(DataFlow::Node sink, Http::CookieWrite cw) { sink = cw.getName() } + + predicate isSink(DataFlow::Node sink) { isSink(sink, _) } + + predicate isAdditionalFlowStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(Http::CookieOptionWrite co | co.getName() = pred and co.getCookieOutput() = succ) + } +} + +/** Tracks flow from sensitive names to HTTP cookie writes. */ +module SensitiveCookieNameFlow = TaintTracking::Global; + +private module BooleanCookieHttpOnlyConfig implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { + source.getType().getUnderlyingType() instanceof BoolType + } + + predicate isSink(DataFlow::Node sink) { exists(Http::CookieWrite cw | sink = cw.getHttpOnly()) } + + predicate isAdditionalFlowStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(Http::CookieOptionWrite co | co.getHttpOnly() = pred and co.getCookieOutput() = succ) + } +} + +/** Tracks flow from boolean expressions to the `HttpOnly` attribute of HTTP cookie writes. */ +module BooleanCookieHttpOnlyFlow = TaintTracking::Global; + +/** Holds if `cw` has the `HttpOnly` attribute left at its default value of `false`. */ +predicate isNonHttpOnlyDefault(Http::CookieWrite cw) { + not BooleanCookieHttpOnlyFlow::flowTo(cw.getHttpOnly()) +} + +/** Holds if `cw` has the `HttpOnly` attribute explicitly set to `false`, from the expression `boolFalse`. */ +predicate isNonHttpOnlyDirect(Http::CookieWrite cw, Expr boolFalse) { + BooleanCookieHttpOnlyFlow::flow(DataFlow::exprNode(boolFalse), cw.getHttpOnly()) and + boolFalse.getBoolValue() = false +} + +/** Holds if `cw` has the `HttpOnly` attribute set to `false`, either explicitly or by default. */ +predicate isNonHttpOnlyCookie(Http::CookieWrite cw) { + isNonHttpOnlyDefault(cw) or + isNonHttpOnlyDirect(cw, _) +} + +/** + * Holds if `cw` has the sensitive name `name`, from the expression `nameExpr`. + * `source` and `sink` represent the data flow path from the sensitive name expression to the cookie write. + */ +predicate isSensitiveCookie( + Http::CookieWrite cw, string name, SensitiveCookieNameFlow::PathNode source, + SensitiveCookieNameFlow::PathNode sink +) { + SensitiveCookieNameFlow::flowPath(source, sink) and + SensitiveCookieNameConfig::isSource(source.getNode(), name) and + SensitiveCookieNameConfig::isSink(sink.getNode(), cw) +} diff --git a/go/ql/lib/semmle/go/security/CookieWithoutSecure.qll b/go/ql/lib/semmle/go/security/CookieWithoutSecure.qll new file mode 100644 index 00000000000..1ba5315bf8b --- /dev/null +++ b/go/ql/lib/semmle/go/security/CookieWithoutSecure.qll @@ -0,0 +1,37 @@ +/** Provides classes and predicates for identifying HTTP cookies without the `Secure` attribute. */ + +import go +import semmle.go.concepts.HTTP +import semmle.go.dataflow.DataFlow + +private module BooleanCookieSecureConfig implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { + source.getType().getUnderlyingType() instanceof BoolType + } + + predicate isSink(DataFlow::Node sink) { exists(Http::CookieWrite cw | sink = cw.getSecure()) } + + predicate isAdditionalFlowStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(Http::CookieOptionWrite co | co.getSecure() = pred and co.getCookieOutput() = succ) + } +} + +/** Tracks flow from boolean expressions to the `Secure` attribute of HTTP cookie writes. */ +module BooleanCookieSecureFlow = TaintTracking::Global; + +/** Holds if `cw` has the `Secure` attribute left at its default value of `false`. */ +predicate isInsecureDefault(Http::CookieWrite cw) { + not BooleanCookieSecureFlow::flowTo(cw.getSecure()) +} + +/** Holds if `cw` has the `Secure` attribute explicitly set to `false`, from the expression `boolFalse`. */ +predicate isInsecureDirect(Http::CookieWrite cw, Expr boolFalse) { + BooleanCookieSecureFlow::flow(DataFlow::exprNode(boolFalse), cw.getSecure()) and + boolFalse.getBoolValue() = false +} + +/** Holds if `cw` has the `Secure` attribute set to `false`, either explicitly or by default. */ +predicate isInsecureCookie(Http::CookieWrite cw) { + isInsecureDefault(cw) or + isInsecureDirect(cw, _) +} diff --git a/go/ql/lib/semmle/go/security/ExternalAPIs.qll b/go/ql/lib/semmle/go/security/ExternalAPIs.qll index f85f939258f..0a9be6bcc70 100644 --- a/go/ql/lib/semmle/go/security/ExternalAPIs.qll +++ b/go/ql/lib/semmle/go/security/ExternalAPIs.qll @@ -211,7 +211,7 @@ module UntrustedDataToUnknownExternalApiFlow = /** A node representing untrusted data being passed to an external API. */ class UntrustedExternalApiDataNode extends ExternalApiDataNode { - UntrustedExternalApiDataNode() { UntrustedDataToExternalApiFlow::flow(_, this) } + UntrustedExternalApiDataNode() { UntrustedDataToExternalApiFlow::flowTo(this) } /** Gets a source of untrusted data which is passed to this external API data node. */ DataFlow::Node getAnUntrustedSource() { UntrustedDataToExternalApiFlow::flow(result, this) } diff --git a/go/ql/lib/semmle/go/security/MissingJwtSignatureCheck.qll b/go/ql/lib/semmle/go/security/MissingJwtSignatureCheck.qll index 15afe81944f..1f8185d4397 100644 --- a/go/ql/lib/semmle/go/security/MissingJwtSignatureCheck.qll +++ b/go/ql/lib/semmle/go/security/MissingJwtSignatureCheck.qll @@ -15,7 +15,7 @@ module MissingJwtSignatureCheck { module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof Source and - not SafeParse::flow(source, _) + not SafeParse::flowFrom(source) } predicate isSink(DataFlow::Node sink) { sink instanceof Sink } diff --git a/go/ql/lib/semmle/go/security/UnsafeUnzipSymlink.qll b/go/ql/lib/semmle/go/security/UnsafeUnzipSymlink.qll index 19047b12b78..0ced26c3eff 100644 --- a/go/ql/lib/semmle/go/security/UnsafeUnzipSymlink.qll +++ b/go/ql/lib/semmle/go/security/UnsafeUnzipSymlink.qll @@ -32,7 +32,7 @@ module UnsafeUnzipSymlink { * Holds if `node` is an archive header field read that flows to a `path/filepath.EvalSymlinks` call. */ private predicate symlinksEvald(DataFlow::Node node) { - EvalSymlinksFlow::flow(getASimilarReadNode(node), _) + EvalSymlinksFlow::flowFrom(getASimilarReadNode(node)) } private module Config implements DataFlow::ConfigSig { diff --git a/go/ql/src/CHANGELOG.md b/go/ql/src/CHANGELOG.md index 82f6633fef9..d73a2a4a480 100644 --- a/go/ql/src/CHANGELOG.md +++ b/go/ql/src/CHANGELOG.md @@ -1,3 +1,16 @@ +## 1.5.1 + +No user-facing changes. + +## 1.5.0 + +### New Queries + +* The `go/cookie-http-only-not-set` query has been promoted from the experimental query pack. This query was originally contributed to the experimental query pack by @edvraa. +* A new query `go/cookie-secure-not-set` has been added to detect cookies without the `Secure` flag set. +* Added a new query, `go/weak-crypto-algorithm`, to detect the use of a broken or weak cryptographic algorithm. A very simple version of this query was originally contributed as an [experimental query by @dilanbhalla](https://github.com/github/codeql-go/pull/284). +* Added a new query, `go/weak-sensitive-data-hashing`, to detect the use of a broken or weak cryptographic hash algorithm on sensitive data. + ## 1.4.9 No user-facing changes. diff --git a/go/ql/src/Security/CWE-020/MissingRegexpAnchor.ql b/go/ql/src/Security/CWE-020/MissingRegexpAnchor.ql index 43a24b1aef3..a4b18bff8d3 100644 --- a/go/ql/src/Security/CWE-020/MissingRegexpAnchor.ql +++ b/go/ql/src/Security/CWE-020/MissingRegexpAnchor.ql @@ -81,5 +81,5 @@ module Config implements DataFlow::ConfigSig { module Flow = DataFlow::Global; from DataFlow::Node source, string msg -where Flow::flow(source, _) and Config::isSourceString(source, msg) +where Flow::flowFrom(source) and Config::isSourceString(source, msg) select source, msg diff --git a/go/ql/src/Security/CWE-020/UntrustedDataToExternalAPI.ql b/go/ql/src/Security/CWE-020/UntrustedDataToExternalAPI.ql index 6e8d99471ee..b9bf1be2c1d 100644 --- a/go/ql/src/Security/CWE-020/UntrustedDataToExternalAPI.ql +++ b/go/ql/src/Security/CWE-020/UntrustedDataToExternalAPI.ql @@ -6,7 +6,8 @@ * @precision low * @problem.severity error * @security-severity 7.8 - * @tags security external/cwe/cwe-020 + * @tags security + * external/cwe/cwe-020 */ import go diff --git a/go/ql/src/Security/CWE-020/UntrustedDataToUnknownExternalAPI.ql b/go/ql/src/Security/CWE-020/UntrustedDataToUnknownExternalAPI.ql index 45198047904..89ce5949245 100644 --- a/go/ql/src/Security/CWE-020/UntrustedDataToUnknownExternalAPI.ql +++ b/go/ql/src/Security/CWE-020/UntrustedDataToUnknownExternalAPI.ql @@ -6,7 +6,8 @@ * @precision low * @problem.severity error * @security-severity 7.8 - * @tags security external/cwe/cwe-020 + * @tags security + * external/cwe/cwe-020 */ import go diff --git a/go/ql/src/Security/CWE-1004/CookieWithoutHttpOnly.qhelp b/go/ql/src/Security/CWE-1004/CookieWithoutHttpOnly.qhelp new file mode 100644 index 00000000000..a9614e2a697 --- /dev/null +++ b/go/ql/src/Security/CWE-1004/CookieWithoutHttpOnly.qhelp @@ -0,0 +1,34 @@ + + + + +

Cookies without the HttpOnly flag set are accessible to client-side scripts such as JavaScript running in the same origin. +In case of a Cross-Site Scripting (XSS) vulnerability, the cookie can be stolen by a malicious script. +If a sensitive cookie does not need to be accessed directly by client-side JS, the HttpOnly flag should be set.

+
+ + +

+Set the HttpOnly flag to true for authentication cookies to ensure they are not accessible to client-side scripts. +

+
+ + +

+In the following example, in the case marked BAD, the HttpOnly flag is not set, so the default value of false is used. +In the case marked GOOD, the HttpOnly flag is set to true. +

+ + + +
+ + + +
  • MDN: Set-Cookie Header.
  • +
  • PortSwigger: Cookie without HttpOnly flag set
  • + +
    +
    \ No newline at end of file diff --git a/go/ql/src/Security/CWE-1004/CookieWithoutHttpOnly.ql b/go/ql/src/Security/CWE-1004/CookieWithoutHttpOnly.ql new file mode 100644 index 00000000000..8d11d8c40a6 --- /dev/null +++ b/go/ql/src/Security/CWE-1004/CookieWithoutHttpOnly.ql @@ -0,0 +1,25 @@ +/** + * @name Cookie 'HttpOnly' attribute is not set to true + * @description Sensitive cookies without the `HttpOnly` property set are accessible by client-side scripts such as JavaScript. + * This makes them more vulnerable to being stolen by an XSS attack. + * @kind path-problem + * @problem.severity warning + * @precision high + * @security-severity 5.0 + * @id go/cookie-httponly-not-set + * @tags security + * external/cwe/cwe-1004 + */ + +import go +import semmle.go.security.CookieWithoutHttpOnly +import SensitiveCookieNameFlow::PathGraph + +from + Http::CookieWrite cw, string name, SensitiveCookieNameFlow::PathNode source, + SensitiveCookieNameFlow::PathNode sink +where + isSensitiveCookie(cw, name, source, sink) and + isNonHttpOnlyCookie(cw) +select cw, source, sink, "Sensitive cookie $@ does not set HttpOnly attribute to true.", source, + name diff --git a/go/ql/src/Security/CWE-1004/examples/CookieWithoutHttpOnly.go b/go/ql/src/Security/CWE-1004/examples/CookieWithoutHttpOnly.go new file mode 100644 index 00000000000..a4a78b9f962 --- /dev/null +++ b/go/ql/src/Security/CWE-1004/examples/CookieWithoutHttpOnly.go @@ -0,0 +1,22 @@ +package main + +import ( + "net/http" +) + +func handlerBad(w http.ResponseWriter, r *http.Request) { + c := http.Cookie{ + Name: "session", + Value: "secret", + } + http.SetCookie(w, &c) // BAD: The HttpOnly flag is set to false by default. +} + +func handlerGood(w http.ResponseWriter, r *http.Request) { + c := http.Cookie{ + Name: "session", + Value: "secret", + HttpOnly: true, + } + http.SetCookie(w, &c) // GOOD: The HttpOnly flag is set to true. +} diff --git a/go/ql/src/Security/CWE-352/ConstantOauth2State.ql b/go/ql/src/Security/CWE-352/ConstantOauth2State.ql index 501eb6109c7..edbb41782b8 100644 --- a/go/ql/src/Security/CWE-352/ConstantOauth2State.ql +++ b/go/ql/src/Security/CWE-352/ConstantOauth2State.ql @@ -154,7 +154,7 @@ module FlowToPrintFlow = DataFlow::Global; /** Holds if the provided `CallNode`'s result flows to an argument of a printer call. */ predicate resultFlowsToPrinter(DataFlow::CallNode authCodeUrlCall) { - FlowToPrintFlow::flow(authCodeUrlCall.getResult(), _) + FlowToPrintFlow::flowFrom(authCodeUrlCall.getResult()) } /** Get a data-flow node that reads the value of `os.Stdin`. */ diff --git a/go/ql/src/Security/CWE-601/OpenUrlRedirect.ql b/go/ql/src/Security/CWE-601/OpenUrlRedirect.ql index 17ec112955f..34023f6161e 100644 --- a/go/ql/src/Security/CWE-601/OpenUrlRedirect.ql +++ b/go/ql/src/Security/CWE-601/OpenUrlRedirect.ql @@ -21,6 +21,6 @@ where OpenUrlRedirect::Flow::flowPath(source, sink) and // this excludes flow from safe parts of request URLs, for example the full URL when the // doing a redirect from `http://` to `https://` - not SafeUrlFlow::Flow::flow(_, sink.getNode()) + not SafeUrlFlow::Flow::flowTo(sink.getNode()) select sink.getNode(), source, sink, "This path to an untrusted URL redirection depends on a $@.", source.getNode(), "user-provided value" diff --git a/go/ql/src/Security/CWE-614/CookieWithoutSecure.qhelp b/go/ql/src/Security/CWE-614/CookieWithoutSecure.qhelp new file mode 100644 index 00000000000..4ee969e475c --- /dev/null +++ b/go/ql/src/Security/CWE-614/CookieWithoutSecure.qhelp @@ -0,0 +1,35 @@ + + + + +

    Cookies without the Secure flag set may be transmitted using HTTP instead of HTTPS. +This leaves them vulnerable to being read by a third party attacker. If a sensitive cookie such as a session +key is intercepted this way, it would allow the attacker to perform actions on a user's behalf.

    +
    + + +

    +Set the Secure flag to true to ensure cookies are only transmitted over secure HTTPS connections. +

    +
    + + +

    +In the following example, in the case marked BAD, the Secure flag is set to false by default. +In the case marked GOOD, the Secure flag is set to true. +

    + + + +
    + + + +
  • MDN: Set-Cookie Header.
  • +
  • Detectify: Cookie lack Secure flag.
  • +
  • PortSwigger: TLS cookie without secure flag set.
  • + +
    +
    \ No newline at end of file diff --git a/go/ql/src/Security/CWE-614/CookieWithoutSecure.ql b/go/ql/src/Security/CWE-614/CookieWithoutSecure.ql new file mode 100644 index 00000000000..7c3c4ed1dd3 --- /dev/null +++ b/go/ql/src/Security/CWE-614/CookieWithoutSecure.ql @@ -0,0 +1,19 @@ +/** + * @name Cookie 'Secure' attribute is not set to true + * @description Cookies without the `Secure` flag may be sent in cleartext. + * This makes them vulnerable to be intercepted by an attacker. + * @kind problem + * @problem.severity warning + * @precision high + * @security-severity 4.0 + * @id go/cookie-secure-not-set + * @tags security + * external/cwe/cwe-614 + */ + +import go +import semmle.go.security.CookieWithoutSecure + +from Http::CookieWrite cw +where isInsecureCookie(cw) +select cw, "Cookie does not set Secure attribute to true." diff --git a/go/ql/src/Security/CWE-614/examples/CookieWithoutSecure.go b/go/ql/src/Security/CWE-614/examples/CookieWithoutSecure.go new file mode 100644 index 00000000000..dc46c918d36 --- /dev/null +++ b/go/ql/src/Security/CWE-614/examples/CookieWithoutSecure.go @@ -0,0 +1,22 @@ +package main + +import ( + "net/http" +) + +func handlerBad(w http.ResponseWriter, r *http.Request) { + c := http.Cookie{ + Name: "session", + Value: "secret", + } + http.SetCookie(w, &c) // BAD: The Secure flag is set to false by default. +} + +func handlerGood(w http.ResponseWriter, r *http.Request) { + c := http.Cookie{ + Name: "session", + Value: "secret", + Secure: true, + } + http.SetCookie(w, &c) // GOOD: The Secure flag is set to true. +} diff --git a/go/ql/src/Security/CWE-918/RequestForgery.ql b/go/ql/src/Security/CWE-918/RequestForgery.ql index 5a5c3265483..a54f51db9ce 100644 --- a/go/ql/src/Security/CWE-918/RequestForgery.ql +++ b/go/ql/src/Security/CWE-918/RequestForgery.ql @@ -21,6 +21,6 @@ where RequestForgery::Flow::flowPath(source, sink) and request = sink.getNode().(RequestForgery::Sink).getARequest() and // this excludes flow from safe parts of request URLs, for example the full URL - not SafeUrlFlow::Flow::flow(_, sink.getNode()) + not SafeUrlFlow::Flow::flowTo(sink.getNode()) select request, source, sink, "The $@ of this request depends on a $@.", sink.getNode(), sink.getNode().(RequestForgery::Sink).getKind(), source, "user-provided value" diff --git a/go/ql/src/change-notes/2025-10-21-go-weak-crypto-algorithm.md b/go/ql/src/change-notes/released/1.5.0.md similarity index 56% rename from go/ql/src/change-notes/2025-10-21-go-weak-crypto-algorithm.md rename to go/ql/src/change-notes/released/1.5.0.md index d5f9a08fb7f..a1a1f5158cc 100644 --- a/go/ql/src/change-notes/2025-10-21-go-weak-crypto-algorithm.md +++ b/go/ql/src/change-notes/released/1.5.0.md @@ -1,5 +1,8 @@ ---- -category: newQuery ---- +## 1.5.0 + +### New Queries + +* The `go/cookie-http-only-not-set` query has been promoted from the experimental query pack. This query was originally contributed to the experimental query pack by @edvraa. +* A new query `go/cookie-secure-not-set` has been added to detect cookies without the `Secure` flag set. * Added a new query, `go/weak-crypto-algorithm`, to detect the use of a broken or weak cryptographic algorithm. A very simple version of this query was originally contributed as an [experimental query by @dilanbhalla](https://github.com/github/codeql-go/pull/284). * Added a new query, `go/weak-sensitive-data-hashing`, to detect the use of a broken or weak cryptographic hash algorithm on sensitive data. diff --git a/go/ql/src/change-notes/released/1.5.1.md b/go/ql/src/change-notes/released/1.5.1.md new file mode 100644 index 00000000000..7b24a64aca3 --- /dev/null +++ b/go/ql/src/change-notes/released/1.5.1.md @@ -0,0 +1,3 @@ +## 1.5.1 + +No user-facing changes. diff --git a/go/ql/src/codeql-pack.release.yml b/go/ql/src/codeql-pack.release.yml index c1bf629045f..c5775c46013 100644 --- a/go/ql/src/codeql-pack.release.yml +++ b/go/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.4.9 +lastReleaseVersion: 1.5.1 diff --git a/go/ql/src/experimental/CWE-1004/AuthCookie.qll b/go/ql/src/experimental/CWE-1004/AuthCookie.qll deleted file mode 100644 index 58c9f8642b3..00000000000 --- a/go/ql/src/experimental/CWE-1004/AuthCookie.qll +++ /dev/null @@ -1,245 +0,0 @@ -import go - -private class NetHttpCookieType extends Type { - NetHttpCookieType() { this.hasQualifiedName(package("net/http", ""), "Cookie") } -} - -private class GinContextSetCookieMethod extends Method { - GinContextSetCookieMethod() { - this.hasQualifiedName(package("github.com/gin-gonic/gin", ""), "Context", "SetCookie") - } -} - -private class GorillaSessionOptionsField extends Field { - GorillaSessionOptionsField() { - this.hasQualifiedName(package("github.com/gorilla/sessions", ""), "Session", "Options") - } -} - -/** - * A simplistic points-to alternative: given a struct creation and a field name, get the values that field can be assigned. - * - * Assumptions: - * - we don't reassign the variable that the creation is stored in - * - we always access the creation through the same variable it is initially assigned to - * - * This should cover most typical patterns... - */ -private DataFlow::Node getValueForFieldWrite(StructLit sl, string field) { - exists(Write w, DataFlow::Node base, Field f | - f.getName() = field and - w.writesFieldPreUpdate(base, f, result) and - ( - sl = base.asExpr() - or - base.asExpr() instanceof VariableName and - base.getAPredecessor*().asExpr() = sl - ) - ) -} - -/** - * Holds if the expression or its value has a sensitive name - */ -private predicate isAuthVariable(Expr expr) { - exists(string val | - ( - val = expr.getStringValue() or - val = expr.(Name).getTarget().getName() - ) and - val.regexpMatch("(?i).*(session|login|token|user|auth|credential).*") and - not val.regexpMatch("(?i).*(xsrf|csrf|forgery).*") - ) -} - -/** - * A cookie passed as the second parameter to `net/http.SetCookie`. - */ -private class SetCookieSink extends DataFlow::Node { - SetCookieSink() { - exists(DataFlow::CallNode cn | - cn.getTarget().hasQualifiedName(package("net/http", ""), "SetCookie") and - this = cn.getArgument(1) - ) - } -} - -private module NameToNetHttpCookieTrackingConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { isAuthVariable(source.asExpr()) } - - predicate isSink(DataFlow::Node sink) { sink instanceof SetCookieSink } - - predicate isAdditionalFlowStep(DataFlow::Node pred, DataFlow::Node succ) { - exists(StructLit sl | - sl.getType() instanceof NetHttpCookieType and - getValueForFieldWrite(sl, "Name") = pred and - sl = succ.asExpr() - ) - } -} - -/** Tracks taint flow from sensitive names to `net/http.SetCookie`. */ -module NameToNetHttpCookieTrackingFlow = TaintTracking::Global; - -private module BoolToNetHttpCookieTrackingConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { - source.getType().getUnderlyingType() instanceof BoolType - } - - predicate isSink(DataFlow::Node sink) { sink instanceof SetCookieSink } - - predicate isAdditionalFlowStep(DataFlow::Node pred, DataFlow::Node succ) { - exists(StructLit sl | - sl.getType() instanceof NetHttpCookieType and - getValueForFieldWrite(sl, "HttpOnly") = pred and - sl = succ.asExpr() - ) - } -} - -/** - * Tracks taint flow from a `bool` assigned to `HttpOnly` to - * `net/http.SetCookie`. - */ -module BoolToNetHttpCookieTrackingFlow = TaintTracking::Global; - -private module BoolToGinSetCookieTrackingConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source.getBoolValue() = false } - - predicate isSink(DataFlow::Node sink) { - exists(DataFlow::MethodCallNode mcn | - mcn.getTarget() instanceof GinContextSetCookieMethod and - mcn.getArgument(6) = sink and - exists(DataFlow::Node nameArg | - NameToGinSetCookieTrackingFlow::flowTo(nameArg) and - mcn.getArgument(0) = nameArg - ) - ) - } - - predicate observeDiffInformedIncrementalMode() { - any() // Merged with other flows in CookieWithoutHttpOnly.ql - } - - Location getASelectedSourceLocation(DataFlow::Node source) { none() } -} - -/** - * Tracks data flow from `HttpOnly` set to `false` to - * `gin-gonic/gin.Context.SetCookie`. - */ -module BoolToGinSetCookieTrackingFlow = DataFlow::Global; - -private module NameToGinSetCookieTrackingConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { isAuthVariable(source.asExpr()) } - - predicate isSink(DataFlow::Node sink) { - exists(DataFlow::MethodCallNode mcn | - mcn.getTarget() instanceof GinContextSetCookieMethod and - mcn.getArgument(0) = sink - ) - } -} - -/** - * Tracks taint flow from sensitive names to `gin-gonic/gin.Context.SetCookie`. - */ -private module NameToGinSetCookieTrackingFlow = DataFlow::Global; - -/** - * The receiver of `gorilla/sessions.Session.Save` call. - */ -private class GorillaSessionSaveSink extends DataFlow::Node { - GorillaSessionSaveSink() { - exists(DataFlow::MethodCallNode mcn | - this = mcn.getReceiver() and - mcn.getTarget() - .hasQualifiedName(package("github.com/gorilla/sessions", ""), "Session", "Save") - ) - } -} - -private class GorillaStoreSaveSink extends DataFlow::Node { - GorillaStoreSaveSink() { - exists(DataFlow::MethodCallNode mcn | - this = mcn.getArgument(2) and - mcn.getTarget() - .hasQualifiedName(package("github.com/gorilla/sessions", ""), "CookieStore", "Save") - ) - } -} - -private module GorillaCookieStoreSaveTrackingConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { - source - .(DataFlow::CallNode) - .getTarget() - .hasQualifiedName(package("github.com/gorilla/sessions", ""), "NewCookieStore") - } - - predicate isSink(DataFlow::Node sink) { - sink instanceof GorillaSessionSaveSink or - sink instanceof GorillaStoreSaveSink - } - - predicate isAdditionalFlowStep(DataFlow::Node pred, DataFlow::Node succ) { - exists(DataFlow::MethodCallNode cn | - cn.getTarget() - .hasQualifiedName(package("github.com/gorilla/sessions", ""), "CookieStore", "Get") and - pred = cn.getReceiver() and - succ = cn.getResult(0) - ) - } -} - -/** - * Tracks data flow from gorilla cookie store creation to - * `gorilla/sessions.Session.Save`. - */ -module GorillaCookieStoreSaveTrackingFlow = DataFlow::Global; - -private module GorillaSessionOptionsTrackingConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { - exists(StructLit sl | - sl.getType().hasQualifiedName(package("github.com/gorilla/sessions", ""), "Options") and - source.asExpr() = sl - ) - } - - predicate isSink(DataFlow::Node sink) { sink instanceof GorillaSessionSaveSink } - - predicate isAdditionalFlowStep(DataFlow::Node pred, DataFlow::Node succ) { - exists(GorillaSessionOptionsField f, DataFlow::Write w | w.writesField(succ, f, pred)) - } -} - -/** - * Tracks taint flow from session options to - * `gorilla/sessions.Session.Save`. - */ -module GorillaSessionOptionsTrackingFlow = - TaintTracking::Global; - -private module BoolToGorillaSessionOptionsTrackingConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { - source.getType().getUnderlyingType() instanceof BoolType - } - - predicate isSink(DataFlow::Node sink) { sink instanceof GorillaSessionSaveSink } - - predicate isAdditionalFlowStep(DataFlow::Node pred, DataFlow::Node succ) { - exists(StructLit sl | - getValueForFieldWrite(sl, "HttpOnly") = pred and - sl = succ.asExpr() - ) - or - exists(GorillaSessionOptionsField f, DataFlow::Write w | w.writesField(succ, f, pred)) - } -} - -/** - * Tracks taint flow from a `bool` assigned to `HttpOnly` to - * `gorilla/sessions.Session.Save`. - */ -module BoolToGorillaSessionOptionsTrackingFlow = - TaintTracking::Global; diff --git a/go/ql/src/experimental/CWE-1004/CookieWithoutHttpOnly.qhelp b/go/ql/src/experimental/CWE-1004/CookieWithoutHttpOnly.qhelp deleted file mode 100644 index 2e88a610c9d..00000000000 --- a/go/ql/src/experimental/CWE-1004/CookieWithoutHttpOnly.qhelp +++ /dev/null @@ -1,42 +0,0 @@ - - - - -

    -Cookies without HttpOnly attribute are accessible to JavaScript running in the same origin. In case of -Cross-Site Scripting (XSS) vulnerability the cookie can be stolen by malicious script. -

    -
    - - -

    -Protect sensitive cookies, such as related to authentication, by setting HttpOnly to true to make -them not accessible to JavaScript. -

    -
    - - - -

    -In the following example the default HttpOnly value is false. -

    - - - -

    -In the example below HttpOnly is set to true. -

    - - - -
    - - - -
  • type Cookie,
  • -
  • Set-Cookie Header,
  • - -
    -
    \ No newline at end of file diff --git a/go/ql/src/experimental/CWE-1004/CookieWithoutHttpOnly.ql b/go/ql/src/experimental/CWE-1004/CookieWithoutHttpOnly.ql deleted file mode 100644 index 1b135ae87f9..00000000000 --- a/go/ql/src/experimental/CWE-1004/CookieWithoutHttpOnly.ql +++ /dev/null @@ -1,99 +0,0 @@ -/** - * @name 'HttpOnly' attribute is not set to true - * @description Omitting the 'HttpOnly' attribute for security sensitive data allows - * malicious JavaScript to steal it in case of XSS vulnerability. Always set - * 'HttpOnly' to 'true' to authentication related cookie to make it - * not accessible by JavaScript. - * @kind path-problem - * @problem.severity warning - * @precision high - * @id go/cookie-httponly-not-set - * @tags security - * experimental - * external/cwe/cwe-1004 - */ - -import go -import AuthCookie - -module NetHttpCookieTrackingFlow = - DataFlow::MergePathGraph; - -module GorillaTrackingFlow = - DataFlow::MergePathGraph3; - -module MergedFlow = - DataFlow::MergePathGraph3; - -import MergedFlow::PathGraph - -/** Holds if `HttpOnly` of `net/http.SetCookie` is set to `false` or not set (default value is used). */ -predicate isNetHttpCookieFlow( - NetHttpCookieTrackingFlow::PathNode source, NetHttpCookieTrackingFlow::PathNode sink -) { - exists( - NameToNetHttpCookieTrackingFlow::PathNode sensitiveName, - NameToNetHttpCookieTrackingFlow::PathNode setCookieSink - | - NameToNetHttpCookieTrackingFlow::flowPath(sensitiveName, setCookieSink) and - ( - not BoolToNetHttpCookieTrackingFlow::flowTo(sink.getNode()) and - source.asPathNode1() = sensitiveName and - sink.asPathNode1() = setCookieSink - or - BoolToNetHttpCookieTrackingFlow::flowPath(source.asPathNode2(), sink.asPathNode2()) and - source.getNode().getBoolValue() = false and - setCookieSink.getNode() = sink.getNode() - ) - ) -} - -/** - * Holds if there is gorilla cookie store creation to `Save` path and - * `HttpOnly` is set to `false` or not set (default value is used). - */ -predicate isGorillaSessionsCookieFlow( - GorillaTrackingFlow::PathNode source, GorillaTrackingFlow::PathNode sink -) { - exists( - GorillaCookieStoreSaveTrackingFlow::PathNode cookieStoreCreate, - GorillaCookieStoreSaveTrackingFlow::PathNode sessionSave - | - GorillaCookieStoreSaveTrackingFlow::flowPath(cookieStoreCreate, sessionSave) and - ( - not GorillaSessionOptionsTrackingFlow::flowTo(sink.getNode()) and - source.asPathNode1() = cookieStoreCreate and - sink.asPathNode1() = sessionSave - or - exists(GorillaTrackingFlow::PathNode options, GorillaTrackingFlow::PathNode sessionSave2 | - GorillaSessionOptionsTrackingFlow::flowPath(options.asPathNode2(), - sessionSave2.asPathNode2()) and - ( - not BoolToGorillaSessionOptionsTrackingFlow::flowTo(sink.getNode()) and - sink = sessionSave2 and - source = options and - sessionSave.getNode() = sessionSave2.getNode() - or - BoolToGorillaSessionOptionsTrackingFlow::flowPath(source.asPathNode3(), sink.asPathNode3()) and - source.getNode().getBoolValue() = false and - sink.getNode() = sessionSave.getNode() - ) - ) - ) - ) -} - -from MergedFlow::PathNode source, MergedFlow::PathNode sink -where - isNetHttpCookieFlow(source.asPathNode1(), sink.asPathNode1()) or - BoolToGinSetCookieTrackingFlow::flowPath(source.asPathNode2(), sink.asPathNode2()) or - isGorillaSessionsCookieFlow(source.asPathNode3(), sink.asPathNode3()) -select sink.getNode(), source, sink, "Cookie attribute 'HttpOnly' is not set to true." diff --git a/go/ql/src/experimental/CWE-1004/CookieWithoutHttpOnlyBad.go b/go/ql/src/experimental/CWE-1004/CookieWithoutHttpOnlyBad.go deleted file mode 100644 index 852e2f3f3db..00000000000 --- a/go/ql/src/experimental/CWE-1004/CookieWithoutHttpOnlyBad.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import ( - "net/http" -) - -func handler(w http.ResponseWriter, r *http.Request) { - c := http.Cookie{ - Name: "session", - Value: "secret", - } - http.SetCookie(w, &c) -} - -func main() { - http.HandleFunc("/", handler) -} diff --git a/go/ql/src/experimental/CWE-1004/CookieWithoutHttpOnlyGood.go b/go/ql/src/experimental/CWE-1004/CookieWithoutHttpOnlyGood.go deleted file mode 100644 index b0b505e2007..00000000000 --- a/go/ql/src/experimental/CWE-1004/CookieWithoutHttpOnlyGood.go +++ /dev/null @@ -1,18 +0,0 @@ -package main - -import ( - "net/http" -) - -func handler(w http.ResponseWriter, r *http.Request) { - c := http.Cookie{ - Name: "session", - Value: "secret", - HttpOnly: true, - } - http.SetCookie(w, &c) -} - -func main() { - http.HandleFunc("/", handler) -} diff --git a/go/ql/src/experimental/CWE-285/PamAuthBypass.ql b/go/ql/src/experimental/CWE-285/PamAuthBypass.ql index 755a023ef62..daba2f89544 100644 --- a/go/ql/src/experimental/CWE-285/PamAuthBypass.ql +++ b/go/ql/src/experimental/CWE-285/PamAuthBypass.ql @@ -70,5 +70,6 @@ module PamStartToAuthenticateFlow = TaintTracking::Global; -private TypeLiteral getSourceWithFlowToParseAs() { - TypeLiteralToParseAsFlow::flow(DataFlow::exprNode(result), _) -} +private TypeLiteral getSourceWithFlowToParseAs() { TypeLiteralToParseAsFlow::flowFromExpr(result) } /** A field that is deserialized by `HttpResponse.parseAs`. */ class HttpResponseParseAsDeserializableField extends DeserializableField { diff --git a/java/ql/lib/semmle/code/java/frameworks/jackson/JacksonSerializability.qll b/java/ql/lib/semmle/code/java/frameworks/jackson/JacksonSerializability.qll index aa7da753f43..b9fdbe58f77 100644 --- a/java/ql/lib/semmle/code/java/frameworks/jackson/JacksonSerializability.qll +++ b/java/ql/lib/semmle/code/java/frameworks/jackson/JacksonSerializability.qll @@ -110,7 +110,7 @@ private module TypeLiteralToJacksonDatabindFlow = DataFlow::Global; private TypeLiteral getSourceWithFlowToJacksonDatabind() { - TypeLiteralToJacksonDatabindFlow::flow(DataFlow::exprNode(result), _) + TypeLiteralToJacksonDatabindFlow::flowFromExpr(result) } /** A type whose values are explicitly deserialized in a call to a Jackson method. */ diff --git a/java/ql/lib/semmle/code/java/frameworks/javaee/ejb/EJB.qll b/java/ql/lib/semmle/code/java/frameworks/javaee/ejb/EJB.qll index d59976c0c6c..a866d84df21 100644 --- a/java/ql/lib/semmle/code/java/frameworks/javaee/ejb/EJB.qll +++ b/java/ql/lib/semmle/code/java/frameworks/javaee/ejb/EJB.qll @@ -677,7 +677,7 @@ Type inheritsMatchingMethodExceptThrows(SessionEjb ejb, Method m) { } /** - * Holds if `ejb` inherits an `ejbCreate` or `@Init` method matching `create` method `m`. + * Holds if `ejb` inherits an `ejbCreate` or `@Init` method matching `create` method `icm`. * (Ignores `throws` clauses.) */ predicate inheritsMatchingCreateMethodIgnoreThrows( @@ -704,7 +704,7 @@ predicate inheritsMatchingCreateMethodIgnoreThrows( } /** - * If `ejb` inherits an `ejbCreate` or `@Init` method matching `create` method `m` except for the `throws` clause, + * If `ejb` inherits an `ejbCreate` or `@Init` method matching `create` method `icm` except for the `throws` clause, * then return any type in the `throws` clause that does not match. */ Type inheritsMatchingCreateMethodExceptThrows(StatefulSessionEjb ejb, EjbInterfaceCreateMethod icm) { diff --git a/java/ql/lib/semmle/code/java/frameworks/spring/SpringController.qll b/java/ql/lib/semmle/code/java/frameworks/spring/SpringController.qll index ee00433da12..a444dc96d5a 100644 --- a/java/ql/lib/semmle/code/java/frameworks/spring/SpringController.qll +++ b/java/ql/lib/semmle/code/java/frameworks/spring/SpringController.qll @@ -187,13 +187,10 @@ class SpringServletInputAnnotation extends Annotation { a = this.getType() and a.getPackage().getName() = "org.springframework.web.bind.annotation" | - a.hasName("MatrixVariable") or - a.hasName("RequestParam") or - a.hasName("RequestHeader") or - a.hasName("CookieValue") or - a.hasName("RequestPart") or - a.hasName("PathVariable") or - a.hasName("RequestBody") + a.hasName([ + "MatrixVariable", "RequestParam", "RequestHeader", "CookieValue", "RequestPart", + "PathVariable", "RequestBody" + ]) ) } } diff --git a/java/ql/lib/semmle/code/java/frameworks/struts/StrutsActions.qll b/java/ql/lib/semmle/code/java/frameworks/struts/StrutsActions.qll index 641fb0c6e6f..729268d4008 100644 --- a/java/ql/lib/semmle/code/java/frameworks/struts/StrutsActions.qll +++ b/java/ql/lib/semmle/code/java/frameworks/struts/StrutsActions.qll @@ -40,12 +40,7 @@ class Struts2ActionClass extends Class { getStrutsMapperClass(this) = "org.apache.struts2.dispatcher.mapper.RestfulActionMapper" then // The "Restful" action mapper maps rest APIs to specific methods - result.hasName("index") or - result.hasName("create") or - result.hasName("editNew") or - result.hasName("view") or - result.hasName("remove") or - result.hasName("update") + result.hasName(["index", "create", "editNew", "view", "remove", "update"]) else if getStrutsMapperClass(this) = "org.apache.struts2.rest.RestActionMapper" or @@ -53,13 +48,7 @@ class Struts2ActionClass extends Class { then // The "Rest" action mapper is provided with the rest plugin, and maps rest APIs to specific // methods based on a "ruby-on-rails" style. - result.hasName("index") or - result.hasName("show") or - result.hasName("edit") or - result.hasName("editNew") or - result.hasName("create") or - result.hasName("update") or - result.hasName("destroy") + result.hasName(["index", "show", "edit", "editNew", "create", "update", "destroy"]) else if exists(getStrutsMapperClass(this)) then diff --git a/java/ql/lib/semmle/code/java/internal/OverlayXml.qll b/java/ql/lib/semmle/code/java/internal/OverlayXml.qll new file mode 100644 index 00000000000..95d49f2d611 --- /dev/null +++ b/java/ql/lib/semmle/code/java/internal/OverlayXml.qll @@ -0,0 +1,46 @@ +overlay[local] +module; + +/** + * A local predicate that always holds for the overlay variant and never holds for the base variant. + * This is used to define local predicates that behave differently for the base and overlay variant. + */ +private predicate isOverlay() { databaseMetadata("isOverlay", "true") } + +private string getXmlFile(@xmllocatable locatable) { + exists(@location_default location, @file file | xmllocations(locatable, location) | + locations_default(location, file, _, _, _, _) and + files(file, result) + ) +} + +private string getXmlFileInBase(@xmllocatable locatable) { + not isOverlay() and + result = getXmlFile(locatable) +} + +/** + * Holds if the given `file` was extracted as part of the overlay and was extracted by the HTML/XML + * extractor. + */ +private predicate overlayXmlExtracted(string file) { + isOverlay() and + exists(@xmllocatable locatable | + not files(locatable, _) and not xmlNs(locatable, _, _, _) and file = getXmlFile(locatable) + ) +} + +/** + * Holds if the given XML `locatable` should be discarded, because it is part of the overlay base + * and is in a file that was also extracted as part of the overlay database. + */ +overlay[discard_entity] +private predicate discardXmlLocatable(@xmllocatable locatable) { + exists(string file | file = getXmlFileInBase(locatable) | + overlayChangedFiles(file) + or + // The HTML/XML extractor is currently not incremental and may extract more files than those + // included in overlayChangedFiles. + overlayXmlExtracted(file) + ) +} diff --git a/java/ql/lib/semmle/code/java/regex/RegexFlowConfigs.qll b/java/ql/lib/semmle/code/java/regex/RegexFlowConfigs.qll index 929fa2d6c91..4deb2bc812b 100644 --- a/java/ql/lib/semmle/code/java/regex/RegexFlowConfigs.qll +++ b/java/ql/lib/semmle/code/java/regex/RegexFlowConfigs.qll @@ -164,7 +164,7 @@ private module RegexFlowConfig implements DataFlow::ConfigSig { private module RegexFlow = DataFlow::Global; private predicate usedAsRegexImpl(StringLiteral regex, string mode, boolean match_full_string) { - RegexFlow::flow(DataFlow::exprNode(regex), _) and + RegexFlow::flowFromExpr(regex) and mode = "None" and // TODO: proper mode detection (if matchesFullString(regex) then match_full_string = true else match_full_string = false) } diff --git a/java/ql/lib/semmle/code/java/security/ImproperIntentVerificationQuery.qll b/java/ql/lib/semmle/code/java/security/ImproperIntentVerificationQuery.qll index ff5ebe86217..61f88f39578 100644 --- a/java/ql/lib/semmle/code/java/security/ImproperIntentVerificationQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ImproperIntentVerificationQuery.qll @@ -51,7 +51,7 @@ private module VerifiedIntentFlow = DataFlow::Global; /** An `onReceive` method that doesn't verify the action of the intent it receives. */ private class UnverifiedOnReceiveMethod extends OnReceiveMethod { UnverifiedOnReceiveMethod() { - not VerifiedIntentFlow::flow(DataFlow::parameterNode(this.getIntentParameter()), _) and + not VerifiedIntentFlow::flowFrom(DataFlow::parameterNode(this.getIntentParameter())) and // Empty methods do not need to be verified since they do not perform any actions. this.getBody().getNumStmt() > 0 } diff --git a/java/ql/lib/semmle/code/java/security/RequestForgery.qll b/java/ql/lib/semmle/code/java/security/RequestForgery.qll index dc15ad943bc..9e3dec00357 100644 --- a/java/ql/lib/semmle/code/java/security/RequestForgery.qll +++ b/java/ql/lib/semmle/code/java/security/RequestForgery.qll @@ -166,22 +166,7 @@ private class HostComparisonSanitizer extends RequestForgerySanitizer { } /** - * A qualifier in a call to a `.matches()` method that is a sanitizer for URL redirects. - * - * Matches any method call where the method is named `matches`. + * A comparison with a regular expression that is a sanitizer for URL redirects. */ -private predicate isMatchesSanitizer(Guard guard, Expr e, boolean branch) { - guard = - any(MethodCall method | - method.getMethod().getName() = "matches" and - e = method.getQualifier() and - branch = true - ) -} - -/** - * A qualifier in a call to `.matches()` that is a sanitizer for URL redirects. - */ -private class MatchesSanitizer extends RequestForgerySanitizer { - MatchesSanitizer() { this = DataFlow::BarrierGuard::getABarrierNode() } -} +private class RegexpCheckRequestForgerySanitizer extends RequestForgerySanitizer instanceof RegexpCheckBarrier +{ } diff --git a/java/ql/lib/semmle/code/java/security/Sanitizers.qll b/java/ql/lib/semmle/code/java/security/Sanitizers.qll index 21e7ccf264f..3f909864d2c 100644 --- a/java/ql/lib/semmle/code/java/security/Sanitizers.qll +++ b/java/ql/lib/semmle/code/java/security/Sanitizers.qll @@ -3,7 +3,9 @@ overlay[local?] module; import java +private import semmle.code.java.controlflow.Guards private import semmle.code.java.dataflow.DataFlow +private import semmle.code.java.frameworks.Regex /** * A node whose type is a simple type unlikely to carry taint, such as primitives and their boxed counterparts, @@ -29,3 +31,44 @@ class SimpleTypeSanitizer extends DataFlow::Node { this.getType() instanceof EnumType } } + +/** + * Holds if `guard` holds with branch `branch` if `e` matches a regular expression. + * + * This is overapproximate: we do not attempt to reason about the correctness of the regexp. + * + * Use this if you want to define a derived `DataFlow::BarrierGuard` without + * make the type recursive. Otherwise use `RegexpCheckBarrier`. + */ +predicate regexpMatchGuardChecks(Guard guard, Expr e, boolean branch) { + exists(Method method, MethodCall mc | + method = mc.getMethod() and + guard = mc and + branch = true + | + // `String.matches` and other `matches` methods. + method.getName() = "matches" and + e = mc.getQualifier() + or + method instanceof PatternMatchesMethod and + e = mc.getArgument(1) + or + method instanceof MatcherMatchesMethod and + exists(MethodCall matcherCall | + matcherCall.getMethod() instanceof PatternMatcherMethod and + e = matcherCall.getArgument(0) and + DataFlow::localExprFlow(matcherCall, mc.getQualifier()) + ) + ) +} + +/** + * A check against a regular expression, considered as a barrier guard. + * + * This is overapproximate: we do not attempt to reason about the correctness of the regexp. + */ +class RegexpCheckBarrier extends DataFlow::Node { + RegexpCheckBarrier() { + this = DataFlow::BarrierGuard::getABarrierNode() + } +} diff --git a/java/ql/lib/semmle/code/java/security/SensitiveLoggingQuery.qll b/java/ql/lib/semmle/code/java/security/SensitiveLoggingQuery.qll index 25454d80c71..7058b844cbd 100644 --- a/java/ql/lib/semmle/code/java/security/SensitiveLoggingQuery.qll +++ b/java/ql/lib/semmle/code/java/security/SensitiveLoggingQuery.qll @@ -6,10 +6,14 @@ import semmle.code.java.dataflow.TaintTracking import semmle.code.java.security.SensitiveActions import semmle.code.java.frameworks.android.Compose private import semmle.code.java.security.Sanitizers +private import semmle.code.java.dataflow.RangeAnalysis /** A data flow source node for sensitive logging sources. */ abstract class SensitiveLoggerSource extends DataFlow::Node { } +/** A data flow barrier node for sensitive logging sanitizers. */ +abstract class SensitiveLoggerBarrier extends DataFlow::Node { } + /** A variable that may hold sensitive information, judging by its name. */ class VariableWithSensitiveName extends Variable { VariableWithSensitiveName() { @@ -40,17 +44,89 @@ private class TypeType extends RefType { } } +/** + * A sanitizer that may remove sensitive information from a string before logging. + * + * It allows for substring operations taking the first N (or last N, for Kotlin) characters, limited to 7 or fewer. + */ +private class PrefixSuffixBarrier extends SensitiveLoggerBarrier { + PrefixSuffixBarrier() { + exists(MethodCall mc, Method m, int limit | + limit = 7 and + mc.getMethod() = m + | + // substring in Java + ( + m.hasQualifiedName("java.lang", "String", "substring") or + m.hasQualifiedName("java.lang", "StringBuffer", "substring") or + m.hasQualifiedName("java.lang", "StringBuilder", "substring") + ) and + ( + twoArgLimit(mc, limit, false) or + singleArgLimit(mc, limit, false) + ) and + this.asExpr() = mc.getQualifier() + or + // Kotlin string operations, which use extension methods (so the string is the first argument) + ( + m.hasQualifiedName("kotlin.text", "StringsKt", "substring") and + ( + twoArgLimit(mc, limit, true) or + singleArgLimit(mc, limit, true) + ) + or + m.hasQualifiedName("kotlin.text", "StringsKt", ["take", "takeLast"]) and + singleArgLimit(mc, limit, true) + ) and + this.asExpr() = mc.getArgument(0) + ) + } +} + +/** A predicate to check single-argument method calls for a constant integer below a set limit. */ +bindingset[limit, isKotlin] +private predicate singleArgLimit(MethodCall mc, int limit, boolean isKotlin) { + mc.getNumArgument() = 1 and + exists(int firstArgIndex, int delta | + if isKotlin = true then firstArgIndex = 1 else firstArgIndex = 0 + | + bounded(mc.getArgument(firstArgIndex), any(ZeroBound z), delta, true, _) and + delta <= limit + ) +} + +/** A predicate to check two-argument method calls for zero and a constant integer below a set limit. */ +bindingset[limit, isKotlin] +private predicate twoArgLimit(MethodCall mc, int limit, boolean isKotlin) { + mc.getNumArgument() = 2 and + exists(int firstArgIndex, int secondArgIndex, int delta | + isKotlin = true and firstArgIndex = 1 and secondArgIndex = 2 + or + isKotlin = false and firstArgIndex = 0 and secondArgIndex = 1 + | + // mc.getArgument(firstArgIndex).(CompileTimeConstantExpr).getIntValue() = 0 and + bounded(mc.getArgument(firstArgIndex), any(ZeroBound z), 0, true, _) and + bounded(mc.getArgument(firstArgIndex), any(ZeroBound z), 0, false, _) and + bounded(mc.getArgument(secondArgIndex), any(ZeroBound z), delta, true, _) and + delta <= limit + ) +} + +private class DefaultSensitiveLoggerBarrier extends SensitiveLoggerBarrier { + DefaultSensitiveLoggerBarrier() { + this.asExpr() instanceof LiveLiteral or + this instanceof SimpleTypeSanitizer or + this.getType() instanceof TypeType + } +} + /** A data-flow configuration for identifying potentially-sensitive data flowing to a log output. */ module SensitiveLoggerConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof SensitiveLoggerSource } predicate isSink(DataFlow::Node sink) { sinkNode(sink, "log-injection") } - predicate isBarrier(DataFlow::Node sanitizer) { - sanitizer.asExpr() instanceof LiveLiteral or - sanitizer instanceof SimpleTypeSanitizer or - sanitizer.getType() instanceof TypeType - } + predicate isBarrier(DataFlow::Node sanitizer) { sanitizer instanceof SensitiveLoggerBarrier } predicate isBarrierIn(DataFlow::Node node) { isSource(node) } diff --git a/java/ql/lib/semmle/code/xml/XML.qll b/java/ql/lib/semmle/code/xml/XML.qll index d13a83e7798..e4073362fc6 100644 --- a/java/ql/lib/semmle/code/xml/XML.qll +++ b/java/ql/lib/semmle/code/xml/XML.qll @@ -6,7 +6,6 @@ module; import semmle.files.FileSystem private import codeql.xml.Xml -private import semmle.code.java.Overlay private module Input implements InputSig { class XmlLocatableBase = @xmllocatable or @xmlnamespaceable; @@ -70,13 +69,3 @@ private module Input implements InputSig { } import Make - -private class DiscardableXmlAttribute extends DiscardableXmlLocatable, @xmlattribute { } - -private class DiscardableXmlElement extends DiscardableXmlLocatable, @xmlelement { } - -private class DiscardableXmlComment extends DiscardableXmlLocatable, @xmlcomment { } - -private class DiscardableXmlCharacters extends DiscardableXmlLocatable, @xmlcharacters { } - -private class DiscardableXmlDtd extends DiscardableXmlLocatable, @xmldtd { } diff --git a/java/ql/src/CHANGELOG.md b/java/ql/src/CHANGELOG.md index 9e82554241e..f78a970245f 100644 --- a/java/ql/src/CHANGELOG.md +++ b/java/ql/src/CHANGELOG.md @@ -1,3 +1,13 @@ +## 1.10.2 + +No user-facing changes. + +## 1.10.1 + +### Minor Analysis Improvements + +* Operations that extract only a fixed-length prefix or suffix of a string (for example, `substring` in Java or `take` in Kotlin), when limited to a length of at most 7 characters, are now treated as sanitizers for the `java/sensitive-log` query. + ## 1.10.0 ### Query Metadata Changes diff --git a/java/ql/src/Security/CWE/CWE-020/UntrustedDataToExternalAPI.ql b/java/ql/src/Security/CWE/CWE-020/UntrustedDataToExternalAPI.ql index a75672445fb..ec1024fde02 100644 --- a/java/ql/src/Security/CWE/CWE-020/UntrustedDataToExternalAPI.ql +++ b/java/ql/src/Security/CWE/CWE-020/UntrustedDataToExternalAPI.ql @@ -6,7 +6,8 @@ * @precision low * @problem.severity error * @security-severity 7.8 - * @tags security external/cwe/cwe-020 + * @tags security + * external/cwe/cwe-020 */ import java diff --git a/java/ql/src/Security/CWE/CWE-200/AndroidWebViewSettingsAllowsContentAccess.ql b/java/ql/src/Security/CWE/CWE-200/AndroidWebViewSettingsAllowsContentAccess.ql index 45767185dfd..cc076039940 100644 --- a/java/ql/src/Security/CWE/CWE-200/AndroidWebViewSettingsAllowsContentAccess.ql +++ b/java/ql/src/Security/CWE/CWE-200/AndroidWebViewSettingsAllowsContentAccess.ql @@ -118,7 +118,7 @@ where // implicit: no setAllowContentAccess(false) exists(WebViewSource source | source.asExpr() = e and - not WebViewDisallowContentAccessFlow::flow(source, _) + not WebViewDisallowContentAccessFlow::flowFrom(source) ) select e, "Sensitive information may be exposed via a malicious link due to access to content:// links being allowed in this WebView." diff --git a/java/ql/src/change-notes/2025-12-08-maven-no-source-target-flags.md b/java/ql/src/change-notes/2025-12-08-maven-no-source-target-flags.md new file mode 100644 index 00000000000..3ebe525f822 --- /dev/null +++ b/java/ql/src/change-notes/2025-12-08-maven-no-source-target-flags.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Java analysis no longer forces `--source` and `--target` compiler flags for Maven builds. This allows Maven to use the project's own compiler configuration, improving build compatibility. diff --git a/java/ql/src/change-notes/released/1.10.1.md b/java/ql/src/change-notes/released/1.10.1.md new file mode 100644 index 00000000000..1eb6ace7d45 --- /dev/null +++ b/java/ql/src/change-notes/released/1.10.1.md @@ -0,0 +1,5 @@ +## 1.10.1 + +### Minor Analysis Improvements + +* Operations that extract only a fixed-length prefix or suffix of a string (for example, `substring` in Java or `take` in Kotlin), when limited to a length of at most 7 characters, are now treated as sanitizers for the `java/sensitive-log` query. diff --git a/java/ql/src/change-notes/released/1.10.2.md b/java/ql/src/change-notes/released/1.10.2.md new file mode 100644 index 00000000000..fdf84c874fb --- /dev/null +++ b/java/ql/src/change-notes/released/1.10.2.md @@ -0,0 +1,3 @@ +## 1.10.2 + +No user-facing changes. diff --git a/java/ql/src/codeql-pack.release.yml b/java/ql/src/codeql-pack.release.yml index 753e9ac2844..7303d5a6761 100644 --- a/java/ql/src/codeql-pack.release.yml +++ b/java/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.10.0 +lastReleaseVersion: 1.10.2 diff --git a/java/ql/src/experimental/Security/CWE/CWE-295/JxBrowserWithoutCertValidation.ql b/java/ql/src/experimental/Security/CWE/CWE-295/JxBrowserWithoutCertValidation.ql index 48c49d5c071..c53c2cacdae 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-295/JxBrowserWithoutCertValidation.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-295/JxBrowserWithoutCertValidation.ql @@ -85,7 +85,7 @@ private module JxBrowserFlow = DataFlow::Global; deprecated query predicate problems(DataFlow::Node src, string message) { JxBrowserFlowConfig::isSource(src) and - not JxBrowserFlow::flow(src, _) and + not JxBrowserFlow::flowFrom(src) and not isSafeJxBrowserVersion() and message = "This JxBrowser instance may not check HTTPS certificates." } diff --git a/java/ql/src/experimental/Security/CWE/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql b/java/ql/src/experimental/Security/CWE/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql index a5d17250491..180b816fc9f 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql @@ -1,5 +1,5 @@ /** - * @name Unsafe usage of v1 version of Azure Storage client-side encryption (CVE-2022-30187). + * @name Unsafe usage of v1 version of Azure Storage client-side encryption (CVE-2022-30187) * @description Unsafe usage of v1 version of Azure Storage client-side encryption, please refer to http://aka.ms/azstorageclientencryptionblog * @kind problem * @tags security diff --git a/java/ql/src/experimental/Security/CWE/CWE-346/UnvalidatedCors.ql b/java/ql/src/experimental/Security/CWE/CWE-346/UnvalidatedCors.ql index ef95db6f6c5..fc0cc59244c 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-346/UnvalidatedCors.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-346/UnvalidatedCors.ql @@ -50,7 +50,7 @@ private Expr getAccessControlAllowOriginHeaderName() { * A taint-tracking configuration for flow from a source node to CorsProbableCheckAccess methods. */ module CorsSourceReachesCheckConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { CorsOriginFlow::flow(source, _) } + predicate isSource(DataFlow::Node source) { CorsOriginFlow::flowFrom(source) } predicate isSink(DataFlow::Node sink) { sink.asExpr() = any(CorsProbableCheckAccess check).getAnArgument() @@ -86,7 +86,7 @@ deprecated query predicate problems( string message1, DataFlow::Node sourceNode, string message2 ) { CorsOriginFlow::flowPath(source, sink) and - not CorsSourceReachesCheckFlow::flow(sourceNode, _) and + not CorsSourceReachesCheckFlow::flowFrom(sourceNode) and sinkNode = sink.getNode() and message1 = "CORS header is being set using user controlled value $@." and sourceNode = source.getNode() and diff --git a/java/ql/src/experimental/Security/CWE/CWE-347/Auth0NoVerifier.ql b/java/ql/src/experimental/Security/CWE/CWE-347/Auth0NoVerifier.ql index 778939887f0..16b0f024329 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-347/Auth0NoVerifier.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-347/Auth0NoVerifier.ql @@ -17,7 +17,7 @@ deprecated import JwtAuth0 as JwtAuth0 deprecated module JwtDecodeConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource and - not FlowToJwtVerify::flow(source, _) + not FlowToJwtVerify::flowFrom(source) } predicate isSink(DataFlow::Node sink) { sink.asExpr() = any(JwtAuth0::GetPayload a) } diff --git a/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeDeserializationRmi.ql b/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeDeserializationRmi.ql index 5573c9e0e1d..5803915dd03 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeDeserializationRmi.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeDeserializationRmi.ql @@ -1,5 +1,5 @@ /** - * @name Unsafe deserialization in a remotely callable method. + * @name Unsafe deserialization in a remotely callable method * @description If a registered remote object has a method that accepts a complex object, * an attacker can take advantage of the unsafe deserialization mechanism * which is used to pass parameters in RMI. diff --git a/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterInConfigurationClass.ql b/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterInConfigurationClass.ql index 949ffee66e6..2db3bfa750b 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterInConfigurationClass.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterInConfigurationClass.ql @@ -1,5 +1,5 @@ /** - * @name Unsafe deserialization with Spring's remote service exporters. + * @name Unsafe deserialization with Spring's remote service exporters * @description A Spring bean, which is based on RemoteInvocationSerializingExporter, * initializes an endpoint that uses ObjectInputStream to deserialize * incoming data. In the worst case, that may lead to remote code execution. diff --git a/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterInXMLConfiguration.ql b/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterInXMLConfiguration.ql index 1b570465f23..d74fa98afc1 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterInXMLConfiguration.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterInXMLConfiguration.ql @@ -1,5 +1,5 @@ /** - * @name Unsafe deserialization with Spring's remote service exporters. + * @name Unsafe deserialization with Spring's remote service exporters * @description A Spring bean, which is based on RemoteInvocationSerializingExporter, * initializes an endpoint that uses ObjectInputStream to deserialize * incoming data. In the worst case, that may lead to remote code execution. diff --git a/java/ql/src/qlpack.yml b/java/ql/src/qlpack.yml index f1a422dcfa9..0bdaeaf48d7 100644 --- a/java/ql/src/qlpack.yml +++ b/java/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/java-queries -version: 1.10.1-dev +version: 1.10.3-dev groups: - java - queries diff --git a/java/ql/src/utils/modelconverter/ExtractNeutrals.ql b/java/ql/src/utils/modelconverter/ExtractNeutrals.ql index 47fb80af437..108aa454232 100644 --- a/java/ql/src/utils/modelconverter/ExtractNeutrals.ql +++ b/java/ql/src/utils/modelconverter/ExtractNeutrals.ql @@ -1,5 +1,5 @@ /** - * @name Extract MaD neutral model rows. + * @name Extract MaD neutral model rows * @description This extracts the Models as data neutral model rows. * @id java/utils/modelconverter/generate-data-extensions-neutral */ diff --git a/java/ql/src/utils/modelconverter/ExtractSinks.ql b/java/ql/src/utils/modelconverter/ExtractSinks.ql index 4439f3ef008..ae79cf3a49d 100644 --- a/java/ql/src/utils/modelconverter/ExtractSinks.ql +++ b/java/ql/src/utils/modelconverter/ExtractSinks.ql @@ -1,5 +1,5 @@ /** - * @name Extract MaD sink model rows. + * @name Extract MaD sink model rows * @description This extracts the Models as data sink model rows. * @id java/utils/modelconverter/generate-data-extensions-sink */ diff --git a/java/ql/src/utils/modelconverter/ExtractSources.ql b/java/ql/src/utils/modelconverter/ExtractSources.ql index cc0faca73d6..8aeb4542a00 100644 --- a/java/ql/src/utils/modelconverter/ExtractSources.ql +++ b/java/ql/src/utils/modelconverter/ExtractSources.ql @@ -1,5 +1,5 @@ /** - * @name Extract MaD source model rows. + * @name Extract MaD source model rows * @description This extracts the Models as data source model rows. * @id java/utils/modelconverter/generate-data-extensions-source */ diff --git a/java/ql/src/utils/modelconverter/ExtractSummaries.ql b/java/ql/src/utils/modelconverter/ExtractSummaries.ql index 6fbed049fd6..4976c4a1329 100644 --- a/java/ql/src/utils/modelconverter/ExtractSummaries.ql +++ b/java/ql/src/utils/modelconverter/ExtractSummaries.ql @@ -1,5 +1,5 @@ /** - * @name Extract MaD summary model rows. + * @name Extract MaD summary model rows * @description This extracts the Models as data summary model rows. * @id java/utils/modelconverter/generate-data-extensions-summary */ diff --git a/java/ql/src/utils/modelgenerator/CaptureContentSummaryModels.ql b/java/ql/src/utils/modelgenerator/CaptureContentSummaryModels.ql index 39e8cd9a0a4..e53daa73531 100644 --- a/java/ql/src/utils/modelgenerator/CaptureContentSummaryModels.ql +++ b/java/ql/src/utils/modelgenerator/CaptureContentSummaryModels.ql @@ -1,5 +1,5 @@ /** - * @name Capture content based summary models. + * @name Capture content based summary models * @description Finds applicable content based summary models to be used by other queries. * @kind diagnostic * @id java/utils/modelgenerator/contentbased-summary-models diff --git a/java/ql/src/utils/modelgenerator/CaptureNeutralModels.ql b/java/ql/src/utils/modelgenerator/CaptureNeutralModels.ql index 6008c3bfb8c..c5ba30945f7 100644 --- a/java/ql/src/utils/modelgenerator/CaptureNeutralModels.ql +++ b/java/ql/src/utils/modelgenerator/CaptureNeutralModels.ql @@ -1,5 +1,5 @@ /** - * @name Capture neutral models. + * @name Capture neutral models * @description Finds neutral models to be used by other queries. * @kind diagnostic * @id java/utils/modelgenerator/neutral-models diff --git a/java/ql/src/utils/modelgenerator/CaptureSinkModels.ql b/java/ql/src/utils/modelgenerator/CaptureSinkModels.ql index 7fcba8850d6..327bcd0da9e 100644 --- a/java/ql/src/utils/modelgenerator/CaptureSinkModels.ql +++ b/java/ql/src/utils/modelgenerator/CaptureSinkModels.ql @@ -1,5 +1,5 @@ /** - * @name Capture sink models. + * @name Capture sink models * @description Finds public methods that act as sinks as they flow into a known sink. * @kind diagnostic * @id java/utils/modelgenerator/sink-models diff --git a/java/ql/src/utils/modelgenerator/CaptureSourceModels.ql b/java/ql/src/utils/modelgenerator/CaptureSourceModels.ql index c623645820b..2132932981c 100644 --- a/java/ql/src/utils/modelgenerator/CaptureSourceModels.ql +++ b/java/ql/src/utils/modelgenerator/CaptureSourceModels.ql @@ -1,5 +1,5 @@ /** - * @name Capture source models. + * @name Capture source models * @description Finds APIs that act as sources as they expose already known sources. * @kind diagnostic * @id java/utils/modelgenerator/source-models diff --git a/java/ql/src/utils/modelgenerator/CaptureSummaryModels.ql b/java/ql/src/utils/modelgenerator/CaptureSummaryModels.ql index 3bc49c31df2..b33a7a3a4b2 100644 --- a/java/ql/src/utils/modelgenerator/CaptureSummaryModels.ql +++ b/java/ql/src/utils/modelgenerator/CaptureSummaryModels.ql @@ -1,5 +1,5 @@ /** - * @name Capture summary models. + * @name Capture summary models * @description Finds applicable summary models to be used by other queries. * @kind diagnostic * @id java/utils/modelgenerator/summary-models diff --git a/java/ql/src/utils/modelgenerator/CaptureTypeBasedSummaryModels.ql b/java/ql/src/utils/modelgenerator/CaptureTypeBasedSummaryModels.ql index f0a33731a87..d356cc16a06 100644 --- a/java/ql/src/utils/modelgenerator/CaptureTypeBasedSummaryModels.ql +++ b/java/ql/src/utils/modelgenerator/CaptureTypeBasedSummaryModels.ql @@ -1,5 +1,5 @@ /** - * @name Capture typed based summary models. + * @name Capture typed based summary models * @description Finds applicable summary models to be used by other queries. * @kind diagnostic * @id java/utils/modelgenerator/summary-models-typed-based diff --git a/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll b/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll index b86a4c54246..6978ca7e308 100644 --- a/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll +++ b/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll @@ -218,6 +218,8 @@ module SummaryModelGeneratorInput implements SummaryModelGeneratorInputSig { ) } + int contentAccessPathLimitInternal() { result = 2 } + predicate isField(DataFlow::ContentSet c) { c instanceof DataFlowUtil::FieldContent or c instanceof DataFlowUtil::SyntheticFieldContent diff --git a/java/ql/test-kotlin1/library-tests/parameter-defaults/flowTest.ql b/java/ql/test-kotlin1/library-tests/parameter-defaults/flowTest.ql index da0fc33464b..0bf36d842e1 100644 --- a/java/ql/test-kotlin1/library-tests/parameter-defaults/flowTest.ql +++ b/java/ql/test-kotlin1/library-tests/parameter-defaults/flowTest.ql @@ -25,9 +25,7 @@ module Config implements DataFlow::ConfigSig { module Flow = DataFlow::Global; -predicate isSunk(StringLiteral sl) { - exists(DataFlow::Node source | Flow::flow(source, _) and sl = source.asExpr()) -} +predicate isSunk(StringLiteral sl) { Flow::flowFromExpr(sl) } query predicate shouldBeSunkButIsnt(ShouldBeSunk src) { not isSunk(src) } diff --git a/java/ql/test-kotlin2/library-tests/parameter-defaults/flowTest.ql b/java/ql/test-kotlin2/library-tests/parameter-defaults/flowTest.ql index da0fc33464b..0bf36d842e1 100644 --- a/java/ql/test-kotlin2/library-tests/parameter-defaults/flowTest.ql +++ b/java/ql/test-kotlin2/library-tests/parameter-defaults/flowTest.ql @@ -25,9 +25,7 @@ module Config implements DataFlow::ConfigSig { module Flow = DataFlow::Global; -predicate isSunk(StringLiteral sl) { - exists(DataFlow::Node source | Flow::flow(source, _) and sl = source.asExpr()) -} +predicate isSunk(StringLiteral sl) { Flow::flowFromExpr(sl) } query predicate shouldBeSunkButIsnt(ShouldBeSunk src) { not isSunk(src) } diff --git a/java/ql/test/library-tests/frameworks/android/taint-database/flowSteps.ql b/java/ql/test/library-tests/frameworks/android/taint-database/flowSteps.ql index 5ca38c7e29b..ae4f8ca0da0 100644 --- a/java/ql/test/library-tests/frameworks/android/taint-database/flowSteps.ql +++ b/java/ql/test/library-tests/frameworks/android/taint-database/flowSteps.ql @@ -20,7 +20,7 @@ module FlowStepTest implements TestSig { predicate hasActualResult(Location l, string element, string tag, string value) { tag = "taintReachesReturn" and value = "" and - exists(DataFlow::Node source | Flow::flow(source, _) | + exists(DataFlow::Node source | Flow::flowFrom(source) | l = source.getLocation() and element = source.toString() ) diff --git a/java/ql/test/library-tests/frameworks/android/taint-database/sinks.ql b/java/ql/test/library-tests/frameworks/android/taint-database/sinks.ql index ccdb9698009..58b749364d2 100644 --- a/java/ql/test/library-tests/frameworks/android/taint-database/sinks.ql +++ b/java/ql/test/library-tests/frameworks/android/taint-database/sinks.ql @@ -20,7 +20,7 @@ module SinkTest implements TestSig { predicate hasActualResult(Location l, string element, string tag, string value) { tag = "taintReachesSink" and value = "" and - exists(DataFlow::Node source | Flow::flow(source, _) | + exists(DataFlow::Node source | Flow::flowFrom(source) | l = source.getLocation() and element = source.toString() ) diff --git a/java/ql/test/query-tests/security/CWE-532/SensitiveLogInfo.expected b/java/ql/test/query-tests/security/CWE-532/SensitiveLogInfo.expected index e32ff5654e2..54f1e9f8a5a 100644 --- a/java/ql/test/query-tests/security/CWE-532/SensitiveLogInfo.expected +++ b/java/ql/test/query-tests/security/CWE-532/SensitiveLogInfo.expected @@ -1,15 +1,28 @@ #select -| Test.java:7:21:7:53 | ... + ... | Test.java:7:46:7:53 | password : String | Test.java:7:21:7:53 | ... + ... | This $@ is written to a log file. | Test.java:7:46:7:53 | password | potentially sensitive information | -| Test.java:8:22:8:52 | ... + ... | Test.java:8:44:8:52 | authToken : String | Test.java:8:22:8:52 | ... + ... | This $@ is written to a log file. | Test.java:8:44:8:52 | authToken | potentially sensitive information | +| Test.java:11:21:11:53 | ... + ... | Test.java:11:46:11:53 | password : String | Test.java:11:21:11:53 | ... + ... | This $@ is written to a log file. | Test.java:11:46:11:53 | password | potentially sensitive information | +| Test.java:12:22:12:52 | ... + ... | Test.java:12:44:12:52 | authToken : String | Test.java:12:22:12:52 | ... + ... | This $@ is written to a log file. | Test.java:12:44:12:52 | authToken | potentially sensitive information | +| Test.java:21:22:21:75 | ... + ... | Test.java:21:44:21:52 | authToken : String | Test.java:21:22:21:75 | ... + ... | This $@ is written to a log file. | Test.java:21:44:21:52 | authToken | potentially sensitive information | +| Test.java:22:22:22:75 | ... + ... | Test.java:22:44:22:52 | authToken : String | Test.java:22:22:22:75 | ... + ... | This $@ is written to a log file. | Test.java:22:44:22:52 | authToken | potentially sensitive information | edges -| Test.java:7:46:7:53 | password : String | Test.java:7:21:7:53 | ... + ... | provenance | Sink:MaD:2 | -| Test.java:8:44:8:52 | authToken : String | Test.java:8:22:8:52 | ... + ... | provenance | Sink:MaD:1 | +| Test.java:11:46:11:53 | password : String | Test.java:11:21:11:53 | ... + ... | provenance | Sink:MaD:2 | +| Test.java:12:44:12:52 | authToken : String | Test.java:12:22:12:52 | ... + ... | provenance | Sink:MaD:1 | +| Test.java:21:44:21:52 | authToken : String | Test.java:21:44:21:67 | substring(...) : String | provenance | MaD:3 | +| Test.java:21:44:21:67 | substring(...) : String | Test.java:21:22:21:75 | ... + ... | provenance | Sink:MaD:1 | +| Test.java:22:44:22:52 | authToken : String | Test.java:22:44:22:67 | substring(...) : String | provenance | MaD:3 | +| Test.java:22:44:22:67 | substring(...) : String | Test.java:22:22:22:75 | ... + ... | provenance | Sink:MaD:1 | models | 1 | Sink: org.apache.logging.log4j; Logger; true; error; (String); ; Argument[0]; log-injection; manual | | 2 | Sink: org.apache.logging.log4j; Logger; true; info; (String); ; Argument[0]; log-injection; manual | +| 3 | Summary: java.lang; String; false; substring; ; ; Argument[this]; ReturnValue; taint; manual | nodes -| Test.java:7:21:7:53 | ... + ... | semmle.label | ... + ... | -| Test.java:7:46:7:53 | password : String | semmle.label | password : String | -| Test.java:8:22:8:52 | ... + ... | semmle.label | ... + ... | -| Test.java:8:44:8:52 | authToken : String | semmle.label | authToken : String | +| Test.java:11:21:11:53 | ... + ... | semmle.label | ... + ... | +| Test.java:11:46:11:53 | password : String | semmle.label | password : String | +| Test.java:12:22:12:52 | ... + ... | semmle.label | ... + ... | +| Test.java:12:44:12:52 | authToken : String | semmle.label | authToken : String | +| Test.java:21:22:21:75 | ... + ... | semmle.label | ... + ... | +| Test.java:21:44:21:52 | authToken : String | semmle.label | authToken : String | +| Test.java:21:44:21:67 | substring(...) : String | semmle.label | substring(...) : String | +| Test.java:22:22:22:75 | ... + ... | semmle.label | ... + ... | +| Test.java:22:44:22:52 | authToken : String | semmle.label | authToken : String | +| Test.java:22:44:22:67 | substring(...) : String | semmle.label | substring(...) : String | subpaths diff --git a/java/ql/test/query-tests/security/CWE-532/Test.java b/java/ql/test/query-tests/security/CWE-532/Test.java index cf983afc287..6521f7e2df7 100644 --- a/java/ql/test/query-tests/security/CWE-532/Test.java +++ b/java/ql/test/query-tests/security/CWE-532/Test.java @@ -3,11 +3,22 @@ import org.apache.logging.log4j.Logger; class Test { void test(String password, String authToken, String username, String nullToken, String stringTokenizer) { Logger logger = null; + int zero = 0; + int four = 4; + short zeroS = 0; + long fourL = 4L; logger.info("User's password is: " + password); // $ Alert logger.error("Auth failed for: " + authToken); // $ Alert logger.error("Auth failed for: " + username); // Safe logger.error("Auth failed for: " + nullToken); // Safe logger.error("Auth failed for: " + stringTokenizer); // Safe + logger.error("Auth failed for: " + authToken.substring(4) + "..."); // Safe + logger.error("Auth failed for: " + authToken.substring(four) + "..."); // Safe + logger.error("Auth failed for: " + authToken.substring(0,4) + "..."); // Safe + logger.error("Auth failed for: " + authToken.substring(zero,four) + "..."); // Safe + logger.error("Auth failed for: " + authToken.substring((int)zeroS,(int)fourL) + "..."); // Safe + logger.error("Auth failed for: " + authToken.substring(1,5) + "..."); // $ Alert + logger.error("Auth failed for: " + authToken.substring(0,8) + "..."); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected index b08273da0ca..66dc968cb23 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected @@ -228,30 +228,30 @@ | JdbcUrlSSRF.java:88:19:88:25 | jdbcUrl | JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) : String | JdbcUrlSSRF.java:88:19:88:25 | jdbcUrl | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) | user-provided value | | ReactiveWebClientSSRF.java:16:52:16:54 | url | ReactiveWebClientSSRF.java:15:26:15:52 | getParameter(...) : String | ReactiveWebClientSSRF.java:16:52:16:54 | url | Potential server-side request forgery due to a $@. | ReactiveWebClientSSRF.java:15:26:15:52 | getParameter(...) | user-provided value | | ReactiveWebClientSSRF.java:35:30:35:32 | url | ReactiveWebClientSSRF.java:32:26:32:52 | getParameter(...) : String | ReactiveWebClientSSRF.java:35:30:35:32 | url | Potential server-side request forgery due to a $@. | ReactiveWebClientSSRF.java:32:26:32:52 | getParameter(...) | user-provided value | -| SanitizationTests.java:22:52:22:54 | uri | SanitizationTests.java:19:31:19:57 | getParameter(...) : String | SanitizationTests.java:22:52:22:54 | uri | Potential server-side request forgery due to a $@. | SanitizationTests.java:19:31:19:57 | getParameter(...) | user-provided value | -| SanitizationTests.java:23:25:23:25 | r | SanitizationTests.java:19:31:19:57 | getParameter(...) : String | SanitizationTests.java:23:25:23:25 | r | Potential server-side request forgery due to a $@. | SanitizationTests.java:19:31:19:57 | getParameter(...) | user-provided value | -| SanitizationTests.java:76:59:76:77 | new URI(...) | SanitizationTests.java:75:33:75:63 | getParameter(...) : String | SanitizationTests.java:76:59:76:77 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:75:33:75:63 | getParameter(...) | user-provided value | -| SanitizationTests.java:77:25:77:32 | unsafer3 | SanitizationTests.java:75:33:75:63 | getParameter(...) : String | SanitizationTests.java:77:25:77:32 | unsafer3 | Potential server-side request forgery due to a $@. | SanitizationTests.java:75:33:75:63 | getParameter(...) | user-provided value | -| SanitizationTests.java:80:59:80:77 | new URI(...) | SanitizationTests.java:79:49:79:79 | getParameter(...) : String | SanitizationTests.java:80:59:80:77 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:79:49:79:79 | getParameter(...) | user-provided value | -| SanitizationTests.java:81:25:81:32 | unsafer4 | SanitizationTests.java:79:49:79:79 | getParameter(...) : String | SanitizationTests.java:81:25:81:32 | unsafer4 | Potential server-side request forgery due to a $@. | SanitizationTests.java:79:49:79:79 | getParameter(...) | user-provided value | -| SanitizationTests.java:85:59:85:88 | new URI(...) | SanitizationTests.java:84:31:84:61 | getParameter(...) : String | SanitizationTests.java:85:59:85:88 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:84:31:84:61 | getParameter(...) | user-provided value | -| SanitizationTests.java:86:25:86:32 | unsafer5 | SanitizationTests.java:84:31:84:61 | getParameter(...) : String | SanitizationTests.java:86:25:86:32 | unsafer5 | Potential server-side request forgery due to a $@. | SanitizationTests.java:84:31:84:61 | getParameter(...) | user-provided value | -| SanitizationTests.java:90:60:90:89 | new URI(...) | SanitizationTests.java:88:58:88:86 | getParameter(...) : String | SanitizationTests.java:90:60:90:89 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:88:58:88:86 | getParameter(...) | user-provided value | -| SanitizationTests.java:91:25:91:33 | unsafer5a | SanitizationTests.java:88:58:88:86 | getParameter(...) : String | SanitizationTests.java:91:25:91:33 | unsafer5a | Potential server-side request forgery due to a $@. | SanitizationTests.java:88:58:88:86 | getParameter(...) | user-provided value | -| SanitizationTests.java:95:60:95:90 | new URI(...) | SanitizationTests.java:93:60:93:88 | getParameter(...) : String | SanitizationTests.java:95:60:95:90 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:93:60:93:88 | getParameter(...) | user-provided value | -| SanitizationTests.java:96:25:96:33 | unsafer5b | SanitizationTests.java:93:60:93:88 | getParameter(...) : String | SanitizationTests.java:96:25:96:33 | unsafer5b | Potential server-side request forgery due to a $@. | SanitizationTests.java:93:60:93:88 | getParameter(...) | user-provided value | -| SanitizationTests.java:100:60:100:90 | new URI(...) | SanitizationTests.java:98:77:98:105 | getParameter(...) : String | SanitizationTests.java:100:60:100:90 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:98:77:98:105 | getParameter(...) | user-provided value | -| SanitizationTests.java:101:25:101:33 | unsafer5c | SanitizationTests.java:98:77:98:105 | getParameter(...) : String | SanitizationTests.java:101:25:101:33 | unsafer5c | Potential server-side request forgery due to a $@. | SanitizationTests.java:98:77:98:105 | getParameter(...) | user-provided value | -| SanitizationTests.java:104:59:104:77 | new URI(...) | SanitizationTests.java:103:73:103:103 | getParameter(...) : String | SanitizationTests.java:104:59:104:77 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:103:73:103:103 | getParameter(...) | user-provided value | -| SanitizationTests.java:105:25:105:32 | unsafer6 | SanitizationTests.java:103:73:103:103 | getParameter(...) : String | SanitizationTests.java:105:25:105:32 | unsafer6 | Potential server-side request forgery due to a $@. | SanitizationTests.java:103:73:103:103 | getParameter(...) | user-provided value | -| SanitizationTests.java:108:59:108:77 | new URI(...) | SanitizationTests.java:107:56:107:86 | getParameter(...) : String | SanitizationTests.java:108:59:108:77 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:107:56:107:86 | getParameter(...) | user-provided value | -| SanitizationTests.java:109:25:109:32 | unsafer7 | SanitizationTests.java:107:56:107:86 | getParameter(...) : String | SanitizationTests.java:109:25:109:32 | unsafer7 | Potential server-side request forgery due to a $@. | SanitizationTests.java:107:56:107:86 | getParameter(...) | user-provided value | -| SanitizationTests.java:112:59:112:77 | new URI(...) | SanitizationTests.java:111:55:111:85 | getParameter(...) : String | SanitizationTests.java:112:59:112:77 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:111:55:111:85 | getParameter(...) | user-provided value | -| SanitizationTests.java:113:25:113:32 | unsafer8 | SanitizationTests.java:111:55:111:85 | getParameter(...) : String | SanitizationTests.java:113:25:113:32 | unsafer8 | Potential server-side request forgery due to a $@. | SanitizationTests.java:111:55:111:85 | getParameter(...) | user-provided value | -| SanitizationTests.java:116:59:116:77 | new URI(...) | SanitizationTests.java:115:33:115:63 | getParameter(...) : String | SanitizationTests.java:116:59:116:77 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:115:33:115:63 | getParameter(...) | user-provided value | -| SanitizationTests.java:117:25:117:32 | unsafer9 | SanitizationTests.java:115:33:115:63 | getParameter(...) : String | SanitizationTests.java:117:25:117:32 | unsafer9 | Potential server-side request forgery due to a $@. | SanitizationTests.java:115:33:115:63 | getParameter(...) | user-provided value | -| SanitizationTests.java:120:60:120:79 | new URI(...) | SanitizationTests.java:119:94:119:125 | getParameter(...) : String | SanitizationTests.java:120:60:120:79 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:119:94:119:125 | getParameter(...) | user-provided value | -| SanitizationTests.java:121:25:121:33 | unsafer10 | SanitizationTests.java:119:94:119:125 | getParameter(...) : String | SanitizationTests.java:121:25:121:33 | unsafer10 | Potential server-side request forgery due to a $@. | SanitizationTests.java:119:94:119:125 | getParameter(...) | user-provided value | +| SanitizationTests.java:24:52:24:54 | uri | SanitizationTests.java:21:31:21:57 | getParameter(...) : String | SanitizationTests.java:24:52:24:54 | uri | Potential server-side request forgery due to a $@. | SanitizationTests.java:21:31:21:57 | getParameter(...) | user-provided value | +| SanitizationTests.java:25:25:25:25 | r | SanitizationTests.java:21:31:21:57 | getParameter(...) : String | SanitizationTests.java:25:25:25:25 | r | Potential server-side request forgery due to a $@. | SanitizationTests.java:21:31:21:57 | getParameter(...) | user-provided value | +| SanitizationTests.java:78:59:78:77 | new URI(...) | SanitizationTests.java:77:33:77:63 | getParameter(...) : String | SanitizationTests.java:78:59:78:77 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:77:33:77:63 | getParameter(...) | user-provided value | +| SanitizationTests.java:79:25:79:32 | unsafer3 | SanitizationTests.java:77:33:77:63 | getParameter(...) : String | SanitizationTests.java:79:25:79:32 | unsafer3 | Potential server-side request forgery due to a $@. | SanitizationTests.java:77:33:77:63 | getParameter(...) | user-provided value | +| SanitizationTests.java:82:59:82:77 | new URI(...) | SanitizationTests.java:81:49:81:79 | getParameter(...) : String | SanitizationTests.java:82:59:82:77 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:81:49:81:79 | getParameter(...) | user-provided value | +| SanitizationTests.java:83:25:83:32 | unsafer4 | SanitizationTests.java:81:49:81:79 | getParameter(...) : String | SanitizationTests.java:83:25:83:32 | unsafer4 | Potential server-side request forgery due to a $@. | SanitizationTests.java:81:49:81:79 | getParameter(...) | user-provided value | +| SanitizationTests.java:87:59:87:88 | new URI(...) | SanitizationTests.java:86:31:86:61 | getParameter(...) : String | SanitizationTests.java:87:59:87:88 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:86:31:86:61 | getParameter(...) | user-provided value | +| SanitizationTests.java:88:25:88:32 | unsafer5 | SanitizationTests.java:86:31:86:61 | getParameter(...) : String | SanitizationTests.java:88:25:88:32 | unsafer5 | Potential server-side request forgery due to a $@. | SanitizationTests.java:86:31:86:61 | getParameter(...) | user-provided value | +| SanitizationTests.java:92:60:92:89 | new URI(...) | SanitizationTests.java:90:58:90:86 | getParameter(...) : String | SanitizationTests.java:92:60:92:89 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:90:58:90:86 | getParameter(...) | user-provided value | +| SanitizationTests.java:93:25:93:33 | unsafer5a | SanitizationTests.java:90:58:90:86 | getParameter(...) : String | SanitizationTests.java:93:25:93:33 | unsafer5a | Potential server-side request forgery due to a $@. | SanitizationTests.java:90:58:90:86 | getParameter(...) | user-provided value | +| SanitizationTests.java:97:60:97:90 | new URI(...) | SanitizationTests.java:95:60:95:88 | getParameter(...) : String | SanitizationTests.java:97:60:97:90 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:95:60:95:88 | getParameter(...) | user-provided value | +| SanitizationTests.java:98:25:98:33 | unsafer5b | SanitizationTests.java:95:60:95:88 | getParameter(...) : String | SanitizationTests.java:98:25:98:33 | unsafer5b | Potential server-side request forgery due to a $@. | SanitizationTests.java:95:60:95:88 | getParameter(...) | user-provided value | +| SanitizationTests.java:102:60:102:90 | new URI(...) | SanitizationTests.java:100:77:100:105 | getParameter(...) : String | SanitizationTests.java:102:60:102:90 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:100:77:100:105 | getParameter(...) | user-provided value | +| SanitizationTests.java:103:25:103:33 | unsafer5c | SanitizationTests.java:100:77:100:105 | getParameter(...) : String | SanitizationTests.java:103:25:103:33 | unsafer5c | Potential server-side request forgery due to a $@. | SanitizationTests.java:100:77:100:105 | getParameter(...) | user-provided value | +| SanitizationTests.java:106:59:106:77 | new URI(...) | SanitizationTests.java:105:73:105:103 | getParameter(...) : String | SanitizationTests.java:106:59:106:77 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:105:73:105:103 | getParameter(...) | user-provided value | +| SanitizationTests.java:107:25:107:32 | unsafer6 | SanitizationTests.java:105:73:105:103 | getParameter(...) : String | SanitizationTests.java:107:25:107:32 | unsafer6 | Potential server-side request forgery due to a $@. | SanitizationTests.java:105:73:105:103 | getParameter(...) | user-provided value | +| SanitizationTests.java:110:59:110:77 | new URI(...) | SanitizationTests.java:109:56:109:86 | getParameter(...) : String | SanitizationTests.java:110:59:110:77 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:109:56:109:86 | getParameter(...) | user-provided value | +| SanitizationTests.java:111:25:111:32 | unsafer7 | SanitizationTests.java:109:56:109:86 | getParameter(...) : String | SanitizationTests.java:111:25:111:32 | unsafer7 | Potential server-side request forgery due to a $@. | SanitizationTests.java:109:56:109:86 | getParameter(...) | user-provided value | +| SanitizationTests.java:114:59:114:77 | new URI(...) | SanitizationTests.java:113:55:113:85 | getParameter(...) : String | SanitizationTests.java:114:59:114:77 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:113:55:113:85 | getParameter(...) | user-provided value | +| SanitizationTests.java:115:25:115:32 | unsafer8 | SanitizationTests.java:113:55:113:85 | getParameter(...) : String | SanitizationTests.java:115:25:115:32 | unsafer8 | Potential server-side request forgery due to a $@. | SanitizationTests.java:113:55:113:85 | getParameter(...) | user-provided value | +| SanitizationTests.java:118:59:118:77 | new URI(...) | SanitizationTests.java:117:33:117:63 | getParameter(...) : String | SanitizationTests.java:118:59:118:77 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:117:33:117:63 | getParameter(...) | user-provided value | +| SanitizationTests.java:119:25:119:32 | unsafer9 | SanitizationTests.java:117:33:117:63 | getParameter(...) : String | SanitizationTests.java:119:25:119:32 | unsafer9 | Potential server-side request forgery due to a $@. | SanitizationTests.java:117:33:117:63 | getParameter(...) | user-provided value | +| SanitizationTests.java:122:60:122:79 | new URI(...) | SanitizationTests.java:121:94:121:125 | getParameter(...) : String | SanitizationTests.java:122:60:122:79 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:121:94:121:125 | getParameter(...) | user-provided value | +| SanitizationTests.java:123:25:123:33 | unsafer10 | SanitizationTests.java:121:94:121:125 | getParameter(...) : String | SanitizationTests.java:123:25:123:33 | unsafer10 | Potential server-side request forgery due to a $@. | SanitizationTests.java:121:94:121:125 | getParameter(...) | user-provided value | | SpringSSRF.java:32:39:32:59 | ... + ... | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:32:39:32:59 | ... + ... | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | | SpringSSRF.java:33:35:33:48 | fooResourceUrl | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:33:35:33:48 | fooResourceUrl | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | | SpringSSRF.java:34:34:34:47 | fooResourceUrl | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:34:34:34:47 | fooResourceUrl | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | @@ -665,118 +665,118 @@ edges | JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) : String | JdbcUrlSSRF.java:88:19:88:25 | jdbcUrl | provenance | Src:MaD:277 Sink:MaD:240 | | ReactiveWebClientSSRF.java:15:26:15:52 | getParameter(...) : String | ReactiveWebClientSSRF.java:16:52:16:54 | url | provenance | Src:MaD:277 Sink:MaD:274 | | ReactiveWebClientSSRF.java:32:26:32:52 | getParameter(...) : String | ReactiveWebClientSSRF.java:35:30:35:32 | url | provenance | Src:MaD:277 Sink:MaD:273 | -| SanitizationTests.java:19:23:19:58 | new URI(...) : URI | SanitizationTests.java:22:52:22:54 | uri | provenance | Sink:MaD:6 | -| SanitizationTests.java:19:23:19:58 | new URI(...) : URI | SanitizationTests.java:22:52:22:54 | uri : URI | provenance | | -| SanitizationTests.java:19:31:19:57 | getParameter(...) : String | SanitizationTests.java:19:23:19:58 | new URI(...) : URI | provenance | Src:MaD:277 Config | -| SanitizationTests.java:19:31:19:57 | getParameter(...) : String | SanitizationTests.java:19:23:19:58 | new URI(...) : URI | provenance | Src:MaD:277 MaD:285 | -| SanitizationTests.java:22:29:22:55 | newBuilder(...) : Builder | SanitizationTests.java:22:29:22:63 | build(...) : HttpRequest | provenance | MaD:283 | -| SanitizationTests.java:22:29:22:63 | build(...) : HttpRequest | SanitizationTests.java:23:25:23:25 | r | provenance | Sink:MaD:4 | -| SanitizationTests.java:22:52:22:54 | uri : URI | SanitizationTests.java:22:29:22:55 | newBuilder(...) : Builder | provenance | MaD:284 | -| SanitizationTests.java:75:33:75:63 | getParameter(...) : String | SanitizationTests.java:76:67:76:76 | unsafeUri3 : String | provenance | Src:MaD:277 | -| SanitizationTests.java:76:36:76:78 | newBuilder(...) : Builder | SanitizationTests.java:76:36:76:86 | build(...) : HttpRequest | provenance | MaD:283 | -| SanitizationTests.java:76:36:76:86 | build(...) : HttpRequest | SanitizationTests.java:77:25:77:32 | unsafer3 | provenance | Sink:MaD:4 | -| SanitizationTests.java:76:59:76:77 | new URI(...) : URI | SanitizationTests.java:76:36:76:78 | newBuilder(...) : Builder | provenance | MaD:284 | -| SanitizationTests.java:76:67:76:76 | unsafeUri3 : String | SanitizationTests.java:76:59:76:77 | new URI(...) | provenance | Config Sink:MaD:6 | -| SanitizationTests.java:76:67:76:76 | unsafeUri3 : String | SanitizationTests.java:76:59:76:77 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | -| SanitizationTests.java:76:67:76:76 | unsafeUri3 : String | SanitizationTests.java:76:59:76:77 | new URI(...) : URI | provenance | Config | -| SanitizationTests.java:76:67:76:76 | unsafeUri3 : String | SanitizationTests.java:76:59:76:77 | new URI(...) : URI | provenance | MaD:285 | -| SanitizationTests.java:79:49:79:79 | getParameter(...) : String | SanitizationTests.java:80:67:80:76 | unsafeUri4 : String | provenance | Src:MaD:277 | -| SanitizationTests.java:80:36:80:78 | newBuilder(...) : Builder | SanitizationTests.java:80:36:80:86 | build(...) : HttpRequest | provenance | MaD:283 | -| SanitizationTests.java:80:36:80:86 | build(...) : HttpRequest | SanitizationTests.java:81:25:81:32 | unsafer4 | provenance | Sink:MaD:4 | -| SanitizationTests.java:80:59:80:77 | new URI(...) : URI | SanitizationTests.java:80:36:80:78 | newBuilder(...) : Builder | provenance | MaD:284 | -| SanitizationTests.java:80:67:80:76 | unsafeUri4 : String | SanitizationTests.java:80:59:80:77 | new URI(...) | provenance | Config Sink:MaD:6 | -| SanitizationTests.java:80:67:80:76 | unsafeUri4 : String | SanitizationTests.java:80:59:80:77 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | -| SanitizationTests.java:80:67:80:76 | unsafeUri4 : String | SanitizationTests.java:80:59:80:77 | new URI(...) : URI | provenance | Config | -| SanitizationTests.java:80:67:80:76 | unsafeUri4 : String | SanitizationTests.java:80:59:80:77 | new URI(...) : URI | provenance | MaD:285 | -| SanitizationTests.java:84:13:84:22 | unsafeUri5 [post update] : StringBuilder | SanitizationTests.java:85:67:85:76 | unsafeUri5 : StringBuilder | provenance | | -| SanitizationTests.java:84:31:84:61 | getParameter(...) : String | SanitizationTests.java:84:13:84:22 | unsafeUri5 [post update] : StringBuilder | provenance | Src:MaD:277 MaD:278 | -| SanitizationTests.java:85:36:85:89 | newBuilder(...) : Builder | SanitizationTests.java:85:36:85:97 | build(...) : HttpRequest | provenance | MaD:283 | -| SanitizationTests.java:85:36:85:97 | build(...) : HttpRequest | SanitizationTests.java:86:25:86:32 | unsafer5 | provenance | Sink:MaD:4 | -| SanitizationTests.java:85:59:85:88 | new URI(...) : URI | SanitizationTests.java:85:36:85:89 | newBuilder(...) : Builder | provenance | MaD:284 | -| SanitizationTests.java:85:67:85:76 | unsafeUri5 : StringBuilder | SanitizationTests.java:85:67:85:87 | toString(...) : String | provenance | MaD:280 | -| SanitizationTests.java:85:67:85:87 | toString(...) : String | SanitizationTests.java:85:59:85:88 | new URI(...) | provenance | Config Sink:MaD:6 | -| SanitizationTests.java:85:67:85:87 | toString(...) : String | SanitizationTests.java:85:59:85:88 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | -| SanitizationTests.java:85:67:85:87 | toString(...) : String | SanitizationTests.java:85:59:85:88 | new URI(...) : URI | provenance | Config | -| SanitizationTests.java:85:67:85:87 | toString(...) : String | SanitizationTests.java:85:59:85:88 | new URI(...) : URI | provenance | MaD:285 | -| SanitizationTests.java:88:40:88:87 | new StringBuilder(...) : StringBuilder | SanitizationTests.java:90:68:90:77 | unafeUri5a : StringBuilder | provenance | | -| SanitizationTests.java:88:58:88:86 | getParameter(...) : String | SanitizationTests.java:88:40:88:87 | new StringBuilder(...) : StringBuilder | provenance | Src:MaD:277 MaD:282 | -| SanitizationTests.java:90:37:90:90 | newBuilder(...) : Builder | SanitizationTests.java:90:37:90:98 | build(...) : HttpRequest | provenance | MaD:283 | -| SanitizationTests.java:90:37:90:98 | build(...) : HttpRequest | SanitizationTests.java:91:25:91:33 | unsafer5a | provenance | Sink:MaD:4 | -| SanitizationTests.java:90:60:90:89 | new URI(...) : URI | SanitizationTests.java:90:37:90:90 | newBuilder(...) : Builder | provenance | MaD:284 | -| SanitizationTests.java:90:68:90:77 | unafeUri5a : StringBuilder | SanitizationTests.java:90:68:90:88 | toString(...) : String | provenance | MaD:280 | -| SanitizationTests.java:90:68:90:88 | toString(...) : String | SanitizationTests.java:90:60:90:89 | new URI(...) | provenance | Config Sink:MaD:6 | -| SanitizationTests.java:90:68:90:88 | toString(...) : String | SanitizationTests.java:90:60:90:89 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | -| SanitizationTests.java:90:68:90:88 | toString(...) : String | SanitizationTests.java:90:60:90:89 | new URI(...) : URI | provenance | Config | -| SanitizationTests.java:90:68:90:88 | toString(...) : String | SanitizationTests.java:90:60:90:89 | new URI(...) : URI | provenance | MaD:285 | -| SanitizationTests.java:93:41:93:105 | append(...) : StringBuilder | SanitizationTests.java:95:68:95:78 | unsafeUri5b : StringBuilder | provenance | | -| SanitizationTests.java:93:42:93:89 | new StringBuilder(...) : StringBuilder | SanitizationTests.java:93:41:93:105 | append(...) : StringBuilder | provenance | MaD:279 | -| SanitizationTests.java:93:60:93:88 | getParameter(...) : String | SanitizationTests.java:93:42:93:89 | new StringBuilder(...) : StringBuilder | provenance | Src:MaD:277 MaD:282 | -| SanitizationTests.java:95:37:95:91 | newBuilder(...) : Builder | SanitizationTests.java:95:37:95:99 | build(...) : HttpRequest | provenance | MaD:283 | -| SanitizationTests.java:95:37:95:99 | build(...) : HttpRequest | SanitizationTests.java:96:25:96:33 | unsafer5b | provenance | Sink:MaD:4 | -| SanitizationTests.java:95:60:95:90 | new URI(...) : URI | SanitizationTests.java:95:37:95:91 | newBuilder(...) : Builder | provenance | MaD:284 | -| SanitizationTests.java:95:68:95:78 | unsafeUri5b : StringBuilder | SanitizationTests.java:95:68:95:89 | toString(...) : String | provenance | MaD:280 | -| SanitizationTests.java:95:68:95:89 | toString(...) : String | SanitizationTests.java:95:60:95:90 | new URI(...) | provenance | Config Sink:MaD:6 | -| SanitizationTests.java:95:68:95:89 | toString(...) : String | SanitizationTests.java:95:60:95:90 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | -| SanitizationTests.java:95:68:95:89 | toString(...) : String | SanitizationTests.java:95:60:95:90 | new URI(...) : URI | provenance | Config | -| SanitizationTests.java:95:68:95:89 | toString(...) : String | SanitizationTests.java:95:60:95:90 | new URI(...) : URI | provenance | MaD:285 | -| SanitizationTests.java:98:41:98:106 | append(...) : StringBuilder | SanitizationTests.java:100:68:100:78 | unsafeUri5c : StringBuilder | provenance | | -| SanitizationTests.java:98:77:98:105 | getParameter(...) : String | SanitizationTests.java:98:41:98:106 | append(...) : StringBuilder | provenance | Src:MaD:277 MaD:278+MaD:279 | -| SanitizationTests.java:100:37:100:91 | newBuilder(...) : Builder | SanitizationTests.java:100:37:100:99 | build(...) : HttpRequest | provenance | MaD:283 | -| SanitizationTests.java:100:37:100:99 | build(...) : HttpRequest | SanitizationTests.java:101:25:101:33 | unsafer5c | provenance | Sink:MaD:4 | -| SanitizationTests.java:100:60:100:90 | new URI(...) : URI | SanitizationTests.java:100:37:100:91 | newBuilder(...) : Builder | provenance | MaD:284 | -| SanitizationTests.java:100:68:100:78 | unsafeUri5c : StringBuilder | SanitizationTests.java:100:68:100:89 | toString(...) : String | provenance | MaD:280 | -| SanitizationTests.java:100:68:100:89 | toString(...) : String | SanitizationTests.java:100:60:100:90 | new URI(...) | provenance | Config Sink:MaD:6 | -| SanitizationTests.java:100:68:100:89 | toString(...) : String | SanitizationTests.java:100:60:100:90 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | -| SanitizationTests.java:100:68:100:89 | toString(...) : String | SanitizationTests.java:100:60:100:90 | new URI(...) : URI | provenance | Config | -| SanitizationTests.java:100:68:100:89 | toString(...) : String | SanitizationTests.java:100:60:100:90 | new URI(...) : URI | provenance | MaD:285 | -| SanitizationTests.java:103:33:103:104 | format(...) : String | SanitizationTests.java:104:67:104:76 | unsafeUri6 : String | provenance | | -| SanitizationTests.java:103:33:103:104 | new ..[] { .. } : Object[] [[]] : String | SanitizationTests.java:103:33:103:104 | format(...) : String | provenance | MaD:281 | -| SanitizationTests.java:103:73:103:103 | getParameter(...) : String | SanitizationTests.java:103:33:103:104 | new ..[] { .. } : Object[] [[]] : String | provenance | Src:MaD:277 | -| SanitizationTests.java:104:36:104:78 | newBuilder(...) : Builder | SanitizationTests.java:104:36:104:86 | build(...) : HttpRequest | provenance | MaD:283 | -| SanitizationTests.java:104:36:104:86 | build(...) : HttpRequest | SanitizationTests.java:105:25:105:32 | unsafer6 | provenance | Sink:MaD:4 | -| SanitizationTests.java:104:59:104:77 | new URI(...) : URI | SanitizationTests.java:104:36:104:78 | newBuilder(...) : Builder | provenance | MaD:284 | -| SanitizationTests.java:104:67:104:76 | unsafeUri6 : String | SanitizationTests.java:104:59:104:77 | new URI(...) | provenance | Config Sink:MaD:6 | -| SanitizationTests.java:104:67:104:76 | unsafeUri6 : String | SanitizationTests.java:104:59:104:77 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | -| SanitizationTests.java:104:67:104:76 | unsafeUri6 : String | SanitizationTests.java:104:59:104:77 | new URI(...) : URI | provenance | Config | -| SanitizationTests.java:104:67:104:76 | unsafeUri6 : String | SanitizationTests.java:104:59:104:77 | new URI(...) : URI | provenance | MaD:285 | -| SanitizationTests.java:107:33:107:110 | format(...) : String | SanitizationTests.java:108:67:108:76 | unsafeUri7 : String | provenance | | -| SanitizationTests.java:107:33:107:110 | new ..[] { .. } : Object[] [[]] : String | SanitizationTests.java:107:33:107:110 | format(...) : String | provenance | MaD:281 | -| SanitizationTests.java:107:56:107:86 | getParameter(...) : String | SanitizationTests.java:107:33:107:110 | new ..[] { .. } : Object[] [[]] : String | provenance | Src:MaD:277 | -| SanitizationTests.java:108:36:108:78 | newBuilder(...) : Builder | SanitizationTests.java:108:36:108:86 | build(...) : HttpRequest | provenance | MaD:283 | -| SanitizationTests.java:108:36:108:86 | build(...) : HttpRequest | SanitizationTests.java:109:25:109:32 | unsafer7 | provenance | Sink:MaD:4 | -| SanitizationTests.java:108:59:108:77 | new URI(...) : URI | SanitizationTests.java:108:36:108:78 | newBuilder(...) : Builder | provenance | MaD:284 | -| SanitizationTests.java:108:67:108:76 | unsafeUri7 : String | SanitizationTests.java:108:59:108:77 | new URI(...) | provenance | Config Sink:MaD:6 | -| SanitizationTests.java:108:67:108:76 | unsafeUri7 : String | SanitizationTests.java:108:59:108:77 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | -| SanitizationTests.java:108:67:108:76 | unsafeUri7 : String | SanitizationTests.java:108:59:108:77 | new URI(...) : URI | provenance | Config | -| SanitizationTests.java:108:67:108:76 | unsafeUri7 : String | SanitizationTests.java:108:59:108:77 | new URI(...) : URI | provenance | MaD:285 | -| SanitizationTests.java:111:33:111:110 | format(...) : String | SanitizationTests.java:112:67:112:76 | unsafeUri8 : String | provenance | | -| SanitizationTests.java:111:33:111:110 | new ..[] { .. } : Object[] [[]] : String | SanitizationTests.java:111:33:111:110 | format(...) : String | provenance | MaD:281 | -| SanitizationTests.java:111:55:111:85 | getParameter(...) : String | SanitizationTests.java:111:33:111:110 | new ..[] { .. } : Object[] [[]] : String | provenance | Src:MaD:277 | -| SanitizationTests.java:112:36:112:78 | newBuilder(...) : Builder | SanitizationTests.java:112:36:112:86 | build(...) : HttpRequest | provenance | MaD:283 | -| SanitizationTests.java:112:36:112:86 | build(...) : HttpRequest | SanitizationTests.java:113:25:113:32 | unsafer8 | provenance | Sink:MaD:4 | -| SanitizationTests.java:112:59:112:77 | new URI(...) : URI | SanitizationTests.java:112:36:112:78 | newBuilder(...) : Builder | provenance | MaD:284 | -| SanitizationTests.java:112:67:112:76 | unsafeUri8 : String | SanitizationTests.java:112:59:112:77 | new URI(...) | provenance | Config Sink:MaD:6 | -| SanitizationTests.java:112:67:112:76 | unsafeUri8 : String | SanitizationTests.java:112:59:112:77 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | -| SanitizationTests.java:112:67:112:76 | unsafeUri8 : String | SanitizationTests.java:112:59:112:77 | new URI(...) : URI | provenance | Config | -| SanitizationTests.java:112:67:112:76 | unsafeUri8 : String | SanitizationTests.java:112:59:112:77 | new URI(...) : URI | provenance | MaD:285 | -| SanitizationTests.java:115:33:115:63 | getParameter(...) : String | SanitizationTests.java:116:67:116:76 | unsafeUri9 : String | provenance | Src:MaD:277 | -| SanitizationTests.java:116:36:116:78 | newBuilder(...) : Builder | SanitizationTests.java:116:36:116:86 | build(...) : HttpRequest | provenance | MaD:283 | -| SanitizationTests.java:116:36:116:86 | build(...) : HttpRequest | SanitizationTests.java:117:25:117:32 | unsafer9 | provenance | Sink:MaD:4 | -| SanitizationTests.java:116:59:116:77 | new URI(...) : URI | SanitizationTests.java:116:36:116:78 | newBuilder(...) : Builder | provenance | MaD:284 | -| SanitizationTests.java:116:67:116:76 | unsafeUri9 : String | SanitizationTests.java:116:59:116:77 | new URI(...) | provenance | Config Sink:MaD:6 | -| SanitizationTests.java:116:67:116:76 | unsafeUri9 : String | SanitizationTests.java:116:59:116:77 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | -| SanitizationTests.java:116:67:116:76 | unsafeUri9 : String | SanitizationTests.java:116:59:116:77 | new URI(...) : URI | provenance | Config | -| SanitizationTests.java:116:67:116:76 | unsafeUri9 : String | SanitizationTests.java:116:59:116:77 | new URI(...) : URI | provenance | MaD:285 | -| SanitizationTests.java:119:34:119:126 | format(...) : String | SanitizationTests.java:120:68:120:78 | unsafeUri10 : String | provenance | | -| SanitizationTests.java:119:34:119:126 | new ..[] { .. } : Object[] [[]] : String | SanitizationTests.java:119:34:119:126 | format(...) : String | provenance | MaD:281 | -| SanitizationTests.java:119:94:119:125 | getParameter(...) : String | SanitizationTests.java:119:34:119:126 | new ..[] { .. } : Object[] [[]] : String | provenance | Src:MaD:277 | -| SanitizationTests.java:120:37:120:80 | newBuilder(...) : Builder | SanitizationTests.java:120:37:120:88 | build(...) : HttpRequest | provenance | MaD:283 | -| SanitizationTests.java:120:37:120:88 | build(...) : HttpRequest | SanitizationTests.java:121:25:121:33 | unsafer10 | provenance | Sink:MaD:4 | -| SanitizationTests.java:120:60:120:79 | new URI(...) : URI | SanitizationTests.java:120:37:120:80 | newBuilder(...) : Builder | provenance | MaD:284 | -| SanitizationTests.java:120:68:120:78 | unsafeUri10 : String | SanitizationTests.java:120:60:120:79 | new URI(...) | provenance | Config Sink:MaD:6 | -| SanitizationTests.java:120:68:120:78 | unsafeUri10 : String | SanitizationTests.java:120:60:120:79 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | -| SanitizationTests.java:120:68:120:78 | unsafeUri10 : String | SanitizationTests.java:120:60:120:79 | new URI(...) : URI | provenance | Config | -| SanitizationTests.java:120:68:120:78 | unsafeUri10 : String | SanitizationTests.java:120:60:120:79 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:21:23:21:58 | new URI(...) : URI | SanitizationTests.java:24:52:24:54 | uri | provenance | Sink:MaD:6 | +| SanitizationTests.java:21:23:21:58 | new URI(...) : URI | SanitizationTests.java:24:52:24:54 | uri : URI | provenance | | +| SanitizationTests.java:21:31:21:57 | getParameter(...) : String | SanitizationTests.java:21:23:21:58 | new URI(...) : URI | provenance | Src:MaD:277 Config | +| SanitizationTests.java:21:31:21:57 | getParameter(...) : String | SanitizationTests.java:21:23:21:58 | new URI(...) : URI | provenance | Src:MaD:277 MaD:285 | +| SanitizationTests.java:24:29:24:55 | newBuilder(...) : Builder | SanitizationTests.java:24:29:24:63 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:24:29:24:63 | build(...) : HttpRequest | SanitizationTests.java:25:25:25:25 | r | provenance | Sink:MaD:4 | +| SanitizationTests.java:24:52:24:54 | uri : URI | SanitizationTests.java:24:29:24:55 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:77:33:77:63 | getParameter(...) : String | SanitizationTests.java:78:67:78:76 | unsafeUri3 : String | provenance | Src:MaD:277 | +| SanitizationTests.java:78:36:78:78 | newBuilder(...) : Builder | SanitizationTests.java:78:36:78:86 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:78:36:78:86 | build(...) : HttpRequest | SanitizationTests.java:79:25:79:32 | unsafer3 | provenance | Sink:MaD:4 | +| SanitizationTests.java:78:59:78:77 | new URI(...) : URI | SanitizationTests.java:78:36:78:78 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:78:67:78:76 | unsafeUri3 : String | SanitizationTests.java:78:59:78:77 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:78:67:78:76 | unsafeUri3 : String | SanitizationTests.java:78:59:78:77 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:78:67:78:76 | unsafeUri3 : String | SanitizationTests.java:78:59:78:77 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:78:67:78:76 | unsafeUri3 : String | SanitizationTests.java:78:59:78:77 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:81:49:81:79 | getParameter(...) : String | SanitizationTests.java:82:67:82:76 | unsafeUri4 : String | provenance | Src:MaD:277 | +| SanitizationTests.java:82:36:82:78 | newBuilder(...) : Builder | SanitizationTests.java:82:36:82:86 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:82:36:82:86 | build(...) : HttpRequest | SanitizationTests.java:83:25:83:32 | unsafer4 | provenance | Sink:MaD:4 | +| SanitizationTests.java:82:59:82:77 | new URI(...) : URI | SanitizationTests.java:82:36:82:78 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:82:67:82:76 | unsafeUri4 : String | SanitizationTests.java:82:59:82:77 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:82:67:82:76 | unsafeUri4 : String | SanitizationTests.java:82:59:82:77 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:82:67:82:76 | unsafeUri4 : String | SanitizationTests.java:82:59:82:77 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:82:67:82:76 | unsafeUri4 : String | SanitizationTests.java:82:59:82:77 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:86:13:86:22 | unsafeUri5 [post update] : StringBuilder | SanitizationTests.java:87:67:87:76 | unsafeUri5 : StringBuilder | provenance | | +| SanitizationTests.java:86:31:86:61 | getParameter(...) : String | SanitizationTests.java:86:13:86:22 | unsafeUri5 [post update] : StringBuilder | provenance | Src:MaD:277 MaD:278 | +| SanitizationTests.java:87:36:87:89 | newBuilder(...) : Builder | SanitizationTests.java:87:36:87:97 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:87:36:87:97 | build(...) : HttpRequest | SanitizationTests.java:88:25:88:32 | unsafer5 | provenance | Sink:MaD:4 | +| SanitizationTests.java:87:59:87:88 | new URI(...) : URI | SanitizationTests.java:87:36:87:89 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:87:67:87:76 | unsafeUri5 : StringBuilder | SanitizationTests.java:87:67:87:87 | toString(...) : String | provenance | MaD:280 | +| SanitizationTests.java:87:67:87:87 | toString(...) : String | SanitizationTests.java:87:59:87:88 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:87:67:87:87 | toString(...) : String | SanitizationTests.java:87:59:87:88 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:87:67:87:87 | toString(...) : String | SanitizationTests.java:87:59:87:88 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:87:67:87:87 | toString(...) : String | SanitizationTests.java:87:59:87:88 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:90:40:90:87 | new StringBuilder(...) : StringBuilder | SanitizationTests.java:92:68:92:77 | unafeUri5a : StringBuilder | provenance | | +| SanitizationTests.java:90:58:90:86 | getParameter(...) : String | SanitizationTests.java:90:40:90:87 | new StringBuilder(...) : StringBuilder | provenance | Src:MaD:277 MaD:282 | +| SanitizationTests.java:92:37:92:90 | newBuilder(...) : Builder | SanitizationTests.java:92:37:92:98 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:92:37:92:98 | build(...) : HttpRequest | SanitizationTests.java:93:25:93:33 | unsafer5a | provenance | Sink:MaD:4 | +| SanitizationTests.java:92:60:92:89 | new URI(...) : URI | SanitizationTests.java:92:37:92:90 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:92:68:92:77 | unafeUri5a : StringBuilder | SanitizationTests.java:92:68:92:88 | toString(...) : String | provenance | MaD:280 | +| SanitizationTests.java:92:68:92:88 | toString(...) : String | SanitizationTests.java:92:60:92:89 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:92:68:92:88 | toString(...) : String | SanitizationTests.java:92:60:92:89 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:92:68:92:88 | toString(...) : String | SanitizationTests.java:92:60:92:89 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:92:68:92:88 | toString(...) : String | SanitizationTests.java:92:60:92:89 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:95:41:95:105 | append(...) : StringBuilder | SanitizationTests.java:97:68:97:78 | unsafeUri5b : StringBuilder | provenance | | +| SanitizationTests.java:95:42:95:89 | new StringBuilder(...) : StringBuilder | SanitizationTests.java:95:41:95:105 | append(...) : StringBuilder | provenance | MaD:279 | +| SanitizationTests.java:95:60:95:88 | getParameter(...) : String | SanitizationTests.java:95:42:95:89 | new StringBuilder(...) : StringBuilder | provenance | Src:MaD:277 MaD:282 | +| SanitizationTests.java:97:37:97:91 | newBuilder(...) : Builder | SanitizationTests.java:97:37:97:99 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:97:37:97:99 | build(...) : HttpRequest | SanitizationTests.java:98:25:98:33 | unsafer5b | provenance | Sink:MaD:4 | +| SanitizationTests.java:97:60:97:90 | new URI(...) : URI | SanitizationTests.java:97:37:97:91 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:97:68:97:78 | unsafeUri5b : StringBuilder | SanitizationTests.java:97:68:97:89 | toString(...) : String | provenance | MaD:280 | +| SanitizationTests.java:97:68:97:89 | toString(...) : String | SanitizationTests.java:97:60:97:90 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:97:68:97:89 | toString(...) : String | SanitizationTests.java:97:60:97:90 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:97:68:97:89 | toString(...) : String | SanitizationTests.java:97:60:97:90 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:97:68:97:89 | toString(...) : String | SanitizationTests.java:97:60:97:90 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:100:41:100:106 | append(...) : StringBuilder | SanitizationTests.java:102:68:102:78 | unsafeUri5c : StringBuilder | provenance | | +| SanitizationTests.java:100:77:100:105 | getParameter(...) : String | SanitizationTests.java:100:41:100:106 | append(...) : StringBuilder | provenance | Src:MaD:277 MaD:278+MaD:279 | +| SanitizationTests.java:102:37:102:91 | newBuilder(...) : Builder | SanitizationTests.java:102:37:102:99 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:102:37:102:99 | build(...) : HttpRequest | SanitizationTests.java:103:25:103:33 | unsafer5c | provenance | Sink:MaD:4 | +| SanitizationTests.java:102:60:102:90 | new URI(...) : URI | SanitizationTests.java:102:37:102:91 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:102:68:102:78 | unsafeUri5c : StringBuilder | SanitizationTests.java:102:68:102:89 | toString(...) : String | provenance | MaD:280 | +| SanitizationTests.java:102:68:102:89 | toString(...) : String | SanitizationTests.java:102:60:102:90 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:102:68:102:89 | toString(...) : String | SanitizationTests.java:102:60:102:90 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:102:68:102:89 | toString(...) : String | SanitizationTests.java:102:60:102:90 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:102:68:102:89 | toString(...) : String | SanitizationTests.java:102:60:102:90 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:105:33:105:104 | format(...) : String | SanitizationTests.java:106:67:106:76 | unsafeUri6 : String | provenance | | +| SanitizationTests.java:105:33:105:104 | new ..[] { .. } : Object[] [[]] : String | SanitizationTests.java:105:33:105:104 | format(...) : String | provenance | MaD:281 | +| SanitizationTests.java:105:73:105:103 | getParameter(...) : String | SanitizationTests.java:105:33:105:104 | new ..[] { .. } : Object[] [[]] : String | provenance | Src:MaD:277 | +| SanitizationTests.java:106:36:106:78 | newBuilder(...) : Builder | SanitizationTests.java:106:36:106:86 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:106:36:106:86 | build(...) : HttpRequest | SanitizationTests.java:107:25:107:32 | unsafer6 | provenance | Sink:MaD:4 | +| SanitizationTests.java:106:59:106:77 | new URI(...) : URI | SanitizationTests.java:106:36:106:78 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:106:67:106:76 | unsafeUri6 : String | SanitizationTests.java:106:59:106:77 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:106:67:106:76 | unsafeUri6 : String | SanitizationTests.java:106:59:106:77 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:106:67:106:76 | unsafeUri6 : String | SanitizationTests.java:106:59:106:77 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:106:67:106:76 | unsafeUri6 : String | SanitizationTests.java:106:59:106:77 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:109:33:109:110 | format(...) : String | SanitizationTests.java:110:67:110:76 | unsafeUri7 : String | provenance | | +| SanitizationTests.java:109:33:109:110 | new ..[] { .. } : Object[] [[]] : String | SanitizationTests.java:109:33:109:110 | format(...) : String | provenance | MaD:281 | +| SanitizationTests.java:109:56:109:86 | getParameter(...) : String | SanitizationTests.java:109:33:109:110 | new ..[] { .. } : Object[] [[]] : String | provenance | Src:MaD:277 | +| SanitizationTests.java:110:36:110:78 | newBuilder(...) : Builder | SanitizationTests.java:110:36:110:86 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:110:36:110:86 | build(...) : HttpRequest | SanitizationTests.java:111:25:111:32 | unsafer7 | provenance | Sink:MaD:4 | +| SanitizationTests.java:110:59:110:77 | new URI(...) : URI | SanitizationTests.java:110:36:110:78 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:110:67:110:76 | unsafeUri7 : String | SanitizationTests.java:110:59:110:77 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:110:67:110:76 | unsafeUri7 : String | SanitizationTests.java:110:59:110:77 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:110:67:110:76 | unsafeUri7 : String | SanitizationTests.java:110:59:110:77 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:110:67:110:76 | unsafeUri7 : String | SanitizationTests.java:110:59:110:77 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:113:33:113:110 | format(...) : String | SanitizationTests.java:114:67:114:76 | unsafeUri8 : String | provenance | | +| SanitizationTests.java:113:33:113:110 | new ..[] { .. } : Object[] [[]] : String | SanitizationTests.java:113:33:113:110 | format(...) : String | provenance | MaD:281 | +| SanitizationTests.java:113:55:113:85 | getParameter(...) : String | SanitizationTests.java:113:33:113:110 | new ..[] { .. } : Object[] [[]] : String | provenance | Src:MaD:277 | +| SanitizationTests.java:114:36:114:78 | newBuilder(...) : Builder | SanitizationTests.java:114:36:114:86 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:114:36:114:86 | build(...) : HttpRequest | SanitizationTests.java:115:25:115:32 | unsafer8 | provenance | Sink:MaD:4 | +| SanitizationTests.java:114:59:114:77 | new URI(...) : URI | SanitizationTests.java:114:36:114:78 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:114:67:114:76 | unsafeUri8 : String | SanitizationTests.java:114:59:114:77 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:114:67:114:76 | unsafeUri8 : String | SanitizationTests.java:114:59:114:77 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:114:67:114:76 | unsafeUri8 : String | SanitizationTests.java:114:59:114:77 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:114:67:114:76 | unsafeUri8 : String | SanitizationTests.java:114:59:114:77 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:117:33:117:63 | getParameter(...) : String | SanitizationTests.java:118:67:118:76 | unsafeUri9 : String | provenance | Src:MaD:277 | +| SanitizationTests.java:118:36:118:78 | newBuilder(...) : Builder | SanitizationTests.java:118:36:118:86 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:118:36:118:86 | build(...) : HttpRequest | SanitizationTests.java:119:25:119:32 | unsafer9 | provenance | Sink:MaD:4 | +| SanitizationTests.java:118:59:118:77 | new URI(...) : URI | SanitizationTests.java:118:36:118:78 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:118:67:118:76 | unsafeUri9 : String | SanitizationTests.java:118:59:118:77 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:118:67:118:76 | unsafeUri9 : String | SanitizationTests.java:118:59:118:77 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:118:67:118:76 | unsafeUri9 : String | SanitizationTests.java:118:59:118:77 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:118:67:118:76 | unsafeUri9 : String | SanitizationTests.java:118:59:118:77 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:121:34:121:126 | format(...) : String | SanitizationTests.java:122:68:122:78 | unsafeUri10 : String | provenance | | +| SanitizationTests.java:121:34:121:126 | new ..[] { .. } : Object[] [[]] : String | SanitizationTests.java:121:34:121:126 | format(...) : String | provenance | MaD:281 | +| SanitizationTests.java:121:94:121:125 | getParameter(...) : String | SanitizationTests.java:121:34:121:126 | new ..[] { .. } : Object[] [[]] : String | provenance | Src:MaD:277 | +| SanitizationTests.java:122:37:122:80 | newBuilder(...) : Builder | SanitizationTests.java:122:37:122:88 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:122:37:122:88 | build(...) : HttpRequest | SanitizationTests.java:123:25:123:33 | unsafer10 | provenance | Sink:MaD:4 | +| SanitizationTests.java:122:60:122:79 | new URI(...) : URI | SanitizationTests.java:122:37:122:80 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:122:68:122:78 | unsafeUri10 : String | SanitizationTests.java:122:60:122:79 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:122:68:122:78 | unsafeUri10 : String | SanitizationTests.java:122:60:122:79 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:122:68:122:78 | unsafeUri10 : String | SanitizationTests.java:122:60:122:79 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:122:68:122:78 | unsafeUri10 : String | SanitizationTests.java:122:60:122:79 | new URI(...) : URI | provenance | MaD:285 | | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:32:39:32:59 | ... + ... | provenance | Src:MaD:277 Sink:MaD:264 | | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:33:35:33:48 | fooResourceUrl | provenance | Src:MaD:277 Sink:MaD:262 | | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:34:34:34:47 | fooResourceUrl | provenance | Src:MaD:277 Sink:MaD:263 | @@ -1580,107 +1580,107 @@ nodes | ReactiveWebClientSSRF.java:16:52:16:54 | url | semmle.label | url | | ReactiveWebClientSSRF.java:32:26:32:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | | ReactiveWebClientSSRF.java:35:30:35:32 | url | semmle.label | url | -| SanitizationTests.java:19:23:19:58 | new URI(...) : URI | semmle.label | new URI(...) : URI | -| SanitizationTests.java:19:31:19:57 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| SanitizationTests.java:22:29:22:55 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | -| SanitizationTests.java:22:29:22:63 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | -| SanitizationTests.java:22:52:22:54 | uri | semmle.label | uri | -| SanitizationTests.java:22:52:22:54 | uri : URI | semmle.label | uri : URI | -| SanitizationTests.java:23:25:23:25 | r | semmle.label | r | -| SanitizationTests.java:75:33:75:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| SanitizationTests.java:76:36:76:78 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | -| SanitizationTests.java:76:36:76:86 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | -| SanitizationTests.java:76:59:76:77 | new URI(...) | semmle.label | new URI(...) | -| SanitizationTests.java:76:59:76:77 | new URI(...) : URI | semmle.label | new URI(...) : URI | -| SanitizationTests.java:76:67:76:76 | unsafeUri3 : String | semmle.label | unsafeUri3 : String | -| SanitizationTests.java:77:25:77:32 | unsafer3 | semmle.label | unsafer3 | -| SanitizationTests.java:79:49:79:79 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| SanitizationTests.java:80:36:80:78 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | -| SanitizationTests.java:80:36:80:86 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | -| SanitizationTests.java:80:59:80:77 | new URI(...) | semmle.label | new URI(...) | -| SanitizationTests.java:80:59:80:77 | new URI(...) : URI | semmle.label | new URI(...) : URI | -| SanitizationTests.java:80:67:80:76 | unsafeUri4 : String | semmle.label | unsafeUri4 : String | -| SanitizationTests.java:81:25:81:32 | unsafer4 | semmle.label | unsafer4 | -| SanitizationTests.java:84:13:84:22 | unsafeUri5 [post update] : StringBuilder | semmle.label | unsafeUri5 [post update] : StringBuilder | -| SanitizationTests.java:84:31:84:61 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| SanitizationTests.java:85:36:85:89 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | -| SanitizationTests.java:85:36:85:97 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | -| SanitizationTests.java:85:59:85:88 | new URI(...) | semmle.label | new URI(...) | -| SanitizationTests.java:85:59:85:88 | new URI(...) : URI | semmle.label | new URI(...) : URI | -| SanitizationTests.java:85:67:85:76 | unsafeUri5 : StringBuilder | semmle.label | unsafeUri5 : StringBuilder | -| SanitizationTests.java:85:67:85:87 | toString(...) : String | semmle.label | toString(...) : String | -| SanitizationTests.java:86:25:86:32 | unsafer5 | semmle.label | unsafer5 | -| SanitizationTests.java:88:40:88:87 | new StringBuilder(...) : StringBuilder | semmle.label | new StringBuilder(...) : StringBuilder | -| SanitizationTests.java:88:58:88:86 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| SanitizationTests.java:90:37:90:90 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | -| SanitizationTests.java:90:37:90:98 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | -| SanitizationTests.java:90:60:90:89 | new URI(...) | semmle.label | new URI(...) | -| SanitizationTests.java:90:60:90:89 | new URI(...) : URI | semmle.label | new URI(...) : URI | -| SanitizationTests.java:90:68:90:77 | unafeUri5a : StringBuilder | semmle.label | unafeUri5a : StringBuilder | -| SanitizationTests.java:90:68:90:88 | toString(...) : String | semmle.label | toString(...) : String | -| SanitizationTests.java:91:25:91:33 | unsafer5a | semmle.label | unsafer5a | -| SanitizationTests.java:93:41:93:105 | append(...) : StringBuilder | semmle.label | append(...) : StringBuilder | -| SanitizationTests.java:93:42:93:89 | new StringBuilder(...) : StringBuilder | semmle.label | new StringBuilder(...) : StringBuilder | -| SanitizationTests.java:93:60:93:88 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| SanitizationTests.java:95:37:95:91 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | -| SanitizationTests.java:95:37:95:99 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | -| SanitizationTests.java:95:60:95:90 | new URI(...) | semmle.label | new URI(...) | -| SanitizationTests.java:95:60:95:90 | new URI(...) : URI | semmle.label | new URI(...) : URI | -| SanitizationTests.java:95:68:95:78 | unsafeUri5b : StringBuilder | semmle.label | unsafeUri5b : StringBuilder | -| SanitizationTests.java:95:68:95:89 | toString(...) : String | semmle.label | toString(...) : String | -| SanitizationTests.java:96:25:96:33 | unsafer5b | semmle.label | unsafer5b | -| SanitizationTests.java:98:41:98:106 | append(...) : StringBuilder | semmle.label | append(...) : StringBuilder | -| SanitizationTests.java:98:77:98:105 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| SanitizationTests.java:100:37:100:91 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | -| SanitizationTests.java:100:37:100:99 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | -| SanitizationTests.java:100:60:100:90 | new URI(...) | semmle.label | new URI(...) | -| SanitizationTests.java:100:60:100:90 | new URI(...) : URI | semmle.label | new URI(...) : URI | -| SanitizationTests.java:100:68:100:78 | unsafeUri5c : StringBuilder | semmle.label | unsafeUri5c : StringBuilder | -| SanitizationTests.java:100:68:100:89 | toString(...) : String | semmle.label | toString(...) : String | -| SanitizationTests.java:101:25:101:33 | unsafer5c | semmle.label | unsafer5c | -| SanitizationTests.java:103:33:103:104 | format(...) : String | semmle.label | format(...) : String | -| SanitizationTests.java:103:33:103:104 | new ..[] { .. } : Object[] [[]] : String | semmle.label | new ..[] { .. } : Object[] [[]] : String | -| SanitizationTests.java:103:73:103:103 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| SanitizationTests.java:104:36:104:78 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | -| SanitizationTests.java:104:36:104:86 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | -| SanitizationTests.java:104:59:104:77 | new URI(...) | semmle.label | new URI(...) | -| SanitizationTests.java:104:59:104:77 | new URI(...) : URI | semmle.label | new URI(...) : URI | -| SanitizationTests.java:104:67:104:76 | unsafeUri6 : String | semmle.label | unsafeUri6 : String | -| SanitizationTests.java:105:25:105:32 | unsafer6 | semmle.label | unsafer6 | -| SanitizationTests.java:107:33:107:110 | format(...) : String | semmle.label | format(...) : String | -| SanitizationTests.java:107:33:107:110 | new ..[] { .. } : Object[] [[]] : String | semmle.label | new ..[] { .. } : Object[] [[]] : String | -| SanitizationTests.java:107:56:107:86 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| SanitizationTests.java:108:36:108:78 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | -| SanitizationTests.java:108:36:108:86 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | -| SanitizationTests.java:108:59:108:77 | new URI(...) | semmle.label | new URI(...) | -| SanitizationTests.java:108:59:108:77 | new URI(...) : URI | semmle.label | new URI(...) : URI | -| SanitizationTests.java:108:67:108:76 | unsafeUri7 : String | semmle.label | unsafeUri7 : String | -| SanitizationTests.java:109:25:109:32 | unsafer7 | semmle.label | unsafer7 | -| SanitizationTests.java:111:33:111:110 | format(...) : String | semmle.label | format(...) : String | -| SanitizationTests.java:111:33:111:110 | new ..[] { .. } : Object[] [[]] : String | semmle.label | new ..[] { .. } : Object[] [[]] : String | -| SanitizationTests.java:111:55:111:85 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| SanitizationTests.java:112:36:112:78 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | -| SanitizationTests.java:112:36:112:86 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | -| SanitizationTests.java:112:59:112:77 | new URI(...) | semmle.label | new URI(...) | -| SanitizationTests.java:112:59:112:77 | new URI(...) : URI | semmle.label | new URI(...) : URI | -| SanitizationTests.java:112:67:112:76 | unsafeUri8 : String | semmle.label | unsafeUri8 : String | -| SanitizationTests.java:113:25:113:32 | unsafer8 | semmle.label | unsafer8 | -| SanitizationTests.java:115:33:115:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| SanitizationTests.java:116:36:116:78 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | -| SanitizationTests.java:116:36:116:86 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | -| SanitizationTests.java:116:59:116:77 | new URI(...) | semmle.label | new URI(...) | -| SanitizationTests.java:116:59:116:77 | new URI(...) : URI | semmle.label | new URI(...) : URI | -| SanitizationTests.java:116:67:116:76 | unsafeUri9 : String | semmle.label | unsafeUri9 : String | -| SanitizationTests.java:117:25:117:32 | unsafer9 | semmle.label | unsafer9 | -| SanitizationTests.java:119:34:119:126 | format(...) : String | semmle.label | format(...) : String | -| SanitizationTests.java:119:34:119:126 | new ..[] { .. } : Object[] [[]] : String | semmle.label | new ..[] { .. } : Object[] [[]] : String | -| SanitizationTests.java:119:94:119:125 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| SanitizationTests.java:120:37:120:80 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | -| SanitizationTests.java:120:37:120:88 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | -| SanitizationTests.java:120:60:120:79 | new URI(...) | semmle.label | new URI(...) | -| SanitizationTests.java:120:60:120:79 | new URI(...) : URI | semmle.label | new URI(...) : URI | -| SanitizationTests.java:120:68:120:78 | unsafeUri10 : String | semmle.label | unsafeUri10 : String | -| SanitizationTests.java:121:25:121:33 | unsafer10 | semmle.label | unsafer10 | +| SanitizationTests.java:21:23:21:58 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:21:31:21:57 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:24:29:24:55 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:24:29:24:63 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:24:52:24:54 | uri | semmle.label | uri | +| SanitizationTests.java:24:52:24:54 | uri : URI | semmle.label | uri : URI | +| SanitizationTests.java:25:25:25:25 | r | semmle.label | r | +| SanitizationTests.java:77:33:77:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:78:36:78:78 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:78:36:78:86 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:78:59:78:77 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:78:59:78:77 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:78:67:78:76 | unsafeUri3 : String | semmle.label | unsafeUri3 : String | +| SanitizationTests.java:79:25:79:32 | unsafer3 | semmle.label | unsafer3 | +| SanitizationTests.java:81:49:81:79 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:82:36:82:78 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:82:36:82:86 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:82:59:82:77 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:82:59:82:77 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:82:67:82:76 | unsafeUri4 : String | semmle.label | unsafeUri4 : String | +| SanitizationTests.java:83:25:83:32 | unsafer4 | semmle.label | unsafer4 | +| SanitizationTests.java:86:13:86:22 | unsafeUri5 [post update] : StringBuilder | semmle.label | unsafeUri5 [post update] : StringBuilder | +| SanitizationTests.java:86:31:86:61 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:87:36:87:89 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:87:36:87:97 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:87:59:87:88 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:87:59:87:88 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:87:67:87:76 | unsafeUri5 : StringBuilder | semmle.label | unsafeUri5 : StringBuilder | +| SanitizationTests.java:87:67:87:87 | toString(...) : String | semmle.label | toString(...) : String | +| SanitizationTests.java:88:25:88:32 | unsafer5 | semmle.label | unsafer5 | +| SanitizationTests.java:90:40:90:87 | new StringBuilder(...) : StringBuilder | semmle.label | new StringBuilder(...) : StringBuilder | +| SanitizationTests.java:90:58:90:86 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:92:37:92:90 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:92:37:92:98 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:92:60:92:89 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:92:60:92:89 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:92:68:92:77 | unafeUri5a : StringBuilder | semmle.label | unafeUri5a : StringBuilder | +| SanitizationTests.java:92:68:92:88 | toString(...) : String | semmle.label | toString(...) : String | +| SanitizationTests.java:93:25:93:33 | unsafer5a | semmle.label | unsafer5a | +| SanitizationTests.java:95:41:95:105 | append(...) : StringBuilder | semmle.label | append(...) : StringBuilder | +| SanitizationTests.java:95:42:95:89 | new StringBuilder(...) : StringBuilder | semmle.label | new StringBuilder(...) : StringBuilder | +| SanitizationTests.java:95:60:95:88 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:97:37:97:91 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:97:37:97:99 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:97:60:97:90 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:97:60:97:90 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:97:68:97:78 | unsafeUri5b : StringBuilder | semmle.label | unsafeUri5b : StringBuilder | +| SanitizationTests.java:97:68:97:89 | toString(...) : String | semmle.label | toString(...) : String | +| SanitizationTests.java:98:25:98:33 | unsafer5b | semmle.label | unsafer5b | +| SanitizationTests.java:100:41:100:106 | append(...) : StringBuilder | semmle.label | append(...) : StringBuilder | +| SanitizationTests.java:100:77:100:105 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:102:37:102:91 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:102:37:102:99 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:102:60:102:90 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:102:60:102:90 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:102:68:102:78 | unsafeUri5c : StringBuilder | semmle.label | unsafeUri5c : StringBuilder | +| SanitizationTests.java:102:68:102:89 | toString(...) : String | semmle.label | toString(...) : String | +| SanitizationTests.java:103:25:103:33 | unsafer5c | semmle.label | unsafer5c | +| SanitizationTests.java:105:33:105:104 | format(...) : String | semmle.label | format(...) : String | +| SanitizationTests.java:105:33:105:104 | new ..[] { .. } : Object[] [[]] : String | semmle.label | new ..[] { .. } : Object[] [[]] : String | +| SanitizationTests.java:105:73:105:103 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:106:36:106:78 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:106:36:106:86 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:106:59:106:77 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:106:59:106:77 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:106:67:106:76 | unsafeUri6 : String | semmle.label | unsafeUri6 : String | +| SanitizationTests.java:107:25:107:32 | unsafer6 | semmle.label | unsafer6 | +| SanitizationTests.java:109:33:109:110 | format(...) : String | semmle.label | format(...) : String | +| SanitizationTests.java:109:33:109:110 | new ..[] { .. } : Object[] [[]] : String | semmle.label | new ..[] { .. } : Object[] [[]] : String | +| SanitizationTests.java:109:56:109:86 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:110:36:110:78 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:110:36:110:86 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:110:59:110:77 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:110:59:110:77 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:110:67:110:76 | unsafeUri7 : String | semmle.label | unsafeUri7 : String | +| SanitizationTests.java:111:25:111:32 | unsafer7 | semmle.label | unsafer7 | +| SanitizationTests.java:113:33:113:110 | format(...) : String | semmle.label | format(...) : String | +| SanitizationTests.java:113:33:113:110 | new ..[] { .. } : Object[] [[]] : String | semmle.label | new ..[] { .. } : Object[] [[]] : String | +| SanitizationTests.java:113:55:113:85 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:114:36:114:78 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:114:36:114:86 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:114:59:114:77 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:114:59:114:77 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:114:67:114:76 | unsafeUri8 : String | semmle.label | unsafeUri8 : String | +| SanitizationTests.java:115:25:115:32 | unsafer8 | semmle.label | unsafer8 | +| SanitizationTests.java:117:33:117:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:118:36:118:78 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:118:36:118:86 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:118:59:118:77 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:118:59:118:77 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:118:67:118:76 | unsafeUri9 : String | semmle.label | unsafeUri9 : String | +| SanitizationTests.java:119:25:119:32 | unsafer9 | semmle.label | unsafer9 | +| SanitizationTests.java:121:34:121:126 | format(...) : String | semmle.label | format(...) : String | +| SanitizationTests.java:121:34:121:126 | new ..[] { .. } : Object[] [[]] : String | semmle.label | new ..[] { .. } : Object[] [[]] : String | +| SanitizationTests.java:121:94:121:125 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:122:37:122:80 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:122:37:122:88 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:122:60:122:79 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:122:60:122:79 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:122:68:122:78 | unsafeUri10 : String | semmle.label | unsafeUri10 : String | +| SanitizationTests.java:123:25:123:33 | unsafer10 | semmle.label | unsafer10 | | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | semmle.label | getParameter(...) : String | | SpringSSRF.java:32:39:32:59 | ... + ... | semmle.label | ... + ... | | SpringSSRF.java:33:35:33:48 | fooResourceUrl | semmle.label | fooResourceUrl | diff --git a/java/ql/test/query-tests/security/CWE-918/SanitizationTests.java b/java/ql/test/query-tests/security/CWE-918/SanitizationTests.java index f32de324a1d..4da70e8dd75 100644 --- a/java/ql/test/query-tests/security/CWE-918/SanitizationTests.java +++ b/java/ql/test/query-tests/security/CWE-918/SanitizationTests.java @@ -2,6 +2,8 @@ import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; +import java.util.regex.Pattern; +import java.util.regex.Matcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; @@ -126,11 +128,25 @@ public class SanitizationTests extends HttpServlet { HttpRequest r10 = HttpRequest.newBuilder(new URI(param10)).build(); client.send(r10, null); } - + String param11 = request.getParameter("uri11"); validate(param11); HttpRequest r11 = HttpRequest.newBuilder(new URI(param11)).build(); client.send(r11, null); + + String param12 = request.getParameter("uri12"); + if (Pattern.matches("[a-zA-Z0-9_-]+", param12)) { + HttpRequest r12 = HttpRequest.newBuilder(new URI(param12)).build(); + client.send(r12, null); + } + + Pattern pattern = Pattern.compile("[a-zA-Z0-9_-]+"); + String param13 = request.getParameter("uri13"); + Matcher matcher = pattern.matcher(param13); + if (matcher.matches()) { + HttpRequest r13 = HttpRequest.newBuilder(new URI(param13)).build(); + client.send(r13, null); + } } catch (Exception e) { // TODO: handle exception } diff --git a/javascript/ql/lib/CHANGELOG.md b/javascript/ql/lib/CHANGELOG.md index 7ec6b99fd99..f9beb4db97c 100644 --- a/javascript/ql/lib/CHANGELOG.md +++ b/javascript/ql/lib/CHANGELOG.md @@ -1,3 +1,13 @@ +## 2.6.17 + +No user-facing changes. + +## 2.6.16 + +### Minor Analysis Improvements + +- JavaScript `DataFlow::globalVarRef` now recognizes `document.defaultView` as an alias of `window`, allowing flows such as `document.defaultView.history.pushState(...)` to be modeled and found by queries relying on `globalVarRef("history")`. + ## 2.6.15 No user-facing changes. diff --git a/javascript/ql/lib/change-notes/released/2.6.16.md b/javascript/ql/lib/change-notes/released/2.6.16.md new file mode 100644 index 00000000000..61f372759bf --- /dev/null +++ b/javascript/ql/lib/change-notes/released/2.6.16.md @@ -0,0 +1,5 @@ +## 2.6.16 + +### Minor Analysis Improvements + +- JavaScript `DataFlow::globalVarRef` now recognizes `document.defaultView` as an alias of `window`, allowing flows such as `document.defaultView.history.pushState(...)` to be modeled and found by queries relying on `globalVarRef("history")`. diff --git a/javascript/ql/lib/change-notes/released/2.6.17.md b/javascript/ql/lib/change-notes/released/2.6.17.md new file mode 100644 index 00000000000..b421ccb0379 --- /dev/null +++ b/javascript/ql/lib/change-notes/released/2.6.17.md @@ -0,0 +1,3 @@ +## 2.6.17 + +No user-facing changes. diff --git a/javascript/ql/lib/codeql-pack.release.yml b/javascript/ql/lib/codeql-pack.release.yml index cafb64b8792..93b62e82ca2 100644 --- a/javascript/ql/lib/codeql-pack.release.yml +++ b/javascript/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.6.15 +lastReleaseVersion: 2.6.17 diff --git a/javascript/ql/lib/qlpack.yml b/javascript/ql/lib/qlpack.yml index b0c7e2e1e12..f70791d9d73 100644 --- a/javascript/ql/lib/qlpack.yml +++ b/javascript/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/javascript-all -version: 2.6.16-dev +version: 2.6.18-dev groups: javascript dbscheme: semmlecode.javascript.dbscheme extractor: javascript diff --git a/javascript/ql/lib/semmle/javascript/ES2015Modules.qll b/javascript/ql/lib/semmle/javascript/ES2015Modules.qll index 6eee9ea56e5..9f37e3082b8 100644 --- a/javascript/ql/lib/semmle/javascript/ES2015Modules.qll +++ b/javascript/ql/lib/semmle/javascript/ES2015Modules.qll @@ -345,7 +345,17 @@ abstract class ExportDeclaration extends Stmt, @export_declaration { /** Holds if this export declaration exports variable `v` under the name `name`. */ overlay[global] - abstract predicate exportsAs(LexicalName v, string name); + final predicate exportsAs(LexicalName v, string name) { + this.exportsDirectlyAs(v, name) + or + this.(ReExportDeclaration).reExportsAs(v, name) + } + + /** + * Holds if this export declaration exports variable `v` under the name `name`, + * not counting re-exports. + */ + predicate exportsDirectlyAs(LexicalName v, string name) { none() } /** * Gets the data flow node corresponding to the value this declaration exports @@ -369,7 +379,17 @@ abstract class ExportDeclaration extends Stmt, @export_declaration { * to module `a` or possibly to some other module from which `a` re-exports. */ overlay[global] - abstract DataFlow::Node getSourceNode(string name); + final DataFlow::Node getSourceNode(string name) { + result = this.getDirectSourceNode(name) + or + result = this.(ReExportDeclaration).getReExportedSourceNode(name) + } + + /** + * Gets the data flow node corresponding to the value this declaration exports + * under the name `name`, not including sources that come from a re-export. + */ + DataFlow::Node getDirectSourceNode(string name) { none() } /** Holds if is declared with the `type` keyword, so only types are exported. */ predicate isTypeOnly() { has_type_keyword(this) } @@ -421,20 +441,20 @@ class BulkReExportDeclaration extends ReExportDeclaration, @export_all_declarati override ConstantString getImportedPath() { result = this.getChildExpr(0) } overlay[global] - override predicate exportsAs(LexicalName v, string name) { + override predicate reExportsAs(LexicalName v, string name) { this.getReExportedES2015Module().exportsAs(v, name) and - not isShadowedFromBulkExport(this, name) + not isShadowedFromBulkExport(this.getEnclosingModule(), name) } overlay[global] - override DataFlow::Node getSourceNode(string name) { + override DataFlow::Node getReExportedSourceNode(string name) { result = this.getReExportedES2015Module().getAnExport().getSourceNode(name) } } /** - * Holds if the given bulk export `reExport` should not re-export `name` because there is an explicit export - * of that name in the same module. + * Holds if bulk re-exports in `mod` should not re-export `name` because there is an explicit export + * of that name in `mod`. * * At compile time, shadowing works across declaration spaces. * For instance, directly exporting an interface `X` will block a variable `X` from being re-exported: @@ -446,8 +466,8 @@ class BulkReExportDeclaration extends ReExportDeclaration, @export_all_declarati * but we ignore this subtlety. */ overlay[global] -private predicate isShadowedFromBulkExport(BulkReExportDeclaration reExport, string name) { - exists(ExportNamedDeclaration other | other.getTopLevel() = reExport.getEnclosingModule() | +private predicate isShadowedFromBulkExport(Module mod, string name) { + exists(ExportNamedDeclaration other | other.getTopLevel() = mod | other.getAnExportedDecl().getName() = name or other.getASpecifier().getExportedName() = name @@ -468,8 +488,7 @@ class ExportDefaultDeclaration extends ExportDeclaration, @export_default_declar /** Gets the operand statement or expression that is exported by this declaration. */ ExprOrStmt getOperand() { result = this.getChild(0) } - overlay[global] - override predicate exportsAs(LexicalName v, string name) { + override predicate exportsDirectlyAs(LexicalName v, string name) { name = "default" and v = this.getADecl().getVariable() } @@ -481,8 +500,7 @@ class ExportDefaultDeclaration extends ExportDeclaration, @export_default_declar ) } - overlay[global] - override DataFlow::Node getSourceNode(string name) { + override DataFlow::Node getDirectSourceNode(string name) { name = "default" and result = DataFlow::valueNode(this.getOperand()) } } @@ -524,21 +542,20 @@ class ExportNamedDeclaration extends ExportDeclaration, @export_named_declaratio /** Gets the variable declaration, if any, exported by this named export. */ VarDecl getADecl() { result = this.getAnExportedDecl() } - overlay[global] - override predicate exportsAs(LexicalName v, string name) { - exists(LexicalDecl vd | vd = this.getAnExportedDecl() | - name = vd.getName() and v = vd.getALexicalName() - ) - or - exists(ExportSpecifier spec | spec = this.getASpecifier() and name = spec.getExportedName() | - v = spec.getLocal().(LexicalAccess).getALexicalName() + override predicate exportsDirectlyAs(LexicalName v, string name) { + ( + exists(LexicalDecl vd | vd = this.getAnExportedDecl() | + name = vd.getName() and v = vd.getALexicalName() + ) or - this.(ReExportDeclaration).getReExportedES2015Module().exportsAs(v, spec.getLocalName()) - ) + exists(ExportSpecifier spec | spec = this.getASpecifier() and name = spec.getExportedName() | + v = spec.getLocal().(LexicalAccess).getALexicalName() + ) + ) and + not (this.isTypeOnly() and v instanceof Variable) } - overlay[global] - override DataFlow::Node getSourceNode(string name) { + override DataFlow::Node getDirectSourceNode(string name) { exists(VarDef d | d.getTarget() = this.getADecl() | name = d.getTarget().(VarDecl).getName() and result = DataFlow::valueNode(d.getSource()) @@ -554,12 +571,11 @@ class ExportNamedDeclaration extends ExportDeclaration, @export_named_declaratio exists(ExportSpecifier spec | spec = this.getASpecifier() and name = spec.getExportedName() | not exists(this.getImportedPath()) and result = DataFlow::valueNode(spec.getLocal()) or - exists(ReExportDeclaration red | red = this | - result = red.getReExportedES2015Module().getAnExport().getSourceNode(spec.getLocalName()) - or - spec instanceof ExportNamespaceSpecifier and - result = DataFlow::valueNode(spec) - ) + // For `export * as B from ".."`, we use the ExportNamespaceSpecifier as a representative for the + // object that gets exposed as `B`. + this instanceof ReExportDeclaration and + spec instanceof ExportNamespaceSpecifier and + result = DataFlow::valueNode(spec) ) } @@ -587,19 +603,6 @@ private class ExportNamespaceStep extends PreCallGraphStep { } } -/** - * An export declaration with the `type` modifier. - */ -private class TypeOnlyExportDeclaration extends ExportNamedDeclaration { - TypeOnlyExportDeclaration() { this.isTypeOnly() } - - overlay[global] - override predicate exportsAs(LexicalName v, string name) { - super.exportsAs(v, name) and - not v instanceof Variable - } -} - /** * An export specifier in an export declaration. * @@ -777,6 +780,20 @@ abstract class ReExportDeclaration extends ExportDeclaration { Stages::Imports::ref() and result.getFile() = ImportPathResolver::resolveExpr(this.getImportedPath()) } + + /** + * Holds if this re-export declaration ultimately re-exports `v` (from another module) + * under the given `name`. + */ + overlay[global] + abstract predicate reExportsAs(LexicalName v, string name); + + /** + * Gets the data flow node (from another module) corresponding to the value that is re-exported + * under the name `name`. + */ + overlay[global] + abstract DataFlow::Node getReExportedSourceNode(string name); } /** A literal path expression appearing in a re-export declaration. */ @@ -803,6 +820,21 @@ class SelectiveReExportDeclaration extends ReExportDeclaration, ExportNamedDecla override ConstantString getImportedPath() { result = ExportNamedDeclaration.super.getImportedPath() } + + overlay[global] + override predicate reExportsAs(LexicalName v, string name) { + exists(ExportSpecifier spec | spec = this.getASpecifier() and name = spec.getExportedName() | + this.getReExportedES2015Module().exportsAs(v, spec.getLocalName()) + ) and + not (this.isTypeOnly() and v instanceof Variable) + } + + overlay[global] + override DataFlow::Node getReExportedSourceNode(string name) { + exists(ExportSpecifier spec | spec = this.getASpecifier() and name = spec.getExportedName() | + result = this.getReExportedES2015Module().getAnExport().getSourceNode(spec.getLocalName()) + ) + } } /** @@ -819,16 +851,4 @@ class SelectiveReExportDeclaration extends ReExportDeclaration, ExportNamedDecla */ class OriginalExportDeclaration extends ExportDeclaration { OriginalExportDeclaration() { not this instanceof ReExportDeclaration } - - overlay[global] - override predicate exportsAs(LexicalName v, string name) { - this.(ExportDefaultDeclaration).exportsAs(v, name) or - this.(ExportNamedDeclaration).exportsAs(v, name) - } - - overlay[global] - override DataFlow::Node getSourceNode(string name) { - result = this.(ExportDefaultDeclaration).getSourceNode(name) or - result = this.(ExportNamedDeclaration).getSourceNode(name) - } } diff --git a/javascript/ql/lib/semmle/javascript/dataflow/Nodes.qll b/javascript/ql/lib/semmle/javascript/dataflow/Nodes.qll index d4244ec3cbc..aa12cfe1864 100644 --- a/javascript/ql/lib/semmle/javascript/dataflow/Nodes.qll +++ b/javascript/ql/lib/semmle/javascript/dataflow/Nodes.qll @@ -393,6 +393,9 @@ DataFlow::SourceNode globalObjectRef() { // DOM result = globalVariable("window") or + // DOM alias via `document.defaultView` + result = globalVariable("document").getAPropertyRead("defaultView") + or // Node.js result = globalVariable("global") or diff --git a/javascript/ql/lib/semmle/javascript/frameworks/Next.qll b/javascript/ql/lib/semmle/javascript/frameworks/Next.qll index 551d325f26a..a65fcdce44d 100644 --- a/javascript/ql/lib/semmle/javascript/frameworks/Next.qll +++ b/javascript/ql/lib/semmle/javascript/frameworks/Next.qll @@ -13,12 +13,31 @@ module NextJS { */ PackageJson getANextPackage() { result.getDependencies().getADependency("next", _) } + bindingset[base, name] + pragma[inline_late] + private Folder getOptionalFolder(Folder base, string name) { + result = base.getFolder(name) + or + not exists(base.getFolder(name)) and + result = base + } + + private Folder packageRoot() { result = getANextPackage().getFile().getParentContainer() } + + private Folder srcRoot() { result = getOptionalFolder(packageRoot(), "src") } + + private Folder appRoot() { result = srcRoot().getFolder("app") } + + private Folder pagesRoot() { result = [srcRoot(), appRoot()].getFolder("pages") } + + private Folder apiRoot() { result = [pagesRoot(), appRoot()].getFolder("api") } + /** * Gets a "pages" folder in a `Next.js` application. * JavaScript files inside these folders are mapped to routes. */ Folder getAPagesFolder() { - result = getANextPackage().getFile().getParentContainer().getFolder("pages") + result = pagesRoot() or result = getAPagesFolder().getAFolder() } @@ -217,8 +236,7 @@ module NextJS { * the App Router (`app/api/`) Next.js 13+ structures. */ Folder apiFolder() { - result = - getANextPackage().getFile().getParentContainer().getFolder(["pages", "app"]).getFolder("api") or + result = apiRoot() or result = apiFolder().getAFolder() } diff --git a/javascript/ql/lib/semmle/javascript/internal/Overlay.qll b/javascript/ql/lib/semmle/javascript/internal/Overlay.qll index efba0daeca7..d1ca1f2b0da 100644 --- a/javascript/ql/lib/semmle/javascript/internal/Overlay.qll +++ b/javascript/ql/lib/semmle/javascript/internal/Overlay.qll @@ -1,4 +1,5 @@ private import javascript +private import OverlayXml /** Holds if the database is an overlay. */ overlay[local] @@ -12,8 +13,6 @@ private string getFileFromEntity(@locatable node) { json_locations(node, loc) or yaml_locations(node, loc) - or - xmllocations(node, loc) | result = getFileFromLocation(loc) ) diff --git a/javascript/ql/lib/semmle/javascript/internal/OverlayXml.qll b/javascript/ql/lib/semmle/javascript/internal/OverlayXml.qll new file mode 100644 index 00000000000..95d49f2d611 --- /dev/null +++ b/javascript/ql/lib/semmle/javascript/internal/OverlayXml.qll @@ -0,0 +1,46 @@ +overlay[local] +module; + +/** + * A local predicate that always holds for the overlay variant and never holds for the base variant. + * This is used to define local predicates that behave differently for the base and overlay variant. + */ +private predicate isOverlay() { databaseMetadata("isOverlay", "true") } + +private string getXmlFile(@xmllocatable locatable) { + exists(@location_default location, @file file | xmllocations(locatable, location) | + locations_default(location, file, _, _, _, _) and + files(file, result) + ) +} + +private string getXmlFileInBase(@xmllocatable locatable) { + not isOverlay() and + result = getXmlFile(locatable) +} + +/** + * Holds if the given `file` was extracted as part of the overlay and was extracted by the HTML/XML + * extractor. + */ +private predicate overlayXmlExtracted(string file) { + isOverlay() and + exists(@xmllocatable locatable | + not files(locatable, _) and not xmlNs(locatable, _, _, _) and file = getXmlFile(locatable) + ) +} + +/** + * Holds if the given XML `locatable` should be discarded, because it is part of the overlay base + * and is in a file that was also extracted as part of the overlay database. + */ +overlay[discard_entity] +private predicate discardXmlLocatable(@xmllocatable locatable) { + exists(string file | file = getXmlFileInBase(locatable) | + overlayChangedFiles(file) + or + // The HTML/XML extractor is currently not incremental and may extract more files than those + // included in overlayChangedFiles. + overlayXmlExtracted(file) + ) +} diff --git a/javascript/ql/lib/semmle/javascript/security/dataflow/ExternalAPIUsedWithUntrustedDataQuery.qll b/javascript/ql/lib/semmle/javascript/security/dataflow/ExternalAPIUsedWithUntrustedDataQuery.qll index 7972c379e87..7a936044756 100644 --- a/javascript/ql/lib/semmle/javascript/security/dataflow/ExternalAPIUsedWithUntrustedDataQuery.qll +++ b/javascript/ql/lib/semmle/javascript/security/dataflow/ExternalAPIUsedWithUntrustedDataQuery.qll @@ -97,7 +97,7 @@ class ExternalApiDataNode extends DataFlow::Node instanceof Sink { } /** A node representing untrusted data being passed to an external API. */ class UntrustedExternalApiDataNode extends ExternalApiDataNode { - UntrustedExternalApiDataNode() { ExternalAPIUsedWithUntrustedDataFlow::flow(_, this) } + UntrustedExternalApiDataNode() { ExternalAPIUsedWithUntrustedDataFlow::flowTo(this) } /** Gets a source of untrusted data which is passed to this external API data node. */ DataFlow::Node getAnUntrustedSource() { ExternalAPIUsedWithUntrustedDataFlow::flow(result, this) } @@ -110,7 +110,7 @@ private newtype TExternalApi = /** An external API sink with `name`. */ MkExternalApiNode(string name) { exists(Sink sink | - ExternalAPIUsedWithUntrustedDataFlow::flow(_, sink) and + ExternalAPIUsedWithUntrustedDataFlow::flowTo(sink) and name = sink.getApiName() ) } diff --git a/javascript/ql/src/CHANGELOG.md b/javascript/ql/src/CHANGELOG.md index f52156dc1b9..166ee6e7c29 100644 --- a/javascript/ql/src/CHANGELOG.md +++ b/javascript/ql/src/CHANGELOG.md @@ -1,3 +1,13 @@ +## 2.2.2 + +No user-facing changes. + +## 2.2.1 + +### Minor Analysis Improvements + +* Fixed a bug in the Next.js model that would cause the analysis to miss server-side taint sources in the `app/pages` folder. + ## 2.2.0 ### Query Metadata Changes diff --git a/javascript/ql/src/change-notes/released/2.2.1.md b/javascript/ql/src/change-notes/released/2.2.1.md new file mode 100644 index 00000000000..b4bd337fd49 --- /dev/null +++ b/javascript/ql/src/change-notes/released/2.2.1.md @@ -0,0 +1,5 @@ +## 2.2.1 + +### Minor Analysis Improvements + +* Fixed a bug in the Next.js model that would cause the analysis to miss server-side taint sources in the `app/pages` folder. diff --git a/javascript/ql/src/change-notes/released/2.2.2.md b/javascript/ql/src/change-notes/released/2.2.2.md new file mode 100644 index 00000000000..807fd2a0fba --- /dev/null +++ b/javascript/ql/src/change-notes/released/2.2.2.md @@ -0,0 +1,3 @@ +## 2.2.2 + +No user-facing changes. diff --git a/javascript/ql/src/codeql-pack.release.yml b/javascript/ql/src/codeql-pack.release.yml index 2f308354195..31b4d2fab76 100644 --- a/javascript/ql/src/codeql-pack.release.yml +++ b/javascript/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.2.0 +lastReleaseVersion: 2.2.2 diff --git a/javascript/ql/src/experimental/Security/CWE-347/decodeJwtWithoutVerification.ql b/javascript/ql/src/experimental/Security/CWE-347/decodeJwtWithoutVerification.ql index 429744bbbd1..259d27227a3 100644 --- a/javascript/ql/src/experimental/Security/CWE-347/decodeJwtWithoutVerification.ql +++ b/javascript/ql/src/experimental/Security/CWE-347/decodeJwtWithoutVerification.ql @@ -36,6 +36,6 @@ import UnverifiedDecodeFlow::PathGraph from UnverifiedDecodeFlow::PathNode source, UnverifiedDecodeFlow::PathNode sink where UnverifiedDecodeFlow::flowPath(source, sink) and - not VerifiedDecodeFlow::flow(source.getNode(), _) + not VerifiedDecodeFlow::flowFrom(source.getNode()) select source.getNode(), source, sink, "Decoding JWT $@.", sink.getNode(), "without signature verification" diff --git a/javascript/ql/src/qlpack.yml b/javascript/ql/src/qlpack.yml index 3716fa82c2f..a655acffcf9 100644 --- a/javascript/ql/src/qlpack.yml +++ b/javascript/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/javascript-queries -version: 2.2.1-dev +version: 2.2.3-dev groups: - javascript - queries diff --git a/javascript/ql/test/library-tests/FlowSummary/test.ql b/javascript/ql/test/library-tests/FlowSummary/test.ql index 0e40dcdadb0..147908706c8 100644 --- a/javascript/ql/test/library-tests/FlowSummary/test.ql +++ b/javascript/ql/test/library-tests/FlowSummary/test.ql @@ -32,5 +32,5 @@ class BasicBarrierGuard extends DataFlow::CallNode { deprecated class ConsistencyConfig extends ConsistencyConfiguration { ConsistencyConfig() { this = "ConsistencyConfig" } - override DataFlow::Node getAnAlert() { Flow::flow(_, result) } + override DataFlow::Node getAnAlert() { Flow::flowTo(result) } } diff --git a/javascript/ql/test/library-tests/Nodes/globalObjectRef.expected b/javascript/ql/test/library-tests/Nodes/globalObjectRef.expected index 0c35fe87b26..d3a779eb597 100644 --- a/javascript/ql/test/library-tests/Nodes/globalObjectRef.expected +++ b/javascript/ql/test/library-tests/Nodes/globalObjectRef.expected @@ -5,9 +5,12 @@ | tst2.js:8:1:8:6 | global | | tst3.js:1:1:1:0 | this | | tst3.js:3:9:3:19 | goog.global | +| tst4.js:1:1:1:0 | this | +| tst4.js:1:1:1:38 | require ... ultView | | tst.js:1:1:1:0 | this | | tst.js:1:1:1:6 | window | | tst.js:3:1:3:6 | window | | tst.js:4:1:4:6 | window | | tst.js:5:1:5:4 | self | | tst.js:6:1:6:10 | globalThis | +| tst.js:7:1:7:20 | document.defaultView | diff --git a/javascript/ql/test/library-tests/Nodes/globalVarRef.expected b/javascript/ql/test/library-tests/Nodes/globalVarRef.expected index 507e099b80a..48d912d3aa7 100644 --- a/javascript/ql/test/library-tests/Nodes/globalVarRef.expected +++ b/javascript/ql/test/library-tests/Nodes/globalVarRef.expected @@ -1,15 +1,19 @@ | Object | tst2.js:8:1:8:13 | global.Object | | String | tst2.js:9:1:9:11 | this.String | | document | tst2.js:2:1:2:26 | require ... ument") | +| document | tst4.js:1:1:1:26 | require ... ument") | | document | tst.js:3:1:3:15 | window.document | | document | tst.js:5:1:5:13 | self.document | | document | tst.js:6:1:6:19 | globalThis.document | +| document | tst.js:7:1:7:8 | document | | foo | tst3.js:4:1:4:5 | w.foo | | global | tst2.js:7:1:7:6 | global | | global | tst2.js:8:1:8:6 | global | | globalThis | tst.js:6:1:6:10 | globalThis | | goog | tst3.js:1:1:1:4 | goog | | goog | tst3.js:3:9:3:12 | goog | +| history | tst4.js:1:1:1:46 | require ... history | +| history | tst.js:7:1:7:28 | documen ... history | | self | tst.js:5:1:5:4 | self | | setTimeout | tst2.js:5:1:5:12 | g.setTimeout | | window | tst2.js:3:1:3:24 | require ... indow") | diff --git a/javascript/ql/test/library-tests/Nodes/tst.js b/javascript/ql/test/library-tests/Nodes/tst.js index ec660b25580..395309672d3 100644 --- a/javascript/ql/test/library-tests/Nodes/tst.js +++ b/javascript/ql/test/library-tests/Nodes/tst.js @@ -4,3 +4,4 @@ window.document; window.window.document; self.document; globalThis.document; +document.defaultView.history; diff --git a/javascript/ql/test/library-tests/Nodes/tst4.js b/javascript/ql/test/library-tests/Nodes/tst4.js new file mode 100644 index 00000000000..087a780629e --- /dev/null +++ b/javascript/ql/test/library-tests/Nodes/tst4.js @@ -0,0 +1 @@ +require("global/document").defaultView.history; diff --git a/javascript/ql/test/query-tests/Security/CWE-079/ReflectedXss/ReflectedXss.expected b/javascript/ql/test/query-tests/Security/CWE-079/ReflectedXss/ReflectedXss.expected index e536364f805..b488018d09d 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/ReflectedXss/ReflectedXss.expected +++ b/javascript/ql/test/query-tests/Security/CWE-079/ReflectedXss/ReflectedXss.expected @@ -35,6 +35,8 @@ | app/api/routeNextRequest.ts:15:20:15:23 | body | app/api/routeNextRequest.ts:4:22:4:31 | req.json() | app/api/routeNextRequest.ts:15:20:15:23 | body | Cross-site scripting vulnerability due to a $@. | app/api/routeNextRequest.ts:4:22:4:31 | req.json() | user-provided value | | app/api/routeNextRequest.ts:27:20:27:23 | body | app/api/routeNextRequest.ts:4:22:4:31 | req.json() | app/api/routeNextRequest.ts:27:20:27:23 | body | Cross-site scripting vulnerability due to a $@. | app/api/routeNextRequest.ts:4:22:4:31 | req.json() | user-provided value | | app/api/routeNextRequest.ts:31:27:31:30 | body | app/api/routeNextRequest.ts:4:22:4:31 | req.json() | app/api/routeNextRequest.ts:31:27:31:30 | body | Cross-site scripting vulnerability due to a $@. | app/api/routeNextRequest.ts:4:22:4:31 | req.json() | user-provided value | +| app/pages/Next2.jsx:8:13:8:19 | req.url | app/pages/Next2.jsx:8:13:8:19 | req.url | app/pages/Next2.jsx:8:13:8:19 | req.url | Cross-site scripting vulnerability due to a $@. | app/pages/Next2.jsx:8:13:8:19 | req.url | user-provided value | +| app/pages/Next2.jsx:15:13:15:19 | req.url | app/pages/Next2.jsx:15:13:15:19 | req.url | app/pages/Next2.jsx:15:13:15:19 | req.url | Cross-site scripting vulnerability due to a $@. | app/pages/Next2.jsx:15:13:15:19 | req.url | user-provided value | | etherpad.js:11:12:11:19 | response | etherpad.js:9:16:9:30 | req.query.jsonp | etherpad.js:11:12:11:19 | response | Cross-site scripting vulnerability due to a $@. | etherpad.js:9:16:9:30 | req.query.jsonp | user-provided value | | formatting.js:6:14:6:47 | util.fo ... , evil) | formatting.js:4:16:4:29 | req.query.evil | formatting.js:6:14:6:47 | util.fo ... , evil) | Cross-site scripting vulnerability due to a $@. | formatting.js:4:16:4:29 | req.query.evil | user-provided value | | formatting.js:7:14:7:53 | require ... , evil) | formatting.js:4:16:4:29 | req.query.evil | formatting.js:7:14:7:53 | require ... , evil) | Cross-site scripting vulnerability due to a $@. | formatting.js:4:16:4:29 | req.query.evil | user-provided value | @@ -365,6 +367,8 @@ nodes | app/api/routeNextRequest.ts:15:20:15:23 | body | semmle.label | body | | app/api/routeNextRequest.ts:27:20:27:23 | body | semmle.label | body | | app/api/routeNextRequest.ts:31:27:31:30 | body | semmle.label | body | +| app/pages/Next2.jsx:8:13:8:19 | req.url | semmle.label | req.url | +| app/pages/Next2.jsx:15:13:15:19 | req.url | semmle.label | req.url | | etherpad.js:9:5:9:12 | response | semmle.label | response | | etherpad.js:9:16:9:30 | req.query.jsonp | semmle.label | req.query.jsonp | | etherpad.js:11:12:11:19 | response | semmle.label | response | diff --git a/javascript/ql/test/query-tests/Security/CWE-079/ReflectedXss/ReflectedXssWithCustomSanitizer.expected b/javascript/ql/test/query-tests/Security/CWE-079/ReflectedXss/ReflectedXssWithCustomSanitizer.expected index a4b02fa0749..2dceb5fa807 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/ReflectedXss/ReflectedXssWithCustomSanitizer.expected +++ b/javascript/ql/test/query-tests/Security/CWE-079/ReflectedXss/ReflectedXssWithCustomSanitizer.expected @@ -34,6 +34,8 @@ | app/api/routeNextRequest.ts:15:20:15:23 | body | Cross-site scripting vulnerability due to $@. | app/api/routeNextRequest.ts:4:22:4:31 | req.json() | user-provided value | | app/api/routeNextRequest.ts:27:20:27:23 | body | Cross-site scripting vulnerability due to $@. | app/api/routeNextRequest.ts:4:22:4:31 | req.json() | user-provided value | | app/api/routeNextRequest.ts:31:27:31:30 | body | Cross-site scripting vulnerability due to $@. | app/api/routeNextRequest.ts:4:22:4:31 | req.json() | user-provided value | +| app/pages/Next2.jsx:8:13:8:19 | req.url | Cross-site scripting vulnerability due to $@. | app/pages/Next2.jsx:8:13:8:19 | req.url | user-provided value | +| app/pages/Next2.jsx:15:13:15:19 | req.url | Cross-site scripting vulnerability due to $@. | app/pages/Next2.jsx:15:13:15:19 | req.url | user-provided value | | formatting.js:6:14:6:47 | util.fo ... , evil) | Cross-site scripting vulnerability due to $@. | formatting.js:4:16:4:29 | req.query.evil | user-provided value | | formatting.js:7:14:7:53 | require ... , evil) | Cross-site scripting vulnerability due to $@. | formatting.js:4:16:4:29 | req.query.evil | user-provided value | | live-server.js:6:13:6:50 | ` ... /html>` | Cross-site scripting vulnerability due to $@. | live-server.js:4:21:4:27 | req.url | user-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-079/ReflectedXss/app/pages/Next2.jsx b/javascript/ql/test/query-tests/Security/CWE-079/ReflectedXss/app/pages/Next2.jsx new file mode 100644 index 00000000000..d6c2232e957 --- /dev/null +++ b/javascript/ql/test/query-tests/Security/CWE-079/ReflectedXss/app/pages/Next2.jsx @@ -0,0 +1,19 @@ +export default function Post() { + return ; +} + +Post.getInitialProps = async (ctx) => { + const req = ctx.req; + const res = ctx.res; + res.end(req.url); // $ Alert + return {} +} + +export async function getServerSideProps(ctx) { + const req = ctx.req; + const res = ctx.res; + res.end(req.url); // $ Alert + return { + props: {} + } +} \ No newline at end of file diff --git a/javascript/ql/test/tutorials/Introducing the JavaScript libraries/query17.qll b/javascript/ql/test/tutorials/Introducing the JavaScript libraries/query17.qll index e6dff623e97..e0a5ac34a91 100644 --- a/javascript/ql/test/tutorials/Introducing the JavaScript libraries/query17.qll +++ b/javascript/ql/test/tutorials/Introducing the JavaScript libraries/query17.qll @@ -14,7 +14,7 @@ predicate passwordVarAssign(Variable v, DataFlow::Node nd) { module PasswordFlow = DataFlow::Global; query predicate test_query17(DataFlow::Node sink, string res) { - exists(Variable v | PasswordFlow::flow(_, sink) and passwordVarAssign(v, sink) | + exists(Variable v | PasswordFlow::flowTo(sink) and passwordVarAssign(v, sink) | res = "Password variable " + v.toString() + " is assigned a constant string." ) } diff --git a/misc/bazel/registry/fix.py b/misc/bazel/registry/fix.py index a2b947e19e2..863c832be59 100755 --- a/misc/bazel/registry/fix.py +++ b/misc/bazel/registry/fix.py @@ -35,6 +35,9 @@ def patch_json(file, **kwargs): def update(data): data = json.loads(data) if data else {} data.update(kwargs) + for k, v in kwargs.items(): + if v is None: + data.pop(k) return json.dumps(data, indent=4) + "\n" patch_file(file, update) @@ -48,8 +51,21 @@ for entry in this_dir.joinpath("modules").iterdir(): patch_json(entry / "metadata.json", versions=[v.name for v in versions]) for version in versions: - patch_json(version / "source.json", patches={ - p.name: sha256(p) for p in version.joinpath("patches").iterdir() - }) - patch_file(version / "MODULE.bazel", - lambda s: re.sub(r'''version\s*=\s*['"].*['"]''', f'version = "{version.name}"', s, 1)) + patches = version.joinpath("patches") + overlay = version.joinpath("overlay") + modules = [version / "MODULE.bazel", overlay / "MODULE.bazel"] + for module in modules: + if module.is_file(): + patch_file( + module, + lambda s: re.sub(r'''version\s*=\s*['"].*['"]''', f'version = "{version.name}"', s, 1)) + patch_json( + version / "source.json", + patches={ + p.name: sha256(p) for p in patches.iterdir() + } if patches.is_dir() else None, + patch_strip=1 if patches.is_dir() else None, + overlay={ + o.name: sha256(o) for o in overlay.iterdir() + } if overlay.is_dir() else None, + ) diff --git a/misc/bazel/registry/modules/fmt/12.1.0-codeql.1/MODULE.bazel b/misc/bazel/registry/modules/fmt/12.1.0-codeql.1/MODULE.bazel new file mode 100644 index 00000000000..898d1bed0fc --- /dev/null +++ b/misc/bazel/registry/modules/fmt/12.1.0-codeql.1/MODULE.bazel @@ -0,0 +1,9 @@ +module( + name = "fmt", + version = "12.1.0-codeql.1", + bazel_compatibility = [">=7.2.1"], + compatibility_level = 10, +) + +bazel_dep(name = "rules_cc", version = "0.2.13") +bazel_dep(name = "rules_license", version = "1.0.0") diff --git a/misc/bazel/registry/modules/fmt/12.1.0-codeql.1/overlay/BUILD.bazel b/misc/bazel/registry/modules/fmt/12.1.0-codeql.1/overlay/BUILD.bazel new file mode 100644 index 00000000000..bde3d4a3d31 --- /dev/null +++ b/misc/bazel/registry/modules/fmt/12.1.0-codeql.1/overlay/BUILD.bazel @@ -0,0 +1,40 @@ +load("@rules_cc//cc:cc_library.bzl", "cc_library") +load("@rules_license//rules:license.bzl", "license") + +package( + default_applicable_licenses = [":license"], +) + +exports_files([ + "LICENSE", +]) + +license( + name = "license", + license_kinds = ["@rules_license//licenses/spdx:MIT"], + license_text = "LICENSE", +) + +cc_library( + name = "fmt", + srcs = [ + #"src/fmt.cc", # No C++ module support, yet in Bazel (https://github.com/bazelbuild/bazel/pull/19940) + "src/format.cc", + "src/os.cc", + ], + hdrs = glob([ + "include/fmt/*.h", + ]), + # codeql change: disable UTF8 support, it's causing issues on Windows + # copts = select({ + # "@rules_cc//cc/compiler:msvc-cl": ["/utf-8"], + # "//conditions:default": [], + # }), + defines = select({ + "@rules_cc//cc/compiler:msvc-cl": ["FMT_UNICODE=0"], + "//conditions:default": [], + }), + includes = ["include"], + strip_include_prefix = "include", # workaround: only needed on some macOS systems (see https://github.com/bazelbuild/bazel-central-registry/issues/1537) + visibility = ["//visibility:public"], +) diff --git a/misc/bazel/registry/modules/fmt/12.1.0-codeql.1/overlay/MODULE.bazel b/misc/bazel/registry/modules/fmt/12.1.0-codeql.1/overlay/MODULE.bazel new file mode 100644 index 00000000000..898d1bed0fc --- /dev/null +++ b/misc/bazel/registry/modules/fmt/12.1.0-codeql.1/overlay/MODULE.bazel @@ -0,0 +1,9 @@ +module( + name = "fmt", + version = "12.1.0-codeql.1", + bazel_compatibility = [">=7.2.1"], + compatibility_level = 10, +) + +bazel_dep(name = "rules_cc", version = "0.2.13") +bazel_dep(name = "rules_license", version = "1.0.0") diff --git a/misc/bazel/registry/modules/fmt/12.1.0-codeql.1/source.json b/misc/bazel/registry/modules/fmt/12.1.0-codeql.1/source.json new file mode 100644 index 00000000000..91a417baba5 --- /dev/null +++ b/misc/bazel/registry/modules/fmt/12.1.0-codeql.1/source.json @@ -0,0 +1,9 @@ +{ + "url": "https://github.com/fmtlib/fmt/releases/download/12.1.0/fmt-12.1.0.zip", + "integrity": "sha256-aV/Rl/pa/4/Ge18rvBEEkKh1zfekFoashRL7SA+orac=", + "strip_prefix": "fmt-12.1.0", + "overlay": { + "BUILD.bazel": "sha256-T6CBBdPY92Iloq9NrMjm9kQeQA3nTZJeym6xG5cclOQ=", + "MODULE.bazel": "sha256-Dgke/2OMsffv9jPSDxIwIgJIb4L77VW6lR8TsNHsekg=" + } +} diff --git a/misc/bazel/registry/modules/fmt/metadata.json b/misc/bazel/registry/modules/fmt/metadata.json new file mode 100644 index 00000000000..ca5dd486153 --- /dev/null +++ b/misc/bazel/registry/modules/fmt/metadata.json @@ -0,0 +1,22 @@ +{ + "homepage": "https://github.com/fmtlib/fmt", + "maintainers": [ + { + "email": "julian.amann@tum.de", + "github": "Vertexwahn", + "github_user_id": 3775001, + "name": "Julian Amann" + }, + { + "github": "mering", + "github_user_id": 133344217 + } + ], + "repository": [ + "github:fmtlib/fmt" + ], + "versions": [ + "12.1.0-codeql.1" + ], + "yanked_versions": {} +} diff --git a/misc/suite-helpers/CHANGELOG.md b/misc/suite-helpers/CHANGELOG.md index b273c2953fd..26ed76e0015 100644 --- a/misc/suite-helpers/CHANGELOG.md +++ b/misc/suite-helpers/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.0.37 + +No user-facing changes. + +## 1.0.36 + +No user-facing changes. + ## 1.0.35 No user-facing changes. diff --git a/misc/suite-helpers/change-notes/released/1.0.36.md b/misc/suite-helpers/change-notes/released/1.0.36.md new file mode 100644 index 00000000000..6cefe97d8b8 --- /dev/null +++ b/misc/suite-helpers/change-notes/released/1.0.36.md @@ -0,0 +1,3 @@ +## 1.0.36 + +No user-facing changes. diff --git a/misc/suite-helpers/change-notes/released/1.0.37.md b/misc/suite-helpers/change-notes/released/1.0.37.md new file mode 100644 index 00000000000..505bacf104d --- /dev/null +++ b/misc/suite-helpers/change-notes/released/1.0.37.md @@ -0,0 +1,3 @@ +## 1.0.37 + +No user-facing changes. diff --git a/misc/suite-helpers/codeql-pack.release.yml b/misc/suite-helpers/codeql-pack.release.yml index 9493cf42a28..9ad62b33247 100644 --- a/misc/suite-helpers/codeql-pack.release.yml +++ b/misc/suite-helpers/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.35 +lastReleaseVersion: 1.0.37 diff --git a/misc/suite-helpers/qlpack.yml b/misc/suite-helpers/qlpack.yml index 350d555bf57..88499ce2fa6 100644 --- a/misc/suite-helpers/qlpack.yml +++ b/misc/suite-helpers/qlpack.yml @@ -1,4 +1,4 @@ name: codeql/suite-helpers -version: 1.0.36-dev +version: 1.0.38-dev groups: shared warnOnImplicitThis: true diff --git a/python/extractor/imp.py b/python/extractor/imp.py index 8d703250b67..5130f64ebef 100644 --- a/python/extractor/imp.py +++ b/python/extractor/imp.py @@ -25,7 +25,7 @@ try: from importlib._bootstrap import _ERR_MSG except ImportError: from importlib._bootstrap import _ERR_MSG_PREFIX - _ERR_MSG = _ERR_MSG_PREFIX + '{name!r}' + _ERR_MSG = _ERR_MSG_PREFIX + '{!r}' from importlib import machinery from importlib import util diff --git a/python/extractor/semmle/util.py b/python/extractor/semmle/util.py index 2f6a18ac7a9..445d40dab3d 100644 --- a/python/extractor/semmle/util.py +++ b/python/extractor/semmle/util.py @@ -10,7 +10,7 @@ from io import BytesIO #Semantic version of extractor. #Update this if any changes are made -VERSION = "7.1.5" +VERSION = "7.1.6" PY_EXTENSIONS = ".py", ".pyw" diff --git a/python/ql/examples/snippets/call.ql b/python/ql/examples/snippets/call.ql index b326024a33c..0c68bbd69b9 100644 --- a/python/ql/examples/snippets/call.ql +++ b/python/ql/examples/snippets/call.ql @@ -7,6 +7,7 @@ */ import python +private import LegacyPointsTo from Value len, CallNode call where len.getName() = "len" and len.getACall() = call diff --git a/python/ql/examples/snippets/extend_class.ql b/python/ql/examples/snippets/extend_class.ql index 805929ab709..8efc1b8241a 100644 --- a/python/ql/examples/snippets/extend_class.ql +++ b/python/ql/examples/snippets/extend_class.ql @@ -11,6 +11,7 @@ */ import python +private import LegacyPointsTo from ClassObject sub, ClassObject base where diff --git a/python/ql/examples/snippets/method_call.ql b/python/ql/examples/snippets/method_call.ql index f78a9e43be0..c331b7c8bef 100644 --- a/python/ql/examples/snippets/method_call.ql +++ b/python/ql/examples/snippets/method_call.ql @@ -7,6 +7,7 @@ */ import python +private import LegacyPointsTo from AstNode call, PythonFunctionValue method where diff --git a/python/ql/examples/snippets/mutualrecursion.ql b/python/ql/examples/snippets/mutualrecursion.ql index 0cd445b6e3b..040dbae99d4 100644 --- a/python/ql/examples/snippets/mutualrecursion.ql +++ b/python/ql/examples/snippets/mutualrecursion.ql @@ -7,6 +7,7 @@ */ import python +private import LegacyPointsTo from FunctionObject m, FunctionObject n where m != n and m.getACallee() = n and n.getACallee() = m diff --git a/python/ql/examples/snippets/override_method.ql b/python/ql/examples/snippets/override_method.ql index 2b601d59df7..40c2eed8531 100644 --- a/python/ql/examples/snippets/override_method.ql +++ b/python/ql/examples/snippets/override_method.ql @@ -7,6 +7,7 @@ */ import python +private import LegacyPointsTo from FunctionObject override, FunctionObject base where diff --git a/python/ql/examples/snippets/recursion.ql b/python/ql/examples/snippets/recursion.ql index b986a265db5..7e0770f3927 100644 --- a/python/ql/examples/snippets/recursion.ql +++ b/python/ql/examples/snippets/recursion.ql @@ -7,6 +7,7 @@ */ import python +private import LegacyPointsTo from PythonFunctionValue f where f.getACall().getScope() = f.getScope() diff --git a/python/ql/lib/CHANGELOG.md b/python/ql/lib/CHANGELOG.md index 67b8cece821..94be3c9b8b1 100644 --- a/python/ql/lib/CHANGELOG.md +++ b/python/ql/lib/CHANGELOG.md @@ -1,3 +1,13 @@ +## 5.0.2 + +No user-facing changes. + +## 5.0.1 + +### Bug Fixes + +- Fixed a bug in the Python extractor's import handling where failing to find an import in `find_module` would cause a `KeyError` to be raised. (Contributed by @akoeplinger.) + ## 5.0.0 ### Breaking Changes diff --git a/python/ql/lib/LegacyPointsTo.qll b/python/ql/lib/LegacyPointsTo.qll index 3e675854601..45f4a80e8d1 100644 --- a/python/ql/lib/LegacyPointsTo.qll +++ b/python/ql/lib/LegacyPointsTo.qll @@ -20,8 +20,21 @@ */ private import python -private import semmle.python.pointsto.PointsTo -private import semmle.python.objects.Modules +import semmle.python.pointsto.Base +import semmle.python.pointsto.Context +import semmle.python.pointsto.PointsTo +import semmle.python.pointsto.PointsToContext +import semmle.python.objects.ObjectAPI +import semmle.python.objects.ObjectInternal +import semmle.python.types.Object +import semmle.python.types.ClassObject +import semmle.python.types.FunctionObject +import semmle.python.types.ModuleObject +import semmle.python.types.Exceptions +import semmle.python.types.Properties +import semmle.python.types.Descriptors +import semmle.python.SelfAttribute +import semmle.python.Metrics /** * An extension of `ControlFlowNode` that provides points-to predicates. @@ -93,6 +106,24 @@ class ControlFlowNodeWithPointsTo extends ControlFlowNode { // for that variable. exists(SsaVariable v | v.getAUse() = this | varHasCompletePointsToSet(v)) } + + /** Whether it is unlikely that this ControlFlowNode can be reached */ + predicate unlikelyReachable() { + not start_bb_likely_reachable(this.getBasicBlock()) + or + exists(BasicBlock b | + start_bb_likely_reachable(b) and + not end_bb_likely_reachable(b) and + // If there is an unlikely successor edge earlier in the BB + // than this node, then this node must be unreachable. + exists(ControlFlowNode p, int i, int j | + p.(RaisingNode).unlikelySuccessor(_) and + p = b.getNode(i) and + this = b.getNode(j) and + i < j + ) + ) + } } /** @@ -121,6 +152,45 @@ private predicate varHasCompletePointsToSet(SsaVariable var) { ) } +private predicate start_bb_likely_reachable(BasicBlock b) { + exists(Scope s | s.getEntryNode() = b.getNode(_)) + or + exists(BasicBlock pred | + pred = b.getAPredecessor() and + end_bb_likely_reachable(pred) and + not pred.getLastNode().(RaisingNode).unlikelySuccessor(b) + ) +} + +private predicate end_bb_likely_reachable(BasicBlock b) { + start_bb_likely_reachable(b) and + not exists(ControlFlowNode p, ControlFlowNode s | + p.(RaisingNode).unlikelySuccessor(s) and + p = b.getNode(_) and + s = b.getNode(_) and + not p = b.getLastNode() + ) +} + +/** + * An extension of `BasicBlock` that provides points-to related methods. + */ +class BasicBlockWithPointsTo extends BasicBlock { + /** + * Whether (as inferred by type inference) it is highly unlikely (or impossible) for control to flow from this to succ. + */ + predicate unlikelySuccessor(BasicBlockWithPointsTo succ) { + this.getLastNode().(RaisingNode).unlikelySuccessor(succ.firstNode()) + or + not end_bb_likely_reachable(this) and succ = this.getASuccessor() + } + + /** + * Whether (as inferred by type inference) this basic block is likely to be reachable. + */ + predicate likelyReachable() { start_bb_likely_reachable(this) } +} + /** * An extension of `Expr` that provides points-to predicates. */ @@ -208,3 +278,155 @@ class ModuleWithPointsTo extends Module { override string getAQlClass() { none() } } + +/** + * An extension of `Function` that provides points-to related methods. + */ +class FunctionWithPointsTo extends Function { + /** Gets the FunctionObject corresponding to this function */ + FunctionObject getFunctionObject() { result.getOrigin() = this.getDefinition() } + + override string getAQlClass() { none() } +} + +/** + * An extension of `Class` that provides points-to related methods. + */ +class ClassWithPointsTo extends Class { + /** Gets the ClassObject corresponding to this class */ + ClassObject getClassObject() { result.getOrigin() = this.getParent() } + + override string getAQlClass() { none() } +} + +/** Gets the `Object` corresponding to the immutable literal `l`. */ +Object getLiteralObject(ImmutableLiteral l) { + l instanceof IntegerLiteral and + ( + py_cobjecttypes(result, theIntType()) and py_cobjectnames(result, l.(Num).getN()) + or + py_cobjecttypes(result, theLongType()) and py_cobjectnames(result, l.(Num).getN()) + ) + or + l instanceof FloatLiteral and + py_cobjecttypes(result, theFloatType()) and + py_cobjectnames(result, l.(Num).getN()) + or + l instanceof ImaginaryLiteral and + py_cobjecttypes(result, theComplexType()) and + py_cobjectnames(result, l.(Num).getN()) + or + l instanceof NegativeIntegerLiteral and + ( + (py_cobjecttypes(result, theIntType()) or py_cobjecttypes(result, theLongType())) and + py_cobjectnames(result, "-" + l.(UnaryExpr).getOperand().(IntegerLiteral).getN()) + ) + or + l instanceof Bytes and + py_cobjecttypes(result, theBytesType()) and + py_cobjectnames(result, l.(Bytes).quotedString()) + or + l instanceof Unicode and + py_cobjecttypes(result, theUnicodeType()) and + py_cobjectnames(result, l.(Unicode).quotedString()) + or + l instanceof True and + name_consts(l, "True") and + result = theTrueObject() + or + l instanceof False and + name_consts(l, "False") and + result = theFalseObject() + or + l instanceof None and + name_consts(l, "None") and + result = theNoneObject() +} + +private predicate gettext_installed() { + // Good enough (and fast) approximation + exists(Module m | m.getName() = "gettext") +} + +private predicate builtin_constant(string name) { + exists(Object::builtin(name)) + or + name = "WindowsError" + or + name = "_" and gettext_installed() +} + +/** Whether this name is (almost) always defined, ie. it is a builtin or VM defined name */ +predicate globallyDefinedName(string name) { builtin_constant(name) or auto_name(name) } + +private predicate auto_name(string name) { + name = "__file__" or name = "__builtins__" or name = "__name__" +} + +/** An extension of `SsaVariable` that provides points-to related methods. */ +class SsaVariableWithPointsTo extends SsaVariable { + /** Gets an argument of the phi function defining this variable, pruned of unlikely edges. */ + SsaVariable getAPrunedPhiInput() { + result = this.getAPhiInput() and + exists(BasicBlock incoming | incoming = this.getPredecessorBlockForPhiArgument(result) | + not incoming.getLastNode().(RaisingNode).unlikelySuccessor(this.getDefinition()) + ) + } + + /** Gets the incoming edges for a Phi node, pruned of unlikely edges. */ + private BasicBlockWithPointsTo getAPrunedPredecessorBlockForPhi() { + result = this.getAPredecessorBlockForPhi() and + not result.unlikelySuccessor(this.getDefinition().getBasicBlock()) + } + + private predicate implicitlyDefined() { + not exists(this.getDefinition()) and + not py_ssa_phi(this, _) and + exists(GlobalVariable var | this.getVariable() = var | + globallyDefinedName(var.getId()) + or + var.getId() = "__path__" and var.getScope().(Module).isPackageInit() + ) + } + + /** Whether this variable may be undefined */ + predicate maybeUndefined() { + not exists(this.getDefinition()) and not py_ssa_phi(this, _) and not this.implicitlyDefined() + or + this.getDefinition().isDelete() + or + exists(SsaVariableWithPointsTo var | var = this.getAPrunedPhiInput() | var.maybeUndefined()) + or + /* + * For phi-nodes, there must be a corresponding phi-input for each control-flow + * predecessor. Otherwise, the variable will be undefined on that incoming edge. + * WARNING: the same phi-input may cover multiple predecessors, so this check + * cannot be done by counting. + */ + + exists(BasicBlock incoming | + reaches_end(incoming) and + incoming = this.getAPrunedPredecessorBlockForPhi() and + not this.getAPhiInput().getDefinition().getBasicBlock().dominates(incoming) + ) + } + + override string getAQlClass() { none() } +} + +private predicate reaches_end(BasicBlock b) { + not exits_early(b) and + ( + /* Entry point */ + not exists(BasicBlock prev | prev.getASuccessor() = b) + or + exists(BasicBlock prev | prev.getASuccessor() = b | reaches_end(prev)) + ) +} + +private predicate exits_early(BasicBlock b) { + exists(FunctionObject f | + f.neverReturns() and + f.getACall().getBasicBlock() = b + ) +} diff --git a/python/ql/lib/analysis/DefinitionTracking.qll b/python/ql/lib/analysis/DefinitionTracking.qll index 53f8e791cd8..0d58bd69b7b 100644 --- a/python/ql/lib/analysis/DefinitionTracking.qll +++ b/python/ql/lib/analysis/DefinitionTracking.qll @@ -4,7 +4,7 @@ import python private import LegacyPointsTo -import semmle.python.pointsto.PointsTo +private import semmle.python.types.ImportTime import IDEContextual private newtype TDefinition = diff --git a/python/ql/lib/change-notes/2025-11-22-tornado-websockets.md b/python/ql/lib/change-notes/2025-11-22-tornado-websockets.md new file mode 100644 index 00000000000..8ba2ef549ee --- /dev/null +++ b/python/ql/lib/change-notes/2025-11-22-tornado-websockets.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Additional models for remote flow sources for `tornado.websocket.WebSocketHandler` have been added. \ No newline at end of file diff --git a/python/ql/lib/change-notes/2025-11-26-model-ParseResult.md b/python/ql/lib/change-notes/2025-11-26-model-ParseResult.md new file mode 100644 index 00000000000..9d461643613 --- /dev/null +++ b/python/ql/lib/change-notes/2025-11-26-model-ParseResult.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Added taint flow model and type model for `urllib.parseurl`. \ No newline at end of file diff --git a/python/ql/lib/change-notes/2025-11-26-remove-top-level-points-to-import.md b/python/ql/lib/change-notes/2025-11-26-remove-top-level-points-to-import.md new file mode 100644 index 00000000000..7122c217c41 --- /dev/null +++ b/python/ql/lib/change-notes/2025-11-26-remove-top-level-points-to-import.md @@ -0,0 +1,7 @@ +--- +category: breaking +--- + +* All modules that depend on the points-to analysis have now been removed from the top level `python.qll` module. To access the points-to functionality, import the new `LegacyPointsTo` module. This also means that some predicates have been removed from various classes, for instance `Function.getFunctionObject()`. To access these predicates, import the `LegacyPointsTo` module and use the `FunctionWithPointsTo` class instead. Most cases follow this pattern, but there are a few exceptions: + * The `getLiteralObject` method on `ImmutableLiteral` subclasses has been replaced with a predicate `getLiteralObject(ImmutableLiteral l)` in the `LegacyPointsTo` module. + * The `getMetrics` method on `Function`, `Class`, and `Module` has been removed. To access metrics, import `LegacyPointsTo` and use the classes `FunctionMetrics`, etc. instead. diff --git a/python/ql/lib/change-notes/2025-11-26-socketio.md b/python/ql/lib/change-notes/2025-11-26-socketio.md new file mode 100644 index 00000000000..e58bec0bbc1 --- /dev/null +++ b/python/ql/lib/change-notes/2025-11-26-socketio.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Remote flow sources for the `python-socketio` package have been modeled. \ No newline at end of file diff --git a/python/ql/lib/change-notes/released/5.0.1.md b/python/ql/lib/change-notes/released/5.0.1.md new file mode 100644 index 00000000000..97ea0f1bc48 --- /dev/null +++ b/python/ql/lib/change-notes/released/5.0.1.md @@ -0,0 +1,5 @@ +## 5.0.1 + +### Bug Fixes + +- Fixed a bug in the Python extractor's import handling where failing to find an import in `find_module` would cause a `KeyError` to be raised. (Contributed by @akoeplinger.) diff --git a/python/ql/lib/change-notes/released/5.0.2.md b/python/ql/lib/change-notes/released/5.0.2.md new file mode 100644 index 00000000000..3f921f9ca8b --- /dev/null +++ b/python/ql/lib/change-notes/released/5.0.2.md @@ -0,0 +1,3 @@ +## 5.0.2 + +No user-facing changes. diff --git a/python/ql/lib/codeql-pack.release.yml b/python/ql/lib/codeql-pack.release.yml index c9e54136ca5..3940dee0f32 100644 --- a/python/ql/lib/codeql-pack.release.yml +++ b/python/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 5.0.0 +lastReleaseVersion: 5.0.2 diff --git a/python/ql/lib/python.qll b/python/ql/lib/python.qll index b08f0ae35bb..54306408a33 100644 --- a/python/ql/lib/python.qll +++ b/python/ql/lib/python.qll @@ -14,27 +14,27 @@ import semmle.python.Patterns import semmle.python.Keywords import semmle.python.Comprehensions import semmle.python.Flow -import semmle.python.Metrics +private import semmle.python.Metrics import semmle.python.Constants import semmle.python.Scope import semmle.python.Comment import semmle.python.GuardedControlFlow -import semmle.python.types.ImportTime -import semmle.python.types.Object -import semmle.python.types.ClassObject -import semmle.python.types.FunctionObject -import semmle.python.types.ModuleObject -import semmle.python.types.Version -import semmle.python.types.Descriptors +private import semmle.python.types.ImportTime +private import semmle.python.types.Object +private import semmle.python.types.ClassObject +private import semmle.python.types.FunctionObject +private import semmle.python.types.ModuleObject +private import semmle.python.types.Version +private import semmle.python.types.Descriptors import semmle.python.SSA -import semmle.python.SelfAttribute -import semmle.python.types.Properties +private import semmle.python.SelfAttribute +private import semmle.python.types.Properties import semmle.python.xml.XML import semmle.python.essa.Essa -import semmle.python.pointsto.Base -import semmle.python.pointsto.Context -import semmle.python.pointsto.CallGraph -import semmle.python.objects.ObjectAPI +private import semmle.python.pointsto.Base +private import semmle.python.pointsto.Context +private import semmle.python.pointsto.CallGraph +private import semmle.python.objects.ObjectAPI import semmle.python.Unit import site private import semmle.python.Overlay diff --git a/python/ql/lib/qlpack.yml b/python/ql/lib/qlpack.yml index 7f4e67a5cbf..80a0e095778 100644 --- a/python/ql/lib/qlpack.yml +++ b/python/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/python-all -version: 5.0.1-dev +version: 5.0.3-dev groups: python dbscheme: semmlecode.python.dbscheme extractor: python diff --git a/python/ql/lib/semmle/python/Class.qll b/python/ql/lib/semmle/python/Class.qll index 58a6504b547..19b81e86a12 100644 --- a/python/ql/lib/semmle/python/Class.qll +++ b/python/ql/lib/semmle/python/Class.qll @@ -141,18 +141,12 @@ class Class extends Class_, Scope, AstNode { /** Gets the metaclass expression */ Expr getMetaClass() { result = this.getParent().getMetaClass() } - /** Gets the ClassObject corresponding to this class */ - ClassObject getClassObject() { result.getOrigin() = this.getParent() } - /** Gets the nth base of this class definition. */ Expr getBase(int index) { result = this.getParent().getBase(index) } /** Gets a base of this class definition. */ Expr getABase() { result = this.getParent().getABase() } - /** Gets the metrics for this class */ - ClassMetrics getMetrics() { result = this } - /** * Gets the qualified name for this class. * Should return the same name as the `__qualname__` attribute on classes in Python 3. diff --git a/python/ql/lib/semmle/python/Exprs.qll b/python/ql/lib/semmle/python/Exprs.qll index e5ee2bdb28c..c374863d684 100644 --- a/python/ql/lib/semmle/python/Exprs.qll +++ b/python/ql/lib/semmle/python/Exprs.qll @@ -240,17 +240,12 @@ class Bytes extends StringLiteral { /* syntax: b"hello" */ Bytes() { not this.isUnicode() } - override Object getLiteralObject() { - py_cobjecttypes(result, theBytesType()) and - py_cobjectnames(result, this.quotedString()) - } - /** * The extractor puts quotes into the name of each string (to prevent "0" clashing with 0). * The following predicate help us match up a string/byte literals in the source * which the equivalent object. */ - private string quotedString() { + string quotedString() { exists(string b_unquoted | b_unquoted = this.getS() | result = "b'" + b_unquoted + "'") } } @@ -266,8 +261,6 @@ class Ellipsis extends Ellipsis_ { * Consists of string (both unicode and byte) literals and numeric literals. */ abstract class ImmutableLiteral extends Expr { - abstract Object getLiteralObject(); - abstract boolean booleanValue(); } @@ -292,12 +285,6 @@ class IntegerLiteral extends Num { override string toString() { result = "IntegerLiteral" } - override Object getLiteralObject() { - py_cobjecttypes(result, theIntType()) and py_cobjectnames(result, this.getN()) - or - py_cobjecttypes(result, theLongType()) and py_cobjectnames(result, this.getN()) - } - override boolean booleanValue() { this.getValue() = 0 and result = false or @@ -317,10 +304,6 @@ class FloatLiteral extends Num { override string toString() { result = "FloatLiteral" } - override Object getLiteralObject() { - py_cobjecttypes(result, theFloatType()) and py_cobjectnames(result, this.getN()) - } - override boolean booleanValue() { this.getValue() = 0.0 and result = false or @@ -343,10 +326,6 @@ class ImaginaryLiteral extends Num { override string toString() { result = "ImaginaryLiteral" } - override Object getLiteralObject() { - py_cobjecttypes(result, theComplexType()) and py_cobjectnames(result, this.getN()) - } - override boolean booleanValue() { this.getValue() = 0.0 and result = false or @@ -365,11 +344,6 @@ class NegativeIntegerLiteral extends ImmutableLiteral, UnaryExpr { override boolean booleanValue() { result = this.getOperand().(IntegerLiteral).booleanValue() } - override Object getLiteralObject() { - (py_cobjecttypes(result, theIntType()) or py_cobjecttypes(result, theLongType())) and - py_cobjectnames(result, "-" + this.getOperand().(IntegerLiteral).getN()) - } - /** * Gets the (integer) value of this constant. Will not return a result if the value does not fit into * a 32 bit signed value @@ -385,11 +359,6 @@ class Unicode extends StringLiteral { /* syntax: "hello" */ Unicode() { this.isUnicode() } - override Object getLiteralObject() { - py_cobjecttypes(result, theUnicodeType()) and - py_cobjectnames(result, this.quotedString()) - } - /** * Gets the quoted representation fo this string. * @@ -593,12 +562,11 @@ class StringLiteral extends Str_, ImmutableLiteral { this.getText() != "" and result = true } - override Object getLiteralObject() { none() } - override string toString() { result = "StringLiteral" } } -private predicate name_consts(Name_ n, string id) { +/** Holds if `n` is a named constant (`True`, `False`, or `None`) with name `id`. */ +predicate name_consts(Name_ n, string id) { exists(Variable v | py_variables(v, n) and id = v.getId() | id = "True" or id = "False" or id = "None" ) @@ -627,8 +595,6 @@ class True extends BooleanLiteral { /* syntax: True */ True() { name_consts(this, "True") } - override Object getLiteralObject() { name_consts(this, "True") and result = theTrueObject() } - override boolean booleanValue() { result = true } } @@ -637,8 +603,6 @@ class False extends BooleanLiteral { /* syntax: False */ False() { name_consts(this, "False") } - override Object getLiteralObject() { name_consts(this, "False") and result = theFalseObject() } - override boolean booleanValue() { result = false } } @@ -647,8 +611,6 @@ class None extends NameConstant { /* syntax: None */ None() { name_consts(this, "None") } - override Object getLiteralObject() { name_consts(this, "None") and result = theNoneObject() } - override boolean booleanValue() { result = false } } diff --git a/python/ql/lib/semmle/python/Flow.qll b/python/ql/lib/semmle/python/Flow.qll index 496c1abc52a..898cd566ab9 100644 --- a/python/ql/lib/semmle/python/Flow.qll +++ b/python/ql/lib/semmle/python/Flow.qll @@ -190,24 +190,6 @@ class ControlFlowNode extends @py_flow_node { /** Whether this node is a normal (non-exceptional) exit */ predicate isNormalExit() { py_scope_flow(this, _, 0) or py_scope_flow(this, _, 2) } - /** Whether it is unlikely that this ControlFlowNode can be reached */ - predicate unlikelyReachable() { - not start_bb_likely_reachable(this.getBasicBlock()) - or - exists(BasicBlock b | - start_bb_likely_reachable(b) and - not end_bb_likely_reachable(b) and - // If there is an unlikely successor edge earlier in the BB - // than this node, then this node must be unreachable. - exists(ControlFlowNode p, int i, int j | - p.(RaisingNode).unlikelySuccessor(_) and - p = b.getNode(i) and - this = b.getNode(j) and - i < j - ) - ) - } - /** Whether this strictly dominates other. */ pragma[inline] predicate strictlyDominates(ControlFlowNode other) { @@ -901,6 +883,58 @@ class StarredNode extends ControlFlowNode { ControlFlowNode getValue() { toAst(result) = toAst(this).(Starred).getValue() } } +/** The ControlFlowNode for an 'except' statement. */ +class ExceptFlowNode extends ControlFlowNode { + ExceptFlowNode() { this.getNode() instanceof ExceptStmt } + + /** + * Gets the type handled by this exception handler. + * `ExceptionType` in `except ExceptionType as e:` + */ + ControlFlowNode getType() { + exists(ExceptStmt ex | + this.getBasicBlock().dominates(result.getBasicBlock()) and + ex = this.getNode() and + result = ex.getType().getAFlowNode() + ) + } + + /** + * Gets the name assigned to the handled exception, if any. + * `e` in `except ExceptionType as e:` + */ + ControlFlowNode getName() { + exists(ExceptStmt ex | + this.getBasicBlock().dominates(result.getBasicBlock()) and + ex = this.getNode() and + result = ex.getName().getAFlowNode() + ) + } +} + +/** The ControlFlowNode for an 'except*' statement. */ +class ExceptGroupFlowNode extends ControlFlowNode { + ExceptGroupFlowNode() { this.getNode() instanceof ExceptGroupStmt } + + /** + * Gets the type handled by this exception handler. + * `ExceptionType` in `except* ExceptionType as e:` + */ + ControlFlowNode getType() { + this.getBasicBlock().dominates(result.getBasicBlock()) and + result = this.getNode().(ExceptGroupStmt).getType().getAFlowNode() + } + + /** + * Gets the name assigned to the handled exception, if any. + * `e` in `except* ExceptionType as e:` + */ + ControlFlowNode getName() { + this.getBasicBlock().dominates(result.getBasicBlock()) and + result = this.getNode().(ExceptGroupStmt).getName().getAFlowNode() + } +} + private module Scopes { private predicate fast_local(NameNode n) { exists(FastLocalVariable v | @@ -1004,7 +1038,8 @@ class BasicBlock extends @py_flow_node { ) } - private ControlFlowNode firstNode() { result = this } + /** Gets the first node in this basic block */ + ControlFlowNode firstNode() { result = this } /** Gets the last node in this basic block */ ControlFlowNode getLastNode() { @@ -1093,15 +1128,6 @@ class BasicBlock extends @py_flow_node { ) } - /** - * Whether (as inferred by type inference) it is highly unlikely (or impossible) for control to flow from this to succ. - */ - predicate unlikelySuccessor(BasicBlock succ) { - this.getLastNode().(RaisingNode).unlikelySuccessor(succ.firstNode()) - or - not end_bb_likely_reachable(this) and succ = this.getASuccessor() - } - /** Holds if this basic block strictly reaches the other. Is the start of other reachable from the end of this. */ cached predicate strictlyReaches(BasicBlock other) { @@ -1112,11 +1138,6 @@ class BasicBlock extends @py_flow_node { /** Holds if this basic block reaches the other. Is the start of other reachable from the end of this. */ predicate reaches(BasicBlock other) { this = other or this.strictlyReaches(other) } - /** - * Whether (as inferred by type inference) this basic block is likely to be reachable. - */ - predicate likelyReachable() { start_bb_likely_reachable(this) } - /** * Gets the `ConditionBlock`, if any, that controls this block and * does not control any other `ConditionBlock`s that control this block. @@ -1144,26 +1165,6 @@ class BasicBlock extends @py_flow_node { } } -private predicate start_bb_likely_reachable(BasicBlock b) { - exists(Scope s | s.getEntryNode() = b.getNode(_)) - or - exists(BasicBlock pred | - pred = b.getAPredecessor() and - end_bb_likely_reachable(pred) and - not pred.getLastNode().(RaisingNode).unlikelySuccessor(b) - ) -} - -private predicate end_bb_likely_reachable(BasicBlock b) { - start_bb_likely_reachable(b) and - not exists(ControlFlowNode p, ControlFlowNode s | - p.(RaisingNode).unlikelySuccessor(s) and - p = b.getNode(_) and - s = b.getNode(_) and - not p = b.getLastNode() - ) -} - private class ControlFlowNodeAlias = ControlFlowNode; final private class FinalBasicBlock = BasicBlock; diff --git a/python/ql/lib/semmle/python/Frameworks.qll b/python/ql/lib/semmle/python/Frameworks.qll index 955385141f7..7694419b41d 100644 --- a/python/ql/lib/semmle/python/Frameworks.qll +++ b/python/ql/lib/semmle/python/Frameworks.qll @@ -78,6 +78,7 @@ private import semmle.python.frameworks.Sanic private import semmle.python.frameworks.ServerLess private import semmle.python.frameworks.Setuptools private import semmle.python.frameworks.Simplejson +private import semmle.python.frameworks.Socketio private import semmle.python.frameworks.SqlAlchemy private import semmle.python.frameworks.Starlette private import semmle.python.frameworks.Stdlib diff --git a/python/ql/lib/semmle/python/Function.qll b/python/ql/lib/semmle/python/Function.qll index 589d7f47161..e15d28d3a12 100644 --- a/python/ql/lib/semmle/python/Function.qll +++ b/python/ql/lib/semmle/python/Function.qll @@ -84,12 +84,6 @@ class Function extends Function_, Scope, AstNode { /** Gets the name used to define this function */ override string getName() { result = Function_.super.getName() } - /** Gets the metrics for this function */ - FunctionMetrics getMetrics() { result = this } - - /** Gets the FunctionObject corresponding to this function */ - FunctionObject getFunctionObject() { result.getOrigin() = this.getDefinition() } - /** * Whether this function is a procedure, that is, it has no explicit return statement and always returns None. * Note that generator and async functions are not procedures as they return generators and coroutines respectively. diff --git a/python/ql/lib/semmle/python/Metrics.qll b/python/ql/lib/semmle/python/Metrics.qll index dcc5cf959d9..4959a06317f 100644 --- a/python/ql/lib/semmle/python/Metrics.qll +++ b/python/ql/lib/semmle/python/Metrics.qll @@ -29,9 +29,9 @@ class FunctionMetrics extends Function { */ int getCyclomaticComplexity() { exists(int e, int n | - n = count(BasicBlock b | b = this.getABasicBlock() and b.likelyReachable()) and + n = count(BasicBlockWithPointsTo b | b = this.getABasicBlock() and b.likelyReachable()) and e = - count(BasicBlock b1, BasicBlock b2 | + count(BasicBlockWithPointsTo b1, BasicBlockWithPointsTo b2 | b1 = this.getABasicBlock() and b1.likelyReachable() and b2 = this.getABasicBlock() and diff --git a/python/ql/lib/semmle/python/Module.qll b/python/ql/lib/semmle/python/Module.qll index 666217874b7..f22f0d6fe39 100644 --- a/python/ql/lib/semmle/python/Module.qll +++ b/python/ql/lib/semmle/python/Module.qll @@ -86,9 +86,6 @@ class Module extends Module_, Scope, AstNode { result = this.getName().regexpReplaceAll("\\.[^.]*$", "") } - /** Gets the metrics for this module */ - ModuleMetrics getMetrics() { result = this } - string getAnImportedModuleName() { exists(Import i | i.getEnclosingModule() = this | result = i.getAnImportedModuleName()) or diff --git a/python/ql/lib/semmle/python/Overlay.qll b/python/ql/lib/semmle/python/Overlay.qll index fa782801457..a8c473d1e4a 100644 --- a/python/ql/lib/semmle/python/Overlay.qll +++ b/python/ql/lib/semmle/python/Overlay.qll @@ -2,6 +2,8 @@ * Defines entity discard predicates for Python overlay analysis. */ +private import internal.OverlayXml + /*- Predicates -*/ /** * Holds always for the overlay variant and never for the base variant. @@ -303,33 +305,6 @@ final private class DiscardableComment extends Discardable instanceof @py_commen } } -/*- XML -*/ -overlay[local] -final private class DiscardableXmlLocatable extends Discardable instanceof @xmllocatable { - override string getPath() { - exists(@location loc | xmllocations(this, loc) | result = getPathForLocation(loc)) - } -} - -overlay[local] -private predicate overlayXmlExtracted(string path) { - exists(DiscardableXmlLocatable d | not files(d, _) and not xmlNs(d, _, _, _) | - d.existsInOverlay() and - path = d.getPath() - ) -} - -overlay[discard_entity] -private predicate discardXmlLocatable(@xmllocatable el) { - exists(DiscardableXmlLocatable d | d = el | - // The XML extractor is currently not incremental and may extract more - // XML files than those included in `overlayChangedFiles`, so this discard predicate - // handles those files alongside the normal `discardStarEntity` logic. - overlayXmlExtracted(d.getPath()) and - d.existsInBase() - ) -} - /*- YAML -*/ overlay[local] final private class DiscardableYamlLocatable extends Discardable instanceof @yaml_locatable { diff --git a/python/ql/lib/semmle/python/SSA.qll b/python/ql/lib/semmle/python/SSA.qll index 98cd39a4c43..b71bd95de79 100644 --- a/python/ql/lib/semmle/python/SSA.qll +++ b/python/ql/lib/semmle/python/SSA.qll @@ -61,14 +61,6 @@ class SsaVariable extends @py_ssa_var { ) } - /** Gets an argument of the phi function defining this variable, pruned of unlikely edges. */ - SsaVariable getAPrunedPhiInput() { - result = this.getAPhiInput() and - exists(BasicBlock incoming | incoming = this.getPredecessorBlockForPhiArgument(result) | - not incoming.getLastNode().(RaisingNode).unlikelySuccessor(this.getDefinition()) - ) - } - /** Gets a variable that ultimately defines this variable and is not itself defined by another variable */ SsaVariable getAnUltimateDefinition() { result = this and not exists(this.getAPhiInput()) @@ -85,17 +77,11 @@ class SsaVariable extends @py_ssa_var { string getId() { result = this.getVariable().getId() } /** Gets the incoming edges for a Phi node. */ - private BasicBlock getAPredecessorBlockForPhi() { + BasicBlock getAPredecessorBlockForPhi() { exists(this.getAPhiInput()) and result.getASuccessor() = this.getDefinition().getBasicBlock() } - /** Gets the incoming edges for a Phi node, pruned of unlikely edges. */ - private BasicBlock getAPrunedPredecessorBlockForPhi() { - result = this.getAPredecessorBlockForPhi() and - not result.unlikelySuccessor(this.getDefinition().getBasicBlock()) - } - /** Whether it is possible to reach a use of this variable without passing a definition */ predicate reachableWithoutDefinition() { not exists(this.getDefinition()) and not py_ssa_phi(this, _) @@ -115,38 +101,6 @@ class SsaVariable extends @py_ssa_var { ) } - /** Whether this variable may be undefined */ - predicate maybeUndefined() { - not exists(this.getDefinition()) and not py_ssa_phi(this, _) and not this.implicitlyDefined() - or - this.getDefinition().isDelete() - or - exists(SsaVariable var | var = this.getAPrunedPhiInput() | var.maybeUndefined()) - or - /* - * For phi-nodes, there must be a corresponding phi-input for each control-flow - * predecessor. Otherwise, the variable will be undefined on that incoming edge. - * WARNING: the same phi-input may cover multiple predecessors, so this check - * cannot be done by counting. - */ - - exists(BasicBlock incoming | - reaches_end(incoming) and - incoming = this.getAPrunedPredecessorBlockForPhi() and - not this.getAPhiInput().getDefinition().getBasicBlock().dominates(incoming) - ) - } - - private predicate implicitlyDefined() { - not exists(this.getDefinition()) and - not py_ssa_phi(this, _) and - exists(GlobalVariable var | this.getVariable() = var | - globallyDefinedName(var.getId()) - or - var.getId() = "__path__" and var.getScope().(Module).isPackageInit() - ) - } - /** * Gets the global variable that is accessed if this local is undefined. * Only applies to local variables in class scopes. @@ -173,43 +127,6 @@ class SsaVariable extends @py_ssa_var { } } -private predicate reaches_end(BasicBlock b) { - not exits_early(b) and - ( - /* Entry point */ - not exists(BasicBlock prev | prev.getASuccessor() = b) - or - exists(BasicBlock prev | prev.getASuccessor() = b | reaches_end(prev)) - ) -} - -private predicate exits_early(BasicBlock b) { - exists(FunctionObject f | - f.neverReturns() and - f.getACall().getBasicBlock() = b - ) -} - -private predicate gettext_installed() { - // Good enough (and fast) approximation - exists(Module m | m.getName() = "gettext") -} - -private predicate builtin_constant(string name) { - exists(Object::builtin(name)) - or - name = "WindowsError" - or - name = "_" and gettext_installed() -} - -private predicate auto_name(string name) { - name = "__file__" or name = "__builtins__" or name = "__name__" -} - -/** Whether this name is (almost) always defined, ie. it is a builtin or VM defined name */ -predicate globallyDefinedName(string name) { builtin_constant(name) or auto_name(name) } - /** An SSA variable that is backed by a global variable */ class GlobalSsaVariable extends EssaVariable { GlobalSsaVariable() { this.getSourceVariable() instanceof GlobalVariable } diff --git a/python/ql/lib/semmle/python/SelfAttribute.qll b/python/ql/lib/semmle/python/SelfAttribute.qll index 01a110999ba..90ef2b38401 100644 --- a/python/ql/lib/semmle/python/SelfAttribute.qll +++ b/python/ql/lib/semmle/python/SelfAttribute.qll @@ -5,6 +5,7 @@ import python private import semmle.python.pointsto.Filters +private import LegacyPointsTo /** * An attribute access where the left hand side of the attribute expression diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/Attributes.qll b/python/ql/lib/semmle/python/dataflow/new/internal/Attributes.qll index 42c0c862e89..e9bcc5e6785 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/Attributes.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/Attributes.qll @@ -1,9 +1,10 @@ /** This module provides an API for attribute reads and writes. */ +private import python import DataFlowUtil import DataFlowPublic private import DataFlowPrivate -private import semmle.python.types.Builtins +private import semmle.python.dataflow.new.internal.Builtins /** * A data flow node that reads or writes an attribute of an object. @@ -134,8 +135,12 @@ private class BuiltInCallNode extends CallNode { BuiltInCallNode() { // TODO disallow instances where the name of the built-in may refer to an in-scope variable of that name. - exists(NameNode id | this.getFunction() = id and id.getId() = name and id.isGlobal()) and - name = any(Builtin b).getName() + exists(NameNode id | + name = Builtins::getBuiltinName() and + this.getFunction() = id and + id.getId() = name and + id.isGlobal() + ) } /** Gets the name of the built-in function that is called at this `CallNode` */ diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/ImportResolution.qll b/python/ql/lib/semmle/python/dataflow/new/internal/ImportResolution.qll index e1290b7758c..f3943f53f86 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/ImportResolution.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/ImportResolution.qll @@ -9,6 +9,7 @@ private import semmle.python.dataflow.new.DataFlow private import semmle.python.dataflow.new.internal.ImportStar private import semmle.python.dataflow.new.TypeTracking private import semmle.python.dataflow.new.internal.DataFlowPrivate +private import semmle.python.essa.SsaDefinitions /** * Python modules and the way imports are resolved are... complicated. Here's a crash course in how diff --git a/python/ql/lib/semmle/python/dataflow/old/Configuration.qll b/python/ql/lib/semmle/python/dataflow/old/Configuration.qll index 7d03e6c562f..f0e33169cf2 100644 --- a/python/ql/lib/semmle/python/dataflow/old/Configuration.qll +++ b/python/ql/lib/semmle/python/dataflow/old/Configuration.qll @@ -1,6 +1,6 @@ import python import semmle.python.dataflow.TaintTracking -private import semmle.python.objects.ObjectInternal +private import LegacyPointsTo private import semmle.python.dataflow.Implementation module TaintTracking { diff --git a/python/ql/lib/semmle/python/dataflow/old/Files.qll b/python/ql/lib/semmle/python/dataflow/old/Files.qll index 3439e559efa..18537768445 100644 --- a/python/ql/lib/semmle/python/dataflow/old/Files.qll +++ b/python/ql/lib/semmle/python/dataflow/old/Files.qll @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo import semmle.python.dataflow.TaintTracking class OpenFile extends TaintKind { diff --git a/python/ql/lib/semmle/python/dataflow/old/Implementation.qll b/python/ql/lib/semmle/python/dataflow/old/Implementation.qll index 83476db803c..18020c7d9ff 100644 --- a/python/ql/lib/semmle/python/dataflow/old/Implementation.qll +++ b/python/ql/lib/semmle/python/dataflow/old/Implementation.qll @@ -1,7 +1,6 @@ import python private import LegacyPointsTo import semmle.python.dataflow.TaintTracking -private import semmle.python.objects.ObjectInternal private import semmle.python.pointsto.Filters as Filters import semmle.python.dataflow.Legacy @@ -257,7 +256,7 @@ class TaintTrackingImplementation extends string instanceof TaintTracking::Confi TaintKind kind, string edgeLabel ) { this.unprunedStep(src, node, context, path, kind, edgeLabel) and - node.getBasicBlock().likelyReachable() and + node.getBasicBlock().(BasicBlockWithPointsTo).likelyReachable() and not super.isBarrier(node) and ( not path = TNoAttribute() @@ -685,7 +684,9 @@ private class EssaTaintTracking extends string instanceof TaintTracking::Configu TaintTrackingNode src, PhiFunction defn, TaintTrackingContext context, AttributePath path, TaintKind kind ) { - exists(DataFlow::Node srcnode, BasicBlock pred, EssaVariable predvar, DataFlow::Node phi | + exists( + DataFlow::Node srcnode, BasicBlockWithPointsTo pred, EssaVariable predvar, DataFlow::Node phi + | src = TTaintTrackingNode_(srcnode, context, path, kind, this) and defn = phi.asVariable().getDefinition() and predvar = defn.getInput(pred) and diff --git a/python/ql/lib/semmle/python/dataflow/old/StateTracking.qll b/python/ql/lib/semmle/python/dataflow/old/StateTracking.qll index 2ca9be0dfb9..0eeb103ee55 100644 --- a/python/ql/lib/semmle/python/dataflow/old/StateTracking.qll +++ b/python/ql/lib/semmle/python/dataflow/old/StateTracking.qll @@ -9,9 +9,7 @@ */ import python -private import semmle.python.pointsto.PointsTo -private import semmle.python.pointsto.PointsToContext -private import semmle.python.objects.ObjectInternal +private import LegacyPointsTo /** A state that should be tracked. */ abstract class TrackableState extends string { diff --git a/python/ql/lib/semmle/python/dataflow/old/TaintTracking.qll b/python/ql/lib/semmle/python/dataflow/old/TaintTracking.qll index 15459a31043..8dfa344f458 100644 --- a/python/ql/lib/semmle/python/dataflow/old/TaintTracking.qll +++ b/python/ql/lib/semmle/python/dataflow/old/TaintTracking.qll @@ -89,7 +89,6 @@ import python private import LegacyPointsTo private import semmle.python.pointsto.Filters as Filters -private import semmle.python.objects.ObjectInternal private import semmle.python.dataflow.Implementation import semmle.python.dataflow.Configuration diff --git a/python/ql/lib/semmle/python/dependencies/DependencyKind.qll b/python/ql/lib/semmle/python/dependencies/DependencyKind.qll index 2e4fab1af0b..4ceda85ff41 100644 --- a/python/ql/lib/semmle/python/dependencies/DependencyKind.qll +++ b/python/ql/lib/semmle/python/dependencies/DependencyKind.qll @@ -1,4 +1,5 @@ import semmle.python.dependencies.Dependencies +private import LegacyPointsTo /** * A library describing an abstract mechanism for representing dependency categories. diff --git a/python/ql/lib/semmle/python/dependencies/TechInventory.qll b/python/ql/lib/semmle/python/dependencies/TechInventory.qll index 20a938b86d0..2c29a05c48b 100644 --- a/python/ql/lib/semmle/python/dependencies/TechInventory.qll +++ b/python/ql/lib/semmle/python/dependencies/TechInventory.qll @@ -1,6 +1,7 @@ import python import semmle.python.dependencies.Dependencies import semmle.python.dependencies.DependencyKind +private import LegacyPointsTo /** * Combine the source-file and package into a single string: diff --git a/python/ql/lib/semmle/python/essa/Definitions.qll b/python/ql/lib/semmle/python/essa/Definitions.qll index 9c0df69c28e..aca6991b9f6 100644 --- a/python/ql/lib/semmle/python/essa/Definitions.qll +++ b/python/ql/lib/semmle/python/essa/Definitions.qll @@ -1,5 +1,4 @@ import python - /* * Classification of variables. These should be non-overlapping and complete. * @@ -12,6 +11,9 @@ import python * Escaping globals -- Global variables that have definitions and at least one of those definitions is in another scope. */ +private import semmle.python.types.ImportTime +private import semmle.python.essa.SsaDefinitions + /** A source language variable, to be converted into a set of SSA variables. */ abstract class SsaSourceVariable extends @py_variable { SsaSourceVariable() { @@ -274,6 +276,17 @@ class ModuleVariable extends SsaSourceVariable instanceof GlobalVariable { override CallNode redefinedAtCallSite() { none() } } +/** Holds if `f` is an import of the form `from .[...] import ...` and the enclosing scope is an __init__ module */ +private predicate import_from_dot_in_init(ImportExprNode f) { + f.getScope() = any(Module m).getInitModule() and + ( + f.getNode().getLevel() = 1 and + not exists(f.getNode().getName()) + or + f.getNode().getImportedModuleName() = f.getEnclosingModule().getPackage().getName() + ) +} + class NonEscapingGlobalVariable extends ModuleVariable { NonEscapingGlobalVariable() { this instanceof GlobalVariable and diff --git a/python/ql/lib/semmle/python/essa/Essa.qll b/python/ql/lib/semmle/python/essa/Essa.qll index cf2aca1e2ac..384bfd2f91f 100644 --- a/python/ql/lib/semmle/python/essa/Essa.qll +++ b/python/ql/lib/semmle/python/essa/Essa.qll @@ -6,6 +6,7 @@ import python private import SsaCompute import semmle.python.essa.Definitions private import semmle.python.internal.CachedStages +private import semmle.python.essa.SsaDefinitions /** An (enhanced) SSA variable derived from `SsaSourceVariable`. */ class EssaVariable extends TEssaDefinition { diff --git a/python/ql/lib/semmle/python/essa/SsaDefinitions.qll b/python/ql/lib/semmle/python/essa/SsaDefinitions.qll index 0c1c8836f4e..6c87af102fa 100644 --- a/python/ql/lib/semmle/python/essa/SsaDefinitions.qll +++ b/python/ql/lib/semmle/python/essa/SsaDefinitions.qll @@ -6,6 +6,13 @@ import python private import semmle.python.internal.CachedStages +/** Hold if `expr` is a test (a branch) and `use` is within that test */ +predicate test_contains(ControlFlowNode expr, ControlFlowNode use) { + expr.getNode() instanceof Expr and + expr.isBranch() and + expr.getAChild*() = use +} + cached module SsaSource { /** Holds if `v` is used as the receiver in a method call. */ diff --git a/python/ql/lib/semmle/python/frameworks/Socketio.qll b/python/ql/lib/semmle/python/frameworks/Socketio.qll new file mode 100644 index 00000000000..4006dcfbe7d --- /dev/null +++ b/python/ql/lib/semmle/python/frameworks/Socketio.qll @@ -0,0 +1,119 @@ +/** + * Provides definitions and modeling for the `python-socketio` PyPI package. + * See https://python-socketio.readthedocs.io/en/stable/. + */ + +private import python +private import semmle.python.dataflow.new.TaintTracking +private import semmle.python.dataflow.new.RemoteFlowSources +private import semmle.python.Concepts +private import semmle.python.ApiGraphs +private import semmle.python.frameworks.internal.PoorMansFunctionResolution + +/** + * Provides models for the `python-socketio` PyPI package. + * See https://python-socketio.readthedocs.io/en/stable/. + */ +module SocketIO { + /** Provides models for socketio `Server` and `AsyncServer` classes. */ + module Server { + /** Gets an instance of a socketio `Server` or `AsyncServer`. */ + API::Node server() { + result = API::moduleImport("socketio").getMember(["Server", "AsyncServer"]).getAnInstance() + } + + /** Gets a decorator that indicates a socketio event handler. */ + private API::Node serverEventAnnotation() { + result = server().getMember("event") + or + result = server().getMember("on").getReturn() + } + + private class EventHandler extends Http::Server::RequestHandler::Range { + EventHandler() { + serverEventAnnotation().getAValueReachableFromSource().asExpr() = this.getADecorator() + or + exists(DataFlow::CallCfgNode c, DataFlow::Node arg | + c = server().getMember("on").getACall() + | + ( + arg = c.getArg(1) + or + arg = c.getArgByName("handler") + ) and + poorMansFunctionTracker(this) = arg + ) + } + + override Parameter getARoutedParameter() { + result = this.getAnArg() and + not result = this.getArg(0) // First parameter is `sid`, which is not a remote flow source as it cannot be controlled by the client. + } + + override string getFramework() { result = "socketio" } + } + + private class CallbackArgument extends DataFlow::Node { + CallbackArgument() { + exists(DataFlow::CallCfgNode c | + c = [server(), Namespace::instance()].getMember(["emit", "send"]).getACall() + | + this = c.getArgByName("callback") + ) + } + } + + private class CallbackHandler extends Http::Server::RequestHandler::Range { + CallbackHandler() { any(CallbackArgument ca) = poorMansFunctionTracker(this) } + + override Parameter getARoutedParameter() { result = this.getAnArg() } + + override string getFramework() { result = "socketio" } + } + + private class SocketIOCall extends RemoteFlowSource::Range { + SocketIOCall() { this = [server(), Namespace::instance()].getMember("call").getACall() } + + override string getSourceType() { result = "socketio call" } + } + } + + /** Provides modeling for socketio server Namespace/AsyncNamespace classes. */ + module Namespace { + /** Gets a reference to the `socketio.Namespace` or `socketio.AsyncNamespace` classes or any subclass. */ + API::Node subclassRef() { + result = + API::moduleImport("socketio").getMember(["Namespace", "AsyncNamespace"]).getASubclass*() + } + + /** Gets a reference to an instance of a subclass of `socketio.Namespace` or `socketio.AsyncNamespace`. */ + API::Node instance() { + result = subclassRef().getAnInstance() + or + result = subclassRef().getAMember().getSelfParameter() + } + + /** A socketio Namespace class. */ + class NamespaceClass extends Class { + NamespaceClass() { this.getABase() = subclassRef().asSource().asExpr() } + + /** Gets a handler for socketio events. */ + Function getAnEventHandler() { + result = this.getAMethod() and + result.getName().matches("on_%") + } + } + + private class NamespaceEventHandler extends Http::Server::RequestHandler::Range { + NamespaceEventHandler() { this = any(NamespaceClass nc).getAnEventHandler() } + + override Parameter getARoutedParameter() { + result = this.getAnArg() and + not result = this.getArg(0) and + not result = this.getArg(1) // First 2 parameters are `self` and `sid`. + } + + override string getFramework() { result = "socketio" } + } + } +} diff --git a/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml b/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml index cdbb451b673..a01bf1b40ba 100644 --- a/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml +++ b/python/ql/lib/semmle/python/frameworks/Stdlib.model.yml @@ -142,6 +142,8 @@ extensions: - ["typing", "Member[cast]", "Argument[1,val:]", "ReturnValue", "value"] # See https://docs.python.org/3/library/urllib.parse.html#urllib.parse.parse_qs - ["urllib", "Member[parse].Member[parse_qs]", "Argument[0,qs:]", "ReturnValue", "taint"] + # See https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlparse + - ["urllib", "Member[parse].Member[urlparse]", "Argument[0,urlstring:]", "ReturnValue", "taint"] # See https://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote - ["urllib", "Member[parse].Member[quote]", "Argument[0,string:]", "ReturnValue", "taint"] # See https://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote_plus @@ -181,7 +183,9 @@ extensions: - addsTo: pack: codeql/python-all extensible: typeModel - data: [] + data: + # See https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlparse + - ["urllib.parse.ParseResult~Subclass", 'urllib', 'Member[parse].Member[urlparse]'] - addsTo: pack: codeql/python-all diff --git a/python/ql/lib/semmle/python/frameworks/Stdlib.qll b/python/ql/lib/semmle/python/frameworks/Stdlib.qll index c6b671e8b78..143a575c6e9 100644 --- a/python/ql/lib/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/lib/semmle/python/frameworks/Stdlib.qll @@ -245,6 +245,67 @@ module Stdlib { } } + /** + * Provides models for the `urllib.parse.ParseResult` class + * + * See https://docs.python.org/3.9/library/urllib.parse.html#urllib.parse.ParseResult. + */ + module ParseResult { + /** Gets a reference to the `urllib.parse.ParseResult` class. */ + API::Node classRef() { + result = API::moduleImport("urllib").getMember("parse").getMember("ParseResult") + or + result = ModelOutput::getATypeNode("urllib.parse.ParseResult~Subclass").getASubclass*() + } + + /** + * A source of instances of `urllib.parse.ParseResult`, extend this class to model new instances. + * + * This can include instantiations of the class, return values from function + * calls, or a special parameter that will be set when functions are called by an external + * library. + * + * Use the predicate `ParseResult::instance()` to get references to instances of `urllib.parse.ParseResult`. + */ + abstract class InstanceSource extends DataFlow::LocalSourceNode { } + + /** A direct instantiation of `urllib.parse.ParseResult`. */ + private class ClassInstantiation extends InstanceSource, DataFlow::CallCfgNode { + ClassInstantiation() { this = classRef().getACall() } + } + + /** Gets a reference to an instance of `urllib.parse.ParseResult`. */ + private DataFlow::TypeTrackingNode instance(DataFlow::TypeTracker t) { + t.start() and + result instanceof InstanceSource + or + exists(DataFlow::TypeTracker t2 | result = instance(t2).track(t2, t)) + } + + /** Gets a reference to an instance of `urllib.parse.ParseResult`. */ + DataFlow::Node instance() { instance(DataFlow::TypeTracker::end()).flowsTo(result) } + + /** + * Taint propagation for `urllib.parse.ParseResult`. + */ + private class InstanceTaintSteps extends InstanceTaintStepsHelper { + InstanceTaintSteps() { this = "urllib.parse.ParseResult" } + + override DataFlow::Node getInstance() { result = instance() } + + override string getAttributeName() { + result in [ + "netloc", "path", "params", "query", "fragment", "username", "password", "hostname", + "port" + ] + } + + override string getMethodName() { none() } + + override string getAsyncMethodName() { none() } + } + } + // --------------------------------------------------------------------------- // logging // --------------------------------------------------------------------------- diff --git a/python/ql/lib/semmle/python/frameworks/Tornado.qll b/python/ql/lib/semmle/python/frameworks/Tornado.qll index 7cfe381b1f9..61cf7df316e 100644 --- a/python/ql/lib/semmle/python/frameworks/Tornado.qll +++ b/python/ql/lib/semmle/python/frameworks/Tornado.qll @@ -135,6 +135,8 @@ module Tornado { API::Node subclassRef() { result = web().getMember("RequestHandler").getASubclass*() or + result = WebSocket::WebSocketHandler::subclassRef() + or result = ModelOutput::getATypeNode("tornado.web.RequestHandler~Subclass").getASubclass*() } @@ -428,6 +430,49 @@ module Tornado { } } } + + // --------------------------------------------------------------------------- + // tornado.websocket + // --------------------------------------------------------------------------- + /** Gets a reference to the `tornado.websocket` module. */ + API::Node websocket() { result = Tornado::tornado().getMember("websocket") } + + /** Provides models for the `tornado.websocket` module */ + module WebSocket { + /** + * Provides models for the `tornado.websocket.WebSocketHandler` class and subclasses. + * + * See https://www.tornadoweb.org/en/stable/websocket.html#tornado.websocket.WebSocketHandler. + */ + module WebSocketHandler { + /** Gets a reference to the `tornado.websocket.WebSocketHandler` class or any subclass. */ + API::Node subclassRef() { + result = websocket().getMember("WebSocketHandler").getASubclass*() + or + result = + ModelOutput::getATypeNode("tornado.websocket.WebSocketHandler~Subclass").getASubclass*() + } + + /** A subclass of `tornado.websocket.WebSocketHandler`. */ + class WebSocketHandlerClass extends Web::RequestHandler::RequestHandlerClass { + WebSocketHandlerClass() { this.getParent() = subclassRef().asSource().asExpr() } + + override Function getARequestHandler() { + result = super.getARequestHandler() + or + result = this.getAMethod() and + result.getName() = "open" + } + + /** Gets a function that could handle incoming WebSocket events, if any. */ + Function getAWebSocketEventHandler() { + result = this.getAMethod() and + result.getName() = + ["on_message", "on_close", "on_ping", "on_pong", "select_subprotocol", "check_origin"] + } + } + } + } } // --------------------------------------------------------------------------- @@ -542,6 +587,27 @@ module Tornado { override string getFramework() { result = "Tornado" } } + /** A request handler for WebSocket events. */ + private class TornadoWebSocketEventHandler extends Http::Server::RequestHandler::Range { + TornadoWebSocketEventHandler() { + exists(TornadoModule::WebSocket::WebSocketHandler::WebSocketHandlerClass cls | + cls.getAWebSocketEventHandler() = this + ) + } + + override Parameter getARoutedParameter() { + // The `open` method is handled as a normal request handler in `TornadoRouteSetup` or `TornadoRequestHandlerWithoutKnownRoute`. + // For other event handlers (such as `on_message`), all parameters should be remote flow sources, as they are not affected by routing. + result in [ + this.getArg(_), this.getArgByName(_), this.getVararg().(Parameter), + this.getKwarg().(Parameter) + ] and + not result = this.getArg(0) + } + + override string getFramework() { result = "Tornado" } + } + // --------------------------------------------------------------------------- // Response modeling // --------------------------------------------------------------------------- diff --git a/python/ql/lib/semmle/python/internal/OverlayXml.qll b/python/ql/lib/semmle/python/internal/OverlayXml.qll new file mode 100644 index 00000000000..95d49f2d611 --- /dev/null +++ b/python/ql/lib/semmle/python/internal/OverlayXml.qll @@ -0,0 +1,46 @@ +overlay[local] +module; + +/** + * A local predicate that always holds for the overlay variant and never holds for the base variant. + * This is used to define local predicates that behave differently for the base and overlay variant. + */ +private predicate isOverlay() { databaseMetadata("isOverlay", "true") } + +private string getXmlFile(@xmllocatable locatable) { + exists(@location_default location, @file file | xmllocations(locatable, location) | + locations_default(location, file, _, _, _, _) and + files(file, result) + ) +} + +private string getXmlFileInBase(@xmllocatable locatable) { + not isOverlay() and + result = getXmlFile(locatable) +} + +/** + * Holds if the given `file` was extracted as part of the overlay and was extracted by the HTML/XML + * extractor. + */ +private predicate overlayXmlExtracted(string file) { + isOverlay() and + exists(@xmllocatable locatable | + not files(locatable, _) and not xmlNs(locatable, _, _, _) and file = getXmlFile(locatable) + ) +} + +/** + * Holds if the given XML `locatable` should be discarded, because it is part of the overlay base + * and is in a file that was also extracted as part of the overlay database. + */ +overlay[discard_entity] +private predicate discardXmlLocatable(@xmllocatable locatable) { + exists(string file | file = getXmlFileInBase(locatable) | + overlayChangedFiles(file) + or + // The HTML/XML extractor is currently not incremental and may extract more files than those + // included in overlayChangedFiles. + overlayXmlExtracted(file) + ) +} diff --git a/python/ql/lib/semmle/python/libraries/Zope.qll b/python/ql/lib/semmle/python/libraries/Zope.qll index fea3cecf418..defea3e4720 100644 --- a/python/ql/lib/semmle/python/libraries/Zope.qll +++ b/python/ql/lib/semmle/python/libraries/Zope.qll @@ -1,7 +1,7 @@ /** Utilities for handling the zope libraries */ import python -private import semmle.python.pointsto.PointsTo +private import LegacyPointsTo /** A method that belongs to a sub-class of `zope.interface.Interface` */ class ZopeInterfaceMethodValue extends PythonFunctionValue { diff --git a/python/ql/lib/semmle/python/objects/Constants.qll b/python/ql/lib/semmle/python/objects/Constants.qll index 31b63399ff4..49221df5b67 100644 --- a/python/ql/lib/semmle/python/objects/Constants.qll +++ b/python/ql/lib/semmle/python/objects/Constants.qll @@ -5,6 +5,7 @@ private import semmle.python.pointsto.PointsTo private import semmle.python.pointsto.MRO private import semmle.python.pointsto.PointsToContext private import semmle.python.types.Builtins +private import semmle.python.objects.ObjectAPI /** * A constant. diff --git a/python/ql/lib/semmle/python/objects/Descriptors.qll b/python/ql/lib/semmle/python/objects/Descriptors.qll index 2c18708e16a..5cb855ee5ca 100644 --- a/python/ql/lib/semmle/python/objects/Descriptors.qll +++ b/python/ql/lib/semmle/python/objects/Descriptors.qll @@ -5,6 +5,7 @@ private import semmle.python.pointsto.PointsTo private import semmle.python.pointsto.PointsToContext private import semmle.python.pointsto.MRO private import semmle.python.types.Builtins +private import semmle.python.pointsto.Context /** A property object. */ class PropertyInternal extends ObjectInternal, TProperty { diff --git a/python/ql/lib/semmle/python/objects/Instances.qll b/python/ql/lib/semmle/python/objects/Instances.qll index 0b4187b6928..2ae00502902 100644 --- a/python/ql/lib/semmle/python/objects/Instances.qll +++ b/python/ql/lib/semmle/python/objects/Instances.qll @@ -5,6 +5,8 @@ private import semmle.python.pointsto.PointsTo private import semmle.python.pointsto.MRO private import semmle.python.pointsto.PointsToContext private import semmle.python.types.Builtins +private import semmle.python.pointsto.Context +private import semmle.python.pointsto.Base /** A class representing instances */ abstract class InstanceObject extends ObjectInternal { diff --git a/python/ql/lib/semmle/python/objects/Modules.qll b/python/ql/lib/semmle/python/objects/Modules.qll index e523ad0b70a..8c5653fa2a3 100644 --- a/python/ql/lib/semmle/python/objects/Modules.qll +++ b/python/ql/lib/semmle/python/objects/Modules.qll @@ -5,6 +5,7 @@ private import semmle.python.pointsto.PointsTo private import semmle.python.pointsto.MRO private import semmle.python.pointsto.PointsToContext private import semmle.python.types.Builtins +private import semmle.python.types.ImportTime /** A class representing modules */ abstract class ModuleObjectInternal extends ObjectInternal { diff --git a/python/ql/lib/semmle/python/objects/ObjectAPI.qll b/python/ql/lib/semmle/python/objects/ObjectAPI.qll index 45247c5d9d4..a5d4d91cc7a 100644 --- a/python/ql/lib/semmle/python/objects/ObjectAPI.qll +++ b/python/ql/lib/semmle/python/objects/ObjectAPI.qll @@ -6,9 +6,6 @@ import python private import LegacyPointsTo private import TObject -private import semmle.python.objects.ObjectInternal -private import semmle.python.pointsto.PointsTo -private import semmle.python.pointsto.PointsToContext private import semmle.python.pointsto.MRO private import semmle.python.types.Builtins diff --git a/python/ql/lib/semmle/python/objects/TObject.qll b/python/ql/lib/semmle/python/objects/TObject.qll index 12b4dc901c3..c041827ff5a 100644 --- a/python/ql/lib/semmle/python/objects/TObject.qll +++ b/python/ql/lib/semmle/python/objects/TObject.qll @@ -6,6 +6,7 @@ private import semmle.python.objects.ObjectInternal private import semmle.python.pointsto.PointsTo private import semmle.python.pointsto.PointsToContext private import semmle.python.internal.CachedStages +private import semmle.python.pointsto.Context /** * Internal type backing `ObjectInternal` and `Value` diff --git a/python/ql/lib/semmle/python/pointsto/Base.qll b/python/ql/lib/semmle/python/pointsto/Base.qll index 56dc633eb9c..bf159c4b559 100644 --- a/python/ql/lib/semmle/python/pointsto/Base.qll +++ b/python/ql/lib/semmle/python/pointsto/Base.qll @@ -12,6 +12,8 @@ import python import semmle.python.essa.SsaDefinitions private import semmle.python.types.Builtins private import semmle.python.internal.CachedStages +private import semmle.python.types.Object +private import semmle.python.types.ClassObject /* * The following predicates exist in order to provide @@ -42,24 +44,6 @@ private predicate class_defines_name(Class cls, string name) { exists(SsaVariable var | name = var.getId() and var.getAUse() = cls.getANormalExit()) } -/** Hold if `expr` is a test (a branch) and `use` is within that test */ -predicate test_contains(ControlFlowNode expr, ControlFlowNode use) { - expr.getNode() instanceof Expr and - expr.isBranch() and - expr.getAChild*() = use -} - -/** Holds if `f` is an import of the form `from .[...] import ...` and the enclosing scope is an __init__ module */ -predicate import_from_dot_in_init(ImportExprNode f) { - f.getScope() = any(Module m).getInitModule() and - ( - f.getNode().getLevel() = 1 and - not exists(f.getNode().getName()) - or - f.getNode().getImportedModuleName() = f.getEnclosingModule().getPackage().getName() - ) -} - /** Gets the pseudo-object representing the value referred to by an undefined variable */ Object undefinedVariable() { py_special_objects(result, "_semmle_undefined_value") } diff --git a/python/ql/lib/semmle/python/pointsto/CallGraph.qll b/python/ql/lib/semmle/python/pointsto/CallGraph.qll index da225439588..734a5540254 100644 --- a/python/ql/lib/semmle/python/pointsto/CallGraph.qll +++ b/python/ql/lib/semmle/python/pointsto/CallGraph.qll @@ -11,6 +11,8 @@ import python private import semmle.python.pointsto.PointsToContext +private import semmle.python.types.FunctionObject +private import semmle.python.pointsto.Context private newtype TTInvocation = TInvocation(FunctionObject f, Context c) { diff --git a/python/ql/lib/semmle/python/pointsto/PointsTo.qll b/python/ql/lib/semmle/python/pointsto/PointsTo.qll index 56e8f6d6a63..66b82367de0 100644 --- a/python/ql/lib/semmle/python/pointsto/PointsTo.qll +++ b/python/ql/lib/semmle/python/pointsto/PointsTo.qll @@ -6,7 +6,13 @@ private import semmle.python.pointsto.PointsToContext private import semmle.python.pointsto.MRO private import semmle.python.types.Builtins private import semmle.python.types.Extensions +private import semmle.python.pointsto.Context private import semmle.python.internal.CachedStages +private import semmle.python.types.Object +private import semmle.python.types.FunctionObject +private import semmle.python.types.ClassObject +private import semmle.python.pointsto.Base +private import semmle.python.types.ImportTime /* Use this version for speed */ class CfgOrigin extends @py_object { diff --git a/python/ql/lib/semmle/python/pointsto/PointsToContext.qll b/python/ql/lib/semmle/python/pointsto/PointsToContext.qll index d68ce93e576..fb005b8f046 100644 --- a/python/ql/lib/semmle/python/pointsto/PointsToContext.qll +++ b/python/ql/lib/semmle/python/pointsto/PointsToContext.qll @@ -1,6 +1,8 @@ import python private import semmle.python.pointsto.PointsTo private import semmle.python.objects.ObjectInternal +private import semmle.python.types.ImportTime +private import semmle.python.types.Version /* * A note on 'cost'. Cost doesn't represent the cost to compute, diff --git a/python/ql/lib/semmle/python/security/dataflow/ServerSideRequestForgeryQuery.qll b/python/ql/lib/semmle/python/security/dataflow/ServerSideRequestForgeryQuery.qll index e60afa470ec..304e6376d2c 100644 --- a/python/ql/lib/semmle/python/security/dataflow/ServerSideRequestForgeryQuery.qll +++ b/python/ql/lib/semmle/python/security/dataflow/ServerSideRequestForgeryQuery.qll @@ -50,7 +50,7 @@ module FullServerSideRequestForgeryFlow = TaintTracking::Global 0 and type.getBaseType(i) = base and result = type.getBaseType(i - 1)) diff --git a/python/ql/src/Classes/MaybeUndefinedClassAttribute.ql b/python/ql/src/Classes/MaybeUndefinedClassAttribute.ql index 9818aaece3c..6c4138f4f57 100644 --- a/python/ql/src/Classes/MaybeUndefinedClassAttribute.ql +++ b/python/ql/src/Classes/MaybeUndefinedClassAttribute.ql @@ -12,6 +12,7 @@ import python import ClassAttributes +private import LegacyPointsTo predicate guarded_by_other_attribute(SelfAttributeRead a, CheckClass c) { c.sometimesDefines(a.getName()) and diff --git a/python/ql/src/Classes/MutatingDescriptor.ql b/python/ql/src/Classes/MutatingDescriptor.ql index aad468f8e3c..b597de92d2e 100644 --- a/python/ql/src/Classes/MutatingDescriptor.ql +++ b/python/ql/src/Classes/MutatingDescriptor.ql @@ -1,5 +1,5 @@ /** - * @name Mutation of descriptor in `__get__` or `__set__` method. + * @name Mutation of descriptor in `__get__` or `__set__` method * @description Descriptor objects can be shared across many instances. Mutating them can cause strange side effects or race conditions. * @kind problem * @tags quality @@ -12,6 +12,7 @@ */ import python +private import LegacyPointsTo predicate mutates_descriptor(ClassObject cls, SelfAttributeStore s) { cls.isDescriptorType() and diff --git a/python/ql/src/Classes/OverwritingAttributeInSuperClass.ql b/python/ql/src/Classes/OverwritingAttributeInSuperClass.ql index 699e4387a14..89d33d54814 100644 --- a/python/ql/src/Classes/OverwritingAttributeInSuperClass.ql +++ b/python/ql/src/Classes/OverwritingAttributeInSuperClass.ql @@ -12,6 +12,7 @@ */ import python +private import LegacyPointsTo class InitCallStmt extends ExprStmt { InitCallStmt() { diff --git a/python/ql/src/Classes/PropertyInOldStyleClass.ql b/python/ql/src/Classes/PropertyInOldStyleClass.ql index 6e1b9a063c0..2fd7b1d14cf 100644 --- a/python/ql/src/Classes/PropertyInOldStyleClass.ql +++ b/python/ql/src/Classes/PropertyInOldStyleClass.ql @@ -11,6 +11,7 @@ */ import python +private import LegacyPointsTo from PropertyObject prop, ClassObject cls where cls.declaredAttribute(_) = prop and not cls.failedInference() and not cls.isNewStyle() diff --git a/python/ql/src/Classes/ShouldBeContextManager.ql b/python/ql/src/Classes/ShouldBeContextManager.ql index 2423206e3cf..6aec0f0e0ab 100644 --- a/python/ql/src/Classes/ShouldBeContextManager.ql +++ b/python/ql/src/Classes/ShouldBeContextManager.ql @@ -14,6 +14,7 @@ */ import python +private import LegacyPointsTo from ClassValue c where not c.isBuiltin() and not c.isContextManager() and exists(c.declaredAttribute("__del__")) diff --git a/python/ql/src/Classes/SlotsInOldStyleClass.ql b/python/ql/src/Classes/SlotsInOldStyleClass.ql index bb229edc8d3..2f91a88cf64 100644 --- a/python/ql/src/Classes/SlotsInOldStyleClass.ql +++ b/python/ql/src/Classes/SlotsInOldStyleClass.ql @@ -12,6 +12,7 @@ */ import python +private import LegacyPointsTo from ClassObject c where not c.isNewStyle() and c.declaresAttribute("__slots__") and not c.failedInference() diff --git a/python/ql/src/Classes/SuperInOldStyleClass.ql b/python/ql/src/Classes/SuperInOldStyleClass.ql index deba0889449..a6a272b1b3b 100644 --- a/python/ql/src/Classes/SuperInOldStyleClass.ql +++ b/python/ql/src/Classes/SuperInOldStyleClass.ql @@ -11,6 +11,7 @@ */ import python +private import LegacyPointsTo predicate uses_of_super_in_old_style_class(Call s) { exists(Function f, ClassObject c | diff --git a/python/ql/src/Classes/UndefinedClassAttribute.ql b/python/ql/src/Classes/UndefinedClassAttribute.ql index 748c4681820..38dcb9b4a7d 100644 --- a/python/ql/src/Classes/UndefinedClassAttribute.ql +++ b/python/ql/src/Classes/UndefinedClassAttribute.ql @@ -12,6 +12,7 @@ import python import ClassAttributes +private import LegacyPointsTo predicate undefined_class_attribute(SelfAttributeRead a, CheckClass c, int line, string name) { name = a.getName() and diff --git a/python/ql/src/Classes/UselessClass.ql b/python/ql/src/Classes/UselessClass.ql index 7e33660dafc..740c74bf96d 100644 --- a/python/ql/src/Classes/UselessClass.ql +++ b/python/ql/src/Classes/UselessClass.ql @@ -13,6 +13,7 @@ */ import python +private import LegacyPointsTo predicate fewer_than_two_public_methods(Class cls, int methods) { (methods = 0 or methods = 1) and diff --git a/python/ql/src/Classes/WrongNameForArgumentInClassInstantiation.ql b/python/ql/src/Classes/WrongNameForArgumentInClassInstantiation.ql index 1de99ebdbf6..5b50855dcdf 100644 --- a/python/ql/src/Classes/WrongNameForArgumentInClassInstantiation.ql +++ b/python/ql/src/Classes/WrongNameForArgumentInClassInstantiation.ql @@ -16,6 +16,7 @@ import python import Expressions.CallArgs +private import LegacyPointsTo from Call call, ClassValue cls, string name, FunctionValue init where diff --git a/python/ql/src/Classes/WrongNumberArgumentsInClassInstantiation.ql b/python/ql/src/Classes/WrongNumberArgumentsInClassInstantiation.ql index 8518905f3a9..263a1a336a1 100644 --- a/python/ql/src/Classes/WrongNumberArgumentsInClassInstantiation.ql +++ b/python/ql/src/Classes/WrongNumberArgumentsInClassInstantiation.ql @@ -15,6 +15,7 @@ import python import Expressions.CallArgs +private import LegacyPointsTo from Call call, ClassValue cls, string too, string should, int limit, FunctionValue init where diff --git a/python/ql/src/Exceptions/IllegalExceptionHandlerType.ql b/python/ql/src/Exceptions/IllegalExceptionHandlerType.ql index 2bf97b469ee..dc1c3f2fa35 100644 --- a/python/ql/src/Exceptions/IllegalExceptionHandlerType.ql +++ b/python/ql/src/Exceptions/IllegalExceptionHandlerType.ql @@ -12,8 +12,9 @@ */ import python +private import LegacyPointsTo -from ExceptFlowNode ex, Value t, ClassValue c, ControlFlowNode origin, string what +from ExceptFlowNodeWithPointsTo ex, Value t, ClassValue c, ControlFlowNode origin, string what where ex.handledException(t, c, origin) and ( diff --git a/python/ql/src/Exceptions/IllegalRaise.ql b/python/ql/src/Exceptions/IllegalRaise.ql index 04319e246ed..f9f263552b1 100644 --- a/python/ql/src/Exceptions/IllegalRaise.ql +++ b/python/ql/src/Exceptions/IllegalRaise.ql @@ -14,6 +14,7 @@ import python import Raising import Exceptions.NotImplemented +private import LegacyPointsTo from Raise r, ClassValue t where diff --git a/python/ql/src/Expressions/ContainsNonContainer.ql b/python/ql/src/Expressions/ContainsNonContainer.ql index fd2123dd436..de8c3879567 100644 --- a/python/ql/src/Expressions/ContainsNonContainer.ql +++ b/python/ql/src/Expressions/ContainsNonContainer.ql @@ -13,7 +13,6 @@ import python private import LegacyPointsTo -import semmle.python.pointsto.PointsTo predicate rhs_in_expr(ControlFlowNode rhs, Compare cmp) { exists(Cmpop op, int i | cmp.getOp(i) = op and cmp.getComparator(i) = rhs.getNode() | diff --git a/python/ql/src/Expressions/IsComparisons.qll b/python/ql/src/Expressions/IsComparisons.qll index 1ed4534bd23..cb052ceca76 100644 --- a/python/ql/src/Expressions/IsComparisons.qll +++ b/python/ql/src/Expressions/IsComparisons.qll @@ -2,7 +2,6 @@ import python private import LegacyPointsTo -private import semmle.python.objects.ObjectInternal /** Holds if the comparison `comp` uses `is` or `is not` (represented as `op`) to compare its `left` and `right` arguments. */ predicate comparison_using_is(Compare comp, ControlFlowNode left, Cmpop op, ControlFlowNode right) { diff --git a/python/ql/src/Expressions/NonPortableComparisonUsingIs.ql b/python/ql/src/Expressions/NonPortableComparisonUsingIs.ql index 894cc78c8f4..d705bea0765 100644 --- a/python/ql/src/Expressions/NonPortableComparisonUsingIs.ql +++ b/python/ql/src/Expressions/NonPortableComparisonUsingIs.ql @@ -13,6 +13,7 @@ import python import IsComparisons +private import LegacyPointsTo from Compare comp, Cmpop op, ClassValue c where diff --git a/python/ql/src/Expressions/RedundantComparison.qll b/python/ql/src/Expressions/RedundantComparison.qll index a0d4f906501..dc40a89c784 100644 --- a/python/ql/src/Expressions/RedundantComparison.qll +++ b/python/ql/src/Expressions/RedundantComparison.qll @@ -1,6 +1,7 @@ /** Helper functions for queries that test redundant comparisons. */ import python +private import LegacyPointsTo /** A comparison where the left and right hand sides appear to be identical. */ class RedundantComparison extends Compare { diff --git a/python/ql/src/Expressions/WrongNameForArgumentInCall.ql b/python/ql/src/Expressions/WrongNameForArgumentInCall.ql index 21403c51c61..f267df13e19 100644 --- a/python/ql/src/Expressions/WrongNameForArgumentInCall.ql +++ b/python/ql/src/Expressions/WrongNameForArgumentInCall.ql @@ -16,6 +16,7 @@ import python import Expressions.CallArgs +private import LegacyPointsTo from Call call, FunctionObject func, string name where diff --git a/python/ql/src/Expressions/WrongNumberArgumentsForFormat.ql b/python/ql/src/Expressions/WrongNumberArgumentsForFormat.ql index d7b27e5c3d7..cf741d4cf64 100644 --- a/python/ql/src/Expressions/WrongNumberArgumentsForFormat.ql +++ b/python/ql/src/Expressions/WrongNumberArgumentsForFormat.ql @@ -15,7 +15,6 @@ import python import LegacyPointsTo -import semmle.python.objects.ObjectInternal import semmle.python.strings predicate string_format(BinaryExpr operation, StringLiteral str, Value args, AstNode origin) { diff --git a/python/ql/src/Expressions/WrongNumberArgumentsInCall.ql b/python/ql/src/Expressions/WrongNumberArgumentsInCall.ql index bde54558c9b..35d9341fb05 100644 --- a/python/ql/src/Expressions/WrongNumberArgumentsInCall.ql +++ b/python/ql/src/Expressions/WrongNumberArgumentsInCall.ql @@ -13,6 +13,7 @@ */ import python +private import LegacyPointsTo import CallArgs from Call call, FunctionValue func, string too, string should, int limit diff --git a/python/ql/src/Functions/ConsistentReturns.ql b/python/ql/src/Functions/ConsistentReturns.ql index 1bc7b5724b3..9beeafc6372 100644 --- a/python/ql/src/Functions/ConsistentReturns.ql +++ b/python/ql/src/Functions/ConsistentReturns.ql @@ -12,6 +12,7 @@ */ import python +private import LegacyPointsTo predicate explicitly_returns_non_none(Function func) { exists(Return return | @@ -21,7 +22,7 @@ predicate explicitly_returns_non_none(Function func) { } predicate has_implicit_return(Function func) { - exists(ControlFlowNode fallthru | + exists(ControlFlowNodeWithPointsTo fallthru | fallthru = func.getFallthroughNode() and not fallthru.unlikelyReachable() ) or diff --git a/python/ql/src/Functions/DeprecatedSliceMethod.ql b/python/ql/src/Functions/DeprecatedSliceMethod.ql index af596f704cd..3e9cdb681d9 100644 --- a/python/ql/src/Functions/DeprecatedSliceMethod.ql +++ b/python/ql/src/Functions/DeprecatedSliceMethod.ql @@ -10,6 +10,7 @@ */ import python +private import LegacyPointsTo predicate slice_method_name(string name) { name = "__getslice__" or name = "__setslice__" or name = "__delslice__" diff --git a/python/ql/src/Functions/IncorrectlyOverriddenMethod.ql b/python/ql/src/Functions/IncorrectlyOverriddenMethod.ql index a4e3bd6e0ce..0a640d46239 100644 --- a/python/ql/src/Functions/IncorrectlyOverriddenMethod.ql +++ b/python/ql/src/Functions/IncorrectlyOverriddenMethod.ql @@ -14,6 +14,7 @@ import python import Expressions.CallArgs +private import LegacyPointsTo from Call call, FunctionValue func, FunctionValue overridden, string problem where diff --git a/python/ql/src/Functions/IncorrectlySpecifiedOverriddenMethod.ql b/python/ql/src/Functions/IncorrectlySpecifiedOverriddenMethod.ql index 6b31795d94e..18cbddaff31 100644 --- a/python/ql/src/Functions/IncorrectlySpecifiedOverriddenMethod.ql +++ b/python/ql/src/Functions/IncorrectlySpecifiedOverriddenMethod.ql @@ -14,6 +14,7 @@ import python import Expressions.CallArgs +private import LegacyPointsTo from Call call, FunctionValue func, FunctionValue overriding, string problem where diff --git a/python/ql/src/Functions/IterReturnsNonIterator.ql b/python/ql/src/Functions/IterReturnsNonIterator.ql index 367332cf49a..08234726314 100644 --- a/python/ql/src/Functions/IterReturnsNonIterator.ql +++ b/python/ql/src/Functions/IterReturnsNonIterator.ql @@ -12,6 +12,7 @@ */ import python +private import LegacyPointsTo from ClassValue iterable, FunctionValue iter, ClassValue iterator where diff --git a/python/ql/src/Functions/OverlyComplexDelMethod.ql b/python/ql/src/Functions/OverlyComplexDelMethod.ql index b93dc4af3c3..12776db1b60 100644 --- a/python/ql/src/Functions/OverlyComplexDelMethod.ql +++ b/python/ql/src/Functions/OverlyComplexDelMethod.ql @@ -12,11 +12,12 @@ */ import python +private import LegacyPointsTo from FunctionValue method where exists(ClassValue c | c.declaredAttribute("__del__") = method and - method.getScope().getMetrics().getCyclomaticComplexity() > 3 + method.getScope().(FunctionMetrics).getCyclomaticComplexity() > 3 ) select method, "Overly complex '__del__' method." diff --git a/python/ql/src/Functions/ReturnValueIgnored.ql b/python/ql/src/Functions/ReturnValueIgnored.ql index d8f81534b8a..3716b989d89 100644 --- a/python/ql/src/Functions/ReturnValueIgnored.ql +++ b/python/ql/src/Functions/ReturnValueIgnored.ql @@ -14,7 +14,7 @@ */ import python -import semmle.python.objects.Callables +private import LegacyPointsTo predicate meaningful_return_value(Expr val) { val instanceof Name diff --git a/python/ql/src/Imports/Cyclic.qll b/python/ql/src/Imports/Cyclic.qll index 720ea8f0048..ad24a08eddd 100644 --- a/python/ql/src/Imports/Cyclic.qll +++ b/python/ql/src/Imports/Cyclic.qll @@ -1,5 +1,6 @@ import python private import LegacyPointsTo +private import semmle.python.types.ImportTime predicate is_import_time(Stmt s) { not s.getScope+() instanceof Function } diff --git a/python/ql/src/Imports/CyclicImport.ql b/python/ql/src/Imports/CyclicImport.ql index 9e4a153a110..464d906db98 100644 --- a/python/ql/src/Imports/CyclicImport.ql +++ b/python/ql/src/Imports/CyclicImport.ql @@ -13,6 +13,7 @@ import python import Cyclic +private import LegacyPointsTo from ModuleValue m1, ModuleValue m2, Stmt imp where diff --git a/python/ql/src/Imports/ModuleImportsItself.ql b/python/ql/src/Imports/ModuleImportsItself.ql index 72d223da3db..97fb68791d1 100644 --- a/python/ql/src/Imports/ModuleImportsItself.ql +++ b/python/ql/src/Imports/ModuleImportsItself.ql @@ -12,6 +12,7 @@ */ import python +private import LegacyPointsTo predicate modules_imports_itself(ImportingStmt i, ModuleValue m) { i.getEnclosingModule() = m.getScope() and diff --git a/python/ql/src/Imports/ModuleLevelCyclicImport.ql b/python/ql/src/Imports/ModuleLevelCyclicImport.ql index 7d9b0cc31c7..7910cb76823 100644 --- a/python/ql/src/Imports/ModuleLevelCyclicImport.ql +++ b/python/ql/src/Imports/ModuleLevelCyclicImport.ql @@ -14,6 +14,7 @@ import python import Cyclic +private import LegacyPointsTo // This is a potentially crashing bug if // 1. the imports in the whole cycle are lexically outside a def (and so executed at import time) diff --git a/python/ql/src/Imports/UnintentionalImport.ql b/python/ql/src/Imports/UnintentionalImport.ql index 1faf3bb55f3..db1775a0d41 100644 --- a/python/ql/src/Imports/UnintentionalImport.ql +++ b/python/ql/src/Imports/UnintentionalImport.ql @@ -13,6 +13,8 @@ */ import python +private import LegacyPointsTo +private import semmle.python.types.ImportTime predicate import_star(ImportStar imp, ModuleValue exporter) { exporter.importedAs(imp.getImportedModuleName()) diff --git a/python/ql/src/Metrics/CLinesOfCode.ql b/python/ql/src/Metrics/CLinesOfCode.ql index c7b29615593..66a107a521f 100644 --- a/python/ql/src/Metrics/CLinesOfCode.ql +++ b/python/ql/src/Metrics/CLinesOfCode.ql @@ -10,6 +10,7 @@ */ import python +private import LegacyPointsTo -from Function f -select f, f.getMetrics().getNumberOfLinesOfCode() as n order by n desc +from FunctionMetrics f +select f, f.getNumberOfLinesOfCode() as n order by n desc diff --git a/python/ql/src/Metrics/ClassAfferentCoupling.ql b/python/ql/src/Metrics/ClassAfferentCoupling.ql index 295e8c61a6c..3faf714d09c 100644 --- a/python/ql/src/Metrics/ClassAfferentCoupling.ql +++ b/python/ql/src/Metrics/ClassAfferentCoupling.ql @@ -11,6 +11,7 @@ */ import python +private import LegacyPointsTo from ClassMetrics cls select cls, cls.getAfferentCoupling() as n order by n desc diff --git a/python/ql/src/Metrics/ClassEfferentCoupling.ql b/python/ql/src/Metrics/ClassEfferentCoupling.ql index d960c0142e3..b4c5a29696b 100644 --- a/python/ql/src/Metrics/ClassEfferentCoupling.ql +++ b/python/ql/src/Metrics/ClassEfferentCoupling.ql @@ -11,6 +11,7 @@ */ import python +private import LegacyPointsTo from ClassMetrics cls select cls, cls.getEfferentCoupling() as n order by n desc diff --git a/python/ql/src/Metrics/CommentRatio.ql b/python/ql/src/Metrics/CommentRatio.ql index 8ebb27cf304..38394c1bf4f 100644 --- a/python/ql/src/Metrics/CommentRatio.ql +++ b/python/ql/src/Metrics/CommentRatio.ql @@ -12,8 +12,10 @@ */ import python +private import LegacyPointsTo -from Module m, ModuleMetrics mm -where mm = m.getMetrics() and mm.getNumberOfLines() > 0 -select m, 100.0 * (mm.getNumberOfLinesOfComments().(float) / mm.getNumberOfLines().(float)) as ratio +from ModuleMetrics mm +where mm.getNumberOfLines() > 0 +select mm, + 100.0 * (mm.getNumberOfLinesOfComments().(float) / mm.getNumberOfLines().(float)) as ratio order by ratio desc diff --git a/python/ql/src/Metrics/CyclomaticComplexity.ql b/python/ql/src/Metrics/CyclomaticComplexity.ql index 1e332f4ec9f..3d9ca10dd99 100644 --- a/python/ql/src/Metrics/CyclomaticComplexity.ql +++ b/python/ql/src/Metrics/CyclomaticComplexity.ql @@ -13,7 +13,8 @@ */ import python +private import LegacyPointsTo -from Function func, int complexity -where complexity = func.getMetrics().getCyclomaticComplexity() +from FunctionMetrics func, int complexity +where complexity = func.getCyclomaticComplexity() select func, complexity order by complexity desc diff --git a/python/ql/src/Metrics/Dependencies/ExternalDependenciesSourceLinks.ql b/python/ql/src/Metrics/Dependencies/ExternalDependenciesSourceLinks.ql index 98bb4e63cc3..60dbcdcc7fc 100644 --- a/python/ql/src/Metrics/Dependencies/ExternalDependenciesSourceLinks.ql +++ b/python/ql/src/Metrics/Dependencies/ExternalDependenciesSourceLinks.ql @@ -8,6 +8,7 @@ import python import semmle.python.dependencies.TechInventory +private import LegacyPointsTo /* * This query creates the source links for the ExternalDependencies.ql query. diff --git a/python/ql/src/Metrics/DirectImports.ql b/python/ql/src/Metrics/DirectImports.ql index 240cd65e687..e383d4b3657 100644 --- a/python/ql/src/Metrics/DirectImports.ql +++ b/python/ql/src/Metrics/DirectImports.ql @@ -11,6 +11,7 @@ */ import python +private import LegacyPointsTo from ModuleValue m, int n where n = count(ModuleValue imp | imp = m.getAnImportedModule()) diff --git a/python/ql/src/Metrics/DocStringRatio.ql b/python/ql/src/Metrics/DocStringRatio.ql index a8cd8b8dc4e..824ff5a3509 100644 --- a/python/ql/src/Metrics/DocStringRatio.ql +++ b/python/ql/src/Metrics/DocStringRatio.ql @@ -11,9 +11,10 @@ */ import python +private import LegacyPointsTo -from Module m, ModuleMetrics mm -where mm = m.getMetrics() and mm.getNumberOfLines() > 0 -select m, +from ModuleMetrics mm +where mm.getNumberOfLines() > 0 +select mm, 100.0 * (mm.getNumberOfLinesOfDocStrings().(float) / mm.getNumberOfLines().(float)) as ratio order by ratio desc diff --git a/python/ql/src/Metrics/FLines.ql b/python/ql/src/Metrics/FLines.ql index 340fb6f58ea..dc5418711c9 100644 --- a/python/ql/src/Metrics/FLines.ql +++ b/python/ql/src/Metrics/FLines.ql @@ -9,7 +9,8 @@ */ import python +private import LegacyPointsTo -from Module m, int n -where n = m.getMetrics().getNumberOfLines() +from ModuleMetrics m, int n +where n = m.getNumberOfLines() select m, n order by n desc diff --git a/python/ql/src/Metrics/FLinesOfCode.ql b/python/ql/src/Metrics/FLinesOfCode.ql index 84c952f9267..8159eb86c57 100644 --- a/python/ql/src/Metrics/FLinesOfCode.ql +++ b/python/ql/src/Metrics/FLinesOfCode.ql @@ -11,7 +11,8 @@ */ import python +private import LegacyPointsTo -from Module m, int n -where n = m.getMetrics().getNumberOfLinesOfCode() +from ModuleMetrics m, int n +where n = m.getNumberOfLinesOfCode() select m, n order by n desc diff --git a/python/ql/src/Metrics/FLinesOfComments.ql b/python/ql/src/Metrics/FLinesOfComments.ql index 18a234eef67..ac4b295003a 100644 --- a/python/ql/src/Metrics/FLinesOfComments.ql +++ b/python/ql/src/Metrics/FLinesOfComments.ql @@ -10,8 +10,8 @@ */ import python +private import LegacyPointsTo -from Module m, int n -where - n = m.getMetrics().getNumberOfLinesOfComments() + m.getMetrics().getNumberOfLinesOfDocStrings() +from ModuleMetrics m, int n +where n = m.getNumberOfLinesOfComments() + m.getNumberOfLinesOfDocStrings() select m, n order by n desc diff --git a/python/ql/src/Metrics/FunctionNumberOfCalls.ql b/python/ql/src/Metrics/FunctionNumberOfCalls.ql index fb4dfe5a9d2..60171c790bf 100644 --- a/python/ql/src/Metrics/FunctionNumberOfCalls.ql +++ b/python/ql/src/Metrics/FunctionNumberOfCalls.ql @@ -9,6 +9,7 @@ */ import python +private import LegacyPointsTo from FunctionMetrics func select func, func.getNumberOfCalls() as n order by n desc diff --git a/python/ql/src/Metrics/FunctionStatementNestingDepth.ql b/python/ql/src/Metrics/FunctionStatementNestingDepth.ql index ab40cc6068d..94f7e355750 100644 --- a/python/ql/src/Metrics/FunctionStatementNestingDepth.ql +++ b/python/ql/src/Metrics/FunctionStatementNestingDepth.ql @@ -11,6 +11,7 @@ */ import python +private import LegacyPointsTo from FunctionMetrics func select func, func.getStatementNestingDepth() as n order by n desc diff --git a/python/ql/src/Metrics/History/HChurn.ql b/python/ql/src/Metrics/History/HChurn.ql index d6a8722e6e2..dba28843670 100644 --- a/python/ql/src/Metrics/History/HChurn.ql +++ b/python/ql/src/Metrics/History/HChurn.ql @@ -10,8 +10,9 @@ import python import external.VCS +private import LegacyPointsTo -from Module m, int n +from ModuleMetrics m, int n where n = sum(Commit entry, int churn | @@ -19,5 +20,5 @@ where | churn ) and - exists(m.getMetrics().getNumberOfLinesOfCode()) + exists(m.getNumberOfLinesOfCode()) select m, n order by n desc diff --git a/python/ql/src/Metrics/History/HLinesAdded.ql b/python/ql/src/Metrics/History/HLinesAdded.ql index 3ecec917ab1..51a0af62460 100644 --- a/python/ql/src/Metrics/History/HLinesAdded.ql +++ b/python/ql/src/Metrics/History/HLinesAdded.ql @@ -10,8 +10,9 @@ import python import external.VCS +private import LegacyPointsTo -from Module m, int n +from ModuleMetrics m, int n where n = sum(Commit entry, int churn | @@ -19,5 +20,5 @@ where | churn ) and - exists(m.getMetrics().getNumberOfLinesOfCode()) + exists(m.getNumberOfLinesOfCode()) select m, n order by n desc diff --git a/python/ql/src/Metrics/History/HLinesDeleted.ql b/python/ql/src/Metrics/History/HLinesDeleted.ql index ded74756d55..3016c9f128b 100644 --- a/python/ql/src/Metrics/History/HLinesDeleted.ql +++ b/python/ql/src/Metrics/History/HLinesDeleted.ql @@ -10,8 +10,9 @@ import python import external.VCS +private import LegacyPointsTo -from Module m, int n +from ModuleMetrics m, int n where n = sum(Commit entry, int churn | @@ -19,5 +20,5 @@ where | churn ) and - exists(m.getMetrics().getNumberOfLinesOfCode()) + exists(m.getNumberOfLinesOfCode()) select m, n order by n desc diff --git a/python/ql/src/Metrics/History/HNumberOfAuthors.ql b/python/ql/src/Metrics/History/HNumberOfAuthors.ql index 15e679e58c5..ff00773d98c 100644 --- a/python/ql/src/Metrics/History/HNumberOfAuthors.ql +++ b/python/ql/src/Metrics/History/HNumberOfAuthors.ql @@ -10,7 +10,8 @@ import python import external.VCS +private import LegacyPointsTo -from Module m -where exists(m.getMetrics().getNumberOfLinesOfCode()) +from ModuleMetrics m +where exists(m.getNumberOfLinesOfCode()) select m, count(Author author | author.getAnEditedFile() = m.getFile()) diff --git a/python/ql/src/Metrics/History/HNumberOfCoCommits.ql b/python/ql/src/Metrics/History/HNumberOfCoCommits.ql index afb62353a03..4192ecf57ac 100644 --- a/python/ql/src/Metrics/History/HNumberOfCoCommits.ql +++ b/python/ql/src/Metrics/History/HNumberOfCoCommits.ql @@ -10,11 +10,12 @@ import python import external.VCS +private import LegacyPointsTo int committedFiles(Commit commit) { result = count(commit.getAnAffectedFile()) } -from Module m -where exists(m.getMetrics().getNumberOfLinesOfCode()) +from ModuleMetrics m +where exists(m.getNumberOfLinesOfCode()) select m, avg(Commit commit, int toAvg | commit.getAnAffectedFile() = m.getFile() and toAvg = committedFiles(commit) - 1 diff --git a/python/ql/src/Metrics/History/HNumberOfReCommits.ql b/python/ql/src/Metrics/History/HNumberOfReCommits.ql index 5df9194ee34..f12c51840dc 100644 --- a/python/ql/src/Metrics/History/HNumberOfReCommits.ql +++ b/python/ql/src/Metrics/History/HNumberOfReCommits.ql @@ -10,6 +10,7 @@ import python import external.VCS +private import LegacyPointsTo predicate inRange(Commit first, Commit second) { first.getAnAffectedFile() = second.getAnAffectedFile() and @@ -29,6 +30,6 @@ int recommitsForFile(File f) { ) } -from Module m -where exists(m.getMetrics().getNumberOfLinesOfCode()) +from ModuleMetrics m +where exists(m.getNumberOfLinesOfCode()) select m, recommitsForFile(m.getFile()) diff --git a/python/ql/src/Metrics/History/HNumberOfRecentAuthors.ql b/python/ql/src/Metrics/History/HNumberOfRecentAuthors.ql index e04baa491f4..9b787f52957 100644 --- a/python/ql/src/Metrics/History/HNumberOfRecentAuthors.ql +++ b/python/ql/src/Metrics/History/HNumberOfRecentAuthors.ql @@ -10,9 +10,10 @@ import python import external.VCS +private import LegacyPointsTo -from Module m -where exists(m.getMetrics().getNumberOfLinesOfCode()) +from ModuleMetrics m +where exists(m.getNumberOfLinesOfCode()) select m, count(Author author | exists(Commit e | diff --git a/python/ql/src/Metrics/History/HNumberOfRecentChangedFiles.ql b/python/ql/src/Metrics/History/HNumberOfRecentChangedFiles.ql index f0d8473b302..501094907af 100644 --- a/python/ql/src/Metrics/History/HNumberOfRecentChangedFiles.ql +++ b/python/ql/src/Metrics/History/HNumberOfRecentChangedFiles.ql @@ -10,11 +10,12 @@ import python import external.VCS +private import LegacyPointsTo -from Module m +from ModuleMetrics m where exists(Commit e | e.getAnAffectedFile() = m.getFile() and e.daysToNow() <= 180 and not artificialChange(e) ) and - exists(m.getMetrics().getNumberOfLinesOfCode()) + exists(m.getNumberOfLinesOfCode()) select m, 1 diff --git a/python/ql/src/Metrics/LackofCohesionInMethodsCK.ql b/python/ql/src/Metrics/LackofCohesionInMethodsCK.ql index c0ef582c32b..f06b050827c 100644 --- a/python/ql/src/Metrics/LackofCohesionInMethodsCK.ql +++ b/python/ql/src/Metrics/LackofCohesionInMethodsCK.ql @@ -9,6 +9,7 @@ */ import python +private import LegacyPointsTo from ClassMetrics cls select cls, cls.getLackOfCohesionCK() as n order by n desc diff --git a/python/ql/src/Metrics/LackofCohesionInMethodsHM.ql b/python/ql/src/Metrics/LackofCohesionInMethodsHM.ql index 5cc77ecfb4f..1456b76b286 100644 --- a/python/ql/src/Metrics/LackofCohesionInMethodsHM.ql +++ b/python/ql/src/Metrics/LackofCohesionInMethodsHM.ql @@ -9,6 +9,7 @@ */ import python +private import LegacyPointsTo from ClassMetrics cls select cls, cls.getLackOfCohesionHM() as n order by n desc diff --git a/python/ql/src/Metrics/ModuleAfferentCoupling.ql b/python/ql/src/Metrics/ModuleAfferentCoupling.ql index 7bf51433785..d61cc61e4da 100644 --- a/python/ql/src/Metrics/ModuleAfferentCoupling.ql +++ b/python/ql/src/Metrics/ModuleAfferentCoupling.ql @@ -11,6 +11,7 @@ */ import python +private import LegacyPointsTo from ModuleMetrics m select m, m.getAfferentCoupling() as n order by n desc diff --git a/python/ql/src/Metrics/ModuleEfferentCoupling.ql b/python/ql/src/Metrics/ModuleEfferentCoupling.ql index 51fdcf5423b..bfabf4b6012 100644 --- a/python/ql/src/Metrics/ModuleEfferentCoupling.ql +++ b/python/ql/src/Metrics/ModuleEfferentCoupling.ql @@ -11,6 +11,7 @@ */ import python +private import LegacyPointsTo from ModuleMetrics m select m, m.getEfferentCoupling() as n order by n desc diff --git a/python/ql/src/Metrics/NumberOfParametersWithoutDefault.ql b/python/ql/src/Metrics/NumberOfParametersWithoutDefault.ql index 00a4c1bf0db..e5164499331 100644 --- a/python/ql/src/Metrics/NumberOfParametersWithoutDefault.ql +++ b/python/ql/src/Metrics/NumberOfParametersWithoutDefault.ql @@ -11,6 +11,7 @@ */ import python +private import LegacyPointsTo from FunctionMetrics func select func, func.getNumberOfParametersWithoutDefault() as n order by n desc diff --git a/python/ql/src/Metrics/TransitiveImports.ql b/python/ql/src/Metrics/TransitiveImports.ql index a46a7a16302..364840fbcb9 100644 --- a/python/ql/src/Metrics/TransitiveImports.ql +++ b/python/ql/src/Metrics/TransitiveImports.ql @@ -11,6 +11,7 @@ */ import python +private import LegacyPointsTo from ModuleValue m, int n where n = count(ModuleValue imp | imp = m.getAnImportedModule+() and imp != m) diff --git a/python/ql/src/Security/CWE-020-ExternalAPIs/ExternalAPIs.qll b/python/ql/src/Security/CWE-020-ExternalAPIs/ExternalAPIs.qll index 34649c0fb86..9c12845a0ca 100644 --- a/python/ql/src/Security/CWE-020-ExternalAPIs/ExternalAPIs.qll +++ b/python/ql/src/Security/CWE-020-ExternalAPIs/ExternalAPIs.qll @@ -182,7 +182,7 @@ module UntrustedDataToExternalApiFlow = TaintTracking::Global 2 and + (f.getNumberOfLinesOfCode() - count(f.getADecorator())) > 2 and not exists(PythonPropertyObject p | p.getGetter().getFunction() = f or p.getSetter().getFunction() = f diff --git a/python/ql/src/Statements/RedundantAssignment.ql b/python/ql/src/Statements/RedundantAssignment.ql index 357364c41b2..a443e199b1c 100644 --- a/python/ql/src/Statements/RedundantAssignment.ql +++ b/python/ql/src/Statements/RedundantAssignment.ql @@ -36,7 +36,7 @@ predicate same_value(Expr left, Expr right) { } predicate maybe_defined_in_outer_scope(Name n) { - exists(SsaVariable v | v.getAUse().getNode() = n | v.maybeUndefined()) + exists(SsaVariableWithPointsTo v | v.getAUse().getNode() = n | v.maybeUndefined()) } /* diff --git a/python/ql/src/Statements/SideEffectInAssert.ql b/python/ql/src/Statements/SideEffectInAssert.ql index 92cb95d702b..902b6c4c9c1 100644 --- a/python/ql/src/Statements/SideEffectInAssert.ql +++ b/python/ql/src/Statements/SideEffectInAssert.ql @@ -13,6 +13,7 @@ */ import python +private import LegacyPointsTo predicate func_with_side_effects(Expr e) { exists(string name | name = e.(Attribute).getName() or name = e.(Name).getId() | diff --git a/python/ql/src/Statements/TopLevelPrint.ql b/python/ql/src/Statements/TopLevelPrint.ql index 2d481421b7e..12095f7a484 100644 --- a/python/ql/src/Statements/TopLevelPrint.ql +++ b/python/ql/src/Statements/TopLevelPrint.ql @@ -12,6 +12,7 @@ */ import python +private import LegacyPointsTo predicate main_eq_name(If i) { exists(Name n, StringLiteral m, Compare c | diff --git a/python/ql/src/Statements/UnnecessaryDelete.ql b/python/ql/src/Statements/UnnecessaryDelete.ql index 808a3f3a0d3..c7b80ecc66a 100644 --- a/python/ql/src/Statements/UnnecessaryDelete.ql +++ b/python/ql/src/Statements/UnnecessaryDelete.ql @@ -13,6 +13,7 @@ */ import python +private import LegacyPointsTo predicate isInsideLoop(AstNode node) { node.getParentNode() instanceof While diff --git a/python/ql/src/Summary/LinesOfCode.ql b/python/ql/src/Summary/LinesOfCode.ql index a07a896c4ca..04cb33a3451 100644 --- a/python/ql/src/Summary/LinesOfCode.ql +++ b/python/ql/src/Summary/LinesOfCode.ql @@ -10,5 +10,6 @@ */ import python +private import LegacyPointsTo -select sum(Module m | | m.getMetrics().getNumberOfLinesOfCode()) +select sum(ModuleMetrics m | | m.getNumberOfLinesOfCode()) diff --git a/python/ql/src/Summary/LinesOfUserCode.ql b/python/ql/src/Summary/LinesOfUserCode.ql index f6d6f25872f..f920ebb51f4 100644 --- a/python/ql/src/Summary/LinesOfUserCode.ql +++ b/python/ql/src/Summary/LinesOfUserCode.ql @@ -14,10 +14,11 @@ import python import semmle.python.filters.GeneratedCode +private import LegacyPointsTo -select sum(Module m | +select sum(ModuleMetrics m | exists(m.getFile().getRelativePath()) and not m.getFile() instanceof GeneratedFile | - m.getMetrics().getNumberOfLinesOfCode() + m.getNumberOfLinesOfCode() ) diff --git a/python/ql/src/Variables/Global.ql b/python/ql/src/Variables/Global.ql index b29fb564a87..40e777c62d6 100644 --- a/python/ql/src/Variables/Global.ql +++ b/python/ql/src/Variables/Global.ql @@ -1,5 +1,5 @@ /** - * @name Use of the 'global' statement. + * @name Use of the 'global' statement * @description Use of the 'global' statement may indicate poor modularity. * @kind problem * @problem.severity recommendation diff --git a/python/ql/src/Variables/Undefined.qll b/python/ql/src/Variables/Undefined.qll index 58deee4dc59..42437a81340 100644 --- a/python/ql/src/Variables/Undefined.qll +++ b/python/ql/src/Variables/Undefined.qll @@ -1,6 +1,7 @@ import python import Loop import semmle.python.dataflow.TaintTracking +private import LegacyPointsTo /** A marker for "uninitialized". */ class Uninitialized extends TaintKind { diff --git a/python/ql/src/Variables/UndefinedGlobal.ql b/python/ql/src/Variables/UndefinedGlobal.ql index 3ea1c0d38eb..404ac64aa5a 100644 --- a/python/ql/src/Variables/UndefinedGlobal.ql +++ b/python/ql/src/Variables/UndefinedGlobal.ql @@ -12,9 +12,9 @@ import python private import LegacyPointsTo +private import semmle.python.types.ImportTime import Variables.MonkeyPatched import Loop -import semmle.python.pointsto.PointsTo predicate guarded_against_name_error(Name u) { exists(Try t | t.getBody().getAnItem().contains(u) | @@ -62,7 +62,7 @@ predicate undefined_use_in_function(Name u) { not u.getEnclosingModule().(ImportTimeScope).definesName(u.getId()) and not exists(ModuleValue m | m.getScope() = u.getEnclosingModule() | m.hasAttribute(u.getId())) and not globallyDefinedName(u.getId()) and - not exists(SsaVariable var | var.getAUse().getNode() = u and not var.maybeUndefined()) and + not exists(SsaVariableWithPointsTo var | var.getAUse().getNode() = u and not var.maybeUndefined()) and not guarded_against_name_error(u) and not (u.getEnclosingModule().isPackageInit() and u.getId() = "__path__") } @@ -70,7 +70,7 @@ predicate undefined_use_in_function(Name u) { predicate undefined_use_in_class_or_module(Name u) { exists(GlobalVariable v | u.uses(v)) and not u.getScope().getScope*() instanceof Function and - exists(SsaVariable var | var.getAUse().getNode() = u | var.maybeUndefined()) and + exists(SsaVariableWithPointsTo var | var.getAUse().getNode() = u | var.maybeUndefined()) and not guarded_against_name_error(u) and not exists(ModuleValue m | m.getScope() = u.getEnclosingModule() | m.hasAttribute(u.getId())) and not (u.getEnclosingModule().isPackageInit() and u.getId() = "__path__") and diff --git a/python/ql/src/Variables/UndefinedPlaceHolder.ql b/python/ql/src/Variables/UndefinedPlaceHolder.ql index b0eeeda871a..29f9b3a1a51 100644 --- a/python/ql/src/Variables/UndefinedPlaceHolder.ql +++ b/python/ql/src/Variables/UndefinedPlaceHolder.ql @@ -13,10 +13,14 @@ import python import Variables.MonkeyPatched +private import LegacyPointsTo +private import semmle.python.types.ImportTime /* Local variable part */ predicate initialized_as_local(PlaceHolder use) { - exists(SsaVariable l, Function f | f = use.getScope() and l.getAUse() = use.getAFlowNode() | + exists(SsaVariableWithPointsTo l, Function f | + f = use.getScope() and l.getAUse() = use.getAFlowNode() + | l.getVariable() instanceof LocalVariable and not l.maybeUndefined() ) diff --git a/python/ql/src/Variables/UninitializedLocal.ql b/python/ql/src/Variables/UninitializedLocal.ql index d4d94f5a4f3..48332e01af3 100644 --- a/python/ql/src/Variables/UninitializedLocal.ql +++ b/python/ql/src/Variables/UninitializedLocal.ql @@ -14,7 +14,6 @@ import python private import LegacyPointsTo import Undefined -import semmle.python.pointsto.PointsTo predicate uninitialized_local(NameNode use) { exists(FastLocalVariable local | use.uses(local) or use.deletes(local) | diff --git a/python/ql/src/Variables/UnusedParameter.ql b/python/ql/src/Variables/UnusedParameter.ql index 7228974b7c7..1efb984fd0b 100644 --- a/python/ql/src/Variables/UnusedParameter.ql +++ b/python/ql/src/Variables/UnusedParameter.ql @@ -14,6 +14,7 @@ import python import Definition +private import LegacyPointsTo predicate unused_parameter(FunctionValue f, LocalVariable v) { v.isParameter() and diff --git a/python/ql/src/analysis/CallGraphEfficiency.ql b/python/ql/src/analysis/CallGraphEfficiency.ql index 5e36823b8ac..3990b68ecc6 100644 --- a/python/ql/src/analysis/CallGraphEfficiency.ql +++ b/python/ql/src/analysis/CallGraphEfficiency.ql @@ -4,8 +4,7 @@ */ import python -import semmle.python.pointsto.PointsTo -import semmle.python.pointsto.PointsToContext +private import LegacyPointsTo from int total_facts, int total_size, int depth, float efficiency where diff --git a/python/ql/src/analysis/CallGraphMarginalEfficiency.ql b/python/ql/src/analysis/CallGraphMarginalEfficiency.ql index 394bf379eeb..f2e931c411c 100644 --- a/python/ql/src/analysis/CallGraphMarginalEfficiency.ql +++ b/python/ql/src/analysis/CallGraphMarginalEfficiency.ql @@ -4,8 +4,7 @@ */ import python -import semmle.python.pointsto.PointsTo -import semmle.python.pointsto.PointsToContext +private import LegacyPointsTo from int total_facts, int total_size, int depth, float efficiency where diff --git a/python/ql/src/analysis/ContextEfficiency.ql b/python/ql/src/analysis/ContextEfficiency.ql index 205091ba1e3..76ca78fc867 100644 --- a/python/ql/src/analysis/ContextEfficiency.ql +++ b/python/ql/src/analysis/ContextEfficiency.ql @@ -4,8 +4,7 @@ */ import python -import semmle.python.pointsto.PointsTo -import semmle.python.pointsto.PointsToContext +private import LegacyPointsTo from int total_facts, int total_size, int depth, float efficiency where diff --git a/python/ql/src/analysis/ContextMarginalEfficiency.ql b/python/ql/src/analysis/ContextMarginalEfficiency.ql index 755ccad683c..c87de8c6ebe 100644 --- a/python/ql/src/analysis/ContextMarginalEfficiency.ql +++ b/python/ql/src/analysis/ContextMarginalEfficiency.ql @@ -4,8 +4,7 @@ */ import python -import semmle.python.pointsto.PointsTo -import semmle.python.pointsto.PointsToContext +private import LegacyPointsTo int depth(ControlFlowNode f, Object value, ClassObject cls) { exists(PointsToContext ctx | diff --git a/python/ql/src/analysis/CrossProjectDefinitions.qll b/python/ql/src/analysis/CrossProjectDefinitions.qll index 84fd8215712..64b30f566f1 100644 --- a/python/ql/src/analysis/CrossProjectDefinitions.qll +++ b/python/ql/src/analysis/CrossProjectDefinitions.qll @@ -3,7 +3,7 @@ */ import python -import semmle.python.pointsto.PointsTo +private import LegacyPointsTo private newtype TSymbol = TModule(Module m) or diff --git a/python/ql/src/analysis/Efficiency.ql b/python/ql/src/analysis/Efficiency.ql index 37cb5c97387..d8ed85f2a2b 100644 --- a/python/ql/src/analysis/Efficiency.ql +++ b/python/ql/src/analysis/Efficiency.ql @@ -5,8 +5,6 @@ import python private import LegacyPointsTo -import semmle.python.pointsto.PointsTo -import semmle.python.pointsto.PointsToContext predicate trivial(ControlFlowNode f) { f.getNode() instanceof Parameter diff --git a/python/ql/src/analysis/FailedInference.ql b/python/ql/src/analysis/FailedInference.ql index 192cf696fbf..feae8fdc5ee 100644 --- a/python/ql/src/analysis/FailedInference.ql +++ b/python/ql/src/analysis/FailedInference.ql @@ -1,5 +1,5 @@ import python -import semmle.python.pointsto.PointsTo +private import LegacyPointsTo from ClassValue cls, string reason where Types::failedInference(cls, reason) diff --git a/python/ql/src/analysis/KeyPointsToFailure.ql b/python/ql/src/analysis/KeyPointsToFailure.ql index d869d547c75..f07e8638f38 100644 --- a/python/ql/src/analysis/KeyPointsToFailure.ql +++ b/python/ql/src/analysis/KeyPointsToFailure.ql @@ -1,5 +1,5 @@ /** - * @name Key points-to fails for expression. + * @name Key points-to fails for expression * @description Expression does not "point-to" an object which prevents further points-to analysis. * @kind problem * @problem.severity info diff --git a/python/ql/src/analysis/PointsToFailure.ql b/python/ql/src/analysis/PointsToFailure.ql index 7b9a2ac0659..fee1e80d2f7 100644 --- a/python/ql/src/analysis/PointsToFailure.ql +++ b/python/ql/src/analysis/PointsToFailure.ql @@ -1,5 +1,5 @@ /** - * @name points-to fails for expression. + * @name points-to fails for expression * @description Expression does not "point-to" an object which prevents type inference. * @kind problem * @id py/points-to-failure diff --git a/python/ql/src/analysis/Summary.ql b/python/ql/src/analysis/Summary.ql index 630f4e2678b..bad5070a9ef 100644 --- a/python/ql/src/analysis/Summary.ql +++ b/python/ql/src/analysis/Summary.ql @@ -3,6 +3,7 @@ */ import python +private import LegacyPointsTo from string key, string value where diff --git a/python/ql/src/analysis/TypeHierarchyFailure.ql b/python/ql/src/analysis/TypeHierarchyFailure.ql index c4c91005743..c6ad4be9822 100644 --- a/python/ql/src/analysis/TypeHierarchyFailure.ql +++ b/python/ql/src/analysis/TypeHierarchyFailure.ql @@ -8,6 +8,7 @@ */ import python +private import LegacyPointsTo from Class cls, string reason where exists(ClassObject c | c.getPyClass() = cls | c.failedInference(reason)) diff --git a/python/ql/src/change-notes/released/1.7.1.md b/python/ql/src/change-notes/released/1.7.1.md new file mode 100644 index 00000000000..5c9570fd0c3 --- /dev/null +++ b/python/ql/src/change-notes/released/1.7.1.md @@ -0,0 +1,3 @@ +## 1.7.1 + +No user-facing changes. diff --git a/python/ql/src/change-notes/released/1.7.2.md b/python/ql/src/change-notes/released/1.7.2.md new file mode 100644 index 00000000000..b950385c16d --- /dev/null +++ b/python/ql/src/change-notes/released/1.7.2.md @@ -0,0 +1,3 @@ +## 1.7.2 + +No user-facing changes. diff --git a/python/ql/src/codeql-pack.release.yml b/python/ql/src/codeql-pack.release.yml index d1184cc6750..39bbba86c19 100644 --- a/python/ql/src/codeql-pack.release.yml +++ b/python/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.7.0 +lastReleaseVersion: 1.7.2 diff --git a/python/ql/src/experimental/Security/CWE-094/Js2Py.ql b/python/ql/src/experimental/Security/CWE-094/Js2Py.ql index 53c919d9732..2ed3c37da37 100644 --- a/python/ql/src/experimental/Security/CWE-094/Js2Py.ql +++ b/python/ql/src/experimental/Security/CWE-094/Js2Py.ql @@ -1,5 +1,5 @@ /** - * @name JavaScript code execution. + * @name JavaScript code execution * @description Passing user supplied arguments to a Javascript to Python translation engine such as Js2Py can lead to remote code execution. * @problem.severity error * @security-severity 9.3 diff --git a/python/ql/src/experimental/Security/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql b/python/ql/src/experimental/Security/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql index a0fadbff3f3..fdbda943921 100644 --- a/python/ql/src/experimental/Security/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql +++ b/python/ql/src/experimental/Security/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql @@ -1,5 +1,5 @@ /** - * @name Unsafe usage of v1 version of Azure Storage client-side encryption. + * @name Unsafe usage of v1 version of Azure Storage client-side encryption * @description Using version v1 of Azure Storage client-side encryption is insecure, and may enable an attacker to decrypt encrypted data * @kind path-problem * @tags security diff --git a/python/ql/src/experimental/cryptography/example_alerts/WeakKDFAlgorithm.ql b/python/ql/src/experimental/cryptography/example_alerts/WeakKDFAlgorithm.ql index 0f30571385a..c3dde29952d 100644 --- a/python/ql/src/experimental/cryptography/example_alerts/WeakKDFAlgorithm.ql +++ b/python/ql/src/experimental/cryptography/example_alerts/WeakKDFAlgorithm.ql @@ -1,5 +1,5 @@ /** - * @name Weak KDF algorithm. + * @name Weak KDF algorithm * @description Approved KDF algorithms must one of the following * ["PBKDF2" , "PBKDF2HMAC", "KBKDF", "KBKDFHMAC", "CONCATKDF", "CONCATKDFHASH"] * @assumption The value being used to derive a key (either a key or a password) is correct for the algorithm (i.e., a key is used for KBKDF and a password for PBKDF). diff --git a/python/ql/src/experimental/cryptography/example_alerts/WeakKDFKeyLength.ql b/python/ql/src/experimental/cryptography/example_alerts/WeakKDFKeyLength.ql index a7c83f9e62e..6a5a48a4fe5 100644 --- a/python/ql/src/experimental/cryptography/example_alerts/WeakKDFKeyLength.ql +++ b/python/ql/src/experimental/cryptography/example_alerts/WeakKDFKeyLength.ql @@ -1,5 +1,5 @@ /** - * @name Small KDF derived key length. + * @name Small KDF derived key length * @description KDF derived keys should be a minimum of 128 bits (16 bytes). * @assumption If the key length is not explicitly provided (e.g., it is None or otherwise not specified) assumes the length is derived from the hash length. * @kind problem diff --git a/python/ql/src/experimental/cryptography/example_alerts/WeakKDFSaltGen.ql b/python/ql/src/experimental/cryptography/example_alerts/WeakKDFSaltGen.ql index 9d312583912..4d3cd7b1dfd 100644 --- a/python/ql/src/experimental/cryptography/example_alerts/WeakKDFSaltGen.ql +++ b/python/ql/src/experimental/cryptography/example_alerts/WeakKDFSaltGen.ql @@ -1,5 +1,5 @@ /** - * @name Weak KDF salt generation. + * @name Weak KDF salt generation * @description KDF salts must be generated by an approved random number generator (os.urandom) * @kind problem * @id py/kdf-weak-salt-gen diff --git a/python/ql/src/experimental/cryptography/example_alerts/WeakKDFSaltSize.ql b/python/ql/src/experimental/cryptography/example_alerts/WeakKDFSaltSize.ql index 54f72de0594..7477391a738 100644 --- a/python/ql/src/experimental/cryptography/example_alerts/WeakKDFSaltSize.ql +++ b/python/ql/src/experimental/cryptography/example_alerts/WeakKDFSaltSize.ql @@ -1,5 +1,5 @@ /** - * @name Small KDF salt length. + * @name Small KDF salt length * @description KDF salts should be a minimum of 128 bits (16 bytes). * * This alerts if a constant traces to to a salt length sink less than 128-bits or diff --git a/python/ql/src/meta/alerts/RemoteFlowSourcesReach.ql b/python/ql/src/meta/alerts/RemoteFlowSourcesReach.ql index 7921121fb3a..d6d91a888d4 100644 --- a/python/ql/src/meta/alerts/RemoteFlowSourcesReach.ql +++ b/python/ql/src/meta/alerts/RemoteFlowSourcesReach.ql @@ -38,5 +38,5 @@ module RemoteFlowSourceReachConfig implements DataFlow::ConfigSig { module RemoteFlowSourceReachFlow = TaintTracking::Global; from DataFlow::Node reachable -where RemoteFlowSourceReachFlow::flow(_, reachable) +where RemoteFlowSourceReachFlow::flowTo(reachable) select reachable, prettyNode(reachable) diff --git a/python/ql/src/meta/analysis-quality/CallGraphQuality.qll b/python/ql/src/meta/analysis-quality/CallGraphQuality.qll index a8e7a3b340a..679b39ddc8d 100644 --- a/python/ql/src/meta/analysis-quality/CallGraphQuality.qll +++ b/python/ql/src/meta/analysis-quality/CallGraphQuality.qll @@ -5,6 +5,7 @@ import python import meta.MetaMetrics +private import LegacyPointsTo newtype TTarget = TFunction(Function func) or diff --git a/python/ql/src/meta/debug/DebugStats.ql b/python/ql/src/meta/debug/DebugStats.ql index 5ebbe963943..03ecaae27e2 100644 --- a/python/ql/src/meta/debug/DebugStats.ql +++ b/python/ql/src/meta/debug/DebugStats.ql @@ -1,15 +1,15 @@ import python +private import LegacyPointsTo from string msg, int cnt, int sort where sort = 0 and msg = "Lines of code in DB" and - cnt = sum(Module m | | m.getMetrics().getNumberOfLinesOfCode()) + cnt = sum(ModuleMetrics m | | m.getNumberOfLinesOfCode()) or sort = 1 and msg = "Lines of code in repo" and - cnt = - sum(Module m | exists(m.getFile().getRelativePath()) | m.getMetrics().getNumberOfLinesOfCode()) + cnt = sum(ModuleMetrics m | exists(m.getFile().getRelativePath()) | m.getNumberOfLinesOfCode()) or sort = 2 and msg = "Files" and diff --git a/python/ql/src/qlpack.yml b/python/ql/src/qlpack.yml index 40cb22f102a..a71b676aaca 100644 --- a/python/ql/src/qlpack.yml +++ b/python/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/python-queries -version: 1.7.1-dev +version: 1.7.3-dev groups: - python - queries diff --git a/python/ql/test/2/extractor-tests/import_depth/test.ql b/python/ql/test/2/extractor-tests/import_depth/test.ql index ef626455fad..4f007e99468 100644 --- a/python/ql/test/2/extractor-tests/import_depth/test.ql +++ b/python/ql/test/2/extractor-tests/import_depth/test.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ModuleObject m /* Exclude the builtins module as it has a different name under 2 and 3. */ diff --git a/python/ql/test/2/extractor-tests/normalise/Numbers.ql b/python/ql/test/2/extractor-tests/normalise/Numbers.ql index 2a770600279..9447141ab6a 100644 --- a/python/ql/test/2/extractor-tests/normalise/Numbers.ql +++ b/python/ql/test/2/extractor-tests/normalise/Numbers.ql @@ -7,10 +7,11 @@ */ import python +private import LegacyPointsTo from NumericObject n where - exists(IntegerLiteral i | i.getLiteralObject() = n | + exists(IntegerLiteral i | getLiteralObject(i) = n | i.getEnclosingModule().getFile().getShortName() = "test.py" ) select n.toString(), n.repr() diff --git a/python/ql/test/2/extractor-tests/object_hash/Success.ql b/python/ql/test/2/extractor-tests/object_hash/Success.ql index 9cff9ee4b73..55e38e56b93 100644 --- a/python/ql/test/2/extractor-tests/object_hash/Success.ql +++ b/python/ql/test/2/extractor-tests/object_hash/Success.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo where exists(theSysModuleObject()) select 1 diff --git a/python/ql/test/2/library-tests/ControlFlow/Exceptions/Handles.ql b/python/ql/test/2/library-tests/ControlFlow/Exceptions/Handles.ql index 620944de5b9..a8bc92db331 100644 --- a/python/ql/test/2/library-tests/ControlFlow/Exceptions/Handles.ql +++ b/python/ql/test/2/library-tests/ControlFlow/Exceptions/Handles.ql @@ -1,5 +1,6 @@ import python +private import LegacyPointsTo -from ExceptFlowNode ex, Value val +from ExceptFlowNodeWithPointsTo ex, Value val where ex.handledException(val, _, _) select ex.getLocation().getStartLine(), ex.toString(), val.toString() diff --git a/python/ql/test/2/library-tests/ControlFlow/Exceptions/Known.ql b/python/ql/test/2/library-tests/ControlFlow/Exceptions/Known.ql index 56498054f51..b773a172ee3 100644 --- a/python/ql/test/2/library-tests/ControlFlow/Exceptions/Known.ql +++ b/python/ql/test/2/library-tests/ControlFlow/Exceptions/Known.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from RaisingNode r select r.getLocation().getStartLine(), r.toString(), r.getARaisedType().toString() diff --git a/python/ql/test/2/library-tests/ControlFlow/Exceptions/Likely.ql b/python/ql/test/2/library-tests/ControlFlow/Exceptions/Likely.ql index f8e4a4b7dac..00cf5a7d2af 100644 --- a/python/ql/test/2/library-tests/ControlFlow/Exceptions/Likely.ql +++ b/python/ql/test/2/library-tests/ControlFlow/Exceptions/Likely.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ControlFlowNode r, ControlFlowNode s where diff --git a/python/ql/test/2/library-tests/ControlFlow/Exceptions/Unknown.ql b/python/ql/test/2/library-tests/ControlFlow/Exceptions/Unknown.ql index 29bad86bf0f..fe0fa6b0158 100644 --- a/python/ql/test/2/library-tests/ControlFlow/Exceptions/Unknown.ql +++ b/python/ql/test/2/library-tests/ControlFlow/Exceptions/Unknown.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from RaisingNode r where r.raisesUnknownType() diff --git a/python/ql/test/2/library-tests/PointsTo/import_time/Pruned.ql b/python/ql/test/2/library-tests/PointsTo/import_time/Pruned.ql index e77849860c7..ba8df441caf 100644 --- a/python/ql/test/2/library-tests/PointsTo/import_time/Pruned.ql +++ b/python/ql/test/2/library-tests/PointsTo/import_time/Pruned.ql @@ -1,6 +1,5 @@ import python -import semmle.python.pointsto.PointsTo -import semmle.python.pointsto.PointsToContext +private import LegacyPointsTo from ControlFlowNode f, Location l, Context c where diff --git a/python/ql/test/2/library-tests/PointsTo/metaclass/test.ql b/python/ql/test/2/library-tests/PointsTo/metaclass/test.ql index 68eec976105..0644e4cdf74 100644 --- a/python/ql/test/2/library-tests/PointsTo/metaclass/test.ql +++ b/python/ql/test/2/library-tests/PointsTo/metaclass/test.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls where not cls.isC() diff --git a/python/ql/test/2/library-tests/classes/attr/class_attr.ql b/python/ql/test/2/library-tests/classes/attr/class_attr.ql index 197ab1a1e5e..1c9c5513a1d 100644 --- a/python/ql/test/2/library-tests/classes/attr/class_attr.ql +++ b/python/ql/test/2/library-tests/classes/attr/class_attr.ql @@ -5,6 +5,7 @@ */ import python +private import LegacyPointsTo from ClassObject cls, int line, string name, Object obj where diff --git a/python/ql/test/2/library-tests/classes/attr/class_has_attr.ql b/python/ql/test/2/library-tests/classes/attr/class_has_attr.ql index be8272d1bd6..24724f4d859 100644 --- a/python/ql/test/2/library-tests/classes/attr/class_has_attr.ql +++ b/python/ql/test/2/library-tests/classes/attr/class_has_attr.ql @@ -5,6 +5,7 @@ */ import python +private import LegacyPointsTo from ClassObject cls, int line, string name where diff --git a/python/ql/test/2/library-tests/classes/attr/list_attr.ql b/python/ql/test/2/library-tests/classes/attr/list_attr.ql index c38694d5883..ad708711df4 100644 --- a/python/ql/test/2/library-tests/classes/attr/list_attr.ql +++ b/python/ql/test/2/library-tests/classes/attr/list_attr.ql @@ -5,6 +5,7 @@ */ import python +private import LegacyPointsTo from ClassObject cls, string name, Object what where diff --git a/python/ql/test/2/library-tests/classes/mro/mro.ql b/python/ql/test/2/library-tests/classes/mro/mro.ql index 0c4cf077adb..6a4d21921a1 100644 --- a/python/ql/test/2/library-tests/classes/mro/mro.ql +++ b/python/ql/test/2/library-tests/classes/mro/mro.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls, ClassObject l, ClassObject r where diff --git a/python/ql/test/2/library-tests/modules/general/moduleobject_test.ql b/python/ql/test/2/library-tests/modules/general/moduleobject_test.ql index 50f79a57aed..27394e03096 100644 --- a/python/ql/test/2/library-tests/modules/general/moduleobject_test.ql +++ b/python/ql/test/2/library-tests/modules/general/moduleobject_test.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ModuleObject m, string name where m.getName() = "package" or m.getName() = "confused_elements" diff --git a/python/ql/test/2/library-tests/modules/package_members/module_attributes.ql b/python/ql/test/2/library-tests/modules/package_members/module_attributes.ql index 6c16450f313..f7755b92e12 100644 --- a/python/ql/test/2/library-tests/modules/package_members/module_attributes.ql +++ b/python/ql/test/2/library-tests/modules/package_members/module_attributes.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ModuleObject m, string name where not m.isC() diff --git a/python/ql/test/2/library-tests/modules/package_members/module_exports.ql b/python/ql/test/2/library-tests/modules/package_members/module_exports.ql index bcfc0c60bfb..d04ef3bc9f3 100644 --- a/python/ql/test/2/library-tests/modules/package_members/module_exports.ql +++ b/python/ql/test/2/library-tests/modules/package_members/module_exports.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ModuleObject m, string name where not m.isC() and m.exports(name) diff --git a/python/ql/test/2/library-tests/modules/package_members/module_import_as.ql b/python/ql/test/2/library-tests/modules/package_members/module_import_as.ql index 50ded7b4124..97cc2e86665 100644 --- a/python/ql/test/2/library-tests/modules/package_members/module_import_as.ql +++ b/python/ql/test/2/library-tests/modules/package_members/module_import_as.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ModuleObject m, string name where not m.isC() and m.importedAs(name) diff --git a/python/ql/test/2/library-tests/modules/usage/ModuleUsage.ql b/python/ql/test/2/library-tests/modules/usage/ModuleUsage.ql index 5f776e2374e..0469f804ab3 100644 --- a/python/ql/test/2/library-tests/modules/usage/ModuleUsage.ql +++ b/python/ql/test/2/library-tests/modules/usage/ModuleUsage.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ModuleValue mv, string usage where diff --git a/python/ql/test/2/library-tests/objects/Literals.ql b/python/ql/test/2/library-tests/objects/Literals.ql index a7f10b358ff..d5aee013f25 100644 --- a/python/ql/test/2/library-tests/objects/Literals.ql +++ b/python/ql/test/2/library-tests/objects/Literals.ql @@ -1,5 +1,6 @@ /* Test that there are no literals that do not have a corresponding object. */ import python +private import LegacyPointsTo string repr(Expr e) { result = e.(Num).getN() or @@ -8,5 +9,5 @@ string repr(Expr e) { } from ImmutableLiteral l -where not exists(l.getLiteralObject()) +where not exists(getLiteralObject(l)) select l.getLocation().getStartLine(), repr(l) diff --git a/python/ql/test/2/library-tests/types/classes/mro_test.ql b/python/ql/test/2/library-tests/types/classes/mro_test.ql index fa2ac44d4d2..8d68b5b08fe 100644 --- a/python/ql/test/2/library-tests/types/classes/mro_test.ql +++ b/python/ql/test/2/library-tests/types/classes/mro_test.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls where not cls.isC() diff --git a/python/ql/test/2/library-tests/types/classes/new_style.ql b/python/ql/test/2/library-tests/types/classes/new_style.ql index 2af40565329..fdd8fac80a8 100644 --- a/python/ql/test/2/library-tests/types/classes/new_style.ql +++ b/python/ql/test/2/library-tests/types/classes/new_style.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls, string style where diff --git a/python/ql/test/2/library-tests/types/exceptions/ExitRaises.ql b/python/ql/test/2/library-tests/types/exceptions/ExitRaises.ql index 415db290a05..5bf1ae1da00 100644 --- a/python/ql/test/2/library-tests/types/exceptions/ExitRaises.ql +++ b/python/ql/test/2/library-tests/types/exceptions/ExitRaises.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from RaisingNode r, Scope s, ClassObject cls where r.viableExceptionalExit_objectapi(s, cls) diff --git a/python/ql/test/2/library-tests/types/exceptions/Raises.ql b/python/ql/test/2/library-tests/types/exceptions/Raises.ql index 2415c707967..e4f9a6664d5 100644 --- a/python/ql/test/2/library-tests/types/exceptions/Raises.ql +++ b/python/ql/test/2/library-tests/types/exceptions/Raises.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from PyFunctionObject f, string type where diff --git a/python/ql/test/2/library-tests/types/functions/Calls.ql b/python/ql/test/2/library-tests/types/functions/Calls.ql index 6fc188753e5..5eaeb4559b0 100644 --- a/python/ql/test/2/library-tests/types/functions/Calls.ql +++ b/python/ql/test/2/library-tests/types/functions/Calls.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from FunctionObject func, ControlFlowNode call where func.getACall() = call diff --git a/python/ql/test/2/library-tests/types/functions/Never.ql b/python/ql/test/2/library-tests/types/functions/Never.ql index 1e43ead7dce..932121d058e 100644 --- a/python/ql/test/2/library-tests/types/functions/Never.ql +++ b/python/ql/test/2/library-tests/types/functions/Never.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from FunctionObject func where func.neverReturns() diff --git a/python/ql/test/2/library-tests/types/functions/ReturnTypes.ql b/python/ql/test/2/library-tests/types/functions/ReturnTypes.ql index beb955e1188..d35deea34bf 100644 --- a/python/ql/test/2/library-tests/types/functions/ReturnTypes.ql +++ b/python/ql/test/2/library-tests/types/functions/ReturnTypes.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from PyFunctionObject func, ClassObject ret_type where func.getAnInferredReturnType() = ret_type diff --git a/python/ql/test/2/library-tests/types/properties/BuiltinProperties.ql b/python/ql/test/2/library-tests/types/properties/BuiltinProperties.ql index 24766db9f2e..9ab0b5e4bbd 100644 --- a/python/ql/test/2/library-tests/types/properties/BuiltinProperties.ql +++ b/python/ql/test/2/library-tests/types/properties/BuiltinProperties.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls, string name, BuiltinPropertyObject p where diff --git a/python/ql/test/3/extractor-tests/import_depth/test.ql b/python/ql/test/3/extractor-tests/import_depth/test.ql index ef626455fad..4f007e99468 100644 --- a/python/ql/test/3/extractor-tests/import_depth/test.ql +++ b/python/ql/test/3/extractor-tests/import_depth/test.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ModuleObject m /* Exclude the builtins module as it has a different name under 2 and 3. */ diff --git a/python/ql/test/3/library-tests/ControlFlow/Exceptions/Handles.ql b/python/ql/test/3/library-tests/ControlFlow/Exceptions/Handles.ql index 620944de5b9..a8bc92db331 100644 --- a/python/ql/test/3/library-tests/ControlFlow/Exceptions/Handles.ql +++ b/python/ql/test/3/library-tests/ControlFlow/Exceptions/Handles.ql @@ -1,5 +1,6 @@ import python +private import LegacyPointsTo -from ExceptFlowNode ex, Value val +from ExceptFlowNodeWithPointsTo ex, Value val where ex.handledException(val, _, _) select ex.getLocation().getStartLine(), ex.toString(), val.toString() diff --git a/python/ql/test/3/library-tests/ControlFlow/Exceptions/Known.ql b/python/ql/test/3/library-tests/ControlFlow/Exceptions/Known.ql index 56498054f51..b773a172ee3 100644 --- a/python/ql/test/3/library-tests/ControlFlow/Exceptions/Known.ql +++ b/python/ql/test/3/library-tests/ControlFlow/Exceptions/Known.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from RaisingNode r select r.getLocation().getStartLine(), r.toString(), r.getARaisedType().toString() diff --git a/python/ql/test/3/library-tests/ControlFlow/Exceptions/Likely.ql b/python/ql/test/3/library-tests/ControlFlow/Exceptions/Likely.ql index f8e4a4b7dac..00cf5a7d2af 100644 --- a/python/ql/test/3/library-tests/ControlFlow/Exceptions/Likely.ql +++ b/python/ql/test/3/library-tests/ControlFlow/Exceptions/Likely.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ControlFlowNode r, ControlFlowNode s where diff --git a/python/ql/test/3/library-tests/ControlFlow/Exceptions/Unknown.ql b/python/ql/test/3/library-tests/ControlFlow/Exceptions/Unknown.ql index 29bad86bf0f..fe0fa6b0158 100644 --- a/python/ql/test/3/library-tests/ControlFlow/Exceptions/Unknown.ql +++ b/python/ql/test/3/library-tests/ControlFlow/Exceptions/Unknown.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from RaisingNode r where r.raisesUnknownType() diff --git a/python/ql/test/3/library-tests/PointsTo/consts/BooleanConstants.ql b/python/ql/test/3/library-tests/PointsTo/consts/BooleanConstants.ql index 4299e11d660..242fb5bc781 100644 --- a/python/ql/test/3/library-tests/PointsTo/consts/BooleanConstants.ql +++ b/python/ql/test/3/library-tests/PointsTo/consts/BooleanConstants.ql @@ -1,5 +1,5 @@ import python -import semmle.python.pointsto.PointsTo +private import LegacyPointsTo from ControlFlowNode f, Context c, boolean b where diff --git a/python/ql/test/3/library-tests/PointsTo/inheritance/Calls.ql b/python/ql/test/3/library-tests/PointsTo/inheritance/Calls.ql index f91d207fc70..3f111d6e08a 100644 --- a/python/ql/test/3/library-tests/PointsTo/inheritance/Calls.ql +++ b/python/ql/test/3/library-tests/PointsTo/inheritance/Calls.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from Call c, FunctionObject f where f.getACall().getNode() = c diff --git a/python/ql/test/3/library-tests/PointsTo/metaclass/test.ql b/python/ql/test/3/library-tests/PointsTo/metaclass/test.ql index 68eec976105..0644e4cdf74 100644 --- a/python/ql/test/3/library-tests/PointsTo/metaclass/test.ql +++ b/python/ql/test/3/library-tests/PointsTo/metaclass/test.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls where not cls.isC() diff --git a/python/ql/test/3/library-tests/PointsTo/regressions/subprocess-assert/ClassValue.ql b/python/ql/test/3/library-tests/PointsTo/regressions/subprocess-assert/ClassValue.ql index bc666b4f206..479ae6e5965 100644 --- a/python/ql/test/3/library-tests/PointsTo/regressions/subprocess-assert/ClassValue.ql +++ b/python/ql/test/3/library-tests/PointsTo/regressions/subprocess-assert/ClassValue.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo // as used in semmle.python.filters.Tests from ClassValue c, string base diff --git a/python/ql/test/3/library-tests/classes/attr/class_attr.ql b/python/ql/test/3/library-tests/classes/attr/class_attr.ql index 197ab1a1e5e..1c9c5513a1d 100644 --- a/python/ql/test/3/library-tests/classes/attr/class_attr.ql +++ b/python/ql/test/3/library-tests/classes/attr/class_attr.ql @@ -5,6 +5,7 @@ */ import python +private import LegacyPointsTo from ClassObject cls, int line, string name, Object obj where diff --git a/python/ql/test/3/library-tests/classes/attr/class_has_attr.ql b/python/ql/test/3/library-tests/classes/attr/class_has_attr.ql index be8272d1bd6..24724f4d859 100644 --- a/python/ql/test/3/library-tests/classes/attr/class_has_attr.ql +++ b/python/ql/test/3/library-tests/classes/attr/class_has_attr.ql @@ -5,6 +5,7 @@ */ import python +private import LegacyPointsTo from ClassObject cls, int line, string name where diff --git a/python/ql/test/3/library-tests/classes/meta/meta_obj.ql b/python/ql/test/3/library-tests/classes/meta/meta_obj.ql index e85127a9305..af46400ce00 100644 --- a/python/ql/test/3/library-tests/classes/meta/meta_obj.ql +++ b/python/ql/test/3/library-tests/classes/meta/meta_obj.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls where not cls.isC() diff --git a/python/ql/test/3/library-tests/classes/mro/mro.ql b/python/ql/test/3/library-tests/classes/mro/mro.ql index 576d6a75afd..86934f52c11 100644 --- a/python/ql/test/3/library-tests/classes/mro/mro.ql +++ b/python/ql/test/3/library-tests/classes/mro/mro.ql @@ -5,6 +5,7 @@ */ import python +private import LegacyPointsTo from ClassObject cls, ClassObject l, ClassObject r where diff --git a/python/ql/test/3/library-tests/classes/mro/mro_index.ql b/python/ql/test/3/library-tests/classes/mro/mro_index.ql index da40776044e..6a65d27b716 100644 --- a/python/ql/test/3/library-tests/classes/mro/mro_index.ql +++ b/python/ql/test/3/library-tests/classes/mro/mro_index.ql @@ -5,6 +5,7 @@ */ import python +private import LegacyPointsTo from ClassObject cls, ClassObject sup, int index where diff --git a/python/ql/test/3/library-tests/modules/general/moduleobject_test.ql b/python/ql/test/3/library-tests/modules/general/moduleobject_test.ql index a3a1ac6b185..db5b72e4dc4 100644 --- a/python/ql/test/3/library-tests/modules/general/moduleobject_test.ql +++ b/python/ql/test/3/library-tests/modules/general/moduleobject_test.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ModuleObject m, string name where not m.isC() and not m.getName() = "__future__" diff --git a/python/ql/test/3/library-tests/modules/package_members/module_attributes.ql b/python/ql/test/3/library-tests/modules/package_members/module_attributes.ql index 6c16450f313..f7755b92e12 100644 --- a/python/ql/test/3/library-tests/modules/package_members/module_attributes.ql +++ b/python/ql/test/3/library-tests/modules/package_members/module_attributes.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ModuleObject m, string name where not m.isC() diff --git a/python/ql/test/3/library-tests/modules/package_members/module_exports.ql b/python/ql/test/3/library-tests/modules/package_members/module_exports.ql index bcfc0c60bfb..d04ef3bc9f3 100644 --- a/python/ql/test/3/library-tests/modules/package_members/module_exports.ql +++ b/python/ql/test/3/library-tests/modules/package_members/module_exports.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ModuleObject m, string name where not m.isC() and m.exports(name) diff --git a/python/ql/test/3/library-tests/modules/package_members/module_import_as.ql b/python/ql/test/3/library-tests/modules/package_members/module_import_as.ql index 50ded7b4124..97cc2e86665 100644 --- a/python/ql/test/3/library-tests/modules/package_members/module_import_as.ql +++ b/python/ql/test/3/library-tests/modules/package_members/module_import_as.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ModuleObject m, string name where not m.isC() and m.importedAs(name) diff --git a/python/ql/test/3/library-tests/modules/usage/ModuleUsage.ql b/python/ql/test/3/library-tests/modules/usage/ModuleUsage.ql index 5f776e2374e..0469f804ab3 100644 --- a/python/ql/test/3/library-tests/modules/usage/ModuleUsage.ql +++ b/python/ql/test/3/library-tests/modules/usage/ModuleUsage.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ModuleValue mv, string usage where diff --git a/python/ql/test/3/library-tests/types/classes/mro_test.ql b/python/ql/test/3/library-tests/types/classes/mro_test.ql index 04b65ae2bef..4dc9bc153a2 100644 --- a/python/ql/test/3/library-tests/types/classes/mro_test.ql +++ b/python/ql/test/3/library-tests/types/classes/mro_test.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls, ClassObject sup where not cls.isC() diff --git a/python/ql/test/3/library-tests/types/exceptions/Raises.ql b/python/ql/test/3/library-tests/types/exceptions/Raises.ql index 2415c707967..e4f9a6664d5 100644 --- a/python/ql/test/3/library-tests/types/exceptions/Raises.ql +++ b/python/ql/test/3/library-tests/types/exceptions/Raises.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from PyFunctionObject f, string type where diff --git a/python/ql/test/3/library-tests/types/exceptions/Viable.ql b/python/ql/test/3/library-tests/types/exceptions/Viable.ql index bf00a0675d6..589e2630bb9 100644 --- a/python/ql/test/3/library-tests/types/exceptions/Viable.ql +++ b/python/ql/test/3/library-tests/types/exceptions/Viable.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from RaisingNode r, ControlFlowNode n, ClassObject ex where r.viableExceptionEdge_objectapi(n, ex) diff --git a/python/ql/test/3/library-tests/types/functions/Calls.ql b/python/ql/test/3/library-tests/types/functions/Calls.ql index 6fc188753e5..5eaeb4559b0 100644 --- a/python/ql/test/3/library-tests/types/functions/Calls.ql +++ b/python/ql/test/3/library-tests/types/functions/Calls.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from FunctionObject func, ControlFlowNode call where func.getACall() = call diff --git a/python/ql/test/3/library-tests/types/functions/Never.ql b/python/ql/test/3/library-tests/types/functions/Never.ql index 1e43ead7dce..932121d058e 100644 --- a/python/ql/test/3/library-tests/types/functions/Never.ql +++ b/python/ql/test/3/library-tests/types/functions/Never.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from FunctionObject func where func.neverReturns() diff --git a/python/ql/test/3/library-tests/types/functions/ReturnTypes.ql b/python/ql/test/3/library-tests/types/functions/ReturnTypes.ql index beb955e1188..d35deea34bf 100644 --- a/python/ql/test/3/library-tests/types/functions/ReturnTypes.ql +++ b/python/ql/test/3/library-tests/types/functions/ReturnTypes.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from PyFunctionObject func, ClassObject ret_type where func.getAnInferredReturnType() = ret_type diff --git a/python/ql/test/3/library-tests/types/namespaces/NameSpace.ql b/python/ql/test/3/library-tests/types/namespaces/NameSpace.ql index 38241e8fabc..f41d977d47b 100644 --- a/python/ql/test/3/library-tests/types/namespaces/NameSpace.ql +++ b/python/ql/test/3/library-tests/types/namespaces/NameSpace.ql @@ -6,6 +6,7 @@ */ import python +private import LegacyPointsTo from Scope s, string name, Object val where diff --git a/python/ql/test/3/library-tests/types/properties/BuiltinProperties.ql b/python/ql/test/3/library-tests/types/properties/BuiltinProperties.ql index 24766db9f2e..9ab0b5e4bbd 100644 --- a/python/ql/test/3/library-tests/types/properties/BuiltinProperties.ql +++ b/python/ql/test/3/library-tests/types/properties/BuiltinProperties.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls, string name, BuiltinPropertyObject p where diff --git a/python/ql/test/experimental/library-tests/CallGraph/InlineCallGraphTest.ql b/python/ql/test/experimental/library-tests/CallGraph/InlineCallGraphTest.ql index 1771727dbbc..5cdbd9e6a4e 100644 --- a/python/ql/test/experimental/library-tests/CallGraph/InlineCallGraphTest.ql +++ b/python/ql/test/experimental/library-tests/CallGraph/InlineCallGraphTest.ql @@ -1,6 +1,7 @@ import python import utils.test.InlineExpectationsTest private import semmle.python.dataflow.new.internal.DataFlowDispatch as TT +private import LegacyPointsTo /** Holds when `call` is resolved to `callable` using points-to based call-graph. */ predicate pointsToCallEdge(CallNode call, Function callable) { diff --git a/python/ql/test/experimental/query-tests/Security/CWE-409/DecompressionBombs.expected b/python/ql/test/experimental/query-tests/Security/CWE-409/DecompressionBombs.expected index 12d1b8282c7..87b07df086f 100644 --- a/python/ql/test/experimental/query-tests/Security/CWE-409/DecompressionBombs.expected +++ b/python/ql/test/experimental/query-tests/Security/CWE-409/DecompressionBombs.expected @@ -1,23 +1,23 @@ edges | test.py:10:16:10:24 | ControlFlowNode for file_path | test.py:11:21:11:29 | ControlFlowNode for file_path | provenance | | | test.py:11:5:11:35 | ControlFlowNode for Attribute() | test.py:11:5:11:52 | ControlFlowNode for Attribute() | provenance | Config | -| test.py:11:21:11:29 | ControlFlowNode for file_path | test.py:11:5:11:35 | ControlFlowNode for Attribute() | provenance | MaD:85 | +| test.py:11:21:11:29 | ControlFlowNode for file_path | test.py:11:5:11:35 | ControlFlowNode for Attribute() | provenance | MaD:86 | | test.py:11:21:11:29 | ControlFlowNode for file_path | test.py:11:5:11:52 | ControlFlowNode for Attribute() | provenance | Config | | test.py:11:21:11:29 | ControlFlowNode for file_path | test.py:12:21:12:29 | ControlFlowNode for file_path | provenance | | | test.py:12:5:12:35 | ControlFlowNode for Attribute() | test.py:12:5:12:48 | ControlFlowNode for Attribute() | provenance | Config | -| test.py:12:21:12:29 | ControlFlowNode for file_path | test.py:12:5:12:35 | ControlFlowNode for Attribute() | provenance | MaD:85 | +| test.py:12:21:12:29 | ControlFlowNode for file_path | test.py:12:5:12:35 | ControlFlowNode for Attribute() | provenance | MaD:86 | | test.py:12:21:12:29 | ControlFlowNode for file_path | test.py:12:5:12:48 | ControlFlowNode for Attribute() | provenance | Config | | test.py:12:21:12:29 | ControlFlowNode for file_path | test.py:14:26:14:34 | ControlFlowNode for file_path | provenance | | | test.py:14:10:14:35 | ControlFlowNode for Attribute() | test.py:15:14:15:29 | ControlFlowNode for Attribute() | provenance | Config | -| test.py:14:26:14:34 | ControlFlowNode for file_path | test.py:14:10:14:35 | ControlFlowNode for Attribute() | provenance | MaD:85 | +| test.py:14:26:14:34 | ControlFlowNode for file_path | test.py:14:10:14:35 | ControlFlowNode for Attribute() | provenance | MaD:86 | | test.py:14:26:14:34 | ControlFlowNode for file_path | test.py:15:14:15:29 | ControlFlowNode for Attribute() | provenance | Config | | test.py:14:26:14:34 | ControlFlowNode for file_path | test.py:18:26:18:34 | ControlFlowNode for file_path | provenance | | | test.py:18:10:18:35 | ControlFlowNode for Attribute() | test.py:19:14:19:39 | ControlFlowNode for Attribute() | provenance | Config | -| test.py:18:26:18:34 | ControlFlowNode for file_path | test.py:18:10:18:35 | ControlFlowNode for Attribute() | provenance | MaD:85 | +| test.py:18:26:18:34 | ControlFlowNode for file_path | test.py:18:10:18:35 | ControlFlowNode for Attribute() | provenance | MaD:86 | | test.py:18:26:18:34 | ControlFlowNode for file_path | test.py:19:14:19:39 | ControlFlowNode for Attribute() | provenance | Config | | test.py:18:26:18:34 | ControlFlowNode for file_path | test.py:22:21:22:29 | ControlFlowNode for file_path | provenance | | | test.py:22:5:22:30 | ControlFlowNode for Attribute() | test.py:22:5:22:60 | ControlFlowNode for Attribute() | provenance | Config | -| test.py:22:21:22:29 | ControlFlowNode for file_path | test.py:22:5:22:30 | ControlFlowNode for Attribute() | provenance | MaD:85 | +| test.py:22:21:22:29 | ControlFlowNode for file_path | test.py:22:5:22:30 | ControlFlowNode for Attribute() | provenance | MaD:86 | | test.py:22:21:22:29 | ControlFlowNode for file_path | test.py:22:5:22:60 | ControlFlowNode for Attribute() | provenance | Config | | test.py:22:21:22:29 | ControlFlowNode for file_path | test.py:24:18:24:26 | ControlFlowNode for file_path | provenance | | | test.py:24:18:24:26 | ControlFlowNode for file_path | test.py:24:5:24:52 | ControlFlowNode for Attribute() | provenance | Config | diff --git a/python/ql/test/extractor-tests/double-import/ModuleNames.ql b/python/ql/test/extractor-tests/double-import/ModuleNames.ql index 54aa78e23a3..6d25cf91f70 100644 --- a/python/ql/test/extractor-tests/double-import/ModuleNames.ql +++ b/python/ql/test/extractor-tests/double-import/ModuleNames.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from Container path, string name where exists(ModuleValue m | m.getPath() = path and m.getName() = name) diff --git a/python/ql/test/extractor-tests/unicode_decoding/test.ql b/python/ql/test/extractor-tests/unicode_decoding/test.ql index b2d51b10d22..4e0937a07c4 100644 --- a/python/ql/test/extractor-tests/unicode_decoding/test.ql +++ b/python/ql/test/extractor-tests/unicode_decoding/test.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from Object o, string s where diff --git a/python/ql/test/library-tests/ControlFlow/general/Comments.ql b/python/ql/test/library-tests/ControlFlow/general/Comments.ql index 71d00f1a8d4..7fe0545c795 100644 --- a/python/ql/test/library-tests/ControlFlow/general/Comments.ql +++ b/python/ql/test/library-tests/ControlFlow/general/Comments.ql @@ -1,5 +1,6 @@ import python +private import LegacyPointsTo -from Module m, int n -where n = m.getMetrics().getNumberOfLinesOfComments() +from ModuleMetrics m, int n +where n = m.getNumberOfLinesOfComments() select m.toString(), n diff --git a/python/ql/test/library-tests/ControlFlow/general/Cyclo.ql b/python/ql/test/library-tests/ControlFlow/general/Cyclo.ql index fb801a29002..a36375b7f3d 100644 --- a/python/ql/test/library-tests/ControlFlow/general/Cyclo.ql +++ b/python/ql/test/library-tests/ControlFlow/general/Cyclo.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo -from Function func -select func.toString(), func.getMetrics().getCyclomaticComplexity() +from FunctionMetrics func +select func.toString(), func.getCyclomaticComplexity() diff --git a/python/ql/test/library-tests/ControlFlow/general/Lines.ql b/python/ql/test/library-tests/ControlFlow/general/Lines.ql index ca6e7715538..2e861691fbb 100644 --- a/python/ql/test/library-tests/ControlFlow/general/Lines.ql +++ b/python/ql/test/library-tests/ControlFlow/general/Lines.ql @@ -1,8 +1,9 @@ import python +private import LegacyPointsTo from Scope s, int n where - exists(Function f | f = s | n = f.getMetrics().getNumberOfLines()) + exists(FunctionMetrics f | f = s | n = f.getNumberOfLines()) or - exists(Module m | m = s | n = m.getMetrics().getNumberOfLines()) + exists(ModuleMetrics m | m = s | n = m.getNumberOfLines()) select s.toString(), n diff --git a/python/ql/test/library-tests/ControlFlow/ssa/undefined/test.ql b/python/ql/test/library-tests/ControlFlow/ssa/undefined/test.ql index 41b08ec0591..c161c5d3f5e 100644 --- a/python/ql/test/library-tests/ControlFlow/ssa/undefined/test.ql +++ b/python/ql/test/library-tests/ControlFlow/ssa/undefined/test.ql @@ -1,5 +1,6 @@ import python +private import LegacyPointsTo -from SsaVariable var +from SsaVariableWithPointsTo var where var.maybeUndefined() select var.getDefinition().getLocation().getStartLine(), var.toString() diff --git a/python/ql/test/library-tests/PointsTo/api/ClassValue.ql b/python/ql/test/library-tests/PointsTo/api/ClassValue.ql index 230cc487ea4..65a4c73d4a6 100644 --- a/python/ql/test/library-tests/PointsTo/api/ClassValue.ql +++ b/python/ql/test/library-tests/PointsTo/api/ClassValue.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassValue cls, string description where diff --git a/python/ql/test/library-tests/PointsTo/api/Constants.ql b/python/ql/test/library-tests/PointsTo/api/Constants.ql index 151f6b9ce9c..a6072a1d8e8 100644 --- a/python/ql/test/library-tests/PointsTo/api/Constants.ql +++ b/python/ql/test/library-tests/PointsTo/api/Constants.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from string txt, Value val where diff --git a/python/ql/test/library-tests/PointsTo/api/QualifedNames.ql b/python/ql/test/library-tests/PointsTo/api/QualifedNames.ql index daafad0492b..c756265295b 100644 --- a/python/ql/test/library-tests/PointsTo/api/QualifedNames.ql +++ b/python/ql/test/library-tests/PointsTo/api/QualifedNames.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from FunctionValue v, string name where diff --git a/python/ql/test/library-tests/PointsTo/api/Value.ql b/python/ql/test/library-tests/PointsTo/api/Value.ql index 9c6e0739461..fadf008f6ea 100644 --- a/python/ql/test/library-tests/PointsTo/api/Value.ql +++ b/python/ql/test/library-tests/PointsTo/api/Value.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from Value val, string name where diff --git a/python/ql/test/library-tests/PointsTo/calls/GetACall.ql b/python/ql/test/library-tests/PointsTo/calls/GetACall.ql index 84f2ab4fb4a..8c6cc76c031 100644 --- a/python/ql/test/library-tests/PointsTo/calls/GetACall.ql +++ b/python/ql/test/library-tests/PointsTo/calls/GetACall.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ControlFlowNode call, Value func where call = func.getACall() diff --git a/python/ql/test/library-tests/PointsTo/calls/getArgumentForCall.ql b/python/ql/test/library-tests/PointsTo/calls/getArgumentForCall.ql index 7c76b9e0ce5..d388f96783c 100644 --- a/python/ql/test/library-tests/PointsTo/calls/getArgumentForCall.ql +++ b/python/ql/test/library-tests/PointsTo/calls/getArgumentForCall.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from CallNode call, CallableValue callable, int i select call.getLocation().getStartLine(), call.toString(), callable.toString(), i, diff --git a/python/ql/test/library-tests/PointsTo/calls/getNamedArgumentForCall.ql b/python/ql/test/library-tests/PointsTo/calls/getNamedArgumentForCall.ql index 4cb3fbdf335..7fa39194deb 100644 --- a/python/ql/test/library-tests/PointsTo/calls/getNamedArgumentForCall.ql +++ b/python/ql/test/library-tests/PointsTo/calls/getNamedArgumentForCall.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from CallNode call, CallableValue callable, string name select call.getLocation().getStartLine(), call.toString(), callable.toString(), name, diff --git a/python/ql/test/library-tests/PointsTo/calls/getParameter.ql b/python/ql/test/library-tests/PointsTo/calls/getParameter.ql index 07f12cce36f..1cabfeb45bc 100644 --- a/python/ql/test/library-tests/PointsTo/calls/getParameter.ql +++ b/python/ql/test/library-tests/PointsTo/calls/getParameter.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from CallableValue callable, int i select callable.toString(), i, callable.getParameter(i).toString() diff --git a/python/ql/test/library-tests/PointsTo/calls/getParameterByName.ql b/python/ql/test/library-tests/PointsTo/calls/getParameterByName.ql index d4766b680f7..20c4c77f121 100644 --- a/python/ql/test/library-tests/PointsTo/calls/getParameterByName.ql +++ b/python/ql/test/library-tests/PointsTo/calls/getParameterByName.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from CallableValue callable, string name select callable.toString(), name, callable.getParameterByName(name).toString() diff --git a/python/ql/test/library-tests/PointsTo/decorators/Values.ql b/python/ql/test/library-tests/PointsTo/decorators/Values.ql index fc7a08db20b..fe4b6d080f4 100644 --- a/python/ql/test/library-tests/PointsTo/decorators/Values.ql +++ b/python/ql/test/library-tests/PointsTo/decorators/Values.ql @@ -1,6 +1,5 @@ import python -import semmle.python.pointsto.PointsTo -import semmle.python.objects.ObjectInternal +private import LegacyPointsTo from NameNode f, Context ctx, ObjectInternal v where diff --git a/python/ql/test/library-tests/PointsTo/functions/Calls.ql b/python/ql/test/library-tests/PointsTo/functions/Calls.ql index 5bc29b5aaf3..659ba4143f6 100644 --- a/python/ql/test/library-tests/PointsTo/functions/Calls.ql +++ b/python/ql/test/library-tests/PointsTo/functions/Calls.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from CallNode call, FunctionObject func, string kind where diff --git a/python/ql/test/library-tests/PointsTo/functions/NeverReturns.ql b/python/ql/test/library-tests/PointsTo/functions/NeverReturns.ql index c576651a8e6..0a20f8e1b1f 100644 --- a/python/ql/test/library-tests/PointsTo/functions/NeverReturns.ql +++ b/python/ql/test/library-tests/PointsTo/functions/NeverReturns.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from FunctionObject f where f.neverReturns() diff --git a/python/ql/test/library-tests/PointsTo/functions/test.ql b/python/ql/test/library-tests/PointsTo/functions/test.ql index f85e95f5fe4..01f8416c8dc 100644 --- a/python/ql/test/library-tests/PointsTo/functions/test.ql +++ b/python/ql/test/library-tests/PointsTo/functions/test.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from Call c, FunctionObject f where diff --git a/python/ql/test/library-tests/PointsTo/general/GlobalPointsTo.ql b/python/ql/test/library-tests/PointsTo/general/GlobalPointsTo.ql index e90674bab2e..a0b7e8979f3 100644 --- a/python/ql/test/library-tests/PointsTo/general/GlobalPointsTo.ql +++ b/python/ql/test/library-tests/PointsTo/general/GlobalPointsTo.ql @@ -1,5 +1,6 @@ import python private import LegacyPointsTo +private import semmle.python.types.ImportTime import interesting from int line, ControlFlowNodeWithPointsTo f, Object o, ImportTimeScope n diff --git a/python/ql/test/library-tests/PointsTo/general/Util.qll b/python/ql/test/library-tests/PointsTo/general/Util.qll index 1c26d7d830b..289e71a9e6c 100644 --- a/python/ql/test/library-tests/PointsTo/general/Util.qll +++ b/python/ql/test/library-tests/PointsTo/general/Util.qll @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo string repr(Object o) { not o instanceof StringObject and not o = theBoundMethodType() and result = o.toString() diff --git a/python/ql/test/library-tests/PointsTo/global/Global.ql b/python/ql/test/library-tests/PointsTo/global/Global.ql index f9f52b12641..4dc6d16d379 100644 --- a/python/ql/test/library-tests/PointsTo/global/Global.ql +++ b/python/ql/test/library-tests/PointsTo/global/Global.ql @@ -1,7 +1,5 @@ import python -import semmle.python.pointsto.PointsTo -import semmle.python.pointsto.PointsToContext -import semmle.python.objects.ObjectInternal +private import LegacyPointsTo from ControlFlowNode f, PointsToContext ctx, Value obj, ControlFlowNode orig where diff --git a/python/ql/test/library-tests/PointsTo/inheritance/BaseTypes.ql b/python/ql/test/library-tests/PointsTo/inheritance/BaseTypes.ql index f1201eba0dc..01f69d8bb12 100644 --- a/python/ql/test/library-tests/PointsTo/inheritance/BaseTypes.ql +++ b/python/ql/test/library-tests/PointsTo/inheritance/BaseTypes.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls, ClassObject base, int n where diff --git a/python/ql/test/library-tests/PointsTo/inheritance/Calls.ql b/python/ql/test/library-tests/PointsTo/inheritance/Calls.ql index f91d207fc70..3f111d6e08a 100644 --- a/python/ql/test/library-tests/PointsTo/inheritance/Calls.ql +++ b/python/ql/test/library-tests/PointsTo/inheritance/Calls.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from Call c, FunctionObject f where f.getACall().getNode() = c diff --git a/python/ql/test/library-tests/PointsTo/inheritance/Declares.ql b/python/ql/test/library-tests/PointsTo/inheritance/Declares.ql index a2c762be860..2fe61ca2d7f 100644 --- a/python/ql/test/library-tests/PointsTo/inheritance/Declares.ql +++ b/python/ql/test/library-tests/PointsTo/inheritance/Declares.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls, string name where class_declares_attribute(cls, name) diff --git a/python/ql/test/library-tests/PointsTo/inheritance/MetaClass.ql b/python/ql/test/library-tests/PointsTo/inheritance/MetaClass.ql index 0ca90782119..a487c16e953 100644 --- a/python/ql/test/library-tests/PointsTo/inheritance/MetaClass.ql +++ b/python/ql/test/library-tests/PointsTo/inheritance/MetaClass.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls, ClassObject meta where diff --git a/python/ql/test/library-tests/PointsTo/inheritance/SuperTypes.ql b/python/ql/test/library-tests/PointsTo/inheritance/SuperTypes.ql index 338ea118ac1..c3156eb1fa0 100644 --- a/python/ql/test/library-tests/PointsTo/inheritance/SuperTypes.ql +++ b/python/ql/test/library-tests/PointsTo/inheritance/SuperTypes.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls, ClassObject sup where diff --git a/python/ql/test/library-tests/PointsTo/metaclass/Failed.ql b/python/ql/test/library-tests/PointsTo/metaclass/Failed.ql index a5d2afd4241..4129c99666b 100644 --- a/python/ql/test/library-tests/PointsTo/metaclass/Failed.ql +++ b/python/ql/test/library-tests/PointsTo/metaclass/Failed.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls, string reason where diff --git a/python/ql/test/library-tests/PointsTo/metaclass/Style.ql b/python/ql/test/library-tests/PointsTo/metaclass/Style.ql index f29ba3a8b7c..7ab5b4a329f 100644 --- a/python/ql/test/library-tests/PointsTo/metaclass/Style.ql +++ b/python/ql/test/library-tests/PointsTo/metaclass/Style.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls, string style where diff --git a/python/ql/test/library-tests/PointsTo/metaclass/test.ql b/python/ql/test/library-tests/PointsTo/metaclass/test.ql index d08f4e37fa6..471c01599d6 100644 --- a/python/ql/test/library-tests/PointsTo/metaclass/test.ql +++ b/python/ql/test/library-tests/PointsTo/metaclass/test.ql @@ -1,5 +1,5 @@ import python -private import semmle.python.objects.ObjectInternal +private import LegacyPointsTo /** An unknown type. Not usually visible. */ class UnknownType extends UnknownClassInternal { diff --git a/python/ql/test/library-tests/PointsTo/new/Call.ql b/python/ql/test/library-tests/PointsTo/new/Call.ql index f014001f315..e924398ca40 100644 --- a/python/ql/test/library-tests/PointsTo/new/Call.ql +++ b/python/ql/test/library-tests/PointsTo/new/Call.ql @@ -1,5 +1,6 @@ import python import Util +private import LegacyPointsTo from ControlFlowNode call, FunctionObject func where call = func.getACall() diff --git a/python/ql/test/library-tests/PointsTo/new/ClassMethod.ql b/python/ql/test/library-tests/PointsTo/new/ClassMethod.ql index 17f73420e05..9eac6e3fea2 100644 --- a/python/ql/test/library-tests/PointsTo/new/ClassMethod.ql +++ b/python/ql/test/library-tests/PointsTo/new/ClassMethod.ql @@ -1,5 +1,6 @@ import python import Util +private import LegacyPointsTo from ClassMethodObject cm, CallNode call where call = cm.getACall() diff --git a/python/ql/test/library-tests/PointsTo/new/NameSpace.ql b/python/ql/test/library-tests/PointsTo/new/NameSpace.ql index 5d099f78b61..6150b94aee1 100644 --- a/python/ql/test/library-tests/PointsTo/new/NameSpace.ql +++ b/python/ql/test/library-tests/PointsTo/new/NameSpace.ql @@ -1,5 +1,6 @@ import python import Util +private import LegacyPointsTo from Scope s, string name, Object val where diff --git a/python/ql/test/library-tests/PointsTo/new/PointsToMissing.ql b/python/ql/test/library-tests/PointsTo/new/PointsToMissing.ql index 9e744591df2..271f35db996 100644 --- a/python/ql/test/library-tests/PointsTo/new/PointsToMissing.ql +++ b/python/ql/test/library-tests/PointsTo/new/PointsToMissing.ql @@ -1,6 +1,6 @@ import python import Util -import semmle.python.pointsto.PointsTo +private import LegacyPointsTo /* This test should return _no_ results. */ predicate relevant_node(ControlFlowNode n) { diff --git a/python/ql/test/library-tests/PointsTo/new/PointsToUnknown.ql b/python/ql/test/library-tests/PointsTo/new/PointsToUnknown.ql index cb91e18dafe..2526819b76a 100644 --- a/python/ql/test/library-tests/PointsTo/new/PointsToUnknown.ql +++ b/python/ql/test/library-tests/PointsTo/new/PointsToUnknown.ql @@ -1,6 +1,6 @@ import python import Util -import semmle.python.pointsto.PointsTo +private import LegacyPointsTo from ControlFlowNode f, ControlFlowNode x where PointsTo::pointsTo(f, _, ObjectInternal::unknown(), x) diff --git a/python/ql/test/library-tests/PointsTo/new/PointsToWithContext.ql b/python/ql/test/library-tests/PointsTo/new/PointsToWithContext.ql index dbed1a9a7f6..bad7589d0a2 100644 --- a/python/ql/test/library-tests/PointsTo/new/PointsToWithContext.ql +++ b/python/ql/test/library-tests/PointsTo/new/PointsToWithContext.ql @@ -1,7 +1,6 @@ import python import Util -import semmle.python.pointsto.PointsTo -import semmle.python.pointsto.PointsToContext +private import LegacyPointsTo from ControlFlowNode f, Object o, ClassObject c, ControlFlowNode x, PointsToContext ctx where PointsTo::points_to(f, ctx, o, c, x) diff --git a/python/ql/test/library-tests/PointsTo/new/PointsToWithType.ql b/python/ql/test/library-tests/PointsTo/new/PointsToWithType.ql index 5747ce18fd5..20a23abced7 100644 --- a/python/ql/test/library-tests/PointsTo/new/PointsToWithType.ql +++ b/python/ql/test/library-tests/PointsTo/new/PointsToWithType.ql @@ -1,6 +1,6 @@ import python import Util -import semmle.python.pointsto.PointsTo +private import LegacyPointsTo from ControlFlowNode f, Object o, ClassObject c, ControlFlowNode x where PointsTo::points_to(f, _, o, c, x) diff --git a/python/ql/test/library-tests/PointsTo/new/Reachable.ql b/python/ql/test/library-tests/PointsTo/new/Reachable.ql index f8b2f0585eb..2376f13c752 100644 --- a/python/ql/test/library-tests/PointsTo/new/Reachable.ql +++ b/python/ql/test/library-tests/PointsTo/new/Reachable.ql @@ -1,5 +1,5 @@ import python -private import semmle.python.pointsto.PointsTo +private import LegacyPointsTo import Util from ControlFlowNode f, Context ctx diff --git a/python/ql/test/library-tests/PointsTo/new/SSA.ql b/python/ql/test/library-tests/PointsTo/new/SSA.ql index 7b41f3c427e..c919e1d4856 100644 --- a/python/ql/test/library-tests/PointsTo/new/SSA.ql +++ b/python/ql/test/library-tests/PointsTo/new/SSA.ql @@ -1,6 +1,5 @@ import python -private import semmle.python.pointsto.PointsTo -private import semmle.python.pointsto.PointsToContext +private import LegacyPointsTo import Util predicate ssa_variable_points_to( diff --git a/python/ql/test/library-tests/PointsTo/new/SourceEdgeDefinitions.ql b/python/ql/test/library-tests/PointsTo/new/SourceEdgeDefinitions.ql index 8cf0b4c15a6..117afe8100e 100644 --- a/python/ql/test/library-tests/PointsTo/new/SourceEdgeDefinitions.ql +++ b/python/ql/test/library-tests/PointsTo/new/SourceEdgeDefinitions.ql @@ -1,5 +1,4 @@ import python -import semmle.python.pointsto.PointsTo import Util from SsaSourceVariable var, ControlFlowNode use, BasicBlock pred diff --git a/python/ql/test/library-tests/PointsTo/new/SourceNodeDefinitions.ql b/python/ql/test/library-tests/PointsTo/new/SourceNodeDefinitions.ql index 77f6ab0923b..2c5867f9c4f 100644 --- a/python/ql/test/library-tests/PointsTo/new/SourceNodeDefinitions.ql +++ b/python/ql/test/library-tests/PointsTo/new/SourceNodeDefinitions.ql @@ -1,5 +1,4 @@ import python -import semmle.python.pointsto.PointsTo import Util from SsaSourceVariable var, ControlFlowNode defn, string kind diff --git a/python/ql/test/library-tests/PointsTo/new/SsaAttr.ql b/python/ql/test/library-tests/PointsTo/new/SsaAttr.ql index 67d85c2e3bd..c9b136f0c02 100644 --- a/python/ql/test/library-tests/PointsTo/new/SsaAttr.ql +++ b/python/ql/test/library-tests/PointsTo/new/SsaAttr.ql @@ -1,6 +1,5 @@ import python -private import semmle.python.pointsto.PointsTo -private import semmle.python.objects.ObjectInternal +private import LegacyPointsTo import Util from EssaVariable var, string name, ObjectInternal o, Context ctx diff --git a/python/ql/test/library-tests/PointsTo/new/SsaUses.ql b/python/ql/test/library-tests/PointsTo/new/SsaUses.ql index 2a8e8f1e750..9a250b6610f 100644 --- a/python/ql/test/library-tests/PointsTo/new/SsaUses.ql +++ b/python/ql/test/library-tests/PointsTo/new/SsaUses.ql @@ -1,5 +1,4 @@ import python -import semmle.python.pointsto.PointsTo import Util from EssaVariable var, ControlFlowNode use diff --git a/python/ql/test/library-tests/PointsTo/new/TestEvaluate.ql b/python/ql/test/library-tests/PointsTo/new/TestEvaluate.ql index d473e4e804a..1132f04df07 100644 --- a/python/ql/test/library-tests/PointsTo/new/TestEvaluate.ql +++ b/python/ql/test/library-tests/PointsTo/new/TestEvaluate.ql @@ -1,6 +1,5 @@ import python -import semmle.python.pointsto.PointsTo -import semmle.python.pointsto.PointsToContext +private import LegacyPointsTo import Util from diff --git a/python/ql/test/library-tests/PointsTo/new/Util.qll b/python/ql/test/library-tests/PointsTo/new/Util.qll index b83ad89d1c8..23c5aa8df7c 100644 --- a/python/ql/test/library-tests/PointsTo/new/Util.qll +++ b/python/ql/test/library-tests/PointsTo/new/Util.qll @@ -1,5 +1,5 @@ import python -import semmle.python.objects.ObjectInternal +private import LegacyPointsTo bindingset[which] string locate(Location l, string which) { diff --git a/python/ql/test/library-tests/PointsTo/new/VarUses.ql b/python/ql/test/library-tests/PointsTo/new/VarUses.ql index 58de54d7a3d..50b07d03be0 100644 --- a/python/ql/test/library-tests/PointsTo/new/VarUses.ql +++ b/python/ql/test/library-tests/PointsTo/new/VarUses.ql @@ -1,5 +1,5 @@ import python -import semmle.python.pointsto.PointsTo +private import LegacyPointsTo import Util from SsaSourceVariable var, ControlFlowNode use diff --git a/python/ql/test/library-tests/PointsTo/regressions/missing/metaclass/getACall.ql b/python/ql/test/library-tests/PointsTo/regressions/missing/metaclass/getACall.ql index e555c927d6a..5ca3c9518d6 100644 --- a/python/ql/test/library-tests/PointsTo/regressions/missing/metaclass/getACall.ql +++ b/python/ql/test/library-tests/PointsTo/regressions/missing/metaclass/getACall.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from PythonFunctionValue func select func, func.getACall() diff --git a/python/ql/test/library-tests/PointsTo/regressions/wrong/module-imports/conflict-stdlib/LocalModuleWithRef.ql b/python/ql/test/library-tests/PointsTo/regressions/wrong/module-imports/conflict-stdlib/LocalModuleWithRef.ql index 5bdb99415b2..f6bc97bf1f0 100644 --- a/python/ql/test/library-tests/PointsTo/regressions/wrong/module-imports/conflict-stdlib/LocalModuleWithRef.ql +++ b/python/ql/test/library-tests/PointsTo/regressions/wrong/module-imports/conflict-stdlib/LocalModuleWithRef.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ModuleValue mv, ControlFlowNode ref, string local_external where diff --git a/python/ql/test/library-tests/PointsTo/regressions/wrong/module-imports/conflict-stdlib/ModuleWithLocalRef.ql b/python/ql/test/library-tests/PointsTo/regressions/wrong/module-imports/conflict-stdlib/ModuleWithLocalRef.ql index 030211ba0bf..1422d5731fd 100644 --- a/python/ql/test/library-tests/PointsTo/regressions/wrong/module-imports/conflict-stdlib/ModuleWithLocalRef.ql +++ b/python/ql/test/library-tests/PointsTo/regressions/wrong/module-imports/conflict-stdlib/ModuleWithLocalRef.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ModuleValue mv, ControlFlowNode ref, string in_stdlib, string local_external, string is_missing where diff --git a/python/ql/test/library-tests/PointsTo/returns/Test.ql b/python/ql/test/library-tests/PointsTo/returns/Test.ql index 8546de90f24..928e4c9672f 100644 --- a/python/ql/test/library-tests/PointsTo/returns/Test.ql +++ b/python/ql/test/library-tests/PointsTo/returns/Test.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from PyFunctionObject f select f.toString(), f.getAnInferredReturnType().toString() diff --git a/python/ql/test/library-tests/PointsTo/subclass/Checks.ql b/python/ql/test/library-tests/PointsTo/subclass/Checks.ql index a82002b1d5f..f9deaabbc88 100644 --- a/python/ql/test/library-tests/PointsTo/subclass/Checks.ql +++ b/python/ql/test/library-tests/PointsTo/subclass/Checks.ql @@ -1,5 +1,5 @@ import python -import semmle.python.pointsto.PointsTo +private import LegacyPointsTo from Value sup, Value cls where Expressions::requireSubClass(cls, sup) diff --git a/python/ql/test/library-tests/attributes/SelfAttribute.ql b/python/ql/test/library-tests/attributes/SelfAttribute.ql index 66993121241..79ceff3a08a 100644 --- a/python/ql/test/library-tests/attributes/SelfAttribute.ql +++ b/python/ql/test/library-tests/attributes/SelfAttribute.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from SelfAttributeRead sa, int line, string g, string l where diff --git a/python/ql/test/library-tests/classes/abstract/Abstract.ql b/python/ql/test/library-tests/classes/abstract/Abstract.ql index bd2f98034cb..02c76421126 100644 --- a/python/ql/test/library-tests/classes/abstract/Abstract.ql +++ b/python/ql/test/library-tests/classes/abstract/Abstract.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls, string abstract where diff --git a/python/ql/test/library-tests/classes/attr/class_attr.ql b/python/ql/test/library-tests/classes/attr/class_attr.ql index 197ab1a1e5e..1c9c5513a1d 100644 --- a/python/ql/test/library-tests/classes/attr/class_attr.ql +++ b/python/ql/test/library-tests/classes/attr/class_attr.ql @@ -5,6 +5,7 @@ */ import python +private import LegacyPointsTo from ClassObject cls, int line, string name, Object obj where diff --git a/python/ql/test/library-tests/classes/attr/class_defined_attr.ql b/python/ql/test/library-tests/classes/attr/class_defined_attr.ql index d7583e689c4..4fc6f7b67d2 100644 --- a/python/ql/test/library-tests/classes/attr/class_defined_attr.ql +++ b/python/ql/test/library-tests/classes/attr/class_defined_attr.ql @@ -5,6 +5,7 @@ */ import python +private import LegacyPointsTo from ClassObject cls, int line, string name, Object obj where diff --git a/python/ql/test/library-tests/classes/attr/class_defines_attr.ql b/python/ql/test/library-tests/classes/attr/class_defines_attr.ql index 6b266a0d40f..71dee836a9f 100644 --- a/python/ql/test/library-tests/classes/attr/class_defines_attr.ql +++ b/python/ql/test/library-tests/classes/attr/class_defines_attr.ql @@ -5,6 +5,7 @@ */ import python +private import LegacyPointsTo from ClassObject cls, int line, string name where diff --git a/python/ql/test/library-tests/classes/attr/class_has_attr.ql b/python/ql/test/library-tests/classes/attr/class_has_attr.ql index be8272d1bd6..24724f4d859 100644 --- a/python/ql/test/library-tests/classes/attr/class_has_attr.ql +++ b/python/ql/test/library-tests/classes/attr/class_has_attr.ql @@ -5,6 +5,7 @@ */ import python +private import LegacyPointsTo from ClassObject cls, int line, string name where diff --git a/python/ql/test/library-tests/classes/attr/hash.ql b/python/ql/test/library-tests/classes/attr/hash.ql index 19ac8933f69..3708e62ccdd 100644 --- a/python/ql/test/library-tests/classes/attr/hash.ql +++ b/python/ql/test/library-tests/classes/attr/hash.ql @@ -5,6 +5,7 @@ */ import python +private import LegacyPointsTo from ClassObject cls, int line, Object obj where diff --git a/python/ql/test/library-tests/classes/mro/C3.ql b/python/ql/test/library-tests/classes/mro/C3.ql index 981a55893c2..60b4b0c1e1b 100644 --- a/python/ql/test/library-tests/classes/mro/C3.ql +++ b/python/ql/test/library-tests/classes/mro/C3.ql @@ -1,5 +1,6 @@ import python import semmle.python.pointsto.MRO +private import LegacyPointsTo from ClassValue cls where not cls.isBuiltin() diff --git a/python/ql/test/library-tests/dependencies/Dependencies.ql b/python/ql/test/library-tests/dependencies/Dependencies.ql index 12378a567d2..6f0f6cb3bb7 100644 --- a/python/ql/test/library-tests/dependencies/Dependencies.ql +++ b/python/ql/test/library-tests/dependencies/Dependencies.ql @@ -1,5 +1,6 @@ import python import semmle.python.dependencies.Dependencies +private import LegacyPointsTo from DependencyKind dk, AstNode src, Object target where dk.isADependency(src, target) diff --git a/python/ql/test/library-tests/descriptors/Descriptors.ql b/python/ql/test/library-tests/descriptors/Descriptors.ql index e577d47b421..7a0f196f3f6 100644 --- a/python/ql/test/library-tests/descriptors/Descriptors.ql +++ b/python/ql/test/library-tests/descriptors/Descriptors.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls, string kind where diff --git a/python/ql/test/library-tests/descriptors/Methods.ql b/python/ql/test/library-tests/descriptors/Methods.ql index 3761ec5f7b5..49c8a3bbbff 100644 --- a/python/ql/test/library-tests/descriptors/Methods.ql +++ b/python/ql/test/library-tests/descriptors/Methods.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo int lineof(Object o) { result = o.getOrigin().getLocation().getStartLine() } diff --git a/python/ql/test/library-tests/descriptors/Properties.ql b/python/ql/test/library-tests/descriptors/Properties.ql index 29f9e2577a0..349d0a242f9 100644 --- a/python/ql/test/library-tests/descriptors/Properties.ql +++ b/python/ql/test/library-tests/descriptors/Properties.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from PropertyValue p, string method_name, FunctionValue method where diff --git a/python/ql/test/library-tests/exceptions/Handles.ql b/python/ql/test/library-tests/exceptions/Handles.ql index 620944de5b9..a8bc92db331 100644 --- a/python/ql/test/library-tests/exceptions/Handles.ql +++ b/python/ql/test/library-tests/exceptions/Handles.ql @@ -1,5 +1,6 @@ import python +private import LegacyPointsTo -from ExceptFlowNode ex, Value val +from ExceptFlowNodeWithPointsTo ex, Value val where ex.handledException(val, _, _) select ex.getLocation().getStartLine(), ex.toString(), val.toString() diff --git a/python/ql/test/library-tests/exceptions/Legal.ql b/python/ql/test/library-tests/exceptions/Legal.ql index bfe47717d23..5b10854c1e1 100644 --- a/python/ql/test/library-tests/exceptions/Legal.ql +++ b/python/ql/test/library-tests/exceptions/Legal.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls, string legal where diff --git a/python/ql/test/library-tests/frameworks/socketio/ConceptsTest.expected b/python/ql/test/library-tests/frameworks/socketio/ConceptsTest.expected new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/ql/test/library-tests/frameworks/socketio/ConceptsTest.ql b/python/ql/test/library-tests/frameworks/socketio/ConceptsTest.ql new file mode 100644 index 00000000000..b557a0bccb6 --- /dev/null +++ b/python/ql/test/library-tests/frameworks/socketio/ConceptsTest.ql @@ -0,0 +1,2 @@ +import python +import experimental.meta.ConceptsTest diff --git a/python/ql/test/library-tests/frameworks/socketio/InlineTaintTest.expected b/python/ql/test/library-tests/frameworks/socketio/InlineTaintTest.expected new file mode 100644 index 00000000000..020c338fd19 --- /dev/null +++ b/python/ql/test/library-tests/frameworks/socketio/InlineTaintTest.expected @@ -0,0 +1,3 @@ +argumentToEnsureNotTaintedNotMarkedAsSpurious +untaintedArgumentToEnsureTaintedNotMarkedAsMissing +testFailures diff --git a/python/ql/test/library-tests/frameworks/socketio/InlineTaintTest.ql b/python/ql/test/library-tests/frameworks/socketio/InlineTaintTest.ql new file mode 100644 index 00000000000..8524da5fe7d --- /dev/null +++ b/python/ql/test/library-tests/frameworks/socketio/InlineTaintTest.ql @@ -0,0 +1,2 @@ +import experimental.meta.InlineTaintTest +import MakeInlineTaintTest diff --git a/python/ql/test/library-tests/frameworks/socketio/taint_test.py b/python/ql/test/library-tests/frameworks/socketio/taint_test.py new file mode 100644 index 00000000000..07d109aa9a2 --- /dev/null +++ b/python/ql/test/library-tests/frameworks/socketio/taint_test.py @@ -0,0 +1,69 @@ +import sys +import socketio + +def ensure_tainted(*args): + print("tainted", args) + +def ensure_not_tainted(*args): + print("not tainted", args) + +sio = socketio.Server() + +@sio.event +def connect(sid, environ, auth): # $ requestHandler routedParameter=environ routedParameter=auth + ensure_not_tainted(sid) + ensure_tainted(environ, # $ tainted + auth) # $ tainted + +@sio.event +def event1(sid, data): # $ requestHandler routedParameter=data + ensure_not_tainted(sid) + ensure_tainted(data) # $ tainted + res = sio.call("e1", sid=sid) + ensure_tainted(res) # $ tainted + sio.emit("e2", "hi", to=sid, callback=lambda x: ensure_tainted(x)) # $ tainted $ requestHandler routedParameter=x + sio.send("hi", to=sid, callback=lambda x: ensure_tainted(x)) # $ tainted $ requestHandler routedParameter=x + +class MyNamespace(socketio.Namespace): + def on_event2(self, sid, data): # $ requestHandler routedParameter=data + ensure_not_tainted(self, sid) + ensure_tainted(data) # $ tainted + res = self.call("e1", sid=sid) + ensure_tainted(res) # $ tainted + self.emit("e2", "hi", to=sid, callback=lambda x: ensure_tainted(x)) # $ tainted $ requestHandler routedParameter=x + self.send("hi", to=sid, callback=lambda x: ensure_tainted(x)) # $ tainted $ requestHandler routedParameter=x + +sio.register_namespace(MyNamespace("/ns")) + +asio = socketio.AsyncServer(async_mode='asgi') + +@asio.event +async def event3(sid, data): # $ requestHandler routedParameter=data + ensure_not_tainted(sid) + ensure_tainted(data) # $ tainted + res = await asio.call("e1", sid=sid) + ensure_tainted(res) # $ tainted + await asio.emit("e2", "hi", to=sid, callback=lambda x: ensure_tainted(x)) # $ tainted $ requestHandler routedParameter=x + await asio.send("hi", to=sid, callback=lambda x: ensure_tainted(x)) # $ tainted $ requestHandler routedParameter=x + +class MyAsyncNamespace(socketio.AsyncNamespace): + async def on_event4(self, sid, data): # $ requestHandler routedParameter=data + ensure_not_tainted(self, sid) + ensure_tainted(data) # $ tainted + res = await self.call("e1", sid=sid) + ensure_tainted(res) # $ tainted + await self.emit("e2", "hi", to=sid, callback=lambda x: ensure_tainted(x)) # $ tainted $ requestHandler routedParameter=x + await self.send("hi", to=sid, callback=lambda x: ensure_tainted(x)) # $ tainted $ requestHandler routedParameter=x + +asio.register_namespace(MyAsyncNamespace("/ns")) + +if __name__ == "__main__": + + if "--async" in sys.argv: # $ threatModelSource[commandargs]=sys.argv + import uvicorn + app = socketio.ASGIApp(asio) + uvicorn.run(app, host='127.0.0.1', port=8000) + else: + import eventlet + app = socketio.WSGIApp(sio) + eventlet.wsgi.server(eventlet.listen(('', 8000)), app) \ No newline at end of file diff --git a/python/ql/test/library-tests/frameworks/socketio/test.py b/python/ql/test/library-tests/frameworks/socketio/test.py new file mode 100644 index 00000000000..f603edd3111 --- /dev/null +++ b/python/ql/test/library-tests/frameworks/socketio/test.py @@ -0,0 +1,29 @@ +import socketio + +sio = socketio.Server() + +@sio.on("connect") +def connect(sid, environ, auth): # $ requestHandler routedParameter=environ routedParameter=auth + print("connect", sid, environ, auth) + +@sio.on("event1") +def handle(sid, data): # $ requestHandler routedParameter=data + print("e1", sid, data) + +@sio.event +def event2(sid, data): # $ requestHandler routedParameter=data + print("e2", sid, data) + +def event3(sid, data): # $ requestHandler routedParameter=data + print("e3", sid, data) + +sio.on("event3", handler=event3) + +sio.on("event4", lambda sid,data: print("e4", sid, data)) # $ requestHandler routedParameter=data + + + +if __name__ == "__main__": + app = socketio.WSGIApp(sio) + import eventlet + eventlet.wsgi.server(eventlet.listen(('', 8000)), app) \ No newline at end of file diff --git a/python/ql/test/library-tests/frameworks/tornado/routing_test.py b/python/ql/test/library-tests/frameworks/tornado/routing_test.py index 2b596c20ce5..1cff63921da 100644 --- a/python/ql/test/library-tests/frameworks/tornado/routing_test.py +++ b/python/ql/test/library-tests/frameworks/tornado/routing_test.py @@ -1,5 +1,6 @@ import tornado.web import tornado.routing +import tornado.websocket class FooHandler(tornado.web.RequestHandler): @@ -54,6 +55,26 @@ class PossiblyNotRouted(tornado.web.RequestHandler): def get(self): # $ requestHandler self.write("NotRouted") # $ HttpResponse +class WebSocket(tornado.websocket.WebSocketHandler): + def open(self, x): # $ requestHandler routedParameter=x + self.write_message("WebSocket open {}".format(x)) # $ MISSING: HttpResponse + + def on_message(self, data): # $ requestHandler routedParameter=data + self.write_message("WebSocket on_message {}".format(data)) # $ MISSING: HttpResponse + + def on_ping(self, data): # $ requestHandler routedParameter=data + print("ping", data) + + def on_pong(self, data): # $ requestHandler routedParameter=data + print("pong", data) + + def select_subprotocol(self, subs): # $ requestHandler routedParameter=subs + print("select_subprotocol", subs) + + def check_origin(self, origin): # $ requestHandler routedParameter=origin + print("check_origin", origin) + return True + def make_app(): # see https://www.tornadoweb.org/en/stable/routing.html for even more examples @@ -74,6 +95,7 @@ def make_app(): (tornado.routing.HostMatches(r"(localhost|127\.0\.0\.1)"), [ ("/only-localhost", OnlyLocalhost) # $ routeSetup="/only-localhost" ]), + (r"/websocket/([0-9]+)", WebSocket), # $ routeSetup="/websocket/([0-9]+)" ], debug=True, diff --git a/python/ql/test/library-tests/modules/duplicate_name/Modules.ql b/python/ql/test/library-tests/modules/duplicate_name/Modules.ql index a6477c7d6af..af3df6f6eca 100644 --- a/python/ql/test/library-tests/modules/duplicate_name/Modules.ql +++ b/python/ql/test/library-tests/modules/duplicate_name/Modules.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from string name, int mcnt where mcnt = strictcount(Module m | m.getName() = name) and mcnt > 1 diff --git a/python/ql/test/library-tests/objects/Literals.ql b/python/ql/test/library-tests/objects/Literals.ql index a7f10b358ff..d5aee013f25 100644 --- a/python/ql/test/library-tests/objects/Literals.ql +++ b/python/ql/test/library-tests/objects/Literals.ql @@ -1,5 +1,6 @@ /* Test that there are no literals that do not have a corresponding object. */ import python +private import LegacyPointsTo string repr(Expr e) { result = e.(Num).getN() or @@ -8,5 +9,5 @@ string repr(Expr e) { } from ImmutableLiteral l -where not exists(l.getLiteralObject()) +where not exists(getLiteralObject(l)) select l.getLocation().getStartLine(), repr(l) diff --git a/python/ql/test/library-tests/objects/Name.ql b/python/ql/test/library-tests/objects/Name.ql index c274ed34554..e4bac8bba65 100644 --- a/python/ql/test/library-tests/objects/Name.ql +++ b/python/ql/test/library-tests/objects/Name.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from Object o, string name where diff --git a/python/ql/test/library-tests/overrides/FunctionOverrides.ql b/python/ql/test/library-tests/overrides/FunctionOverrides.ql index c719006665d..a30ca89d6cc 100644 --- a/python/ql/test/library-tests/overrides/FunctionOverrides.ql +++ b/python/ql/test/library-tests/overrides/FunctionOverrides.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from PythonFunctionValue f, string overriding, string overridden where diff --git a/python/ql/test/library-tests/state_tracking/Test.ql b/python/ql/test/library-tests/state_tracking/Test.ql index a0a12e8615d..706dc73191a 100644 --- a/python/ql/test/library-tests/state_tracking/Test.ql +++ b/python/ql/test/library-tests/state_tracking/Test.ql @@ -1,5 +1,6 @@ import python import Lib +private import LegacyPointsTo from ControlFlowNode f, TrackableState state, Context ctx, boolean sense where diff --git a/python/ql/test/library-tests/taint/config/TaintLib.qll b/python/ql/test/library-tests/taint/config/TaintLib.qll index 35eebe8ffa6..82bc4afa72e 100644 --- a/python/ql/test/library-tests/taint/config/TaintLib.qll +++ b/python/ql/test/library-tests/taint/config/TaintLib.qll @@ -1,5 +1,6 @@ import python import semmle.python.dataflow.TaintTracking +private import LegacyPointsTo class SimpleTest extends TaintKind { SimpleTest() { this = "simple.test" } diff --git a/python/ql/test/library-tests/taint/config/TaintedArgument.ql b/python/ql/test/library-tests/taint/config/TaintedArgument.ql index b8753b3fe00..e3689bca0d8 100644 --- a/python/ql/test/library-tests/taint/config/TaintedArgument.ql +++ b/python/ql/test/library-tests/taint/config/TaintedArgument.ql @@ -2,6 +2,7 @@ import python import semmle.python.dataflow.TaintTracking import TaintLib import semmle.python.dataflow.Implementation +private import LegacyPointsTo from TaintTrackingImplementation config, TaintTrackingNode src, CallNode call, diff --git a/python/ql/test/library-tests/taint/general/ModuleAttribute.ql b/python/ql/test/library-tests/taint/general/ModuleAttribute.ql index 6a4349b4100..8da8cb5048e 100644 --- a/python/ql/test/library-tests/taint/general/ModuleAttribute.ql +++ b/python/ql/test/library-tests/taint/general/ModuleAttribute.ql @@ -1,6 +1,7 @@ import python import semmle.python.dataflow.Implementation import TaintLib +private import LegacyPointsTo from ModuleValue m, string name, TaintedNode origin, TaintTrackingImplementation impl where impl.moduleAttributeTainted(m, name, origin) diff --git a/python/ql/test/library-tests/taint/general/TaintLib.qll b/python/ql/test/library-tests/taint/general/TaintLib.qll index af3799c3b95..eb55093ad09 100644 --- a/python/ql/test/library-tests/taint/general/TaintLib.qll +++ b/python/ql/test/library-tests/taint/general/TaintLib.qll @@ -1,5 +1,6 @@ import python import semmle.python.dataflow.TaintTracking +private import LegacyPointsTo class SimpleTest extends TaintKind { SimpleTest() { this = "simple.test" } diff --git a/python/ql/test/library-tests/types/attributes/Test.ql b/python/ql/test/library-tests/types/attributes/Test.ql index 9e066a6414b..ba2e8995dc2 100644 --- a/python/ql/test/library-tests/types/attributes/Test.ql +++ b/python/ql/test/library-tests/types/attributes/Test.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls, ClassObject start, string name, Object val where not name.substring(0, 2) = "__" and val = cls.lookupMro(start, name) diff --git a/python/ql/test/library-tests/types/classattr/ClassAttribute.ql b/python/ql/test/library-tests/types/classattr/ClassAttribute.ql index d0633a36e3a..fc775ebf39b 100644 --- a/python/ql/test/library-tests/types/classattr/ClassAttribute.ql +++ b/python/ql/test/library-tests/types/classattr/ClassAttribute.ql @@ -5,6 +5,7 @@ */ import python +private import LegacyPointsTo from ClassObject cls, string name, string kind where diff --git a/python/ql/test/library-tests/types/classattr/ClassMember.ql b/python/ql/test/library-tests/types/classattr/ClassMember.ql index d1e136a5108..54f1d1a5b02 100644 --- a/python/ql/test/library-tests/types/classattr/ClassMember.ql +++ b/python/ql/test/library-tests/types/classattr/ClassMember.ql @@ -5,6 +5,7 @@ */ import python +private import LegacyPointsTo from ClassObject cls, string name, string kind, Object o where diff --git a/python/ql/test/library-tests/types/classattr/SpecialAttribute.ql b/python/ql/test/library-tests/types/classattr/SpecialAttribute.ql index dc21b250c1e..375e9b9880e 100644 --- a/python/ql/test/library-tests/types/classattr/SpecialAttribute.ql +++ b/python/ql/test/library-tests/types/classattr/SpecialAttribute.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls, string name, string kind, Object o where diff --git a/python/ql/test/library-tests/types/classes/FailedInference.ql b/python/ql/test/library-tests/types/classes/FailedInference.ql index 192cf696fbf..feae8fdc5ee 100644 --- a/python/ql/test/library-tests/types/classes/FailedInference.ql +++ b/python/ql/test/library-tests/types/classes/FailedInference.ql @@ -1,5 +1,5 @@ import python -import semmle.python.pointsto.PointsTo +private import LegacyPointsTo from ClassValue cls, string reason where Types::failedInference(cls, reason) diff --git a/python/ql/test/library-tests/types/classes/duplicate_base.ql b/python/ql/test/library-tests/types/classes/duplicate_base.ql index 47e975c4560..7a32b545ae0 100644 --- a/python/ql/test/library-tests/types/classes/duplicate_base.ql +++ b/python/ql/test/library-tests/types/classes/duplicate_base.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ClassObject cls where cls.hasDuplicateBases() diff --git a/python/ql/test/library-tests/types/exceptions/ExitRaises.ql b/python/ql/test/library-tests/types/exceptions/ExitRaises.ql index 32ef268332c..6ad248f6612 100644 --- a/python/ql/test/library-tests/types/exceptions/ExitRaises.ql +++ b/python/ql/test/library-tests/types/exceptions/ExitRaises.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from RaisingNode r, Scope s, ClassObject cls where r.viableExceptionalExit_objectapi(s, cls) diff --git a/python/ql/test/library-tests/types/exceptions/Handles.ql b/python/ql/test/library-tests/types/exceptions/Handles.ql index dfdf1f9d7b2..bec8767d6c5 100644 --- a/python/ql/test/library-tests/types/exceptions/Handles.ql +++ b/python/ql/test/library-tests/types/exceptions/Handles.ql @@ -1,5 +1,6 @@ import python +private import LegacyPointsTo -from ExceptFlowNode n, ClassObject cls +from ExceptFlowNodeWithPointsTo n, ClassObject cls where n.handles_objectapi(cls) select n.getLocation().getStartLine(), cls.toString() diff --git a/python/ql/test/library-tests/types/exceptions/Impossible.ql b/python/ql/test/library-tests/types/exceptions/Impossible.ql index 787ba8898f9..acdcbb8e84f 100644 --- a/python/ql/test/library-tests/types/exceptions/Impossible.ql +++ b/python/ql/test/library-tests/types/exceptions/Impossible.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from RaisingNode r, ControlFlowNode n, string kind where diff --git a/python/ql/test/library-tests/types/exceptions/LineRaises.ql b/python/ql/test/library-tests/types/exceptions/LineRaises.ql index de8b834e520..94b54a27198 100644 --- a/python/ql/test/library-tests/types/exceptions/LineRaises.ql +++ b/python/ql/test/library-tests/types/exceptions/LineRaises.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from RaisingNode r, string type where diff --git a/python/ql/test/library-tests/types/exceptions/Raises.ql b/python/ql/test/library-tests/types/exceptions/Raises.ql index 2415c707967..e4f9a6664d5 100644 --- a/python/ql/test/library-tests/types/exceptions/Raises.ql +++ b/python/ql/test/library-tests/types/exceptions/Raises.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from PyFunctionObject f, string type where diff --git a/python/ql/test/library-tests/types/exceptions/Reraises.ql b/python/ql/test/library-tests/types/exceptions/Reraises.ql index 699eb325f8c..8a6ade33d5a 100644 --- a/python/ql/test/library-tests/types/exceptions/Reraises.ql +++ b/python/ql/test/library-tests/types/exceptions/Reraises.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from ReraisingNode r select r.getLocation().getStartLine(), r, r.getARaisedType().toString() diff --git a/python/ql/test/library-tests/types/exceptions/Viable.ql b/python/ql/test/library-tests/types/exceptions/Viable.ql index bf00a0675d6..589e2630bb9 100644 --- a/python/ql/test/library-tests/types/exceptions/Viable.ql +++ b/python/ql/test/library-tests/types/exceptions/Viable.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from RaisingNode r, ControlFlowNode n, ClassObject ex where r.viableExceptionEdge_objectapi(n, ex) diff --git a/python/ql/test/library-tests/types/properties/Deleters.ql b/python/ql/test/library-tests/types/properties/Deleters.ql index ad99ceb387d..ed98d02b3a8 100644 --- a/python/ql/test/library-tests/types/properties/Deleters.ql +++ b/python/ql/test/library-tests/types/properties/Deleters.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from PythonPropertyObject p select p.toString(), p.getDeleter().toString() diff --git a/python/ql/test/library-tests/types/properties/Getters.ql b/python/ql/test/library-tests/types/properties/Getters.ql index 5f232858696..d8c54dbda09 100644 --- a/python/ql/test/library-tests/types/properties/Getters.ql +++ b/python/ql/test/library-tests/types/properties/Getters.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from PythonPropertyObject p select p.toString(), p.getGetter().toString() diff --git a/python/ql/test/library-tests/types/properties/PythonProperties.ql b/python/ql/test/library-tests/types/properties/PythonProperties.ql index 858326d6ac0..4440c6df21e 100644 --- a/python/ql/test/library-tests/types/properties/PythonProperties.ql +++ b/python/ql/test/library-tests/types/properties/PythonProperties.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from PythonPropertyObject p select p.toString() diff --git a/python/ql/test/library-tests/types/properties/Setters.ql b/python/ql/test/library-tests/types/properties/Setters.ql index 871e6f9145f..5180f58552a 100644 --- a/python/ql/test/library-tests/types/properties/Setters.ql +++ b/python/ql/test/library-tests/types/properties/Setters.ql @@ -1,4 +1,5 @@ import python +private import LegacyPointsTo from PythonPropertyObject p select p.toString(), p.getSetter().toString() diff --git a/python/ql/test/query-tests/Metrics/ratios/CodeRatio.ql b/python/ql/test/query-tests/Metrics/ratios/CodeRatio.ql index 745568f2405..a5c563b1123 100644 --- a/python/ql/test/query-tests/Metrics/ratios/CodeRatio.ql +++ b/python/ql/test/query-tests/Metrics/ratios/CodeRatio.ql @@ -1,6 +1,7 @@ import python +private import LegacyPointsTo -from Module m, ModuleMetrics mm -where mm = m.getMetrics() and mm.getNumberOfLines() > 0 -select m, 100.0 * (mm.getNumberOfLinesOfCode().(float) / mm.getNumberOfLines().(float)) as ratio +from ModuleMetrics mm +where mm.getNumberOfLines() > 0 +select mm, 100.0 * (mm.getNumberOfLinesOfCode().(float) / mm.getNumberOfLines().(float)) as ratio order by ratio desc diff --git a/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/HeaderInjection.expected b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/HeaderInjection.expected index b5f4ff549c4..cea505fe39d 100644 --- a/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/HeaderInjection.expected +++ b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/HeaderInjection.expected @@ -11,6 +11,16 @@ edges | flask_tests.py:31:5:31:14 | ControlFlowNode for rfs_header | flask_tests.py:33:11:33:20 | ControlFlowNode for rfs_header | provenance | | | flask_tests.py:31:5:31:14 | ControlFlowNode for rfs_header | flask_tests.py:35:12:35:21 | ControlFlowNode for rfs_header | provenance | | | flask_tests.py:31:18:31:24 | ControlFlowNode for request | flask_tests.py:31:5:31:14 | ControlFlowNode for rfs_header | provenance | AdditionalTaintStep | +| http_test.py:5:16:5:19 | ControlFlowNode for self | http_test.py:6:45:6:53 | ControlFlowNode for Attribute | provenance | AdditionalTaintStep | +| http_test.py:6:9:6:19 | ControlFlowNode for parsed_path | http_test.py:7:40:7:56 | ControlFlowNode for Attribute | provenance | AdditionalTaintStep | +| http_test.py:6:23:6:54 | ControlFlowNode for Attribute() | http_test.py:6:9:6:19 | ControlFlowNode for parsed_path | provenance | | +| http_test.py:6:45:6:53 | ControlFlowNode for Attribute | http_test.py:6:23:6:54 | ControlFlowNode for Attribute() | provenance | MaD:77 | +| http_test.py:7:9:7:14 | ControlFlowNode for params | http_test.py:8:23:8:28 | ControlFlowNode for params | provenance | | +| http_test.py:7:18:7:57 | ControlFlowNode for Attribute() | http_test.py:7:9:7:14 | ControlFlowNode for params | provenance | | +| http_test.py:7:40:7:56 | ControlFlowNode for Attribute | http_test.py:7:18:7:57 | ControlFlowNode for Attribute() | provenance | MaD:76 | +| http_test.py:8:9:8:19 | ControlFlowNode for input_value | http_test.py:12:40:12:50 | ControlFlowNode for input_value | provenance | | +| http_test.py:8:23:8:28 | ControlFlowNode for params | http_test.py:8:23:8:47 | ControlFlowNode for Attribute() | provenance | dict.get | +| http_test.py:8:23:8:47 | ControlFlowNode for Attribute() | http_test.py:8:9:8:19 | ControlFlowNode for input_value | provenance | | | wsgiref_tests.py:4:14:4:20 | ControlFlowNode for environ | wsgiref_tests.py:6:5:6:10 | ControlFlowNode for h_name | provenance | | | wsgiref_tests.py:4:14:4:20 | ControlFlowNode for environ | wsgiref_tests.py:7:5:7:9 | ControlFlowNode for h_val | provenance | | | wsgiref_tests.py:6:5:6:10 | ControlFlowNode for h_name | wsgiref_tests.py:8:17:8:22 | ControlFlowNode for h_name | provenance | | @@ -28,6 +38,17 @@ nodes | flask_tests.py:31:18:31:24 | ControlFlowNode for request | semmle.label | ControlFlowNode for request | | flask_tests.py:33:11:33:20 | ControlFlowNode for rfs_header | semmle.label | ControlFlowNode for rfs_header | | flask_tests.py:35:12:35:21 | ControlFlowNode for rfs_header | semmle.label | ControlFlowNode for rfs_header | +| http_test.py:5:16:5:19 | ControlFlowNode for self | semmle.label | ControlFlowNode for self | +| http_test.py:6:9:6:19 | ControlFlowNode for parsed_path | semmle.label | ControlFlowNode for parsed_path | +| http_test.py:6:23:6:54 | ControlFlowNode for Attribute() | semmle.label | ControlFlowNode for Attribute() | +| http_test.py:6:45:6:53 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute | +| http_test.py:7:9:7:14 | ControlFlowNode for params | semmle.label | ControlFlowNode for params | +| http_test.py:7:18:7:57 | ControlFlowNode for Attribute() | semmle.label | ControlFlowNode for Attribute() | +| http_test.py:7:40:7:56 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute | +| http_test.py:8:9:8:19 | ControlFlowNode for input_value | semmle.label | ControlFlowNode for input_value | +| http_test.py:8:23:8:28 | ControlFlowNode for params | semmle.label | ControlFlowNode for params | +| http_test.py:8:23:8:47 | ControlFlowNode for Attribute() | semmle.label | ControlFlowNode for Attribute() | +| http_test.py:12:40:12:50 | ControlFlowNode for input_value | semmle.label | ControlFlowNode for input_value | | wsgiref_tests.py:4:14:4:20 | ControlFlowNode for environ | semmle.label | ControlFlowNode for environ | | wsgiref_tests.py:6:5:6:10 | ControlFlowNode for h_name | semmle.label | ControlFlowNode for h_name | | wsgiref_tests.py:7:5:7:9 | ControlFlowNode for h_val | semmle.label | ControlFlowNode for h_val | @@ -39,5 +60,6 @@ subpaths | flask_tests.py:20:36:20:61 | ControlFlowNode for Subscript | flask_tests.py:1:29:1:35 | ControlFlowNode for ImportMember | flask_tests.py:20:36:20:61 | ControlFlowNode for Subscript | This HTTP header is constructed from a $@. | flask_tests.py:1:29:1:35 | ControlFlowNode for ImportMember | user-provided value | | flask_tests.py:33:11:33:20 | ControlFlowNode for rfs_header | flask_tests.py:1:29:1:35 | ControlFlowNode for ImportMember | flask_tests.py:33:11:33:20 | ControlFlowNode for rfs_header | This HTTP header is constructed from a $@. | flask_tests.py:1:29:1:35 | ControlFlowNode for ImportMember | user-provided value | | flask_tests.py:35:12:35:21 | ControlFlowNode for rfs_header | flask_tests.py:1:29:1:35 | ControlFlowNode for ImportMember | flask_tests.py:35:12:35:21 | ControlFlowNode for rfs_header | This HTTP header is constructed from a $@. | flask_tests.py:1:29:1:35 | ControlFlowNode for ImportMember | user-provided value | +| http_test.py:12:40:12:50 | ControlFlowNode for input_value | http_test.py:5:16:5:19 | ControlFlowNode for self | http_test.py:12:40:12:50 | ControlFlowNode for input_value | This HTTP header is constructed from a $@. | http_test.py:5:16:5:19 | ControlFlowNode for self | user-provided value | | wsgiref_tests.py:8:17:8:22 | ControlFlowNode for h_name | wsgiref_tests.py:4:14:4:20 | ControlFlowNode for environ | wsgiref_tests.py:8:17:8:22 | ControlFlowNode for h_name | This HTTP header is constructed from a $@. | wsgiref_tests.py:4:14:4:20 | ControlFlowNode for environ | user-provided value | | wsgiref_tests.py:8:42:8:46 | ControlFlowNode for h_val | wsgiref_tests.py:4:14:4:20 | ControlFlowNode for environ | wsgiref_tests.py:8:42:8:46 | ControlFlowNode for h_val | This HTTP header is constructed from a $@. | wsgiref_tests.py:4:14:4:20 | ControlFlowNode for environ | user-provided value | diff --git a/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/http_test.py b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/http_test.py new file mode 100644 index 00000000000..cf46219fc59 --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/http_test.py @@ -0,0 +1,22 @@ +from http.server import HTTPServer, BaseHTTPRequestHandler +import urllib.parse + +class VulnerableHandler(BaseHTTPRequestHandler): + def do_GET(self): + parsed_path = urllib.parse.urlparse(self.path) + params = urllib.parse.parse_qs(parsed_path.query) + input_value = params.get("input", [""])[0] + # Unsafe: Directly including user input in headers + self.send_response(200) + try: + self.send_header("X-Info", input_value) # BAD + except Exception as e: + print(f"[!] Header injection failed: {e}") + self.end_headers() + self.wfile.write(b"Hello world!") + + +# if __name__ == "__main__": +# print("Serving vulnerable app on http://127.0.0.1:8080") +# httpd = HTTPServer(("127.0.0.1", 8080), VulnerableHandler) +# httpd.serve_forever() diff --git a/ql/ql/src/queries/performance/DontUseGetAQlClass.ql b/ql/ql/src/queries/performance/DontUseGetAQlClass.ql index dbf31cad4c3..fcba654e175 100644 --- a/ql/ql/src/queries/performance/DontUseGetAQlClass.ql +++ b/ql/ql/src/queries/performance/DontUseGetAQlClass.ql @@ -1,5 +1,5 @@ /** - * @name Don't use getAQlClass. + * @name Don't use getAQlClass * @description Any use of getAQlClass causes both compile-time and runtime to be significantly slower. * @kind problem * @problem.severity warning diff --git a/ql/ql/src/queries/performance/VarUnusedInDisjunct.ql b/ql/ql/src/queries/performance/VarUnusedInDisjunct.ql index 2d85b872153..e6db3ad3d98 100644 --- a/ql/ql/src/queries/performance/VarUnusedInDisjunct.ql +++ b/ql/ql/src/queries/performance/VarUnusedInDisjunct.ql @@ -1,5 +1,5 @@ /** - * @name Var only used in one side of disjunct. + * @name Var only used in one side of disjunct * @description Only using a variable on one side of a disjunction can cause a cartesian product. * @kind problem * @problem.severity warning diff --git a/ql/ql/src/queries/style/AcronymsShouldBeCamelCase.ql b/ql/ql/src/queries/style/AcronymsShouldBeCamelCase.ql index e7d27efa66c..70c2955ff01 100644 --- a/ql/ql/src/queries/style/AcronymsShouldBeCamelCase.ql +++ b/ql/ql/src/queries/style/AcronymsShouldBeCamelCase.ql @@ -1,5 +1,5 @@ /** - * @name Acronyms should be PascalCase/camelCase. + * @name Acronyms should be PascalCase/camelCase * @description Acronyms should be PascalCase/camelCase instead of upper-casing all the letters. * @kind problem * @problem.severity warning diff --git a/ql/ql/src/queries/style/IfWithElseNone.ql b/ql/ql/src/queries/style/IfWithElseNone.ql index c563c28e9f8..0c1c4b8b17b 100644 --- a/ql/ql/src/queries/style/IfWithElseNone.ql +++ b/ql/ql/src/queries/style/IfWithElseNone.ql @@ -1,5 +1,5 @@ /** - * @name Use of 'if' with a 'none()' branch. + * @name Use of 'if' with a 'none()' branch * @description Using 'if p() then q() else none()' is bad style. It should be rewritten as 'p() and q()'. * @kind problem * @problem.severity warning diff --git a/ql/ql/src/queries/style/OverridingParameterName.ql b/ql/ql/src/queries/style/OverridingParameterName.ql index 723f4442fc2..1a5630f60a0 100644 --- a/ql/ql/src/queries/style/OverridingParameterName.ql +++ b/ql/ql/src/queries/style/OverridingParameterName.ql @@ -1,5 +1,5 @@ /** - * @name Using a different parameter name than used in the super-predicate. + * @name Using a different parameter name than used in the super-predicate * @description Using another parameter can be an indication of copy-pasted code, or a mistake. * @kind problem * @problem.severity warning diff --git a/ql/ql/src/queries/style/RedundantAssignment.ql b/ql/ql/src/queries/style/RedundantAssignment.ql index 83f62364d9f..8a741c190f8 100644 --- a/ql/ql/src/queries/style/RedundantAssignment.ql +++ b/ql/ql/src/queries/style/RedundantAssignment.ql @@ -1,5 +1,5 @@ /** - * @name Redundant assignment. + * @name Redundant assignment * @description Assigning the same value twice is redundant. * @kind problem * @problem.severity warning diff --git a/ql/ql/src/queries/style/SuperfluousExists.ql b/ql/ql/src/queries/style/SuperfluousExists.ql index 84380330fa8..b1993b4994f 100644 --- a/ql/ql/src/queries/style/SuperfluousExists.ql +++ b/ql/ql/src/queries/style/SuperfluousExists.ql @@ -1,5 +1,5 @@ /** - * @name Superfluous 'exists' conjunct. + * @name Superfluous 'exists' conjunct * @description Writing 'exists(x)' when the existence of X is implied by another conjunct is bad practice. * @kind problem * @problem.severity warning diff --git a/ql/ql/src/queries/style/SwappedParameterNames.ql b/ql/ql/src/queries/style/SwappedParameterNames.ql index c3b835f6ab8..766b798ffdd 100644 --- a/ql/ql/src/queries/style/SwappedParameterNames.ql +++ b/ql/ql/src/queries/style/SwappedParameterNames.ql @@ -1,5 +1,5 @@ /** - * @name Swapped parameter names in overriding predicate. + * @name Swapped parameter names in overriding predicate * @description Swapping the parameter names in an overriding method indicates an implementation mistake. * @kind problem * @problem.severity error diff --git a/ql/ql/src/queries/style/UseInstanceofExtension.ql b/ql/ql/src/queries/style/UseInstanceofExtension.ql index 33ceb5f1030..9cb7a1cd6b5 100644 --- a/ql/ql/src/queries/style/UseInstanceofExtension.ql +++ b/ql/ql/src/queries/style/UseInstanceofExtension.ql @@ -1,5 +1,5 @@ /** - * @name Suggest using non-extending subtype relationships. + * @name Suggest using non-extending subtype relationships * @description Non-extending subtypes ("instanceof extensions") are generally preferable to instanceof expressions in characteristic predicates. * @kind problem * @problem.severity warning diff --git a/ql/ql/src/queries/style/docs/ClassDocs.ql b/ql/ql/src/queries/style/docs/ClassDocs.ql index f7e5d7ac8d8..675d8976f16 100644 --- a/ql/ql/src/queries/style/docs/ClassDocs.ql +++ b/ql/ql/src/queries/style/docs/ClassDocs.ql @@ -1,5 +1,5 @@ /** - * @name Class QLDoc style. + * @name Class QLDoc style * @description The QLDoc for a class should start with "A", "An", or "The". * @kind problem * @problem.severity warning diff --git a/ql/ql/src/queries/style/docs/PredicateDocs.ql b/ql/ql/src/queries/style/docs/PredicateDocs.ql index a8a271e7ab8..8ab415fec4a 100644 --- a/ql/ql/src/queries/style/docs/PredicateDocs.ql +++ b/ql/ql/src/queries/style/docs/PredicateDocs.ql @@ -1,5 +1,5 @@ /** - * @name Predicate QLDoc style. + * @name Predicate QLDoc style * @description The QLDoc for a predicate should start with "Gets" or "Holds". * @kind problem * @problem.severity warning diff --git a/ruby/ql/lib/CHANGELOG.md b/ruby/ql/lib/CHANGELOG.md index 1a4f011d531..fcb8e3b2745 100644 --- a/ruby/ql/lib/CHANGELOG.md +++ b/ruby/ql/lib/CHANGELOG.md @@ -1,3 +1,11 @@ +## 5.1.5 + +No user-facing changes. + +## 5.1.4 + +No user-facing changes. + ## 5.1.3 No user-facing changes. diff --git a/ruby/ql/lib/change-notes/released/5.1.4.md b/ruby/ql/lib/change-notes/released/5.1.4.md new file mode 100644 index 00000000000..0fb22ded7d9 --- /dev/null +++ b/ruby/ql/lib/change-notes/released/5.1.4.md @@ -0,0 +1,3 @@ +## 5.1.4 + +No user-facing changes. diff --git a/ruby/ql/lib/change-notes/released/5.1.5.md b/ruby/ql/lib/change-notes/released/5.1.5.md new file mode 100644 index 00000000000..fa76be9d79a --- /dev/null +++ b/ruby/ql/lib/change-notes/released/5.1.5.md @@ -0,0 +1,3 @@ +## 5.1.5 + +No user-facing changes. diff --git a/ruby/ql/lib/codeql-pack.release.yml b/ruby/ql/lib/codeql-pack.release.yml index 8ffbc76d58a..fee02733251 100644 --- a/ruby/ql/lib/codeql-pack.release.yml +++ b/ruby/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 5.1.3 +lastReleaseVersion: 5.1.5 diff --git a/ruby/ql/lib/qlpack.yml b/ruby/ql/lib/qlpack.yml index 99ffc1da075..56041f3ddec 100644 --- a/ruby/ql/lib/qlpack.yml +++ b/ruby/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ruby-all -version: 5.1.4-dev +version: 5.1.6-dev groups: ruby extractor: ruby dbscheme: ruby.dbscheme diff --git a/ruby/ql/src/CHANGELOG.md b/ruby/ql/src/CHANGELOG.md index 300aa213b5d..24e725365af 100644 --- a/ruby/ql/src/CHANGELOG.md +++ b/ruby/ql/src/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.5.2 + +No user-facing changes. + +## 1.5.1 + +No user-facing changes. + ## 1.5.0 ### Query Metadata Changes diff --git a/ruby/ql/src/change-notes/released/1.5.1.md b/ruby/ql/src/change-notes/released/1.5.1.md new file mode 100644 index 00000000000..7b24a64aca3 --- /dev/null +++ b/ruby/ql/src/change-notes/released/1.5.1.md @@ -0,0 +1,3 @@ +## 1.5.1 + +No user-facing changes. diff --git a/ruby/ql/src/change-notes/released/1.5.2.md b/ruby/ql/src/change-notes/released/1.5.2.md new file mode 100644 index 00000000000..384c27833f1 --- /dev/null +++ b/ruby/ql/src/change-notes/released/1.5.2.md @@ -0,0 +1,3 @@ +## 1.5.2 + +No user-facing changes. diff --git a/ruby/ql/src/codeql-pack.release.yml b/ruby/ql/src/codeql-pack.release.yml index 639f80c4341..7eb901bae56 100644 --- a/ruby/ql/src/codeql-pack.release.yml +++ b/ruby/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.5.0 +lastReleaseVersion: 1.5.2 diff --git a/ruby/ql/src/qlpack.yml b/ruby/ql/src/qlpack.yml index 81ee5e4f379..ca906b7f8b3 100644 --- a/ruby/ql/src/qlpack.yml +++ b/ruby/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ruby-queries -version: 1.5.1-dev +version: 1.5.3-dev groups: - ruby - queries diff --git a/ruby/ql/src/queries/meta/TaintedNodes.ql b/ruby/ql/src/queries/meta/TaintedNodes.ql index 2ee6e83e0de..1594c59d3b0 100644 --- a/ruby/ql/src/queries/meta/TaintedNodes.ql +++ b/ruby/ql/src/queries/meta/TaintedNodes.ql @@ -28,5 +28,5 @@ private module BasicTaintConfig implements DataFlow::ConfigSig { private module BasicTaintFlow = TaintTracking::Global; from DataFlow::Node node -where BasicTaintFlow::flow(_, node) +where BasicTaintFlow::flowTo(node) select node, "Tainted node" diff --git a/ruby/ql/src/queries/variables/UnusedParameter.ql b/ruby/ql/src/queries/variables/UnusedParameter.ql index d212ee883f7..2dc3e0b5341 100644 --- a/ruby/ql/src/queries/variables/UnusedParameter.ql +++ b/ruby/ql/src/queries/variables/UnusedParameter.ql @@ -1,5 +1,5 @@ /** - * @name Unused parameter. + * @name Unused parameter * @description A parameter that is not used later on, or whose value is always overwritten, * can be removed. * @kind problem diff --git a/ruby/ql/src/utils/modeleditor/FrameworkModeAccessPaths.ql b/ruby/ql/src/utils/modeleditor/FrameworkModeAccessPaths.ql index 039fcfbf1c9..160aed49040 100644 --- a/ruby/ql/src/utils/modeleditor/FrameworkModeAccessPaths.ql +++ b/ruby/ql/src/utils/modeleditor/FrameworkModeAccessPaths.ql @@ -1,5 +1,5 @@ /** - * @name Fetch a subset of valid access paths of input and output parameters of a method (framework mode). + * @name Fetch a subset of valid access paths of input and output parameters of a method (framework mode) * @description A list of access paths for input and output parameters of a method. Excludes test and generated code. * @kind table * @id ruby/utils/modeleditor/framework-mode-access-paths diff --git a/rust/downgrades/e54d01f67a416b3d6eb7b970f27295097f2cac7f/old.dbscheme b/rust/downgrades/e54d01f67a416b3d6eb7b970f27295097f2cac7f/old.dbscheme new file mode 100644 index 00000000000..e54d01f67a4 --- /dev/null +++ b/rust/downgrades/e54d01f67a416b3d6eb7b970f27295097f2cac7f/old.dbscheme @@ -0,0 +1,3624 @@ +// generated by codegen, do not edit + +// from ../shared/tree-sitter-extractor/src/generator/prefix.dbscheme +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Empty location -*/ + +empty_location( + int location: @location_default ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- Diagnostic messages: severity -*/ + +case @diagnostic.severity of + 10 = @diagnostic_debug +| 20 = @diagnostic_info +| 30 = @diagnostic_warning +| 40 = @diagnostic_error +; + +/*- YAML -*/ + +#keyset[parent, idx] +yaml (unique int id: @yaml_node, + int kind: int ref, + int parent: @yaml_node_parent ref, + int idx: int ref, + string tag: string ref, + string tostring: string ref); + +case @yaml_node.kind of + 0 = @yaml_scalar_node +| 1 = @yaml_mapping_node +| 2 = @yaml_sequence_node +| 3 = @yaml_alias_node +; + +@yaml_collection_node = @yaml_mapping_node | @yaml_sequence_node; + +@yaml_node_parent = @yaml_collection_node | @file; + +yaml_anchors (unique int node: @yaml_node ref, + string anchor: string ref); + +yaml_aliases (unique int alias: @yaml_alias_node ref, + string target: string ref); + +yaml_scalars (unique int scalar: @yaml_scalar_node ref, + int style: int ref, + string value: string ref); + +yaml_errors (unique int id: @yaml_error, + string message: string ref); + +yaml_locations(unique int locatable: @yaml_locatable ref, + int location: @location_default ref); + +@yaml_locatable = @yaml_node | @yaml_error; + +/*- Database metadata -*/ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +overlayChangedFiles( + string path: string ref +); + + +// from prefix.dbscheme +#keyset[id] +locatable_locations( + int id: @locatable ref, + int location: @location_default ref +); + + +// from schema + +@element = + @extractor_step +| @locatable +| @named_crate +| @unextracted +; + +extractor_steps( + unique int id: @extractor_step, + string action: string ref, + int duration_ms: int ref +); + +#keyset[id] +extractor_step_files( + int id: @extractor_step ref, + int file: @file ref +); + +@locatable = + @ast_node +| @crate +; + +named_crates( + unique int id: @named_crate, + string name: string ref, + int crate: @crate ref +); + +@unextracted = + @missing +| @unimplemented +; + +@ast_node = + @abi +| @addressable +| @arg_list +| @asm_dir_spec +| @asm_operand +| @asm_operand_expr +| @asm_option +| @asm_piece +| @asm_reg_spec +| @assoc_item_list +| @attr +| @callable +| @expr +| @extern_item_list +| @field_list +| @for_binder +| @format_args_arg +| @generic_arg +| @generic_arg_list +| @generic_param +| @generic_param_list +| @item_list +| @label +| @let_else +| @macro_items +| @match_arm +| @match_arm_list +| @match_guard +| @meta +| @name +| @param_base +| @param_list +| @parenthesized_arg_list +| @pat +| @path +| @path_ast_node +| @path_segment +| @rename +| @ret_type_repr +| @return_type_syntax +| @source_file +| @stmt +| @stmt_list +| @struct_expr_field +| @struct_expr_field_list +| @struct_field +| @struct_pat_field +| @struct_pat_field_list +| @token +| @token_tree +| @tuple_field +| @type_bound +| @type_bound_list +| @type_repr +| @use_bound_generic_arg +| @use_bound_generic_args +| @use_tree +| @use_tree_list +| @variant_list +| @visibility +| @where_clause +| @where_pred +; + +crates( + unique int id: @crate +); + +#keyset[id] +crate_names( + int id: @crate ref, + string name: string ref +); + +#keyset[id] +crate_versions( + int id: @crate ref, + string version: string ref +); + +#keyset[id, index] +crate_cfg_options( + int id: @crate ref, + int index: int ref, + string cfg_option: string ref +); + +#keyset[id, index] +crate_named_dependencies( + int id: @crate ref, + int index: int ref, + int named_dependency: @named_crate ref +); + +missings( + unique int id: @missing +); + +unimplementeds( + unique int id: @unimplemented +); + +abis( + unique int id: @abi +); + +#keyset[id] +abi_abi_strings( + int id: @abi ref, + string abi_string: string ref +); + +@addressable = + @item +| @variant +; + +arg_lists( + unique int id: @arg_list +); + +#keyset[id, index] +arg_list_args( + int id: @arg_list ref, + int index: int ref, + int arg: @expr ref +); + +asm_dir_specs( + unique int id: @asm_dir_spec +); + +@asm_operand = + @asm_const +| @asm_label +| @asm_reg_operand +| @asm_sym +; + +asm_operand_exprs( + unique int id: @asm_operand_expr +); + +#keyset[id] +asm_operand_expr_in_exprs( + int id: @asm_operand_expr ref, + int in_expr: @expr ref +); + +#keyset[id] +asm_operand_expr_out_exprs( + int id: @asm_operand_expr ref, + int out_expr: @expr ref +); + +asm_options( + unique int id: @asm_option +); + +#keyset[id] +asm_option_is_raw( + int id: @asm_option ref +); + +@asm_piece = + @asm_clobber_abi +| @asm_operand_named +| @asm_options_list +; + +asm_reg_specs( + unique int id: @asm_reg_spec +); + +#keyset[id] +asm_reg_spec_identifiers( + int id: @asm_reg_spec ref, + int identifier: @name_ref ref +); + +assoc_item_lists( + unique int id: @assoc_item_list +); + +#keyset[id, index] +assoc_item_list_assoc_items( + int id: @assoc_item_list ref, + int index: int ref, + int assoc_item: @assoc_item ref +); + +#keyset[id, index] +assoc_item_list_attrs( + int id: @assoc_item_list ref, + int index: int ref, + int attr: @attr ref +); + +attrs( + unique int id: @attr +); + +#keyset[id] +attr_meta( + int id: @attr ref, + int meta: @meta ref +); + +@callable = + @closure_expr +| @function +; + +#keyset[id] +callable_param_lists( + int id: @callable ref, + int param_list: @param_list ref +); + +#keyset[id, index] +callable_attrs( + int id: @callable ref, + int index: int ref, + int attr: @attr ref +); + +@expr = + @array_expr_internal +| @asm_expr +| @await_expr +| @become_expr +| @binary_expr +| @break_expr +| @call_expr +| @cast_expr +| @closure_expr +| @continue_expr +| @field_expr +| @format_args_expr +| @if_expr +| @index_expr +| @labelable_expr +| @let_expr +| @literal_expr +| @macro_block_expr +| @macro_expr +| @match_expr +| @method_call_expr +| @offset_of_expr +| @paren_expr +| @path_expr_base +| @prefix_expr +| @range_expr +| @ref_expr +| @return_expr +| @struct_expr +| @try_expr +| @tuple_expr +| @underscore_expr +| @yeet_expr +| @yield_expr +; + +extern_item_lists( + unique int id: @extern_item_list +); + +#keyset[id, index] +extern_item_list_attrs( + int id: @extern_item_list ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +extern_item_list_extern_items( + int id: @extern_item_list ref, + int index: int ref, + int extern_item: @extern_item ref +); + +@field_list = + @struct_field_list +| @tuple_field_list +; + +for_binders( + unique int id: @for_binder +); + +#keyset[id] +for_binder_generic_param_lists( + int id: @for_binder ref, + int generic_param_list: @generic_param_list ref +); + +format_args_args( + unique int id: @format_args_arg +); + +#keyset[id] +format_args_arg_exprs( + int id: @format_args_arg ref, + int expr: @expr ref +); + +#keyset[id] +format_args_arg_names( + int id: @format_args_arg ref, + int name: @name ref +); + +@generic_arg = + @assoc_type_arg +| @const_arg +| @lifetime_arg +| @type_arg +; + +generic_arg_lists( + unique int id: @generic_arg_list +); + +#keyset[id, index] +generic_arg_list_generic_args( + int id: @generic_arg_list ref, + int index: int ref, + int generic_arg: @generic_arg ref +); + +@generic_param = + @const_param +| @lifetime_param +| @type_param +; + +generic_param_lists( + unique int id: @generic_param_list +); + +#keyset[id, index] +generic_param_list_generic_params( + int id: @generic_param_list ref, + int index: int ref, + int generic_param: @generic_param ref +); + +item_lists( + unique int id: @item_list +); + +#keyset[id, index] +item_list_attrs( + int id: @item_list ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +item_list_items( + int id: @item_list ref, + int index: int ref, + int item: @item ref +); + +labels( + unique int id: @label +); + +#keyset[id] +label_lifetimes( + int id: @label ref, + int lifetime: @lifetime ref +); + +let_elses( + unique int id: @let_else +); + +#keyset[id] +let_else_block_exprs( + int id: @let_else ref, + int block_expr: @block_expr ref +); + +macro_items( + unique int id: @macro_items +); + +#keyset[id, index] +macro_items_items( + int id: @macro_items ref, + int index: int ref, + int item: @item ref +); + +match_arms( + unique int id: @match_arm +); + +#keyset[id, index] +match_arm_attrs( + int id: @match_arm ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +match_arm_exprs( + int id: @match_arm ref, + int expr: @expr ref +); + +#keyset[id] +match_arm_guards( + int id: @match_arm ref, + int guard: @match_guard ref +); + +#keyset[id] +match_arm_pats( + int id: @match_arm ref, + int pat: @pat ref +); + +match_arm_lists( + unique int id: @match_arm_list +); + +#keyset[id, index] +match_arm_list_arms( + int id: @match_arm_list ref, + int index: int ref, + int arm: @match_arm ref +); + +#keyset[id, index] +match_arm_list_attrs( + int id: @match_arm_list ref, + int index: int ref, + int attr: @attr ref +); + +match_guards( + unique int id: @match_guard +); + +#keyset[id] +match_guard_conditions( + int id: @match_guard ref, + int condition: @expr ref +); + +meta( + unique int id: @meta +); + +#keyset[id] +meta_exprs( + int id: @meta ref, + int expr: @expr ref +); + +#keyset[id] +meta_is_unsafe( + int id: @meta ref +); + +#keyset[id] +meta_paths( + int id: @meta ref, + int path: @path ref +); + +#keyset[id] +meta_token_trees( + int id: @meta ref, + int token_tree: @token_tree ref +); + +names( + unique int id: @name +); + +#keyset[id] +name_texts( + int id: @name ref, + string text: string ref +); + +@param_base = + @param +| @self_param +; + +#keyset[id, index] +param_base_attrs( + int id: @param_base ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +param_base_type_reprs( + int id: @param_base ref, + int type_repr: @type_repr ref +); + +param_lists( + unique int id: @param_list +); + +#keyset[id, index] +param_list_params( + int id: @param_list ref, + int index: int ref, + int param: @param ref +); + +#keyset[id] +param_list_self_params( + int id: @param_list ref, + int self_param: @self_param ref +); + +parenthesized_arg_lists( + unique int id: @parenthesized_arg_list +); + +#keyset[id, index] +parenthesized_arg_list_type_args( + int id: @parenthesized_arg_list ref, + int index: int ref, + int type_arg: @type_arg ref +); + +@pat = + @box_pat +| @const_block_pat +| @ident_pat +| @literal_pat +| @macro_pat +| @or_pat +| @paren_pat +| @path_pat +| @range_pat +| @ref_pat +| @rest_pat +| @slice_pat +| @struct_pat +| @tuple_pat +| @tuple_struct_pat +| @wildcard_pat +; + +paths( + unique int id: @path +); + +#keyset[id] +path_qualifiers( + int id: @path ref, + int qualifier: @path ref +); + +#keyset[id] +path_segments_( + int id: @path ref, + int segment: @path_segment ref +); + +@path_ast_node = + @path_expr +| @path_pat +| @struct_expr +| @struct_pat +| @tuple_struct_pat +; + +#keyset[id] +path_ast_node_paths( + int id: @path_ast_node ref, + int path: @path ref +); + +path_segments( + unique int id: @path_segment +); + +#keyset[id] +path_segment_generic_arg_lists( + int id: @path_segment ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +path_segment_identifiers( + int id: @path_segment ref, + int identifier: @name_ref ref +); + +#keyset[id] +path_segment_parenthesized_arg_lists( + int id: @path_segment ref, + int parenthesized_arg_list: @parenthesized_arg_list ref +); + +#keyset[id] +path_segment_ret_types( + int id: @path_segment ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +path_segment_return_type_syntaxes( + int id: @path_segment ref, + int return_type_syntax: @return_type_syntax ref +); + +#keyset[id] +path_segment_type_reprs( + int id: @path_segment ref, + int type_repr: @type_repr ref +); + +#keyset[id] +path_segment_trait_type_reprs( + int id: @path_segment ref, + int trait_type_repr: @path_type_repr ref +); + +renames( + unique int id: @rename +); + +#keyset[id] +rename_names( + int id: @rename ref, + int name: @name ref +); + +ret_type_reprs( + unique int id: @ret_type_repr +); + +#keyset[id] +ret_type_repr_type_reprs( + int id: @ret_type_repr ref, + int type_repr: @type_repr ref +); + +return_type_syntaxes( + unique int id: @return_type_syntax +); + +source_files( + unique int id: @source_file +); + +#keyset[id, index] +source_file_attrs( + int id: @source_file ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +source_file_items( + int id: @source_file ref, + int index: int ref, + int item: @item ref +); + +@stmt = + @expr_stmt +| @item +| @let_stmt +; + +stmt_lists( + unique int id: @stmt_list +); + +#keyset[id, index] +stmt_list_attrs( + int id: @stmt_list ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +stmt_list_statements( + int id: @stmt_list ref, + int index: int ref, + int statement: @stmt ref +); + +#keyset[id] +stmt_list_tail_exprs( + int id: @stmt_list ref, + int tail_expr: @expr ref +); + +struct_expr_fields( + unique int id: @struct_expr_field +); + +#keyset[id, index] +struct_expr_field_attrs( + int id: @struct_expr_field ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +struct_expr_field_exprs( + int id: @struct_expr_field ref, + int expr: @expr ref +); + +#keyset[id] +struct_expr_field_identifiers( + int id: @struct_expr_field ref, + int identifier: @name_ref ref +); + +struct_expr_field_lists( + unique int id: @struct_expr_field_list +); + +#keyset[id, index] +struct_expr_field_list_attrs( + int id: @struct_expr_field_list ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +struct_expr_field_list_fields( + int id: @struct_expr_field_list ref, + int index: int ref, + int field: @struct_expr_field ref +); + +#keyset[id] +struct_expr_field_list_spreads( + int id: @struct_expr_field_list ref, + int spread: @expr ref +); + +struct_fields( + unique int id: @struct_field +); + +#keyset[id, index] +struct_field_attrs( + int id: @struct_field ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +struct_field_defaults( + int id: @struct_field ref, + int default: @expr ref +); + +#keyset[id] +struct_field_is_unsafe( + int id: @struct_field ref +); + +#keyset[id] +struct_field_names( + int id: @struct_field ref, + int name: @name ref +); + +#keyset[id] +struct_field_type_reprs( + int id: @struct_field ref, + int type_repr: @type_repr ref +); + +#keyset[id] +struct_field_visibilities( + int id: @struct_field ref, + int visibility: @visibility ref +); + +struct_pat_fields( + unique int id: @struct_pat_field +); + +#keyset[id, index] +struct_pat_field_attrs( + int id: @struct_pat_field ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +struct_pat_field_identifiers( + int id: @struct_pat_field ref, + int identifier: @name_ref ref +); + +#keyset[id] +struct_pat_field_pats( + int id: @struct_pat_field ref, + int pat: @pat ref +); + +struct_pat_field_lists( + unique int id: @struct_pat_field_list +); + +#keyset[id, index] +struct_pat_field_list_fields( + int id: @struct_pat_field_list ref, + int index: int ref, + int field: @struct_pat_field ref +); + +#keyset[id] +struct_pat_field_list_rest_pats( + int id: @struct_pat_field_list ref, + int rest_pat: @rest_pat ref +); + +@token = + @comment +; + +token_trees( + unique int id: @token_tree +); + +tuple_fields( + unique int id: @tuple_field +); + +#keyset[id, index] +tuple_field_attrs( + int id: @tuple_field ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +tuple_field_type_reprs( + int id: @tuple_field ref, + int type_repr: @type_repr ref +); + +#keyset[id] +tuple_field_visibilities( + int id: @tuple_field ref, + int visibility: @visibility ref +); + +type_bounds( + unique int id: @type_bound +); + +#keyset[id] +type_bound_for_binders( + int id: @type_bound ref, + int for_binder: @for_binder ref +); + +#keyset[id] +type_bound_is_async( + int id: @type_bound ref +); + +#keyset[id] +type_bound_is_const( + int id: @type_bound ref +); + +#keyset[id] +type_bound_lifetimes( + int id: @type_bound ref, + int lifetime: @lifetime ref +); + +#keyset[id] +type_bound_type_reprs( + int id: @type_bound ref, + int type_repr: @type_repr ref +); + +#keyset[id] +type_bound_use_bound_generic_args( + int id: @type_bound ref, + int use_bound_generic_args: @use_bound_generic_args ref +); + +type_bound_lists( + unique int id: @type_bound_list +); + +#keyset[id, index] +type_bound_list_bounds( + int id: @type_bound_list ref, + int index: int ref, + int bound: @type_bound ref +); + +@type_repr = + @array_type_repr +| @dyn_trait_type_repr +| @fn_ptr_type_repr +| @for_type_repr +| @impl_trait_type_repr +| @infer_type_repr +| @macro_type_repr +| @never_type_repr +| @paren_type_repr +| @path_type_repr +| @ptr_type_repr +| @ref_type_repr +| @slice_type_repr +| @tuple_type_repr +; + +@use_bound_generic_arg = + @lifetime +| @name_ref +; + +use_bound_generic_args( + unique int id: @use_bound_generic_args +); + +#keyset[id, index] +use_bound_generic_args_use_bound_generic_args( + int id: @use_bound_generic_args ref, + int index: int ref, + int use_bound_generic_arg: @use_bound_generic_arg ref +); + +use_trees( + unique int id: @use_tree +); + +#keyset[id] +use_tree_is_glob( + int id: @use_tree ref +); + +#keyset[id] +use_tree_paths( + int id: @use_tree ref, + int path: @path ref +); + +#keyset[id] +use_tree_renames( + int id: @use_tree ref, + int rename: @rename ref +); + +#keyset[id] +use_tree_use_tree_lists( + int id: @use_tree ref, + int use_tree_list: @use_tree_list ref +); + +use_tree_lists( + unique int id: @use_tree_list +); + +#keyset[id, index] +use_tree_list_use_trees( + int id: @use_tree_list ref, + int index: int ref, + int use_tree: @use_tree ref +); + +variant_lists( + unique int id: @variant_list +); + +#keyset[id, index] +variant_list_variants( + int id: @variant_list ref, + int index: int ref, + int variant: @variant ref +); + +visibilities( + unique int id: @visibility +); + +#keyset[id] +visibility_paths( + int id: @visibility ref, + int path: @path ref +); + +where_clauses( + unique int id: @where_clause +); + +#keyset[id, index] +where_clause_predicates( + int id: @where_clause ref, + int index: int ref, + int predicate: @where_pred ref +); + +where_preds( + unique int id: @where_pred +); + +#keyset[id] +where_pred_for_binders( + int id: @where_pred ref, + int for_binder: @for_binder ref +); + +#keyset[id] +where_pred_lifetimes( + int id: @where_pred ref, + int lifetime: @lifetime ref +); + +#keyset[id] +where_pred_type_reprs( + int id: @where_pred ref, + int type_repr: @type_repr ref +); + +#keyset[id] +where_pred_type_bound_lists( + int id: @where_pred ref, + int type_bound_list: @type_bound_list ref +); + +array_expr_internals( + unique int id: @array_expr_internal +); + +#keyset[id, index] +array_expr_internal_attrs( + int id: @array_expr_internal ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +array_expr_internal_exprs( + int id: @array_expr_internal ref, + int index: int ref, + int expr: @expr ref +); + +#keyset[id] +array_expr_internal_is_semicolon( + int id: @array_expr_internal ref +); + +array_type_reprs( + unique int id: @array_type_repr +); + +#keyset[id] +array_type_repr_const_args( + int id: @array_type_repr ref, + int const_arg: @const_arg ref +); + +#keyset[id] +array_type_repr_element_type_reprs( + int id: @array_type_repr ref, + int element_type_repr: @type_repr ref +); + +asm_clobber_abis( + unique int id: @asm_clobber_abi +); + +asm_consts( + unique int id: @asm_const +); + +#keyset[id] +asm_const_exprs( + int id: @asm_const ref, + int expr: @expr ref +); + +#keyset[id] +asm_const_is_const( + int id: @asm_const ref +); + +asm_labels( + unique int id: @asm_label +); + +#keyset[id] +asm_label_block_exprs( + int id: @asm_label ref, + int block_expr: @block_expr ref +); + +asm_operand_nameds( + unique int id: @asm_operand_named +); + +#keyset[id] +asm_operand_named_asm_operands( + int id: @asm_operand_named ref, + int asm_operand: @asm_operand ref +); + +#keyset[id] +asm_operand_named_names( + int id: @asm_operand_named ref, + int name: @name ref +); + +asm_options_lists( + unique int id: @asm_options_list +); + +#keyset[id, index] +asm_options_list_asm_options( + int id: @asm_options_list ref, + int index: int ref, + int asm_option: @asm_option ref +); + +asm_reg_operands( + unique int id: @asm_reg_operand +); + +#keyset[id] +asm_reg_operand_asm_dir_specs( + int id: @asm_reg_operand ref, + int asm_dir_spec: @asm_dir_spec ref +); + +#keyset[id] +asm_reg_operand_asm_operand_exprs( + int id: @asm_reg_operand ref, + int asm_operand_expr: @asm_operand_expr ref +); + +#keyset[id] +asm_reg_operand_asm_reg_specs( + int id: @asm_reg_operand ref, + int asm_reg_spec: @asm_reg_spec ref +); + +asm_syms( + unique int id: @asm_sym +); + +#keyset[id] +asm_sym_paths( + int id: @asm_sym ref, + int path: @path ref +); + +assoc_type_args( + unique int id: @assoc_type_arg +); + +#keyset[id] +assoc_type_arg_const_args( + int id: @assoc_type_arg ref, + int const_arg: @const_arg ref +); + +#keyset[id] +assoc_type_arg_generic_arg_lists( + int id: @assoc_type_arg ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +assoc_type_arg_identifiers( + int id: @assoc_type_arg ref, + int identifier: @name_ref ref +); + +#keyset[id] +assoc_type_arg_param_lists( + int id: @assoc_type_arg ref, + int param_list: @param_list ref +); + +#keyset[id] +assoc_type_arg_ret_types( + int id: @assoc_type_arg ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +assoc_type_arg_return_type_syntaxes( + int id: @assoc_type_arg ref, + int return_type_syntax: @return_type_syntax ref +); + +#keyset[id] +assoc_type_arg_type_reprs( + int id: @assoc_type_arg ref, + int type_repr: @type_repr ref +); + +#keyset[id] +assoc_type_arg_type_bound_lists( + int id: @assoc_type_arg ref, + int type_bound_list: @type_bound_list ref +); + +await_exprs( + unique int id: @await_expr +); + +#keyset[id, index] +await_expr_attrs( + int id: @await_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +await_expr_exprs( + int id: @await_expr ref, + int expr: @expr ref +); + +become_exprs( + unique int id: @become_expr +); + +#keyset[id, index] +become_expr_attrs( + int id: @become_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +become_expr_exprs( + int id: @become_expr ref, + int expr: @expr ref +); + +binary_exprs( + unique int id: @binary_expr +); + +#keyset[id, index] +binary_expr_attrs( + int id: @binary_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +binary_expr_lhs( + int id: @binary_expr ref, + int lhs: @expr ref +); + +#keyset[id] +binary_expr_operator_names( + int id: @binary_expr ref, + string operator_name: string ref +); + +#keyset[id] +binary_expr_rhs( + int id: @binary_expr ref, + int rhs: @expr ref +); + +box_pats( + unique int id: @box_pat +); + +#keyset[id] +box_pat_pats( + int id: @box_pat ref, + int pat: @pat ref +); + +break_exprs( + unique int id: @break_expr +); + +#keyset[id, index] +break_expr_attrs( + int id: @break_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +break_expr_exprs( + int id: @break_expr ref, + int expr: @expr ref +); + +#keyset[id] +break_expr_lifetimes( + int id: @break_expr ref, + int lifetime: @lifetime ref +); + +call_exprs( + unique int id: @call_expr +); + +#keyset[id] +call_expr_arg_lists( + int id: @call_expr ref, + int arg_list: @arg_list ref +); + +#keyset[id, index] +call_expr_attrs( + int id: @call_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +call_expr_functions( + int id: @call_expr ref, + int function: @expr ref +); + +cast_exprs( + unique int id: @cast_expr +); + +#keyset[id, index] +cast_expr_attrs( + int id: @cast_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +cast_expr_exprs( + int id: @cast_expr ref, + int expr: @expr ref +); + +#keyset[id] +cast_expr_type_reprs( + int id: @cast_expr ref, + int type_repr: @type_repr ref +); + +closure_exprs( + unique int id: @closure_expr +); + +#keyset[id] +closure_expr_closure_bodies( + int id: @closure_expr ref, + int closure_body: @expr ref +); + +#keyset[id] +closure_expr_for_binders( + int id: @closure_expr ref, + int for_binder: @for_binder ref +); + +#keyset[id] +closure_expr_is_async( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_const( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_gen( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_move( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_static( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_ret_types( + int id: @closure_expr ref, + int ret_type: @ret_type_repr ref +); + +comments( + unique int id: @comment, + int parent: @ast_node ref, + string text: string ref +); + +const_args( + unique int id: @const_arg +); + +#keyset[id] +const_arg_exprs( + int id: @const_arg ref, + int expr: @expr ref +); + +const_block_pats( + unique int id: @const_block_pat +); + +#keyset[id] +const_block_pat_block_exprs( + int id: @const_block_pat ref, + int block_expr: @block_expr ref +); + +#keyset[id] +const_block_pat_is_const( + int id: @const_block_pat ref +); + +const_params( + unique int id: @const_param +); + +#keyset[id, index] +const_param_attrs( + int id: @const_param ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +const_param_default_vals( + int id: @const_param ref, + int default_val: @const_arg ref +); + +#keyset[id] +const_param_is_const( + int id: @const_param ref +); + +#keyset[id] +const_param_names( + int id: @const_param ref, + int name: @name ref +); + +#keyset[id] +const_param_type_reprs( + int id: @const_param ref, + int type_repr: @type_repr ref +); + +continue_exprs( + unique int id: @continue_expr +); + +#keyset[id, index] +continue_expr_attrs( + int id: @continue_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +continue_expr_lifetimes( + int id: @continue_expr ref, + int lifetime: @lifetime ref +); + +dyn_trait_type_reprs( + unique int id: @dyn_trait_type_repr +); + +#keyset[id] +dyn_trait_type_repr_type_bound_lists( + int id: @dyn_trait_type_repr ref, + int type_bound_list: @type_bound_list ref +); + +expr_stmts( + unique int id: @expr_stmt +); + +#keyset[id] +expr_stmt_exprs( + int id: @expr_stmt ref, + int expr: @expr ref +); + +field_exprs( + unique int id: @field_expr +); + +#keyset[id, index] +field_expr_attrs( + int id: @field_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +field_expr_containers( + int id: @field_expr ref, + int container: @expr ref +); + +#keyset[id] +field_expr_identifiers( + int id: @field_expr ref, + int identifier: @name_ref ref +); + +fn_ptr_type_reprs( + unique int id: @fn_ptr_type_repr +); + +#keyset[id] +fn_ptr_type_repr_abis( + int id: @fn_ptr_type_repr ref, + int abi: @abi ref +); + +#keyset[id] +fn_ptr_type_repr_is_async( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_is_const( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_is_unsafe( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_param_lists( + int id: @fn_ptr_type_repr ref, + int param_list: @param_list ref +); + +#keyset[id] +fn_ptr_type_repr_ret_types( + int id: @fn_ptr_type_repr ref, + int ret_type: @ret_type_repr ref +); + +for_type_reprs( + unique int id: @for_type_repr +); + +#keyset[id] +for_type_repr_for_binders( + int id: @for_type_repr ref, + int for_binder: @for_binder ref +); + +#keyset[id] +for_type_repr_type_reprs( + int id: @for_type_repr ref, + int type_repr: @type_repr ref +); + +format_args_exprs( + unique int id: @format_args_expr +); + +#keyset[id, index] +format_args_expr_args( + int id: @format_args_expr ref, + int index: int ref, + int arg: @format_args_arg ref +); + +#keyset[id, index] +format_args_expr_attrs( + int id: @format_args_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +format_args_expr_templates( + int id: @format_args_expr ref, + int template: @expr ref +); + +ident_pats( + unique int id: @ident_pat +); + +#keyset[id, index] +ident_pat_attrs( + int id: @ident_pat ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +ident_pat_is_mut( + int id: @ident_pat ref +); + +#keyset[id] +ident_pat_is_ref( + int id: @ident_pat ref +); + +#keyset[id] +ident_pat_names( + int id: @ident_pat ref, + int name: @name ref +); + +#keyset[id] +ident_pat_pats( + int id: @ident_pat ref, + int pat: @pat ref +); + +if_exprs( + unique int id: @if_expr +); + +#keyset[id, index] +if_expr_attrs( + int id: @if_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +if_expr_conditions( + int id: @if_expr ref, + int condition: @expr ref +); + +#keyset[id] +if_expr_elses( + int id: @if_expr ref, + int else: @expr ref +); + +#keyset[id] +if_expr_thens( + int id: @if_expr ref, + int then: @block_expr ref +); + +impl_trait_type_reprs( + unique int id: @impl_trait_type_repr +); + +#keyset[id] +impl_trait_type_repr_type_bound_lists( + int id: @impl_trait_type_repr ref, + int type_bound_list: @type_bound_list ref +); + +index_exprs( + unique int id: @index_expr +); + +#keyset[id, index] +index_expr_attrs( + int id: @index_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +index_expr_bases( + int id: @index_expr ref, + int base: @expr ref +); + +#keyset[id] +index_expr_indices( + int id: @index_expr ref, + int index: @expr ref +); + +infer_type_reprs( + unique int id: @infer_type_repr +); + +@item = + @adt +| @asm_expr +| @assoc_item +| @extern_block +| @extern_crate +| @extern_item +| @impl +| @macro_def +| @macro_rules +| @module +| @trait +| @trait_alias +| @use +; + +#keyset[id] +item_attribute_macro_expansions( + int id: @item ref, + int attribute_macro_expansion: @macro_items ref +); + +@labelable_expr = + @block_expr +| @looping_expr +; + +#keyset[id] +labelable_expr_labels( + int id: @labelable_expr ref, + int label: @label ref +); + +let_exprs( + unique int id: @let_expr +); + +#keyset[id, index] +let_expr_attrs( + int id: @let_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +let_expr_scrutinees( + int id: @let_expr ref, + int scrutinee: @expr ref +); + +#keyset[id] +let_expr_pats( + int id: @let_expr ref, + int pat: @pat ref +); + +let_stmts( + unique int id: @let_stmt +); + +#keyset[id, index] +let_stmt_attrs( + int id: @let_stmt ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +let_stmt_initializers( + int id: @let_stmt ref, + int initializer: @expr ref +); + +#keyset[id] +let_stmt_let_elses( + int id: @let_stmt ref, + int let_else: @let_else ref +); + +#keyset[id] +let_stmt_pats( + int id: @let_stmt ref, + int pat: @pat ref +); + +#keyset[id] +let_stmt_type_reprs( + int id: @let_stmt ref, + int type_repr: @type_repr ref +); + +lifetimes( + unique int id: @lifetime +); + +#keyset[id] +lifetime_texts( + int id: @lifetime ref, + string text: string ref +); + +lifetime_args( + unique int id: @lifetime_arg +); + +#keyset[id] +lifetime_arg_lifetimes( + int id: @lifetime_arg ref, + int lifetime: @lifetime ref +); + +lifetime_params( + unique int id: @lifetime_param +); + +#keyset[id, index] +lifetime_param_attrs( + int id: @lifetime_param ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +lifetime_param_lifetimes( + int id: @lifetime_param ref, + int lifetime: @lifetime ref +); + +#keyset[id] +lifetime_param_type_bound_lists( + int id: @lifetime_param ref, + int type_bound_list: @type_bound_list ref +); + +literal_exprs( + unique int id: @literal_expr +); + +#keyset[id, index] +literal_expr_attrs( + int id: @literal_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +literal_expr_text_values( + int id: @literal_expr ref, + string text_value: string ref +); + +literal_pats( + unique int id: @literal_pat +); + +#keyset[id] +literal_pat_literals( + int id: @literal_pat ref, + int literal: @literal_expr ref +); + +macro_block_exprs( + unique int id: @macro_block_expr +); + +#keyset[id, index] +macro_block_expr_statements( + int id: @macro_block_expr ref, + int index: int ref, + int statement: @stmt ref +); + +#keyset[id] +macro_block_expr_tail_exprs( + int id: @macro_block_expr ref, + int tail_expr: @expr ref +); + +macro_exprs( + unique int id: @macro_expr +); + +#keyset[id] +macro_expr_macro_calls( + int id: @macro_expr ref, + int macro_call: @macro_call ref +); + +macro_pats( + unique int id: @macro_pat +); + +#keyset[id] +macro_pat_macro_calls( + int id: @macro_pat ref, + int macro_call: @macro_call ref +); + +macro_type_reprs( + unique int id: @macro_type_repr +); + +#keyset[id] +macro_type_repr_macro_calls( + int id: @macro_type_repr ref, + int macro_call: @macro_call ref +); + +match_exprs( + unique int id: @match_expr +); + +#keyset[id, index] +match_expr_attrs( + int id: @match_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +match_expr_scrutinees( + int id: @match_expr ref, + int scrutinee: @expr ref +); + +#keyset[id] +match_expr_match_arm_lists( + int id: @match_expr ref, + int match_arm_list: @match_arm_list ref +); + +method_call_exprs( + unique int id: @method_call_expr +); + +#keyset[id] +method_call_expr_arg_lists( + int id: @method_call_expr ref, + int arg_list: @arg_list ref +); + +#keyset[id, index] +method_call_expr_attrs( + int id: @method_call_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +method_call_expr_generic_arg_lists( + int id: @method_call_expr ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +method_call_expr_identifiers( + int id: @method_call_expr ref, + int identifier: @name_ref ref +); + +#keyset[id] +method_call_expr_receivers( + int id: @method_call_expr ref, + int receiver: @expr ref +); + +name_refs( + unique int id: @name_ref +); + +#keyset[id] +name_ref_texts( + int id: @name_ref ref, + string text: string ref +); + +never_type_reprs( + unique int id: @never_type_repr +); + +offset_of_exprs( + unique int id: @offset_of_expr +); + +#keyset[id, index] +offset_of_expr_attrs( + int id: @offset_of_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +offset_of_expr_fields( + int id: @offset_of_expr ref, + int index: int ref, + int field: @name_ref ref +); + +#keyset[id] +offset_of_expr_type_reprs( + int id: @offset_of_expr ref, + int type_repr: @type_repr ref +); + +or_pats( + unique int id: @or_pat +); + +#keyset[id, index] +or_pat_pats( + int id: @or_pat ref, + int index: int ref, + int pat: @pat ref +); + +params( + unique int id: @param +); + +#keyset[id] +param_pats( + int id: @param ref, + int pat: @pat ref +); + +paren_exprs( + unique int id: @paren_expr +); + +#keyset[id, index] +paren_expr_attrs( + int id: @paren_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +paren_expr_exprs( + int id: @paren_expr ref, + int expr: @expr ref +); + +paren_pats( + unique int id: @paren_pat +); + +#keyset[id] +paren_pat_pats( + int id: @paren_pat ref, + int pat: @pat ref +); + +paren_type_reprs( + unique int id: @paren_type_repr +); + +#keyset[id] +paren_type_repr_type_reprs( + int id: @paren_type_repr ref, + int type_repr: @type_repr ref +); + +@path_expr_base = + @path_expr +; + +path_pats( + unique int id: @path_pat +); + +path_type_reprs( + unique int id: @path_type_repr +); + +#keyset[id] +path_type_repr_paths( + int id: @path_type_repr ref, + int path: @path ref +); + +prefix_exprs( + unique int id: @prefix_expr +); + +#keyset[id, index] +prefix_expr_attrs( + int id: @prefix_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +prefix_expr_exprs( + int id: @prefix_expr ref, + int expr: @expr ref +); + +#keyset[id] +prefix_expr_operator_names( + int id: @prefix_expr ref, + string operator_name: string ref +); + +ptr_type_reprs( + unique int id: @ptr_type_repr +); + +#keyset[id] +ptr_type_repr_is_const( + int id: @ptr_type_repr ref +); + +#keyset[id] +ptr_type_repr_is_mut( + int id: @ptr_type_repr ref +); + +#keyset[id] +ptr_type_repr_type_reprs( + int id: @ptr_type_repr ref, + int type_repr: @type_repr ref +); + +range_exprs( + unique int id: @range_expr +); + +#keyset[id, index] +range_expr_attrs( + int id: @range_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +range_expr_ends( + int id: @range_expr ref, + int end: @expr ref +); + +#keyset[id] +range_expr_operator_names( + int id: @range_expr ref, + string operator_name: string ref +); + +#keyset[id] +range_expr_starts( + int id: @range_expr ref, + int start: @expr ref +); + +range_pats( + unique int id: @range_pat +); + +#keyset[id] +range_pat_ends( + int id: @range_pat ref, + int end: @pat ref +); + +#keyset[id] +range_pat_operator_names( + int id: @range_pat ref, + string operator_name: string ref +); + +#keyset[id] +range_pat_starts( + int id: @range_pat ref, + int start: @pat ref +); + +ref_exprs( + unique int id: @ref_expr +); + +#keyset[id, index] +ref_expr_attrs( + int id: @ref_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +ref_expr_exprs( + int id: @ref_expr ref, + int expr: @expr ref +); + +#keyset[id] +ref_expr_is_const( + int id: @ref_expr ref +); + +#keyset[id] +ref_expr_is_mut( + int id: @ref_expr ref +); + +#keyset[id] +ref_expr_is_raw( + int id: @ref_expr ref +); + +ref_pats( + unique int id: @ref_pat +); + +#keyset[id] +ref_pat_is_mut( + int id: @ref_pat ref +); + +#keyset[id] +ref_pat_pats( + int id: @ref_pat ref, + int pat: @pat ref +); + +ref_type_reprs( + unique int id: @ref_type_repr +); + +#keyset[id] +ref_type_repr_is_mut( + int id: @ref_type_repr ref +); + +#keyset[id] +ref_type_repr_lifetimes( + int id: @ref_type_repr ref, + int lifetime: @lifetime ref +); + +#keyset[id] +ref_type_repr_type_reprs( + int id: @ref_type_repr ref, + int type_repr: @type_repr ref +); + +rest_pats( + unique int id: @rest_pat +); + +#keyset[id, index] +rest_pat_attrs( + int id: @rest_pat ref, + int index: int ref, + int attr: @attr ref +); + +return_exprs( + unique int id: @return_expr +); + +#keyset[id, index] +return_expr_attrs( + int id: @return_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +return_expr_exprs( + int id: @return_expr ref, + int expr: @expr ref +); + +self_params( + unique int id: @self_param +); + +#keyset[id] +self_param_is_ref( + int id: @self_param ref +); + +#keyset[id] +self_param_is_mut( + int id: @self_param ref +); + +#keyset[id] +self_param_lifetimes( + int id: @self_param ref, + int lifetime: @lifetime ref +); + +#keyset[id] +self_param_names( + int id: @self_param ref, + int name: @name ref +); + +slice_pats( + unique int id: @slice_pat +); + +#keyset[id, index] +slice_pat_pats( + int id: @slice_pat ref, + int index: int ref, + int pat: @pat ref +); + +slice_type_reprs( + unique int id: @slice_type_repr +); + +#keyset[id] +slice_type_repr_type_reprs( + int id: @slice_type_repr ref, + int type_repr: @type_repr ref +); + +struct_exprs( + unique int id: @struct_expr +); + +#keyset[id] +struct_expr_struct_expr_field_lists( + int id: @struct_expr ref, + int struct_expr_field_list: @struct_expr_field_list ref +); + +struct_field_lists( + unique int id: @struct_field_list +); + +#keyset[id, index] +struct_field_list_fields( + int id: @struct_field_list ref, + int index: int ref, + int field: @struct_field ref +); + +struct_pats( + unique int id: @struct_pat +); + +#keyset[id] +struct_pat_struct_pat_field_lists( + int id: @struct_pat ref, + int struct_pat_field_list: @struct_pat_field_list ref +); + +try_exprs( + unique int id: @try_expr +); + +#keyset[id, index] +try_expr_attrs( + int id: @try_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +try_expr_exprs( + int id: @try_expr ref, + int expr: @expr ref +); + +tuple_exprs( + unique int id: @tuple_expr +); + +#keyset[id, index] +tuple_expr_attrs( + int id: @tuple_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +tuple_expr_fields( + int id: @tuple_expr ref, + int index: int ref, + int field: @expr ref +); + +tuple_field_lists( + unique int id: @tuple_field_list +); + +#keyset[id, index] +tuple_field_list_fields( + int id: @tuple_field_list ref, + int index: int ref, + int field: @tuple_field ref +); + +tuple_pats( + unique int id: @tuple_pat +); + +#keyset[id, index] +tuple_pat_fields( + int id: @tuple_pat ref, + int index: int ref, + int field: @pat ref +); + +tuple_struct_pats( + unique int id: @tuple_struct_pat +); + +#keyset[id, index] +tuple_struct_pat_fields( + int id: @tuple_struct_pat ref, + int index: int ref, + int field: @pat ref +); + +tuple_type_reprs( + unique int id: @tuple_type_repr +); + +#keyset[id, index] +tuple_type_repr_fields( + int id: @tuple_type_repr ref, + int index: int ref, + int field: @type_repr ref +); + +type_args( + unique int id: @type_arg +); + +#keyset[id] +type_arg_type_reprs( + int id: @type_arg ref, + int type_repr: @type_repr ref +); + +type_params( + unique int id: @type_param +); + +#keyset[id, index] +type_param_attrs( + int id: @type_param ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +type_param_default_types( + int id: @type_param ref, + int default_type: @type_repr ref +); + +#keyset[id] +type_param_names( + int id: @type_param ref, + int name: @name ref +); + +#keyset[id] +type_param_type_bound_lists( + int id: @type_param ref, + int type_bound_list: @type_bound_list ref +); + +underscore_exprs( + unique int id: @underscore_expr +); + +#keyset[id, index] +underscore_expr_attrs( + int id: @underscore_expr ref, + int index: int ref, + int attr: @attr ref +); + +variants( + unique int id: @variant +); + +#keyset[id, index] +variant_attrs( + int id: @variant ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +variant_discriminants( + int id: @variant ref, + int discriminant: @expr ref +); + +#keyset[id] +variant_field_lists( + int id: @variant ref, + int field_list: @field_list ref +); + +#keyset[id] +variant_names( + int id: @variant ref, + int name: @name ref +); + +#keyset[id] +variant_visibilities( + int id: @variant ref, + int visibility: @visibility ref +); + +wildcard_pats( + unique int id: @wildcard_pat +); + +yeet_exprs( + unique int id: @yeet_expr +); + +#keyset[id, index] +yeet_expr_attrs( + int id: @yeet_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +yeet_expr_exprs( + int id: @yeet_expr ref, + int expr: @expr ref +); + +yield_exprs( + unique int id: @yield_expr +); + +#keyset[id, index] +yield_expr_attrs( + int id: @yield_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +yield_expr_exprs( + int id: @yield_expr ref, + int expr: @expr ref +); + +@adt = + @enum +| @struct +| @union +; + +#keyset[id, index] +adt_derive_macro_expansions( + int id: @adt ref, + int index: int ref, + int derive_macro_expansion: @macro_items ref +); + +asm_exprs( + unique int id: @asm_expr +); + +#keyset[id, index] +asm_expr_asm_pieces( + int id: @asm_expr ref, + int index: int ref, + int asm_piece: @asm_piece ref +); + +#keyset[id, index] +asm_expr_attrs( + int id: @asm_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +asm_expr_templates( + int id: @asm_expr ref, + int index: int ref, + int template: @expr ref +); + +@assoc_item = + @const +| @function +| @macro_call +| @type_alias +; + +block_exprs( + unique int id: @block_expr +); + +#keyset[id, index] +block_expr_attrs( + int id: @block_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +block_expr_is_async( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_const( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_gen( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_move( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_try( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_unsafe( + int id: @block_expr ref +); + +#keyset[id] +block_expr_stmt_lists( + int id: @block_expr ref, + int stmt_list: @stmt_list ref +); + +extern_blocks( + unique int id: @extern_block +); + +#keyset[id] +extern_block_abis( + int id: @extern_block ref, + int abi: @abi ref +); + +#keyset[id, index] +extern_block_attrs( + int id: @extern_block ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +extern_block_extern_item_lists( + int id: @extern_block ref, + int extern_item_list: @extern_item_list ref +); + +#keyset[id] +extern_block_is_unsafe( + int id: @extern_block ref +); + +extern_crates( + unique int id: @extern_crate +); + +#keyset[id, index] +extern_crate_attrs( + int id: @extern_crate ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +extern_crate_identifiers( + int id: @extern_crate ref, + int identifier: @name_ref ref +); + +#keyset[id] +extern_crate_renames( + int id: @extern_crate ref, + int rename: @rename ref +); + +#keyset[id] +extern_crate_visibilities( + int id: @extern_crate ref, + int visibility: @visibility ref +); + +@extern_item = + @function +| @macro_call +| @static +| @type_alias +; + +impls( + unique int id: @impl +); + +#keyset[id] +impl_assoc_item_lists( + int id: @impl ref, + int assoc_item_list: @assoc_item_list ref +); + +#keyset[id, index] +impl_attrs( + int id: @impl ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +impl_generic_param_lists( + int id: @impl ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +impl_is_const( + int id: @impl ref +); + +#keyset[id] +impl_is_default( + int id: @impl ref +); + +#keyset[id] +impl_is_unsafe( + int id: @impl ref +); + +#keyset[id] +impl_self_ties( + int id: @impl ref, + int self_ty: @type_repr ref +); + +#keyset[id] +impl_traits( + int id: @impl ref, + int trait: @type_repr ref +); + +#keyset[id] +impl_visibilities( + int id: @impl ref, + int visibility: @visibility ref +); + +#keyset[id] +impl_where_clauses( + int id: @impl ref, + int where_clause: @where_clause ref +); + +@looping_expr = + @for_expr +| @loop_expr +| @while_expr +; + +#keyset[id] +looping_expr_loop_bodies( + int id: @looping_expr ref, + int loop_body: @block_expr ref +); + +macro_defs( + unique int id: @macro_def +); + +#keyset[id] +macro_def_args( + int id: @macro_def ref, + int args: @token_tree ref +); + +#keyset[id, index] +macro_def_attrs( + int id: @macro_def ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +macro_def_bodies( + int id: @macro_def ref, + int body: @token_tree ref +); + +#keyset[id] +macro_def_names( + int id: @macro_def ref, + int name: @name ref +); + +#keyset[id] +macro_def_visibilities( + int id: @macro_def ref, + int visibility: @visibility ref +); + +macro_rules( + unique int id: @macro_rules +); + +#keyset[id, index] +macro_rules_attrs( + int id: @macro_rules ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +macro_rules_names( + int id: @macro_rules ref, + int name: @name ref +); + +#keyset[id] +macro_rules_token_trees( + int id: @macro_rules ref, + int token_tree: @token_tree ref +); + +#keyset[id] +macro_rules_visibilities( + int id: @macro_rules ref, + int visibility: @visibility ref +); + +modules( + unique int id: @module +); + +#keyset[id, index] +module_attrs( + int id: @module ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +module_item_lists( + int id: @module ref, + int item_list: @item_list ref +); + +#keyset[id] +module_names( + int id: @module ref, + int name: @name ref +); + +#keyset[id] +module_visibilities( + int id: @module ref, + int visibility: @visibility ref +); + +path_exprs( + unique int id: @path_expr +); + +#keyset[id, index] +path_expr_attrs( + int id: @path_expr ref, + int index: int ref, + int attr: @attr ref +); + +traits( + unique int id: @trait +); + +#keyset[id] +trait_assoc_item_lists( + int id: @trait ref, + int assoc_item_list: @assoc_item_list ref +); + +#keyset[id, index] +trait_attrs( + int id: @trait ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +trait_generic_param_lists( + int id: @trait ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +trait_is_auto( + int id: @trait ref +); + +#keyset[id] +trait_is_unsafe( + int id: @trait ref +); + +#keyset[id] +trait_names( + int id: @trait ref, + int name: @name ref +); + +#keyset[id] +trait_type_bound_lists( + int id: @trait ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +trait_visibilities( + int id: @trait ref, + int visibility: @visibility ref +); + +#keyset[id] +trait_where_clauses( + int id: @trait ref, + int where_clause: @where_clause ref +); + +trait_aliases( + unique int id: @trait_alias +); + +#keyset[id, index] +trait_alias_attrs( + int id: @trait_alias ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +trait_alias_generic_param_lists( + int id: @trait_alias ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +trait_alias_names( + int id: @trait_alias ref, + int name: @name ref +); + +#keyset[id] +trait_alias_type_bound_lists( + int id: @trait_alias ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +trait_alias_visibilities( + int id: @trait_alias ref, + int visibility: @visibility ref +); + +#keyset[id] +trait_alias_where_clauses( + int id: @trait_alias ref, + int where_clause: @where_clause ref +); + +uses( + unique int id: @use +); + +#keyset[id, index] +use_attrs( + int id: @use ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +use_use_trees( + int id: @use ref, + int use_tree: @use_tree ref +); + +#keyset[id] +use_visibilities( + int id: @use ref, + int visibility: @visibility ref +); + +consts( + unique int id: @const +); + +#keyset[id, index] +const_attrs( + int id: @const ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +const_bodies( + int id: @const ref, + int body: @expr ref +); + +#keyset[id] +const_generic_param_lists( + int id: @const ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +const_is_const( + int id: @const ref +); + +#keyset[id] +const_is_default( + int id: @const ref +); + +#keyset[id] +const_names( + int id: @const ref, + int name: @name ref +); + +#keyset[id] +const_type_reprs( + int id: @const ref, + int type_repr: @type_repr ref +); + +#keyset[id] +const_visibilities( + int id: @const ref, + int visibility: @visibility ref +); + +#keyset[id] +const_where_clauses( + int id: @const ref, + int where_clause: @where_clause ref +); + +#keyset[id] +const_has_implementation( + int id: @const ref +); + +enums( + unique int id: @enum +); + +#keyset[id, index] +enum_attrs( + int id: @enum ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +enum_generic_param_lists( + int id: @enum ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +enum_names( + int id: @enum ref, + int name: @name ref +); + +#keyset[id] +enum_variant_lists( + int id: @enum ref, + int variant_list: @variant_list ref +); + +#keyset[id] +enum_visibilities( + int id: @enum ref, + int visibility: @visibility ref +); + +#keyset[id] +enum_where_clauses( + int id: @enum ref, + int where_clause: @where_clause ref +); + +for_exprs( + unique int id: @for_expr +); + +#keyset[id, index] +for_expr_attrs( + int id: @for_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +for_expr_iterables( + int id: @for_expr ref, + int iterable: @expr ref +); + +#keyset[id] +for_expr_pats( + int id: @for_expr ref, + int pat: @pat ref +); + +functions( + unique int id: @function +); + +#keyset[id] +function_abis( + int id: @function ref, + int abi: @abi ref +); + +#keyset[id] +function_function_bodies( + int id: @function ref, + int function_body: @block_expr ref +); + +#keyset[id] +function_generic_param_lists( + int id: @function ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +function_is_async( + int id: @function ref +); + +#keyset[id] +function_is_const( + int id: @function ref +); + +#keyset[id] +function_is_default( + int id: @function ref +); + +#keyset[id] +function_is_gen( + int id: @function ref +); + +#keyset[id] +function_is_unsafe( + int id: @function ref +); + +#keyset[id] +function_names( + int id: @function ref, + int name: @name ref +); + +#keyset[id] +function_ret_types( + int id: @function ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +function_visibilities( + int id: @function ref, + int visibility: @visibility ref +); + +#keyset[id] +function_where_clauses( + int id: @function ref, + int where_clause: @where_clause ref +); + +#keyset[id] +function_has_implementation( + int id: @function ref +); + +loop_exprs( + unique int id: @loop_expr +); + +#keyset[id, index] +loop_expr_attrs( + int id: @loop_expr ref, + int index: int ref, + int attr: @attr ref +); + +macro_calls( + unique int id: @macro_call +); + +#keyset[id, index] +macro_call_attrs( + int id: @macro_call ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +macro_call_paths( + int id: @macro_call ref, + int path: @path ref +); + +#keyset[id] +macro_call_token_trees( + int id: @macro_call ref, + int token_tree: @token_tree ref +); + +#keyset[id] +macro_call_macro_call_expansions( + int id: @macro_call ref, + int macro_call_expansion: @ast_node ref +); + +statics( + unique int id: @static +); + +#keyset[id, index] +static_attrs( + int id: @static ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +static_bodies( + int id: @static ref, + int body: @expr ref +); + +#keyset[id] +static_is_mut( + int id: @static ref +); + +#keyset[id] +static_is_static( + int id: @static ref +); + +#keyset[id] +static_is_unsafe( + int id: @static ref +); + +#keyset[id] +static_names( + int id: @static ref, + int name: @name ref +); + +#keyset[id] +static_type_reprs( + int id: @static ref, + int type_repr: @type_repr ref +); + +#keyset[id] +static_visibilities( + int id: @static ref, + int visibility: @visibility ref +); + +structs( + unique int id: @struct +); + +#keyset[id, index] +struct_attrs( + int id: @struct ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +struct_field_lists_( + int id: @struct ref, + int field_list: @field_list ref +); + +#keyset[id] +struct_generic_param_lists( + int id: @struct ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +struct_names( + int id: @struct ref, + int name: @name ref +); + +#keyset[id] +struct_visibilities( + int id: @struct ref, + int visibility: @visibility ref +); + +#keyset[id] +struct_where_clauses( + int id: @struct ref, + int where_clause: @where_clause ref +); + +type_aliases( + unique int id: @type_alias +); + +#keyset[id, index] +type_alias_attrs( + int id: @type_alias ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +type_alias_generic_param_lists( + int id: @type_alias ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +type_alias_is_default( + int id: @type_alias ref +); + +#keyset[id] +type_alias_names( + int id: @type_alias ref, + int name: @name ref +); + +#keyset[id] +type_alias_type_reprs( + int id: @type_alias ref, + int type_repr: @type_repr ref +); + +#keyset[id] +type_alias_type_bound_lists( + int id: @type_alias ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +type_alias_visibilities( + int id: @type_alias ref, + int visibility: @visibility ref +); + +#keyset[id] +type_alias_where_clauses( + int id: @type_alias ref, + int where_clause: @where_clause ref +); + +unions( + unique int id: @union +); + +#keyset[id, index] +union_attrs( + int id: @union ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +union_generic_param_lists( + int id: @union ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +union_names( + int id: @union ref, + int name: @name ref +); + +#keyset[id] +union_struct_field_lists( + int id: @union ref, + int struct_field_list: @struct_field_list ref +); + +#keyset[id] +union_visibilities( + int id: @union ref, + int visibility: @visibility ref +); + +#keyset[id] +union_where_clauses( + int id: @union ref, + int where_clause: @where_clause ref +); + +while_exprs( + unique int id: @while_expr +); + +#keyset[id, index] +while_expr_attrs( + int id: @while_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +while_expr_conditions( + int id: @while_expr ref, + int condition: @expr ref +); diff --git a/rust/downgrades/e54d01f67a416b3d6eb7b970f27295097f2cac7f/rust.dbscheme b/rust/downgrades/e54d01f67a416b3d6eb7b970f27295097f2cac7f/rust.dbscheme new file mode 100644 index 00000000000..30a0713e5bf --- /dev/null +++ b/rust/downgrades/e54d01f67a416b3d6eb7b970f27295097f2cac7f/rust.dbscheme @@ -0,0 +1,3615 @@ +// generated by codegen, do not edit + +// from ../shared/tree-sitter-extractor/src/generator/prefix.dbscheme +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Empty location -*/ + +empty_location( + int location: @location_default ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- Diagnostic messages: severity -*/ + +case @diagnostic.severity of + 10 = @diagnostic_debug +| 20 = @diagnostic_info +| 30 = @diagnostic_warning +| 40 = @diagnostic_error +; + +/*- YAML -*/ + +#keyset[parent, idx] +yaml (unique int id: @yaml_node, + int kind: int ref, + int parent: @yaml_node_parent ref, + int idx: int ref, + string tag: string ref, + string tostring: string ref); + +case @yaml_node.kind of + 0 = @yaml_scalar_node +| 1 = @yaml_mapping_node +| 2 = @yaml_sequence_node +| 3 = @yaml_alias_node +; + +@yaml_collection_node = @yaml_mapping_node | @yaml_sequence_node; + +@yaml_node_parent = @yaml_collection_node | @file; + +yaml_anchors (unique int node: @yaml_node ref, + string anchor: string ref); + +yaml_aliases (unique int alias: @yaml_alias_node ref, + string target: string ref); + +yaml_scalars (unique int scalar: @yaml_scalar_node ref, + int style: int ref, + string value: string ref); + +yaml_errors (unique int id: @yaml_error, + string message: string ref); + +yaml_locations(unique int locatable: @yaml_locatable ref, + int location: @location_default ref); + +@yaml_locatable = @yaml_node | @yaml_error; + +/*- Database metadata -*/ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +overlayChangedFiles( + string path: string ref +); + + +// from prefix.dbscheme +#keyset[id] +locatable_locations( + int id: @locatable ref, + int location: @location_default ref +); + + +// from schema + +@element = + @extractor_step +| @locatable +| @named_crate +| @unextracted +; + +extractor_steps( + unique int id: @extractor_step, + string action: string ref, + int duration_ms: int ref +); + +#keyset[id] +extractor_step_files( + int id: @extractor_step ref, + int file: @file ref +); + +@locatable = + @ast_node +| @crate +; + +named_crates( + unique int id: @named_crate, + string name: string ref, + int crate: @crate ref +); + +@unextracted = + @missing +| @unimplemented +; + +@ast_node = + @abi +| @addressable +| @arg_list +| @asm_dir_spec +| @asm_operand +| @asm_operand_expr +| @asm_option +| @asm_piece +| @asm_reg_spec +| @assoc_item_list +| @attr +| @callable +| @expr +| @extern_item_list +| @field_list +| @for_binder +| @format_args_arg +| @generic_arg +| @generic_arg_list +| @generic_param +| @generic_param_list +| @item_list +| @label +| @let_else +| @macro_items +| @match_arm +| @match_arm_list +| @match_guard +| @meta +| @name +| @param_base +| @param_list +| @parenthesized_arg_list +| @pat +| @path +| @path_ast_node +| @path_segment +| @rename +| @ret_type_repr +| @return_type_syntax +| @source_file +| @stmt +| @stmt_list +| @struct_expr_field +| @struct_expr_field_list +| @struct_field +| @struct_pat_field +| @struct_pat_field_list +| @token +| @token_tree +| @tuple_field +| @type_bound +| @type_bound_list +| @type_repr +| @use_bound_generic_arg +| @use_bound_generic_args +| @use_tree +| @use_tree_list +| @variant_list +| @visibility +| @where_clause +| @where_pred +; + +crates( + unique int id: @crate +); + +#keyset[id] +crate_names( + int id: @crate ref, + string name: string ref +); + +#keyset[id] +crate_versions( + int id: @crate ref, + string version: string ref +); + +#keyset[id, index] +crate_cfg_options( + int id: @crate ref, + int index: int ref, + string cfg_option: string ref +); + +#keyset[id, index] +crate_named_dependencies( + int id: @crate ref, + int index: int ref, + int named_dependency: @named_crate ref +); + +missings( + unique int id: @missing +); + +unimplementeds( + unique int id: @unimplemented +); + +abis( + unique int id: @abi +); + +#keyset[id] +abi_abi_strings( + int id: @abi ref, + string abi_string: string ref +); + +@addressable = + @item +| @variant +; + +arg_lists( + unique int id: @arg_list +); + +#keyset[id, index] +arg_list_args( + int id: @arg_list ref, + int index: int ref, + int arg: @expr ref +); + +asm_dir_specs( + unique int id: @asm_dir_spec +); + +@asm_operand = + @asm_const +| @asm_label +| @asm_reg_operand +| @asm_sym +; + +asm_operand_exprs( + unique int id: @asm_operand_expr +); + +#keyset[id] +asm_operand_expr_in_exprs( + int id: @asm_operand_expr ref, + int in_expr: @expr ref +); + +#keyset[id] +asm_operand_expr_out_exprs( + int id: @asm_operand_expr ref, + int out_expr: @expr ref +); + +asm_options( + unique int id: @asm_option +); + +#keyset[id] +asm_option_is_raw( + int id: @asm_option ref +); + +@asm_piece = + @asm_clobber_abi +| @asm_operand_named +| @asm_options_list +; + +asm_reg_specs( + unique int id: @asm_reg_spec +); + +#keyset[id] +asm_reg_spec_identifiers( + int id: @asm_reg_spec ref, + int identifier: @name_ref ref +); + +assoc_item_lists( + unique int id: @assoc_item_list +); + +#keyset[id, index] +assoc_item_list_assoc_items( + int id: @assoc_item_list ref, + int index: int ref, + int assoc_item: @assoc_item ref +); + +#keyset[id, index] +assoc_item_list_attrs( + int id: @assoc_item_list ref, + int index: int ref, + int attr: @attr ref +); + +attrs( + unique int id: @attr +); + +#keyset[id] +attr_meta( + int id: @attr ref, + int meta: @meta ref +); + +@callable = + @closure_expr +| @function +; + +#keyset[id] +callable_param_lists( + int id: @callable ref, + int param_list: @param_list ref +); + +#keyset[id, index] +callable_attrs( + int id: @callable ref, + int index: int ref, + int attr: @attr ref +); + +@expr = + @array_expr_internal +| @asm_expr +| @await_expr +| @become_expr +| @binary_expr +| @break_expr +| @call_expr_base +| @cast_expr +| @closure_expr +| @continue_expr +| @field_expr +| @format_args_expr +| @if_expr +| @index_expr +| @labelable_expr +| @let_expr +| @literal_expr +| @macro_block_expr +| @macro_expr +| @match_expr +| @offset_of_expr +| @paren_expr +| @path_expr_base +| @prefix_expr +| @range_expr +| @ref_expr +| @return_expr +| @struct_expr +| @try_expr +| @tuple_expr +| @underscore_expr +| @yeet_expr +| @yield_expr +; + +extern_item_lists( + unique int id: @extern_item_list +); + +#keyset[id, index] +extern_item_list_attrs( + int id: @extern_item_list ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +extern_item_list_extern_items( + int id: @extern_item_list ref, + int index: int ref, + int extern_item: @extern_item ref +); + +@field_list = + @struct_field_list +| @tuple_field_list +; + +for_binders( + unique int id: @for_binder +); + +#keyset[id] +for_binder_generic_param_lists( + int id: @for_binder ref, + int generic_param_list: @generic_param_list ref +); + +format_args_args( + unique int id: @format_args_arg +); + +#keyset[id] +format_args_arg_exprs( + int id: @format_args_arg ref, + int expr: @expr ref +); + +#keyset[id] +format_args_arg_names( + int id: @format_args_arg ref, + int name: @name ref +); + +@generic_arg = + @assoc_type_arg +| @const_arg +| @lifetime_arg +| @type_arg +; + +generic_arg_lists( + unique int id: @generic_arg_list +); + +#keyset[id, index] +generic_arg_list_generic_args( + int id: @generic_arg_list ref, + int index: int ref, + int generic_arg: @generic_arg ref +); + +@generic_param = + @const_param +| @lifetime_param +| @type_param +; + +generic_param_lists( + unique int id: @generic_param_list +); + +#keyset[id, index] +generic_param_list_generic_params( + int id: @generic_param_list ref, + int index: int ref, + int generic_param: @generic_param ref +); + +item_lists( + unique int id: @item_list +); + +#keyset[id, index] +item_list_attrs( + int id: @item_list ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +item_list_items( + int id: @item_list ref, + int index: int ref, + int item: @item ref +); + +labels( + unique int id: @label +); + +#keyset[id] +label_lifetimes( + int id: @label ref, + int lifetime: @lifetime ref +); + +let_elses( + unique int id: @let_else +); + +#keyset[id] +let_else_block_exprs( + int id: @let_else ref, + int block_expr: @block_expr ref +); + +macro_items( + unique int id: @macro_items +); + +#keyset[id, index] +macro_items_items( + int id: @macro_items ref, + int index: int ref, + int item: @item ref +); + +match_arms( + unique int id: @match_arm +); + +#keyset[id, index] +match_arm_attrs( + int id: @match_arm ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +match_arm_exprs( + int id: @match_arm ref, + int expr: @expr ref +); + +#keyset[id] +match_arm_guards( + int id: @match_arm ref, + int guard: @match_guard ref +); + +#keyset[id] +match_arm_pats( + int id: @match_arm ref, + int pat: @pat ref +); + +match_arm_lists( + unique int id: @match_arm_list +); + +#keyset[id, index] +match_arm_list_arms( + int id: @match_arm_list ref, + int index: int ref, + int arm: @match_arm ref +); + +#keyset[id, index] +match_arm_list_attrs( + int id: @match_arm_list ref, + int index: int ref, + int attr: @attr ref +); + +match_guards( + unique int id: @match_guard +); + +#keyset[id] +match_guard_conditions( + int id: @match_guard ref, + int condition: @expr ref +); + +meta( + unique int id: @meta +); + +#keyset[id] +meta_exprs( + int id: @meta ref, + int expr: @expr ref +); + +#keyset[id] +meta_is_unsafe( + int id: @meta ref +); + +#keyset[id] +meta_paths( + int id: @meta ref, + int path: @path ref +); + +#keyset[id] +meta_token_trees( + int id: @meta ref, + int token_tree: @token_tree ref +); + +names( + unique int id: @name +); + +#keyset[id] +name_texts( + int id: @name ref, + string text: string ref +); + +@param_base = + @param +| @self_param +; + +#keyset[id, index] +param_base_attrs( + int id: @param_base ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +param_base_type_reprs( + int id: @param_base ref, + int type_repr: @type_repr ref +); + +param_lists( + unique int id: @param_list +); + +#keyset[id, index] +param_list_params( + int id: @param_list ref, + int index: int ref, + int param: @param ref +); + +#keyset[id] +param_list_self_params( + int id: @param_list ref, + int self_param: @self_param ref +); + +parenthesized_arg_lists( + unique int id: @parenthesized_arg_list +); + +#keyset[id, index] +parenthesized_arg_list_type_args( + int id: @parenthesized_arg_list ref, + int index: int ref, + int type_arg: @type_arg ref +); + +@pat = + @box_pat +| @const_block_pat +| @ident_pat +| @literal_pat +| @macro_pat +| @or_pat +| @paren_pat +| @path_pat +| @range_pat +| @ref_pat +| @rest_pat +| @slice_pat +| @struct_pat +| @tuple_pat +| @tuple_struct_pat +| @wildcard_pat +; + +paths( + unique int id: @path +); + +#keyset[id] +path_qualifiers( + int id: @path ref, + int qualifier: @path ref +); + +#keyset[id] +path_segments_( + int id: @path ref, + int segment: @path_segment ref +); + +@path_ast_node = + @path_expr +| @path_pat +| @struct_expr +| @struct_pat +| @tuple_struct_pat +; + +#keyset[id] +path_ast_node_paths( + int id: @path_ast_node ref, + int path: @path ref +); + +path_segments( + unique int id: @path_segment +); + +#keyset[id] +path_segment_generic_arg_lists( + int id: @path_segment ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +path_segment_identifiers( + int id: @path_segment ref, + int identifier: @name_ref ref +); + +#keyset[id] +path_segment_parenthesized_arg_lists( + int id: @path_segment ref, + int parenthesized_arg_list: @parenthesized_arg_list ref +); + +#keyset[id] +path_segment_ret_types( + int id: @path_segment ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +path_segment_return_type_syntaxes( + int id: @path_segment ref, + int return_type_syntax: @return_type_syntax ref +); + +#keyset[id] +path_segment_type_reprs( + int id: @path_segment ref, + int type_repr: @type_repr ref +); + +#keyset[id] +path_segment_trait_type_reprs( + int id: @path_segment ref, + int trait_type_repr: @path_type_repr ref +); + +renames( + unique int id: @rename +); + +#keyset[id] +rename_names( + int id: @rename ref, + int name: @name ref +); + +ret_type_reprs( + unique int id: @ret_type_repr +); + +#keyset[id] +ret_type_repr_type_reprs( + int id: @ret_type_repr ref, + int type_repr: @type_repr ref +); + +return_type_syntaxes( + unique int id: @return_type_syntax +); + +source_files( + unique int id: @source_file +); + +#keyset[id, index] +source_file_attrs( + int id: @source_file ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +source_file_items( + int id: @source_file ref, + int index: int ref, + int item: @item ref +); + +@stmt = + @expr_stmt +| @item +| @let_stmt +; + +stmt_lists( + unique int id: @stmt_list +); + +#keyset[id, index] +stmt_list_attrs( + int id: @stmt_list ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +stmt_list_statements( + int id: @stmt_list ref, + int index: int ref, + int statement: @stmt ref +); + +#keyset[id] +stmt_list_tail_exprs( + int id: @stmt_list ref, + int tail_expr: @expr ref +); + +struct_expr_fields( + unique int id: @struct_expr_field +); + +#keyset[id, index] +struct_expr_field_attrs( + int id: @struct_expr_field ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +struct_expr_field_exprs( + int id: @struct_expr_field ref, + int expr: @expr ref +); + +#keyset[id] +struct_expr_field_identifiers( + int id: @struct_expr_field ref, + int identifier: @name_ref ref +); + +struct_expr_field_lists( + unique int id: @struct_expr_field_list +); + +#keyset[id, index] +struct_expr_field_list_attrs( + int id: @struct_expr_field_list ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +struct_expr_field_list_fields( + int id: @struct_expr_field_list ref, + int index: int ref, + int field: @struct_expr_field ref +); + +#keyset[id] +struct_expr_field_list_spreads( + int id: @struct_expr_field_list ref, + int spread: @expr ref +); + +struct_fields( + unique int id: @struct_field +); + +#keyset[id, index] +struct_field_attrs( + int id: @struct_field ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +struct_field_defaults( + int id: @struct_field ref, + int default: @expr ref +); + +#keyset[id] +struct_field_is_unsafe( + int id: @struct_field ref +); + +#keyset[id] +struct_field_names( + int id: @struct_field ref, + int name: @name ref +); + +#keyset[id] +struct_field_type_reprs( + int id: @struct_field ref, + int type_repr: @type_repr ref +); + +#keyset[id] +struct_field_visibilities( + int id: @struct_field ref, + int visibility: @visibility ref +); + +struct_pat_fields( + unique int id: @struct_pat_field +); + +#keyset[id, index] +struct_pat_field_attrs( + int id: @struct_pat_field ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +struct_pat_field_identifiers( + int id: @struct_pat_field ref, + int identifier: @name_ref ref +); + +#keyset[id] +struct_pat_field_pats( + int id: @struct_pat_field ref, + int pat: @pat ref +); + +struct_pat_field_lists( + unique int id: @struct_pat_field_list +); + +#keyset[id, index] +struct_pat_field_list_fields( + int id: @struct_pat_field_list ref, + int index: int ref, + int field: @struct_pat_field ref +); + +#keyset[id] +struct_pat_field_list_rest_pats( + int id: @struct_pat_field_list ref, + int rest_pat: @rest_pat ref +); + +@token = + @comment +; + +token_trees( + unique int id: @token_tree +); + +tuple_fields( + unique int id: @tuple_field +); + +#keyset[id, index] +tuple_field_attrs( + int id: @tuple_field ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +tuple_field_type_reprs( + int id: @tuple_field ref, + int type_repr: @type_repr ref +); + +#keyset[id] +tuple_field_visibilities( + int id: @tuple_field ref, + int visibility: @visibility ref +); + +type_bounds( + unique int id: @type_bound +); + +#keyset[id] +type_bound_for_binders( + int id: @type_bound ref, + int for_binder: @for_binder ref +); + +#keyset[id] +type_bound_is_async( + int id: @type_bound ref +); + +#keyset[id] +type_bound_is_const( + int id: @type_bound ref +); + +#keyset[id] +type_bound_lifetimes( + int id: @type_bound ref, + int lifetime: @lifetime ref +); + +#keyset[id] +type_bound_type_reprs( + int id: @type_bound ref, + int type_repr: @type_repr ref +); + +#keyset[id] +type_bound_use_bound_generic_args( + int id: @type_bound ref, + int use_bound_generic_args: @use_bound_generic_args ref +); + +type_bound_lists( + unique int id: @type_bound_list +); + +#keyset[id, index] +type_bound_list_bounds( + int id: @type_bound_list ref, + int index: int ref, + int bound: @type_bound ref +); + +@type_repr = + @array_type_repr +| @dyn_trait_type_repr +| @fn_ptr_type_repr +| @for_type_repr +| @impl_trait_type_repr +| @infer_type_repr +| @macro_type_repr +| @never_type_repr +| @paren_type_repr +| @path_type_repr +| @ptr_type_repr +| @ref_type_repr +| @slice_type_repr +| @tuple_type_repr +; + +@use_bound_generic_arg = + @lifetime +| @name_ref +; + +use_bound_generic_args( + unique int id: @use_bound_generic_args +); + +#keyset[id, index] +use_bound_generic_args_use_bound_generic_args( + int id: @use_bound_generic_args ref, + int index: int ref, + int use_bound_generic_arg: @use_bound_generic_arg ref +); + +use_trees( + unique int id: @use_tree +); + +#keyset[id] +use_tree_is_glob( + int id: @use_tree ref +); + +#keyset[id] +use_tree_paths( + int id: @use_tree ref, + int path: @path ref +); + +#keyset[id] +use_tree_renames( + int id: @use_tree ref, + int rename: @rename ref +); + +#keyset[id] +use_tree_use_tree_lists( + int id: @use_tree ref, + int use_tree_list: @use_tree_list ref +); + +use_tree_lists( + unique int id: @use_tree_list +); + +#keyset[id, index] +use_tree_list_use_trees( + int id: @use_tree_list ref, + int index: int ref, + int use_tree: @use_tree ref +); + +variant_lists( + unique int id: @variant_list +); + +#keyset[id, index] +variant_list_variants( + int id: @variant_list ref, + int index: int ref, + int variant: @variant ref +); + +visibilities( + unique int id: @visibility +); + +#keyset[id] +visibility_paths( + int id: @visibility ref, + int path: @path ref +); + +where_clauses( + unique int id: @where_clause +); + +#keyset[id, index] +where_clause_predicates( + int id: @where_clause ref, + int index: int ref, + int predicate: @where_pred ref +); + +where_preds( + unique int id: @where_pred +); + +#keyset[id] +where_pred_for_binders( + int id: @where_pred ref, + int for_binder: @for_binder ref +); + +#keyset[id] +where_pred_lifetimes( + int id: @where_pred ref, + int lifetime: @lifetime ref +); + +#keyset[id] +where_pred_type_reprs( + int id: @where_pred ref, + int type_repr: @type_repr ref +); + +#keyset[id] +where_pred_type_bound_lists( + int id: @where_pred ref, + int type_bound_list: @type_bound_list ref +); + +array_expr_internals( + unique int id: @array_expr_internal +); + +#keyset[id, index] +array_expr_internal_attrs( + int id: @array_expr_internal ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +array_expr_internal_exprs( + int id: @array_expr_internal ref, + int index: int ref, + int expr: @expr ref +); + +#keyset[id] +array_expr_internal_is_semicolon( + int id: @array_expr_internal ref +); + +array_type_reprs( + unique int id: @array_type_repr +); + +#keyset[id] +array_type_repr_const_args( + int id: @array_type_repr ref, + int const_arg: @const_arg ref +); + +#keyset[id] +array_type_repr_element_type_reprs( + int id: @array_type_repr ref, + int element_type_repr: @type_repr ref +); + +asm_clobber_abis( + unique int id: @asm_clobber_abi +); + +asm_consts( + unique int id: @asm_const +); + +#keyset[id] +asm_const_exprs( + int id: @asm_const ref, + int expr: @expr ref +); + +#keyset[id] +asm_const_is_const( + int id: @asm_const ref +); + +asm_labels( + unique int id: @asm_label +); + +#keyset[id] +asm_label_block_exprs( + int id: @asm_label ref, + int block_expr: @block_expr ref +); + +asm_operand_nameds( + unique int id: @asm_operand_named +); + +#keyset[id] +asm_operand_named_asm_operands( + int id: @asm_operand_named ref, + int asm_operand: @asm_operand ref +); + +#keyset[id] +asm_operand_named_names( + int id: @asm_operand_named ref, + int name: @name ref +); + +asm_options_lists( + unique int id: @asm_options_list +); + +#keyset[id, index] +asm_options_list_asm_options( + int id: @asm_options_list ref, + int index: int ref, + int asm_option: @asm_option ref +); + +asm_reg_operands( + unique int id: @asm_reg_operand +); + +#keyset[id] +asm_reg_operand_asm_dir_specs( + int id: @asm_reg_operand ref, + int asm_dir_spec: @asm_dir_spec ref +); + +#keyset[id] +asm_reg_operand_asm_operand_exprs( + int id: @asm_reg_operand ref, + int asm_operand_expr: @asm_operand_expr ref +); + +#keyset[id] +asm_reg_operand_asm_reg_specs( + int id: @asm_reg_operand ref, + int asm_reg_spec: @asm_reg_spec ref +); + +asm_syms( + unique int id: @asm_sym +); + +#keyset[id] +asm_sym_paths( + int id: @asm_sym ref, + int path: @path ref +); + +assoc_type_args( + unique int id: @assoc_type_arg +); + +#keyset[id] +assoc_type_arg_const_args( + int id: @assoc_type_arg ref, + int const_arg: @const_arg ref +); + +#keyset[id] +assoc_type_arg_generic_arg_lists( + int id: @assoc_type_arg ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +assoc_type_arg_identifiers( + int id: @assoc_type_arg ref, + int identifier: @name_ref ref +); + +#keyset[id] +assoc_type_arg_param_lists( + int id: @assoc_type_arg ref, + int param_list: @param_list ref +); + +#keyset[id] +assoc_type_arg_ret_types( + int id: @assoc_type_arg ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +assoc_type_arg_return_type_syntaxes( + int id: @assoc_type_arg ref, + int return_type_syntax: @return_type_syntax ref +); + +#keyset[id] +assoc_type_arg_type_reprs( + int id: @assoc_type_arg ref, + int type_repr: @type_repr ref +); + +#keyset[id] +assoc_type_arg_type_bound_lists( + int id: @assoc_type_arg ref, + int type_bound_list: @type_bound_list ref +); + +await_exprs( + unique int id: @await_expr +); + +#keyset[id, index] +await_expr_attrs( + int id: @await_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +await_expr_exprs( + int id: @await_expr ref, + int expr: @expr ref +); + +become_exprs( + unique int id: @become_expr +); + +#keyset[id, index] +become_expr_attrs( + int id: @become_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +become_expr_exprs( + int id: @become_expr ref, + int expr: @expr ref +); + +binary_exprs( + unique int id: @binary_expr +); + +#keyset[id, index] +binary_expr_attrs( + int id: @binary_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +binary_expr_lhs( + int id: @binary_expr ref, + int lhs: @expr ref +); + +#keyset[id] +binary_expr_operator_names( + int id: @binary_expr ref, + string operator_name: string ref +); + +#keyset[id] +binary_expr_rhs( + int id: @binary_expr ref, + int rhs: @expr ref +); + +box_pats( + unique int id: @box_pat +); + +#keyset[id] +box_pat_pats( + int id: @box_pat ref, + int pat: @pat ref +); + +break_exprs( + unique int id: @break_expr +); + +#keyset[id, index] +break_expr_attrs( + int id: @break_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +break_expr_exprs( + int id: @break_expr ref, + int expr: @expr ref +); + +#keyset[id] +break_expr_lifetimes( + int id: @break_expr ref, + int lifetime: @lifetime ref +); + +@call_expr_base = + @call_expr +| @method_call_expr +; + +#keyset[id] +call_expr_base_arg_lists( + int id: @call_expr_base ref, + int arg_list: @arg_list ref +); + +#keyset[id, index] +call_expr_base_attrs( + int id: @call_expr_base ref, + int index: int ref, + int attr: @attr ref +); + +cast_exprs( + unique int id: @cast_expr +); + +#keyset[id, index] +cast_expr_attrs( + int id: @cast_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +cast_expr_exprs( + int id: @cast_expr ref, + int expr: @expr ref +); + +#keyset[id] +cast_expr_type_reprs( + int id: @cast_expr ref, + int type_repr: @type_repr ref +); + +closure_exprs( + unique int id: @closure_expr +); + +#keyset[id] +closure_expr_closure_bodies( + int id: @closure_expr ref, + int closure_body: @expr ref +); + +#keyset[id] +closure_expr_for_binders( + int id: @closure_expr ref, + int for_binder: @for_binder ref +); + +#keyset[id] +closure_expr_is_async( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_const( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_gen( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_move( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_static( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_ret_types( + int id: @closure_expr ref, + int ret_type: @ret_type_repr ref +); + +comments( + unique int id: @comment, + int parent: @ast_node ref, + string text: string ref +); + +const_args( + unique int id: @const_arg +); + +#keyset[id] +const_arg_exprs( + int id: @const_arg ref, + int expr: @expr ref +); + +const_block_pats( + unique int id: @const_block_pat +); + +#keyset[id] +const_block_pat_block_exprs( + int id: @const_block_pat ref, + int block_expr: @block_expr ref +); + +#keyset[id] +const_block_pat_is_const( + int id: @const_block_pat ref +); + +const_params( + unique int id: @const_param +); + +#keyset[id, index] +const_param_attrs( + int id: @const_param ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +const_param_default_vals( + int id: @const_param ref, + int default_val: @const_arg ref +); + +#keyset[id] +const_param_is_const( + int id: @const_param ref +); + +#keyset[id] +const_param_names( + int id: @const_param ref, + int name: @name ref +); + +#keyset[id] +const_param_type_reprs( + int id: @const_param ref, + int type_repr: @type_repr ref +); + +continue_exprs( + unique int id: @continue_expr +); + +#keyset[id, index] +continue_expr_attrs( + int id: @continue_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +continue_expr_lifetimes( + int id: @continue_expr ref, + int lifetime: @lifetime ref +); + +dyn_trait_type_reprs( + unique int id: @dyn_trait_type_repr +); + +#keyset[id] +dyn_trait_type_repr_type_bound_lists( + int id: @dyn_trait_type_repr ref, + int type_bound_list: @type_bound_list ref +); + +expr_stmts( + unique int id: @expr_stmt +); + +#keyset[id] +expr_stmt_exprs( + int id: @expr_stmt ref, + int expr: @expr ref +); + +field_exprs( + unique int id: @field_expr +); + +#keyset[id, index] +field_expr_attrs( + int id: @field_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +field_expr_containers( + int id: @field_expr ref, + int container: @expr ref +); + +#keyset[id] +field_expr_identifiers( + int id: @field_expr ref, + int identifier: @name_ref ref +); + +fn_ptr_type_reprs( + unique int id: @fn_ptr_type_repr +); + +#keyset[id] +fn_ptr_type_repr_abis( + int id: @fn_ptr_type_repr ref, + int abi: @abi ref +); + +#keyset[id] +fn_ptr_type_repr_is_async( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_is_const( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_is_unsafe( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_param_lists( + int id: @fn_ptr_type_repr ref, + int param_list: @param_list ref +); + +#keyset[id] +fn_ptr_type_repr_ret_types( + int id: @fn_ptr_type_repr ref, + int ret_type: @ret_type_repr ref +); + +for_type_reprs( + unique int id: @for_type_repr +); + +#keyset[id] +for_type_repr_for_binders( + int id: @for_type_repr ref, + int for_binder: @for_binder ref +); + +#keyset[id] +for_type_repr_type_reprs( + int id: @for_type_repr ref, + int type_repr: @type_repr ref +); + +format_args_exprs( + unique int id: @format_args_expr +); + +#keyset[id, index] +format_args_expr_args( + int id: @format_args_expr ref, + int index: int ref, + int arg: @format_args_arg ref +); + +#keyset[id, index] +format_args_expr_attrs( + int id: @format_args_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +format_args_expr_templates( + int id: @format_args_expr ref, + int template: @expr ref +); + +ident_pats( + unique int id: @ident_pat +); + +#keyset[id, index] +ident_pat_attrs( + int id: @ident_pat ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +ident_pat_is_mut( + int id: @ident_pat ref +); + +#keyset[id] +ident_pat_is_ref( + int id: @ident_pat ref +); + +#keyset[id] +ident_pat_names( + int id: @ident_pat ref, + int name: @name ref +); + +#keyset[id] +ident_pat_pats( + int id: @ident_pat ref, + int pat: @pat ref +); + +if_exprs( + unique int id: @if_expr +); + +#keyset[id, index] +if_expr_attrs( + int id: @if_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +if_expr_conditions( + int id: @if_expr ref, + int condition: @expr ref +); + +#keyset[id] +if_expr_elses( + int id: @if_expr ref, + int else: @expr ref +); + +#keyset[id] +if_expr_thens( + int id: @if_expr ref, + int then: @block_expr ref +); + +impl_trait_type_reprs( + unique int id: @impl_trait_type_repr +); + +#keyset[id] +impl_trait_type_repr_type_bound_lists( + int id: @impl_trait_type_repr ref, + int type_bound_list: @type_bound_list ref +); + +index_exprs( + unique int id: @index_expr +); + +#keyset[id, index] +index_expr_attrs( + int id: @index_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +index_expr_bases( + int id: @index_expr ref, + int base: @expr ref +); + +#keyset[id] +index_expr_indices( + int id: @index_expr ref, + int index: @expr ref +); + +infer_type_reprs( + unique int id: @infer_type_repr +); + +@item = + @adt +| @asm_expr +| @assoc_item +| @extern_block +| @extern_crate +| @extern_item +| @impl +| @macro_def +| @macro_rules +| @module +| @trait +| @trait_alias +| @use +; + +#keyset[id] +item_attribute_macro_expansions( + int id: @item ref, + int attribute_macro_expansion: @macro_items ref +); + +@labelable_expr = + @block_expr +| @looping_expr +; + +#keyset[id] +labelable_expr_labels( + int id: @labelable_expr ref, + int label: @label ref +); + +let_exprs( + unique int id: @let_expr +); + +#keyset[id, index] +let_expr_attrs( + int id: @let_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +let_expr_scrutinees( + int id: @let_expr ref, + int scrutinee: @expr ref +); + +#keyset[id] +let_expr_pats( + int id: @let_expr ref, + int pat: @pat ref +); + +let_stmts( + unique int id: @let_stmt +); + +#keyset[id, index] +let_stmt_attrs( + int id: @let_stmt ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +let_stmt_initializers( + int id: @let_stmt ref, + int initializer: @expr ref +); + +#keyset[id] +let_stmt_let_elses( + int id: @let_stmt ref, + int let_else: @let_else ref +); + +#keyset[id] +let_stmt_pats( + int id: @let_stmt ref, + int pat: @pat ref +); + +#keyset[id] +let_stmt_type_reprs( + int id: @let_stmt ref, + int type_repr: @type_repr ref +); + +lifetimes( + unique int id: @lifetime +); + +#keyset[id] +lifetime_texts( + int id: @lifetime ref, + string text: string ref +); + +lifetime_args( + unique int id: @lifetime_arg +); + +#keyset[id] +lifetime_arg_lifetimes( + int id: @lifetime_arg ref, + int lifetime: @lifetime ref +); + +lifetime_params( + unique int id: @lifetime_param +); + +#keyset[id, index] +lifetime_param_attrs( + int id: @lifetime_param ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +lifetime_param_lifetimes( + int id: @lifetime_param ref, + int lifetime: @lifetime ref +); + +#keyset[id] +lifetime_param_type_bound_lists( + int id: @lifetime_param ref, + int type_bound_list: @type_bound_list ref +); + +literal_exprs( + unique int id: @literal_expr +); + +#keyset[id, index] +literal_expr_attrs( + int id: @literal_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +literal_expr_text_values( + int id: @literal_expr ref, + string text_value: string ref +); + +literal_pats( + unique int id: @literal_pat +); + +#keyset[id] +literal_pat_literals( + int id: @literal_pat ref, + int literal: @literal_expr ref +); + +macro_block_exprs( + unique int id: @macro_block_expr +); + +#keyset[id, index] +macro_block_expr_statements( + int id: @macro_block_expr ref, + int index: int ref, + int statement: @stmt ref +); + +#keyset[id] +macro_block_expr_tail_exprs( + int id: @macro_block_expr ref, + int tail_expr: @expr ref +); + +macro_exprs( + unique int id: @macro_expr +); + +#keyset[id] +macro_expr_macro_calls( + int id: @macro_expr ref, + int macro_call: @macro_call ref +); + +macro_pats( + unique int id: @macro_pat +); + +#keyset[id] +macro_pat_macro_calls( + int id: @macro_pat ref, + int macro_call: @macro_call ref +); + +macro_type_reprs( + unique int id: @macro_type_repr +); + +#keyset[id] +macro_type_repr_macro_calls( + int id: @macro_type_repr ref, + int macro_call: @macro_call ref +); + +match_exprs( + unique int id: @match_expr +); + +#keyset[id, index] +match_expr_attrs( + int id: @match_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +match_expr_scrutinees( + int id: @match_expr ref, + int scrutinee: @expr ref +); + +#keyset[id] +match_expr_match_arm_lists( + int id: @match_expr ref, + int match_arm_list: @match_arm_list ref +); + +name_refs( + unique int id: @name_ref +); + +#keyset[id] +name_ref_texts( + int id: @name_ref ref, + string text: string ref +); + +never_type_reprs( + unique int id: @never_type_repr +); + +offset_of_exprs( + unique int id: @offset_of_expr +); + +#keyset[id, index] +offset_of_expr_attrs( + int id: @offset_of_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +offset_of_expr_fields( + int id: @offset_of_expr ref, + int index: int ref, + int field: @name_ref ref +); + +#keyset[id] +offset_of_expr_type_reprs( + int id: @offset_of_expr ref, + int type_repr: @type_repr ref +); + +or_pats( + unique int id: @or_pat +); + +#keyset[id, index] +or_pat_pats( + int id: @or_pat ref, + int index: int ref, + int pat: @pat ref +); + +params( + unique int id: @param +); + +#keyset[id] +param_pats( + int id: @param ref, + int pat: @pat ref +); + +paren_exprs( + unique int id: @paren_expr +); + +#keyset[id, index] +paren_expr_attrs( + int id: @paren_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +paren_expr_exprs( + int id: @paren_expr ref, + int expr: @expr ref +); + +paren_pats( + unique int id: @paren_pat +); + +#keyset[id] +paren_pat_pats( + int id: @paren_pat ref, + int pat: @pat ref +); + +paren_type_reprs( + unique int id: @paren_type_repr +); + +#keyset[id] +paren_type_repr_type_reprs( + int id: @paren_type_repr ref, + int type_repr: @type_repr ref +); + +@path_expr_base = + @path_expr +; + +path_pats( + unique int id: @path_pat +); + +path_type_reprs( + unique int id: @path_type_repr +); + +#keyset[id] +path_type_repr_paths( + int id: @path_type_repr ref, + int path: @path ref +); + +prefix_exprs( + unique int id: @prefix_expr +); + +#keyset[id, index] +prefix_expr_attrs( + int id: @prefix_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +prefix_expr_exprs( + int id: @prefix_expr ref, + int expr: @expr ref +); + +#keyset[id] +prefix_expr_operator_names( + int id: @prefix_expr ref, + string operator_name: string ref +); + +ptr_type_reprs( + unique int id: @ptr_type_repr +); + +#keyset[id] +ptr_type_repr_is_const( + int id: @ptr_type_repr ref +); + +#keyset[id] +ptr_type_repr_is_mut( + int id: @ptr_type_repr ref +); + +#keyset[id] +ptr_type_repr_type_reprs( + int id: @ptr_type_repr ref, + int type_repr: @type_repr ref +); + +range_exprs( + unique int id: @range_expr +); + +#keyset[id, index] +range_expr_attrs( + int id: @range_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +range_expr_ends( + int id: @range_expr ref, + int end: @expr ref +); + +#keyset[id] +range_expr_operator_names( + int id: @range_expr ref, + string operator_name: string ref +); + +#keyset[id] +range_expr_starts( + int id: @range_expr ref, + int start: @expr ref +); + +range_pats( + unique int id: @range_pat +); + +#keyset[id] +range_pat_ends( + int id: @range_pat ref, + int end: @pat ref +); + +#keyset[id] +range_pat_operator_names( + int id: @range_pat ref, + string operator_name: string ref +); + +#keyset[id] +range_pat_starts( + int id: @range_pat ref, + int start: @pat ref +); + +ref_exprs( + unique int id: @ref_expr +); + +#keyset[id, index] +ref_expr_attrs( + int id: @ref_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +ref_expr_exprs( + int id: @ref_expr ref, + int expr: @expr ref +); + +#keyset[id] +ref_expr_is_const( + int id: @ref_expr ref +); + +#keyset[id] +ref_expr_is_mut( + int id: @ref_expr ref +); + +#keyset[id] +ref_expr_is_raw( + int id: @ref_expr ref +); + +ref_pats( + unique int id: @ref_pat +); + +#keyset[id] +ref_pat_is_mut( + int id: @ref_pat ref +); + +#keyset[id] +ref_pat_pats( + int id: @ref_pat ref, + int pat: @pat ref +); + +ref_type_reprs( + unique int id: @ref_type_repr +); + +#keyset[id] +ref_type_repr_is_mut( + int id: @ref_type_repr ref +); + +#keyset[id] +ref_type_repr_lifetimes( + int id: @ref_type_repr ref, + int lifetime: @lifetime ref +); + +#keyset[id] +ref_type_repr_type_reprs( + int id: @ref_type_repr ref, + int type_repr: @type_repr ref +); + +rest_pats( + unique int id: @rest_pat +); + +#keyset[id, index] +rest_pat_attrs( + int id: @rest_pat ref, + int index: int ref, + int attr: @attr ref +); + +return_exprs( + unique int id: @return_expr +); + +#keyset[id, index] +return_expr_attrs( + int id: @return_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +return_expr_exprs( + int id: @return_expr ref, + int expr: @expr ref +); + +self_params( + unique int id: @self_param +); + +#keyset[id] +self_param_is_ref( + int id: @self_param ref +); + +#keyset[id] +self_param_is_mut( + int id: @self_param ref +); + +#keyset[id] +self_param_lifetimes( + int id: @self_param ref, + int lifetime: @lifetime ref +); + +#keyset[id] +self_param_names( + int id: @self_param ref, + int name: @name ref +); + +slice_pats( + unique int id: @slice_pat +); + +#keyset[id, index] +slice_pat_pats( + int id: @slice_pat ref, + int index: int ref, + int pat: @pat ref +); + +slice_type_reprs( + unique int id: @slice_type_repr +); + +#keyset[id] +slice_type_repr_type_reprs( + int id: @slice_type_repr ref, + int type_repr: @type_repr ref +); + +struct_exprs( + unique int id: @struct_expr +); + +#keyset[id] +struct_expr_struct_expr_field_lists( + int id: @struct_expr ref, + int struct_expr_field_list: @struct_expr_field_list ref +); + +struct_field_lists( + unique int id: @struct_field_list +); + +#keyset[id, index] +struct_field_list_fields( + int id: @struct_field_list ref, + int index: int ref, + int field: @struct_field ref +); + +struct_pats( + unique int id: @struct_pat +); + +#keyset[id] +struct_pat_struct_pat_field_lists( + int id: @struct_pat ref, + int struct_pat_field_list: @struct_pat_field_list ref +); + +try_exprs( + unique int id: @try_expr +); + +#keyset[id, index] +try_expr_attrs( + int id: @try_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +try_expr_exprs( + int id: @try_expr ref, + int expr: @expr ref +); + +tuple_exprs( + unique int id: @tuple_expr +); + +#keyset[id, index] +tuple_expr_attrs( + int id: @tuple_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +tuple_expr_fields( + int id: @tuple_expr ref, + int index: int ref, + int field: @expr ref +); + +tuple_field_lists( + unique int id: @tuple_field_list +); + +#keyset[id, index] +tuple_field_list_fields( + int id: @tuple_field_list ref, + int index: int ref, + int field: @tuple_field ref +); + +tuple_pats( + unique int id: @tuple_pat +); + +#keyset[id, index] +tuple_pat_fields( + int id: @tuple_pat ref, + int index: int ref, + int field: @pat ref +); + +tuple_struct_pats( + unique int id: @tuple_struct_pat +); + +#keyset[id, index] +tuple_struct_pat_fields( + int id: @tuple_struct_pat ref, + int index: int ref, + int field: @pat ref +); + +tuple_type_reprs( + unique int id: @tuple_type_repr +); + +#keyset[id, index] +tuple_type_repr_fields( + int id: @tuple_type_repr ref, + int index: int ref, + int field: @type_repr ref +); + +type_args( + unique int id: @type_arg +); + +#keyset[id] +type_arg_type_reprs( + int id: @type_arg ref, + int type_repr: @type_repr ref +); + +type_params( + unique int id: @type_param +); + +#keyset[id, index] +type_param_attrs( + int id: @type_param ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +type_param_default_types( + int id: @type_param ref, + int default_type: @type_repr ref +); + +#keyset[id] +type_param_names( + int id: @type_param ref, + int name: @name ref +); + +#keyset[id] +type_param_type_bound_lists( + int id: @type_param ref, + int type_bound_list: @type_bound_list ref +); + +underscore_exprs( + unique int id: @underscore_expr +); + +#keyset[id, index] +underscore_expr_attrs( + int id: @underscore_expr ref, + int index: int ref, + int attr: @attr ref +); + +variants( + unique int id: @variant +); + +#keyset[id, index] +variant_attrs( + int id: @variant ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +variant_discriminants( + int id: @variant ref, + int discriminant: @expr ref +); + +#keyset[id] +variant_field_lists( + int id: @variant ref, + int field_list: @field_list ref +); + +#keyset[id] +variant_names( + int id: @variant ref, + int name: @name ref +); + +#keyset[id] +variant_visibilities( + int id: @variant ref, + int visibility: @visibility ref +); + +wildcard_pats( + unique int id: @wildcard_pat +); + +yeet_exprs( + unique int id: @yeet_expr +); + +#keyset[id, index] +yeet_expr_attrs( + int id: @yeet_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +yeet_expr_exprs( + int id: @yeet_expr ref, + int expr: @expr ref +); + +yield_exprs( + unique int id: @yield_expr +); + +#keyset[id, index] +yield_expr_attrs( + int id: @yield_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +yield_expr_exprs( + int id: @yield_expr ref, + int expr: @expr ref +); + +@adt = + @enum +| @struct +| @union +; + +#keyset[id, index] +adt_derive_macro_expansions( + int id: @adt ref, + int index: int ref, + int derive_macro_expansion: @macro_items ref +); + +asm_exprs( + unique int id: @asm_expr +); + +#keyset[id, index] +asm_expr_asm_pieces( + int id: @asm_expr ref, + int index: int ref, + int asm_piece: @asm_piece ref +); + +#keyset[id, index] +asm_expr_attrs( + int id: @asm_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +asm_expr_templates( + int id: @asm_expr ref, + int index: int ref, + int template: @expr ref +); + +@assoc_item = + @const +| @function +| @macro_call +| @type_alias +; + +block_exprs( + unique int id: @block_expr +); + +#keyset[id, index] +block_expr_attrs( + int id: @block_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +block_expr_is_async( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_const( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_gen( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_move( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_try( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_unsafe( + int id: @block_expr ref +); + +#keyset[id] +block_expr_stmt_lists( + int id: @block_expr ref, + int stmt_list: @stmt_list ref +); + +call_exprs( + unique int id: @call_expr +); + +#keyset[id] +call_expr_functions( + int id: @call_expr ref, + int function: @expr ref +); + +extern_blocks( + unique int id: @extern_block +); + +#keyset[id] +extern_block_abis( + int id: @extern_block ref, + int abi: @abi ref +); + +#keyset[id, index] +extern_block_attrs( + int id: @extern_block ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +extern_block_extern_item_lists( + int id: @extern_block ref, + int extern_item_list: @extern_item_list ref +); + +#keyset[id] +extern_block_is_unsafe( + int id: @extern_block ref +); + +extern_crates( + unique int id: @extern_crate +); + +#keyset[id, index] +extern_crate_attrs( + int id: @extern_crate ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +extern_crate_identifiers( + int id: @extern_crate ref, + int identifier: @name_ref ref +); + +#keyset[id] +extern_crate_renames( + int id: @extern_crate ref, + int rename: @rename ref +); + +#keyset[id] +extern_crate_visibilities( + int id: @extern_crate ref, + int visibility: @visibility ref +); + +@extern_item = + @function +| @macro_call +| @static +| @type_alias +; + +impls( + unique int id: @impl +); + +#keyset[id] +impl_assoc_item_lists( + int id: @impl ref, + int assoc_item_list: @assoc_item_list ref +); + +#keyset[id, index] +impl_attrs( + int id: @impl ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +impl_generic_param_lists( + int id: @impl ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +impl_is_const( + int id: @impl ref +); + +#keyset[id] +impl_is_default( + int id: @impl ref +); + +#keyset[id] +impl_is_unsafe( + int id: @impl ref +); + +#keyset[id] +impl_self_ties( + int id: @impl ref, + int self_ty: @type_repr ref +); + +#keyset[id] +impl_traits( + int id: @impl ref, + int trait: @type_repr ref +); + +#keyset[id] +impl_visibilities( + int id: @impl ref, + int visibility: @visibility ref +); + +#keyset[id] +impl_where_clauses( + int id: @impl ref, + int where_clause: @where_clause ref +); + +@looping_expr = + @for_expr +| @loop_expr +| @while_expr +; + +#keyset[id] +looping_expr_loop_bodies( + int id: @looping_expr ref, + int loop_body: @block_expr ref +); + +macro_defs( + unique int id: @macro_def +); + +#keyset[id] +macro_def_args( + int id: @macro_def ref, + int args: @token_tree ref +); + +#keyset[id, index] +macro_def_attrs( + int id: @macro_def ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +macro_def_bodies( + int id: @macro_def ref, + int body: @token_tree ref +); + +#keyset[id] +macro_def_names( + int id: @macro_def ref, + int name: @name ref +); + +#keyset[id] +macro_def_visibilities( + int id: @macro_def ref, + int visibility: @visibility ref +); + +macro_rules( + unique int id: @macro_rules +); + +#keyset[id, index] +macro_rules_attrs( + int id: @macro_rules ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +macro_rules_names( + int id: @macro_rules ref, + int name: @name ref +); + +#keyset[id] +macro_rules_token_trees( + int id: @macro_rules ref, + int token_tree: @token_tree ref +); + +#keyset[id] +macro_rules_visibilities( + int id: @macro_rules ref, + int visibility: @visibility ref +); + +method_call_exprs( + unique int id: @method_call_expr +); + +#keyset[id] +method_call_expr_generic_arg_lists( + int id: @method_call_expr ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +method_call_expr_identifiers( + int id: @method_call_expr ref, + int identifier: @name_ref ref +); + +#keyset[id] +method_call_expr_receivers( + int id: @method_call_expr ref, + int receiver: @expr ref +); + +modules( + unique int id: @module +); + +#keyset[id, index] +module_attrs( + int id: @module ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +module_item_lists( + int id: @module ref, + int item_list: @item_list ref +); + +#keyset[id] +module_names( + int id: @module ref, + int name: @name ref +); + +#keyset[id] +module_visibilities( + int id: @module ref, + int visibility: @visibility ref +); + +path_exprs( + unique int id: @path_expr +); + +#keyset[id, index] +path_expr_attrs( + int id: @path_expr ref, + int index: int ref, + int attr: @attr ref +); + +traits( + unique int id: @trait +); + +#keyset[id] +trait_assoc_item_lists( + int id: @trait ref, + int assoc_item_list: @assoc_item_list ref +); + +#keyset[id, index] +trait_attrs( + int id: @trait ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +trait_generic_param_lists( + int id: @trait ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +trait_is_auto( + int id: @trait ref +); + +#keyset[id] +trait_is_unsafe( + int id: @trait ref +); + +#keyset[id] +trait_names( + int id: @trait ref, + int name: @name ref +); + +#keyset[id] +trait_type_bound_lists( + int id: @trait ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +trait_visibilities( + int id: @trait ref, + int visibility: @visibility ref +); + +#keyset[id] +trait_where_clauses( + int id: @trait ref, + int where_clause: @where_clause ref +); + +trait_aliases( + unique int id: @trait_alias +); + +#keyset[id, index] +trait_alias_attrs( + int id: @trait_alias ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +trait_alias_generic_param_lists( + int id: @trait_alias ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +trait_alias_names( + int id: @trait_alias ref, + int name: @name ref +); + +#keyset[id] +trait_alias_type_bound_lists( + int id: @trait_alias ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +trait_alias_visibilities( + int id: @trait_alias ref, + int visibility: @visibility ref +); + +#keyset[id] +trait_alias_where_clauses( + int id: @trait_alias ref, + int where_clause: @where_clause ref +); + +uses( + unique int id: @use +); + +#keyset[id, index] +use_attrs( + int id: @use ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +use_use_trees( + int id: @use ref, + int use_tree: @use_tree ref +); + +#keyset[id] +use_visibilities( + int id: @use ref, + int visibility: @visibility ref +); + +consts( + unique int id: @const +); + +#keyset[id, index] +const_attrs( + int id: @const ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +const_bodies( + int id: @const ref, + int body: @expr ref +); + +#keyset[id] +const_generic_param_lists( + int id: @const ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +const_is_const( + int id: @const ref +); + +#keyset[id] +const_is_default( + int id: @const ref +); + +#keyset[id] +const_names( + int id: @const ref, + int name: @name ref +); + +#keyset[id] +const_type_reprs( + int id: @const ref, + int type_repr: @type_repr ref +); + +#keyset[id] +const_visibilities( + int id: @const ref, + int visibility: @visibility ref +); + +#keyset[id] +const_where_clauses( + int id: @const ref, + int where_clause: @where_clause ref +); + +#keyset[id] +const_has_implementation( + int id: @const ref +); + +enums( + unique int id: @enum +); + +#keyset[id, index] +enum_attrs( + int id: @enum ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +enum_generic_param_lists( + int id: @enum ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +enum_names( + int id: @enum ref, + int name: @name ref +); + +#keyset[id] +enum_variant_lists( + int id: @enum ref, + int variant_list: @variant_list ref +); + +#keyset[id] +enum_visibilities( + int id: @enum ref, + int visibility: @visibility ref +); + +#keyset[id] +enum_where_clauses( + int id: @enum ref, + int where_clause: @where_clause ref +); + +for_exprs( + unique int id: @for_expr +); + +#keyset[id, index] +for_expr_attrs( + int id: @for_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +for_expr_iterables( + int id: @for_expr ref, + int iterable: @expr ref +); + +#keyset[id] +for_expr_pats( + int id: @for_expr ref, + int pat: @pat ref +); + +functions( + unique int id: @function +); + +#keyset[id] +function_abis( + int id: @function ref, + int abi: @abi ref +); + +#keyset[id] +function_function_bodies( + int id: @function ref, + int function_body: @block_expr ref +); + +#keyset[id] +function_generic_param_lists( + int id: @function ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +function_is_async( + int id: @function ref +); + +#keyset[id] +function_is_const( + int id: @function ref +); + +#keyset[id] +function_is_default( + int id: @function ref +); + +#keyset[id] +function_is_gen( + int id: @function ref +); + +#keyset[id] +function_is_unsafe( + int id: @function ref +); + +#keyset[id] +function_names( + int id: @function ref, + int name: @name ref +); + +#keyset[id] +function_ret_types( + int id: @function ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +function_visibilities( + int id: @function ref, + int visibility: @visibility ref +); + +#keyset[id] +function_where_clauses( + int id: @function ref, + int where_clause: @where_clause ref +); + +#keyset[id] +function_has_implementation( + int id: @function ref +); + +loop_exprs( + unique int id: @loop_expr +); + +#keyset[id, index] +loop_expr_attrs( + int id: @loop_expr ref, + int index: int ref, + int attr: @attr ref +); + +macro_calls( + unique int id: @macro_call +); + +#keyset[id, index] +macro_call_attrs( + int id: @macro_call ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +macro_call_paths( + int id: @macro_call ref, + int path: @path ref +); + +#keyset[id] +macro_call_token_trees( + int id: @macro_call ref, + int token_tree: @token_tree ref +); + +#keyset[id] +macro_call_macro_call_expansions( + int id: @macro_call ref, + int macro_call_expansion: @ast_node ref +); + +statics( + unique int id: @static +); + +#keyset[id, index] +static_attrs( + int id: @static ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +static_bodies( + int id: @static ref, + int body: @expr ref +); + +#keyset[id] +static_is_mut( + int id: @static ref +); + +#keyset[id] +static_is_static( + int id: @static ref +); + +#keyset[id] +static_is_unsafe( + int id: @static ref +); + +#keyset[id] +static_names( + int id: @static ref, + int name: @name ref +); + +#keyset[id] +static_type_reprs( + int id: @static ref, + int type_repr: @type_repr ref +); + +#keyset[id] +static_visibilities( + int id: @static ref, + int visibility: @visibility ref +); + +structs( + unique int id: @struct +); + +#keyset[id, index] +struct_attrs( + int id: @struct ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +struct_field_lists_( + int id: @struct ref, + int field_list: @field_list ref +); + +#keyset[id] +struct_generic_param_lists( + int id: @struct ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +struct_names( + int id: @struct ref, + int name: @name ref +); + +#keyset[id] +struct_visibilities( + int id: @struct ref, + int visibility: @visibility ref +); + +#keyset[id] +struct_where_clauses( + int id: @struct ref, + int where_clause: @where_clause ref +); + +type_aliases( + unique int id: @type_alias +); + +#keyset[id, index] +type_alias_attrs( + int id: @type_alias ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +type_alias_generic_param_lists( + int id: @type_alias ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +type_alias_is_default( + int id: @type_alias ref +); + +#keyset[id] +type_alias_names( + int id: @type_alias ref, + int name: @name ref +); + +#keyset[id] +type_alias_type_reprs( + int id: @type_alias ref, + int type_repr: @type_repr ref +); + +#keyset[id] +type_alias_type_bound_lists( + int id: @type_alias ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +type_alias_visibilities( + int id: @type_alias ref, + int visibility: @visibility ref +); + +#keyset[id] +type_alias_where_clauses( + int id: @type_alias ref, + int where_clause: @where_clause ref +); + +unions( + unique int id: @union +); + +#keyset[id, index] +union_attrs( + int id: @union ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +union_generic_param_lists( + int id: @union ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +union_names( + int id: @union ref, + int name: @name ref +); + +#keyset[id] +union_struct_field_lists( + int id: @union ref, + int struct_field_list: @struct_field_list ref +); + +#keyset[id] +union_visibilities( + int id: @union ref, + int visibility: @visibility ref +); + +#keyset[id] +union_where_clauses( + int id: @union ref, + int where_clause: @where_clause ref +); + +while_exprs( + unique int id: @while_expr +); + +#keyset[id, index] +while_expr_attrs( + int id: @while_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +while_expr_conditions( + int id: @while_expr ref, + int condition: @expr ref +); diff --git a/rust/downgrades/e54d01f67a416b3d6eb7b970f27295097f2cac7f/upgrade.properties b/rust/downgrades/e54d01f67a416b3d6eb7b970f27295097f2cac7f/upgrade.properties new file mode 100644 index 00000000000..d753a48ad74 --- /dev/null +++ b/rust/downgrades/e54d01f67a416b3d6eb7b970f27295097f2cac7f/upgrade.properties @@ -0,0 +1,10 @@ +description: Added the `@call_expr_base` union type +compatibility: backwards + +call_expr_arg_lists.rel: delete +call_expr_attrs.rel: delete +method_call_expr_arg_lists.rel: delete +method_call_expr_attrs.rel: delete + +call_expr_base_arg_lists.rel: run upgrade.ql call_expr_base_arg_lists +call_expr_base_attrs.rel: run upgrade.ql call_expr_base_attrs \ No newline at end of file diff --git a/rust/downgrades/e54d01f67a416b3d6eb7b970f27295097f2cac7f/upgrade.ql b/rust/downgrades/e54d01f67a416b3d6eb7b970f27295097f2cac7f/upgrade.ql new file mode 100644 index 00000000000..0ebeae26038 --- /dev/null +++ b/rust/downgrades/e54d01f67a416b3d6eb7b970f27295097f2cac7f/upgrade.ql @@ -0,0 +1,19 @@ +class Element extends @element { + string toString() { none() } +} + +class ArgList extends Element, @arg_list { } + +class Attr extends Element, @attr { } + +query predicate call_expr_base_arg_lists(Element c, ArgList l) { + call_expr_base_arg_lists(c, l) + or + method_call_expr_arg_lists(c, l) +} + +query predicate call_expr_base_attrs(Element c, int i, Attr a) { + call_expr_attrs(c, i, a) + or + method_call_expr_attrs(c, i, a) +} diff --git a/rust/extractor/src/generated/.generated.list b/rust/extractor/src/generated/.generated.list index fa35ec65d4c..578b21fc992 100644 --- a/rust/extractor/src/generated/.generated.list +++ b/rust/extractor/src/generated/.generated.list @@ -1,2 +1,2 @@ mod.rs 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7 -top.rs 460e827738766301a137f1750be7cd3016e6b7e4e487c6c95972bd3e1d21b814 460e827738766301a137f1750be7cd3016e6b7e4e487c6c95972bd3e1d21b814 +top.rs b829c8ab9ec5ff07b997b9ee0b2c333d63e24eddcf7c5fc2b95a9a7f17a84a69 b829c8ab9ec5ff07b997b9ee0b2c333d63e24eddcf7c5fc2b95a9a7f17a84a69 diff --git a/rust/extractor/src/generated/top.rs b/rust/extractor/src/generated/top.rs index 3c4b51c78e6..510f6579d40 100644 --- a/rust/extractor/src/generated/top.rs +++ b/rust/extractor/src/generated/top.rs @@ -4315,44 +4315,66 @@ impl From> for trap::Label { } #[derive(Debug)] -pub struct CallExprBase { - _unused: () +pub struct CallExpr { + pub id: trap::TrapId, + pub arg_list: Option>, + pub attrs: Vec>, + pub function: Option>, } -impl trap::TrapClass for CallExprBase { - fn class_name() -> &'static str { "CallExprBase" } +impl trap::TrapEntry for CallExpr { + fn extract_id(&mut self) -> trap::TrapId { + std::mem::replace(&mut self.id, trap::TrapId::Star) + } + + fn emit(self, id: trap::Label, out: &mut trap::Writer) { + out.add_tuple("call_exprs", vec![id.into()]); + if let Some(v) = self.arg_list { + out.add_tuple("call_expr_arg_lists", vec![id.into(), v.into()]); + } + for (i, v) in self.attrs.into_iter().enumerate() { + out.add_tuple("call_expr_attrs", vec![id.into(), i.into(), v.into()]); + } + if let Some(v) = self.function { + out.add_tuple("call_expr_functions", vec![id.into(), v.into()]); + } + } } -impl From> for trap::Label { - fn from(value: trap::Label) -> Self { - // SAFETY: this is safe because in the dbscheme CallExprBase is a subclass of Expr +impl trap::TrapClass for CallExpr { + fn class_name() -> &'static str { "CallExpr" } +} + +impl From> for trap::Label { + fn from(value: trap::Label) -> Self { + // SAFETY: this is safe because in the dbscheme CallExpr is a subclass of Expr unsafe { Self::from_untyped(value.as_untyped()) } } } -impl From> for trap::Label { - fn from(value: trap::Label) -> Self { - // SAFETY: this is safe because in the dbscheme CallExprBase is a subclass of AstNode +impl From> for trap::Label { + fn from(value: trap::Label) -> Self { + // SAFETY: this is safe because in the dbscheme CallExpr is a subclass of AstNode unsafe { Self::from_untyped(value.as_untyped()) } } } -impl From> for trap::Label { - fn from(value: trap::Label) -> Self { - // SAFETY: this is safe because in the dbscheme CallExprBase is a subclass of Locatable +impl From> for trap::Label { + fn from(value: trap::Label) -> Self { + // SAFETY: this is safe because in the dbscheme CallExpr is a subclass of Locatable unsafe { Self::from_untyped(value.as_untyped()) } } } -impl From> for trap::Label { - fn from(value: trap::Label) -> Self { - // SAFETY: this is safe because in the dbscheme CallExprBase is a subclass of Element +impl From> for trap::Label { + fn from(value: trap::Label) -> Self { + // SAFETY: this is safe because in the dbscheme CallExpr is a subclass of Element unsafe { Self::from_untyped(value.as_untyped()) } @@ -6430,6 +6452,81 @@ impl From> for trap::Label { } } +#[derive(Debug)] +pub struct MethodCallExpr { + pub id: trap::TrapId, + pub arg_list: Option>, + pub attrs: Vec>, + pub generic_arg_list: Option>, + pub identifier: Option>, + pub receiver: Option>, +} + +impl trap::TrapEntry for MethodCallExpr { + fn extract_id(&mut self) -> trap::TrapId { + std::mem::replace(&mut self.id, trap::TrapId::Star) + } + + fn emit(self, id: trap::Label, out: &mut trap::Writer) { + out.add_tuple("method_call_exprs", vec![id.into()]); + if let Some(v) = self.arg_list { + out.add_tuple("method_call_expr_arg_lists", vec![id.into(), v.into()]); + } + for (i, v) in self.attrs.into_iter().enumerate() { + out.add_tuple("method_call_expr_attrs", vec![id.into(), i.into(), v.into()]); + } + if let Some(v) = self.generic_arg_list { + out.add_tuple("method_call_expr_generic_arg_lists", vec![id.into(), v.into()]); + } + if let Some(v) = self.identifier { + out.add_tuple("method_call_expr_identifiers", vec![id.into(), v.into()]); + } + if let Some(v) = self.receiver { + out.add_tuple("method_call_expr_receivers", vec![id.into(), v.into()]); + } + } +} + +impl trap::TrapClass for MethodCallExpr { + fn class_name() -> &'static str { "MethodCallExpr" } +} + +impl From> for trap::Label { + fn from(value: trap::Label) -> Self { + // SAFETY: this is safe because in the dbscheme MethodCallExpr is a subclass of Expr + unsafe { + Self::from_untyped(value.as_untyped()) + } + } +} + +impl From> for trap::Label { + fn from(value: trap::Label) -> Self { + // SAFETY: this is safe because in the dbscheme MethodCallExpr is a subclass of AstNode + unsafe { + Self::from_untyped(value.as_untyped()) + } + } +} + +impl From> for trap::Label { + fn from(value: trap::Label) -> Self { + // SAFETY: this is safe because in the dbscheme MethodCallExpr is a subclass of Locatable + unsafe { + Self::from_untyped(value.as_untyped()) + } + } +} + +impl From> for trap::Label { + fn from(value: trap::Label) -> Self { + // SAFETY: this is safe because in the dbscheme MethodCallExpr is a subclass of Element + unsafe { + Self::from_untyped(value.as_untyped()) + } + } +} + #[derive(Debug)] pub struct NameRef { pub id: trap::TrapId, @@ -9242,82 +9339,6 @@ impl From> for trap::Label { } } -#[derive(Debug)] -pub struct CallExpr { - pub id: trap::TrapId, - pub arg_list: Option>, - pub attrs: Vec>, - pub function: Option>, -} - -impl trap::TrapEntry for CallExpr { - fn extract_id(&mut self) -> trap::TrapId { - std::mem::replace(&mut self.id, trap::TrapId::Star) - } - - fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("call_exprs", vec![id.into()]); - if let Some(v) = self.arg_list { - out.add_tuple("call_expr_base_arg_lists", vec![id.into(), v.into()]); - } - for (i, v) in self.attrs.into_iter().enumerate() { - out.add_tuple("call_expr_base_attrs", vec![id.into(), i.into(), v.into()]); - } - if let Some(v) = self.function { - out.add_tuple("call_expr_functions", vec![id.into(), v.into()]); - } - } -} - -impl trap::TrapClass for CallExpr { - fn class_name() -> &'static str { "CallExpr" } -} - -impl From> for trap::Label { - fn from(value: trap::Label) -> Self { - // SAFETY: this is safe because in the dbscheme CallExpr is a subclass of CallExprBase - unsafe { - Self::from_untyped(value.as_untyped()) - } - } -} - -impl From> for trap::Label { - fn from(value: trap::Label) -> Self { - // SAFETY: this is safe because in the dbscheme CallExpr is a subclass of Expr - unsafe { - Self::from_untyped(value.as_untyped()) - } - } -} - -impl From> for trap::Label { - fn from(value: trap::Label) -> Self { - // SAFETY: this is safe because in the dbscheme CallExpr is a subclass of AstNode - unsafe { - Self::from_untyped(value.as_untyped()) - } - } -} - -impl From> for trap::Label { - fn from(value: trap::Label) -> Self { - // SAFETY: this is safe because in the dbscheme CallExpr is a subclass of Locatable - unsafe { - Self::from_untyped(value.as_untyped()) - } - } -} - -impl From> for trap::Label { - fn from(value: trap::Label) -> Self { - // SAFETY: this is safe because in the dbscheme CallExpr is a subclass of Element - unsafe { - Self::from_untyped(value.as_untyped()) - } - } -} - #[derive(Debug)] pub struct ExternBlock { pub id: trap::TrapId, @@ -9908,90 +9929,6 @@ impl From> for trap::Label { } } -#[derive(Debug)] -pub struct MethodCallExpr { - pub id: trap::TrapId, - pub arg_list: Option>, - pub attrs: Vec>, - pub generic_arg_list: Option>, - pub identifier: Option>, - pub receiver: Option>, -} - -impl trap::TrapEntry for MethodCallExpr { - fn extract_id(&mut self) -> trap::TrapId { - std::mem::replace(&mut self.id, trap::TrapId::Star) - } - - fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("method_call_exprs", vec![id.into()]); - if let Some(v) = self.arg_list { - out.add_tuple("call_expr_base_arg_lists", vec![id.into(), v.into()]); - } - for (i, v) in self.attrs.into_iter().enumerate() { - out.add_tuple("call_expr_base_attrs", vec![id.into(), i.into(), v.into()]); - } - if let Some(v) = self.generic_arg_list { - out.add_tuple("method_call_expr_generic_arg_lists", vec![id.into(), v.into()]); - } - if let Some(v) = self.identifier { - out.add_tuple("method_call_expr_identifiers", vec![id.into(), v.into()]); - } - if let Some(v) = self.receiver { - out.add_tuple("method_call_expr_receivers", vec![id.into(), v.into()]); - } - } -} - -impl trap::TrapClass for MethodCallExpr { - fn class_name() -> &'static str { "MethodCallExpr" } -} - -impl From> for trap::Label { - fn from(value: trap::Label) -> Self { - // SAFETY: this is safe because in the dbscheme MethodCallExpr is a subclass of CallExprBase - unsafe { - Self::from_untyped(value.as_untyped()) - } - } -} - -impl From> for trap::Label { - fn from(value: trap::Label) -> Self { - // SAFETY: this is safe because in the dbscheme MethodCallExpr is a subclass of Expr - unsafe { - Self::from_untyped(value.as_untyped()) - } - } -} - -impl From> for trap::Label { - fn from(value: trap::Label) -> Self { - // SAFETY: this is safe because in the dbscheme MethodCallExpr is a subclass of AstNode - unsafe { - Self::from_untyped(value.as_untyped()) - } - } -} - -impl From> for trap::Label { - fn from(value: trap::Label) -> Self { - // SAFETY: this is safe because in the dbscheme MethodCallExpr is a subclass of Locatable - unsafe { - Self::from_untyped(value.as_untyped()) - } - } -} - -impl From> for trap::Label { - fn from(value: trap::Label) -> Self { - // SAFETY: this is safe because in the dbscheme MethodCallExpr is a subclass of Element - unsafe { - Self::from_untyped(value.as_untyped()) - } - } -} - #[derive(Debug)] pub struct Module { pub id: trap::TrapId, diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index fc9e0d0f30c..7def99275cf 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -1,4 +1,4 @@ -lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll 11c7521ec2231a4d0447f30fc3d0bb14aebb659bd8cf75935af1050673a3b1d6 d0a77b572a032e43f1c47622315c0cdfe17e68c2b057534b9322fc528029fb40 +lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll 1eac5a95247dec5cf51a453788b5bdebcf612590014b1e28f6b6f7e841c96a20 d4d8c9664ca406c3fd14d96a488eea97c42401e2791f41d7248ee5d3f299805c lib/codeql/rust/elements/Abi.qll 485a2e79f6f7bfd1c02a6e795a71e62dede3c3e150149d5f8f18b761253b7208 6159ba175e7ead0dd2e3f2788f49516c306ee11b1a443bd4bdc00b7017d559bd lib/codeql/rust/elements/Addressable.qll 13011bfd2e1556694c3d440cc34af8527da4df49ad92b62f2939d3699ff2cea5 ddb25935f7553a1a384b1abe2e4b4fa90ab50b952dadec32fd867afcb054f4be lib/codeql/rust/elements/Adt.qll c2afed4ac2e17039ccd98f74ea22111f4d765c4e232c50ccd3128da0d26da837 1380bde2eb667c6ec2ef5f8710aa24e926851c9e321ebc72ba514fa92c369dc3 @@ -32,8 +32,7 @@ lib/codeql/rust/elements/BinaryExpr.qll 394522da3bc3a716fc7bc40c3560143ca840f5d2 lib/codeql/rust/elements/BlockExpr.qll b5cf57119b15f27d0bc258dfa375b0ef2730c157870ff543f0dc7a8cfe514182 f6a01999606b010c81ef9c6ff1385e6640632b6f5ce067ffeb0ef0af0a0aeb92 lib/codeql/rust/elements/BoxPat.qll 1b2c3fff171aa6aa238c9460b122f26c79e04577cea67fa856de99842ba873d4 0caf8d23ed6e0997a6b8751def27641582151fba6e24fccf798712a4690b42f1 lib/codeql/rust/elements/BreakExpr.qll 7ca3807a20e9a9a988d1fd7abebf240325ed422fcb45c719ba46272f031f94db dffb7379d3f3ba220acfbd05eb7bb6cfd9cfda211e9c8b1f5240ca5fa61be3fc -lib/codeql/rust/elements/CallExpr.qll f336500ca7a611b164d48b90e80edb0c0d3816792b0ececce659ac1ff1ffeb3e f99a9c55466418ef53860c44d9f2d6161af4b492178ddd9e5870dff742b70ae5 -lib/codeql/rust/elements/CallExprBase.qll 2846202b5208b541977500286951d96487bf555838c6c16cdd006a71e383745a c789d412bf099c624329379e0c7d94fa0d23ae2edea7a25a2ea0f3c0042ccf62 +lib/codeql/rust/elements/CallExpr.qll ee3997f265dc1b6b2fc7134548dd88d509b6bcbc26cf65061a31980f9900ae26 7e86e0ab24ce78c3f592a5614eac083d00f331664f021a438f74e2e0785f4609 lib/codeql/rust/elements/Callable.qll 08a46e987b8fde29069795a536fcd1ad1a96f60341f72293e4d07e20334d554f cfc2be9287000718e5ff3c2a35bb45ffc93fd36d97f2e034888e9aa2ae9af555 lib/codeql/rust/elements/CastExpr.qll 2fe1f36ba31fa29de309baf0a665cfcae67b61c73345e8f9bbd41e8c235fec45 c5b4c1e9dc24eb2357799defcb2df25989075e3a80e8663b74204a1c1b70e29a lib/codeql/rust/elements/ClosureExpr.qll 69e0b7a7c7a4c348fcada5ad4da22dd2f51747109f856be239cede315a56d695 93400650282e2d4e682b826e9f5f844aa893dda126548e41ea1c703d2bf209ca @@ -103,7 +102,7 @@ lib/codeql/rust/elements/MatchArmList.qll f221c5e344814fa44db06ab897afdc249e8e88 lib/codeql/rust/elements/MatchExpr.qll e9ef1664f020823b6f4bb72d906a9dc0c1ee6432d4a9a13f7dbdbab2b2b1ee4d 38d71e5c487abcb5682293c573343be66e499a6e131bb630604c120d34b7777b lib/codeql/rust/elements/MatchGuard.qll 58256689a90f24b16401543452c2a32f00d619ddac6c0fe8b65a8cd3e46401bb 8efb2ac03c69a9db687e382331085d7a6cfbf8eca559174ba2727a9549ec7ddd lib/codeql/rust/elements/Meta.qll b17d7bf605bd0cf4f6d6c6cf4f39a16cfc431d256d45b93663a7569181d36168 815cdfef06231de4b4b1c85e321b8ccb3e22379e5a4e111df9cc9ca6be593841 -lib/codeql/rust/elements/MethodCallExpr.qll 91b411e0fb1a0547dcad8726db460dccc61bed972741598d5cb3740593fe75a7 538d23b6db115bb699389d29a1829bb0449c08424a1fff80377828eb7ceb2563 +lib/codeql/rust/elements/MethodCallExpr.qll 914633f304c587addced988a7f161a1a4b3297ce370f6a959b7a042b1c04dace 289a0854d6323df915ee5f268523ee597ba20a37c646bbb2a79c9ed1f7aa2260 lib/codeql/rust/elements/Missing.qll 70e6ac9790314752849c9888443c98223ccfc93a193998b7ce350b2c6ebe8ea4 e2f0623511acaa76b091f748d417714137a8b94f1f2bdbbd177f1c682c786dad lib/codeql/rust/elements/Module.qll 0bc85019177709256f8078d9de2a36f62f848d476225bff7bba1e35f249875c7 3fbb70e0c417a644dd0cada2c364c6e6876cfa16f37960e219c87e49c966c94e lib/codeql/rust/elements/Name.qll af41479d4260fe931d46154dda15484e4733c952b98f0e370106e6e9e8ce398b e188a0d0309dd1b684c0cb88df435b38e306eb94d6b66a2b748e75252f15e095 @@ -160,8 +159,8 @@ lib/codeql/rust/elements/Trait.qll f78a917c2f2e5a0dfcd7c36e95ad67b1fa218484ee509 lib/codeql/rust/elements/TraitAlias.qll 1d82d043f24dbac04baa7aa3882c6884b8ffbc5d9b97669ce8efb7e2c8d3d2c8 505ba5426e87b3c49721f440fbc9ad6b0e7d89d1b1a51ca3fa3a6cc2d36f8b82 lib/codeql/rust/elements/TryExpr.qll cb452f53292a1396139f64a35f05bb11501f6b363f8affc9f2d5f1945ad4a647 d60ad731bfe256d0f0b688bdc31708759a3d990c11dee4f1d85ccc0d9e07bec9 lib/codeql/rust/elements/TupleExpr.qll 1b1be270198f9d3db1c28c4caaa4a7fe9b5ae14651f1a10e2891a7d78d6ad18b 4f585aa684dfbff753e342903ddd60ee4d7c374b8bddeb645784d10903c90ae0 -lib/codeql/rust/elements/TupleField.qll e20a991f7f1322cc7c05b2a8946d5017edb119812efa3e44daa94a5dff2d0c7b 8c25c9577fef8b5b9a4b285ceb7cfffcd8d89448035b1967cd7fda1503adfe13 -lib/codeql/rust/elements/TupleFieldList.qll b67cd2dec918d09e582467e5db7a38c8fa18350af591b43a1b450cd2026dbb67 22fdd1e77c16e3be4627ee7a45985b94785492d36056eeeff2c94b43450b48c8 +lib/codeql/rust/elements/TupleField.qll 8d6288fd79959d5ef3732397c0a05a47fcb09091383058d1dba7268a950f8c32 1518cdd0fd9746d09fcdbecabc2a3ce6b36b6d983883850beed3f55c2bdf2c16 +lib/codeql/rust/elements/TupleFieldList.qll 2fa47599f78aa4639a40239cf49bc2f97d84118125b949c71fec4390589caaf0 3f71a86e38bdc6fe9f0c082a43d763c4f34b4bdab99c383cdc5d8b59e887cee0 lib/codeql/rust/elements/TuplePat.qll 028cdea43868b0fdd2fc4c31ff25b6bbb40813e8aaccf72186051a280db7632e 38c56187971671e6a9dd0c6ccccb2ee4470aa82852110c6b89884496eb4abc64 lib/codeql/rust/elements/TupleStructPat.qll da398a23eb616bf7dd586b2a87f4ab00f28623418f081cd7b1cc3de497ef1819 6573bf3f8501c30af3aeb23d96db9f5bea7ab73e2b7ef3473095c03e96c20a5c lib/codeql/rust/elements/TupleTypeRepr.qll 1ac5abf6281ea31680a4098407fbe55459d08f92a50dec20d1f8b93d498eee41 6d9625cce4e4abf6b6e6c22e47880fbd23740d07b621137bd7fa0a2ee13badd9 @@ -406,7 +405,7 @@ lib/codeql/rust/elements/internal/TupleExprConstructor.qll 71c38786723225d3d9039 lib/codeql/rust/elements/internal/TupleExprImpl.qll daabbc7dd36c615cdd8d3b59e06f4992a302b26554115711f733508836887abe 4c43a26e5f8b68d9d032bb5cd0af88cf9ac9b4b4e40af47dc85dd931ce9db6f8 lib/codeql/rust/elements/internal/TupleFieldConstructor.qll 89d3cf2540235044ed5a89706cfbdebc5cdf9180fd5b6d3376c79a1b2c0430c0 16861fe089aac8e42a5a90d81dd48d5015391d0a06c78ca02bd876d65378699f lib/codeql/rust/elements/internal/TupleFieldListConstructor.qll 4335ba2061b6e4968db9ec05c0b4d3e6a564db89a2df69e036f317672a7900b1 0b8dded875dbf696cf588e8c21acc27332a2ff66ced7bfabdfc1ad621991f888 -lib/codeql/rust/elements/internal/TupleFieldListImpl.qll 74869e92a3cbdd7895adaaa418d29d5e97387daf46c17315f219ad967af15d76 5815e4b37db958663df1f6fedc9667a11b261c9c2133e3f983a3aedc452c01fc +lib/codeql/rust/elements/internal/TupleFieldListImpl.qll 2e5141d5894d1cebadef9cd3afe7585779327c4e24390201e1ef05a29401caf8 bbfa1e0b513393012bf2ae43a3aa0e33fce6ea4d110d1be0f039562071f3c547 lib/codeql/rust/elements/internal/TuplePatConstructor.qll 2a5e83ad5b8713a732e610128aeddf14e9b344402d6cf30ff0b43aa39e838418 6d467f7141307523994f03ed7b8e8b1a5bcf860963c9934b90e54582ea38096a lib/codeql/rust/elements/internal/TupleStructPatConstructor.qll 9d68f67a17a5cec0e78907a53eccfa7696be5b0571da4b486c8184274e56344a 3ffa29f546cd6c644be4fecc7415477a3a4dc00d69b8764be9119abe4c6d8b9e lib/codeql/rust/elements/internal/TupleTypeReprConstructor.qll 80c31c25fd27e330690fb500d757a4bbd33f226186d88ea73bfe4cf29a7db508 d572a72fa361990a3d0a3f9b81d1e966e2ba1ac0a60314ec824c1b8b2814c857 @@ -434,7 +433,6 @@ lib/codeql/rust/elements/internal/VariantConstructor.qll 0297d4a9a9b32448d6d6063 lib/codeql/rust/elements/internal/VariantListConstructor.qll c841fb345eb46ea3978a0ed7a689f8955efc9178044b140b74d98a6bcd0c926a c9e52d112abdba2b60013fa01a944c8770766bf7368f9878e6b13daaa4eed446 lib/codeql/rust/elements/internal/VariantListImpl.qll 4ceeda617696eb547c707589ba26103cf4c5c3d889955531be24cbf224e79dff 4258196c126fd2fad0e18068cb3d570a67034a8b26e2f13f8223d7f1a246d1a4 lib/codeql/rust/elements/internal/VisibilityConstructor.qll 1fd30663d87945f08d15cfaca54f586a658f26b7a98ea45ac73a35d36d4f65d0 6ddaf11742cc8fbbe03af2aa578394041ae077911e62d2fa6c885ae0543ba53a -lib/codeql/rust/elements/internal/VisibilityImpl.qll 85c1e75d6a7f9246cfef5c261e2aea40891c016724de49b3d6632623ccc30dcf 278be4648a8aefb0d926480c4d98e1605196ad64d1e4dbad42aa58499e6d485d lib/codeql/rust/elements/internal/WhereClauseConstructor.qll 6d6f0f0376cf45fac37ea0c7c4345d08718d2a3d6d913e591de1de9e640317c9 ff690f3d4391e5f1fae6e9014365810105e8befe9d6b52a82625994319af9ffd lib/codeql/rust/elements/internal/WhereClauseImpl.qll 006e330df395183d15896e5f81128e24b8274d849fe45afb5040444e4b764226 ed5e8317b5f33104e5c322588dc400755c8852bbb77ef835177b13af7480fd43 lib/codeql/rust/elements/internal/WherePredConstructor.qll f331c37085792a01159e8c218e9ef827e80e99b7c3d5978b6489808f05bd11f8 179cad3e4c5aaaf27755891694ef3569322fcf34c5290e6af49e5b5e3f8aa732 @@ -479,8 +477,7 @@ lib/codeql/rust/elements/internal/generated/BinaryExpr.qll 64e9bd9c571edd6e5f3e7 lib/codeql/rust/elements/internal/generated/BlockExpr.qll 5a5ddbe34bc478a7bd9b0d07d3b6f017c2d1f20581d859251a963314e6514d1f 9804c30b8b279038b864c52557535f854bd012bacdfe8e5840f1f777c74e52df lib/codeql/rust/elements/internal/generated/BoxPat.qll 597bed52f7489e0addce3266f7bee5be7c53d2d1263eceec3a252d041ca0908f b8ccf363ca5f1a988547caf1fd266a55aec7cbf8623578deea99765d264b0151 lib/codeql/rust/elements/internal/generated/BreakExpr.qll 0f428a8b2f4209b134c2ffc3e1c93c30bc6b0e9c9172f140cefa88c1f77d8690 957b39f38ff6befe9061f55bc0b403c2f1c366dd0cf63b874bae6f8216576d76 -lib/codeql/rust/elements/internal/generated/CallExpr.qll f1b8dae487077cc9d1dccf8c3cd61fd17afe860585f17ce8b860be4859be7ca4 6034fc03778e38802cdf3a6e460364b74e92912622581b31e6179951022bbbd6 -lib/codeql/rust/elements/internal/generated/CallExprBase.qll 2268e01d65015014c05166161bb28e5a1e78164d525ca16fc1e3106866cf231d b2f9b912153ba4d3e3612df4f74ac0e83077c31d5b31383bd277974081417a56 +lib/codeql/rust/elements/internal/generated/CallExpr.qll 6096035ba2ef1ce3e6254d5b8497dcb6cd7570253423c778a9dd7e158f928644 e56caf9ba094ddfc4952ed5072c5f6f139db8029fa6bd6328d1a118e96a1d5fe lib/codeql/rust/elements/internal/generated/Callable.qll 12368b998c771c6b80f54123cea4d3600af7432ab34c9e571bc0bf3894ceb17e 273a9fd9cdae56cf2edbdc9c49b15da49cd5ad04be70acbbe2475c9c50200183 lib/codeql/rust/elements/internal/generated/CastExpr.qll ddc20054b0b339ad4d40298f3461490d25d00af87c876da5ffbc6a11c0832295 f4247307afcd74d80e926f29f8c57e78c50800984483e6b6003a44681e4a71f3 lib/codeql/rust/elements/internal/generated/ClosureExpr.qll 818aff75d86821c670d8ba0720c3270681b3e070140a9c41beab2a811b43eee6 9bf2d1d38f6c4a99d7c058f8ed096141f5ba6a75d2d26a464f0d65ed4e554222 @@ -551,7 +548,7 @@ lib/codeql/rust/elements/internal/generated/MatchArmList.qll 12d969ecb267a749918 lib/codeql/rust/elements/internal/generated/MatchExpr.qll b686842e7000fd61e3a0598bf245fb4e18167b99eca9162fdfdff0b0963def22 00f1743b1b0f1a92c5a687f5260fda02d80cc5871694cad0d5e7d94bac7fe977 lib/codeql/rust/elements/internal/generated/MatchGuard.qll 58fa1d6979ef22de2bd68574c7ffcf4a021d7543445f68834d879ff8cee3abcb 072f22a7929df3c0e764b2a770b4cdf03504b3053067d9b9008d6655fb5837e1 lib/codeql/rust/elements/internal/generated/Meta.qll 15e98e8d38f5618b7053057a629b135aae5e105fbf72731833a644fb695244c0 2977b6a0781c89383e87c595b14a39851f27b2508296f3e77466eea44c916188 -lib/codeql/rust/elements/internal/generated/MethodCallExpr.qll 0cd0f84147e5f3887d609cc58246eb493d3461aee00ff37e7d26282c835f73af 6f4c5dc1decbce54fc12300d34798b890a85129208b25565130205c9d8ee2e29 +lib/codeql/rust/elements/internal/generated/MethodCallExpr.qll ffce98a6a1921822b12ead721cff0878553eb3e049c5d2184a7abce32b6615b4 d1408a0f47ee5764fe7b484494daf6e1f99b1c6a505274c48545b3e650ef8baf lib/codeql/rust/elements/internal/generated/Missing.qll 16735d91df04a4e1ae52fae25db5f59a044e540755734bbab46b5fbb0fe6b0bd 28ca4e49fb7e6b4734be2f2f69e7c224c570344cc160ef80c5a5cd413e750dad lib/codeql/rust/elements/internal/generated/Module.qll ebae5d8963c9fd569c0fbad1d7770abd3fd2479437f236cbce0505ba9f9af52c fa3c382115fed18a26f1a755d8749a201b9489f82c09448a88fb8e9e1435fe5f lib/codeql/rust/elements/internal/generated/Name.qll e6bd6240a051383a52b21ab539bc204ce7bcd51a1a4379e497dff008d4eef5b4 578a3b45e70f519d57b3e3a3450f6272716c849940daee49889717c7aaa85fc9 @@ -566,7 +563,7 @@ lib/codeql/rust/elements/internal/generated/ParamList.qll eaa0cd4402d3665013d47e lib/codeql/rust/elements/internal/generated/ParenExpr.qll 812d2ff65079277f39f15c084657a955a960a7c1c0e96dd60472a58d56b945eb eb8c607f43e1fcbb41f37a10de203a1db806690e10ff4f04d48ed874189cb0eb lib/codeql/rust/elements/internal/generated/ParenPat.qll 24f9dc7fce75827d6fddb856cd48f80168143151b27295c0bab6db5a06567a09 ebadbc6f5498e9ed754b39893ce0763840409a0721036a25b56e1ead7dcc09aa lib/codeql/rust/elements/internal/generated/ParenTypeRepr.qll 03f5c5b96a37adeb845352d7fcea3e098da9050e534972d14ac0f70d60a2d776 ed3d6e5d02086523087adebce4e89e35461eb95f2a66d1d4100fe23fc691b126 -lib/codeql/rust/elements/internal/generated/ParentChild.qll f04ca3d02170f7e532a480cc81748cf04f1b022d5e0e32ffcdf0f15c8f1961aa 999104d69a5435c9cab594e04b82ed26ae38b1b1d2ac1dbbb315a433c586f941 +lib/codeql/rust/elements/internal/generated/ParentChild.qll 8a6e4335bcf6f7d72f5ed6ffba5448ae88b00323fe7dac6f406c8746c03ef2dc 867a0fb166b53d7a8218a02d671f117ba7ea4e67cb16abeea6e746dc5823b85e lib/codeql/rust/elements/internal/generated/ParenthesizedArgList.qll d901fdc8142a5b8847cc98fc2afcfd16428b8ace4fbffb457e761b5fd3901a77 5dbb0aea5a13f937da666ccb042494af8f11e776ade1459d16b70a4dd193f9fb lib/codeql/rust/elements/internal/generated/Pat.qll 3605ac062be2f294ee73336e9669027b8b655f4ad55660e1eab35266275154ee 7f9400db2884d336dd1d21df2a8093759c2a110be9bf6482ce8e80ae0fd74ed4 lib/codeql/rust/elements/internal/generated/Path.qll 9b12afb46fc5a9ad3a811b05472621bbecccb900c47504feb7f29d96b28421ca bcacbffc36fb3e0c9b26523b5963af0ffa9fd6b19f00a2a31bdb2316071546bd @@ -581,7 +578,7 @@ lib/codeql/rust/elements/internal/generated/PtrTypeRepr.qll 8d0ea4f6c7f8203340bf lib/codeql/rust/elements/internal/generated/PureSynthConstructors.qll e5b8e69519012bbaae29dcb82d53f7f7ecce368c0358ec27ef6180b228a0057f e5b8e69519012bbaae29dcb82d53f7f7ecce368c0358ec27ef6180b228a0057f lib/codeql/rust/elements/internal/generated/RangeExpr.qll 23cca03bf43535f33b22a38894f70d669787be4e4f5b8fe5c8f7b964d30e9027 18624cef6c6b679eeace2a98737e472432e0ead354cca02192b4d45330f047c9 lib/codeql/rust/elements/internal/generated/RangePat.qll 80826a6a6868a803aa2372e31c52a03e1811a3f1f2abdb469f91ca0bfdd9ecb6 34ee1e208c1690cba505dff2c588837c0cd91e185e2a87d1fe673191962276a9 -lib/codeql/rust/elements/internal/generated/Raw.qll 14758dc2e2a9af251f24e24516eab0fc95d334c1da06f418ea5da3c5521642c9 a8b6637f57293a85714cc8761f8fd1e23780d58f3873acaa3c77acd9cbfcf19f +lib/codeql/rust/elements/internal/generated/Raw.qll f207067167f8597ddf6de483372fc9e281d1661d3fc0a5da0d6d6bd7e32aa9c7 1c27c65c3ab4d07553bbd269c6737576feca3f5c29c8b02f81a0d65c209d4621 lib/codeql/rust/elements/internal/generated/RefExpr.qll 7d995884e3dc1c25fc719f5d7253179344d63650e217e9ff6530285fe7a57f64 f2c3c12551deea4964b66553fb9b6423ee16fec53bd63db4796191aa60dc6c66 lib/codeql/rust/elements/internal/generated/RefPat.qll 456ede39837463ee22a630ec7ab6c8630d3664a8ea206fcc6e4f199e92fa564c 5622062765f32930465ba6b170e986706f159f6070f48adee3c20e24e8df4e05 lib/codeql/rust/elements/internal/generated/RefTypeRepr.qll 5b0663a6d234572fb3e467e276d019415caa95ef006438cc59b7af4e1783161e 0e27c8a8f0e323c0e4d6db01fca821bf07c0864d293cdf96fa891b10820c1e4b @@ -606,7 +603,7 @@ lib/codeql/rust/elements/internal/generated/StructFieldList.qll 5da528a51a6a5db9 lib/codeql/rust/elements/internal/generated/StructPat.qll c76fa005c2fd0448a8803233e1e8818c4123301eb66ac5cf69d0b9eaafc61e98 6e0dffccdce24bca20e87d5ba0f0995c9a1ae8983283e71e7dbfcf6fffc67a58 lib/codeql/rust/elements/internal/generated/StructPatField.qll 5b5c7302dbc4a902ca8e69ff31875c867e295a16a626ba3cef29cd0aa248f179 4e192a0df79947f5cb0d47fdbbba7986137a6a40a1be92ae119873e2fad67edf lib/codeql/rust/elements/internal/generated/StructPatFieldList.qll 1a95a1bd9f64fb18e9571657cf2d02a8b13c747048a1f0f74baf31b91f0392ad fc274e414ff4ed54386046505920de92755ad0b4d39a7523cdffa4830bd53b37 -lib/codeql/rust/elements/internal/generated/Synth.qll a8ea364358a2bc3a9226d451c0867e89c29509a0f54dd88ed23c77045db2c85a a44de5e84a63cb5a1bfa66b0df33bf28c9f8b6628393d0f3b2f6215dabee47bd +lib/codeql/rust/elements/internal/generated/Synth.qll 61147c264e863dc5234b391ad2b7a01e0a2fe99e18ea237ba06e31340fd0a50a 6d33624a9b571d05aba1e9459a211f75b762e72fa716259abcd994f5098e15a6 lib/codeql/rust/elements/internal/generated/SynthConstructors.qll f41abfc73415b7accb38da7c107faebfe6843c270ad54e0e54a96e930dfe479a f41abfc73415b7accb38da7c107faebfe6843c270ad54e0e54a96e930dfe479a lib/codeql/rust/elements/internal/generated/Token.qll 77a91a25ca5669703cf3a4353b591cef4d72caa6b0b9db07bb9e005d69c848d1 2fdffc4882ed3a6ca9ac6d1fb5f1ac5a471ca703e2ffdc642885fa558d6e373b lib/codeql/rust/elements/internal/generated/TokenTree.qll 1a3c4f5f30659738641abdd28cb793dab3cfde484196b59656fc0a2767e53511 de2ebb210c7759ef7a6f7ee9f805e1cac879221287281775fc80ba34a5492edf @@ -614,8 +611,8 @@ lib/codeql/rust/elements/internal/generated/Trait.qll 8fa41b50fa0f68333534f2b66b lib/codeql/rust/elements/internal/generated/TraitAlias.qll 40a296cf89eceaf02a32db90acb42bdc90df10e717bae3ab95bc09d842360a5b af85cf1f8fa46a8b04b763cdcacc6643b83c074c58c1344e485157d2ceb26306 lib/codeql/rust/elements/internal/generated/TryExpr.qll 73052d7d309427a30019ad962ee332d22e7e48b9cc98ee60261ca2df2f433f93 d9dd70bf69eaa22475acd78bea504341e3574742a51ad9118566f39038a02d85 lib/codeql/rust/elements/internal/generated/TupleExpr.qll 98f10bc72d09f98e3be87f41b1a3cbf037f4a7e3d3560dfa6d5759905a8177a5 6a9eb5568c518876b2912371e2b7b774cf5245097c5a0206eda35b749995f00b -lib/codeql/rust/elements/internal/generated/TupleField.qll d546b4e0c1a0b243c2bf88b371377cf9a396ca497cd5e78915e0e552910b6093 c0a754d15e0de590ee15139d8d366e4d7e4d33882c943e6ea8fa5fa8dce790e3 -lib/codeql/rust/elements/internal/generated/TupleFieldList.qll fb76d1a395326361859177c05e90e5bbb22d37518758752e9d89906006fb683e f31508b120c36f569cc7dcae06c9e55cf875abfb2fbe54a64ec12d8b3d2db108 +lib/codeql/rust/elements/internal/generated/TupleField.qll 121f7b35e28b86592f83e00993f9041acbe7ab636db894d03055149c7f15fd32 b1ba9e1182307a44bb5afc11e92d62e7eb2c819ccdfb28ef54943b6fec676827 +lib/codeql/rust/elements/internal/generated/TupleFieldList.qll e7874518ce353f58312b02fb646f19eb109b3d868f8b550c84b7d6fc3a85fd5a f4bff793bbdbc252688296953116146f5c9a0894e14a7d3e4883a5ac211c122f lib/codeql/rust/elements/internal/generated/TuplePat.qll 4e13b509e1c9dd1581a9dc50d38e0a6e36abc1254ea9c732b5b3e6503335afeb 298028df9eb84e106e625ed09d6b20038ad47bfc2faf634a0ffea50b17b5805d lib/codeql/rust/elements/internal/generated/TupleStructPat.qll 6539d0edbdc16e7df849514d51980d4cd1a2c9cbb58ca9e5273851f96df4eb36 45a13bae5220d5737cbd04713a17af5b33d8bb4cfdf17ddd64b298ab0c1eea24 lib/codeql/rust/elements/internal/generated/TupleTypeRepr.qll 1756cdbad56d634bf4726bc39c768386754e62650492d7d6344012038236a05b 3ac0997a47f95f28cc70c782173ce345fcb5b073be10f3c0b414d1df8443e04c @@ -643,7 +640,7 @@ lib/codeql/rust/elements/internal/generated/WhileExpr.qll 0353aab87c49569e1fbf58 lib/codeql/rust/elements/internal/generated/WildcardPat.qll d74b70b57a0a66bfae017a329352a5b27a6b9e73dd5521d627f680e810c6c59e 4b913b548ba27ff3c82fcd32cf996ff329cb57d176d3bebd0fcef394486ea499 lib/codeql/rust/elements/internal/generated/YeetExpr.qll cac328200872a35337b4bcb15c851afb4743f82c080f9738d295571eb01d7392 94af734eea08129b587fed849b643e7572800e8330c0b57d727d41abda47930b lib/codeql/rust/elements/internal/generated/YieldExpr.qll 37e5f0c1e373a22bbc53d8b7f2c0e1f476e5be5080b8437c5e964f4e83fad79a 4a9a68643401637bf48e5c2b2f74a6bf0ddcb4ff76f6bffb61d436b685621e85 -lib/codeql/rust/elements.qll d3beb3a35f2b5ea47d60aeefd86fb0d6406dd0a1b7cd89aecbb2732b4e72da38 d3beb3a35f2b5ea47d60aeefd86fb0d6406dd0a1b7cd89aecbb2732b4e72da38 +lib/codeql/rust/elements.qll 5cc722db81259ee5d5b9cbed1a4d2795060ad996c80fd7121e7ce43dc392b62f 5cc722db81259ee5d5b9cbed1a4d2795060ad996c80fd7121e7ce43dc392b62f test/extractor-tests/generated/Abi/Abi.ql 086ed104ab1a7e7fe5c1ed29e03f1719a797c7096c738868bf6ebe872ab8fdaa fe23fe67ab0d9201e1177ea3f844b18ed428e13e3ce77381bf2b6910adfa3a0e test/extractor-tests/generated/ArgList/ArgList.ql da97b5b25418b2aa8cb8df793f48870c89fa00759cdade8ddba60d7f1f4bbc01 acfd5d2caf67282ad2d57b961068472100482d0f770a52a3c00214c647d18c75 test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.ql 42b365276aa43e2cad588338463542d3ce1dd0db3a428621554584b07a1431d5 08a66a8b69af35ee3bc64c35c453a19a6c9881cc6cc7e65275d1fff056121270 @@ -669,7 +666,7 @@ test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql 4e849e6eaae581f487aa74d0 test/extractor-tests/generated/BlockExpr/BlockExpr.ql cd6ef66de9e56ebb74964e59617d47999fb8c9081e885acece17a3b747a35ae1 6766844c1b87e518688565f2469575af5ca4e0ff4eb0c0b620df73a451d86a0b test/extractor-tests/generated/BoxPat/BoxPat.ql 854c9ba4e045dbe7ea1666866c1c443a92597df0ce02f4ca5993142925941c39 a22c17cce0bff7d1df51b817d2cb1a61045357f91be14465166971efa5f5daad test/extractor-tests/generated/BreakExpr/BreakExpr.ql c2181211da3dfe983cfca93ead32d5d211e91181899b9477152c58124eaa846d 57e57b926e14db2efb2e88e04699608b2ba9797ee4f6c4f710135b6858982256 -test/extractor-tests/generated/CallExpr/CallExpr.ql 2a1cd4485ccd8d4eb24a75889e832612adef9bb7feae414c90572796380bc6d7 95060b92aa04d7ad1fc6603c5ec14a275a5788ecb5a19932732e28105607a3b7 +test/extractor-tests/generated/CallExpr/CallExpr.ql 16d85d6e5cb68384d0b932fb4506c1855019b819f2c5faa39a4472f39427623a 14df8383948cedaff88f514f7239c1ec8c424720d24e3546cbcd0b689acecdb1 test/extractor-tests/generated/CastExpr/CastExpr.ql 3480ec51072399409b7553ab6139c832db6ed4ca991f3a7a2282a39afe07c6f2 614c8ea7a2fe30d57583dbf84ed7a12743c2aba49d8c6252d31af3ed10853a39 test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql 675ae07193241fbd710ece4f74f86e9b00f47841299b1c5934f55dbf13a4b4af 21fb0664619c9c889e9491bfd651c2814dcf0f158dd6269937bd0acc18be6b0e test/extractor-tests/generated/Comment/Comment.ql 0e0454911d2cf2e7ef5c6d860b84c57b9d490090914ebcf4fa0e8a70f777f066 cbd1c195276ef163f8d3c122344738c884dc9fb70eb2f9b7067829d735d48c4c @@ -728,7 +725,7 @@ test/extractor-tests/generated/MatchArmList/MatchArmList.ql bbc679fe6d8dedf9131d test/extractor-tests/generated/MatchExpr/MatchExpr.ql b75a5936401bb5ca38686f1413f5c8267ad685722560a2e9041dacf2f8d54abc 7da57118fe5b1f7f5cbe8d6b5f3ae70816fd4837b1c2e6401b98175b36ca233f test/extractor-tests/generated/MatchGuard/MatchGuard.ql 91de18a0a18d120db568b2c329e5cb26f83e327cf22c5825c555ea17249d7d23 0bcdb25895362128517227c860b9dad76851215c2cdf9b2d0e5cc3534278f4ec test/extractor-tests/generated/Meta/Meta.ql 43dd1cd669099b38396b316616992af6d84b0c1cee953b19235a00ab3d3bb43c 80b1885809aa074357e21707d1f8c6dca19f0b968ccff43229bb0d5c6fffb2b2 -test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql 05ca29fdab8ce600469728b964c369368e5097b2a5eb35b84a7630ef044ac6b6 aa45fdbb7fba8afee9f6cef10d337622429d3f0fb71f7fbf861afb4906bdef71 +test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql 9d5af6b4771a8725fa5b56ccb3e2a33158b18c876546b88e6dc63da1f887910a 494c8c2fe5584aac45c828b38d8bb20c113927a1e909773d4a2dbd3965d26170 test/extractor-tests/generated/Module/Module.ql d7c442fd1b1f4f00da87e2228fc1aeeab0bb86648b2aa06a9dd6f40dbae1ee28 3229388727d14048e87238bcda5fde1bed503e5cac088922381e5833cfc32fa9 test/extractor-tests/generated/Name/Name.ql b2fe417f7c816f71d12622b4f84ece74eba3c128c806266a55b53f8120fa4fb3 8bc65bbf3f2909637485f5db7830d6fc110a94c9b12eefe12d7627f41eae2256 test/extractor-tests/generated/NameRef/NameRef.ql 210a70e0957f3444195eed3a3dfbb5806e349238c0b390dc00597e6b8b05fcec d74fbce3c71aa7b08ae4cb646ccb114335767cb4fe000322f9dd371c1bb3784f diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index 99728972ec7..22c7d3a1549 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -35,7 +35,6 @@ /lib/codeql/rust/elements/BoxPat.qll linguist-generated /lib/codeql/rust/elements/BreakExpr.qll linguist-generated /lib/codeql/rust/elements/CallExpr.qll linguist-generated -/lib/codeql/rust/elements/CallExprBase.qll linguist-generated /lib/codeql/rust/elements/Callable.qll linguist-generated /lib/codeql/rust/elements/CastExpr.qll linguist-generated /lib/codeql/rust/elements/ClosureExpr.qll linguist-generated @@ -436,7 +435,6 @@ /lib/codeql/rust/elements/internal/VariantListConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/VariantListImpl.qll linguist-generated /lib/codeql/rust/elements/internal/VisibilityConstructor.qll linguist-generated -/lib/codeql/rust/elements/internal/VisibilityImpl.qll linguist-generated /lib/codeql/rust/elements/internal/WhereClauseConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/WhereClauseImpl.qll linguist-generated /lib/codeql/rust/elements/internal/WherePredConstructor.qll linguist-generated @@ -482,7 +480,6 @@ /lib/codeql/rust/elements/internal/generated/BoxPat.qll linguist-generated /lib/codeql/rust/elements/internal/generated/BreakExpr.qll linguist-generated /lib/codeql/rust/elements/internal/generated/CallExpr.qll linguist-generated -/lib/codeql/rust/elements/internal/generated/CallExprBase.qll linguist-generated /lib/codeql/rust/elements/internal/generated/Callable.qll linguist-generated /lib/codeql/rust/elements/internal/generated/CastExpr.qll linguist-generated /lib/codeql/rust/elements/internal/generated/ClosureExpr.qll linguist-generated diff --git a/rust/ql/consistency-queries/PathResolutionConsistency.ql b/rust/ql/consistency-queries/PathResolutionConsistency.ql index 3b2165b712f..bc1f572eedb 100644 --- a/rust/ql/consistency-queries/PathResolutionConsistency.ql +++ b/rust/ql/consistency-queries/PathResolutionConsistency.ql @@ -15,8 +15,8 @@ class SourceLocatable extends Locatable { SourceLocatable() { this.fromSource() } } -query predicate multipleCallTargets(SourceLocatable a) { - PathResolutionConsistency::multipleCallTargets(a, _) +query predicate multipleResolvedTargets(SourceLocatable a) { + PathResolutionConsistency::multipleResolvedTargets(a, _) } query predicate multiplePathResolutions(SourceLocatable a) { diff --git a/rust/ql/examples/snippets/simple_constant_password.ql b/rust/ql/examples/snippets/simple_constant_password.ql index b0902235a96..e43238cedd4 100644 --- a/rust/ql/examples/snippets/simple_constant_password.ql +++ b/rust/ql/examples/snippets/simple_constant_password.ql @@ -30,11 +30,11 @@ module ConstantPasswordConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node node) { // `node` is an argument whose corresponding parameter name matches the pattern "pass%" - exists(CallExpr call, Function target, int argIndex, Variable v | + exists(Call call, Function target, int argIndex, Variable v | call.getStaticTarget() = target and v.getParameter() = target.getParam(argIndex) and v.getText().matches("pass%") and - call.getArg(argIndex) = node.asExpr() + call.getPositionalArgument(argIndex) = node.asExpr() ) } } diff --git a/rust/ql/examples/snippets/simple_sql_injection.ql b/rust/ql/examples/snippets/simple_sql_injection.ql index 653c761d7eb..251ab604402 100644 --- a/rust/ql/examples/snippets/simple_sql_injection.ql +++ b/rust/ql/examples/snippets/simple_sql_injection.ql @@ -23,9 +23,9 @@ module SqlInjectionConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node node) { // `node` is the first argument of a call to `sqlx_core::query::query` - exists(CallExpr call | + exists(Call call | call.getStaticTarget().getCanonicalPath() = "sqlx_core::query::query" and - call.getArg(0) = node.asExpr() + call.getPositionalArgument(0) = node.asExpr() ) } } diff --git a/rust/ql/integration-tests/hello-workspace/path-resolution.ql b/rust/ql/integration-tests/hello-workspace/path-resolution.ql index 9ec97b61eeb..574a9553155 100644 --- a/rust/ql/integration-tests/hello-workspace/path-resolution.ql +++ b/rust/ql/integration-tests/hello-workspace/path-resolution.ql @@ -2,7 +2,7 @@ import rust import codeql.rust.internal.PathResolution import utils.test.PathResolutionInlineExpectationsTest -query predicate resolveDollarCrate(RelevantPath p, Crate c) { +query predicate resolveDollarCrate(PathExt p, Crate c) { c = resolvePath(p) and p.isDollarCrate() and p.fromSource() and diff --git a/rust/ql/integration-tests/query-suite/rust-code-scanning.qls.expected b/rust/ql/integration-tests/query-suite/rust-code-scanning.qls.expected index 70e1bcb1064..9b10079767b 100644 --- a/rust/ql/integration-tests/query-suite/rust-code-scanning.qls.expected +++ b/rust/ql/integration-tests/query-suite/rust-code-scanning.qls.expected @@ -10,7 +10,9 @@ ql/rust/ql/src/queries/diagnostics/UnextractedElements.ql ql/rust/ql/src/queries/diagnostics/UnresolvedMacroCalls.ql ql/rust/ql/src/queries/security/CWE-020/RegexInjection.ql ql/rust/ql/src/queries/security/CWE-022/TaintedPath.ql +ql/rust/ql/src/queries/security/CWE-079/XSS.ql ql/rust/ql/src/queries/security/CWE-089/SqlInjection.ql +ql/rust/ql/src/queries/security/CWE-295/DisabledCertificateCheck.ql ql/rust/ql/src/queries/security/CWE-311/CleartextTransmission.ql ql/rust/ql/src/queries/security/CWE-312/CleartextLogging.ql ql/rust/ql/src/queries/security/CWE-312/CleartextStorageDatabase.ql diff --git a/rust/ql/integration-tests/query-suite/rust-security-and-quality.qls.expected b/rust/ql/integration-tests/query-suite/rust-security-and-quality.qls.expected index 596fdef3b20..4059cb40ab6 100644 --- a/rust/ql/integration-tests/query-suite/rust-security-and-quality.qls.expected +++ b/rust/ql/integration-tests/query-suite/rust-security-and-quality.qls.expected @@ -10,8 +10,10 @@ ql/rust/ql/src/queries/diagnostics/UnextractedElements.ql ql/rust/ql/src/queries/diagnostics/UnresolvedMacroCalls.ql ql/rust/ql/src/queries/security/CWE-020/RegexInjection.ql ql/rust/ql/src/queries/security/CWE-022/TaintedPath.ql +ql/rust/ql/src/queries/security/CWE-079/XSS.ql ql/rust/ql/src/queries/security/CWE-089/SqlInjection.ql ql/rust/ql/src/queries/security/CWE-117/LogInjection.ql +ql/rust/ql/src/queries/security/CWE-295/DisabledCertificateCheck.ql ql/rust/ql/src/queries/security/CWE-311/CleartextTransmission.ql ql/rust/ql/src/queries/security/CWE-312/CleartextLogging.ql ql/rust/ql/src/queries/security/CWE-312/CleartextStorageDatabase.ql diff --git a/rust/ql/integration-tests/query-suite/rust-security-extended.qls.expected b/rust/ql/integration-tests/query-suite/rust-security-extended.qls.expected index 102c63e7942..2d660d4f3a3 100644 --- a/rust/ql/integration-tests/query-suite/rust-security-extended.qls.expected +++ b/rust/ql/integration-tests/query-suite/rust-security-extended.qls.expected @@ -10,8 +10,10 @@ ql/rust/ql/src/queries/diagnostics/UnextractedElements.ql ql/rust/ql/src/queries/diagnostics/UnresolvedMacroCalls.ql ql/rust/ql/src/queries/security/CWE-020/RegexInjection.ql ql/rust/ql/src/queries/security/CWE-022/TaintedPath.ql +ql/rust/ql/src/queries/security/CWE-079/XSS.ql ql/rust/ql/src/queries/security/CWE-089/SqlInjection.ql ql/rust/ql/src/queries/security/CWE-117/LogInjection.ql +ql/rust/ql/src/queries/security/CWE-295/DisabledCertificateCheck.ql ql/rust/ql/src/queries/security/CWE-311/CleartextTransmission.ql ql/rust/ql/src/queries/security/CWE-312/CleartextLogging.ql ql/rust/ql/src/queries/security/CWE-312/CleartextStorageDatabase.ql diff --git a/rust/ql/lib/CHANGELOG.md b/rust/ql/lib/CHANGELOG.md index 7dd8b44f124..b714dc31cb9 100644 --- a/rust/ql/lib/CHANGELOG.md +++ b/rust/ql/lib/CHANGELOG.md @@ -1,3 +1,17 @@ +## 0.2.1 + +No user-facing changes. + +## 0.2.0 + +### Breaking Changes + +* The type `DataFlow::Node` is now based directly on the AST instead of the CFG, which means that predicates like `asExpr()` return AST nodes instead of CFG nodes. + +### Minor Analysis Improvements + +* Added more detailed models for `std::fs` and `std::path`. + ## 0.1.20 ### Minor Analysis Improvements diff --git a/rust/ql/lib/change-notes/2025-11-19-dataflow-ast.md b/rust/ql/lib/change-notes/2025-11-19-dataflow-ast.md deleted file mode 100644 index 04883ef37d5..00000000000 --- a/rust/ql/lib/change-notes/2025-11-19-dataflow-ast.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: breaking ---- -* The type `DataFlow::Node` is now based directly on the AST instead of the CFG, which means that predicates like `asExpr()` return AST nodes instead of CFG nodes. \ No newline at end of file diff --git a/rust/ql/lib/change-notes/2025-12-03-type-inference-raw-pointers.md b/rust/ql/lib/change-notes/2025-12-03-type-inference-raw-pointers.md new file mode 100644 index 00000000000..a24f86ad897 --- /dev/null +++ b/rust/ql/lib/change-notes/2025-12-03-type-inference-raw-pointers.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Improved type inference for raw pointers (`*const` and `*mut`). This includes type inference for the raw borrow operators (`&raw const` and `&raw mut`) and dereferencing of raw pointers. \ No newline at end of file diff --git a/rust/ql/lib/change-notes/2025-12-05-trait-function-dispatch.md b/rust/ql/lib/change-notes/2025-12-05-trait-function-dispatch.md new file mode 100644 index 00000000000..5a6f0991161 --- /dev/null +++ b/rust/ql/lib/change-notes/2025-12-05-trait-function-dispatch.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* The call graph is now more precise for calls that target a trait function with a default implemention. This reduces the number of false positives for data flow queries. \ No newline at end of file diff --git a/rust/ql/lib/change-notes/released/0.2.0.md b/rust/ql/lib/change-notes/released/0.2.0.md new file mode 100644 index 00000000000..a419eea1874 --- /dev/null +++ b/rust/ql/lib/change-notes/released/0.2.0.md @@ -0,0 +1,9 @@ +## 0.2.0 + +### Breaking Changes + +* The type `DataFlow::Node` is now based directly on the AST instead of the CFG, which means that predicates like `asExpr()` return AST nodes instead of CFG nodes. + +### Minor Analysis Improvements + +* Added more detailed models for `std::fs` and `std::path`. diff --git a/rust/ql/lib/change-notes/released/0.2.1.md b/rust/ql/lib/change-notes/released/0.2.1.md new file mode 100644 index 00000000000..3dbfc85fe11 --- /dev/null +++ b/rust/ql/lib/change-notes/released/0.2.1.md @@ -0,0 +1,3 @@ +## 0.2.1 + +No user-facing changes. diff --git a/rust/ql/lib/codeql-pack.release.yml b/rust/ql/lib/codeql-pack.release.yml index 9910e8d039f..df29a726bcc 100644 --- a/rust/ql/lib/codeql-pack.release.yml +++ b/rust/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.1.20 +lastReleaseVersion: 0.2.1 diff --git a/rust/ql/lib/codeql/rust/controlflow/CfgNodes.qll b/rust/ql/lib/codeql/rust/controlflow/CfgNodes.qll index 96ae6f8fdbc..eeed7086546 100644 --- a/rust/ql/lib/codeql/rust/controlflow/CfgNodes.qll +++ b/rust/ql/lib/codeql/rust/controlflow/CfgNodes.qll @@ -4,7 +4,6 @@ */ private import rust -private import codeql.rust.elements.Call private import ControlFlowGraph private import internal.ControlFlowGraphImpl as CfgImpl private import internal.CfgNodes @@ -200,20 +199,6 @@ final class BreakExprCfgNode extends Nodes::BreakExprCfgNode { } } -/** - * A function or method call expression. See `CallExpr` and `MethodCallExpr` for further details. - */ -final class CallExprBaseCfgNode extends Nodes::CallExprBaseCfgNode { - private CallExprBaseChildMapping node; - - CallExprBaseCfgNode() { node = this.getAstNode() } - - /** Gets the `i`th argument of this call. */ - ExprCfgNode getArgument(int i) { - any(ChildMapping mapping).hasCfgChild(node, node.getArgList().getArg(i), this, result) - } -} - /** * A method call expression. For example: * ```rust @@ -221,7 +206,16 @@ final class CallExprBaseCfgNode extends Nodes::CallExprBaseCfgNode { * x.foo::(42); * ``` */ -final class MethodCallExprCfgNode extends CallExprBaseCfgNode, Nodes::MethodCallExprCfgNode { } +final class MethodCallExprCfgNode extends Nodes::MethodCallExprCfgNode { + private MethodCallExprChildMapping node; + + MethodCallExprCfgNode() { node = this.getAstNode() } + + /** Gets the `i`th argument of this call. */ + ExprCfgNode getPositionalArgument(int i) { + any(ChildMapping mapping).hasCfgChild(node, node.getPositionalArgument(i), this, result) + } +} /** * A CFG node that calls a function. @@ -238,7 +232,7 @@ final class CallCfgNode extends ExprCfgNode { /** Gets the receiver of this call if it is a method call. */ ExprCfgNode getReceiver() { - any(ChildMapping mapping).hasCfgChild(node, node.getReceiver(), this, result) + any(ChildMapping mapping).hasCfgChild(node, node.(MethodCall).getReceiver(), this, result) } /** Gets the `i`th argument of this call, if any. */ @@ -248,15 +242,26 @@ final class CallCfgNode extends ExprCfgNode { } /** - * A function call expression. For example: + * An expression with parenthesized arguments. For example: * ```rust * foo(42); * foo::(42); * foo[0](42); * foo(1) = 4; + * Option::Some(42); * ``` */ -final class CallExprCfgNode extends CallExprBaseCfgNode, Nodes::CallExprCfgNode { } +final class CallExprCfgNode extends Nodes::CallExprCfgNode { + private CallExprChildMapping node; + + CallExprCfgNode() { node = this.getAstNode() } + + /** Gets the `i`th argument of this call. */ + ExprCfgNode getSyntacticArgument(int i) { + any(ChildMapping mapping) + .hasCfgChild(node, node.getSyntacticPositionalArgument(i), this, result) + } +} /** * A FormatArgsExpr. For example: diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/CfgNodes.qll b/rust/ql/lib/codeql/rust/controlflow/internal/CfgNodes.qll index eb4d665436e..ee1c0e6ab6b 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/CfgNodes.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/CfgNodes.qll @@ -57,8 +57,12 @@ class BreakExprTargetChildMapping extends ParentAstNode, Expr { override predicate relevantChild(AstNode child) { child.(BreakExpr).getTarget() = this } } -class CallExprBaseChildMapping extends ParentAstNode, CallExprBase { - override predicate relevantChild(AstNode child) { child = this.getAnArg() } +class CallExprChildMapping extends ParentAstNode, CallExpr { + override predicate relevantChild(AstNode child) { child = this.getArgList().getAnArg() } +} + +class MethodCallExprChildMapping extends ParentAstNode, MethodCallExpr { + override predicate relevantChild(AstNode child) { child = this.getArgList().getAnArg() } } class StructExprChildMapping extends ParentAstNode, StructExpr { diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/Completion.qll b/rust/ql/lib/codeql/rust/controlflow/internal/Completion.qll index 0250f1cbc43..33da4db473e 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/Completion.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/Completion.qll @@ -1,5 +1,6 @@ private import codeql.util.Boolean private import codeql.rust.controlflow.ControlFlowGraph +private import codeql.rust.elements.internal.VariableImpl::Impl as VariableImpl private import rust newtype TCompletion = @@ -123,13 +124,7 @@ class BooleanCompletion extends ConditionalCompletion, TBooleanCompletion { */ private predicate cannotCauseMatchFailure(Pat pat) { pat instanceof RangePat or - // Identifier patterns that are in fact path patterns can cause failures. For - // instance `None`. Only if an `@ ...` part is present can we be sure that - // it's an actual identifier pattern. As a heuristic, if the identifier starts - // with a lower case letter, then we assume that it's an identifier. This - // works for code that follows the Rust naming convention for enums and - // constants. - pat = any(IdentPat p | p.hasPat() or p.getName().getText().charAt(0).isLowercase()) or + pat = any(IdentPat p | p.hasPat() or VariableImpl::variableDecl(_, p.getName(), _)) or pat instanceof WildcardPat or pat instanceof RestPat or pat instanceof RefPat or diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll b/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll index c3fb15ec0e7..522e5741795 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll @@ -210,13 +210,17 @@ module ExprTrees { override AstNode getChildNode(int i) { i = 0 and result = super.getExpr() } } - class BinaryOpExprTree extends StandardPostOrderTree instanceof BinaryExpr { - BinaryOpExprTree() { not this instanceof BinaryLogicalOperation } + class InvocationExprTree extends StandardPostOrderTree instanceof InvocationExpr { + InvocationExprTree() { + not this instanceof CallExpr and + not this instanceof BinaryLogicalOperation + } override AstNode getChildNode(int i) { - i = 0 and result = super.getLhs() + i = 0 and + result = super.getSyntacticReceiver() or - i = 1 and result = super.getRhs() + result = super.getSyntacticPositionalArgument(i - 1) } } @@ -296,7 +300,7 @@ module ExprTrees { override AstNode getChildNode(int i) { i = 0 and result = super.getFunction() or - result = super.getArgList().getArg(i - 1) + result = super.getSyntacticPositionalArgument(i - 1) } } @@ -371,14 +375,6 @@ module ExprTrees { } } - class IndexExprTree extends StandardPostOrderTree instanceof IndexExpr { - override AstNode getChildNode(int i) { - i = 0 and result = super.getBase() - or - i = 1 and result = super.getIndex() - } - } - class LetExprTree extends StandardPostOrderTree, LetExpr { override AstNode getChildNode(int i) { i = 0 and @@ -510,12 +506,6 @@ module ExprTrees { } } - class MethodCallExprTree extends StandardPostOrderTree, MethodCallExpr { - override AstNode getChildNode(int i) { - if i = 0 then result = this.getReceiver() else result = this.getArg(i - 1) - } - } - class OffsetOfExprTree extends LeafTree instanceof OffsetOfExpr { } class ParenExprTree extends ControlFlowTree, ParenExpr { @@ -534,10 +524,6 @@ module ExprTrees { class PathExprTree extends LeafTree instanceof PathExpr { } - class PrefixExprTree extends StandardPostOrderTree instanceof PrefixExpr { - override AstNode getChildNode(int i) { i = 0 and result = super.getExpr() } - } - class RangeExprTree extends StandardPostOrderTree instanceof RangeExpr { override AstNode getChildNode(int i) { i = 0 and result = super.getStart() @@ -552,10 +538,6 @@ module ExprTrees { } } - class RefExprTree extends StandardPostOrderTree instanceof RefExpr { - override AstNode getChildNode(int i) { i = 0 and result = super.getExpr() } - } - class ReturnExprTree extends StandardPostOrderTree instanceof ReturnExpr { override AstNode getChildNode(int i) { i = 0 and result = super.getExpr() } } diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll b/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll index 9ce771983a3..016217e0a46 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll @@ -654,15 +654,18 @@ module MakeCfgNodes Input> { } /** - * A function call expression. For example: + * NOTE: Consider using `Call` instead, as that excludes call expressions that are + * instantiations of tuple structs and tuple variants. + * + * A call expression. For example: * ```rust * foo(42); * foo::(42); * foo[0](42); - * foo(1) = 4; + * Option::Some(42); // tuple variant instantiation * ``` */ - final class CallExprCfgNode extends CfgNodeFinal, CallExprBaseCfgNode { + final class CallExprCfgNode extends CfgNodeFinal, ExprCfgNode { private CallExpr node; CallExprCfgNode() { node = this.getAstNode() } @@ -670,6 +673,31 @@ module MakeCfgNodes Input> { /** Gets the underlying `CallExpr`. */ CallExpr getCallExpr() { result = node } + /** + * Gets the argument list of this call expression, if it exists. + */ + ArgList getArgList() { result = node.getArgList() } + + /** + * Holds if `getArgList()` exists. + */ + predicate hasArgList() { exists(this.getArgList()) } + + /** + * Gets the `index`th attr of this call expression (0-based). + */ + Attr getAttr(int index) { result = node.getAttr(index) } + + /** + * Gets any of the attrs of this call expression. + */ + Attr getAnAttr() { result = this.getAttr(_) } + + /** + * Gets the number of attrs of this call expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** * Gets the function of this call expression, if it exists. */ @@ -683,62 +711,6 @@ module MakeCfgNodes Input> { predicate hasFunction() { exists(this.getFunction()) } } - final private class ParentCallExprBase extends ParentAstNode, CallExprBase { - override predicate relevantChild(AstNode child) { none() } - } - - /** - * A function or method call expression. See `CallExpr` and `MethodCallExpr` for further details. - */ - final class CallExprBaseCfgNode extends CfgNodeFinal, ExprCfgNode { - private CallExprBase node; - - CallExprBaseCfgNode() { node = this.getAstNode() } - - /** Gets the underlying `CallExprBase`. */ - CallExprBase getCallExprBase() { result = node } - - /** - * Gets the argument list of this call expression base, if it exists. - */ - ArgList getArgList() { result = node.getArgList() } - - /** - * Holds if `getArgList()` exists. - */ - predicate hasArgList() { exists(this.getArgList()) } - - /** - * Gets the `index`th attr of this call expression base (0-based). - */ - Attr getAttr(int index) { result = node.getAttr(index) } - - /** - * Gets any of the attrs of this call expression base. - */ - Attr getAnAttr() { result = this.getAttr(_) } - - /** - * Gets the number of attrs of this call expression base. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } - - /** - * Gets the `index`th argument of this call expression base (0-based). - */ - Expr getArg(int index) { result = node.getArg(index) } - - /** - * Gets any of the arguments of this call expression base. - */ - Expr getAnArg() { result = this.getArg(_) } - - /** - * Gets the number of arguments of this call expression base. - */ - int getNumberOfArgs() { result = count(int i | exists(this.getArg(i))) } - } - final private class ParentCastExpr extends ParentAstNode, CastExpr { override predicate relevantChild(AstNode child) { none() @@ -2071,13 +2043,17 @@ module MakeCfgNodes Input> { } /** + * NOTE: Consider using `MethodCall` instead, as that also includes calls to methods using + * call syntax (such as `Foo::method(x)`), operation syntax (such as `x + y`), and + * indexing syntax (such as `x[y]`). + * * A method call expression. For example: * ```rust * x.foo(42); * x.foo::(42); * ``` */ - final class MethodCallExprCfgNode extends CfgNodeFinal, CallExprBaseCfgNode { + final class MethodCallExprCfgNode extends CfgNodeFinal, ExprCfgNode { private MethodCallExpr node; MethodCallExprCfgNode() { node = this.getAstNode() } @@ -2085,6 +2061,31 @@ module MakeCfgNodes Input> { /** Gets the underlying `MethodCallExpr`. */ MethodCallExpr getMethodCallExpr() { result = node } + /** + * Gets the argument list of this method call expression, if it exists. + */ + ArgList getArgList() { result = node.getArgList() } + + /** + * Holds if `getArgList()` exists. + */ + predicate hasArgList() { exists(this.getArgList()) } + + /** + * Gets the `index`th attr of this method call expression (0-based). + */ + Attr getAttr(int index) { result = node.getAttr(index) } + + /** + * Gets any of the attrs of this method call expression. + */ + Attr getAnAttr() { result = this.getAttr(_) } + + /** + * Gets the number of attrs of this method call expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** * Gets the generic argument list of this method call expression, if it exists. */ diff --git a/rust/ql/lib/codeql/rust/dataflow/internal/Content.qll b/rust/ql/lib/codeql/rust/dataflow/internal/Content.qll index 12e4b682091..a072edef612 100644 --- a/rust/ql/lib/codeql/rust/dataflow/internal/Content.qll +++ b/rust/ql/lib/codeql/rust/dataflow/internal/Content.qll @@ -5,6 +5,7 @@ private import rust private import codeql.rust.frameworks.stdlib.Builtins private import DataFlowImpl +private import codeql.rust.elements.internal.CallExprImpl::Impl as CallExprImpl /** * A path to a value contained in an object. For example a field name of a struct. @@ -163,7 +164,7 @@ final class TuplePositionContent extends FieldContent, TTuplePositionContent { } /** - * A content for the index of an argument to at function call. + * A content for the index of an argument to at closure call. * * Used by the model generator to create flow summaries for higher-order * functions. @@ -270,7 +271,7 @@ newtype TContent = } or TFunctionCallReturnContent() or TFunctionCallArgumentContent(int pos) { - pos in [0 .. any(CallExpr c).getArgList().getNumberOfArgs() - 1] + pos in [0 .. any(CallExprImpl::DynamicCallExpr c).getNumberOfPositionalArguments()] } or TCapturedVariableContent(VariableCapture::CapturedVariable v) or TReferenceContent() diff --git a/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowConsistency.qll b/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowConsistency.qll index 731996661cb..ca6c0747ba3 100644 --- a/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowConsistency.qll +++ b/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowConsistency.qll @@ -19,10 +19,6 @@ private module Input implements InputSig { predicate postWithInFlowExclude(RustDataFlow::Node n) { n instanceof Node::FlowSummaryNode or - // We allow flow into post-update node for receiver expressions (from the - // synthetic post receiever node). - n.(Node::PostUpdateNode).getPreUpdateNode().asExpr() = any(Node::ReceiverNode r).getReceiver() - or n.(Node::PostUpdateNode).getPreUpdateNode().asExpr() = getPostUpdateReverseStep(_, _) or FlowSummaryImpl::Private::Steps::sourceLocalStep(_, n, _) diff --git a/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll b/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll index fd6bab4d23e..393095e80d9 100644 --- a/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll +++ b/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll @@ -8,11 +8,10 @@ private import codeql.util.Boolean private import codeql.dataflow.DataFlow private import codeql.dataflow.internal.DataFlowImpl private import rust -private import codeql.rust.elements.Call private import SsaImpl as SsaImpl private import codeql.rust.controlflow.internal.Scope as Scope +private import codeql.rust.elements.internal.CallExprImpl::Impl as CallExprImpl private import codeql.rust.internal.PathResolution -private import codeql.rust.internal.TypeInference as TypeInference private import codeql.rust.controlflow.ControlFlowGraph private import codeql.rust.dataflow.Ssa private import codeql.rust.dataflow.FlowSummary @@ -58,7 +57,7 @@ final class DataFlowCallable extends TDataFlowCallable { } final class DataFlowCall extends TDataFlowCall { - /** Gets the underlying call in the CFG, if any. */ + /** Gets the underlying call, if any. */ Call asCall() { this = TCall(result) } predicate isSummaryCall( @@ -87,72 +86,11 @@ final class DataFlowCall extends TDataFlowCall { Location getLocation() { result = this.asCall().getLocation() } } -/** - * The position of a parameter in a function. - * - * In Rust there is a 1-to-1 correspondence between parameter positions and - * arguments positions, so we use the same underlying type for both. - */ -final class ParameterPosition extends TParameterPosition { - /** Gets the underlying integer position, if any. */ - int getPosition() { this = TPositionalParameterPosition(result) } - - predicate hasPosition() { exists(this.getPosition()) } - - /** Holds if this position represents the `self` position. */ - predicate isSelf() { this = TSelfParameterPosition() } - - /** - * Holds if this position represents a reference to a closure itself. Only - * used for tracking flow through captured variables. - */ - predicate isClosureSelf() { this = TClosureSelfParameterPosition() } - - /** Gets a textual representation of this position. */ - string toString() { - result = this.getPosition().toString() - or - result = "self" and this.isSelf() - or - result = "closure self" and this.isClosureSelf() - } - - ParamBase getParameterIn(ParamList ps) { - result = ps.getParam(this.getPosition()) - or - result = ps.getSelfParam() and this.isSelf() - } -} - -/** - * The position of an argument in a call. - * - * In Rust there is a 1-to-1 correspondence between parameter positions and - * arguments positions, so we use the same underlying type for both. - */ -final class ArgumentPosition extends ParameterPosition { - /** Gets the argument of `call` at this position, if any. */ - Expr getArgument(Call call) { - result = call.getPositionalArgument(this.getPosition()) - or - result = call.getReceiver() and this.isSelf() - } -} - /** * Holds if `arg` is an argument of `call` at the position `pos`. - * - * Note that this does not hold for the receiever expression of a method call - * as the synthetic `ReceiverNode` is the argument for the `self` parameter. */ -predicate isArgumentForCall(Expr arg, Call call, ParameterPosition pos) { - // TODO: Handle index expressions as calls in data flow. - not call instanceof IndexExpr and - ( - call.getPositionalArgument(pos.getPosition()) = arg - or - call.getReceiver() = arg and pos.isSelf() and not call.receiverImplicitlyBorrowed() - ) +predicate isArgumentForCall(Expr arg, Call call, RustDataFlow::ArgumentPosition pos) { + arg = pos.getArgument(call) } /** Provides logic related to SSA. */ @@ -266,8 +204,11 @@ module LocalFlow { ) or // An edge from a pattern/expression to its corresponding SSA definition. - nodeFrom.(AstNodeNode).getAstNode() = - nodeTo.(SsaNode).asDefinition().(Ssa::WriteDefinition).getWriteAccess() + exists(AstNode n | + n = nodeTo.(SsaNode).asDefinition().(Ssa::WriteDefinition).getWriteAccess() and + n = nodeFrom.(AstNodeNode).getAstNode() and + not n = any(CompoundAssignmentExpr cae).getLhs() + ) or nodeFrom.(SourceParameterNode).getParameter().(Param).getPat() = nodeTo.asPat() or @@ -283,14 +224,6 @@ module LocalFlow { or nodeFrom.asPat().(OrPat).getAPat() = nodeTo.asPat() or - // Simple value step from receiver expression to receiver node, in case - // there is no implicit deref or borrow operation. - nodeFrom.asExpr() = nodeTo.(ReceiverNode).getReceiver() - or - // The dual step of the above, for the post-update nodes. - nodeFrom.(PostUpdateNode).getPreUpdateNode().(ReceiverNode).getReceiver() = - nodeTo.(PostUpdateNode).getPreUpdateNode().asExpr() - or nodeTo.(PostUpdateNode).getPreUpdateNode().asExpr() = getPostUpdateReverseStep(nodeFrom.(PostUpdateNode).getPreUpdateNode().asExpr(), true) } @@ -309,10 +242,8 @@ predicate lambdaCreationExpr(Expr creation) { * Holds if `call` is a lambda call of kind `kind` where `receiver` is the * invoked expression. */ -predicate lambdaCallExpr(CallExpr call, LambdaCallKind kind, Expr receiver) { +predicate lambdaCallExpr(CallExprImpl::DynamicCallExpr call, LambdaCallKind kind, Expr receiver) { receiver = call.getFunction() and - // All calls to complex expressions and local variable accesses are lambda call. - (receiver instanceof PathExpr implies receiver = any(Variable v).getAnAccess()) and exists(kind) } @@ -324,10 +255,6 @@ private module Aliases { class DataFlowCallAlias = DataFlowCall; - class ParameterPositionAlias = ParameterPosition; - - class ArgumentPositionAlias = ArgumentPosition; - class ContentAlias = Content; class ContentSetAlias = ContentSet; @@ -335,6 +262,30 @@ private module Aliases { class LambdaCallKindAlias = LambdaCallKind; } +/** + * Index assignments like `a[i] = rhs` are treated as `*a.index_mut(i) = rhs`, + * so they should in principle be handled by `referenceAssignment`. + * + * However, this would require support for [generalized reverse flow][1], which + * is not yet implemented, so instead we simulate reverse flow where it would + * have applied via the model for `<_ as core::ops::index::IndexMut>::index_mut`. + * + * The same is the case for compound assignments like `a[i] += rhs`, which are + * treated as `(*a.index_mut(i)).add_assign(rhs)`. + * + * [1]: https://github.com/github/codeql/pull/18109 + */ +predicate indexAssignment( + AssignmentOperation assignment, IndexExpr index, Node rhs, PostUpdateNode base, Content c +) { + assignment.getLhs() = index and + rhs.asExpr() = assignment.getRhs() and + base.getPreUpdateNode().asExpr() = index.getBase() and + c instanceof ElementContent and + // simulate that the flow summary applies + not index.getResolvedTarget().fromSource() +} + module RustDataFlow implements InputSig { private import Aliases private import codeql.rust.dataflow.DataFlow @@ -359,6 +310,58 @@ module RustDataFlow implements InputSig { final class CastNode = Node::CastNode; + /** + * The position of a parameter in a function. + * + * In Rust there is a 1-to-1 correspondence between parameter positions and + * arguments positions, so we use the same underlying type for both. + */ + final class ParameterPosition extends TParameterPosition { + /** Gets the underlying integer position, if any. */ + int getPosition() { this = TPositionalParameterPosition(result) } + + predicate hasPosition() { exists(this.getPosition()) } + + /** Holds if this position represents the `self` position. */ + predicate isSelf() { this = TSelfParameterPosition() } + + /** + * Holds if this position represents a reference to a closure itself. Only + * used for tracking flow through captured variables. + */ + predicate isClosureSelf() { this = TClosureSelfParameterPosition() } + + /** Gets a textual representation of this position. */ + string toString() { + result = this.getPosition().toString() + or + result = "self" and this.isSelf() + or + result = "closure self" and this.isClosureSelf() + } + + ParamBase getParameterIn(ParamList ps) { + result = ps.getParam(this.getPosition()) + or + result = ps.getSelfParam() and this.isSelf() + } + } + + /** + * The position of an argument in a call. + * + * In Rust there is a 1-to-1 correspondence between parameter positions and + * arguments positions, so we use the same underlying type for both. + */ + final class ArgumentPosition extends ParameterPosition { + /** Gets the argument of `call` at this position, if any. */ + Expr getArgument(Call call) { + result = call.getPositionalArgument(this.getPosition()) + or + result = call.(MethodCall).getReceiver() and this.isSelf() + } + } + /** Holds if `p` is a parameter of `c` at the position `pos`. */ predicate isParameterNode(ParameterNode p, DataFlowCallable c, ParameterPosition pos) { p.isParameterOf(c, pos) @@ -380,7 +383,9 @@ module RustDataFlow implements InputSig { node.(FlowSummaryNode).getSummaryNode().isHidden() or node instanceof CaptureNode or node instanceof ClosureParameterNode or - node instanceof ReceiverNode or + node instanceof DerefBorrowNode or + node instanceof DerefOutNode or + node instanceof IndexOutNode or node.asExpr() instanceof ParenExpr or nodeIsHidden(node.(PostUpdateNode).getPreUpdateNode()) } @@ -420,13 +425,26 @@ module RustDataFlow implements InputSig { final class ReturnKind = ReturnKindAlias; + private Function getStaticTargetExt(Call c) { + result = c.getStaticTarget() + or + // If the static target of an overloaded operation cannot be resolved, we fall + // back to the trait method as the target. This ensures that the flow models + // still apply. + not exists(c.getStaticTarget()) and + exists(TraitItemNode t, string methodName | + c.(Operation).isOverloaded(t, methodName, _) and + result = t.getAssocItem(methodName) + ) + } + /** Gets a viable implementation of the target of the given `Call`. */ DataFlowCallable viableCallable(DataFlowCall call) { exists(Call c | c = call.asCall() | result.asCfgScope() = c.getARuntimeTarget() or exists(SummarizedCallable sc, Function staticTarget | - staticTarget = c.getStaticTarget() and + staticTarget = getStaticTargetExt(c) and sc = result.asSummarizedCallable() | sc = staticTarget @@ -467,10 +485,6 @@ module RustDataFlow implements InputSig { ContentApprox getContentApprox(Content c) { result = c } - class ParameterPosition = ParameterPositionAlias; - - class ArgumentPosition = ArgumentPositionAlias; - /** * Holds if the parameter position `ppos` matches the argument position * `apos`. @@ -520,16 +534,16 @@ module RustDataFlow implements InputSig { } pragma[nomagic] - private predicate implicitDerefToReceiver(Node node1, ReceiverNode node2, ReferenceContent c) { - TypeInference::receiverHasImplicitDeref(node1.asExpr()) and - node1.asExpr() = node2.getReceiver() and + private predicate implicitDeref(Node node1, DerefBorrowNode node2, ReferenceContent c) { + not node2.isBorrow() and + node1.asExpr() = node2.getNode() and exists(c) } pragma[nomagic] - private predicate implicitBorrowToReceiver(Node node1, ReceiverNode node2, ReferenceContent c) { - TypeInference::receiverHasImplicitBorrow(node1.asExpr()) and - node1.asExpr() = node2.getReceiver() and + private predicate implicitBorrow(Node node1, DerefBorrowNode node2, ReferenceContent c) { + node2.isBorrow() and + node1.asExpr() = node2.getNode() and exists(c) } @@ -539,6 +553,15 @@ module RustDataFlow implements InputSig { exists(c) } + private Node getFieldExprContainerNode(FieldExpr fe) { + exists(Expr container | container = fe.getContainer() | + not any(DerefBorrowNode n).getNode() = container and + result.asExpr() = container + or + result.(DerefBorrowNode).getNode() = container + ) + } + pragma[nomagic] additional predicate readContentStep(Node node1, Content c, Node node2) { exists(TupleStructPat pat, int pos | @@ -563,17 +586,11 @@ module RustDataFlow implements InputSig { node1.asPat().(RefPat).getPat() = node2.asPat() or exists(FieldExpr access | - node1.asExpr() = access.getContainer() and + node1 = getFieldExprContainerNode(access) and node2.asExpr() = access and access = c.(FieldContent).getAnAccess() ) or - exists(IndexExpr arr | - c instanceof ElementContent and - node1.asExpr() = arr.getBase() and - node2.asExpr() = arr - ) - or exists(ForExpr for | c instanceof ElementContent and node1.asExpr() = for.getIterable() and @@ -593,13 +610,18 @@ module RustDataFlow implements InputSig { .isVariantField([any(OptionEnum o).getSome(), any(ResultEnum r).getOk()], 0) ) or - exists(PrefixExpr deref | + exists(DerefExpr deref | c instanceof ReferenceContent and - deref.getOperatorName() = "*" and - node1.asExpr() = deref.getExpr() and + node1.(DerefOutNode).getDerefExpr() = deref and node2.asExpr() = deref ) or + exists(IndexExpr index | + c instanceof ReferenceContent and + node1.(IndexOutNode).getIndexExpr() = index and + node2.asExpr() = index + ) + or // Read from function return exists(DataFlowCall call | lambdaCall(call, _, node1) and @@ -616,13 +638,21 @@ module RustDataFlow implements InputSig { referenceExprToExpr(node2.(PostUpdateNode).getPreUpdateNode(), node1.(PostUpdateNode).getPreUpdateNode(), c) or - // Step from receiver expression to receiver node, in case of an implicit - // dereference. - implicitDerefToReceiver(node1, node2, c) + implicitDeref(node1, node2, c) or // A read step dual to the store step for implicit borrows. - implicitBorrowToReceiver(node2.(PostUpdateNode).getPreUpdateNode(), - node1.(PostUpdateNode).getPreUpdateNode(), c) + exists(Node n | implicitBorrow(n, node1.(PostUpdateNode).getPreUpdateNode(), c) | + node2.(PostUpdateNode).getPreUpdateNode() = n + or + // For compound assignments into variables like `x += y`, we do not want flow into + // `[post] x`, as that would create spurious flow when `x` is a parameter. Instead, + // we add the step directly into the SSA definition for `x` after the update. + exists(CompoundAssignmentExpr cae, Expr lhs | + lhs = cae.getLhs() and + lhs = node2.(SsaNode).asDefinition().(Ssa::WriteDefinition).getWriteAccess() and + n = TExprNode(lhs) + ) + ) or VariableCapture::readStep(node1, c, node2) } @@ -657,28 +687,46 @@ module RustDataFlow implements InputSig { exists(AssignmentExpr assignment, FieldExpr access | assignment.getLhs() = access and node1.asExpr() = assignment.getRhs() and - node2.asExpr() = access.getContainer() and + node2 = getFieldExprContainerNode(access) and access = c.getAnAccess() ) } pragma[nomagic] - private predicate referenceAssignment(Node node1, Node node2, ReferenceContent c) { - exists(AssignmentExpr assignment, PrefixExpr deref | - assignment.getLhs() = deref and - deref.getOperatorName() = "*" and + private predicate referenceAssignment( + Node node1, Node node2, Expr e, boolean clears, ReferenceContent c + ) { + exists(AssignmentExpr assignment, Expr lhs | + assignment.getLhs() = lhs and node1.asExpr() = assignment.getRhs() and - node2.asExpr() = deref.getExpr() and exists(c) + | + lhs = + any(DerefExpr de | + de = node2.(DerefOutNode).getDerefExpr() and + e = de.getExpr() + ) and + clears = true + or + lhs = + any(IndexExpr ie | + ie = node2.(IndexOutNode).getIndexExpr() and + e = ie.getBase() and + clears = false + ) ) } pragma[nomagic] additional predicate storeContentStep(Node node1, Content c, Node node2) { - exists(CallExpr call, int pos | - node1.asExpr() = call.getArg(pragma[only_bind_into](pos)) and - node2.asExpr() = call and - c = TTupleFieldContent(call.getTupleField(pragma[only_bind_into](pos))) + exists(CallExpr ce, TupleField tf, int pos | + node1.asExpr() = ce.getSyntacticPositionalArgument(pos) and + node2.asExpr() = ce and + c = TTupleFieldContent(tf) + | + tf = ce.(TupleStructExpr).getTupleField(pos) + or + tf = ce.(TupleVariantExpr).getTupleField(pos) ) or exists(StructExpr re, string field | @@ -709,14 +757,14 @@ module RustDataFlow implements InputSig { or fieldAssignment(node1, node2.(PostUpdateNode).getPreUpdateNode(), c) or - referenceAssignment(node1, node2.(PostUpdateNode).getPreUpdateNode(), c) + referenceAssignment(node1, node2.(PostUpdateNode).getPreUpdateNode(), _, _, c) or - exists(AssignmentExpr assignment, IndexExpr index | - c instanceof ElementContent and - assignment.getLhs() = index and - node1.asExpr() = assignment.getRhs() and - node2.(PostUpdateNode).getPreUpdateNode().asExpr() = index.getBase() - ) + indexAssignment(any(AssignmentExpr ae), _, node1, node2, c) + or + // Compund assignment like `a[i] += rhs` are modeled as a store step from `rhs` + // to `[post] a[i]`, followed by a taint step into `[post] a`. + indexAssignment(any(CompoundAssignmentExpr cae), + node2.(PostUpdateNode).getPreUpdateNode().asExpr(), node1, _, c) or referenceExprToExpr(node1, node2, c) or @@ -729,9 +777,7 @@ module RustDataFlow implements InputSig { or VariableCapture::storeStep(node1, c, node2) or - // Step from receiver expression to receiver node, in case of an implicit - // borrow. - implicitBorrowToReceiver(node1, node2, c) + implicitBorrow(node1, node2, c) } /** @@ -755,7 +801,7 @@ module RustDataFlow implements InputSig { predicate clearsContent(Node n, ContentSet cs) { fieldAssignment(_, n, cs.(SingletonContentSet).getContent()) or - referenceAssignment(_, n, cs.(SingletonContentSet).getContent()) + referenceAssignment(_, _, n.asExpr(), true, cs.(SingletonContentSet).getContent()) or FlowSummaryImpl::Private::Steps::summaryClearsContent(n.(FlowSummaryNode).getSummaryNode(), cs) or @@ -835,11 +881,7 @@ module RustDataFlow implements InputSig { */ predicate lambdaCall(DataFlowCall call, LambdaCallKind kind, Node receiver) { ( - receiver.asExpr() = call.asCall().(CallExpr).getFunction() and - // All calls to complex expressions and local variable accesses are lambda call. - exists(Expr f | f = receiver.asExpr() | - f instanceof PathExpr implies f = any(Variable v).getAnAccess() - ) + receiver.asExpr() = call.asCall().(CallExprImpl::DynamicCallExpr).getFunction() or call.isSummaryCall(_, receiver.(FlowSummaryNode).getSummaryNode()) ) and @@ -1003,9 +1045,7 @@ private module Cached { newtype TDataFlowCall = TCall(Call call) { Stages::DataFlowStage::ref() and - call.hasEnclosingCfgScope() and - // TODO: Handle index expressions as calls in data flow. - not call instanceof IndexExpr + call.hasEnclosingCfgScope() } or TSummaryCall( FlowSummaryImpl::Public::SummarizedCallable c, FlowSummaryImpl::Private::SummaryNode receiver diff --git a/rust/ql/lib/codeql/rust/dataflow/internal/FlowSummaryImpl.qll b/rust/ql/lib/codeql/rust/dataflow/internal/FlowSummaryImpl.qll index d9457d79510..4aef065efdf 100644 --- a/rust/ql/lib/codeql/rust/dataflow/internal/FlowSummaryImpl.qll +++ b/rust/ql/lib/codeql/rust/dataflow/internal/FlowSummaryImpl.qll @@ -12,18 +12,17 @@ private import codeql.rust.dataflow.Ssa private import Content module Input implements InputSig { - private import codeql.rust.elements.internal.CallExprBaseImpl::Impl as CallExprBaseImpl private import codeql.rust.frameworks.stdlib.Stdlib class SummarizedCallableBase = Function; abstract private class SourceSinkBase extends AstNode { /** Gets the associated call. */ - abstract CallExprBase getCall(); + abstract Call getCall(); /** Holds if the associated call resolves to `path`. */ final predicate callResolvesTo(string path) { - path = this.getCall().getStaticTarget().(Addressable).getCanonicalPath() + path = this.getCall().getResolvedTarget().getCanonicalPath() } } @@ -36,7 +35,7 @@ module Input implements InputSig { CallExprFunction() { this = call.getFunction() } - override CallExpr getCall() { result = call } + override Call getCall() { result = call } } private class MethodCallExprNameRef extends SourceBase, SinkBase { @@ -51,11 +50,9 @@ module Input implements InputSig { ReturnKind getStandardReturnValueKind() { result = TNormalReturnKind() } - string encodeParameterPosition(ParameterPosition pos) { result = pos.toString() } + string encodeParameterPosition(RustDataFlow::ParameterPosition pos) { result = pos.toString() } - string encodeArgumentPosition(RustDataFlow::ArgumentPosition pos) { - result = encodeParameterPosition(pos) - } + string encodeArgumentPosition(RustDataFlow::ArgumentPosition pos) { result = pos.toString() } string encodeContent(ContentSet cs, string arg) { exists(Content c | cs = TSingletonContentSet(c) | @@ -108,7 +105,9 @@ module Input implements InputSig { string encodeWithContent(ContentSet c, string arg) { result = "With" + encodeContent(c, arg) } bindingset[token] - ParameterPosition decodeUnknownParameterPosition(AccessPath::AccessPathTokenBase token) { + RustDataFlow::ParameterPosition decodeUnknownParameterPosition( + AccessPath::AccessPathTokenBase token + ) { // needed to support `Argument[x..y]` ranges token.getName() = "Argument" and result.getPosition() = AccessPath::parseInt(token.getAnArgument()) @@ -135,7 +134,7 @@ private module StepsInput implements Impl::Private::StepsInputSig { /** Gets the argument of `source` described by `sc`, if any. */ private Expr getSourceNodeArgument(Input::SourceBase source, Impl::Private::SummaryComponent sc) { - exists(ArgumentPosition pos | + exists(RustDataFlow::ArgumentPosition pos | sc = Impl::Private::SummaryComponent::argument(pos) and result = pos.getArgument(source.getCall()) ) @@ -162,7 +161,7 @@ private module StepsInput implements Impl::Private::StepsInputSig { s.head() = Impl::Private::SummaryComponent::return(_) and result.asExpr() = source.getCall() or - exists(ArgumentPosition pos, Expr arg | + exists(RustDataFlow::ArgumentPosition pos, Expr arg | s.head() = Impl::Private::SummaryComponent::parameter(pos) and arg = getSourceNodeArgument(source, s.tail().headOfSingleton()) and result.asParameter() = getCallable(arg).getParam(pos.getPosition()) @@ -173,7 +172,7 @@ private module StepsInput implements Impl::Private::StepsInputSig { } RustDataFlow::Node getSinkNode(Input::SinkBase sink, Impl::Private::SummaryComponent sc) { - exists(CallExprBase call, Expr arg, ArgumentPosition pos | + exists(InvocationExpr call, Expr arg, RustDataFlow::ArgumentPosition pos | result.asExpr() = arg and sc = Impl::Private::SummaryComponent::argument(pos) and call = sink.getCall() and diff --git a/rust/ql/lib/codeql/rust/dataflow/internal/ModelsAsData.qll b/rust/ql/lib/codeql/rust/dataflow/internal/ModelsAsData.qll index 067ef98b2fc..a680f20d5f6 100644 --- a/rust/ql/lib/codeql/rust/dataflow/internal/ModelsAsData.qll +++ b/rust/ql/lib/codeql/rust/dataflow/internal/ModelsAsData.qll @@ -47,7 +47,6 @@ private import rust private import codeql.rust.dataflow.FlowSummary private import codeql.rust.dataflow.FlowSource private import codeql.rust.dataflow.FlowSink -private import codeql.rust.elements.internal.CallExprBaseImpl::Impl as CallExprBaseImpl /** * Holds if in a call to the function with canonical path `path`, the value referred diff --git a/rust/ql/lib/codeql/rust/dataflow/internal/Node.qll b/rust/ql/lib/codeql/rust/dataflow/internal/Node.qll index 2191714d6a1..cc738d1dc86 100644 --- a/rust/ql/lib/codeql/rust/dataflow/internal/Node.qll +++ b/rust/ql/lib/codeql/rust/dataflow/internal/Node.qll @@ -14,6 +14,7 @@ private import codeql.rust.controlflow.ControlFlowGraph private import codeql.rust.controlflow.CfgNodes private import codeql.rust.dataflow.Ssa private import codeql.rust.dataflow.FlowSummary +private import codeql.rust.internal.TypeInference as TypeInference private import Node as Node private import DataFlowImpl private import FlowSummaryImpl as FlowSummaryImpl @@ -166,7 +167,7 @@ final class NameNode extends AstNodeNode, TNameNode { */ abstract class ParameterNode extends Node { /** Holds if this node is a parameter of `c` at position `pos`. */ - abstract predicate isParameterOf(DataFlowCallable c, ParameterPosition pos); + abstract predicate isParameterOf(DataFlowCallable c, RustDataFlow::ParameterPosition pos); } final class SourceParameterNode extends AstNodeNode, ParameterNode, TSourceParameterNode { @@ -174,12 +175,12 @@ final class SourceParameterNode extends AstNodeNode, ParameterNode, TSourceParam SourceParameterNode() { this = TSourceParameterNode(n) } - override predicate isParameterOf(DataFlowCallable c, ParameterPosition pos) { + override predicate isParameterOf(DataFlowCallable c, RustDataFlow::ParameterPosition pos) { n = pos.getParameterIn(c.asCfgScope().(Callable).getParamList()) } /** Get the parameter position of this parameter. */ - ParameterPosition getPosition() { this.isParameterOf(_, result) } + RustDataFlow::ParameterPosition getPosition() { this.isParameterOf(_, result) } /** Gets the parameter in the CFG that this node corresponds to. */ ParamBase getParameter() { result = n } @@ -187,13 +188,13 @@ final class SourceParameterNode extends AstNodeNode, ParameterNode, TSourceParam /** A parameter for a library callable with a flow summary. */ final class SummaryParameterNode extends ParameterNode, FlowSummaryNode { - private ParameterPosition pos_; + private RustDataFlow::ParameterPosition pos_; SummaryParameterNode() { FlowSummaryImpl::Private::summaryParameterNode(this.getSummaryNode(), pos_) } - override predicate isParameterOf(DataFlowCallable c, ParameterPosition pos) { + override predicate isParameterOf(DataFlowCallable c, RustDataFlow::ParameterPosition pos) { this.getSummarizedCallable() = c.asSummarizedCallable() and pos = pos_ } } @@ -209,7 +210,7 @@ final class ClosureParameterNode extends ParameterNode, TClosureSelfReferenceNod final override CfgScope getCfgScope() { result = cfgScope } - override predicate isParameterOf(DataFlowCallable c, ParameterPosition pos) { + override predicate isParameterOf(DataFlowCallable c, RustDataFlow::ParameterPosition pos) { cfgScope = c.asCfgScope() and pos.isClosureSelf() } @@ -226,7 +227,11 @@ final class ExprArgumentNode extends ArgumentNode, ExprNode { private Call call_; private RustDataFlow::ArgumentPosition pos_; - ExprArgumentNode() { isArgumentForCall(n, call_, pos_) } + ExprArgumentNode() { + isArgumentForCall(n, call_, pos_) and + not TypeInference::implicitDeref(n) and + not TypeInference::implicitBorrow(n) + } override predicate isArgumentOf(DataFlowCall call, RustDataFlow::ArgumentPosition pos) { call.asCall() = call_ and pos = pos_ @@ -234,27 +239,41 @@ final class ExprArgumentNode extends ArgumentNode, ExprNode { } /** - * The receiver of a method call _after_ any implicit borrow or dereferencing - * has taken place. + * A node that represents the value of an expression _after_ implicit dereferencing + * or borrowing. */ -final class ReceiverNode extends ArgumentNode, TReceiverNode { - private Call n; +class DerefBorrowNode extends Node, TDerefBorrowNode { + AstNode n; + boolean isBorrow; - ReceiverNode() { this = TReceiverNode(n, false) } + DerefBorrowNode() { this = TDerefBorrowNode(n, isBorrow, false) } - Expr getReceiver() { result = n.getReceiver() } + AstNode getNode() { result = n } - MethodCallExpr getMethodCall() { result = n } - - override predicate isArgumentOf(DataFlowCall call, RustDataFlow::ArgumentPosition pos) { - call.asCall() = n and pos = TSelfParameterPosition() - } + predicate isBorrow() { isBorrow = true } override CfgScope getCfgScope() { result = n.getEnclosingCfgScope() } - override Location getLocation() { result = this.getReceiver().getLocation() } + override Location getLocation() { result = n.getLocation() } - override string toString() { result = "receiver for " + this.getReceiver() } + override string toString() { + if isBorrow = true then result = n + " [borrowed]" else result = n + " [dereferenced]" + } +} + +/** + * A node that represents the value of an argument of a call _after_ implicit + * dereferencing or borrowing. + */ +final class DerefBorrowArgNode extends DerefBorrowNode, ArgumentNode { + private DataFlowCall call_; + private RustDataFlow::ArgumentPosition pos_; + + DerefBorrowArgNode() { isArgumentForCall(n, call_.asCall(), pos_) } + + override predicate isArgumentOf(DataFlowCall call, RustDataFlow::ArgumentPosition pos) { + call = call_ and pos = pos_ + } } final class SummaryArgumentNode extends FlowSummaryNode, ArgumentNode { @@ -275,13 +294,12 @@ final class SummaryArgumentNode extends FlowSummaryNode, ArgumentNode { * passed into the closure body at an invocation. */ final class ClosureArgumentNode extends ArgumentNode, ExprNode { - private CallExpr call_; + private Call call_; ClosureArgumentNode() { lambdaCallExpr(call_, _, this.asExpr()) } override predicate isArgumentOf(DataFlowCall call, RustDataFlow::ArgumentPosition pos) { - call.asCall() = call_ and - pos.isClosureSelf() + call.asCall() = call_ and pos.isClosureSelf() } } @@ -329,15 +347,73 @@ abstract class OutNode extends Node { } final private class ExprOutNode extends ExprNode, OutNode { - ExprOutNode() { this.asExpr() instanceof Call } + ExprOutNode() { + exists(Call call | + call = this.asExpr() and + not call instanceof DerefExpr and // Handled by `DerefOutNode` + not call instanceof IndexExpr // Handled by `IndexOutNode` + ) + } - /** Gets the underlying call CFG node that includes this out node. */ + /** Gets the underlying call node that includes this out node. */ override DataFlowCall getCall(ReturnKind kind) { result.asCall() = n and kind = TNormalReturnKind() } } +/** + * A node that represents the value of a `*` expression _before_ implicit + * dereferencing: + * + * `*v` equivalent to `*Deref::deref(&v)`, and this node represents the + * `Deref::deref(&v)` part. + */ +class DerefOutNode extends OutNode, TDerefOutNode { + DerefExpr de; + + DerefOutNode() { this = TDerefOutNode(de, false) } + + DerefExpr getDerefExpr() { result = de } + + override CfgScope getCfgScope() { result = de.getEnclosingCfgScope() } + + override DataFlowCall getCall(ReturnKind kind) { + result.asCall() = de and + kind = TNormalReturnKind() + } + + override Location getLocation() { result = de.getLocation() } + + override string toString() { result = de.toString() + " [pre-dereferenced]" } +} + +/** + * A node that represents the value of a `x[y]` expression _before_ implicit + * dereferencing: + * + * `x[y]` equivalent to `*x.index(y)`, and this node represents the + * `x.index(y)` part. + */ +class IndexOutNode extends OutNode, TIndexOutNode { + IndexExpr ie; + + IndexOutNode() { this = TIndexOutNode(ie, false) } + + IndexExpr getIndexExpr() { result = ie } + + override CfgScope getCfgScope() { result = ie.getEnclosingCfgScope() } + + override DataFlowCall getCall(ReturnKind kind) { + result.asCall() = ie and + kind = TNormalReturnKind() + } + + override Location getLocation() { result = ie.getLocation() } + + override string toString() { result = ie.toString() + " [pre-dereferenced]" } +} + final class SummaryOutNode extends FlowSummaryNode, OutNode { private DataFlowCall call; private ReturnKind kind_; @@ -402,16 +478,41 @@ final class ExprPostUpdateNode extends PostUpdateNode, TExprPostUpdateNode { override Location getLocation() { result = e.getLocation() } } -final class ReceiverPostUpdateNode extends PostUpdateNode, TReceiverNode { - private Call call; +final class DerefBorrowPostUpdateNode extends PostUpdateNode, TDerefBorrowNode { + private Expr arg; + private boolean isBorrow; - ReceiverPostUpdateNode() { this = TReceiverNode(call, true) } + DerefBorrowPostUpdateNode() { this = TDerefBorrowNode(arg, isBorrow, true) } - override Node getPreUpdateNode() { result = TReceiverNode(call, false) } + override DerefBorrowNode getPreUpdateNode() { result = TDerefBorrowNode(arg, isBorrow, false) } - override CfgScope getCfgScope() { result = call.getEnclosingCfgScope() } + override CfgScope getCfgScope() { result = arg.getEnclosingCfgScope() } - override Location getLocation() { result = call.getReceiver().getLocation() } + override Location getLocation() { result = arg.getLocation() } +} + +class DerefOutPostUpdateNode extends PostUpdateNode, TDerefOutNode { + DerefExpr de; + + DerefOutPostUpdateNode() { this = TDerefOutNode(de, true) } + + override DerefOutNode getPreUpdateNode() { result = TDerefOutNode(de, false) } + + override CfgScope getCfgScope() { result = de.getEnclosingCfgScope() } + + override Location getLocation() { result = de.getLocation() } +} + +class IndexOutPostUpdateNode extends PostUpdateNode, TIndexOutNode { + IndexExpr ie; + + IndexOutPostUpdateNode() { this = TIndexOutNode(ie, true) } + + override IndexOutNode getPreUpdateNode() { result = TIndexOutNode(ie, false) } + + override CfgScope getCfgScope() { result = ie.getEnclosingCfgScope() } + + override Location getLocation() { result = ie.getLocation() } } final class SummaryPostUpdateNode extends FlowSummaryNode, PostUpdateNode { @@ -452,7 +553,10 @@ newtype TNode = TExprPostUpdateNode(Expr e) { e.hasEnclosingCfgScope() and ( - isArgumentForCall(e, _, _) + isArgumentForCall(e, _, _) and + // For compound assignments into variables like `x += y`, we do not want flow into + // `[post] x`, as that would create spurious flow when `x` is a parameter. + not (e = any(CompoundAssignmentExpr cae).getLhs() and e instanceof VariableAccess) or lambdaCallExpr(_, _, e) or @@ -464,22 +568,22 @@ newtype TNode = or e = [ - any(IndexExpr i).getBase(), // any(FieldExpr access).getContainer(), // any(TryExpr try).getExpr(), // - any(PrefixExpr pe | pe.getOperatorName() = "*").getExpr(), // any(AwaitExpr a).getExpr(), // - any(MethodCallExpr mc).getReceiver(), // getPostUpdateReverseStep(any(PostUpdateNode n).getPreUpdateNode().asExpr(), _) ] ) } or - TReceiverNode(Call call, Boolean isPost) { - call.hasEnclosingCfgScope() and - call.receiverImplicitlyBorrowed() and - // TODO: Handle index expressions as calls in data flow. - not call instanceof IndexExpr + TDerefBorrowNode(AstNode n, boolean borrow, Boolean isPost) { + TypeInference::implicitDeref(n) and + borrow = false + or + TypeInference::implicitBorrow(n) and + borrow = true } or + TDerefOutNode(DerefExpr de, Boolean isPost) or + TIndexOutNode(IndexExpr ie, Boolean isPost) or TSsaNode(SsaImpl::DataFlowIntegration::SsaNode node) or TFlowSummaryNode(FlowSummaryImpl::Private::SummaryNode sn) { forall(AstNode n | n = sn.getSinkElement() or n = sn.getSourceElement() | diff --git a/rust/ql/lib/codeql/rust/dataflow/internal/SsaImpl.qll b/rust/ql/lib/codeql/rust/dataflow/internal/SsaImpl.qll index 29674cbd1df..03db7c35b4d 100644 --- a/rust/ql/lib/codeql/rust/dataflow/internal/SsaImpl.qll +++ b/rust/ql/lib/codeql/rust/dataflow/internal/SsaImpl.qll @@ -154,7 +154,7 @@ private predicate variableWriteInOuterScope(BasicBlock bb, int i, Variable v, Cf } /** Holds if evaluating `e` jumps to the evaluation of a different CFG scope. */ -private predicate isControlFlowJump(Expr e) { e instanceof CallExprBase or e instanceof AwaitExpr } +private predicate isControlFlowJump(Expr e) { e instanceof Call or e instanceof AwaitExpr } /** * Holds if the call `call` at index `i` in basic block `bb` may reach @@ -325,10 +325,8 @@ private module DataFlowIntegrationInput implements Impl::DataFlowIntegrationInpu predicate ssaDefHasSource(WriteDefinition def) { none() } // handled in `DataFlowImpl.qll` instead - private predicate isArg(CallExprBase call, Expr e) { - call.getAnArg() = e - or - call.(MethodCallExpr).getReceiver() = e + private predicate isArg(Call call, Expr e) { + call.getASyntacticArgument() = e or exists(Expr mid | isArg(call, mid) and diff --git a/rust/ql/lib/codeql/rust/dataflow/internal/TaintTrackingImpl.qll b/rust/ql/lib/codeql/rust/dataflow/internal/TaintTrackingImpl.qll index 544bed64730..3bb35085484 100644 --- a/rust/ql/lib/codeql/rust/dataflow/internal/TaintTrackingImpl.qll +++ b/rust/ql/lib/codeql/rust/dataflow/internal/TaintTrackingImpl.qll @@ -20,18 +20,6 @@ module RustTaintTracking implements InputSig { Stages::DataFlowStage::ref() and model = "" and ( - exists(BinaryExpr binary | - binary.getOperatorName() = ["+", "-", "*", "/", "%", "&", "|", "^", "<<", ">>"] and - pred.asExpr() = [binary.getLhs(), binary.getRhs()] and - succ.asExpr() = binary - ) - or - exists(PrefixExpr prefix | - prefix.getOperatorName() = ["-", "!"] and - pred.asExpr() = prefix.getExpr() and - succ.asExpr() = prefix - ) - or pred.asExpr() = succ.asExpr().(CastExpr).getExpr() or exists(IndexExpr index | @@ -65,6 +53,9 @@ module RustTaintTracking implements InputSig { or succ.(Node::PostUpdateNode).getPreUpdateNode().asExpr() = getPostUpdateReverseStep(pred.(Node::PostUpdateNode).getPreUpdateNode().asExpr(), false) + or + indexAssignment(any(CompoundAssignmentExpr cae), + pred.(Node::PostUpdateNode).getPreUpdateNode().asExpr(), _, succ, _) ) or FlowSummaryImpl::Private::Steps::summaryLocalStep(pred.(Node::FlowSummaryNode).getSummaryNode(), diff --git a/rust/ql/lib/codeql/rust/elements.qll b/rust/ql/lib/codeql/rust/elements.qll index b42a93efc6c..9c7d0be306f 100644 --- a/rust/ql/lib/codeql/rust/elements.qll +++ b/rust/ql/lib/codeql/rust/elements.qll @@ -38,7 +38,6 @@ import codeql.rust.elements.BlockExpr import codeql.rust.elements.BoxPat import codeql.rust.elements.BreakExpr import codeql.rust.elements.CallExpr -import codeql.rust.elements.CallExprBase import codeql.rust.elements.Callable import codeql.rust.elements.CastExpr import codeql.rust.elements.ClosureExpr diff --git a/rust/ql/lib/codeql/rust/elements/Call.qll b/rust/ql/lib/codeql/rust/elements/Call.qll index 0fd7f1397e2..3a14425df1e 100644 --- a/rust/ql/lib/codeql/rust/elements/Call.qll +++ b/rust/ql/lib/codeql/rust/elements/Call.qll @@ -1,9 +1,11 @@ /** - * This module provides the public class `Call`. + * This module provides the public classes `Call` and `MethodCall`. */ +private import rust private import internal.CallImpl - -final class ArgumentPosition = Impl::ArgumentPosition; +private import internal.CallExprImpl::Impl as CallExprImpl final class Call = Impl::Call; + +final class MethodCall = Impl::MethodCall; diff --git a/rust/ql/lib/codeql/rust/elements/CallExpr.qll b/rust/ql/lib/codeql/rust/elements/CallExpr.qll index ab5631b07ca..1344af3a124 100644 --- a/rust/ql/lib/codeql/rust/elements/CallExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/CallExpr.qll @@ -4,16 +4,20 @@ */ private import internal.CallExprImpl -import codeql.rust.elements.CallExprBase +import codeql.rust.elements.ArgList +import codeql.rust.elements.Attr import codeql.rust.elements.Expr /** - * A function call expression. For example: + * NOTE: Consider using `Call` instead, as that excludes call expressions that are + * instantiations of tuple structs and tuple variants. + * + * A call expression. For example: * ```rust * foo(42); * foo::(42); * foo[0](42); - * foo(1) = 4; + * Option::Some(42); // tuple variant instantiation * ``` */ final class CallExpr = Impl::CallExpr; diff --git a/rust/ql/lib/codeql/rust/elements/CallExprBase.qll b/rust/ql/lib/codeql/rust/elements/CallExprBase.qll deleted file mode 100644 index d59c4c705f7..00000000000 --- a/rust/ql/lib/codeql/rust/elements/CallExprBase.qll +++ /dev/null @@ -1,14 +0,0 @@ -// generated by codegen, do not edit -/** - * This module provides the public class `CallExprBase`. - */ - -private import internal.CallExprBaseImpl -import codeql.rust.elements.ArgList -import codeql.rust.elements.Attr -import codeql.rust.elements.Expr - -/** - * A function or method call expression. See `CallExpr` and `MethodCallExpr` for further details. - */ -final class CallExprBase = Impl::CallExprBase; diff --git a/rust/ql/lib/codeql/rust/elements/InvocationExpr.qll b/rust/ql/lib/codeql/rust/elements/InvocationExpr.qll new file mode 100644 index 00000000000..315c6bdef84 --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/InvocationExpr.qll @@ -0,0 +1,9 @@ +/** + * This module provides the public classes `InvocationExpr` and `ArgumentPosition`. + */ + +private import internal.InvocationExprImpl + +final class InvocationExpr = Impl::InvocationExpr; + +final class ArgumentPosition = Impl::ArgumentPosition; diff --git a/rust/ql/lib/codeql/rust/elements/Method.qll b/rust/ql/lib/codeql/rust/elements/Method.qll new file mode 100644 index 00000000000..e29b7acae9c --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/Method.qll @@ -0,0 +1,22 @@ +/** + * This module provides the public class `Method`. + */ + +private import rust + +/** + * A method declaration. For example + * ```rust + * fn foo(self, x: u32) -> u64 { (x + 1).into() } + * ``` + * + * A method declaration within a trait might not have a body: + * ```rust + * trait Trait { + * fn bar(self); + * } + * ``` + */ +final class Method extends Function { + Method() { this.hasSelfParam() } +} diff --git a/rust/ql/lib/codeql/rust/elements/MethodCallExpr.qll b/rust/ql/lib/codeql/rust/elements/MethodCallExpr.qll index fca8b086134..3ac0fccc42d 100644 --- a/rust/ql/lib/codeql/rust/elements/MethodCallExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/MethodCallExpr.qll @@ -4,12 +4,17 @@ */ private import internal.MethodCallExprImpl -import codeql.rust.elements.CallExprBase +import codeql.rust.elements.ArgList +import codeql.rust.elements.Attr import codeql.rust.elements.Expr import codeql.rust.elements.GenericArgList import codeql.rust.elements.NameRef /** + * NOTE: Consider using `MethodCall` instead, as that also includes calls to methods using + * call syntax (such as `Foo::method(x)`), operation syntax (such as `x + y`), and + * indexing syntax (such as `x[y]`). + * * A method call expression. For example: * ```rust * x.foo(42); diff --git a/rust/ql/lib/codeql/rust/elements/TupleField.qll b/rust/ql/lib/codeql/rust/elements/TupleField.qll index 9dcfaa4fb33..3e63f377aeb 100644 --- a/rust/ql/lib/codeql/rust/elements/TupleField.qll +++ b/rust/ql/lib/codeql/rust/elements/TupleField.qll @@ -10,7 +10,7 @@ import codeql.rust.elements.TypeRepr import codeql.rust.elements.Visibility /** - * A field in a tuple struct or tuple enum variant. + * A field in a tuple struct or tuple variant. * * For example: * ```rust diff --git a/rust/ql/lib/codeql/rust/elements/TupleFieldList.qll b/rust/ql/lib/codeql/rust/elements/TupleFieldList.qll index 0c464944993..f2651228a78 100644 --- a/rust/ql/lib/codeql/rust/elements/TupleFieldList.qll +++ b/rust/ql/lib/codeql/rust/elements/TupleFieldList.qll @@ -8,7 +8,7 @@ import codeql.rust.elements.FieldList import codeql.rust.elements.TupleField /** - * A list of fields in a tuple struct or tuple enum variant. + * A list of fields in a tuple struct or tuple variant. * * For example: * ```rust diff --git a/rust/ql/lib/codeql/rust/elements/TupleStructExpr.qll b/rust/ql/lib/codeql/rust/elements/TupleStructExpr.qll new file mode 100644 index 00000000000..88da6aaa1cf --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/TupleStructExpr.qll @@ -0,0 +1,7 @@ +/** + * This module provides the public class `TupleStructExpr`. + */ + +private import internal.CallExprImpl + +final class TupleStructExpr = Impl::TupleStructExpr; diff --git a/rust/ql/lib/codeql/rust/elements/TupleVariantExpr.qll b/rust/ql/lib/codeql/rust/elements/TupleVariantExpr.qll new file mode 100644 index 00000000000..9afd18ea0d9 --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/TupleVariantExpr.qll @@ -0,0 +1,7 @@ +/** + * This module provides the public class `TupleVariantExpr`. + */ + +private import internal.CallExprImpl + +final class TupleVariantExpr = Impl::TupleVariantExpr; diff --git a/rust/ql/lib/codeql/rust/elements/internal/CallExprBaseImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CallExprBaseImpl.qll deleted file mode 100644 index 05d5aee7a06..00000000000 --- a/rust/ql/lib/codeql/rust/elements/internal/CallExprBaseImpl.qll +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This module provides a hand-modifiable wrapper around the generated class `CallExprBase`. - * - * INTERNAL: Do not use. - */ - -private import codeql.rust.elements.internal.generated.CallExprBase - -/** - * INTERNAL: This module contains the customizable definition of `CallExprBase` and should not - * be referenced directly. - */ -module Impl { - private import rust - private import codeql.rust.internal.TypeInference as TypeInference - - // the following QLdoc is generated: if you need to edit it, do it in the schema file - /** - * A function or method call expression. See `CallExpr` and `MethodCallExpr` for further details. - */ - class CallExprBase extends Generated::CallExprBase { - /** Gets the static target (function or tuple struct/variant) of this call, if any. */ - final Addressable getStaticTarget() { result = TypeInference::resolveCallTarget(this) } - - override Expr getArg(int index) { result = this.getArgList().getArg(index) } - } -} diff --git a/rust/ql/lib/codeql/rust/elements/internal/CallExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CallExprImpl.qll index 5723e1fdbb5..cad921640ef 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/CallExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/CallExprImpl.qll @@ -5,7 +5,6 @@ */ private import codeql.rust.elements.internal.generated.CallExpr -private import codeql.rust.elements.PathExpr /** * INTERNAL: This module contains the customizable definition of `CallExpr` and should not @@ -13,7 +12,10 @@ private import codeql.rust.elements.PathExpr */ module Impl { private import rust + private import codeql.rust.elements.internal.InvocationExprImpl::Impl as InvocationExprImpl + private import codeql.rust.elements.internal.CallImpl::Impl as CallImpl private import codeql.rust.internal.PathResolution as PathResolution + private import codeql.rust.internal.TypeInference as TypeInference pragma[nomagic] Path getFunctionPath(CallExpr ce) { result = ce.getFunction().(PathExpr).getPath() } @@ -23,9 +25,31 @@ module Impl { result = PathResolution::resolvePath(getFunctionPath(ce)) } + private Expr getSyntacticArg(CallExpr ce, int i) { result = ce.getArgList().getArg(i) } + // the following QLdoc is generated: if you need to edit it, do it in the schema file /** - * A function call expression. For example: + * NOTE: Consider using `Call` instead, as that excludes call expressions that are + * instantiations of tuple structs and tuple variants. + * + * A call expression. For example: + * ```rust + * foo(42); + * foo::(42); + * foo[0](42); + * Option::Some(42); // tuple variant instantiation + * ``` + */ + class CallExpr extends Generated::CallExpr, InvocationExprImpl::InvocationExpr { + override string toStringImpl() { result = this.getFunction().toAbbreviatedString() + "(...)" } + + override Expr getSyntacticPositionalArgument(int i) { result = getSyntacticArg(this, i) } + } + + /** + * A call expression that is _not_ an instantiation of a tuple struct or a tuple variant. + * + * For example: * ```rust * foo(42); * foo::(42); @@ -33,33 +57,102 @@ module Impl { * foo(1) = 4; * ``` */ - class CallExpr extends Generated::CallExpr { - override string toStringImpl() { result = this.getFunction().toAbbreviatedString() + "(...)" } - - /** Gets the struct that this call resolves to, if any. */ - Struct getStruct() { result = getResolvedFunction(this) } - - /** Gets the variant that this call resolves to, if any. */ - Variant getVariant() { result = getResolvedFunction(this) } - - pragma[nomagic] - private PathResolution::ItemNode getResolvedFunctionAndPos(int pos) { - result = getResolvedFunction(this) and - exists(this.getArg(pos)) + class CallExprCall extends CallExpr, CallImpl::Call { + CallExprCall() { + not this instanceof TupleStructExpr and + not this instanceof TupleVariantExpr } - /** - * Gets the tuple field that matches the `pos`th argument of this call, if any. - * - * For example, if this call is `Option::Some(42)`, then the tuple field matching - * `42` is the first field of `Option::Some`. - */ - pragma[nomagic] - TupleField getTupleField(int pos) { - exists(PathResolution::ItemNode i | i = this.getResolvedFunctionAndPos(pos) | - result.isStructField(i, pos) or - result.isVariantField(i, pos) + override Expr getPositionalArgument(int i) { result = getSyntacticArg(this, i) } + } + + /** + * A call expression that targets a closure (or any value that implements + * `Fn`, `FnMut`, or `FnOnce`). + * + * Dynamic calls never have a static target, and the set of potential + * run-time targets is only available internally to the data flow library. + */ + class DynamicCallExpr extends CallExprCall { + DynamicCallExpr() { + exists(Expr f | f = this.getFunction() | + // All calls to complex expressions and local variable accesses are lambda calls + f instanceof PathExpr implies f = any(Variable v).getAnAccess() ) } } + + /** + * A call expression that is a _potential_ method call. + * + * Note: In order to prevent the AST layer from relying on the type inference + * layer, we do not check that the resolved target is a method in the charpred, + * instead we check this in `getPositionalArgument` and `getReceiver`. + */ + class CallExprMethodCall extends CallImpl::MethodCall, CallExprCall { + CallExprMethodCall() { not this instanceof DynamicCallExpr } + + private predicate isInFactMethodCall() { this.getResolvedTarget() instanceof Method } + + override Expr getPositionalArgument(int i) { + if this.isInFactMethodCall() + then result = getSyntacticArg(this, i + 1) + else result = getSyntacticArg(this, i) + } + + override Expr getReceiver() { + this.isInFactMethodCall() and + result = getSyntacticArg(this, 0) + } + } + + /** + * A call expression that instantiates a tuple struct. + * + * For example: + * ```rust + * struct S(u32, u64); + * let s = S(42, 84); + * ``` + */ + class TupleStructExpr extends CallExpr { + private Struct struct; + + TupleStructExpr() { struct = getResolvedFunction(this) } + + /** Gets the struct that is instantiated. */ + Struct getStruct() { result = struct } + + /** Gets the `i`th tuple field of the instantiated struct. */ + pragma[nomagic] + TupleField getTupleField(int i) { result = this.getStruct().getTupleField(i) } + + override string getAPrimaryQlClass() { result = "TupleStructExpr" } + } + + /** + * A call expression that instantiates a tuple variant. + * + * For example: + * ```rust + * enum E { + * V(u32, u64), + * } + * let e = E::V(42, 84); + * ``` + */ + class TupleVariantExpr extends CallExpr { + private Variant variant; + + TupleVariantExpr() { variant = getResolvedFunction(this) } + + /** Gets the variant that is instantiated. */ + Variant getVariant() { result = variant } + + /** Gets the `i`th tuple field of the instantiated variant. */ + pragma[nomagic] + TupleField getTupleField(int i) { result = this.getVariant().getTupleField(i) } + + override string getAPrimaryQlClass() { result = "TupleVariantExpr" } + } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll index 210820fd105..e35b932242c 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll @@ -1,209 +1,109 @@ private import rust -private import codeql.rust.internal.PathResolution -private import codeql.rust.internal.TypeInference as TypeInference -private import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl -private import codeql.rust.elements.Operation module Impl { - newtype TArgumentPosition = - TPositionalArgumentPosition(int i) { - i in [0 .. max([any(ParamList l).getNumberOfParams(), any(ArgList l).getNumberOfArgs()]) - 1] - } or - TSelfArgumentPosition() - - /** An argument position in a call. */ - class ArgumentPosition extends TArgumentPosition { - /** Gets the index of the argument in the call, if this is a positional argument. */ - int asPosition() { this = TPositionalArgumentPosition(result) } - - /** Holds if this call position is a self argument. */ - predicate isSelf() { this instanceof TSelfArgumentPosition } - - /** Gets a string representation of this argument position. */ - string toString() { - result = this.asPosition().toString() - or - this.isSelf() and result = "self" - } - } + private import codeql.rust.internal.TypeInference as TypeInference + private import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl + private import codeql.rust.elements.internal.InvocationExprImpl::Impl as InvocationExprImpl /** - * An expression that calls a function. + * A call. * - * This class abstracts over the different ways in which a function can be - * called in Rust. + * Either + * + * - a `CallExpr` that is _not_ an instantiation of a tuple struct or a tuple variant, + * - a `MethodCallExpr`, + * - an `Operation` that targets an overloadable operator, or + * - an `IndexExpr`. */ - abstract class Call extends ExprImpl::Expr { - /** Holds if the receiver of this call is implicitly borrowed. */ - predicate receiverImplicitlyBorrowed() { this.implicitBorrowAt(TSelfArgumentPosition(), _) } + abstract class Call extends InvocationExprImpl::InvocationExpr { + /** + * Gets the argument at position `pos` of this call. + * + * Examples: + * ```rust + * foo(42, "bar"); // `42` is argument 0 and `"bar"` is argument 1 + * foo.bar(42); // `foo` is receiver and `42` is argument 0 + * Foo::bar(foo, 42); // `foo` is receiver and `42` is argument 0 + * x + y; // `x` is receiver and `y` is argument 0 + * -x; // `x` is receiver + * x[y]; // `x` is receiver and `y` is argument 0 + * ``` + */ + final Expr getArgument(ArgumentPosition pos) { + result = this.getPositionalArgument(pos.asPosition()) + or + pos.isSelf() and + result = this.(MethodCall).getReceiver() + } - /** Gets the trait targeted by this call, if any. */ - abstract Trait getTrait(); + /** Gets an argument of this call. */ + Expr getAnArgument() { result = this.getArgument(_) } - /** Holds if this call targets a trait. */ - predicate hasTrait() { exists(this.getTrait()) } + /** + * Gets the `i`th positional argument of this call. + * + * Examples: + * ```rust + * foo(42, "bar"); // `42` is argument 0 and `"bar"` is argument 1 + * foo.bar(42); // `42` is argument 0 + * Foo::bar(foo, 42); // `42` is argument 0 + * x + y; // `y` is argument 0 + * -x; // no positional arguments + * x[y]; // `y` is argument 0 + * ``` + */ + Expr getPositionalArgument(int i) { none() } - /** Gets the name of the method called if this call is a method call. */ - abstract string getMethodName(); + /** Gets a positional argument of this expression. */ + Expr getAPositionalArgument() { result = this.getPositionalArgument(_) } - /** Gets the argument at the given position, if any. */ - abstract Expr getArgument(ArgumentPosition pos); + /** Gets the number of positional arguments of this expression. */ + int getNumberOfPositionalArguments() { + result = count(Expr arg | arg = this.getPositionalArgument(_)) + } - /** Holds if the argument at `pos` might be implicitly borrowed. */ - abstract predicate implicitBorrowAt(ArgumentPosition pos, boolean certain); + /** Gets the resolved target of this call, if any. */ + Function getStaticTarget() { result = TypeInference::resolveCallTarget(this, _) } - /** Gets the number of arguments _excluding_ any `self` argument. */ - int getNumberOfArguments() { result = count(this.getArgument(TPositionalArgumentPosition(_))) } - - /** Gets the `i`th argument of this call, if any. */ - Expr getPositionalArgument(int i) { result = this.getArgument(TPositionalArgumentPosition(i)) } - - /** Gets the receiver of this call if it is a method call. */ - Expr getReceiver() { result = this.getArgument(TSelfArgumentPosition()) } - - /** Gets the static target of this call, if any. */ - Function getStaticTarget() { result = TypeInference::resolveCallTarget(this) } + /** Gets the name of the function called, if any. */ + string getTargetName() { result = this.getStaticTarget().getName().getText() } /** Gets a runtime target of this call, if any. */ pragma[nomagic] Function getARuntimeTarget() { result.hasImplementation() and ( - result = this.getStaticTarget() + result = TypeInference::resolveCallTarget(this, _) or - result.implements(this.getStaticTarget()) + result.implements(TypeInference::resolveCallTarget(this, true)) ) } } - private predicate callHasQualifier(CallExpr call, Path path, Path qualifier) { - path = call.getFunction().(PathExpr).getPath() and - qualifier = path.getQualifier() - } - - private predicate callHasTraitQualifier(CallExpr call, Trait qualifier) { - exists(RelevantPath qualifierPath | - callHasQualifier(call, _, qualifierPath) and - qualifier = resolvePath(qualifierPath) and - // When the qualifier is `Self` and resolves to a trait, it's inside a - // trait method's default implementation. This is not a dispatch whose - // target is inferred from the type of the receiver, but should always - // resolve to the function in the trait block as path resolution does. - not qualifierPath.isUnqualified("Self") - ) - } - - /** Holds if the call expression dispatches to a method. */ - private predicate callIsMethodCall( - CallExpr call, Path qualifier, string methodName, boolean selfIsRef - ) { - exists(Path path, Function f | - callHasQualifier(call, path, qualifier) and - f = resolvePath(path) and - path.getSegment().getIdentifier().getText() = methodName and - exists(SelfParam self | - self = f.getSelfParam() and - if self.isRef() then selfIsRef = true else selfIsRef = false - ) - ) - } - - class CallExprCall extends Call instanceof CallExpr { - CallExprCall() { not callIsMethodCall(this, _, _, _) } - - override string getMethodName() { none() } - - override Trait getTrait() { callHasTraitQualifier(this, result) } - - override predicate implicitBorrowAt(ArgumentPosition pos, boolean certain) { none() } - - override Expr getArgument(ArgumentPosition pos) { - result = super.getArgList().getArg(pos.asPosition()) - } - } - - class CallExprMethodCall extends Call instanceof CallExpr { - string methodName; - boolean selfIsRef; - - CallExprMethodCall() { callIsMethodCall(this, _, methodName, selfIsRef) } - + /** + * A method call. + * + * Either + * + * - a `CallExpr` where we can resolve the target as a method, + * - a `MethodCallExpr`, + * - an `Operation` that targets an overloadable operator, or + * - an `IndexExpr`. + */ + abstract class MethodCall extends Call { /** - * Holds if this call must have an explicit borrow for the `self` argument, - * because the corresponding parameter is `&self`. Explicit borrows are not - * needed when using method call syntax. + * Gets the receiver of this method call. + * + * Examples: + * ```rust + * foo(42, "bar"); // no receiver + * foo.bar(42); // `foo` is receiver + * Foo::bar(foo, 42); // `foo` is receiver + * x + y; // `x` is receiver + * -x; // `x` is receiver + * x[y]; // `x` is receiver + * ``` */ - predicate hasExplicitSelfBorrow() { selfIsRef = true } - - override string getMethodName() { result = methodName } - - override Trait getTrait() { callHasTraitQualifier(this, result) } - - override predicate implicitBorrowAt(ArgumentPosition pos, boolean certain) { none() } - - override Expr getArgument(ArgumentPosition pos) { - pos.isSelf() and result = super.getArgList().getArg(0) - or - result = super.getArgList().getArg(pos.asPosition() + 1) - } - } - - private class MethodCallExprCall extends Call instanceof MethodCallExpr { - override string getMethodName() { result = super.getIdentifier().getText() } - - override Trait getTrait() { none() } - - override predicate implicitBorrowAt(ArgumentPosition pos, boolean certain) { - pos.isSelf() and certain = false - } - - override Expr getArgument(ArgumentPosition pos) { - pos.isSelf() and result = this.(MethodCallExpr).getReceiver() - or - result = super.getArgList().getArg(pos.asPosition()) - } - } - - private class OperatorCall extends Call instanceof Operation { - Trait trait; - string methodName; - int borrows; - - OperatorCall() { super.isOverloaded(trait, methodName, borrows) } - - override string getMethodName() { result = methodName } - - override Trait getTrait() { result = trait } - - override predicate implicitBorrowAt(ArgumentPosition pos, boolean certain) { - ( - pos.isSelf() and borrows >= 1 - or - pos.asPosition() = 0 and borrows = 2 - ) and - certain = true - } - - override Expr getArgument(ArgumentPosition pos) { - pos.isSelf() and result = super.getOperand(0) - or - pos.asPosition() = 0 and result = super.getOperand(1) - } - } - - private class IndexCall extends Call instanceof IndexExpr { - override string getMethodName() { result = "index" } - - override Trait getTrait() { result.getCanonicalPath() = "core::ops::index::Index" } - - override predicate implicitBorrowAt(ArgumentPosition pos, boolean certain) { - pos.isSelf() and certain = true - } - - override Expr getArgument(ArgumentPosition pos) { - pos.isSelf() and result = super.getBase() - or - pos.asPosition() = 0 and result = super.getIndex() - } + Expr getReceiver() { none() } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ConstImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ConstImpl.qll index 0234f7cf730..44114674a56 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ConstImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ConstImpl.qll @@ -5,6 +5,8 @@ */ private import codeql.rust.elements.internal.generated.Const +private import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl +private import codeql.rust.elements.internal.IdentPatImpl::Impl as IdentPatImpl private import codeql.rust.elements.internal.PathExprImpl::Impl as PathExprImpl private import codeql.rust.internal.PathResolution @@ -36,14 +38,30 @@ module Impl { * } * ``` */ - class ConstAccess extends PathExprImpl::PathExpr { - private Const c; - - ConstAccess() { c = resolvePath(this.getPath()) } - + abstract class ConstAccess extends AstNodeImpl::AstNode { /** Gets the constant being accessed. */ - Const getConst() { result = c } + abstract Const getConst(); override string getAPrimaryQlClass() { result = "ConstAccess" } } + + private class PathExprConstAccess extends ConstAccess, PathExprImpl::PathExpr { + private Const c; + + PathExprConstAccess() { c = resolvePath(this.getPath()) } + + override Const getConst() { result = c } + + override string getAPrimaryQlClass() { result = ConstAccess.super.getAPrimaryQlClass() } + } + + private class IdentPatConstAccess extends ConstAccess, IdentPatImpl::IdentPat { + private Const c; + + IdentPatConstAccess() { c = resolvePath(this) } + + override Const getConst() { result = c } + + override string getAPrimaryQlClass() { result = ConstAccess.super.getAPrimaryQlClass() } + } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/EnumImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/EnumImpl.qll index e57a416fa72..3862cc42137 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/EnumImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/EnumImpl.qll @@ -31,5 +31,23 @@ module Impl { result = this.getVariantList().getAVariant() and result.getName().getText() = name } + + /** + * Holds if this is a field-less enum, that is, an enum where no constructors contain fields. + * + * See: https://doc.rust-lang.org/reference/items/enumerations.html#r-items.enum.fieldless + */ + predicate isFieldless() { + forall(Variant v | v = this.getVariantList().getAVariant() | v.getNumberOfFields() = 0) + } + + /** + * Holds if this is a unit-only enum, that is, an enum where all constructors are unit variants. + * + * See: https://doc.rust-lang.org/reference/items/enumerations.html#r-items.enum.unit-only + */ + predicate isUnitOnly() { + forall(Variant v | v = this.getVariantList().getAVariant() | v.isUnit()) + } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/FieldExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/FieldExprImpl.qll index 2c037aa475a..469a8ccc05d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/FieldExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/FieldExprImpl.qll @@ -23,10 +23,10 @@ module Impl { */ class FieldExpr extends Generated::FieldExpr { /** Gets the record field that this access references, if any. */ - StructField getStructField() { result = TypeInference::resolveStructFieldExpr(this) } + StructField getStructField() { result = TypeInference::resolveStructFieldExpr(this, _) } /** Gets the tuple field that this access references, if any. */ - TupleField getTupleField() { result = TypeInference::resolveTupleFieldExpr(this) } + TupleField getTupleField() { result = TypeInference::resolveTupleFieldExpr(this, _) } override string toStringImpl() { exists(string abbr, string name | diff --git a/rust/ql/lib/codeql/rust/elements/internal/FormatTemplateVariableAccessImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/FormatTemplateVariableAccessImpl.qll index adb12a35931..35154ae0acb 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/FormatTemplateVariableAccessImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/FormatTemplateVariableAccessImpl.qll @@ -31,6 +31,8 @@ module Impl { override string toStringImpl() { result = this.getName() } + override string getAPrimaryQlClass() { result = "FormatTemplateVariableAccess" } + /** Gets the name of the variable */ string getName() { result = argument.getName() } diff --git a/rust/ql/lib/codeql/rust/elements/internal/IndexExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/IndexExprImpl.qll index 66c33b4a0b1..f5336497e28 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/IndexExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/IndexExprImpl.qll @@ -4,6 +4,7 @@ * INTERNAL: Do not use. */ +private import rust private import codeql.rust.elements.internal.generated.IndexExpr /** @@ -11,6 +12,8 @@ private import codeql.rust.elements.internal.generated.IndexExpr * be referenced directly. */ module Impl { + private import codeql.rust.elements.internal.CallImpl::Impl as CallImpl + // the following QLdoc is generated: if you need to edit it, do it in the schema file /** * An index expression. For example: @@ -19,10 +22,20 @@ module Impl { * list[42] = 1; * ``` */ - class IndexExpr extends Generated::IndexExpr { + class IndexExpr extends Generated::IndexExpr, CallImpl::MethodCall { override string toStringImpl() { result = this.getBase().toAbbreviatedString() + "[" + this.getIndex().toAbbreviatedString() + "]" } + + override Expr getSyntacticPositionalArgument(int i) { + i = 0 and result = this.getBase() + or + i = 1 and result = this.getIndex() + } + + override Expr getPositionalArgument(int i) { i = 0 and result = this.getIndex() } + + override Expr getReceiver() { result = this.getBase() } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/InvocationExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/InvocationExprImpl.qll new file mode 100644 index 00000000000..e1db44eb4d1 --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/internal/InvocationExprImpl.qll @@ -0,0 +1,99 @@ +private import rust + +module Impl { + private import codeql.rust.internal.TypeInference as TypeInference + private import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl + + private newtype TArgumentPosition = + TPositionalArgumentPosition(int i) { + i in [0 .. max([any(ParamList l).getNumberOfParams(), any(ArgList l).getNumberOfArgs()]) - 1] + } or + TSelfArgumentPosition() + + /** An argument position in a call. */ + class ArgumentPosition extends TArgumentPosition { + /** Gets the index of the argument in the call, if this is a positional argument. */ + int asPosition() { this = TPositionalArgumentPosition(result) } + + /** Holds if this call position is a self argument. */ + predicate isSelf() { this instanceof TSelfArgumentPosition } + + /** Gets a string representation of this argument position. */ + string toString() { + result = this.asPosition().toString() + or + this.isSelf() and result = "self" + } + } + + /** + * An expression with arguments. + * + * Either a `CallExpr`, a `MethodCallExpr`, an `Operation`, or an `IndexExpr`. + */ + abstract class InvocationExpr extends ExprImpl::Expr { + /** + * Gets the `i`th syntactical argument of this expression. + * + * Examples: + * ```rust + * foo(42, "bar"); // `42` is syntactic argument 0 and `"bar"` is syntactic argument 1 + * foo.bar(42); // `42` is syntactic argument 0 + * Foo::bar(foo, 42); // `foo` is syntactic argument 0 and `42` is syntactic argument 1 + * Option::Some(x); // `x` is syntactic argument 0 + * x + y; // `x` is syntactic argument 0 and `y` is syntactic argument 1 + * -x; // `x` is syntactic argument 0 + * x[y]; // `x` is syntactic argument 0 and `y` is syntactic argument 1 + * ``` + */ + Expr getSyntacticPositionalArgument(int i) { none() } + + /** + * Gets the syntactic receiver of this expression, if any. + * + * Examples: + * ```rust + * foo(42, "bar"); // no syntactic receiver + * foo.bar(42); // `foo` is syntactic receiver + * Foo::bar(foo, 42); // no syntactic receiver + * Option::Some(x); // no syntactic receiver + * x + y; // no syntactic receiver + * -x; // no syntactic receiver + * x[y]; // no syntactic receiver + * ``` + */ + Expr getSyntacticReceiver() { none() } + + /** + * Gets the argument at syntactic position `pos` of this expression. + * + * Examples: + * ```rust + * foo(42, "bar"); // `42` is syntactic argument 0 and `"bar"` is syntactic argument 1 + * foo.bar(42); // `foo` is syntactic receiver and `42` is syntactic argument 0 + * Foo::bar(foo, 42); // `foo` is syntactic argument 0 and `42` is syntactic argument 1 + * Option::Some(x); // `x` is syntactic argument 0 + * x + y; // `x` is syntactic argument 0 and `y` is syntactic argument 1 + * -x; // `x` is syntactic argument 0 + * x[y]; // `x` is syntactic argument 0 and `y` is syntactic argument 1 + * ``` + */ + final Expr getSyntacticArgument(ArgumentPosition pos) { + result = this.getSyntacticPositionalArgument(pos.asPosition()) + or + pos.isSelf() and + result = this.getSyntacticReceiver() + } + + /** Gets a syntactic argument of this expression. */ + Expr getASyntacticArgument() { result = this.getSyntacticArgument(_) } + + /** Gets the number of syntactic arguments of this expression. */ + int getNumberOfSyntacticArguments() { + result = count(Expr arg | arg = this.getSyntacticArgument(_)) + } + + /** Gets the resolved target (function or tuple struct/variant), if any. */ + Addressable getResolvedTarget() { result = TypeInference::resolveCallTarget(this, _) } + } +} diff --git a/rust/ql/lib/codeql/rust/elements/internal/MethodCallExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MethodCallExprImpl.qll index 7617ae456bb..d5fa29b26b2 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MethodCallExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MethodCallExprImpl.qll @@ -12,15 +12,22 @@ private import codeql.rust.elements.internal.generated.MethodCallExpr * be referenced directly. */ module Impl { + private import codeql.rust.elements.internal.CallImpl::Impl as CallImpl + private import codeql.rust.elements.internal.InvocationExprImpl::Impl as InvocationExprImpl + // the following QLdoc is generated: if you need to edit it, do it in the schema file /** + * NOTE: Consider using `MethodCall` instead, as that also includes calls to methods using + * call syntax (such as `Foo::method(x)`), operation syntax (such as `x + y`), and + * indexing syntax (such as `x[y]`). + * * A method call expression. For example: * ```rust * x.foo(42); * x.foo::(42); * ``` */ - class MethodCallExpr extends Generated::MethodCallExpr { + class MethodCallExpr extends Generated::MethodCallExpr, CallImpl::MethodCall { private string toStringPart(int index) { index = 0 and result = this.getReceiver().toAbbreviatedString() @@ -39,7 +46,12 @@ module Impl { result = strictconcat(int i | | this.toStringPart(i) order by i) } - /** Gets the static target of this method call, if any. */ - final Function getStaticTarget() { result = super.getStaticTarget() } + override Expr getSyntacticPositionalArgument(int i) { result = this.getArgList().getArg(i) } + + override Expr getSyntacticReceiver() { result = Generated::MethodCallExpr.super.getReceiver() } + + override Expr getPositionalArgument(int i) { result = this.getArgList().getArg(i) } + + override Expr getReceiver() { result = Generated::MethodCallExpr.super.getReceiver() } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/OperationImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/OperationImpl.qll index f22c95759d6..31e30c8dcb8 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/OperationImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/OperationImpl.qll @@ -7,100 +7,116 @@ private import rust private import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl -/** - * Holds if the operator `op` with arity `arity` is overloaded to a trait with - * the canonical path `path` and the method name `method`, and if it borrows its - * first `borrows` arguments. - */ -predicate isOverloaded(string op, int arity, string path, string method, int borrows) { - arity = 1 and - ( - // Negation - op = "-" and path = "core::ops::arith::Neg" and method = "neg" and borrows = 0 - or - // Not - op = "!" and path = "core::ops::bit::Not" and method = "not" and borrows = 0 - or - // Dereference - op = "*" and path = "core::ops::deref::Deref" and method = "deref" and borrows = 1 - ) - or - arity = 2 and - ( - // Comparison operators - op = "==" and path = "core::cmp::PartialEq" and method = "eq" and borrows = 2 - or - op = "!=" and path = "core::cmp::PartialEq" and method = "ne" and borrows = 2 - or - op = "<" and path = "core::cmp::PartialOrd" and method = "lt" and borrows = 2 - or - op = "<=" and path = "core::cmp::PartialOrd" and method = "le" and borrows = 2 - or - op = ">" and path = "core::cmp::PartialOrd" and method = "gt" and borrows = 2 - or - op = ">=" and path = "core::cmp::PartialOrd" and method = "ge" and borrows = 2 - or - // Arithmetic operators - op = "+" and path = "core::ops::arith::Add" and method = "add" and borrows = 0 - or - op = "-" and path = "core::ops::arith::Sub" and method = "sub" and borrows = 0 - or - op = "*" and path = "core::ops::arith::Mul" and method = "mul" and borrows = 0 - or - op = "/" and path = "core::ops::arith::Div" and method = "div" and borrows = 0 - or - op = "%" and path = "core::ops::arith::Rem" and method = "rem" and borrows = 0 - or - // Arithmetic assignment expressions - op = "+=" and path = "core::ops::arith::AddAssign" and method = "add_assign" and borrows = 1 - or - op = "-=" and path = "core::ops::arith::SubAssign" and method = "sub_assign" and borrows = 1 - or - op = "*=" and path = "core::ops::arith::MulAssign" and method = "mul_assign" and borrows = 1 - or - op = "/=" and path = "core::ops::arith::DivAssign" and method = "div_assign" and borrows = 1 - or - op = "%=" and path = "core::ops::arith::RemAssign" and method = "rem_assign" and borrows = 1 - or - // Bitwise operators - op = "&" and path = "core::ops::bit::BitAnd" and method = "bitand" and borrows = 0 - or - op = "|" and path = "core::ops::bit::BitOr" and method = "bitor" and borrows = 0 - or - op = "^" and path = "core::ops::bit::BitXor" and method = "bitxor" and borrows = 0 - or - op = "<<" and path = "core::ops::bit::Shl" and method = "shl" and borrows = 0 - or - op = ">>" and path = "core::ops::bit::Shr" and method = "shr" and borrows = 0 - or - // Bitwise assignment operators - op = "&=" and path = "core::ops::bit::BitAndAssign" and method = "bitand_assign" and borrows = 1 - or - op = "|=" and path = "core::ops::bit::BitOrAssign" and method = "bitor_assign" and borrows = 1 - or - op = "^=" and path = "core::ops::bit::BitXorAssign" and method = "bitxor_assign" and borrows = 1 - or - op = "<<=" and path = "core::ops::bit::ShlAssign" and method = "shl_assign" and borrows = 1 - or - op = ">>=" and path = "core::ops::bit::ShrAssign" and method = "shr_assign" and borrows = 1 - ) -} - /** * INTERNAL: This module contains the customizable definition of `Operation` and should not * be referenced directly. */ module Impl { + private import codeql.rust.elements.internal.CallImpl::Impl as CallImpl + private import codeql.rust.elements.internal.InvocationExprImpl::Impl as InvocationExprImpl + + /** + * Holds if the operator `op` with arity `arity` is overloaded to a trait with + * the canonical path `path` and the method name `method`, and if it borrows its + * first `borrows` arguments. + */ + predicate isOverloaded(string op, int arity, string path, string method, int borrows) { + arity = 1 and + ( + // Negation + op = "-" and path = "core::ops::arith::Neg" and method = "neg" and borrows = 0 + or + // Not + op = "!" and path = "core::ops::bit::Not" and method = "not" and borrows = 0 + or + // Dereference + op = "*" and path = "core::ops::deref::Deref" and method = "deref" and borrows = 1 + ) + or + arity = 2 and + ( + // Comparison operators + op = "==" and path = "core::cmp::PartialEq" and method = "eq" and borrows = 2 + or + op = "!=" and path = "core::cmp::PartialEq" and method = "ne" and borrows = 2 + or + op = "<" and path = "core::cmp::PartialOrd" and method = "lt" and borrows = 2 + or + op = "<=" and path = "core::cmp::PartialOrd" and method = "le" and borrows = 2 + or + op = ">" and path = "core::cmp::PartialOrd" and method = "gt" and borrows = 2 + or + op = ">=" and path = "core::cmp::PartialOrd" and method = "ge" and borrows = 2 + or + // Arithmetic operators + op = "+" and path = "core::ops::arith::Add" and method = "add" and borrows = 0 + or + op = "-" and path = "core::ops::arith::Sub" and method = "sub" and borrows = 0 + or + op = "*" and path = "core::ops::arith::Mul" and method = "mul" and borrows = 0 + or + op = "/" and path = "core::ops::arith::Div" and method = "div" and borrows = 0 + or + op = "%" and path = "core::ops::arith::Rem" and method = "rem" and borrows = 0 + or + // Arithmetic assignment expressions + op = "+=" and path = "core::ops::arith::AddAssign" and method = "add_assign" and borrows = 1 + or + op = "-=" and path = "core::ops::arith::SubAssign" and method = "sub_assign" and borrows = 1 + or + op = "*=" and path = "core::ops::arith::MulAssign" and method = "mul_assign" and borrows = 1 + or + op = "/=" and path = "core::ops::arith::DivAssign" and method = "div_assign" and borrows = 1 + or + op = "%=" and path = "core::ops::arith::RemAssign" and method = "rem_assign" and borrows = 1 + or + // Bitwise operators + op = "&" and path = "core::ops::bit::BitAnd" and method = "bitand" and borrows = 0 + or + op = "|" and path = "core::ops::bit::BitOr" and method = "bitor" and borrows = 0 + or + op = "^" and path = "core::ops::bit::BitXor" and method = "bitxor" and borrows = 0 + or + op = "<<" and path = "core::ops::bit::Shl" and method = "shl" and borrows = 0 + or + op = ">>" and path = "core::ops::bit::Shr" and method = "shr" and borrows = 0 + or + // Bitwise assignment operators + op = "&=" and + path = "core::ops::bit::BitAndAssign" and + method = "bitand_assign" and + borrows = 1 + or + op = "|=" and path = "core::ops::bit::BitOrAssign" and method = "bitor_assign" and borrows = 1 + or + op = "^=" and + path = "core::ops::bit::BitXorAssign" and + method = "bitxor_assign" and + borrows = 1 + or + op = "<<=" and path = "core::ops::bit::ShlAssign" and method = "shl_assign" and borrows = 1 + or + op = ">>=" and path = "core::ops::bit::ShrAssign" and method = "shr_assign" and borrows = 1 + ) + } + /** * An operation, for example `&&`, `+=`, `!` or `*`. + * + * Overloadable operations are syntatic sugar for method calls, where the + * first operand is the receiver. For example, `x + y` is syntactic sugar + * for `Add::add(x, y)`, and `x += y` is syntactic sugar for + * `AddAssign::add_assign(&mut x, y)`. */ - abstract class Operation extends ExprImpl::Expr { + abstract class Operation extends InvocationExprImpl::InvocationExpr { /** Gets the operator name of this operation, if it exists. */ abstract string getOperatorName(); /** Gets the `n`th operand of this operation, if any. */ abstract Expr getOperand(int n); + override Expr getSyntacticPositionalArgument(int i) { result = this.getOperand(i) } + /** * Gets the number of operands of this operation. * @@ -115,9 +131,18 @@ module Impl { * Holds if this operation is overloaded to the method `methodName` of the * trait `trait`. */ + pragma[nomagic] predicate isOverloaded(Trait trait, string methodName, int borrows) { isOverloaded(this.getOperatorName(), this.getNumberOfOperands(), trait.getCanonicalPath(), methodName, borrows) } } + + private class OperationMethodCall extends CallImpl::MethodCall instanceof Operation { + OperationMethodCall() { super.isOverloaded(_, _, _) } + + override Expr getPositionalArgument(int i) { result = super.getOperand(i + 1) and i >= 0 } + + override Expr getReceiver() { result = super.getOperand(0) } + } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/PathExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/PathExprImpl.qll index 652dc68b3c9..cb2abc45e10 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/PathExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/PathExprImpl.qll @@ -4,6 +4,7 @@ * INTERNAL: Do not use. */ +private import rust private import codeql.rust.elements.internal.generated.PathExpr /** @@ -25,5 +26,11 @@ module Impl { override string toStringImpl() { result = this.toAbbreviatedString() } override string toAbbreviatedString() { result = this.getPath().toStringImpl() } + + override string getAPrimaryQlClass() { + if this instanceof VariableAccess + then result = "VariableAccess" + else result = super.getAPrimaryQlClass() + } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/StructExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/StructExprImpl.qll index 5cbeb62c7a4..d7704894c49 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/StructExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/StructExprImpl.qll @@ -27,6 +27,16 @@ module Impl { class StructExpr extends Generated::StructExpr { override string toStringImpl() { result = this.getPath().toStringImpl() + " {...}" } + private PathResolution::ItemNode getResolvedPath() { + result = PathResolution::resolvePath(this.getPath()) + } + + /** Gets the struct that is instantiated, if any. */ + Struct getStruct() { result = this.getResolvedPath() } + + /** Gets the variant that is instantiated, if any. */ + Variant getVariant() { result = this.getResolvedPath() } + /** Gets the record expression for the field `name`. */ pragma[nomagic] StructExprField getFieldExpr(string name) { @@ -34,19 +44,11 @@ module Impl { name = result.getFieldName() } - pragma[nomagic] - private PathResolution::ItemNode getResolvedPath(string name) { - result = PathResolution::resolvePath(this.getPath()) and - exists(this.getFieldExpr(name)) - } - - /** Gets the record field that matches the `name` field of this record expression. */ - pragma[nomagic] + /** Gets the record field named `name` of the instantiated struct or variant. */ StructField getStructField(string name) { - exists(PathResolution::ItemNode i | i = this.getResolvedPath(name) | - result.isStructField(i, name) or - result.isVariantField(i, name) - ) + result = this.getStruct().getStructField(name) + or + result = this.getVariant().getStructField(name) } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/StructFieldImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/StructFieldImpl.qll index 4ed4466c2d9..c0e9a2f40db 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/StructFieldImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/StructFieldImpl.qll @@ -29,5 +29,19 @@ module Impl { /** Holds if this record field is named `name` and belongs to the struct `s`. */ predicate isStructField(Struct s, string name) { this = s.getStructField(name) } + + override string toStringImpl() { + result = strictconcat(int i | | this.toStringPart(i) order by i) + } + + private string toStringPart(int index) { + index = 0 and result = this.getVisibility().toAbbreviatedString() + " " + or + index = 1 and result = this.getName().getText() + or + index = 2 and result = ": " + or + index = 3 and result = this.getTypeRepr().toAbbreviatedString() + } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/StructImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/StructImpl.qll index e4414305ae8..cb4121b7224 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/StructImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/StructImpl.qll @@ -46,12 +46,11 @@ module Impl { pragma[nomagic] predicate isTuple() { this.getFieldList() instanceof TupleFieldList } - /** - * Holds if this struct uses record fields. - * - * Empty structs are considered to use record fields. - */ + /** Holds if this struct uses struct fields. */ pragma[nomagic] - predicate isStruct() { not this.isTuple() } + predicate isStruct() { this.getFieldList() instanceof StructFieldList } + + /** Holds if this struct does not have a field list. */ + predicate isUnit() { not this.hasFieldList() } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TupleFieldImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TupleFieldImpl.qll index 05d799b6047..f26c855e3cb 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TupleFieldImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TupleFieldImpl.qll @@ -15,7 +15,7 @@ module Impl { // the following QLdoc is generated: if you need to edit it, do it in the schema file /** - * A field in a tuple struct or tuple enum variant. + * A field in a tuple struct or tuple variant. * * For example: * ```rust diff --git a/rust/ql/lib/codeql/rust/elements/internal/TupleFieldListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TupleFieldListImpl.qll index 3b5964693f3..b52f0477987 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TupleFieldListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TupleFieldListImpl.qll @@ -13,7 +13,7 @@ private import codeql.rust.elements.internal.generated.TupleFieldList */ module Impl { /** - * A list of fields in a tuple struct or tuple enum variant. + * A list of fields in a tuple struct or tuple variant. * * For example: * ```rust diff --git a/rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll index 61f022c8bfd..37a2e4dacc0 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll @@ -1,8 +1,9 @@ private import rust private import codeql.rust.controlflow.ControlFlowGraph +private import codeql.rust.internal.PathResolution as PathResolution private import codeql.rust.elements.internal.generated.ParentChild as ParentChild +private import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl private import codeql.rust.elements.internal.PathImpl::Impl as PathImpl -private import codeql.rust.elements.internal.PathExprBaseImpl::Impl as PathExprBaseImpl private import codeql.rust.elements.internal.FormatTemplateVariableAccessImpl::Impl as FormatTemplateVariableAccessImpl private import codeql.util.DenseRank @@ -98,7 +99,7 @@ module Impl { * pattern. */ cached - private predicate variableDecl(AstNode definingNode, Name name, string text) { + predicate variableDecl(AstNode definingNode, Name name, string text) { Cached::ref() and exists(SelfParam sp | name = sp.getName() and @@ -117,11 +118,7 @@ module Impl { not exists(getOutermostEnclosingOrPat(pat)) and definingNode = name ) and text = name.getText() and - // exclude for now anything starting with an uppercase character, which may be a reference to - // an enum constant (e.g. `None`). This excludes static and constant variables (UPPERCASE), - // which we don't appear to recognize yet anyway. This also assumes programmers follow the - // naming guidelines, which they generally do, but they're not enforced. - not text.charAt(0).isUppercase() and + not PathResolution::identPatIsResolvable(pat) and // exclude parameters from functions without a body as these are trait method declarations // without implementations not exists(Function f | not f.hasBody() and f.getAParam().getPat() = pat) and @@ -666,7 +663,7 @@ module Impl { } /** A variable access. */ - class VariableAccess extends PathExprBaseImpl::PathExprBase { + class VariableAccess extends PathExprBase { private string name; private Variable v; @@ -677,18 +674,14 @@ module Impl { /** Holds if this access is a capture. */ predicate isCapture() { this.getEnclosingCfgScope() != v.getEnclosingCfgScope() } - - override string toStringImpl() { result = name } - - override string getAPrimaryQlClass() { result = "VariableAccess" } } - /** Holds if `e` occurs in the LHS of an assignment or compound assignment. */ - private predicate assignmentExprDescendant(AssignmentExpr ae, Expr e) { - e = ae.getLhs() + /** Holds if `e` occurs in the LHS of an assignment operation. */ + predicate assignmentOperationDescendant(AssignmentOperation ao, Expr e) { + e = ao.getLhs() or exists(Expr mid | - assignmentExprDescendant(ae, mid) and + assignmentOperationDescendant(ao, mid) and getImmediateParentAdj(e) = mid and not mid instanceof DerefExpr and not mid instanceof FieldExpr and @@ -703,7 +696,7 @@ module Impl { cached VariableWriteAccess() { Cached::ref() and - assignmentExprDescendant(ae, this) + assignmentOperationDescendant(ae, this) } /** Gets the assignment expression that has this write access in the left-hand side. */ @@ -722,7 +715,7 @@ module Impl { } /** A nested function access. */ - class NestedFunctionAccess extends PathExprBaseImpl::PathExprBase { + class NestedFunctionAccess extends PathExprBase { private Function f; NestedFunctionAccess() { nestedFunctionAccess(_, f, this) } diff --git a/rust/ql/lib/codeql/rust/elements/internal/VariantImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/VariantImpl.qll index d6b25b21e28..ed8b93f6c1d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/VariantImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/VariantImpl.qll @@ -36,17 +36,27 @@ module Impl { pragma[nomagic] TupleField getTupleField(int i) { result = this.getFieldList().(TupleFieldList).getField(i) } + /** Gets the number of fields of this variant. */ + int getNumberOfFields() { + not this.hasFieldList() and + result = 0 + or + result = this.getFieldList().(StructFieldList).getNumberOfFields() + or + result = this.getFieldList().(TupleFieldList).getNumberOfFields() + } + /** Holds if this variant uses tuple fields. */ pragma[nomagic] predicate isTuple() { this.getFieldList() instanceof TupleFieldList } - /** - * Holds if this variant uses struct fields. - * - * Empty variants are considered to use struct fields. - */ + /** Holds if this variant uses struct fields. */ pragma[nomagic] - predicate isStruct() { not this.isTuple() } + predicate isStruct() { this.getFieldList() instanceof StructFieldList } + + /** Holds if this variant does not have a field list. */ + pragma[nomagic] + predicate isUnit() { not this.hasFieldList() } /** Gets the enum that this variant belongs to. */ Enum getEnum() { this = result.getVariantList().getAVariant() } diff --git a/rust/ql/lib/codeql/rust/elements/internal/VisibilityImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/VisibilityImpl.qll index 21de0c88ca8..e2bc7140b59 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/VisibilityImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/VisibilityImpl.qll @@ -1,4 +1,3 @@ -// generated by codegen, remove this comment if you wish to edit this file /** * This module provides a hand-modifiable wrapper around the generated class `Visibility`. * @@ -12,6 +11,7 @@ private import codeql.rust.elements.internal.generated.Visibility * be referenced directly. */ module Impl { + // the following QLdoc is generated: if you need to edit it, do it in the schema file /** * A visibility modifier. * @@ -21,5 +21,13 @@ module Impl { * //^^^ * ``` */ - class Visibility extends Generated::Visibility { } + class Visibility extends Generated::Visibility { + override string toStringImpl() { result = this.toAbbreviatedString() } + + override string toAbbreviatedString() { + result = "pub(" + this.getPath().toAbbreviatedString() + ")" + or + not this.hasPath() and result = "pub" + } + } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/CallExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/CallExpr.qll index 829de70510b..196b78c1bde 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/CallExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/CallExpr.qll @@ -6,8 +6,10 @@ private import codeql.rust.elements.internal.generated.Synth private import codeql.rust.elements.internal.generated.Raw -import codeql.rust.elements.internal.CallExprBaseImpl::Impl as CallExprBaseImpl +import codeql.rust.elements.ArgList +import codeql.rust.elements.Attr import codeql.rust.elements.Expr +import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl /** * INTERNAL: This module contains the fully generated definition of `CallExpr` and should not @@ -15,19 +17,53 @@ import codeql.rust.elements.Expr */ module Generated { /** - * A function call expression. For example: + * NOTE: Consider using `Call` instead, as that excludes call expressions that are + * instantiations of tuple structs and tuple variants. + * + * A call expression. For example: * ```rust * foo(42); * foo::(42); * foo[0](42); - * foo(1) = 4; + * Option::Some(42); // tuple variant instantiation * ``` * INTERNAL: Do not reference the `Generated::CallExpr` class directly. * Use the subclass `CallExpr`, where the following predicates are available. */ - class CallExpr extends Synth::TCallExpr, CallExprBaseImpl::CallExprBase { + class CallExpr extends Synth::TCallExpr, ExprImpl::Expr { override string getAPrimaryQlClass() { result = "CallExpr" } + /** + * Gets the argument list of this call expression, if it exists. + */ + ArgList getArgList() { + result = + Synth::convertArgListFromRaw(Synth::convertCallExprToRaw(this).(Raw::CallExpr).getArgList()) + } + + /** + * Holds if `getArgList()` exists. + */ + final predicate hasArgList() { exists(this.getArgList()) } + + /** + * Gets the `index`th attr of this call expression (0-based). + */ + Attr getAttr(int index) { + result = + Synth::convertAttrFromRaw(Synth::convertCallExprToRaw(this).(Raw::CallExpr).getAttr(index)) + } + + /** + * Gets any of the attrs of this call expression. + */ + final Attr getAnAttr() { result = this.getAttr(_) } + + /** + * Gets the number of attrs of this call expression. + */ + final int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** * Gets the function of this call expression, if it exists. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/CallExprBase.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/CallExprBase.qll deleted file mode 100644 index 1d6364fb94f..00000000000 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/CallExprBase.qll +++ /dev/null @@ -1,75 +0,0 @@ -// generated by codegen, do not edit -/** - * This module provides the generated definition of `CallExprBase`. - * INTERNAL: Do not import directly. - */ - -private import codeql.rust.elements.internal.generated.Synth -private import codeql.rust.elements.internal.generated.Raw -import codeql.rust.elements.ArgList -import codeql.rust.elements.Attr -import codeql.rust.elements.Expr -import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl - -/** - * INTERNAL: This module contains the fully generated definition of `CallExprBase` and should not - * be referenced directly. - */ -module Generated { - /** - * A function or method call expression. See `CallExpr` and `MethodCallExpr` for further details. - * INTERNAL: Do not reference the `Generated::CallExprBase` class directly. - * Use the subclass `CallExprBase`, where the following predicates are available. - */ - class CallExprBase extends Synth::TCallExprBase, ExprImpl::Expr { - /** - * Gets the argument list of this call expression base, if it exists. - */ - ArgList getArgList() { - result = - Synth::convertArgListFromRaw(Synth::convertCallExprBaseToRaw(this) - .(Raw::CallExprBase) - .getArgList()) - } - - /** - * Holds if `getArgList()` exists. - */ - final predicate hasArgList() { exists(this.getArgList()) } - - /** - * Gets the `index`th attr of this call expression base (0-based). - */ - Attr getAttr(int index) { - result = - Synth::convertAttrFromRaw(Synth::convertCallExprBaseToRaw(this) - .(Raw::CallExprBase) - .getAttr(index)) - } - - /** - * Gets any of the attrs of this call expression base. - */ - final Attr getAnAttr() { result = this.getAttr(_) } - - /** - * Gets the number of attrs of this call expression base. - */ - final int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } - - /** - * Gets the `index`th argument of this call expression base (0-based). - */ - Expr getArg(int index) { none() } - - /** - * Gets any of the arguments of this call expression base. - */ - final Expr getAnArg() { result = this.getArg(_) } - - /** - * Gets the number of arguments of this call expression base. - */ - final int getNumberOfArgs() { result = count(int i | exists(this.getArg(i))) } - } -} diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/MethodCallExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/MethodCallExpr.qll index 8908b71b7af..18d6803211b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/MethodCallExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/MethodCallExpr.qll @@ -6,8 +6,10 @@ private import codeql.rust.elements.internal.generated.Synth private import codeql.rust.elements.internal.generated.Raw -import codeql.rust.elements.internal.CallExprBaseImpl::Impl as CallExprBaseImpl +import codeql.rust.elements.ArgList +import codeql.rust.elements.Attr import codeql.rust.elements.Expr +import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl import codeql.rust.elements.GenericArgList import codeql.rust.elements.NameRef @@ -17,6 +19,10 @@ import codeql.rust.elements.NameRef */ module Generated { /** + * NOTE: Consider using `MethodCall` instead, as that also includes calls to methods using + * call syntax (such as `Foo::method(x)`), operation syntax (such as `x + y`), and + * indexing syntax (such as `x[y]`). + * * A method call expression. For example: * ```rust * x.foo(42); @@ -25,9 +31,44 @@ module Generated { * INTERNAL: Do not reference the `Generated::MethodCallExpr` class directly. * Use the subclass `MethodCallExpr`, where the following predicates are available. */ - class MethodCallExpr extends Synth::TMethodCallExpr, CallExprBaseImpl::CallExprBase { + class MethodCallExpr extends Synth::TMethodCallExpr, ExprImpl::Expr { override string getAPrimaryQlClass() { result = "MethodCallExpr" } + /** + * Gets the argument list of this method call expression, if it exists. + */ + ArgList getArgList() { + result = + Synth::convertArgListFromRaw(Synth::convertMethodCallExprToRaw(this) + .(Raw::MethodCallExpr) + .getArgList()) + } + + /** + * Holds if `getArgList()` exists. + */ + final predicate hasArgList() { exists(this.getArgList()) } + + /** + * Gets the `index`th attr of this method call expression (0-based). + */ + Attr getAttr(int index) { + result = + Synth::convertAttrFromRaw(Synth::convertMethodCallExprToRaw(this) + .(Raw::MethodCallExpr) + .getAttr(index)) + } + + /** + * Gets any of the attrs of this method call expression. + */ + final Attr getAnAttr() { result = this.getAttr(_) } + + /** + * Gets the number of attrs of this method call expression. + */ + final int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** * Gets the generic argument list of this method call expression, if it exists. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ParentChild.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ParentChild.qll index 233c29e0173..9d6ec74a53e 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ParentChild.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ParentChild.qll @@ -1070,6 +1070,25 @@ private module Impl { ) } + private Element getImmediateChildOfCallExpr(CallExpr e, int index, string partialPredicateCall) { + exists(int n, int nArgList, int nAttr, int nFunction | + n = 0 and + nArgList = n + 1 and + nAttr = nArgList + e.getNumberOfAttrs() and + nFunction = nAttr + 1 and + ( + none() + or + index = n and result = e.getArgList() and partialPredicateCall = "ArgList()" + or + result = e.getAttr(index - nArgList) and + partialPredicateCall = "Attr(" + (index - nArgList).toString() + ")" + or + index = nAttr and result = e.getFunction() and partialPredicateCall = "Function()" + ) + ) + } + private Element getImmediateChildOfCastExpr(CastExpr e, int index, string partialPredicateCall) { exists(int n, int nAttr, int nExpr, int nTypeRepr | n = 0 and @@ -1563,6 +1582,37 @@ private module Impl { ) } + private Element getImmediateChildOfMethodCallExpr( + MethodCallExpr e, int index, string partialPredicateCall + ) { + exists(int n, int nArgList, int nAttr, int nGenericArgList, int nIdentifier, int nReceiver | + n = 0 and + nArgList = n + 1 and + nAttr = nArgList + e.getNumberOfAttrs() and + nGenericArgList = nAttr + 1 and + nIdentifier = nGenericArgList + 1 and + nReceiver = nIdentifier + 1 and + ( + none() + or + index = n and result = e.getArgList() and partialPredicateCall = "ArgList()" + or + result = e.getAttr(index - nArgList) and + partialPredicateCall = "Attr(" + (index - nArgList).toString() + ")" + or + index = nAttr and + result = e.getGenericArgList() and + partialPredicateCall = "GenericArgList()" + or + index = nGenericArgList and + result = e.getIdentifier() and + partialPredicateCall = "Identifier()" + or + index = nIdentifier and result = e.getReceiver() and partialPredicateCall = "Receiver()" + ) + ) + } + private Element getImmediateChildOfNameRef(NameRef e, int index, string partialPredicateCall) { none() } @@ -2228,25 +2278,6 @@ private module Impl { ) } - private Element getImmediateChildOfCallExpr(CallExpr e, int index, string partialPredicateCall) { - exists(int n, int nArgList, int nAttr, int nFunction | - n = 0 and - nArgList = n + 1 and - nAttr = nArgList + e.getNumberOfAttrs() and - nFunction = nAttr + 1 and - ( - none() - or - index = n and result = e.getArgList() and partialPredicateCall = "ArgList()" - or - result = e.getAttr(index - nArgList) and - partialPredicateCall = "Attr(" + (index - nArgList).toString() + ")" - or - index = nAttr and result = e.getFunction() and partialPredicateCall = "Function()" - ) - ) - } - private Element getImmediateChildOfExternBlock( ExternBlock e, int index, string partialPredicateCall ) { @@ -2421,37 +2452,6 @@ private module Impl { ) } - private Element getImmediateChildOfMethodCallExpr( - MethodCallExpr e, int index, string partialPredicateCall - ) { - exists(int n, int nArgList, int nAttr, int nGenericArgList, int nIdentifier, int nReceiver | - n = 0 and - nArgList = n + 1 and - nAttr = nArgList + e.getNumberOfAttrs() and - nGenericArgList = nAttr + 1 and - nIdentifier = nGenericArgList + 1 and - nReceiver = nIdentifier + 1 and - ( - none() - or - index = n and result = e.getArgList() and partialPredicateCall = "ArgList()" - or - result = e.getAttr(index - nArgList) and - partialPredicateCall = "Attr(" + (index - nArgList).toString() + ")" - or - index = nAttr and - result = e.getGenericArgList() and - partialPredicateCall = "GenericArgList()" - or - index = nGenericArgList and - result = e.getIdentifier() and - partialPredicateCall = "Identifier()" - or - index = nIdentifier and result = e.getReceiver() and partialPredicateCall = "Receiver()" - ) - ) - } - private Element getImmediateChildOfModule(Module e, int index, string partialPredicateCall) { exists( int n, int nAttributeMacroExpansion, int nAttr, int nItemList, int nName, int nVisibility @@ -3167,6 +3167,8 @@ private module Impl { or result = getImmediateChildOfBreakExpr(e, index, partialAccessor) or + result = getImmediateChildOfCallExpr(e, index, partialAccessor) + or result = getImmediateChildOfCastExpr(e, index, partialAccessor) or result = getImmediateChildOfClosureExpr(e, index, partialAccessor) @@ -3227,6 +3229,8 @@ private module Impl { or result = getImmediateChildOfMatchExpr(e, index, partialAccessor) or + result = getImmediateChildOfMethodCallExpr(e, index, partialAccessor) + or result = getImmediateChildOfNameRef(e, index, partialAccessor) or result = getImmediateChildOfNeverTypeRepr(e, index, partialAccessor) @@ -3311,8 +3315,6 @@ private module Impl { or result = getImmediateChildOfBlockExpr(e, index, partialAccessor) or - result = getImmediateChildOfCallExpr(e, index, partialAccessor) - or result = getImmediateChildOfExternBlock(e, index, partialAccessor) or result = getImmediateChildOfExternCrate(e, index, partialAccessor) @@ -3325,8 +3327,6 @@ private module Impl { or result = getImmediateChildOfMacroRules(e, index, partialAccessor) or - result = getImmediateChildOfMethodCallExpr(e, index, partialAccessor) - or result = getImmediateChildOfModule(e, index, partialAccessor) or result = getImmediateChildOfPathExpr(e, index, partialAccessor) diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll index aff81e9b9ab..7682b4b99f4 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll @@ -1808,7 +1808,7 @@ module Raw { /** * INTERNAL: Do not use. - * A field in a tuple struct or tuple enum variant. + * A field in a tuple struct or tuple variant. * * For example: * ```rust @@ -2942,23 +2942,57 @@ module Raw { /** * INTERNAL: Do not use. - * A function or method call expression. See `CallExpr` and `MethodCallExpr` for further details. + * NOTE: Consider using `Call` instead, as that excludes call expressions that are + * instantiations of tuple structs and tuple variants. + * + * A call expression. For example: + * ```rust + * foo(42); + * foo::(42); + * foo[0](42); + * Option::Some(42); // tuple variant instantiation + * ``` */ - class CallExprBase extends @call_expr_base, Expr { - /** - * Gets the argument list of this call expression base, if it exists. - */ - ArgList getArgList() { call_expr_base_arg_lists(this, result) } + class CallExpr extends @call_expr, Expr { + override string toString() { result = "CallExpr" } /** - * Gets the `index`th attr of this call expression base (0-based). + * Gets the argument list of this call expression, if it exists. */ - Attr getAttr(int index) { call_expr_base_attrs(this, index, result) } + ArgList getArgList() { call_expr_arg_lists(this, result) } /** - * Gets the number of attrs of this call expression base. + * Gets the `index`th attr of this call expression (0-based). */ - int getNumberOfAttrs() { result = count(int i | call_expr_base_attrs(this, i, _)) } + Attr getAttr(int index) { call_expr_attrs(this, index, result) } + + /** + * Gets the number of attrs of this call expression. + */ + int getNumberOfAttrs() { result = count(int i | call_expr_attrs(this, i, _)) } + + /** + * Gets the function of this call expression, if it exists. + */ + Expr getFunction() { call_expr_functions(this, result) } + } + + private Element getImmediateChildOfCallExpr(CallExpr e, int index) { + exists(int n, int nArgList, int nAttr, int nFunction | + n = 0 and + nArgList = n + 1 and + nAttr = nArgList + e.getNumberOfAttrs() and + nFunction = nAttr + 1 and + ( + none() + or + index = n and result = e.getArgList() + or + result = e.getAttr(index - nArgList) + or + index = nAttr and result = e.getFunction() + ) + ) } /** @@ -4345,6 +4379,76 @@ module Raw { ) } + /** + * INTERNAL: Do not use. + * NOTE: Consider using `MethodCall` instead, as that also includes calls to methods using + * call syntax (such as `Foo::method(x)`), operation syntax (such as `x + y`), and + * indexing syntax (such as `x[y]`). + * + * A method call expression. For example: + * ```rust + * x.foo(42); + * x.foo::(42); + * ``` + */ + class MethodCallExpr extends @method_call_expr, Expr { + override string toString() { result = "MethodCallExpr" } + + /** + * Gets the argument list of this method call expression, if it exists. + */ + ArgList getArgList() { method_call_expr_arg_lists(this, result) } + + /** + * Gets the `index`th attr of this method call expression (0-based). + */ + Attr getAttr(int index) { method_call_expr_attrs(this, index, result) } + + /** + * Gets the number of attrs of this method call expression. + */ + int getNumberOfAttrs() { result = count(int i | method_call_expr_attrs(this, i, _)) } + + /** + * Gets the generic argument list of this method call expression, if it exists. + */ + GenericArgList getGenericArgList() { method_call_expr_generic_arg_lists(this, result) } + + /** + * Gets the identifier of this method call expression, if it exists. + */ + NameRef getIdentifier() { method_call_expr_identifiers(this, result) } + + /** + * Gets the receiver of this method call expression, if it exists. + */ + Expr getReceiver() { method_call_expr_receivers(this, result) } + } + + private Element getImmediateChildOfMethodCallExpr(MethodCallExpr e, int index) { + exists(int n, int nArgList, int nAttr, int nGenericArgList, int nIdentifier, int nReceiver | + n = 0 and + nArgList = n + 1 and + nAttr = nArgList + e.getNumberOfAttrs() and + nGenericArgList = nAttr + 1 and + nIdentifier = nGenericArgList + 1 and + nReceiver = nIdentifier + 1 and + ( + none() + or + index = n and result = e.getArgList() + or + result = e.getAttr(index - nArgList) + or + index = nAttr and result = e.getGenericArgList() + or + index = nGenericArgList and result = e.getIdentifier() + or + index = nIdentifier and result = e.getReceiver() + ) + ) + } + /** * INTERNAL: Do not use. * A reference to a name. @@ -5418,7 +5522,7 @@ module Raw { /** * INTERNAL: Do not use. - * A list of fields in a tuple struct or tuple enum variant. + * A list of fields in a tuple struct or tuple variant. * * For example: * ```rust @@ -6033,43 +6137,6 @@ module Raw { ) } - /** - * INTERNAL: Do not use. - * A function call expression. For example: - * ```rust - * foo(42); - * foo::(42); - * foo[0](42); - * foo(1) = 4; - * ``` - */ - class CallExpr extends @call_expr, CallExprBase { - override string toString() { result = "CallExpr" } - - /** - * Gets the function of this call expression, if it exists. - */ - Expr getFunction() { call_expr_functions(this, result) } - } - - private Element getImmediateChildOfCallExpr(CallExpr e, int index) { - exists(int n, int nArgList, int nAttr, int nFunction | - n = 0 and - nArgList = n + 1 and - nAttr = nArgList + e.getNumberOfAttrs() and - nFunction = nAttr + 1 and - ( - none() - or - index = n and result = e.getArgList() - or - result = e.getAttr(index - nArgList) - or - index = nAttr and result = e.getFunction() - ) - ) - } - /** * INTERNAL: Do not use. * An extern block containing foreign function declarations. @@ -6467,57 +6534,6 @@ module Raw { ) } - /** - * INTERNAL: Do not use. - * A method call expression. For example: - * ```rust - * x.foo(42); - * x.foo::(42); - * ``` - */ - class MethodCallExpr extends @method_call_expr, CallExprBase { - override string toString() { result = "MethodCallExpr" } - - /** - * Gets the generic argument list of this method call expression, if it exists. - */ - GenericArgList getGenericArgList() { method_call_expr_generic_arg_lists(this, result) } - - /** - * Gets the identifier of this method call expression, if it exists. - */ - NameRef getIdentifier() { method_call_expr_identifiers(this, result) } - - /** - * Gets the receiver of this method call expression, if it exists. - */ - Expr getReceiver() { method_call_expr_receivers(this, result) } - } - - private Element getImmediateChildOfMethodCallExpr(MethodCallExpr e, int index) { - exists(int n, int nArgList, int nAttr, int nGenericArgList, int nIdentifier, int nReceiver | - n = 0 and - nArgList = n + 1 and - nAttr = nArgList + e.getNumberOfAttrs() and - nGenericArgList = nAttr + 1 and - nIdentifier = nGenericArgList + 1 and - nReceiver = nIdentifier + 1 and - ( - none() - or - index = n and result = e.getArgList() - or - result = e.getAttr(index - nArgList) - or - index = nAttr and result = e.getGenericArgList() - or - index = nGenericArgList and result = e.getIdentifier() - or - index = nIdentifier and result = e.getReceiver() - ) - ) - } - /** * INTERNAL: Do not use. * A module declaration. For example: @@ -7907,6 +7923,8 @@ module Raw { or result = getImmediateChildOfBreakExpr(e, index) or + result = getImmediateChildOfCallExpr(e, index) + or result = getImmediateChildOfCastExpr(e, index) or result = getImmediateChildOfClosureExpr(e, index) @@ -7967,6 +7985,8 @@ module Raw { or result = getImmediateChildOfMatchExpr(e, index) or + result = getImmediateChildOfMethodCallExpr(e, index) + or result = getImmediateChildOfNameRef(e, index) or result = getImmediateChildOfNeverTypeRepr(e, index) @@ -8047,8 +8067,6 @@ module Raw { or result = getImmediateChildOfBlockExpr(e, index) or - result = getImmediateChildOfCallExpr(e, index) - or result = getImmediateChildOfExternBlock(e, index) or result = getImmediateChildOfExternCrate(e, index) @@ -8059,8 +8077,6 @@ module Raw { or result = getImmediateChildOfMacroRules(e, index) or - result = getImmediateChildOfMethodCallExpr(e, index) - or result = getImmediateChildOfModule(e, index) or result = getImmediateChildOfPathExpr(e, index) diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Synth.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Synth.qll index 74b4a14460a..b5fc41677b2 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Synth.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Synth.qll @@ -729,11 +729,6 @@ module Synth { TTypeBoundList or TTypeRepr or TUseBoundGenericArg or TUseBoundGenericArgs or TUseTree or TUseTreeList or TVariantList or TVisibility or TWhereClause or TWherePred; - /** - * INTERNAL: Do not use. - */ - class TCallExprBase = TCallExpr or TMethodCallExpr; - /** * INTERNAL: Do not use. */ @@ -744,11 +739,11 @@ module Synth { */ class TExpr = TArrayExpr or TArrayExprInternal or TAsmExpr or TAwaitExpr or TBecomeExpr or TBinaryExpr or - TBreakExpr or TCallExprBase or TCastExpr or TClosureExpr or TContinueExpr or TFieldExpr or + TBreakExpr or TCallExpr or TCastExpr or TClosureExpr or TContinueExpr or TFieldExpr or TFormatArgsExpr or TIfExpr or TIndexExpr or TLabelableExpr or TLetExpr or TLiteralExpr or - TMacroBlockExpr or TMacroExpr or TMatchExpr or TOffsetOfExpr or TParenExpr or - TPathExprBase or TPrefixExpr or TRangeExpr or TRefExpr or TReturnExpr or TStructExpr or - TTryExpr or TTupleExpr or TUnderscoreExpr or TYeetExpr or TYieldExpr; + TMacroBlockExpr or TMacroExpr or TMatchExpr or TMethodCallExpr or TOffsetOfExpr or + TParenExpr or TPathExprBase or TPrefixExpr or TRangeExpr or TRefExpr or TReturnExpr or + TStructExpr or TTryExpr or TTupleExpr or TUnderscoreExpr or TYeetExpr or TYieldExpr; /** * INTERNAL: Do not use. @@ -2229,16 +2224,6 @@ module Synth { result = convertWherePredFromRaw(e) } - /** - * INTERNAL: Do not use. - * Converts a raw DB element to a synthesized `TCallExprBase`, if possible. - */ - TCallExprBase convertCallExprBaseFromRaw(Raw::Element e) { - result = convertCallExprFromRaw(e) - or - result = convertMethodCallExprFromRaw(e) - } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TCallable`, if possible. @@ -2282,7 +2267,7 @@ module Synth { or result = convertBreakExprFromRaw(e) or - result = convertCallExprBaseFromRaw(e) + result = convertCallExprFromRaw(e) or result = convertCastExprFromRaw(e) or @@ -2310,6 +2295,8 @@ module Synth { or result = convertMatchExprFromRaw(e) or + result = convertMethodCallExprFromRaw(e) + or result = convertOffsetOfExprFromRaw(e) or result = convertParenExprFromRaw(e) @@ -3805,16 +3792,6 @@ module Synth { result = convertWherePredToRaw(e) } - /** - * INTERNAL: Do not use. - * Converts a synthesized `TCallExprBase` to a raw DB element, if possible. - */ - Raw::Element convertCallExprBaseToRaw(TCallExprBase e) { - result = convertCallExprToRaw(e) - or - result = convertMethodCallExprToRaw(e) - } - /** * INTERNAL: Do not use. * Converts a synthesized `TCallable` to a raw DB element, if possible. @@ -3858,7 +3835,7 @@ module Synth { or result = convertBreakExprToRaw(e) or - result = convertCallExprBaseToRaw(e) + result = convertCallExprToRaw(e) or result = convertCastExprToRaw(e) or @@ -3886,6 +3863,8 @@ module Synth { or result = convertMatchExprToRaw(e) or + result = convertMethodCallExprToRaw(e) + or result = convertOffsetOfExprToRaw(e) or result = convertParenExprToRaw(e) diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/TupleField.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/TupleField.qll index 43696098386..8d39a116f5c 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/TupleField.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/TupleField.qll @@ -17,7 +17,7 @@ import codeql.rust.elements.Visibility */ module Generated { /** - * A field in a tuple struct or tuple enum variant. + * A field in a tuple struct or tuple variant. * * For example: * ```rust diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/TupleFieldList.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/TupleFieldList.qll index 56b1d505c3a..6d68797e64b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/TupleFieldList.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/TupleFieldList.qll @@ -15,7 +15,7 @@ import codeql.rust.elements.TupleField */ module Generated { /** - * A list of fields in a tuple struct or tuple enum variant. + * A list of fields in a tuple struct or tuple variant. * * For example: * ```rust diff --git a/rust/ql/lib/codeql/rust/frameworks/actix-web.model.yml b/rust/ql/lib/codeql/rust/frameworks/actix-web.model.yml index 4031b9bbe86..17b76e137d8 100644 --- a/rust/ql/lib/codeql/rust/frameworks/actix-web.model.yml +++ b/rust/ql/lib/codeql/rust/frameworks/actix-web.model.yml @@ -6,6 +6,11 @@ extensions: - ["::to", "Argument[0].Parameter[0..7]", "remote", "manual"] # Actix attributes such as `get` expand to this `to` call on the handler. - ["::to", "Argument[0].Parameter[0..7]", "remote", "manual"] + - addsTo: + pack: codeql/rust-all + extensible: sinkModel + data: + - ["::new", "Argument[0]", "html-injection", "manual"] - addsTo: pack: codeql/rust-all extensible: summaryModel diff --git a/rust/ql/lib/codeql/rust/frameworks/futures.model.yml b/rust/ql/lib/codeql/rust/frameworks/futures.model.yml index 35e547076d9..712897186a8 100644 --- a/rust/ql/lib/codeql/rust/frameworks/futures.model.yml +++ b/rust/ql/lib/codeql/rust/frameworks/futures.model.yml @@ -7,13 +7,10 @@ extensions: - ["::new", "Argument[0]", "ReturnValue", "taint", "manual"] - ["<_ as futures_util::io::AsyncReadExt>::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"] - ["<_ as futures_util::io::AsyncReadExt>::read", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] - - ["<_ as futures_util::io::AsyncReadExt>::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"] - ["<_ as futures_util::io::AsyncReadExt>::read_to_end", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] - - ["<_ as futures_util::io::AsyncBufReadExt>::read_line", "Argument[self]", "Argument[0].Reference", "taint", "manual"] - ["<_ as futures_util::io::AsyncBufReadExt>::read_line", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] - - ["<_ as futures_util::io::AsyncBufReadExt>::read_until", "Argument[self]", "Argument[1].Reference", "taint", "manual"] - ["<_ as futures_util::io::AsyncBufReadExt>::read_until", "Argument[self].Reference", "Argument[1].Reference", "taint", "manual"] - - ["<_ as futures_util::io::AsyncBufReadExt>::fill_buf", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as futures_util::io::AsyncBufReadExt>::fill_buf", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - ["<_ as futures_util::io::AsyncBufReadExt>::lines", "Argument[self]", "ReturnValue", "taint", "manual"] - ["<_ as futures_io::if_std::AsyncBufRead>::poll_fill_buf", "Argument[self].Reference", "ReturnValue.Field[core::task::poll::Poll::Ready(0)].Field[core::result::Result::Ok(0)]", "taint", "manual"] - ["<_ as futures_io::if_std::AsyncRead>::poll_read", "Argument[self].Reference", "Argument[1].Reference", "taint", "manual"] diff --git a/rust/ql/lib/codeql/rust/frameworks/native-tls.model.yml b/rust/ql/lib/codeql/rust/frameworks/native-tls.model.yml new file mode 100644 index 00000000000..1da63eb7961 --- /dev/null +++ b/rust/ql/lib/codeql/rust/frameworks/native-tls.model.yml @@ -0,0 +1,9 @@ +extensions: + - addsTo: + pack: codeql/rust-all + extensible: sinkModel + data: + - ["::danger_accept_invalid_certs", "Argument[0]", "disable-certificate", "manual"] + - ["::danger_accept_invalid_hostnames", "Argument[0]", "disable-certificate", "manual"] + - ["::danger_accept_invalid_certs", "Argument[0]", "disable-certificate", "manual"] + - ["::danger_accept_invalid_hostnames", "Argument[0]", "disable-certificate", "manual"] diff --git a/rust/ql/lib/codeql/rust/frameworks/reqwest.model.yml b/rust/ql/lib/codeql/rust/frameworks/reqwest.model.yml index 5457460919f..4b728a9a6ad 100644 --- a/rust/ql/lib/codeql/rust/frameworks/reqwest.model.yml +++ b/rust/ql/lib/codeql/rust/frameworks/reqwest.model.yml @@ -11,6 +11,10 @@ extensions: data: - ["::request", "Argument[1]", "request-url", "manual"] - ["::request", "Argument[1]", "request-url", "manual"] + - ["::danger_accept_invalid_certs", "Argument[0]", "disable-certificate", "manual"] + - ["::danger_accept_invalid_hostnames", "Argument[0]", "disable-certificate", "manual"] + - ["::danger_accept_invalid_certs", "Argument[0]", "disable-certificate", "manual"] + - ["::danger_accept_invalid_hostnames", "Argument[0]", "disable-certificate", "manual"] - addsTo: pack: codeql/rust-all extensible: summaryModel @@ -18,10 +22,10 @@ extensions: - ["::text", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - ["::text_with_charset", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - ["::bytes", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["::chunk", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]", "taint", "manual"] + - ["::chunk", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]", "taint", "manual"] - ["::text", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] - ["::text_with_charset", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] - ["::bytes", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] - ["::text", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - ["::bytes", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["::chunk", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]", "taint", "manual"] + - ["::chunk", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]", "taint", "manual"] diff --git a/rust/ql/lib/codeql/rust/frameworks/rustcrypto/RustCrypto.qll b/rust/ql/lib/codeql/rust/frameworks/rustcrypto/RustCrypto.qll index b6accba0734..6e50659103d 100644 --- a/rust/ql/lib/codeql/rust/frameworks/rustcrypto/RustCrypto.qll +++ b/rust/ql/lib/codeql/rust/frameworks/rustcrypto/RustCrypto.qll @@ -24,13 +24,12 @@ class StreamCipherInit extends Cryptography::CryptographicOperation::Range { StreamCipherInit() { // a call to `cipher::KeyInit::new`, `cipher::KeyInit::new_from_slice`, // `cipher::KeyIvInit::new`, `cipher::KeyIvInit::new_from_slices`, `rc2::Rc2::new_with_eff_key_len` or similar. - exists(CallExprBase ce, string rawAlgorithmName | - ce = this.asExpr() and - ce.getStaticTarget().(Function).getName().getText() = - ["new", "new_from_slice", "new_with_eff_key_len", "new_from_slices"] and + exists(Call call, string rawAlgorithmName | + call = this.asExpr() and + call.getTargetName() = ["new", "new_from_slice", "new_with_eff_key_len", "new_from_slices"] and // extract the algorithm name from the type of `ce` or its receiver. exists(Type t, TypePath tp | - t = inferType([ce, ce.(MethodCallExpr).getReceiver()], tp) and + t = inferType([call, call.(MethodCall).getReceiver()], tp) and rawAlgorithmName = t.(StructType).getStruct().(Addressable).getCanonicalPath().splitAt("::") ) and algorithmName = simplifyAlgorithmName(rawAlgorithmName) and diff --git a/rust/ql/lib/codeql/rust/frameworks/stdlib/Builtins.qll b/rust/ql/lib/codeql/rust/frameworks/stdlib/Builtins.qll index 038bbeaece4..9021e5d3643 100644 --- a/rust/ql/lib/codeql/rust/frameworks/stdlib/Builtins.qll +++ b/rust/ql/lib/codeql/rust/frameworks/stdlib/Builtins.qll @@ -27,8 +27,19 @@ private class BuiltinsTypesFile extends File { class BuiltinType extends Struct { BuiltinType() { this.getFile() instanceof BuiltinsTypesFile } - /** Gets the name of this type. */ + /** + * Gets the name of this type. + * + * This is the name used internally to represent the type, for example `Ref`. + */ string getName() { result = super.getName().getText() } + + /** + * Gets a display name for this type. + * + * This is the name used in code, for example `&`. + */ + string getDisplayName() { result = this.getName() } } /** @@ -140,21 +151,48 @@ class F64 extends FloatingPointTypeImpl { /** The builtin slice type `[T]`. */ class SliceType extends BuiltinType { SliceType() { this.getName() = "Slice" } + + override string getDisplayName() { result = "[]" } } /** The builtin array type `[T; N]`. */ class ArrayType extends BuiltinType { ArrayType() { this.getName() = "Array" } + + override string getDisplayName() { result = "[;]" } } -/** The builtin reference type `&T` or `&mut T`. */ +/** The builtin reference type `&T`. */ class RefType extends BuiltinType { RefType() { this.getName() = "Ref" } + + override string getDisplayName() { result = "&" } } -/** The builtin pointer type `*const T` or `*mut T`. */ -class PtrType extends BuiltinType { - PtrType() { this.getName() = "Ptr" } +/** The builtin reference type `&mut T`. */ +class RefMutType extends BuiltinType { + RefMutType() { this.getName() = "RefMut" } + + override string getDisplayName() { result = "&mut" } +} + +/** A builtin raw pointer type `*const T` or `*mut T`. */ +abstract private class PtrTypeImpl extends BuiltinType { } + +final class PtrType = PtrTypeImpl; + +/** The builtin raw pointer type `*const T`. */ +class PtrConstType extends PtrTypeImpl { + PtrConstType() { this.getName() = "PtrConst" } + + override string getDisplayName() { result = "*const" } +} + +/** The builtin raw pointer type `*mut T`. */ +class PtrMutType extends PtrTypeImpl { + PtrMutType() { this.getName() = "PtrMut" } + + override string getDisplayName() { result = "*mut" } } /** A builtin tuple type `(T1, T2, ...)`. */ @@ -168,4 +206,13 @@ class TupleType extends BuiltinType { or result = this.getGenericParamList().getNumberOfGenericParams() } + + override string getDisplayName() { + // Note: This produces "(,,)" for a 2-tuple, "(,,,)" for a 3-tuple, etc. + // This is in order to distinguish the unit type `()` from the 1-tuple `(,)`. + exists(string commas | + commas = concat(int i | i = [0 .. this.getArity() - 1] | ",") and + result = "(" + commas + ")" + ) + } } diff --git a/rust/ql/lib/codeql/rust/frameworks/stdlib/Stdlib.qll b/rust/ql/lib/codeql/rust/frameworks/stdlib/Stdlib.qll index d078f08c168..00e03053654 100644 --- a/rust/ql/lib/codeql/rust/frameworks/stdlib/Stdlib.qll +++ b/rust/ql/lib/codeql/rust/frameworks/stdlib/Stdlib.qll @@ -10,7 +10,7 @@ private import codeql.rust.internal.PathResolution /** * A call to the `starts_with` method on a `Path`. */ -private class StartswithCall extends Path::SafeAccessCheck::Range, MethodCallExpr { +private class StartswithCall extends Path::SafeAccessCheck::Range, MethodCall { StartswithCall() { this.getStaticTarget().getCanonicalPath() = "::starts_with" } override predicate checks(Expr e, boolean branch) { diff --git a/rust/ql/lib/codeql/rust/frameworks/stdlib/alloc.model.yml b/rust/ql/lib/codeql/rust/frameworks/stdlib/alloc.model.yml index 5199a0e8117..ece380966de 100644 --- a/rust/ql/lib/codeql/rust/frameworks/stdlib/alloc.model.yml +++ b/rust/ql/lib/codeql/rust/frameworks/stdlib/alloc.model.yml @@ -24,30 +24,31 @@ extensions: extensible: summaryModel data: # Box - - ["::pin", "Argument[0]", "ReturnValue.Reference", "value", "manual"] - - ["::new", "Argument[0]", "ReturnValue.Reference", "value", "manual"] - - ["::into_pin", "Argument[0]", "ReturnValue", "value", "manual"] + - ["::deref", "Argument[self].Reference.Field[alloc::boxed::Box(0)]", "ReturnValue.Reference", "value", "manual"] + - ["::pin", "Argument[0]", "ReturnValue.Field[core::pin::Pin::pointer].Field[alloc::boxed::Box(0)]", "value", "manual"] + - ["::new", "Argument[0]", "ReturnValue.Field[alloc::boxed::Box(0)]", "value", "manual"] + - ["::into_pin", "Argument[0]", "ReturnValue.Field[core::pin::Pin::pointer]", "value", "manual"] # Fmt - ["alloc::fmt::format", "Argument[0]", "ReturnValue", "taint", "manual"] # Layout - ["::from_size_align", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] - ["::from_size_align_unchecked", "Argument[0]", "ReturnValue", "taint", "manual"] - ["::array", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["::repeat", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)].Field[0]", "taint", "manual"] + - ["::repeat", "Argument[self].Reference", "ReturnValue.Field[core::result::Result::Ok(0)].Field[0]", "taint", "manual"] - ["::repeat", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)].Field[0]", "taint", "manual"] - - ["::repeat_packed", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["::repeat_packed", "Argument[self].Reference", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] - ["::repeat_packed", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["::extend", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)].Field[0]", "taint", "manual"] + - ["::extend", "Argument[self].Reference", "ReturnValue.Field[core::result::Result::Ok(0)].Field[0]", "taint", "manual"] - ["::extend", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)].Field[0]", "taint", "manual"] - - ["::extend_packed", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["::extend_packed", "Argument[self].Reference", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] - ["::extend_packed", "Argument[0]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["::align_to", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["::align_to", "Argument[self].Element", "ReturnValue.Field[0,1,2].Reference.Element", "taint", "manual"] - - ["::pad_to_align", "Argument[self]", "ReturnValue", "taint", "manual"] - - ["::size", "Argument[self]", "ReturnValue", "taint", "manual"] + - ["::align_to", "Argument[self].Reference", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["::align_to", "Argument[self].Reference.Element", "ReturnValue.Field[0,1,2].Reference.Element", "taint", "manual"] + - ["::pad_to_align", "Argument[self].Reference", "ReturnValue", "taint", "manual"] + - ["::size", "Argument[self].Reference", "ReturnValue", "taint", "manual"] # String - ["::as_str", "Argument[self]", "ReturnValue", "value", "manual"] - ["::as_bytes", "Argument[self]", "ReturnValue", "value", "manual"] - - ["<_ as alloc::string::ToString>::to_string", "Argument[self]", "ReturnValue", "taint", "manual"] + - ["<_ as alloc::string::ToString>::to_string", "Argument[self].Reference", "ReturnValue", "taint", "manual"] # Vec - ["alloc::vec::from_elem", "Argument[0]", "ReturnValue.Element", "value", "manual"] diff --git a/rust/ql/lib/codeql/rust/frameworks/stdlib/core.model.yml b/rust/ql/lib/codeql/rust/frameworks/stdlib/core.model.yml index 46eea8f9c4e..8e214ab77bd 100644 --- a/rust/ql/lib/codeql/rust/frameworks/stdlib/core.model.yml +++ b/rust/ql/lib/codeql/rust/frameworks/stdlib/core.model.yml @@ -3,10 +3,76 @@ extensions: pack: codeql/rust-all extensible: summaryModel data: - # Arithmetic + # Builtin deref + - ["<& as core::ops::deref::Deref>::deref", "Argument[self].Reference", "ReturnValue", "value", "manual"] + - ["<&mut as core::ops::deref::Deref>::deref", "Argument[self].Reference", "ReturnValue", "value", "manual"] + # Index + - ["<_ as core::ops::index::Index>::index", "Argument[self].Reference.Element", "ReturnValue.Reference", "value", "manual"] + - ["<_ as core::ops::index::IndexMut>::index_mut", "Argument[self].Reference.Element", "ReturnValue.Reference", "value", "manual"] + # Unary operators + - ["<_ as core::ops::arith::Neg>::neg", "Argument[self]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::bit::Not>::not", "Argument[self]", "ReturnValue", "taint", "manual"] + # Arithmetic operators - ["<_ as core::ops::arith::Add>::add", "Argument[self]", "ReturnValue", "taint", "manual"] - ["<_ as core::ops::arith::Add>::add", "Argument[0]", "ReturnValue", "taint", "manual"] - ["<_ as core::ops::arith::Add>::add", "Argument[0].Reference", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::arith::Sub>::sub", "Argument[self]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::arith::Sub>::sub", "Argument[0]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::arith::Sub>::sub", "Argument[0].Reference", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::arith::Mul>::mul", "Argument[self]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::arith::Mul>::mul", "Argument[0]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::arith::Mul>::mul", "Argument[0].Reference", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::arith::Div>::div", "Argument[self]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::arith::Div>::div", "Argument[0]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::arith::Div>::div", "Argument[0].Reference", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::arith::Rem>::rem", "Argument[self]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::arith::Rem>::rem", "Argument[0]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::arith::Rem>::rem", "Argument[0].Reference", "ReturnValue", "taint", "manual"] + # Arithmetic assignment expressions + - ["<_ as core::ops::arith::AddAssign>::add_assign", "Argument[self].Reference", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::arith::AddAssign>::add_assign", "Argument[0]", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::arith::AddAssign>::add_assign", "Argument[0].Reference", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::arith::SubAssign>::sub_assign", "Argument[self].Reference", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::arith::SubAssign>::sub_assign", "Argument[0]", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::arith::SubAssign>::sub_assign", "Argument[0].Reference", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::arith::MulAssign>::mul_assign", "Argument[self].Reference", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::arith::MulAssign>::mul_assign", "Argument[0]", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::arith::MulAssign>::mul_assign", "Argument[0].Reference", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::arith::DivAssign>::div_assign", "Argument[self].Reference", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::arith::DivAssign>::div_assign", "Argument[0]", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::arith::DivAssign>::div_assign", "Argument[0].Reference", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::arith::RemAssign>::rem_assign", "Argument[self].Reference", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::arith::RemAssign>::rem_assign", "Argument[0]", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::arith::RemAssign>::rem_assign", "Argument[0].Reference", "Argument[self].Reference", "taint", "manual"] + # Bitwise operators + - ["<_ as core::ops::bit::BitAnd>::bitand", "Argument[self]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::bit::BitAnd>::bitand", "Argument[0]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::bit::BitAnd>::bitand", "Argument[0].Reference", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::bit::BitOr>::bitor", "Argument[self]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::bit::BitOr>::bitor", "Argument[0]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::bit::BitOr>::bitor", "Argument[0].Reference", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::bit::BitXor>::bitxor", "Argument[self]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::bit::BitXor>::bitxor", "Argument[0]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::bit::BitXor>::bitxor", "Argument[0].Reference", "ReturnValue", "taint", "manual"] + # Bitwise assignment operators + - ["<_ as core::ops::bit::BitAndAssign>::bitand_assign", "Argument[0]", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::bit::BitAndAssign>::bitand_assign", "Argument[0].Reference", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::bit::BitOrAssign>::bitor_assign", "Argument[0]", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::bit::BitOrAssign>::bitor_assign", "Argument[0].Reference", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::bit::BitXorAssign>::bitxor_assign", "Argument[0]", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::bit::BitXorAssign>::bitxor_assign", "Argument[0].Reference", "Argument[self].Reference", "taint", "manual"] + # Shift operators + - ["<_ as core::ops::bit::Shl>::shl", "Argument[self]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::bit::Shl>::shl", "Argument[0]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::bit::Shl>::shl", "Argument[0].Reference", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::bit::Shr>::shr", "Argument[self]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::bit::Shr>::shr", "Argument[0]", "ReturnValue", "taint", "manual"] + - ["<_ as core::ops::bit::Shr>::shr", "Argument[0].Reference", "ReturnValue", "taint", "manual"] + # Shift assignment operators + - ["<_ as core::ops::bit::ShlAssign>::shl_assign", "Argument[0]", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::bit::ShlAssign>::shl_assign", "Argument[0].Reference", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::bit::ShrAssign>::shr_assign", "Argument[0]", "Argument[self].Reference", "taint", "manual"] + - ["<_ as core::ops::bit::ShrAssign>::shr_assign", "Argument[0].Reference", "Argument[self].Reference", "taint", "manual"] # Clone - ["<_ as core::clone::Clone>::clone", "Argument[self].Reference", "ReturnValue", "value", "manual"] # Conversions @@ -20,9 +86,8 @@ extensions: - ["::iter_mut", "Argument[self].Element", "ReturnValue.Element", "value", "manual"] - ["::into_iter", "Argument[self].Element", "ReturnValue.Element", "value", "manual"] - ["<_ as core::iter::traits::iterator::Iterator>::for_each", "Argument[self].Element", "Argument[0].Parameter[0]", "value", "manual"] - - ["<_ as core::iter::traits::iterator::Iterator>::nth", "Argument[self].Element", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "manual"] - - ["<_ as core::iter::traits::iterator::Iterator>::next", "Argument[self].Element", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "manual"] - - ["<_ as core::iter::traits::iterator::Iterator>::next", "Argument[self].Element", "ReturnValue.Field[core::option::Option::Some(0)].Field[core::result::Result::Ok(0)]", "value", "manual"] + - ["<_ as core::iter::traits::iterator::Iterator>::nth", "Argument[self].Reference.Element", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "manual"] + - ["<_ as core::iter::traits::iterator::Iterator>::next", "Argument[self].Reference.Element", "ReturnValue.Field[core::option::Option::Some(0)]", "value", "manual"] - ["<_ as core::iter::traits::iterator::Iterator>::collect", "Argument[self].Element", "ReturnValue.Element", "value", "manual"] - ["<_ as core::iter::traits::iterator::Iterator>::map", "Argument[self].Element", "Argument[0].Parameter[0]", "value", "manual"] - ["<_ as core::iter::traits::iterator::Iterator>::for_each", "Argument[self].Element", "Argument[0].Parameter[0]", "value", "manual"] @@ -30,12 +95,11 @@ extensions: - ["<_ as core::iter::traits::iterator::Iterator>::chain", "Argument[0]", "ReturnValue", "taint", "manual"] - ["<_ as core::iter::traits::iterator::Iterator>::take", "Argument[self]", "ReturnValue", "taint", "manual"] # Pin - - ["core::pin::Pin", "Argument[0]", "ReturnValue", "value", "manual"] - - ["::new", "Argument[0]", "ReturnValue", "value", "manual"] - - ["::new_unchecked", "Argument[0].Reference", "ReturnValue", "value", "manual"] - - ["::into_inner", "Argument[0]", "ReturnValue", "value", "manual"] - - ["::into_inner_unchecked", "Argument[0]", "ReturnValue", "value", "manual"] - - ["::set", "Argument[0]", "Argument[self]", "value", "manual"] + - ["::new", "Argument[0]", "ReturnValue.Field[core::pin::Pin::pointer]", "value", "manual"] + - ["::new_unchecked", "Argument[0]", "ReturnValue.Field[core::pin::Pin::pointer]", "value", "manual"] + - ["::into_inner", "Argument[0].Field[core::pin::Pin::pointer]", "ReturnValue", "value", "manual"] + - ["::into_inner_unchecked", "Argument[0].Field[core::pin::Pin::pointer]", "ReturnValue", "value", "manual"] + - ["::set", "Argument[0]", "Argument[self].Reference.Field[core::pin::Pin::pointer]", "value", "manual"] # Ptr - ["core::ptr::read", "Argument[0].Reference", "ReturnValue", "value", "manual"] - ["core::ptr::read_unaligned", "Argument[0].Reference", "ReturnValue", "value", "manual"] @@ -43,6 +107,9 @@ extensions: - ["core::ptr::write", "Argument[1]", "Argument[0].Reference", "value", "manual"] - ["core::ptr::write_unaligned", "Argument[1]", "Argument[0].Reference", "value", "manual"] - ["core::ptr::write_volatile", "Argument[1]", "Argument[0].Reference", "value", "manual"] + # https://doc.rust-lang.org/std/pin/struct.Pin.html#impl-Deref-for-Pin%3CPtr%3E, but limited to `Ptr = &` and `Ptr = Box` + - ["::deref", "Argument[self].Reference.Field[core::pin::Pin::pointer].Reference", "ReturnValue.Reference", "value", "manual"] + - ["::deref", "Argument[self].Reference.Field[core::pin::Pin::pointer].Field[alloc::boxed::Box(0)]", "ReturnValue.Reference", "value", "manual"] # Str - ["::as_str", "Argument[self]", "ReturnValue", "value", "manual"] - ["::as_bytes", "Argument[self]", "ReturnValue", "value", "manual"] @@ -60,6 +127,7 @@ extensions: - ["core::ptr::dangling", "ReturnValue", "pointer-invalidate", "manual"] - ["core::ptr::dangling_mut", "ReturnValue", "pointer-invalidate", "manual"] - ["core::ptr::null", "ReturnValue", "pointer-invalidate", "manual"] + - ["core::ptr::null_mut", "ReturnValue", "pointer-invalidate", "manual"] - ["v8::primitives::null", "ReturnValue", "pointer-invalidate", "manual"] - addsTo: pack: codeql/rust-all diff --git a/rust/ql/lib/codeql/rust/frameworks/stdlib/fs.model.yml b/rust/ql/lib/codeql/rust/frameworks/stdlib/fs.model.yml index 79b0b16f41e..076cea745fb 100644 --- a/rust/ql/lib/codeql/rust/frameworks/stdlib/fs.model.yml +++ b/rust/ql/lib/codeql/rust/frameworks/stdlib/fs.model.yml @@ -3,14 +3,27 @@ extensions: pack: codeql/rust-all extensible: sourceModel data: + - ["std::fs::exists", "ReturnValue.Field[core::result::Result::Ok(0)]", "file", "manual"] - ["std::fs::read", "ReturnValue.Field[core::result::Result::Ok(0)]", "file", "manual"] + - ["std::fs::read_dir", "ReturnValue.Field[core::result::Result::Ok(0)]", "file", "manual"] - ["std::fs::read_to_string", "ReturnValue.Field[core::result::Result::Ok(0)]", "file", "manual"] - ["std::fs::read_link", "ReturnValue.Field[core::result::Result::Ok(0)]", "file", "manual"] + - ["std::fs::metadata", "ReturnValue.Field[core::result::Result::Ok(0)]", "file", "manual"] + - ["std::fs::symlink_metadata", "ReturnValue.Field[core::result::Result::Ok(0)]", "file", "manual"] - ["::path", "ReturnValue", "file", "manual"] - ["::file_name", "ReturnValue", "file", "manual"] - ["::open", "ReturnValue.Field[core::result::Result::Ok(0)]", "file", "manual"] - ["::open_buffered", "ReturnValue.Field[core::result::Result::Ok(0)]", "file", "manual"] - ["::open", "ReturnValue.Field[core::result::Result::Ok(0)]", "file", "manual"] + - ["::exists", "ReturnValue", "file", "manual"] + - ["::try_exists", "ReturnValue.Field[core::result::Result::Ok(0)]", "file", "manual"] + - ["::is_file", "ReturnValue", "file", "manual"] + - ["::is_dir", "ReturnValue", "file", "manual"] + - ["::is_symlink", "ReturnValue", "file", "manual"] + - ["::metadata", "ReturnValue.Field[core::result::Result::Ok(0)]", "file", "manual"] + - ["::symlink_metadata", "ReturnValue.Field[core::result::Result::Ok(0)]", "file", "manual"] + - ["::read_dir", "ReturnValue.Field[core::result::Result::Ok(0)]", "file", "manual"] + - ["::read_link", "ReturnValue.Field[core::result::Result::Ok(0)]", "file", "manual"] - addsTo: pack: codeql/rust-all extensible: sinkModel @@ -68,3 +81,12 @@ extensions: - ["::with_extension", "Argument[Self].Reference", "ReturnValue", "taint", "manual"] - ["::with_file_name", "Argument[Self].Reference", "ReturnValue", "taint", "manual"] - ["::with_file_name", "Argument[0]", "ReturnValue", "taint", "manual"] + - ["::accessed", "Argument[self].Reference", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["::created", "Argument[self].Reference", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["::file_type", "Argument[self].Reference", "ReturnValue", "taint", "manual"] + - ["::is_file", "Argument[self].Reference", "ReturnValue", "taint", "manual"] + - ["::is_dir", "Argument[self].Reference", "ReturnValue", "taint", "manual"] + - ["::is_symlink", "Argument[self].Reference", "ReturnValue", "taint", "manual"] + - ["::len", "Argument[self].Reference", "ReturnValue", "taint", "manual"] + - ["::modified", "Argument[self].Reference", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["::permissions", "Argument[self].Reference", "ReturnValue", "taint", "manual"] diff --git a/rust/ql/lib/codeql/rust/frameworks/stdlib/io.model.yml b/rust/ql/lib/codeql/rust/frameworks/stdlib/io.model.yml index b09ba8f297a..064c2cd19cf 100644 --- a/rust/ql/lib/codeql/rust/frameworks/stdlib/io.model.yml +++ b/rust/ql/lib/codeql/rust/frameworks/stdlib/io.model.yml @@ -9,18 +9,19 @@ extensions: extensible: summaryModel data: - ["::new", "Argument[0]", "ReturnValue", "taint", "manual"] - - ["<_ as std::io::BufRead>::fill_buf", "Argument[self]", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["::buffer", "Argument[self]", "ReturnValue", "taint", "manual"] - - ["<_ as std::io::Read>::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"] - - ["<_ as std::io::Read>::read_to_string", "Argument[self]", "Argument[0].Reference", "taint", "manual"] - - ["<_ as std::io::Read>::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"] - - ["<_ as std::io::Read>::read_exact", "Argument[self]", "Argument[0].Reference", "taint", "manual"] - - ["<_ as std::io::BufRead>::read_line", "Argument[self]", "Argument[0].Reference", "taint", "manual"] - - ["<_ as std::io::BufRead>::read_until", "Argument[self]", "Argument[1].Reference", "taint", "manual"] + - ["<_ as std::io::BufRead>::fill_buf", "Argument[self].Reference", "ReturnValue.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["::buffer", "Argument[self].Reference", "ReturnValue.Reference", "taint", "manual"] + - ["<_ as std::io::Read>::read", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] + - ["<_ as std::io::Read>::read_to_string", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] + - ["<_ as std::io::Read>::read_to_end", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] + - ["<_ as std::io::Read>::read_exact", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] + - ["<_ as std::io::BufRead>::read_line", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] + - ["<_ as std::io::BufRead>::read_until", "Argument[self].Reference", "Argument[1].Reference", "taint", "manual"] - ["<_ as std::io::BufRead>::split", "Argument[self]", "ReturnValue", "taint", "manual"] - ["<_ as std::io::BufRead>::lines", "Argument[self]", "ReturnValue", "taint", "manual"] - ["<_ as std::io::Read>::bytes", "Argument[self]", "ReturnValue", "taint", "manual"] - ["<_ as std::io::Read>::chain", "Argument[self]", "ReturnValue", "taint", "manual"] - ["<_ as std::io::Read>::chain", "Argument[0]", "ReturnValue", "taint", "manual"] - ["<_ as std::io::Read>::take", "Argument[self]", "ReturnValue", "taint", "manual"] - - ["::lock", "Argument[self]", "ReturnValue", "taint", "manual"] + - ["::lock", "Argument[self].Reference", "ReturnValue", "taint", "manual"] + - ["::next", "Argument[self].Reference.Element", "ReturnValue.Field[core::option::Option::Some(0)].Field[core::result::Result::Ok(0)]", "value", "manual"] diff --git a/rust/ql/lib/codeql/rust/frameworks/tokio/io.model.yml b/rust/ql/lib/codeql/rust/frameworks/tokio/io.model.yml index 17b0451793d..b5dafedb8b3 100644 --- a/rust/ql/lib/codeql/rust/frameworks/tokio/io.model.yml +++ b/rust/ql/lib/codeql/rust/frameworks/tokio/io.model.yml @@ -9,40 +9,40 @@ extensions: extensible: summaryModel data: - ["::new", "Argument[0]", "ReturnValue", "taint", "manual"] - - ["<_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::fill_buf", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["::buffer", "Argument[self]", "ReturnValue", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_to_string", "Argument[self]", "Argument[0].Reference", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_to_end", "Argument[self]", "Argument[0].Reference", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_exact", "Argument[self]", "Argument[0].Reference", "taint", "manual"] - - ["<_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::read_line", "Argument[self]", "Argument[0].Reference", "taint", "manual"] - - ["<_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::read_until", "Argument[self]", "Argument[1].Reference", "taint", "manual"] + - ["<_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::fill_buf", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["::buffer", "Argument[self].Reference", "ReturnValue.Reference", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_to_string", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_to_end", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_exact", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] + - ["<_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::read_line", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] + - ["<_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::read_until", "Argument[self].Reference", "Argument[1].Reference", "taint", "manual"] - ["<_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::split", "Argument[self]", "ReturnValue", "taint", "manual"] - - ["::next_segment", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]", "taint", "manual"] + - ["::next_segment", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]", "taint", "manual"] - ["<_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::lines", "Argument[self]", "ReturnValue", "taint", "manual"] - - ["::next_line", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_buf", "Argument[self]", "Argument[0].Reference", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u8", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u8_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u16", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u16_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u32", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u32_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u64", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u64_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u128", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u128_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i8", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i8_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i16", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i16_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i32", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i32_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i64", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i64_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i128", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i128_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_f32", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>:::read_f32_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_f64", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_f64_le", "Argument[self]", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["::next_line", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_buf", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u8", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u8_le", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u16", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u16_le", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u32", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u32_le", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u64", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u64_le", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u128", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u128_le", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i8", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i8_le", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i16", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i16_le", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i32", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i32_le", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i64", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i64_le", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i128", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i128_le", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_f32", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>:::read_f32_le", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_f64", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] + - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_f64_le", "Argument[self].Reference", "ReturnValue.Future.Field[core::result::Result::Ok(0)]", "taint", "manual"] diff --git a/rust/ql/lib/codeql/rust/frameworks/tokio/net.model.yml b/rust/ql/lib/codeql/rust/frameworks/tokio/net.model.yml index 0501969b71f..7008b6f6489 100644 --- a/rust/ql/lib/codeql/rust/frameworks/tokio/net.model.yml +++ b/rust/ql/lib/codeql/rust/frameworks/tokio/net.model.yml @@ -8,7 +8,6 @@ extensions: pack: codeql/rust-all extensible: summaryModel data: - - ["::peek", "Argument[self]", "Argument[0].Reference", "taint", "manual"] - - ["<_ as tokio::io::util::async_read_ext::AsyncReadExt>::read", "Argument[self]", "Argument[0].Reference", "taint", "manual"] - - ["::try_read", "Argument[self]", "Argument[0].Reference", "taint", "manual"] - - ["::try_read_buf", "Argument[self]", "Argument[0].Reference", "taint", "manual"] + - ["::peek", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] + - ["::try_read", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] + - ["::try_read_buf", "Argument[self].Reference", "Argument[0].Reference", "taint", "manual"] diff --git a/rust/ql/lib/codeql/rust/frameworks/warp.model.yml b/rust/ql/lib/codeql/rust/frameworks/warp.model.yml index 5071b4dea86..18757da5710 100644 --- a/rust/ql/lib/codeql/rust/frameworks/warp.model.yml +++ b/rust/ql/lib/codeql/rust/frameworks/warp.model.yml @@ -5,4 +5,9 @@ extensions: data: - ["<_ as warp::filter::Filter>::then", "Argument[0].Parameter[0..7]", "remote", "manual"] - ["<_ as warp::filter::Filter>::map", "Argument[0].Parameter[0..7]", "remote", "manual"] - - ["<_ as warp::filter::Filter>::and_then", "Argument[0].Parameter[0..7]", "remote", "manual"] \ No newline at end of file + - ["<_ as warp::filter::Filter>::and_then", "Argument[0].Parameter[0..7]", "remote", "manual"] + - addsTo: + pack: codeql/rust-all + extensible: sinkModel + data: + - ["warp::reply::html", "Argument[0]", "html-injection", "manual"] \ No newline at end of file diff --git a/rust/ql/lib/codeql/rust/internal/CachedStages.qll b/rust/ql/lib/codeql/rust/internal/CachedStages.qll index 132b9ec8f7e..dc80fc09dad 100644 --- a/rust/ql/lib/codeql/rust/internal/CachedStages.qll +++ b/rust/ql/lib/codeql/rust/internal/CachedStages.qll @@ -115,13 +115,11 @@ module Stages { predicate backref() { 1 = 1 or - exists(resolvePath(_)) + exists(resolvePathIgnoreVariableShadowing(_)) or exists(any(ItemNode i).getASuccessor(_, _, _)) or exists(any(ImplOrTraitItemNode i).getASelfPath()) - or - any(TypeParamItemNode i).hasTraitBound() } } diff --git a/rust/ql/lib/codeql/rust/internal/Definitions.qll b/rust/ql/lib/codeql/rust/internal/Definitions.qll index b1b3e475c46..aedcc3fc69c 100644 --- a/rust/ql/lib/codeql/rust/internal/Definitions.qll +++ b/rust/ql/lib/codeql/rust/internal/Definitions.qll @@ -37,6 +37,9 @@ private module Cached { TFormatArgsArgIndex(Expr e) { e = any(FormatArgsArg a).getExpr() } or TItemNode(ItemNode i) + pragma[nomagic] + private predicate isMacroCallLocation(Location loc) { loc = any(MacroCall m).getLocation() } + /** * Gets an element, of kind `kind`, that element `use` uses, if any. */ @@ -44,7 +47,7 @@ private module Cached { Definition definitionOf(Use use, string kind) { result = use.getDefinition() and kind = use.getUseType() and - not result.getLocation() = any(MacroCall m).getLocation() + not isMacroCallLocation(result.getLocation()) } } @@ -144,7 +147,7 @@ private class PathUse extends Use instanceof NameRef { override Definition getDefinition() { // Our call resolution logic may disambiguate some calls, so only use those - result.asItemNode() = this.getCall().getStaticTarget() + result.asItemNode() = this.getCall().getResolvedTarget() or not exists(this.getCall()) and result.asItemNode() = resolvePath(path) diff --git a/rust/ql/lib/codeql/rust/internal/PathResolution.qll b/rust/ql/lib/codeql/rust/internal/PathResolution.qll index f4346062f37..28a72d370ae 100644 --- a/rust/ql/lib/codeql/rust/internal/PathResolution.qll +++ b/rust/ql/lib/codeql/rust/internal/PathResolution.qll @@ -1,9 +1,49 @@ /** * Provides functionality for resolving paths, using the predicate `resolvePath`. + * + * Path resolution needs to happen before variable resolution, because otherwise + * we cannot know whether an identifier pattern binds a new variable or whether it + * refers to a constructor or constant: + * + * ```rust + * let x = ...; // `x` is only a variable if it does not resolve to a constructor/constant + * ``` + * + * Even though variable names typically start with a lowercase letter and constructors + * with an uppercase letter, this is not enforced by the Rust language. + * + * Variables may shadow declarations, so variable resolution also needs to affect + * path resolution: + * + * ```rust + * fn foo() {} // (1) + * + * fn bar() { + * let f = foo; // `foo` here refers to (1) via path resolution + * let foo = f(); // (2) + * foo // `foo` here refers to (2) via variable resolution + * } + * ``` + * + * So it may seem that path resolution and variable resolution must happen in mutual + * recursion, but we would like to keep the inherently global path resolution logic + * separate from the inherently local variable resolution logic. We achieve this by + * + * - First computing global path resolution, where variable shadowing is ignored, + * exposed as the internal predicate `resolvePathIgnoreVariableShadowing`. + * - `resolvePathIgnoreVariableShadowing` is sufficient to determine whether an + * identifier pattern resolves to a constructor/constant, since if it does, it cannot + * be shadowed by a variable. We expose this as the predicate `identPatIsResolvable`. + * - Variable resolution can then be computed as a local property, using only the + * global information from `identPatIsResolvable`. + * - Finally, path resolution can be computed by restricting + * `resolvePathIgnoreVariableShadowing` to paths that are not resolvable via + * variable resolution. */ private import rust private import codeql.rust.elements.internal.generated.ParentChild +private import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl private import codeql.rust.elements.internal.CallExprImpl::Impl as CallExprImpl private import codeql.rust.internal.CachedStages private import codeql.rust.frameworks.stdlib.Builtins as Builtins @@ -184,7 +224,7 @@ abstract class ItemNode extends Locatable { pragma[nomagic] final Attr getAttr(string name) { result = this.getAnAttr() and - result.getMeta().getPath().(RelevantPath).isUnqualified(name) + result.getMeta().getPath().(PathExt).isUnqualified(name) } final predicate hasAttr(string name) { exists(this.getAttr(name)) } @@ -224,6 +264,9 @@ abstract class ItemNode extends Locatable { pragma[nomagic] ItemNode getImmediateParent() { this = result.getADescendant() } + /** Gets a child item of this item, if any. */ + ItemNode getAChild() { this = result.getImmediateParent() } + /** Gets the immediately enclosing module (or source file) of this item. */ pragma[nomagic] ModuleLikeNode getImmediateParentModule() { @@ -299,10 +342,13 @@ abstract class ItemNode extends Locatable { typeImplEdge(this, _, name, kind, result, useOpt) or // trait items with default implementations made available in an implementation - exists(ImplItemNodeImpl impl, ItemNode trait | + exists(ImplItemNodeImpl impl, TraitItemNode trait | this = impl and trait = impl.resolveTraitTyCand() and result = trait.getASuccessor(name, kind, useOpt) and + // do not inherit default implementations from super traits; those are inherited by + // their `impl` blocks + result = trait.getAssocItem(name) and result.(AssocItemNode).hasImplementation() and kind.isExternalOrBoth() and not impl.hasAssocItem(name) @@ -362,8 +408,14 @@ abstract class ItemNode extends Locatable { this instanceof SourceFile and builtin(name, result) or - name = "Self" and - this = result.(ImplOrTraitItemNode).getAnItemInSelfScope() + exists(ImplOrTraitItemNode i | + name = "Self" and + this = i.getAnItemInSelfScope() + | + result = i.(Trait) + or + result = i.(ImplItemNodeImpl).resolveSelfTyCand() + ) or name = "crate" and this = result.(CrateItemNode).getASourceFile() @@ -619,7 +671,7 @@ private class VariantItemNode extends ParameterizableItemNode instanceof Variant override string getName() { result = Variant.super.getName().getText() } override Namespace getNamespace() { - if super.getFieldList() instanceof StructFieldList then result.isType() else result.isValue() + if super.isStruct() then result.isType() else result.isValue() } override TypeParam getTypeParam(int i) { @@ -694,7 +746,7 @@ abstract class ImplOrTraitItemNode extends ItemNode { Path getASelfPath() { Stages::PathResolutionStage::ref() and isUnqualifiedSelfPath(result) and - this = unqualifiedPathLookup(result, _, _) + result = this.getAnItemInSelfScope().getADescendant() } /** Gets an associated item belonging to this trait or `impl` block. */ @@ -722,8 +774,11 @@ private TypeItemNode resolveBuiltin(TypeRepr tr) { tr instanceof RefTypeRepr and result instanceof Builtins::RefType or - tr instanceof PtrTypeRepr and - result instanceof Builtins::PtrType + tr.(PtrTypeRepr).isConst() and + result instanceof Builtins::PtrConstType + or + tr.(PtrTypeRepr).isMut() and + result instanceof Builtins::PtrMutType or result.(Builtins::TupleType).getArity() = tr.(TupleTypeRepr).getNumberOfFields() } @@ -920,7 +975,7 @@ private class ImplItemNodeImpl extends ImplItemNode { result = this.resolveSelfTyBuiltin() } - TraitItemNode resolveTraitTyCand() { result = resolvePathCand(this.getTraitPath()) } + TraitItemNodeImpl resolveTraitTyCand() { result = resolvePathCand(this.getTraitPath()) } } private class StructItemNode extends TypeItemNode, ParameterizableItemNode instanceof Struct { @@ -929,7 +984,7 @@ private class StructItemNode extends TypeItemNode, ParameterizableItemNode insta override Namespace getNamespace() { result.isType() // the struct itself or - not super.getFieldList() instanceof StructFieldList and + not super.isStruct() and result.isValue() // the constructor } @@ -958,7 +1013,16 @@ private class StructItemNode extends TypeItemNode, ParameterizableItemNode insta language[monotonicAggregates] override string getCanonicalPath(Crate c) { this.hasCanonicalPath(c) and - result = strictconcat(int i | i in [0 .. 2] | this.getCanonicalPathPart(c, i) order by i) + ( + this = + any(Builtins::BuiltinType t | + not t.hasVisibility() and + result = t.getDisplayName() + ) + or + not this = any(Builtins::BuiltinType t | not t.hasVisibility()) and + result = strictconcat(int i | i in [0 .. 2] | this.getCanonicalPathPart(c, i) order by i) + ) } } @@ -1159,34 +1223,6 @@ final class TypeParamItemNode extends TypeItemNode instanceof TypeParam { ItemNode resolveABound() { result = resolvePath(this.getABoundPath()) } - /** - * Holds if this type parameter has a trait bound. Examples: - * - * ```rust - * impl Foo { ... } // has no trait bound - * - * impl Foo { ... } // has trait bound - * - * impl Foo where T: Trait { ... } // has trait bound - * ``` - */ - cached - predicate hasTraitBound() { Stages::PathResolutionStage::ref() and exists(this.getABoundPath()) } - - /** - * Holds if this type parameter has no trait bound. Examples: - * - * ```rust - * impl Foo { ... } // has no trait bound - * - * impl Foo { ... } // has trait bound - * - * impl Foo where T: Trait { ... } // has trait bound - * ``` - */ - pragma[nomagic] - predicate hasNoTraitBound() { not this.hasTraitBound() } - override string getName() { result = TypeParam.super.getName().getText() } override Namespace getNamespace() { result.isType() } @@ -1525,20 +1561,22 @@ private predicate declares(ItemNode item, Namespace ns, string name) { ) } -/** A path that does not access a local variable. */ -class RelevantPath extends Path { - RelevantPath() { not this = any(VariableAccess va).(PathExpr).getPath() } +/** + * A `Path` or an `IdentPat`. + * + * `IdentPat`s are included in order to resolve unqualified references to + * constructors in patterns. + */ +abstract class PathExt extends AstNode { + abstract string getText(); /** Holds if this is an unqualified path with the textual value `name`. */ pragma[nomagic] - predicate isUnqualified(string name) { - not exists(this.getQualifier()) and - not exists(UseTree tree | - tree.hasPath() and - this = getAUseTreeUseTree(tree).getPath().getQualifier*() - ) and - name = this.getText() - } + abstract predicate isUnqualified(string name); + + abstract Path getQualifier(); + + abstract string toStringDebug(); /** * Holds if this is an unqualified path with the textual value `name` and @@ -1560,6 +1598,33 @@ class RelevantPath extends Path { predicate isDollarCrate() { this.isUnqualified("$crate", _) } } +private class PathExtPath extends PathExt instanceof Path { + override string getText() { result = Path.super.getText() } + + override predicate isUnqualified(string name) { + not exists(Path.super.getQualifier()) and + not exists(UseTree tree | + tree.hasPath() and + this = getAUseTreeUseTree(tree).getPath().getQualifier*() + ) and + name = Path.super.getText() + } + + override Path getQualifier() { result = Path.super.getQualifier() } + + override string toStringDebug() { result = Path.super.toStringDebug() } +} + +private class PathExtIdentPat extends PathExt, IdentPat { + override string getText() { result = this.getName().getText() } + + override predicate isUnqualified(string name) { name = this.getText() } + + override Path getQualifier() { none() } + + override string toStringDebug() { result = this.getText() } +} + private predicate isModule(ItemNode m) { m instanceof Module } /** Holds if source file `source` contains the module `m`. */ @@ -1583,7 +1648,7 @@ private ItemNode getOuterScope(ItemNode i) { pragma[nomagic] private predicate unqualifiedPathLookup(ItemNode ancestor, string name, Namespace ns, ItemNode encl) { // lookup in the immediately enclosing item - exists(RelevantPath path | + exists(PathExt path | path.isUnqualified(name, encl) and ancestor = encl and not name = ["crate", "$crate", "super", "self"] @@ -1619,7 +1684,7 @@ private ItemNode getASuccessor( private predicate isSourceFile(ItemNode source) { source instanceof SourceFileItemNode } -private predicate hasCratePath(ItemNode i) { any(RelevantPath path).isCratePath(_, i) } +private predicate hasCratePath(ItemNode i) { any(PathExt path).isCratePath(_, i) } private predicate hasChild(ItemNode parent, ItemNode child) { child.getImmediateParent() = parent } @@ -1631,7 +1696,7 @@ private predicate sourceFileHasCratePathTc(ItemNode i1, ItemNode i2) = * `name` may be looked up inside `ancestor`. */ pragma[nomagic] -private predicate keywordLookup(ItemNode ancestor, string name, RelevantPath p) { +private predicate keywordLookup(ItemNode ancestor, string name, PathExt p) { // For `crate`, jump directly to the root module exists(ItemNode i | p.isCratePath(name, i) | ancestor instanceof SourceFile and @@ -1645,7 +1710,7 @@ private predicate keywordLookup(ItemNode ancestor, string name, RelevantPath p) } pragma[nomagic] -private ItemNode unqualifiedPathLookup(RelevantPath p, Namespace ns, SuccessorKind kind) { +private ItemNode unqualifiedPathLookup(PathExt p, Namespace ns, SuccessorKind kind) { exists(ItemNode ancestor, string name | result = getASuccessor(ancestor, pragma[only_bind_into](name), ns, kind, _) and kind.isInternalOrBoth() @@ -1660,7 +1725,7 @@ private ItemNode unqualifiedPathLookup(RelevantPath p, Namespace ns, SuccessorKi } pragma[nomagic] -private predicate isUnqualifiedSelfPath(RelevantPath path) { path.isUnqualified("Self") } +private predicate isUnqualifiedSelfPath(PathExt path) { path.isUnqualified("Self") } /** Provides the input to `TraitIsVisible`. */ signature predicate relevantTraitVisibleSig(Element element, Trait trait); @@ -1743,14 +1808,14 @@ private module DollarCrateResolution { isDollarCrateSupportedMacroExpansion(_, expansion) } - private predicate isDollarCratePath(RelevantPath p) { p.isDollarCrate() } + private predicate isDollarCratePath(PathExt p) { p.isDollarCrate() } - private predicate isInDollarCrateMacroExpansion(RelevantPath p, AstNode expansion) = + private predicate isInDollarCrateMacroExpansion(PathExt p, AstNode expansion) = doublyBoundedFastTC(hasParent/2, isDollarCratePath/1, isDollarCrateSupportedMacroExpansion/1)(p, expansion) pragma[nomagic] - private predicate isInDollarCrateMacroExpansionFromFile(File macroDefFile, RelevantPath p) { + private predicate isInDollarCrateMacroExpansionFromFile(File macroDefFile, PathExt p) { exists(Path macroDefPath, AstNode expansion | isDollarCrateSupportedMacroExpansion(macroDefPath, expansion) and isInDollarCrateMacroExpansion(p, expansion) and @@ -1765,22 +1830,14 @@ private module DollarCrateResolution { * calls. */ pragma[nomagic] - predicate resolveDollarCrate(RelevantPath p, CrateItemNode crate) { + predicate resolveDollarCrate(PathExt p, CrateItemNode crate) { isInDollarCrateMacroExpansionFromFile(crate.getASourceFile().getFile(), p) } } pragma[nomagic] -private ItemNode resolvePathCand0(RelevantPath path, Namespace ns) { - exists(ItemNode res | - res = unqualifiedPathLookup(path, ns, _) and - if - not any(RelevantPath parent).getQualifier() = path and - isUnqualifiedSelfPath(path) and - res instanceof ImplItemNode - then result = res.(ImplItemNodeImpl).resolveSelfTyCand() - else result = res - ) +private ItemNode resolvePathCand0(PathExt path, Namespace ns) { + result = unqualifiedPathLookup(path, ns, _) or DollarCrateResolution::resolveDollarCrate(path, result) and ns = result.getNamespace() @@ -1790,13 +1847,16 @@ private ItemNode resolvePathCand0(RelevantPath path, Namespace ns) { result = resolveUseTreeListItem(_, _, path, _) and ns = result.getNamespace() or - result = resolveBuiltin(path.getSegment().getTypeRepr()) and - not path.getSegment().hasTraitTypeRepr() and - ns.isType() + exists(PathSegment seg | + seg = path.(Path).getSegment() and + result = resolveBuiltin(seg.getTypeRepr()) and + not seg.hasTraitTypeRepr() and + ns.isType() + ) } pragma[nomagic] -private ItemNode resolvePathCandQualifier(RelevantPath qualifier, RelevantPath path, string name) { +private ItemNode resolvePathCandQualifier(PathExt qualifier, PathExt path, string name) { qualifier = path.getQualifier() and result = resolvePathCand(qualifier) and name = path.getText() @@ -1839,14 +1899,35 @@ private predicate checkQualifiedVisibility( not i instanceof TypeParam } +pragma[nomagic] +private predicate isImplSelfQualifiedPath( + ImplItemNode impl, PathExt qualifier, PathExt path, string name +) { + qualifier = impl.getASelfPath() and + qualifier = path.getQualifier() and + name = path.getText() +} + +private ItemNode resolveImplSelfQualified(PathExt qualifier, PathExt path, Namespace ns) { + exists(ImplItemNode impl, string name | + isImplSelfQualifiedPath(impl, qualifier, path, name) and + result = impl.getAssocItem(name) and + ns = result.getNamespace() + ) +} + /** * Gets the item that `path` resolves to in `ns` when `qualifier` is the * qualifier of `path` and `qualifier` resolves to `q`, if any. */ pragma[nomagic] -private ItemNode resolvePathCandQualified( - RelevantPath qualifier, ItemNode q, RelevantPath path, Namespace ns -) { +private ItemNode resolvePathCandQualified(PathExt qualifier, ItemNode q, PathExt path, Namespace ns) { + // Special case for `Self::Assoc`; this always refers to the associated + // item in the enclosing `impl` block, if available. + q = resolvePathCandQualifier(qualifier, path, _) and + result = resolveImplSelfQualified(qualifier, path, ns) + or + not exists(resolveImplSelfQualified(qualifier, path, ns)) and exists(string name, SuccessorKind kind, UseOption useOpt | q = resolvePathCandQualifier(qualifier, path, name) and result = getASuccessor(q, name, ns, kind, useOpt) and @@ -1855,12 +1936,14 @@ private ItemNode resolvePathCandQualified( } /** Holds if path `p` must be looked up in namespace `n`. */ -private predicate pathUsesNamespace(Path p, Namespace n) { +private predicate pathUsesNamespace(PathExt p, Namespace n) { n.isValue() and ( p = any(PathExpr pe).getPath() or p = any(TupleStructPat tsp).getPath() + or + p instanceof PathExtIdentPat ) or n.isType() and @@ -1936,7 +2019,7 @@ private predicate macroUseEdge( * result in non-monotonic recursion. */ pragma[nomagic] -private ItemNode resolvePathCand(RelevantPath path) { +private ItemNode resolvePathCand(PathExt path) { exists(Namespace ns | result = resolvePathCand0(path, ns) and if path = any(ImplItemNode i).getSelfPath() @@ -1949,7 +2032,13 @@ private ItemNode resolvePathCand(RelevantPath path) { else if path = any(PathTypeRepr p).getPath() then result instanceof TypeItemNode - else any() + else + if path instanceof IdentPat + then + result instanceof VariantItemNode or + result instanceof StructItemNode or + result instanceof ConstItemNode + else any() | pathUsesNamespace(path, ns) or @@ -1960,13 +2049,13 @@ private ItemNode resolvePathCand(RelevantPath path) { or exists(CallExpr ce | path = CallExprImpl::getFunctionPath(ce) and - result.(ParameterizableItemNode).getArity() = ce.getNumberOfArgs() + result.(ParameterizableItemNode).getArity() = ce.getArgList().getNumberOfArgs() ) ) } /** Get a trait that should be visible when `path` resolves to `node`, if any. */ -private Trait getResolvePathTraitUsed(RelevantPath path, AssocItemNode node) { +private Trait getResolvePathTraitUsed(PathExt path, AssocItemNode node) { exists(TypeItemNode type, ImplItemNodeImpl impl | node = resolvePathCandQualified(_, type, path, _) and typeImplEdge(type, impl, _, _, node, _) and @@ -1978,9 +2067,9 @@ private predicate pathTraitUsed(Element path, Trait trait) { trait = getResolvePathTraitUsed(path, _) } -/** Gets the item that `path` resolves to, if any. */ +/** INTERNAL: Do not use; use `resolvePath` instead. */ cached -ItemNode resolvePath(RelevantPath path) { +ItemNode resolvePathIgnoreVariableShadowing(PathExt path) { result = resolvePathCand(path) and not path = any(Path parent | exists(resolvePathCand(parent))).getQualifier() and ( @@ -1993,29 +2082,43 @@ ItemNode resolvePath(RelevantPath path) { or // if `path` is the qualifier of a resolvable `parent`, then we should // resolve `path` to something consistent with what `parent` resolves to - exists(RelevantPath parent | - resolvePathCandQualified(path, result, parent, _) = resolvePath(parent) + exists(PathExt parent | + resolvePathCandQualified(path, result, parent, _) = resolvePathIgnoreVariableShadowing(parent) ) } -private predicate isUseTreeSubPath(UseTree tree, RelevantPath path) { +/** + * Holds if `ip` resolves to some constructor or constant. + */ +// use `forceLocal` once we implement overlay support +pragma[nomagic] +predicate identPatIsResolvable(IdentPat ip) { exists(resolvePathIgnoreVariableShadowing(ip)) } + +/** Gets the item that `path` resolves to, if any. */ +pragma[nomagic] +ItemNode resolvePath(PathExt path) { + result = resolvePathIgnoreVariableShadowing(path) and + not path = any(VariableAccess va).(PathExpr).getPath() +} + +private predicate isUseTreeSubPath(UseTree tree, PathExt path) { path = tree.getPath() or - exists(RelevantPath mid | + exists(PathExt mid | isUseTreeSubPath(tree, mid) and path = mid.getQualifier() ) } pragma[nomagic] -private predicate isUseTreeSubPathUnqualified(UseTree tree, RelevantPath path, string name) { +private predicate isUseTreeSubPathUnqualified(UseTree tree, PathExt path, string name) { isUseTreeSubPath(tree, path) and not exists(path.getQualifier()) and name = path.getText() } pragma[nomagic] -private ItemNode resolveUseTreeListItem(Use use, UseTree tree, RelevantPath path, SuccessorKind kind) { +private ItemNode resolveUseTreeListItem(Use use, UseTree tree, PathExt path, SuccessorKind kind) { exists(UseOption useOpt | checkQualifiedVisibility(use, result, kind, useOpt) | exists(UseTree midTree, ItemNode mid, string name | mid = resolveUseTreeListItem(use, midTree) and @@ -2032,9 +2135,7 @@ private ItemNode resolveUseTreeListItem(Use use, UseTree tree, RelevantPath path } pragma[nomagic] -private ItemNode resolveUseTreeListItemQualifier( - Use use, UseTree tree, RelevantPath path, string name -) { +private ItemNode resolveUseTreeListItemQualifier(Use use, UseTree tree, PathExt path, string name) { result = resolveUseTreeListItem(use, tree, path.getQualifier(), _) and name = path.getText() } @@ -2189,7 +2290,7 @@ private module Debug { } predicate debugUnqualifiedPathLookup( - RelevantPath p, string name, Namespace ns, ItemNode ancestor, string path + PathExt p, string name, Namespace ns, ItemNode ancestor, string path ) { p = getRelevantLocatable() and exists(ItemNode encl | @@ -2199,14 +2300,19 @@ private module Debug { path = p.toStringDebug() } + ItemNode debugUnqualifiedPathLookup(PathExt p, Namespace ns, SuccessorKind kind) { + p = getRelevantLocatable() and + result = unqualifiedPathLookup(p, ns, kind) + } + predicate debugItemNode(ItemNode item) { item = getRelevantLocatable() } - ItemNode debugResolvePath(RelevantPath path) { + ItemNode debugResolvePath(PathExt path) { path = getRelevantLocatable() and result = resolvePath(path) } - ItemNode debugResolveUseTreeListItem(Use use, UseTree tree, RelevantPath path, SuccessorKind kind) { + ItemNode debugResolveUseTreeListItem(Use use, UseTree tree, PathExt path, SuccessorKind kind) { use = getRelevantLocatable() and result = resolveUseTreeListItem(use, tree, path, kind) } diff --git a/rust/ql/lib/codeql/rust/internal/PathResolutionConsistency.qll b/rust/ql/lib/codeql/rust/internal/PathResolutionConsistency.qll index 1c8ac649df3..807225d1615 100644 --- a/rust/ql/lib/codeql/rust/internal/PathResolutionConsistency.qll +++ b/rust/ql/lib/codeql/rust/internal/PathResolutionConsistency.qll @@ -24,10 +24,10 @@ query predicate multiplePathResolutions(Path p, ItemNode i) { strictcount(ItemNode i0 | i0 = resolvePath(p) and not i0 instanceof Crate) > 1 } -/** Holds if `call` has multiple static call targets including `target`. */ -query predicate multipleCallTargets(CallExprBase call, Callable target) { - target = call.getStaticTarget() and - strictcount(call.getStaticTarget()) > 1 +/** Holds if `ie` has multiple resolved targets including `target`. */ +query predicate multipleResolvedTargets(InvocationExpr ie, Addressable target) { + target = ie.getResolvedTarget() and + strictcount(ie.getResolvedTarget()) > 1 } /** Holds if `fe` resolves to multiple record fields including `field`. */ @@ -55,8 +55,8 @@ int getPathResolutionInconsistencyCounts(string type) { type = "Multiple path resolutions" and result = count(Path p | multiplePathResolutions(p, _) | p) or - type = "Multiple static call targets" and - result = count(CallExprBase call | multipleCallTargets(call, _) | call) + type = "Multiple resolved targets" and + result = count(InvocationExpr ie | multipleResolvedTargets(ie, _) | ie) or type = "Multiple record fields" and result = count(FieldExpr fe | multipleStructFields(fe, _) | fe) diff --git a/rust/ql/lib/codeql/rust/internal/Type.qll b/rust/ql/lib/codeql/rust/internal/Type.qll index ccf5c754363..b187a64dec1 100644 --- a/rust/ql/lib/codeql/rust/internal/Type.qll +++ b/rust/ql/lib/codeql/rust/internal/Type.qll @@ -140,6 +140,9 @@ class EnumType extends Type, TEnum { EnumType() { this = TEnum(enum) } + /** Gets the enum that this enum type represents. */ + Enum getEnum() { result = enum } + override TypeParameter getPositionalTypeParameter(int i) { result = TTypeParamTypeParameter(enum.getGenericParamList().getTypeParam(i)) } @@ -336,12 +339,23 @@ class NeverType extends Type, TNeverType { override Location getLocation() { result instanceof EmptyLocation } } -class PtrType extends StructType { - PtrType() { this.getStruct() instanceof Builtins::PtrType } +abstract class PtrType extends StructType { } - override string toString() { result = "*" } +pragma[nomagic] +TypeParamTypeParameter getPtrTypeParameter() { + result = any(PtrType t).getPositionalTypeParameter(0) +} - override Location getLocation() { result instanceof EmptyLocation } +class PtrMutType extends PtrType { + PtrMutType() { this.getStruct() instanceof Builtins::PtrMutType } + + override string toString() { result = "*mut" } +} + +class PtrConstType extends PtrType { + PtrConstType() { this.getStruct() instanceof Builtins::PtrConstType } + + override string toString() { result = "*const" } } /** @@ -374,14 +388,11 @@ class UnknownType extends Type, TUnknownType { override Location getLocation() { result instanceof EmptyLocation } } -pragma[nomagic] -TypeParamTypeParameter getPtrTypeParameter() { - result = any(PtrType t).getPositionalTypeParameter(0) -} - /** A type parameter. */ abstract class TypeParameter extends Type { override TypeParameter getPositionalTypeParameter(int i) { none() } + + abstract ItemNode getDeclaringItem(); } private class RawTypeParameter = @type_param or @trait or @type_alias or @impl_trait_type_repr; @@ -400,6 +411,8 @@ class TypeParamTypeParameter extends TypeParameter, TTypeParamTypeParameter { TypeParam getTypeParam() { result = typeParam } + override ItemNode getDeclaringItem() { result.getTypeParam(_) = typeParam } + override string toString() { result = typeParam.toString() } override Location getLocation() { result = typeParam.getLocation() } @@ -433,6 +446,8 @@ class AssociatedTypeTypeParameter extends TypeParameter, TAssociatedTypeTypePara /** Gets the trait that contains this associated type declaration. */ TraitItemNode getTrait() { result.getAnAssocItem() = typeAlias } + override ItemNode getDeclaringItem() { result = this.getTrait() } + override string toString() { result = typeAlias.getName().getText() } override Location getLocation() { result = typeAlias.getLocation() } @@ -465,6 +480,8 @@ class DynTraitTypeParameter extends TypeParameter, TDynTraitTypeParameter { result = [this.getTypeParam().toString(), this.getTypeAlias().getName().toString()] } + override ItemNode getDeclaringItem() { none() } + override string toString() { result = "dyn(" + this.toStringInner() + ")" } override Location getLocation() { result = n.getLocation() } @@ -480,6 +497,8 @@ class ImplTraitTypeParameter extends TypeParameter, TImplTraitTypeParameter { ImplTraitTypeRepr getImplTraitTypeRepr() { result = implTrait } + override ItemNode getDeclaringItem() { none() } + override string toString() { result = "impl(" + typeParam.toString() + ")" } override Location getLocation() { result = typeParam.getLocation() } @@ -499,6 +518,8 @@ class SelfTypeParameter extends TypeParameter, TSelfTypeParameter { Trait getTrait() { result = trait } + override ItemNode getDeclaringItem() { result = trait } + override string toString() { result = "Self [" + trait.toString() + "]" } override Location getLocation() { result = trait.getLocation() } @@ -526,6 +547,8 @@ class ImplTraitTypeTypeParameter extends ImplTraitType, TypeParameter { ImplTraitTypeTypeParameter() { impl = function.getAParam().getTypeRepr() } + override ItemNode getDeclaringItem() { none() } + override Function getFunction() { result = function } override TypeParameter getPositionalTypeParameter(int i) { none() } diff --git a/rust/ql/lib/codeql/rust/internal/TypeInference.qll b/rust/ql/lib/codeql/rust/internal/TypeInference.qll index 8f9840e0566..ed87b0c7104 100644 --- a/rust/ql/lib/codeql/rust/internal/TypeInference.qll +++ b/rust/ql/lib/codeql/rust/internal/TypeInference.qll @@ -9,12 +9,11 @@ private import TypeMention private import typeinference.FunctionType private import typeinference.FunctionOverloading as FunctionOverloading private import typeinference.BlanketImplementation as BlanketImplementation +private import codeql.rust.elements.internal.VariableImpl::Impl as VariableImpl private import codeql.rust.internal.CachedStages private import codeql.typeinference.internal.TypeInference private import codeql.rust.frameworks.stdlib.Stdlib private import codeql.rust.frameworks.stdlib.Builtins as Builtins -private import codeql.rust.elements.Call -private import codeql.rust.elements.internal.CallImpl::Impl as CallImpl private import codeql.rust.elements.internal.CallExprImpl::Impl as CallExprImpl class Type = T::Type; @@ -230,11 +229,6 @@ module Consistency { } } -/** A method, that is, a function with a `self` parameter. */ -private class Method extends Function { - Method() { this.hasSelfParam() } -} - /** A function without a `self` parameter. */ private class NonMethodFunction extends Function { NonMethodFunction() { not this.hasSelfParam() } @@ -431,7 +425,10 @@ module CertainTypeInference { or result = inferLiteralType(n, path, true) or - result = inferRefNodeType(n) and + result = inferRefPatType(n) and + path.isEmpty() + or + result = inferRefExprType(n) and path.isEmpty() or result = inferLogicalOperationType(n, path) @@ -606,10 +603,14 @@ private predicate typeEquality(AstNode n1, TypePath prefix1, AstNode n2, TypePat strictcount(Expr e | bodyReturns(n1, e)) = 1 ) or - ( - n1 = n2.(RefExpr).getExpr() or - n1 = n2.(RefPat).getPat() - ) and + n2 = + any(RefExpr re | + n1 = re.getExpr() and + prefix1.isEmpty() and + prefix2 = TypePath::singleton(inferRefExprType(re).getPositionalTypeParameter(0)) + ) + or + n1 = n2.(RefPat).getPat() and prefix1.isEmpty() and prefix2 = TypePath::singleton(getRefTypeParameter()) or @@ -629,7 +630,7 @@ private predicate typeEquality(AstNode n1, TypePath prefix1, AstNode n2, TypePat n2 = be.getStmtList().getTailExpr() and if be.isAsync() then - prefix1 = TypePath::singleton(getFutureOutputTypeParameter()) and + prefix1 = TypePath::singleton(getDynFutureOutputTypeParameter()) and prefix2.isEmpty() else ( prefix1.isEmpty() and @@ -672,7 +673,7 @@ private predicate typeEquality(AstNode n1, TypePath prefix1, AstNode n2, TypePat /** * Holds if `child` is a child of `parent`, and the Rust compiler applies [least - * upper bound (LUB) coercion](1) to infer the type of `parent` from the type of + * upper bound (LUB) coercion][1] to infer the type of `parent` from the type of * `child`. * * In this case, we want type information to only flow from `child` to `parent`, @@ -709,9 +710,7 @@ private predicate lubCoercion(AstNode parent, AstNode child, TypePath prefix) { * of `n2` at `prefix2`, but type information should only propagate from `n1` to * `n2`. */ -private predicate typeEqualityNonSymmetric( - AstNode n1, TypePath prefix1, AstNode n2, TypePath prefix2 -) { +private predicate typeEqualityAsymmetric(AstNode n1, TypePath prefix1, AstNode n2, TypePath prefix2) { lubCoercion(n2, n1, prefix2) and prefix1.isEmpty() or @@ -723,6 +722,13 @@ private predicate typeEqualityNonSymmetric( not lubCoercion(mid, n1, _) and prefix1 = prefixMid.append(suffix) ) + or + // When `n2` is `*n1` propagate type information from a raw pointer type + // parameter at `n1`. The other direction is handled in + // `inferDereferencedExprPtrType`. + n1 = n2.(DerefExpr).getExpr() and + prefix1 = TypePath::singleton(getPtrTypeParameter()) and + prefix2.isEmpty() } pragma[nomagic] @@ -735,7 +741,7 @@ private Type inferTypeEquality(AstNode n, TypePath path) { or typeEquality(n2, prefix2, n, prefix1) or - typeEqualityNonSymmetric(n2, prefix2, n, prefix1) + typeEqualityAsymmetric(n2, prefix2, n, prefix1) ) } @@ -787,7 +793,7 @@ private module StructExprMatchingInput implements MatchingInputSig { } private class StructDecl extends Declaration, Struct { - StructDecl() { this.isStruct() } + StructDecl() { this.isStruct() or this.isUnit() } override TypeParam getATypeParam() { result = this.getGenericParamList().getATypeParam() } @@ -804,7 +810,7 @@ private module StructExprMatchingInput implements MatchingInputSig { } private class StructVariantDecl extends Declaration, Variant { - StructVariantDecl() { this.isStruct() } + StructVariantDecl() { this.isStruct() or this.isUnit() } Enum getEnum() { result.getVariantList().getAVariant() = this } @@ -961,6 +967,24 @@ private Type getCallExprTypeQualifier(CallExpr ce, TypePath path) { ) } +/** + * Gets the trait qualifier of function call `ce`, if any. + * + * For example, the trait qualifier of `Default::::default()` is `Default`. + */ +pragma[nomagic] +private Trait getCallExprTraitQualifier(CallExpr ce) { + exists(PathExt qualifierPath | + qualifierPath = getCallExprPathQualifier(ce) and + result = resolvePath(qualifierPath) and + // When the qualifier is `Self` and resolves to a trait, it's inside a + // trait method's default implementation. This is not a dispatch whose + // target is inferred from the type of the receiver, but should always + // resolve to the function in the trait block as path resolution does. + not qualifierPath.isUnqualified("Self") + ) +} + /** * Provides functionality related to context-based typing of calls. */ @@ -1244,14 +1268,17 @@ private module MethodResolution { pragma[nomagic] private predicate methodCallTraitCandidate(Element mc, Trait trait) { - exists(string name, int arity | - mc.(MethodCall).hasNameAndArity(name, arity) and - methodTraitInfo(name, arity, trait) - | - not mc.(Call).hasTrait() - or - trait = mc.(Call).getTrait() - ) + mc = + any(MethodCall mc0 | + exists(string name, int arity | + mc0.hasNameAndArity(name, arity) and + methodTraitInfo(name, arity, trait) + | + not mc0.hasTrait() + or + trait = mc0.getTrait() + ) + ) } private module MethodTraitIsVisible = TraitIsVisible; @@ -1296,7 +1323,7 @@ private module MethodResolution { or methodCallVisibleTraitCandidate(mc, i) or - i.(ImplItemNode).resolveTraitTy() = mc.(Call).getTrait() + i.(ImplItemNode).resolveTraitTy() = mc.getTrait() ) } @@ -1323,7 +1350,7 @@ private module MethodResolution { | methodCallVisibleImplTraitCandidate(mc, impl) or - impl.resolveTraitTy() = mc.(Call).getTrait() + impl.resolveTraitTy() = mc.getTrait() ) } @@ -1350,18 +1377,24 @@ private module MethodResolution { abstract class MethodCall extends Expr { abstract predicate hasNameAndArity(string name, int arity); - abstract Expr getArgument(ArgumentPosition pos); + abstract Expr getArg(ArgumentPosition pos); abstract predicate supportsAutoDerefAndBorrow(); + /** Gets the trait targeted by this call, if any. */ + abstract Trait getTrait(); + + /** Holds if this call targets a trait. */ + predicate hasTrait() { exists(this.getTrait()) } + AstNode getNodeAt(FunctionPosition apos) { - result = this.getArgument(apos.asArgumentPosition()) + result = this.getArg(apos.asArgumentPosition()) or result = this and apos.isReturn() } Type getArgumentTypeAt(ArgumentPosition pos, TypePath path) { - result = inferType(this.getArgument(pos), path) + result = inferType(this.getArg(pos), path) } private Type getReceiverTypeAt(TypePath path) { @@ -1587,12 +1620,12 @@ private module MethodResolution { predicate receiverHasImplicitDeref(AstNode receiver) { exists(this.resolveCallTarget(_, ".ref", false)) and - receiver = this.getArgument(CallImpl::TSelfArgumentPosition()) + receiver = this.getArg(any(ArgumentPosition pos | pos.isSelf())) } - predicate receiverHasImplicitBorrow(AstNode receiver) { + predicate argumentHasImplicitBorrow(AstNode arg) { exists(this.resolveCallTarget(_, "", true)) and - receiver = this.getArgument(CallImpl::TSelfArgumentPosition()) + arg = this.getArg(any(ArgumentPosition pos | pos.isSelf())) } } @@ -1603,35 +1636,45 @@ private module MethodResolution { arity = super.getArgList().getNumberOfArgs() } - override Expr getArgument(ArgumentPosition pos) { - pos.isSelf() and - result = MethodCallExpr.super.getReceiver() - or - result = super.getArgList().getArg(pos.asPosition()) + override Expr getArg(ArgumentPosition pos) { + result = MethodCallExpr.super.getSyntacticArgument(pos) } override predicate supportsAutoDerefAndBorrow() { any() } + + override Trait getTrait() { none() } } - private class MethodCallIndexExpr extends MethodCall, IndexExpr { + private class MethodCallIndexExpr extends MethodCall instanceof IndexExpr { + private predicate isInMutableContext() { + // todo: does not handle all cases yet + VariableImpl::assignmentOperationDescendant(_, this) + } + pragma[nomagic] override predicate hasNameAndArity(string name, int arity) { - name = "index" and + (if this.isInMutableContext() then name = "index_mut" else name = "index") and arity = 1 } - override Expr getArgument(ArgumentPosition pos) { + override Expr getArg(ArgumentPosition pos) { pos.isSelf() and - result = this.getBase() + result = super.getBase() or pos.asPosition() = 0 and - result = this.getIndex() + result = super.getIndex() } override predicate supportsAutoDerefAndBorrow() { any() } + + override Trait getTrait() { + if this.isInMutableContext() + then result.getCanonicalPath() = "core::ops::index::IndexMut" + else result.getCanonicalPath() = "core::ops::index::Index" + } } - private class MethodCallCallExpr extends MethodCall, CallExpr { + private class MethodCallCallExpr extends MethodCall instanceof CallExpr { MethodCallCallExpr() { exists(getCallExprPathQualifier(this)) and // even if a method cannot be resolved by path resolution, it may still @@ -1656,14 +1699,14 @@ private module MethodResolution { pragma[nomagic] override predicate hasNameAndArity(string name, int arity) { name = CallExprImpl::getFunctionPath(this).getText() and - arity = this.getArgList().getNumberOfArgs() - 1 + arity = super.getArgList().getNumberOfArgs() - 1 } - override Expr getArgument(ArgumentPosition pos) { + override Expr getArg(ArgumentPosition pos) { pos.isSelf() and - result = this.getArg(0) + result = super.getSyntacticPositionalArgument(0) or - result = this.getArgList().getArg(pos.asPosition() + 1) + result = super.getSyntacticPositionalArgument(pos.asPosition() + 1) } // needed for `TypeQualifierIsInstantiationOfImplSelfInput` @@ -1672,38 +1715,55 @@ private module MethodResolution { } override predicate supportsAutoDerefAndBorrow() { none() } + + override Trait getTrait() { result = getCallExprTraitQualifier(this) } } - final class MethodCallOperation extends MethodCall, Operation { + final class MethodCallOperation extends MethodCall instanceof Operation { pragma[nomagic] override predicate hasNameAndArity(string name, int arity) { - name = this.(Call).getMethodName() and - arity = this.getNumberOfOperands() - 1 + super.isOverloaded(_, name, _) and + arity = super.getNumberOfOperands() - 1 } - override Expr getArgument(ArgumentPosition pos) { result = this.(Call).getArgument(pos) } + override Expr getArg(ArgumentPosition pos) { + pos.isSelf() and + result = super.getOperand(0) + or + result = super.getOperand(pos.asPosition() + 1) + } + + private predicate implicitBorrowAt(ArgumentPosition pos) { + exists(int borrows | super.isOverloaded(_, _, borrows) | + pos.isSelf() and borrows >= 1 + or + pos.asPosition() = 0 and borrows = 2 + ) + } override Type getArgumentTypeAt(ArgumentPosition pos, TypePath path) { - if this.(Call).implicitBorrowAt(pos, true) + if this.implicitBorrowAt(pos) then result instanceof RefType and path.isEmpty() or exists(TypePath path0 | - result = inferType(this.getArgument(pos), path0) and + result = inferType(this.getArg(pos), path0) and path = TypePath::cons(getRefTypeParameter(), path0) ) - else result = inferType(this.getArgument(pos), path) + else result = inferType(this.getArg(pos), path) } - override predicate receiverHasImplicitBorrow(AstNode receiver) { + override predicate argumentHasImplicitBorrow(AstNode arg) { exists(ArgumentPosition pos | - this.(Call).implicitBorrowAt(pos, true) and - receiver = this.getArgument(pos) + this.implicitBorrowAt(pos) and + arg = this.getArg(pos) ) } override predicate supportsAutoDerefAndBorrow() { none() } + + override Trait getTrait() { super.isOverloaded(result, _, _) } } pragma[nomagic] @@ -2053,7 +2113,7 @@ private module MethodCallMatchingInput implements MatchingWithEnvironmentInputSi or exists(TypePath suffix | result = this.resolveRetType(suffix) and - path = TypePath::cons(getFutureOutputTypeParameter(), suffix) + path = TypePath::cons(getDynFutureOutputTypeParameter(), suffix) ) else result = this.resolveRetType(path) } @@ -2274,14 +2334,17 @@ private module NonMethodResolution { pragma[nomagic] private predicate blanketLikeCallTraitCandidate(Element fc, Trait trait) { - exists(string name, int arity | - fc.(NonMethodCall).hasNameAndArity(name, arity) and - functionInfoBlanketLikeRelevantPos(_, name, arity, _, trait, _, _, _, _) - | - not fc.(Call).hasTrait() - or - trait = fc.(Call).getTrait() - ) + fc = + any(NonMethodCall nmc | + exists(string name, int arity | + nmc.hasNameAndArity(name, arity) and + functionInfoBlanketLikeRelevantPos(_, name, arity, _, trait, _, _, _, _) + | + not nmc.hasTrait() + or + trait = nmc.getTrait() + ) + ) } private module BlanketTraitIsVisible = TraitIsVisible; @@ -2323,9 +2386,15 @@ private module NonMethodResolution { ) } + /** Gets the trait targeted by this call, if any. */ + Trait getTrait() { result = getCallExprTraitQualifier(this) } + + /** Holds if this call targets a trait. */ + predicate hasTrait() { exists(this.getTrait()) } + pragma[nomagic] NonMethodFunction resolveAssocCallTargetCand(ImplItemNode i) { - not this.(Call).hasTrait() and + not this.hasTrait() and result = this.getPathResolutionResolved() and result = i.getASuccessor(_) or @@ -2333,7 +2402,7 @@ private module NonMethodResolution { } AstNode getNodeAt(FunctionPosition pos) { - result = this.getArg(pos.asPosition()) + result = this.getSyntacticArgument(pos.asArgumentPosition()) or result = this and pos.isReturn() } @@ -2358,7 +2427,7 @@ private module NonMethodResolution { pragma[nomagic] predicate hasTraitResolved(TraitItemNode trait, NonMethodFunction resolved) { resolved = this.getPathResolutionResolved() and - trait = this.(Call).getTrait() + trait = this.getTrait() } /** @@ -2366,7 +2435,7 @@ private module NonMethodResolution { */ pragma[nomagic] ItemNode resolveCallTargetViaPathResolution() { - not this.(Call).hasTrait() and + not this.hasTrait() and result = this.getPathResolutionResolved() and not FunctionOverloading::functionResolutionDependsOnArgument(_, result, _, _, _) } @@ -2391,7 +2460,7 @@ private module NonMethodResolution { pragma[nomagic] NonMethodFunction resolveTraitFunctionViaPathResolution(TraitItemNode trait) { - this.(Call).hasTrait() and + this.hasTrait() and result = this.getPathResolutionResolved() and result = trait.getASuccessor(_) } @@ -2703,7 +2772,7 @@ private predicate inferNonMethodCallType = * A matching configuration for resolving types of operations like `a + b`. */ private module OperationMatchingInput implements MatchingInputSig { - private import codeql.rust.elements.internal.OperationImpl as OperationImpl + private import codeql.rust.elements.internal.OperationImpl::Impl as OperationImpl import FunctionPositionMatchingInput class Declaration extends MethodCallMatchingInput::Declaration { @@ -2783,18 +2852,19 @@ private predicate inferOperationType = ContextTyping::CheckContextTyping::check/2; pragma[nomagic] -private Type getFieldExprLookupType(FieldExpr fe, string name) { +private Type getFieldExprLookupType(FieldExpr fe, string name, boolean isDereferenced) { exists(TypePath path | result = inferType(fe.getContainer(), path) and name = fe.getIdentifier().getText() and - isComplexRootStripped(path, result) + isComplexRootStripped(path, result) and + if path.isEmpty() then isDereferenced = false else isDereferenced = true ) } pragma[nomagic] -private Type getTupleFieldExprLookupType(FieldExpr fe, int pos) { +private Type getTupleFieldExprLookupType(FieldExpr fe, int pos, boolean isDereferenced) { exists(string name | - result = getFieldExprLookupType(fe, name) and + result = getFieldExprLookupType(fe, name, isDereferenced) and pos = name.toInt() ) } @@ -2911,8 +2981,8 @@ private module FieldExprMatchingInput implements MatchingInputSig { // mutual recursion; resolving fields requires resolving types and vice versa result = [ - TStructFieldDecl(resolveStructFieldExpr(this)).(TDeclaration), - TTupleFieldDecl(resolveTupleFieldExpr(this)) + TStructFieldDecl(resolveStructFieldExpr(this, _)).(TDeclaration), + TTupleFieldDecl(resolveTupleFieldExpr(this, _)) ] } } @@ -2951,16 +3021,21 @@ private Type inferFieldExprType(AstNode n, TypePath path) { ) } +/** Gets the root type of the reference expression `ref`. */ +pragma[nomagic] +private Type inferRefExprType(RefExpr ref) { + if ref.isRaw() + then + ref.isMut() and result instanceof PtrMutType + or + ref.isConst() and result instanceof PtrConstType + else result instanceof RefType +} + /** Gets the root type of the reference node `ref`. */ pragma[nomagic] -private Type inferRefNodeType(AstNode ref) { - ( - ref = any(IdentPat ip | ip.isRef()).getName() - or - ref instanceof RefExpr - or - ref instanceof RefPat - ) and +private Type inferRefPatType(AstNode ref) { + (ref = any(IdentPat ip | ip.isRef()).getName() or ref instanceof RefPat) and result instanceof RefType } @@ -3024,13 +3099,18 @@ private Type inferLiteralType(LiteralExpr le, TypePath path, boolean certain) { } pragma[nomagic] -private TraitType getFutureTraitType() { result.getTrait() instanceof FutureTrait } +private DynTraitType getFutureTraitType() { result.getTrait() instanceof FutureTrait } pragma[nomagic] private AssociatedTypeTypeParameter getFutureOutputTypeParameter() { result.getTypeAlias() = any(FutureTrait ft).getOutputType() } +pragma[nomagic] +private DynTraitTypeParameter getDynFutureOutputTypeParameter() { + result = TDynTraitTypeParameter(any(FutureTrait ft).getOutputType()) +} + pragma[nomagic] predicate isUnitBlockExpr(BlockExpr be) { not be.getStmtList().hasTailExpr() and @@ -3047,7 +3127,7 @@ private Type inferBlockExprType(BlockExpr be, TypePath path) { result = getFutureTraitType() or isUnitBlockExpr(be) and - path = TypePath::singleton(getFutureOutputTypeParameter()) and + path = TypePath::singleton(getDynFutureOutputTypeParameter()) and result instanceof UnitType ) else ( isUnitBlockExpr(be) and @@ -3072,6 +3152,7 @@ final private class AwaitTarget extends Expr { } private module AwaitSatisfiesConstraintInput implements SatisfiesConstraintInputSig { + pragma[nomagic] predicate relevantConstraint(AwaitTarget term, Type constraint) { exists(term) and constraint.(TraitType).getTrait() instanceof FutureTrait @@ -3138,6 +3219,27 @@ private Type inferIndexExprType(IndexExpr ie, TypePath path) { ) } +pragma[nomagic] +private Type getInferredDerefType(DerefExpr de, TypePath path) { result = inferType(de, path) } + +pragma[nomagic] +private PtrType getInferredDerefExprPtrType(DerefExpr de) { result = inferType(de.getExpr()) } + +/** + * Gets the inferred type of `n` at `path` when `n` occurs in a dereference + * expression `*n` and when `n` is known to have a raw pointer type. + * + * The other direction is handled in `typeEqualityAsymmetric`. + */ +private Type inferDereferencedExprPtrType(AstNode n, TypePath path) { + exists(DerefExpr de, PtrType type, TypePath suffix | + de.getExpr() = n and + type = getInferredDerefExprPtrType(de) and + result = getInferredDerefType(de, suffix) and + path = TypePath::cons(type.getPositionalTypeParameter(0), suffix) + ) +} + /** * A matching configuration for resolving types of struct patterns * like `let Foo { bar } = ...`. @@ -3358,8 +3460,9 @@ private Type inferDynamicCallExprType(Expr n, TypePath path) { or // Propagate the function's parameter type to the arguments exists(int index | - n = ce.getCall().getArgList().getArg(index) and - path = path0.stripPrefix(fnParameterPath(ce.getCall().getNumberOfArgs(), index)) + n = ce.getCall().getSyntacticPositionalArgument(index) and + path = + path0.stripPrefix(fnParameterPath(ce.getCall().getArgList().getNumberOfArgs(), index)) ) ) or @@ -3369,16 +3472,17 @@ private Type inferDynamicCallExprType(Expr n, TypePath path) { ce.getTypeAt(TypePath::nil()).(DynTraitType).getTrait() instanceof FnOnceTrait | // Propagate the type of arguments to the parameter types of closure - exists(int index | + exists(int index, ArgList args | n = ce and - arity = ce.getCall().getNumberOfArgs() and - result = inferType(ce.getCall().getArg(index), path0) and + args = ce.getCall().getArgList() and + arity = args.getNumberOfArgs() and + result = inferType(args.getArg(index), path0) and path = closureParameterPath(arity, index).append(path0) ) or // Propagate the type of the call expression to the return type of the closure n = ce and - arity = ce.getCall().getNumberOfArgs() and + arity = ce.getCall().getArgList().getNumberOfArgs() and result = inferType(ce.getCall(), path0) and path = closureReturnPath().append(path0) ) @@ -3390,7 +3494,7 @@ private Type inferClosureExprType(AstNode n, TypePath path) { exists(ClosureExpr ce | n = ce and path.isEmpty() and - result = TDynTraitType(any(FnOnceTrait t)) + result = TDynTraitType(any(FnOnceTrait t)) // always exists because of the mention in `builtins/mentions.rs` or n = ce and path = TypePath::singleton(TDynTraitTypeParameter(any(FnOnceTrait t).getTypeParam())) and @@ -3409,32 +3513,56 @@ private Type inferCastExprType(CastExpr ce, TypePath path) { cached private module Cached { - /** Holds if `receiver` is the receiver of a method call with an implicit dereference. */ + /** Holds if `n` is implicitly dereferenced. */ cached - predicate receiverHasImplicitDeref(AstNode receiver) { - any(MethodResolution::MethodCall mc).receiverHasImplicitDeref(receiver) - } - - /** Holds if `receiver` is the receiver of a method call with an implicit borrow. */ - cached - predicate receiverHasImplicitBorrow(AstNode receiver) { - any(MethodResolution::MethodCall mc).receiverHasImplicitBorrow(receiver) - } - - /** Gets an item (function or tuple struct/variant) that `call` resolves to, if any. */ - cached - Addressable resolveCallTarget(Call call) { - result = call.(MethodResolution::MethodCall).resolveCallTarget(_, _, _) + predicate implicitDeref(AstNode n) { + any(MethodResolution::MethodCall mc).receiverHasImplicitDeref(n) or - result = call.(NonMethodResolution::NonMethodCall).resolveCallTarget() + n = + any(FieldExpr fe | + exists(resolveStructFieldExpr(fe, true)) + or + exists(resolveTupleFieldExpr(fe, true)) + ).getContainer() + } + + /** Holds if `n` is implicitly borrowed. */ + cached + predicate implicitBorrow(AstNode n) { + any(MethodResolution::MethodCall mc).argumentHasImplicitBorrow(n) + } + + /** + * Gets an item (function or tuple struct/variant) that `call` resolves to, if + * any. + * + * The parameter `dispatch` is `true` if and only if the resolved target is a + * trait item because a precise target could not be determined from the + * types (for instance in the presence of generics or `dyn` types) + */ + cached + Addressable resolveCallTarget(InvocationExpr call, boolean dispatch) { + dispatch = false and + result = call.(NonMethodResolution::NonMethodCall).resolveCallTargetViaPathResolution() + or + exists(ImplOrTraitItemNode i | + i instanceof TraitItemNode and dispatch = true + or + i instanceof ImplItemNode and dispatch = false + | + result = call.(MethodResolution::MethodCall).resolveCallTarget(i, _, _) or + result = call.(NonMethodResolution::NonMethodCall).resolveCallTargetViaTypeInference(i) + ) } /** * Gets the struct field that the field expression `fe` resolves to, if any. */ cached - StructField resolveStructFieldExpr(FieldExpr fe) { - exists(string name, Type ty | ty = getFieldExprLookupType(fe, pragma[only_bind_into](name)) | + StructField resolveStructFieldExpr(FieldExpr fe, boolean isDereferenced) { + exists(string name, Type ty | + ty = getFieldExprLookupType(fe, pragma[only_bind_into](name), isDereferenced) + | result = ty.(StructType).getStruct().getStructField(pragma[only_bind_into](name)) or result = ty.(UnionType).getUnion().getStructField(pragma[only_bind_into](name)) ) @@ -3444,10 +3572,10 @@ private module Cached { * Gets the tuple field that the field expression `fe` resolves to, if any. */ cached - TupleField resolveTupleFieldExpr(FieldExpr fe) { + TupleField resolveTupleFieldExpr(FieldExpr fe, boolean isDereferenced) { exists(int i | result = - getTupleFieldExprLookupType(fe, pragma[only_bind_into](i)) + getTupleFieldExprLookupType(fe, pragma[only_bind_into](i), isDereferenced) .(StructType) .getStruct() .getTupleField(pragma[only_bind_into](i)) @@ -3528,6 +3656,8 @@ private module Cached { or result = inferIndexExprType(n, path) or + result = inferDereferencedExprPtrType(n, path) + or result = inferForLoopExprType(n, path) or result = inferDynamicCallExprType(n, path) @@ -3563,9 +3693,9 @@ private module Debug { result = inferType(n, path) } - Addressable debugResolveCallTarget(Call c) { + Addressable debugResolveCallTarget(InvocationExpr c, boolean dispatch) { c = getRelevantLocatable() and - result = resolveCallTarget(c) + result = resolveCallTarget(c, dispatch) } predicate debugConditionSatisfiesConstraint( diff --git a/rust/ql/lib/codeql/rust/internal/TypeInferenceConsistency.qll b/rust/ql/lib/codeql/rust/internal/TypeInferenceConsistency.qll index 16eaff92bb6..11ad9bef2a2 100644 --- a/rust/ql/lib/codeql/rust/internal/TypeInferenceConsistency.qll +++ b/rust/ql/lib/codeql/rust/internal/TypeInferenceConsistency.qll @@ -11,7 +11,14 @@ import TypeInference::Consistency query predicate illFormedTypeMention(TypeMention tm) { Consistency::illFormedTypeMention(tm) and - not tm instanceof PathTypeReprMention and // avoid overlap with `PathTypeMention` + // avoid overlap with `PathTypeMention` + not tm instanceof PathTypeReprMention and + // known limitation for type mentions that would mention an escaping type parameter + not tm = + any(PathTypeMention ptm | + exists(ptm.resolvePathTypeAt(TypePath::nil())) and + not exists(ptm.resolveType()) + ) and // Only include inconsistencies in the source, as we otherwise get // inconsistencies from library code in every project. tm.fromSource() diff --git a/rust/ql/lib/codeql/rust/internal/TypeMention.qll b/rust/ql/lib/codeql/rust/internal/TypeMention.qll index 90de48035e3..3e2ca811107 100644 --- a/rust/ql/lib/codeql/rust/internal/TypeMention.qll +++ b/rust/ql/lib/codeql/rust/internal/TypeMention.qll @@ -77,7 +77,19 @@ class SliceTypeReprMention extends TypeMention instanceof SliceTypeRepr { } } -abstract class PathTypeMention extends TypeMention, Path { } +abstract class PathTypeMention extends TypeMention, Path { + abstract Type resolvePathTypeAt(TypePath typePath); + + final override Type resolveTypeAt(TypePath typePath) { + result = this.resolvePathTypeAt(typePath) and + ( + not result instanceof TypeParameter + or + // Prevent type parameters from escaping their scope + this = result.(TypeParameter).getDeclaringItem().getAChild*().getADescendant() + ) + } +} class AliasPathTypeMention extends PathTypeMention { TypeAlias resolved; @@ -94,7 +106,7 @@ class AliasPathTypeMention extends PathTypeMention { * Holds if this path resolved to a type alias with a rhs. that has the * resulting type at `typePath`. */ - override Type resolveTypeAt(TypePath typePath) { + override Type resolvePathTypeAt(TypePath typePath) { result = rhs.resolveTypeAt(typePath) and not result = pathGetTypeParameter(resolved, _) or @@ -275,7 +287,7 @@ class NonAliasPathTypeMention extends PathTypeMention { result = TAssociatedTypeTypeParameter(resolved) } - override Type resolveTypeAt(TypePath typePath) { + override Type resolvePathTypeAt(TypePath typePath) { typePath.isEmpty() and result = this.resolveRootType() or @@ -307,7 +319,9 @@ class ImplSelfMention extends PathTypeMention { ImplSelfMention() { this = impl.getASelfPath() } - override Type resolveTypeAt(TypePath typePath) { result = resolveImplSelfTypeAt(impl, typePath) } + override Type resolvePathTypeAt(TypePath typePath) { + result = resolveImplSelfTypeAt(impl, typePath) + } } class PathTypeReprMention extends TypeMention, PathTypeRepr { @@ -542,13 +556,18 @@ class NeverTypeReprMention extends TypeMention, NeverTypeRepr { } class PtrTypeReprMention extends TypeMention instanceof PtrTypeRepr { + private PtrType resolveRootType() { + super.isConst() and result instanceof PtrConstType + or + super.isMut() and result instanceof PtrMutType + } + override Type resolveTypeAt(TypePath path) { - path.isEmpty() and - result instanceof PtrType + path.isEmpty() and result = this.resolveRootType() or exists(TypePath suffix | result = super.getTypeRepr().(TypeMention).resolveTypeAt(suffix) and - path = TypePath::cons(getPtrTypeParameter(), suffix) + path = TypePath::cons(this.resolveRootType().getPositionalTypeParameter(0), suffix) ) } } diff --git a/rust/ql/lib/codeql/rust/internal/typeinference/FunctionType.qll b/rust/ql/lib/codeql/rust/internal/typeinference/FunctionType.qll index 53420cc7be6..c219ef0eacc 100644 --- a/rust/ql/lib/codeql/rust/internal/typeinference/FunctionType.qll +++ b/rust/ql/lib/codeql/rust/internal/typeinference/FunctionType.qll @@ -3,7 +3,6 @@ private import codeql.rust.internal.TypeInference private import codeql.rust.internal.PathResolution private import codeql.rust.internal.Type private import codeql.rust.internal.TypeMention -private import codeql.rust.elements.Call private newtype TFunctionPosition = TArgumentFunctionPosition(ArgumentPosition pos) or @@ -352,7 +351,7 @@ module ArgsAreInstantiationsOf { | rnk = 0 or - argsAreInstantiationsOfFromIndex(call, abs, f, rnk - 1) + argsAreInstantiationsOfToIndex(call, abs, f, rnk - 1) ) } @@ -361,15 +360,15 @@ module ArgsAreInstantiationsOf { } } - private module ArgIsInstantiationOfFromIndex = + private module ArgIsInstantiationOfToIndex = ArgIsInstantiationOf; pragma[nomagic] - private predicate argsAreInstantiationsOfFromIndex( + private predicate argsAreInstantiationsOfToIndex( Input::Call call, ImplOrTraitItemNode i, Function f, int rnk ) { exists(FunctionPosition pos | - ArgIsInstantiationOfFromIndex::argIsInstantiationOf(MkCallAndPos(call, pos), i, _) and + ArgIsInstantiationOfToIndex::argIsInstantiationOf(MkCallAndPos(call, pos), i, _) and call.hasTargetCand(i, f) and toCheckRanked(i, f, pos, rnk) ) @@ -382,7 +381,7 @@ module ArgsAreInstantiationsOf { pragma[nomagic] predicate argsAreInstantiationsOf(Input::Call call, ImplOrTraitItemNode i, Function f) { exists(int rnk | - argsAreInstantiationsOfFromIndex(call, i, f, rnk) and + argsAreInstantiationsOfToIndex(call, i, f, rnk) and rnk = max(int r | toCheckRanked(i, f, _, r)) ) } diff --git a/rust/ql/lib/codeql/rust/security/AccessAfterLifetimeExtensions.qll b/rust/ql/lib/codeql/rust/security/AccessAfterLifetimeExtensions.qll index 06438fef0c8..64b806331a6 100644 --- a/rust/ql/lib/codeql/rust/security/AccessAfterLifetimeExtensions.qll +++ b/rust/ql/lib/codeql/rust/security/AccessAfterLifetimeExtensions.qll @@ -100,9 +100,9 @@ module AccessAfterLifetime { a = b.getEnclosingBlock*() or // propagate through function calls - exists(CallExprBase ce | - mayEncloseOnStack(a, ce.getEnclosingBlock()) and - ce.getStaticTarget() = b.getEnclosingCallable() + exists(Call call | + mayEncloseOnStack(a, call.getEnclosingBlock()) and + call.getARuntimeTarget() = b.getEnclosingCallable() ) } diff --git a/rust/ql/lib/codeql/rust/security/AccessInvalidPointerExtensions.qll b/rust/ql/lib/codeql/rust/security/AccessInvalidPointerExtensions.qll index bddc2d8ee5a..b8b40ffa257 100644 --- a/rust/ql/lib/codeql/rust/security/AccessInvalidPointerExtensions.qll +++ b/rust/ql/lib/codeql/rust/security/AccessInvalidPointerExtensions.qll @@ -9,6 +9,7 @@ private import codeql.rust.dataflow.FlowSource private import codeql.rust.dataflow.FlowSink private import codeql.rust.Concepts private import codeql.rust.dataflow.internal.Node +private import codeql.rust.security.Barriers as Barriers /** * Provides default sources, sinks and barriers for detecting accesses to @@ -59,4 +60,10 @@ module AccessInvalidPointer { private class ModelsAsDataSink extends Sink { ModelsAsDataSink() { sinkNode(this, "pointer-access") } } + + /** + * A barrier for invalid pointer access vulnerabilities for values checked to + * be non-`null`. + */ + private class NotNullCheckBarrier extends Barrier instanceof Barriers::NotNullCheckBarrier { } } diff --git a/rust/ql/lib/codeql/rust/security/Barriers.qll b/rust/ql/lib/codeql/rust/security/Barriers.qll index a55e30aa13e..845a689af11 100644 --- a/rust/ql/lib/codeql/rust/security/Barriers.qll +++ b/rust/ql/lib/codeql/rust/security/Barriers.qll @@ -1,5 +1,5 @@ /** - * Classes to represent barriers commonly used in dataflow and taint tracking + * Classes to represent barriers commonly used in data flow and taint tracking * configurations. */ @@ -7,36 +7,58 @@ import rust private import codeql.rust.dataflow.DataFlow private import codeql.rust.internal.TypeInference as TypeInference private import codeql.rust.internal.Type +private import codeql.rust.controlflow.ControlFlowGraph as Cfg +private import codeql.rust.controlflow.CfgNodes as CfgNodes private import codeql.rust.frameworks.stdlib.Builtins as Builtins -/** - * A node whose type is a numeric or boolean type, which may be an appropriate - * taint flow barrier for some queries. - */ +/** A node whose type is a numeric type. */ class NumericTypeBarrier extends DataFlow::Node { NumericTypeBarrier() { - exists(StructType t, Struct s | - t = TypeInference::inferType(this.asExpr()) and - s = t.getStruct() - | - s instanceof Builtins::NumericType or - s instanceof Builtins::Bool - ) + TypeInference::inferType(this.asExpr()).(StructType).getStruct() instanceof + Builtins::NumericType + } +} + +/** A node whose type is `bool`. */ +class BooleanTypeBarrier extends DataFlow::Node { + BooleanTypeBarrier() { + TypeInference::inferType(this.asExpr()).(StructType).getStruct() instanceof Builtins::Bool + } +} + +/** A node whose type is an integral (integer). */ +class IntegralTypeBarrier extends DataFlow::Node { + IntegralTypeBarrier() { + TypeInference::inferType(this.asExpr()).(StructType).getStruct() instanceof + Builtins::IntegralType + } +} + +/** A node whose type is a fieldless enum. */ +class FieldlessEnumTypeBarrier extends DataFlow::Node { + FieldlessEnumTypeBarrier() { + TypeInference::inferType(this.asExpr()).(EnumType).getEnum().isFieldless() } } /** - * A node whose type is an integral (integer) or boolean type, which may be an + * Holds if guard expression `g` having result `branch` indicates that the + * sub-expression `e` is not null. For example when `ptr.is_null()` is + * `false`, we have that `ptr` is not null. + */ +private predicate notNullCheck(AstNode g, Expr e, boolean branch) { + exists(MethodCallExpr call | + call.getStaticTarget().getName().getText() = "is_null" and + g = call and + e = call.getReceiver() and + branch = false + ) +} + +/** + * A node representing a value checked to be non-null. This may be an * appropriate taint flow barrier for some queries. */ -class IntegralOrBooleanTypeBarrier extends DataFlow::Node { - IntegralOrBooleanTypeBarrier() { - exists(StructType t, Struct s | - t = TypeInference::inferType(this.asExpr()) and - s = t.getStruct() - | - s instanceof Builtins::IntegralType or - s instanceof Builtins::Bool - ) - } +class NotNullCheckBarrier extends DataFlow::Node { + NotNullCheckBarrier() { this = DataFlow::BarrierGuard::getABarrierNode() } } diff --git a/rust/ql/lib/codeql/rust/security/CleartextLoggingExtensions.qll b/rust/ql/lib/codeql/rust/security/CleartextLoggingExtensions.qll index 0961efd553f..f634992fb81 100644 --- a/rust/ql/lib/codeql/rust/security/CleartextLoggingExtensions.qll +++ b/rust/ql/lib/codeql/rust/security/CleartextLoggingExtensions.qll @@ -8,6 +8,7 @@ private import codeql.rust.dataflow.DataFlow private import codeql.rust.dataflow.FlowSink private import codeql.rust.security.SensitiveData private import codeql.rust.Concepts +private import codeql.rust.security.Barriers as Barriers /** * Provides default sources, sinks and barriers for detecting cleartext logging @@ -42,4 +43,9 @@ module CleartextLogging { private class ModelsAsDataSink extends Sink { ModelsAsDataSink() { sinkNode(this, "log-injection") } } + + private class BooleanTypeBarrier extends Barrier instanceof Barriers::BooleanTypeBarrier { } + + private class FieldlessEnumTypeBarrier extends Barrier instanceof Barriers::FieldlessEnumTypeBarrier + { } } diff --git a/rust/ql/lib/codeql/rust/security/DisabledCertificateCheckExtensions.qll b/rust/ql/lib/codeql/rust/security/DisabledCertificateCheckExtensions.qll new file mode 100644 index 00000000000..a86ee506dfa --- /dev/null +++ b/rust/ql/lib/codeql/rust/security/DisabledCertificateCheckExtensions.qll @@ -0,0 +1,45 @@ +/** + * Provides classes and predicates for reasoning about disabled certificate + * check vulnerabilities. + */ + +import rust +private import codeql.rust.dataflow.DataFlow +private import codeql.rust.dataflow.FlowSink +private import codeql.rust.Concepts +private import codeql.rust.dataflow.internal.Node as Node + +/** + * Provides default sinks for detecting disabled certificate check + * vulnerabilities, as well as extension points for adding your own. + */ +module DisabledCertificateCheckExtensions { + /** + * A data flow sink for disabled certificate check vulnerabilities. + */ + abstract class Sink extends QuerySink::Range { + override string getSinkType() { result = "DisabledCertificateCheck" } + } + + /** + * A sink for disabled certificate check vulnerabilities from model data. + */ + private class ModelsAsDataSink extends Sink { + ModelsAsDataSink() { sinkNode(this, "disable-certificate") } + } + + /** + * A heuristic sink for disabled certificate check vulnerabilities based on function names. + */ + private class HeuristicSink extends Sink { + HeuristicSink() { + exists(Call call | + call.getStaticTarget().getName().getText() = + ["danger_accept_invalid_certs", "danger_accept_invalid_hostnames"] and + call.getPositionalArgument(0) = this.asExpr() and + // don't duplicate modeled sinks + not exists(ModelsAsDataSink s | s.(Node::FlowSummaryNode).getSinkElement().getCall() = call) + ) + } + } +} diff --git a/rust/ql/lib/codeql/rust/security/HardcodedCryptographicValueExtensions.qll b/rust/ql/lib/codeql/rust/security/HardcodedCryptographicValueExtensions.qll index a7fb35d138b..9bdfc53971e 100644 --- a/rust/ql/lib/codeql/rust/security/HardcodedCryptographicValueExtensions.qll +++ b/rust/ql/lib/codeql/rust/security/HardcodedCryptographicValueExtensions.qll @@ -9,6 +9,7 @@ private import codeql.rust.dataflow.FlowSource private import codeql.rust.dataflow.FlowSink private import codeql.rust.Concepts private import codeql.rust.security.SensitiveData +private import codeql.rust.dataflow.internal.Node as Node /** * A kind of cryptographic value. @@ -98,15 +99,45 @@ module HardcodedCryptographicValue { override CryptographicValueKind getKind() { result = kind } } + /** + * A heuristic sink for hard-coded cryptographic value vulnerabilities. + */ + private class HeuristicSinks extends Sink { + CryptographicValueKind kind; + + HeuristicSinks() { + // any argument going to a parameter whose name matches a credential name + exists(Call c, Function f, int argIndex, string argName | + c.getPositionalArgument(argIndex) = this.asExpr() and + c.getStaticTarget() = f and + f.getParam(argIndex).getPat().(IdentPat).getName().getText() = argName and + ( + argName = "password" and kind = "password" + or + argName = "iv" and kind = "iv" + or + argName = "nonce" and kind = "nonce" + or + argName = "salt" and kind = "salt" + // + // note: matching "key" results in too many false positives + ) and + // don't duplicate modeled sinks + not exists(ModelsAsDataSinks s | s.(Node::FlowSummaryNode).getSinkElement().getCall() = c) + ) + } + + override CryptographicValueKind getKind() { result = kind } + } + /** * A call to `getrandom` that is a barrier. */ private class GetRandomBarrier extends Barrier { GetRandomBarrier() { - exists(CallExprBase ce | - ce.getStaticTarget().(Addressable).getCanonicalPath() = - ["getrandom::fill", "getrandom::getrandom"] and - this.asExpr().getParentNode*() = ce.getArgList().getArg(0) + exists(Call call | + call.getStaticTarget().getCanonicalPath() = ["getrandom::fill", "getrandom::getrandom"] and + this.asExpr().getParentNode*() = call.getPositionalArgument(0) ) } } diff --git a/rust/ql/lib/codeql/rust/security/InsecureCookieExtensions.qll b/rust/ql/lib/codeql/rust/security/InsecureCookieExtensions.qll index 8e9f855209e..87d37d6b85b 100644 --- a/rust/ql/lib/codeql/rust/security/InsecureCookieExtensions.qll +++ b/rust/ql/lib/codeql/rust/security/InsecureCookieExtensions.qll @@ -80,12 +80,12 @@ module InsecureCookie { * as `false`. */ predicate cookieSetNode(DataFlow::Node node, string attrib, boolean value) { - exists(FlowSummaryNode summaryNode, CallExprBase ce, int arg, DataFlow::Node argNode | + exists(FlowSummaryNode summaryNode, MethodCall call, int arg, DataFlow::Node argNode | // decode the models-as-data `OptionalBarrier` cookieOptionalBarrier(summaryNode, attrib, arg) and // find a call and arg referenced by this optional barrier - ce.getStaticTarget() = summaryNode.getSummarizedCallable() and - ce.getArg(arg) = argNode.asExpr() and + call.getStaticTarget() = summaryNode.getSummarizedCallable() and + call.getPositionalArgument(arg) = argNode.asExpr() and // check if the argument is always `true` ( if @@ -101,12 +101,12 @@ module InsecureCookie { // and find the node where this happens (we can't just use the flow summary node, since its // shared across all calls to the modeled function, we need a node specific to this call) ( - node.asExpr() = ce.(MethodCallExpr).getReceiver() // e.g. `a` in `a.set_secure(true)` + node.asExpr() = call.getReceiver() // e.g. `a` in `a.set_secure(true)` or exists(BasicBlock bb, int i | // associated SSA node node.(SsaNode).asDefinition().definesAt(_, bb, i) and - ce.(MethodCallExpr).getReceiver() = bb.getNode(i).getAstNode() + call.getReceiver() = bb.getNode(i).getAstNode() ) ) ) diff --git a/rust/ql/lib/codeql/rust/security/LogInjectionExtensions.qll b/rust/ql/lib/codeql/rust/security/LogInjectionExtensions.qll index dafebc96731..31403b625f9 100644 --- a/rust/ql/lib/codeql/rust/security/LogInjectionExtensions.qll +++ b/rust/ql/lib/codeql/rust/security/LogInjectionExtensions.qll @@ -46,7 +46,12 @@ module LogInjection { /** * A barrier for log injection vulnerabilities for nodes whose type is a - * numeric or boolean type, which is unlikely to expose any vulnerability. + * numeric type, which is unlikely to expose any vulnerability. */ private class NumericTypeBarrier extends Barrier instanceof Barriers::NumericTypeBarrier { } + + private class BooleanTypeBarrier extends Barrier instanceof Barriers::BooleanTypeBarrier { } + + private class FieldlessEnumTypeBarrier extends Barrier instanceof Barriers::FieldlessEnumTypeBarrier + { } } diff --git a/rust/ql/lib/codeql/rust/security/SensitiveData.qll b/rust/ql/lib/codeql/rust/security/SensitiveData.qll index 1b6abdd52fb..c4cd7c31366 100644 --- a/rust/ql/lib/codeql/rust/security/SensitiveData.qll +++ b/rust/ql/lib/codeql/rust/security/SensitiveData.qll @@ -28,12 +28,13 @@ private class SensitiveDataCall extends SensitiveData { SensitiveDataClassification classification; SensitiveDataCall() { - exists(CallExprBase call, string name | + exists(InvocationExpr call, Addressable target, string name | call = this.asExpr() and + target = call.getResolvedTarget() and name = [ - call.getStaticTarget().(Function).getName().getText(), - call.(CallExpr).getVariant().getName().getText(), + target.(Function).getName().getText(), + target.(Variant).getName().getText(), ] and HeuristicNames::nameIndicatesSensitiveData(name, classification) ) diff --git a/rust/ql/lib/codeql/rust/security/SqlInjectionExtensions.qll b/rust/ql/lib/codeql/rust/security/SqlInjectionExtensions.qll index ff81df37e40..f36ab264987 100644 --- a/rust/ql/lib/codeql/rust/security/SqlInjectionExtensions.qll +++ b/rust/ql/lib/codeql/rust/security/SqlInjectionExtensions.qll @@ -60,8 +60,13 @@ module SqlInjection { } /** - * A barrier for SQL injection vulnerabilities for nodes whose type is a numeric or - * boolean type, which is unlikely to expose any vulnerability. + * A barrier for SQL injection vulnerabilities for nodes whose type is a numeric + * type, which is unlikely to expose any vulnerability. */ private class NumericTypeBarrier extends Barrier instanceof Barriers::NumericTypeBarrier { } + + private class BooleanTypeBarrier extends Barrier instanceof Barriers::BooleanTypeBarrier { } + + private class FieldlessEnumTypeBarrier extends Barrier instanceof Barriers::FieldlessEnumTypeBarrier + { } } diff --git a/rust/ql/lib/codeql/rust/security/TaintedPathExtensions.qll b/rust/ql/lib/codeql/rust/security/TaintedPathExtensions.qll index 2d097c0aa4c..ccf3736ceb4 100644 --- a/rust/ql/lib/codeql/rust/security/TaintedPathExtensions.qll +++ b/rust/ql/lib/codeql/rust/security/TaintedPathExtensions.qll @@ -66,11 +66,11 @@ module SanitizerGuard { * A check of the form `!strings.Contains(nd, "..")`, considered as a sanitizer guard for * path traversal. */ -private class DotDotCheck extends SanitizerGuard::Range, MethodCallExpr { +private class DotDotCheck extends SanitizerGuard::Range, MethodCall { DotDotCheck() { - this.getStaticTarget().(Addressable).getCanonicalPath() = + this.getStaticTarget().getCanonicalPath() = ["::contains", "::contains"] and - this.getArg(0).(LiteralExpr).getTextValue() = ["\"..\"", "\"../\"", "\"..\\\""] + this.getPositionalArgument(0).(LiteralExpr).getTextValue() = ["\"..\"", "\"../\"", "\"..\\\""] } override predicate checks(Expr e, boolean branch) { diff --git a/rust/ql/lib/codeql/rust/security/XssExtensions.qll b/rust/ql/lib/codeql/rust/security/XssExtensions.qll new file mode 100644 index 00000000000..cb0510cd704 --- /dev/null +++ b/rust/ql/lib/codeql/rust/security/XssExtensions.qll @@ -0,0 +1,62 @@ +/** + * Provides classes and predicates for reasoning about cross-site scripting (XSS) + * vulnerabilities. + */ + +import rust +private import codeql.rust.dataflow.DataFlow +private import codeql.rust.dataflow.FlowSink +private import codeql.rust.Concepts +private import codeql.util.Unit +private import codeql.rust.security.Barriers as Barriers + +/** + * Provides default sources, sinks and barriers for detecting XSS + * vulnerabilities, as well as extension points for adding your own. + */ +module Xss { + /** + * A data flow source for XSS vulnerabilities. + */ + abstract class Source extends DataFlow::Node { } + + /** + * A data flow sink for XSS vulnerabilities. + */ + abstract class Sink extends QuerySink::Range { + override string getSinkType() { result = "Xss" } + } + + /** + * A barrier for XSS vulnerabilities. + */ + abstract class Barrier extends DataFlow::Node { } + + /** + * An active threat-model source, considered as a flow source. + */ + private class ActiveThreatModelSourceAsSource extends Source, ActiveThreatModelSource { } + + /** + * A sink for XSS from model data. + */ + private class ModelsAsDataSink extends Sink { + ModelsAsDataSink() { sinkNode(this, "html-injection") } + } + + /** + * A barrier for XSS vulnerabilities for nodes whose type is a + * numeric or boolean type, which is unlikely to expose any vulnerability. + */ + private class NumericTypeBarrier extends Barrier instanceof Barriers::NumericTypeBarrier { } + + /** A call to a function with "escape" or "encode" in its name. */ + private class HeuristicHtmlEncodingBarrier extends Barrier { + HeuristicHtmlEncodingBarrier() { + exists(Call c | + c.getStaticTarget().getName().getText().regexpMatch(".*(escape|encode).*") and + c.getAnArgument() = this.asExpr() + ) + } + } +} diff --git a/rust/ql/lib/codeql/rust/security/regex/RegexInjectionExtensions.qll b/rust/ql/lib/codeql/rust/security/regex/RegexInjectionExtensions.qll index 7c445bcbfd8..7cb0dc47c9f 100644 --- a/rust/ql/lib/codeql/rust/security/regex/RegexInjectionExtensions.qll +++ b/rust/ql/lib/codeql/rust/security/regex/RegexInjectionExtensions.qll @@ -53,10 +53,10 @@ module RegexInjection { */ private class NewSink extends Sink { NewSink() { - exists(CallExprBase call, Addressable a | - call.getStaticTarget() = a and - a.getCanonicalPath() = "::new" and - this.asExpr() = call.getArg(0) and + exists(Call call, Function f | + call.getStaticTarget() = f and + f.getCanonicalPath() = "::new" and + this.asExpr() = call.getPositionalArgument(0) and not this.asExpr() instanceof LiteralExpr ) } @@ -89,11 +89,12 @@ module RegexInjection { /** * A barrier for regular expression injection vulnerabilities for nodes whose - * type is an integral or boolean type, which is unlikely to expose any vulnerability. + * type is an integral type, which is unlikely to expose any vulnerability. * * We don't include floating point types in this barrier, as `.` is a special character * in regular expressions. */ - private class IntegralOrBooleanTypeBarrier extends Barrier instanceof Barriers::IntegralOrBooleanTypeBarrier - { } + private class IntegralTypeBarrier extends Barrier instanceof Barriers::IntegralTypeBarrier { } + + private class BooleanTypeBarrier extends Barrier instanceof Barriers::BooleanTypeBarrier { } } diff --git a/rust/ql/lib/qlpack.yml b/rust/ql/lib/qlpack.yml index bbd3b4da4b5..a1006c2fb73 100644 --- a/rust/ql/lib/qlpack.yml +++ b/rust/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rust-all -version: 0.1.21-dev +version: 0.2.2-dev groups: rust extractor: rust dbscheme: rust.dbscheme diff --git a/rust/ql/lib/rust.dbscheme b/rust/ql/lib/rust.dbscheme index 30a0713e5bf..e54d01f67a4 100644 --- a/rust/ql/lib/rust.dbscheme +++ b/rust/ql/lib/rust.dbscheme @@ -398,7 +398,7 @@ callable_attrs( | @become_expr | @binary_expr | @break_expr -| @call_expr_base +| @call_expr | @cast_expr | @closure_expr | @continue_expr @@ -412,6 +412,7 @@ callable_attrs( | @macro_block_expr | @macro_expr | @match_expr +| @method_call_expr | @offset_of_expr | @paren_expr | @path_expr_base @@ -1480,24 +1481,29 @@ break_expr_lifetimes( int lifetime: @lifetime ref ); -@call_expr_base = - @call_expr -| @method_call_expr -; +call_exprs( + unique int id: @call_expr +); #keyset[id] -call_expr_base_arg_lists( - int id: @call_expr_base ref, +call_expr_arg_lists( + int id: @call_expr ref, int arg_list: @arg_list ref ); #keyset[id, index] -call_expr_base_attrs( - int id: @call_expr_base ref, +call_expr_attrs( + int id: @call_expr ref, int index: int ref, int attr: @attr ref ); +#keyset[id] +call_expr_functions( + int id: @call_expr ref, + int function: @expr ref +); + cast_exprs( unique int id: @cast_expr ); @@ -2100,6 +2106,41 @@ match_expr_match_arm_lists( int match_arm_list: @match_arm_list ref ); +method_call_exprs( + unique int id: @method_call_expr +); + +#keyset[id] +method_call_expr_arg_lists( + int id: @method_call_expr ref, + int arg_list: @arg_list ref +); + +#keyset[id, index] +method_call_expr_attrs( + int id: @method_call_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +method_call_expr_generic_arg_lists( + int id: @method_call_expr ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +method_call_expr_identifiers( + int id: @method_call_expr ref, + int identifier: @name_ref ref +); + +#keyset[id] +method_call_expr_receivers( + int id: @method_call_expr ref, + int receiver: @expr ref +); + name_refs( unique int id: @name_ref ); @@ -2776,16 +2817,6 @@ block_expr_stmt_lists( int stmt_list: @stmt_list ref ); -call_exprs( - unique int id: @call_expr -); - -#keyset[id] -call_expr_functions( - int id: @call_expr ref, - int function: @expr ref -); - extern_blocks( unique int id: @extern_block ); @@ -2988,28 +3019,6 @@ macro_rules_visibilities( int visibility: @visibility ref ); -method_call_exprs( - unique int id: @method_call_expr -); - -#keyset[id] -method_call_expr_generic_arg_lists( - int id: @method_call_expr ref, - int generic_arg_list: @generic_arg_list ref -); - -#keyset[id] -method_call_expr_identifiers( - int id: @method_call_expr ref, - int identifier: @name_ref ref -); - -#keyset[id] -method_call_expr_receivers( - int id: @method_call_expr ref, - int receiver: @expr ref -); - modules( unique int id: @module ); diff --git a/rust/ql/lib/rust.qll b/rust/ql/lib/rust.qll index d209672028b..410f062d91e 100644 --- a/rust/ql/lib/rust.qll +++ b/rust/ql/lib/rust.qll @@ -6,6 +6,7 @@ import codeql.Locations import codeql.files.FileSystem import codeql.rust.elements.Operation import codeql.rust.elements.ArithmeticOperation +import codeql.rust.elements.InvocationExpr import codeql.rust.elements.AssignmentOperation import codeql.rust.elements.BitwiseOperation import codeql.rust.elements.ComparisonOperation @@ -18,6 +19,7 @@ import codeql.rust.elements.Variable import codeql.rust.elements.NamedFormatArgument import codeql.rust.elements.PositionalFormatArgument import codeql.rust.elements.RangeExprExt -private import codeql.rust.elements.Call as Call - -class Call = Call::Call; +import codeql.rust.elements.Call +import codeql.rust.elements.TupleStructExpr +import codeql.rust.elements.TupleVariantExpr +import codeql.rust.elements.Method diff --git a/rust/ql/lib/upgrades/30a0713e5bf69c60d003e4994e5abd1c78a36826/old.dbscheme b/rust/ql/lib/upgrades/30a0713e5bf69c60d003e4994e5abd1c78a36826/old.dbscheme new file mode 100644 index 00000000000..30a0713e5bf --- /dev/null +++ b/rust/ql/lib/upgrades/30a0713e5bf69c60d003e4994e5abd1c78a36826/old.dbscheme @@ -0,0 +1,3615 @@ +// generated by codegen, do not edit + +// from ../shared/tree-sitter-extractor/src/generator/prefix.dbscheme +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Empty location -*/ + +empty_location( + int location: @location_default ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- Diagnostic messages: severity -*/ + +case @diagnostic.severity of + 10 = @diagnostic_debug +| 20 = @diagnostic_info +| 30 = @diagnostic_warning +| 40 = @diagnostic_error +; + +/*- YAML -*/ + +#keyset[parent, idx] +yaml (unique int id: @yaml_node, + int kind: int ref, + int parent: @yaml_node_parent ref, + int idx: int ref, + string tag: string ref, + string tostring: string ref); + +case @yaml_node.kind of + 0 = @yaml_scalar_node +| 1 = @yaml_mapping_node +| 2 = @yaml_sequence_node +| 3 = @yaml_alias_node +; + +@yaml_collection_node = @yaml_mapping_node | @yaml_sequence_node; + +@yaml_node_parent = @yaml_collection_node | @file; + +yaml_anchors (unique int node: @yaml_node ref, + string anchor: string ref); + +yaml_aliases (unique int alias: @yaml_alias_node ref, + string target: string ref); + +yaml_scalars (unique int scalar: @yaml_scalar_node ref, + int style: int ref, + string value: string ref); + +yaml_errors (unique int id: @yaml_error, + string message: string ref); + +yaml_locations(unique int locatable: @yaml_locatable ref, + int location: @location_default ref); + +@yaml_locatable = @yaml_node | @yaml_error; + +/*- Database metadata -*/ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +overlayChangedFiles( + string path: string ref +); + + +// from prefix.dbscheme +#keyset[id] +locatable_locations( + int id: @locatable ref, + int location: @location_default ref +); + + +// from schema + +@element = + @extractor_step +| @locatable +| @named_crate +| @unextracted +; + +extractor_steps( + unique int id: @extractor_step, + string action: string ref, + int duration_ms: int ref +); + +#keyset[id] +extractor_step_files( + int id: @extractor_step ref, + int file: @file ref +); + +@locatable = + @ast_node +| @crate +; + +named_crates( + unique int id: @named_crate, + string name: string ref, + int crate: @crate ref +); + +@unextracted = + @missing +| @unimplemented +; + +@ast_node = + @abi +| @addressable +| @arg_list +| @asm_dir_spec +| @asm_operand +| @asm_operand_expr +| @asm_option +| @asm_piece +| @asm_reg_spec +| @assoc_item_list +| @attr +| @callable +| @expr +| @extern_item_list +| @field_list +| @for_binder +| @format_args_arg +| @generic_arg +| @generic_arg_list +| @generic_param +| @generic_param_list +| @item_list +| @label +| @let_else +| @macro_items +| @match_arm +| @match_arm_list +| @match_guard +| @meta +| @name +| @param_base +| @param_list +| @parenthesized_arg_list +| @pat +| @path +| @path_ast_node +| @path_segment +| @rename +| @ret_type_repr +| @return_type_syntax +| @source_file +| @stmt +| @stmt_list +| @struct_expr_field +| @struct_expr_field_list +| @struct_field +| @struct_pat_field +| @struct_pat_field_list +| @token +| @token_tree +| @tuple_field +| @type_bound +| @type_bound_list +| @type_repr +| @use_bound_generic_arg +| @use_bound_generic_args +| @use_tree +| @use_tree_list +| @variant_list +| @visibility +| @where_clause +| @where_pred +; + +crates( + unique int id: @crate +); + +#keyset[id] +crate_names( + int id: @crate ref, + string name: string ref +); + +#keyset[id] +crate_versions( + int id: @crate ref, + string version: string ref +); + +#keyset[id, index] +crate_cfg_options( + int id: @crate ref, + int index: int ref, + string cfg_option: string ref +); + +#keyset[id, index] +crate_named_dependencies( + int id: @crate ref, + int index: int ref, + int named_dependency: @named_crate ref +); + +missings( + unique int id: @missing +); + +unimplementeds( + unique int id: @unimplemented +); + +abis( + unique int id: @abi +); + +#keyset[id] +abi_abi_strings( + int id: @abi ref, + string abi_string: string ref +); + +@addressable = + @item +| @variant +; + +arg_lists( + unique int id: @arg_list +); + +#keyset[id, index] +arg_list_args( + int id: @arg_list ref, + int index: int ref, + int arg: @expr ref +); + +asm_dir_specs( + unique int id: @asm_dir_spec +); + +@asm_operand = + @asm_const +| @asm_label +| @asm_reg_operand +| @asm_sym +; + +asm_operand_exprs( + unique int id: @asm_operand_expr +); + +#keyset[id] +asm_operand_expr_in_exprs( + int id: @asm_operand_expr ref, + int in_expr: @expr ref +); + +#keyset[id] +asm_operand_expr_out_exprs( + int id: @asm_operand_expr ref, + int out_expr: @expr ref +); + +asm_options( + unique int id: @asm_option +); + +#keyset[id] +asm_option_is_raw( + int id: @asm_option ref +); + +@asm_piece = + @asm_clobber_abi +| @asm_operand_named +| @asm_options_list +; + +asm_reg_specs( + unique int id: @asm_reg_spec +); + +#keyset[id] +asm_reg_spec_identifiers( + int id: @asm_reg_spec ref, + int identifier: @name_ref ref +); + +assoc_item_lists( + unique int id: @assoc_item_list +); + +#keyset[id, index] +assoc_item_list_assoc_items( + int id: @assoc_item_list ref, + int index: int ref, + int assoc_item: @assoc_item ref +); + +#keyset[id, index] +assoc_item_list_attrs( + int id: @assoc_item_list ref, + int index: int ref, + int attr: @attr ref +); + +attrs( + unique int id: @attr +); + +#keyset[id] +attr_meta( + int id: @attr ref, + int meta: @meta ref +); + +@callable = + @closure_expr +| @function +; + +#keyset[id] +callable_param_lists( + int id: @callable ref, + int param_list: @param_list ref +); + +#keyset[id, index] +callable_attrs( + int id: @callable ref, + int index: int ref, + int attr: @attr ref +); + +@expr = + @array_expr_internal +| @asm_expr +| @await_expr +| @become_expr +| @binary_expr +| @break_expr +| @call_expr_base +| @cast_expr +| @closure_expr +| @continue_expr +| @field_expr +| @format_args_expr +| @if_expr +| @index_expr +| @labelable_expr +| @let_expr +| @literal_expr +| @macro_block_expr +| @macro_expr +| @match_expr +| @offset_of_expr +| @paren_expr +| @path_expr_base +| @prefix_expr +| @range_expr +| @ref_expr +| @return_expr +| @struct_expr +| @try_expr +| @tuple_expr +| @underscore_expr +| @yeet_expr +| @yield_expr +; + +extern_item_lists( + unique int id: @extern_item_list +); + +#keyset[id, index] +extern_item_list_attrs( + int id: @extern_item_list ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +extern_item_list_extern_items( + int id: @extern_item_list ref, + int index: int ref, + int extern_item: @extern_item ref +); + +@field_list = + @struct_field_list +| @tuple_field_list +; + +for_binders( + unique int id: @for_binder +); + +#keyset[id] +for_binder_generic_param_lists( + int id: @for_binder ref, + int generic_param_list: @generic_param_list ref +); + +format_args_args( + unique int id: @format_args_arg +); + +#keyset[id] +format_args_arg_exprs( + int id: @format_args_arg ref, + int expr: @expr ref +); + +#keyset[id] +format_args_arg_names( + int id: @format_args_arg ref, + int name: @name ref +); + +@generic_arg = + @assoc_type_arg +| @const_arg +| @lifetime_arg +| @type_arg +; + +generic_arg_lists( + unique int id: @generic_arg_list +); + +#keyset[id, index] +generic_arg_list_generic_args( + int id: @generic_arg_list ref, + int index: int ref, + int generic_arg: @generic_arg ref +); + +@generic_param = + @const_param +| @lifetime_param +| @type_param +; + +generic_param_lists( + unique int id: @generic_param_list +); + +#keyset[id, index] +generic_param_list_generic_params( + int id: @generic_param_list ref, + int index: int ref, + int generic_param: @generic_param ref +); + +item_lists( + unique int id: @item_list +); + +#keyset[id, index] +item_list_attrs( + int id: @item_list ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +item_list_items( + int id: @item_list ref, + int index: int ref, + int item: @item ref +); + +labels( + unique int id: @label +); + +#keyset[id] +label_lifetimes( + int id: @label ref, + int lifetime: @lifetime ref +); + +let_elses( + unique int id: @let_else +); + +#keyset[id] +let_else_block_exprs( + int id: @let_else ref, + int block_expr: @block_expr ref +); + +macro_items( + unique int id: @macro_items +); + +#keyset[id, index] +macro_items_items( + int id: @macro_items ref, + int index: int ref, + int item: @item ref +); + +match_arms( + unique int id: @match_arm +); + +#keyset[id, index] +match_arm_attrs( + int id: @match_arm ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +match_arm_exprs( + int id: @match_arm ref, + int expr: @expr ref +); + +#keyset[id] +match_arm_guards( + int id: @match_arm ref, + int guard: @match_guard ref +); + +#keyset[id] +match_arm_pats( + int id: @match_arm ref, + int pat: @pat ref +); + +match_arm_lists( + unique int id: @match_arm_list +); + +#keyset[id, index] +match_arm_list_arms( + int id: @match_arm_list ref, + int index: int ref, + int arm: @match_arm ref +); + +#keyset[id, index] +match_arm_list_attrs( + int id: @match_arm_list ref, + int index: int ref, + int attr: @attr ref +); + +match_guards( + unique int id: @match_guard +); + +#keyset[id] +match_guard_conditions( + int id: @match_guard ref, + int condition: @expr ref +); + +meta( + unique int id: @meta +); + +#keyset[id] +meta_exprs( + int id: @meta ref, + int expr: @expr ref +); + +#keyset[id] +meta_is_unsafe( + int id: @meta ref +); + +#keyset[id] +meta_paths( + int id: @meta ref, + int path: @path ref +); + +#keyset[id] +meta_token_trees( + int id: @meta ref, + int token_tree: @token_tree ref +); + +names( + unique int id: @name +); + +#keyset[id] +name_texts( + int id: @name ref, + string text: string ref +); + +@param_base = + @param +| @self_param +; + +#keyset[id, index] +param_base_attrs( + int id: @param_base ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +param_base_type_reprs( + int id: @param_base ref, + int type_repr: @type_repr ref +); + +param_lists( + unique int id: @param_list +); + +#keyset[id, index] +param_list_params( + int id: @param_list ref, + int index: int ref, + int param: @param ref +); + +#keyset[id] +param_list_self_params( + int id: @param_list ref, + int self_param: @self_param ref +); + +parenthesized_arg_lists( + unique int id: @parenthesized_arg_list +); + +#keyset[id, index] +parenthesized_arg_list_type_args( + int id: @parenthesized_arg_list ref, + int index: int ref, + int type_arg: @type_arg ref +); + +@pat = + @box_pat +| @const_block_pat +| @ident_pat +| @literal_pat +| @macro_pat +| @or_pat +| @paren_pat +| @path_pat +| @range_pat +| @ref_pat +| @rest_pat +| @slice_pat +| @struct_pat +| @tuple_pat +| @tuple_struct_pat +| @wildcard_pat +; + +paths( + unique int id: @path +); + +#keyset[id] +path_qualifiers( + int id: @path ref, + int qualifier: @path ref +); + +#keyset[id] +path_segments_( + int id: @path ref, + int segment: @path_segment ref +); + +@path_ast_node = + @path_expr +| @path_pat +| @struct_expr +| @struct_pat +| @tuple_struct_pat +; + +#keyset[id] +path_ast_node_paths( + int id: @path_ast_node ref, + int path: @path ref +); + +path_segments( + unique int id: @path_segment +); + +#keyset[id] +path_segment_generic_arg_lists( + int id: @path_segment ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +path_segment_identifiers( + int id: @path_segment ref, + int identifier: @name_ref ref +); + +#keyset[id] +path_segment_parenthesized_arg_lists( + int id: @path_segment ref, + int parenthesized_arg_list: @parenthesized_arg_list ref +); + +#keyset[id] +path_segment_ret_types( + int id: @path_segment ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +path_segment_return_type_syntaxes( + int id: @path_segment ref, + int return_type_syntax: @return_type_syntax ref +); + +#keyset[id] +path_segment_type_reprs( + int id: @path_segment ref, + int type_repr: @type_repr ref +); + +#keyset[id] +path_segment_trait_type_reprs( + int id: @path_segment ref, + int trait_type_repr: @path_type_repr ref +); + +renames( + unique int id: @rename +); + +#keyset[id] +rename_names( + int id: @rename ref, + int name: @name ref +); + +ret_type_reprs( + unique int id: @ret_type_repr +); + +#keyset[id] +ret_type_repr_type_reprs( + int id: @ret_type_repr ref, + int type_repr: @type_repr ref +); + +return_type_syntaxes( + unique int id: @return_type_syntax +); + +source_files( + unique int id: @source_file +); + +#keyset[id, index] +source_file_attrs( + int id: @source_file ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +source_file_items( + int id: @source_file ref, + int index: int ref, + int item: @item ref +); + +@stmt = + @expr_stmt +| @item +| @let_stmt +; + +stmt_lists( + unique int id: @stmt_list +); + +#keyset[id, index] +stmt_list_attrs( + int id: @stmt_list ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +stmt_list_statements( + int id: @stmt_list ref, + int index: int ref, + int statement: @stmt ref +); + +#keyset[id] +stmt_list_tail_exprs( + int id: @stmt_list ref, + int tail_expr: @expr ref +); + +struct_expr_fields( + unique int id: @struct_expr_field +); + +#keyset[id, index] +struct_expr_field_attrs( + int id: @struct_expr_field ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +struct_expr_field_exprs( + int id: @struct_expr_field ref, + int expr: @expr ref +); + +#keyset[id] +struct_expr_field_identifiers( + int id: @struct_expr_field ref, + int identifier: @name_ref ref +); + +struct_expr_field_lists( + unique int id: @struct_expr_field_list +); + +#keyset[id, index] +struct_expr_field_list_attrs( + int id: @struct_expr_field_list ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +struct_expr_field_list_fields( + int id: @struct_expr_field_list ref, + int index: int ref, + int field: @struct_expr_field ref +); + +#keyset[id] +struct_expr_field_list_spreads( + int id: @struct_expr_field_list ref, + int spread: @expr ref +); + +struct_fields( + unique int id: @struct_field +); + +#keyset[id, index] +struct_field_attrs( + int id: @struct_field ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +struct_field_defaults( + int id: @struct_field ref, + int default: @expr ref +); + +#keyset[id] +struct_field_is_unsafe( + int id: @struct_field ref +); + +#keyset[id] +struct_field_names( + int id: @struct_field ref, + int name: @name ref +); + +#keyset[id] +struct_field_type_reprs( + int id: @struct_field ref, + int type_repr: @type_repr ref +); + +#keyset[id] +struct_field_visibilities( + int id: @struct_field ref, + int visibility: @visibility ref +); + +struct_pat_fields( + unique int id: @struct_pat_field +); + +#keyset[id, index] +struct_pat_field_attrs( + int id: @struct_pat_field ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +struct_pat_field_identifiers( + int id: @struct_pat_field ref, + int identifier: @name_ref ref +); + +#keyset[id] +struct_pat_field_pats( + int id: @struct_pat_field ref, + int pat: @pat ref +); + +struct_pat_field_lists( + unique int id: @struct_pat_field_list +); + +#keyset[id, index] +struct_pat_field_list_fields( + int id: @struct_pat_field_list ref, + int index: int ref, + int field: @struct_pat_field ref +); + +#keyset[id] +struct_pat_field_list_rest_pats( + int id: @struct_pat_field_list ref, + int rest_pat: @rest_pat ref +); + +@token = + @comment +; + +token_trees( + unique int id: @token_tree +); + +tuple_fields( + unique int id: @tuple_field +); + +#keyset[id, index] +tuple_field_attrs( + int id: @tuple_field ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +tuple_field_type_reprs( + int id: @tuple_field ref, + int type_repr: @type_repr ref +); + +#keyset[id] +tuple_field_visibilities( + int id: @tuple_field ref, + int visibility: @visibility ref +); + +type_bounds( + unique int id: @type_bound +); + +#keyset[id] +type_bound_for_binders( + int id: @type_bound ref, + int for_binder: @for_binder ref +); + +#keyset[id] +type_bound_is_async( + int id: @type_bound ref +); + +#keyset[id] +type_bound_is_const( + int id: @type_bound ref +); + +#keyset[id] +type_bound_lifetimes( + int id: @type_bound ref, + int lifetime: @lifetime ref +); + +#keyset[id] +type_bound_type_reprs( + int id: @type_bound ref, + int type_repr: @type_repr ref +); + +#keyset[id] +type_bound_use_bound_generic_args( + int id: @type_bound ref, + int use_bound_generic_args: @use_bound_generic_args ref +); + +type_bound_lists( + unique int id: @type_bound_list +); + +#keyset[id, index] +type_bound_list_bounds( + int id: @type_bound_list ref, + int index: int ref, + int bound: @type_bound ref +); + +@type_repr = + @array_type_repr +| @dyn_trait_type_repr +| @fn_ptr_type_repr +| @for_type_repr +| @impl_trait_type_repr +| @infer_type_repr +| @macro_type_repr +| @never_type_repr +| @paren_type_repr +| @path_type_repr +| @ptr_type_repr +| @ref_type_repr +| @slice_type_repr +| @tuple_type_repr +; + +@use_bound_generic_arg = + @lifetime +| @name_ref +; + +use_bound_generic_args( + unique int id: @use_bound_generic_args +); + +#keyset[id, index] +use_bound_generic_args_use_bound_generic_args( + int id: @use_bound_generic_args ref, + int index: int ref, + int use_bound_generic_arg: @use_bound_generic_arg ref +); + +use_trees( + unique int id: @use_tree +); + +#keyset[id] +use_tree_is_glob( + int id: @use_tree ref +); + +#keyset[id] +use_tree_paths( + int id: @use_tree ref, + int path: @path ref +); + +#keyset[id] +use_tree_renames( + int id: @use_tree ref, + int rename: @rename ref +); + +#keyset[id] +use_tree_use_tree_lists( + int id: @use_tree ref, + int use_tree_list: @use_tree_list ref +); + +use_tree_lists( + unique int id: @use_tree_list +); + +#keyset[id, index] +use_tree_list_use_trees( + int id: @use_tree_list ref, + int index: int ref, + int use_tree: @use_tree ref +); + +variant_lists( + unique int id: @variant_list +); + +#keyset[id, index] +variant_list_variants( + int id: @variant_list ref, + int index: int ref, + int variant: @variant ref +); + +visibilities( + unique int id: @visibility +); + +#keyset[id] +visibility_paths( + int id: @visibility ref, + int path: @path ref +); + +where_clauses( + unique int id: @where_clause +); + +#keyset[id, index] +where_clause_predicates( + int id: @where_clause ref, + int index: int ref, + int predicate: @where_pred ref +); + +where_preds( + unique int id: @where_pred +); + +#keyset[id] +where_pred_for_binders( + int id: @where_pred ref, + int for_binder: @for_binder ref +); + +#keyset[id] +where_pred_lifetimes( + int id: @where_pred ref, + int lifetime: @lifetime ref +); + +#keyset[id] +where_pred_type_reprs( + int id: @where_pred ref, + int type_repr: @type_repr ref +); + +#keyset[id] +where_pred_type_bound_lists( + int id: @where_pred ref, + int type_bound_list: @type_bound_list ref +); + +array_expr_internals( + unique int id: @array_expr_internal +); + +#keyset[id, index] +array_expr_internal_attrs( + int id: @array_expr_internal ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +array_expr_internal_exprs( + int id: @array_expr_internal ref, + int index: int ref, + int expr: @expr ref +); + +#keyset[id] +array_expr_internal_is_semicolon( + int id: @array_expr_internal ref +); + +array_type_reprs( + unique int id: @array_type_repr +); + +#keyset[id] +array_type_repr_const_args( + int id: @array_type_repr ref, + int const_arg: @const_arg ref +); + +#keyset[id] +array_type_repr_element_type_reprs( + int id: @array_type_repr ref, + int element_type_repr: @type_repr ref +); + +asm_clobber_abis( + unique int id: @asm_clobber_abi +); + +asm_consts( + unique int id: @asm_const +); + +#keyset[id] +asm_const_exprs( + int id: @asm_const ref, + int expr: @expr ref +); + +#keyset[id] +asm_const_is_const( + int id: @asm_const ref +); + +asm_labels( + unique int id: @asm_label +); + +#keyset[id] +asm_label_block_exprs( + int id: @asm_label ref, + int block_expr: @block_expr ref +); + +asm_operand_nameds( + unique int id: @asm_operand_named +); + +#keyset[id] +asm_operand_named_asm_operands( + int id: @asm_operand_named ref, + int asm_operand: @asm_operand ref +); + +#keyset[id] +asm_operand_named_names( + int id: @asm_operand_named ref, + int name: @name ref +); + +asm_options_lists( + unique int id: @asm_options_list +); + +#keyset[id, index] +asm_options_list_asm_options( + int id: @asm_options_list ref, + int index: int ref, + int asm_option: @asm_option ref +); + +asm_reg_operands( + unique int id: @asm_reg_operand +); + +#keyset[id] +asm_reg_operand_asm_dir_specs( + int id: @asm_reg_operand ref, + int asm_dir_spec: @asm_dir_spec ref +); + +#keyset[id] +asm_reg_operand_asm_operand_exprs( + int id: @asm_reg_operand ref, + int asm_operand_expr: @asm_operand_expr ref +); + +#keyset[id] +asm_reg_operand_asm_reg_specs( + int id: @asm_reg_operand ref, + int asm_reg_spec: @asm_reg_spec ref +); + +asm_syms( + unique int id: @asm_sym +); + +#keyset[id] +asm_sym_paths( + int id: @asm_sym ref, + int path: @path ref +); + +assoc_type_args( + unique int id: @assoc_type_arg +); + +#keyset[id] +assoc_type_arg_const_args( + int id: @assoc_type_arg ref, + int const_arg: @const_arg ref +); + +#keyset[id] +assoc_type_arg_generic_arg_lists( + int id: @assoc_type_arg ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +assoc_type_arg_identifiers( + int id: @assoc_type_arg ref, + int identifier: @name_ref ref +); + +#keyset[id] +assoc_type_arg_param_lists( + int id: @assoc_type_arg ref, + int param_list: @param_list ref +); + +#keyset[id] +assoc_type_arg_ret_types( + int id: @assoc_type_arg ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +assoc_type_arg_return_type_syntaxes( + int id: @assoc_type_arg ref, + int return_type_syntax: @return_type_syntax ref +); + +#keyset[id] +assoc_type_arg_type_reprs( + int id: @assoc_type_arg ref, + int type_repr: @type_repr ref +); + +#keyset[id] +assoc_type_arg_type_bound_lists( + int id: @assoc_type_arg ref, + int type_bound_list: @type_bound_list ref +); + +await_exprs( + unique int id: @await_expr +); + +#keyset[id, index] +await_expr_attrs( + int id: @await_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +await_expr_exprs( + int id: @await_expr ref, + int expr: @expr ref +); + +become_exprs( + unique int id: @become_expr +); + +#keyset[id, index] +become_expr_attrs( + int id: @become_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +become_expr_exprs( + int id: @become_expr ref, + int expr: @expr ref +); + +binary_exprs( + unique int id: @binary_expr +); + +#keyset[id, index] +binary_expr_attrs( + int id: @binary_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +binary_expr_lhs( + int id: @binary_expr ref, + int lhs: @expr ref +); + +#keyset[id] +binary_expr_operator_names( + int id: @binary_expr ref, + string operator_name: string ref +); + +#keyset[id] +binary_expr_rhs( + int id: @binary_expr ref, + int rhs: @expr ref +); + +box_pats( + unique int id: @box_pat +); + +#keyset[id] +box_pat_pats( + int id: @box_pat ref, + int pat: @pat ref +); + +break_exprs( + unique int id: @break_expr +); + +#keyset[id, index] +break_expr_attrs( + int id: @break_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +break_expr_exprs( + int id: @break_expr ref, + int expr: @expr ref +); + +#keyset[id] +break_expr_lifetimes( + int id: @break_expr ref, + int lifetime: @lifetime ref +); + +@call_expr_base = + @call_expr +| @method_call_expr +; + +#keyset[id] +call_expr_base_arg_lists( + int id: @call_expr_base ref, + int arg_list: @arg_list ref +); + +#keyset[id, index] +call_expr_base_attrs( + int id: @call_expr_base ref, + int index: int ref, + int attr: @attr ref +); + +cast_exprs( + unique int id: @cast_expr +); + +#keyset[id, index] +cast_expr_attrs( + int id: @cast_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +cast_expr_exprs( + int id: @cast_expr ref, + int expr: @expr ref +); + +#keyset[id] +cast_expr_type_reprs( + int id: @cast_expr ref, + int type_repr: @type_repr ref +); + +closure_exprs( + unique int id: @closure_expr +); + +#keyset[id] +closure_expr_closure_bodies( + int id: @closure_expr ref, + int closure_body: @expr ref +); + +#keyset[id] +closure_expr_for_binders( + int id: @closure_expr ref, + int for_binder: @for_binder ref +); + +#keyset[id] +closure_expr_is_async( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_const( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_gen( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_move( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_static( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_ret_types( + int id: @closure_expr ref, + int ret_type: @ret_type_repr ref +); + +comments( + unique int id: @comment, + int parent: @ast_node ref, + string text: string ref +); + +const_args( + unique int id: @const_arg +); + +#keyset[id] +const_arg_exprs( + int id: @const_arg ref, + int expr: @expr ref +); + +const_block_pats( + unique int id: @const_block_pat +); + +#keyset[id] +const_block_pat_block_exprs( + int id: @const_block_pat ref, + int block_expr: @block_expr ref +); + +#keyset[id] +const_block_pat_is_const( + int id: @const_block_pat ref +); + +const_params( + unique int id: @const_param +); + +#keyset[id, index] +const_param_attrs( + int id: @const_param ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +const_param_default_vals( + int id: @const_param ref, + int default_val: @const_arg ref +); + +#keyset[id] +const_param_is_const( + int id: @const_param ref +); + +#keyset[id] +const_param_names( + int id: @const_param ref, + int name: @name ref +); + +#keyset[id] +const_param_type_reprs( + int id: @const_param ref, + int type_repr: @type_repr ref +); + +continue_exprs( + unique int id: @continue_expr +); + +#keyset[id, index] +continue_expr_attrs( + int id: @continue_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +continue_expr_lifetimes( + int id: @continue_expr ref, + int lifetime: @lifetime ref +); + +dyn_trait_type_reprs( + unique int id: @dyn_trait_type_repr +); + +#keyset[id] +dyn_trait_type_repr_type_bound_lists( + int id: @dyn_trait_type_repr ref, + int type_bound_list: @type_bound_list ref +); + +expr_stmts( + unique int id: @expr_stmt +); + +#keyset[id] +expr_stmt_exprs( + int id: @expr_stmt ref, + int expr: @expr ref +); + +field_exprs( + unique int id: @field_expr +); + +#keyset[id, index] +field_expr_attrs( + int id: @field_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +field_expr_containers( + int id: @field_expr ref, + int container: @expr ref +); + +#keyset[id] +field_expr_identifiers( + int id: @field_expr ref, + int identifier: @name_ref ref +); + +fn_ptr_type_reprs( + unique int id: @fn_ptr_type_repr +); + +#keyset[id] +fn_ptr_type_repr_abis( + int id: @fn_ptr_type_repr ref, + int abi: @abi ref +); + +#keyset[id] +fn_ptr_type_repr_is_async( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_is_const( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_is_unsafe( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_param_lists( + int id: @fn_ptr_type_repr ref, + int param_list: @param_list ref +); + +#keyset[id] +fn_ptr_type_repr_ret_types( + int id: @fn_ptr_type_repr ref, + int ret_type: @ret_type_repr ref +); + +for_type_reprs( + unique int id: @for_type_repr +); + +#keyset[id] +for_type_repr_for_binders( + int id: @for_type_repr ref, + int for_binder: @for_binder ref +); + +#keyset[id] +for_type_repr_type_reprs( + int id: @for_type_repr ref, + int type_repr: @type_repr ref +); + +format_args_exprs( + unique int id: @format_args_expr +); + +#keyset[id, index] +format_args_expr_args( + int id: @format_args_expr ref, + int index: int ref, + int arg: @format_args_arg ref +); + +#keyset[id, index] +format_args_expr_attrs( + int id: @format_args_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +format_args_expr_templates( + int id: @format_args_expr ref, + int template: @expr ref +); + +ident_pats( + unique int id: @ident_pat +); + +#keyset[id, index] +ident_pat_attrs( + int id: @ident_pat ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +ident_pat_is_mut( + int id: @ident_pat ref +); + +#keyset[id] +ident_pat_is_ref( + int id: @ident_pat ref +); + +#keyset[id] +ident_pat_names( + int id: @ident_pat ref, + int name: @name ref +); + +#keyset[id] +ident_pat_pats( + int id: @ident_pat ref, + int pat: @pat ref +); + +if_exprs( + unique int id: @if_expr +); + +#keyset[id, index] +if_expr_attrs( + int id: @if_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +if_expr_conditions( + int id: @if_expr ref, + int condition: @expr ref +); + +#keyset[id] +if_expr_elses( + int id: @if_expr ref, + int else: @expr ref +); + +#keyset[id] +if_expr_thens( + int id: @if_expr ref, + int then: @block_expr ref +); + +impl_trait_type_reprs( + unique int id: @impl_trait_type_repr +); + +#keyset[id] +impl_trait_type_repr_type_bound_lists( + int id: @impl_trait_type_repr ref, + int type_bound_list: @type_bound_list ref +); + +index_exprs( + unique int id: @index_expr +); + +#keyset[id, index] +index_expr_attrs( + int id: @index_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +index_expr_bases( + int id: @index_expr ref, + int base: @expr ref +); + +#keyset[id] +index_expr_indices( + int id: @index_expr ref, + int index: @expr ref +); + +infer_type_reprs( + unique int id: @infer_type_repr +); + +@item = + @adt +| @asm_expr +| @assoc_item +| @extern_block +| @extern_crate +| @extern_item +| @impl +| @macro_def +| @macro_rules +| @module +| @trait +| @trait_alias +| @use +; + +#keyset[id] +item_attribute_macro_expansions( + int id: @item ref, + int attribute_macro_expansion: @macro_items ref +); + +@labelable_expr = + @block_expr +| @looping_expr +; + +#keyset[id] +labelable_expr_labels( + int id: @labelable_expr ref, + int label: @label ref +); + +let_exprs( + unique int id: @let_expr +); + +#keyset[id, index] +let_expr_attrs( + int id: @let_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +let_expr_scrutinees( + int id: @let_expr ref, + int scrutinee: @expr ref +); + +#keyset[id] +let_expr_pats( + int id: @let_expr ref, + int pat: @pat ref +); + +let_stmts( + unique int id: @let_stmt +); + +#keyset[id, index] +let_stmt_attrs( + int id: @let_stmt ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +let_stmt_initializers( + int id: @let_stmt ref, + int initializer: @expr ref +); + +#keyset[id] +let_stmt_let_elses( + int id: @let_stmt ref, + int let_else: @let_else ref +); + +#keyset[id] +let_stmt_pats( + int id: @let_stmt ref, + int pat: @pat ref +); + +#keyset[id] +let_stmt_type_reprs( + int id: @let_stmt ref, + int type_repr: @type_repr ref +); + +lifetimes( + unique int id: @lifetime +); + +#keyset[id] +lifetime_texts( + int id: @lifetime ref, + string text: string ref +); + +lifetime_args( + unique int id: @lifetime_arg +); + +#keyset[id] +lifetime_arg_lifetimes( + int id: @lifetime_arg ref, + int lifetime: @lifetime ref +); + +lifetime_params( + unique int id: @lifetime_param +); + +#keyset[id, index] +lifetime_param_attrs( + int id: @lifetime_param ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +lifetime_param_lifetimes( + int id: @lifetime_param ref, + int lifetime: @lifetime ref +); + +#keyset[id] +lifetime_param_type_bound_lists( + int id: @lifetime_param ref, + int type_bound_list: @type_bound_list ref +); + +literal_exprs( + unique int id: @literal_expr +); + +#keyset[id, index] +literal_expr_attrs( + int id: @literal_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +literal_expr_text_values( + int id: @literal_expr ref, + string text_value: string ref +); + +literal_pats( + unique int id: @literal_pat +); + +#keyset[id] +literal_pat_literals( + int id: @literal_pat ref, + int literal: @literal_expr ref +); + +macro_block_exprs( + unique int id: @macro_block_expr +); + +#keyset[id, index] +macro_block_expr_statements( + int id: @macro_block_expr ref, + int index: int ref, + int statement: @stmt ref +); + +#keyset[id] +macro_block_expr_tail_exprs( + int id: @macro_block_expr ref, + int tail_expr: @expr ref +); + +macro_exprs( + unique int id: @macro_expr +); + +#keyset[id] +macro_expr_macro_calls( + int id: @macro_expr ref, + int macro_call: @macro_call ref +); + +macro_pats( + unique int id: @macro_pat +); + +#keyset[id] +macro_pat_macro_calls( + int id: @macro_pat ref, + int macro_call: @macro_call ref +); + +macro_type_reprs( + unique int id: @macro_type_repr +); + +#keyset[id] +macro_type_repr_macro_calls( + int id: @macro_type_repr ref, + int macro_call: @macro_call ref +); + +match_exprs( + unique int id: @match_expr +); + +#keyset[id, index] +match_expr_attrs( + int id: @match_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +match_expr_scrutinees( + int id: @match_expr ref, + int scrutinee: @expr ref +); + +#keyset[id] +match_expr_match_arm_lists( + int id: @match_expr ref, + int match_arm_list: @match_arm_list ref +); + +name_refs( + unique int id: @name_ref +); + +#keyset[id] +name_ref_texts( + int id: @name_ref ref, + string text: string ref +); + +never_type_reprs( + unique int id: @never_type_repr +); + +offset_of_exprs( + unique int id: @offset_of_expr +); + +#keyset[id, index] +offset_of_expr_attrs( + int id: @offset_of_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +offset_of_expr_fields( + int id: @offset_of_expr ref, + int index: int ref, + int field: @name_ref ref +); + +#keyset[id] +offset_of_expr_type_reprs( + int id: @offset_of_expr ref, + int type_repr: @type_repr ref +); + +or_pats( + unique int id: @or_pat +); + +#keyset[id, index] +or_pat_pats( + int id: @or_pat ref, + int index: int ref, + int pat: @pat ref +); + +params( + unique int id: @param +); + +#keyset[id] +param_pats( + int id: @param ref, + int pat: @pat ref +); + +paren_exprs( + unique int id: @paren_expr +); + +#keyset[id, index] +paren_expr_attrs( + int id: @paren_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +paren_expr_exprs( + int id: @paren_expr ref, + int expr: @expr ref +); + +paren_pats( + unique int id: @paren_pat +); + +#keyset[id] +paren_pat_pats( + int id: @paren_pat ref, + int pat: @pat ref +); + +paren_type_reprs( + unique int id: @paren_type_repr +); + +#keyset[id] +paren_type_repr_type_reprs( + int id: @paren_type_repr ref, + int type_repr: @type_repr ref +); + +@path_expr_base = + @path_expr +; + +path_pats( + unique int id: @path_pat +); + +path_type_reprs( + unique int id: @path_type_repr +); + +#keyset[id] +path_type_repr_paths( + int id: @path_type_repr ref, + int path: @path ref +); + +prefix_exprs( + unique int id: @prefix_expr +); + +#keyset[id, index] +prefix_expr_attrs( + int id: @prefix_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +prefix_expr_exprs( + int id: @prefix_expr ref, + int expr: @expr ref +); + +#keyset[id] +prefix_expr_operator_names( + int id: @prefix_expr ref, + string operator_name: string ref +); + +ptr_type_reprs( + unique int id: @ptr_type_repr +); + +#keyset[id] +ptr_type_repr_is_const( + int id: @ptr_type_repr ref +); + +#keyset[id] +ptr_type_repr_is_mut( + int id: @ptr_type_repr ref +); + +#keyset[id] +ptr_type_repr_type_reprs( + int id: @ptr_type_repr ref, + int type_repr: @type_repr ref +); + +range_exprs( + unique int id: @range_expr +); + +#keyset[id, index] +range_expr_attrs( + int id: @range_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +range_expr_ends( + int id: @range_expr ref, + int end: @expr ref +); + +#keyset[id] +range_expr_operator_names( + int id: @range_expr ref, + string operator_name: string ref +); + +#keyset[id] +range_expr_starts( + int id: @range_expr ref, + int start: @expr ref +); + +range_pats( + unique int id: @range_pat +); + +#keyset[id] +range_pat_ends( + int id: @range_pat ref, + int end: @pat ref +); + +#keyset[id] +range_pat_operator_names( + int id: @range_pat ref, + string operator_name: string ref +); + +#keyset[id] +range_pat_starts( + int id: @range_pat ref, + int start: @pat ref +); + +ref_exprs( + unique int id: @ref_expr +); + +#keyset[id, index] +ref_expr_attrs( + int id: @ref_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +ref_expr_exprs( + int id: @ref_expr ref, + int expr: @expr ref +); + +#keyset[id] +ref_expr_is_const( + int id: @ref_expr ref +); + +#keyset[id] +ref_expr_is_mut( + int id: @ref_expr ref +); + +#keyset[id] +ref_expr_is_raw( + int id: @ref_expr ref +); + +ref_pats( + unique int id: @ref_pat +); + +#keyset[id] +ref_pat_is_mut( + int id: @ref_pat ref +); + +#keyset[id] +ref_pat_pats( + int id: @ref_pat ref, + int pat: @pat ref +); + +ref_type_reprs( + unique int id: @ref_type_repr +); + +#keyset[id] +ref_type_repr_is_mut( + int id: @ref_type_repr ref +); + +#keyset[id] +ref_type_repr_lifetimes( + int id: @ref_type_repr ref, + int lifetime: @lifetime ref +); + +#keyset[id] +ref_type_repr_type_reprs( + int id: @ref_type_repr ref, + int type_repr: @type_repr ref +); + +rest_pats( + unique int id: @rest_pat +); + +#keyset[id, index] +rest_pat_attrs( + int id: @rest_pat ref, + int index: int ref, + int attr: @attr ref +); + +return_exprs( + unique int id: @return_expr +); + +#keyset[id, index] +return_expr_attrs( + int id: @return_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +return_expr_exprs( + int id: @return_expr ref, + int expr: @expr ref +); + +self_params( + unique int id: @self_param +); + +#keyset[id] +self_param_is_ref( + int id: @self_param ref +); + +#keyset[id] +self_param_is_mut( + int id: @self_param ref +); + +#keyset[id] +self_param_lifetimes( + int id: @self_param ref, + int lifetime: @lifetime ref +); + +#keyset[id] +self_param_names( + int id: @self_param ref, + int name: @name ref +); + +slice_pats( + unique int id: @slice_pat +); + +#keyset[id, index] +slice_pat_pats( + int id: @slice_pat ref, + int index: int ref, + int pat: @pat ref +); + +slice_type_reprs( + unique int id: @slice_type_repr +); + +#keyset[id] +slice_type_repr_type_reprs( + int id: @slice_type_repr ref, + int type_repr: @type_repr ref +); + +struct_exprs( + unique int id: @struct_expr +); + +#keyset[id] +struct_expr_struct_expr_field_lists( + int id: @struct_expr ref, + int struct_expr_field_list: @struct_expr_field_list ref +); + +struct_field_lists( + unique int id: @struct_field_list +); + +#keyset[id, index] +struct_field_list_fields( + int id: @struct_field_list ref, + int index: int ref, + int field: @struct_field ref +); + +struct_pats( + unique int id: @struct_pat +); + +#keyset[id] +struct_pat_struct_pat_field_lists( + int id: @struct_pat ref, + int struct_pat_field_list: @struct_pat_field_list ref +); + +try_exprs( + unique int id: @try_expr +); + +#keyset[id, index] +try_expr_attrs( + int id: @try_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +try_expr_exprs( + int id: @try_expr ref, + int expr: @expr ref +); + +tuple_exprs( + unique int id: @tuple_expr +); + +#keyset[id, index] +tuple_expr_attrs( + int id: @tuple_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +tuple_expr_fields( + int id: @tuple_expr ref, + int index: int ref, + int field: @expr ref +); + +tuple_field_lists( + unique int id: @tuple_field_list +); + +#keyset[id, index] +tuple_field_list_fields( + int id: @tuple_field_list ref, + int index: int ref, + int field: @tuple_field ref +); + +tuple_pats( + unique int id: @tuple_pat +); + +#keyset[id, index] +tuple_pat_fields( + int id: @tuple_pat ref, + int index: int ref, + int field: @pat ref +); + +tuple_struct_pats( + unique int id: @tuple_struct_pat +); + +#keyset[id, index] +tuple_struct_pat_fields( + int id: @tuple_struct_pat ref, + int index: int ref, + int field: @pat ref +); + +tuple_type_reprs( + unique int id: @tuple_type_repr +); + +#keyset[id, index] +tuple_type_repr_fields( + int id: @tuple_type_repr ref, + int index: int ref, + int field: @type_repr ref +); + +type_args( + unique int id: @type_arg +); + +#keyset[id] +type_arg_type_reprs( + int id: @type_arg ref, + int type_repr: @type_repr ref +); + +type_params( + unique int id: @type_param +); + +#keyset[id, index] +type_param_attrs( + int id: @type_param ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +type_param_default_types( + int id: @type_param ref, + int default_type: @type_repr ref +); + +#keyset[id] +type_param_names( + int id: @type_param ref, + int name: @name ref +); + +#keyset[id] +type_param_type_bound_lists( + int id: @type_param ref, + int type_bound_list: @type_bound_list ref +); + +underscore_exprs( + unique int id: @underscore_expr +); + +#keyset[id, index] +underscore_expr_attrs( + int id: @underscore_expr ref, + int index: int ref, + int attr: @attr ref +); + +variants( + unique int id: @variant +); + +#keyset[id, index] +variant_attrs( + int id: @variant ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +variant_discriminants( + int id: @variant ref, + int discriminant: @expr ref +); + +#keyset[id] +variant_field_lists( + int id: @variant ref, + int field_list: @field_list ref +); + +#keyset[id] +variant_names( + int id: @variant ref, + int name: @name ref +); + +#keyset[id] +variant_visibilities( + int id: @variant ref, + int visibility: @visibility ref +); + +wildcard_pats( + unique int id: @wildcard_pat +); + +yeet_exprs( + unique int id: @yeet_expr +); + +#keyset[id, index] +yeet_expr_attrs( + int id: @yeet_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +yeet_expr_exprs( + int id: @yeet_expr ref, + int expr: @expr ref +); + +yield_exprs( + unique int id: @yield_expr +); + +#keyset[id, index] +yield_expr_attrs( + int id: @yield_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +yield_expr_exprs( + int id: @yield_expr ref, + int expr: @expr ref +); + +@adt = + @enum +| @struct +| @union +; + +#keyset[id, index] +adt_derive_macro_expansions( + int id: @adt ref, + int index: int ref, + int derive_macro_expansion: @macro_items ref +); + +asm_exprs( + unique int id: @asm_expr +); + +#keyset[id, index] +asm_expr_asm_pieces( + int id: @asm_expr ref, + int index: int ref, + int asm_piece: @asm_piece ref +); + +#keyset[id, index] +asm_expr_attrs( + int id: @asm_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +asm_expr_templates( + int id: @asm_expr ref, + int index: int ref, + int template: @expr ref +); + +@assoc_item = + @const +| @function +| @macro_call +| @type_alias +; + +block_exprs( + unique int id: @block_expr +); + +#keyset[id, index] +block_expr_attrs( + int id: @block_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +block_expr_is_async( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_const( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_gen( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_move( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_try( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_unsafe( + int id: @block_expr ref +); + +#keyset[id] +block_expr_stmt_lists( + int id: @block_expr ref, + int stmt_list: @stmt_list ref +); + +call_exprs( + unique int id: @call_expr +); + +#keyset[id] +call_expr_functions( + int id: @call_expr ref, + int function: @expr ref +); + +extern_blocks( + unique int id: @extern_block +); + +#keyset[id] +extern_block_abis( + int id: @extern_block ref, + int abi: @abi ref +); + +#keyset[id, index] +extern_block_attrs( + int id: @extern_block ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +extern_block_extern_item_lists( + int id: @extern_block ref, + int extern_item_list: @extern_item_list ref +); + +#keyset[id] +extern_block_is_unsafe( + int id: @extern_block ref +); + +extern_crates( + unique int id: @extern_crate +); + +#keyset[id, index] +extern_crate_attrs( + int id: @extern_crate ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +extern_crate_identifiers( + int id: @extern_crate ref, + int identifier: @name_ref ref +); + +#keyset[id] +extern_crate_renames( + int id: @extern_crate ref, + int rename: @rename ref +); + +#keyset[id] +extern_crate_visibilities( + int id: @extern_crate ref, + int visibility: @visibility ref +); + +@extern_item = + @function +| @macro_call +| @static +| @type_alias +; + +impls( + unique int id: @impl +); + +#keyset[id] +impl_assoc_item_lists( + int id: @impl ref, + int assoc_item_list: @assoc_item_list ref +); + +#keyset[id, index] +impl_attrs( + int id: @impl ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +impl_generic_param_lists( + int id: @impl ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +impl_is_const( + int id: @impl ref +); + +#keyset[id] +impl_is_default( + int id: @impl ref +); + +#keyset[id] +impl_is_unsafe( + int id: @impl ref +); + +#keyset[id] +impl_self_ties( + int id: @impl ref, + int self_ty: @type_repr ref +); + +#keyset[id] +impl_traits( + int id: @impl ref, + int trait: @type_repr ref +); + +#keyset[id] +impl_visibilities( + int id: @impl ref, + int visibility: @visibility ref +); + +#keyset[id] +impl_where_clauses( + int id: @impl ref, + int where_clause: @where_clause ref +); + +@looping_expr = + @for_expr +| @loop_expr +| @while_expr +; + +#keyset[id] +looping_expr_loop_bodies( + int id: @looping_expr ref, + int loop_body: @block_expr ref +); + +macro_defs( + unique int id: @macro_def +); + +#keyset[id] +macro_def_args( + int id: @macro_def ref, + int args: @token_tree ref +); + +#keyset[id, index] +macro_def_attrs( + int id: @macro_def ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +macro_def_bodies( + int id: @macro_def ref, + int body: @token_tree ref +); + +#keyset[id] +macro_def_names( + int id: @macro_def ref, + int name: @name ref +); + +#keyset[id] +macro_def_visibilities( + int id: @macro_def ref, + int visibility: @visibility ref +); + +macro_rules( + unique int id: @macro_rules +); + +#keyset[id, index] +macro_rules_attrs( + int id: @macro_rules ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +macro_rules_names( + int id: @macro_rules ref, + int name: @name ref +); + +#keyset[id] +macro_rules_token_trees( + int id: @macro_rules ref, + int token_tree: @token_tree ref +); + +#keyset[id] +macro_rules_visibilities( + int id: @macro_rules ref, + int visibility: @visibility ref +); + +method_call_exprs( + unique int id: @method_call_expr +); + +#keyset[id] +method_call_expr_generic_arg_lists( + int id: @method_call_expr ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +method_call_expr_identifiers( + int id: @method_call_expr ref, + int identifier: @name_ref ref +); + +#keyset[id] +method_call_expr_receivers( + int id: @method_call_expr ref, + int receiver: @expr ref +); + +modules( + unique int id: @module +); + +#keyset[id, index] +module_attrs( + int id: @module ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +module_item_lists( + int id: @module ref, + int item_list: @item_list ref +); + +#keyset[id] +module_names( + int id: @module ref, + int name: @name ref +); + +#keyset[id] +module_visibilities( + int id: @module ref, + int visibility: @visibility ref +); + +path_exprs( + unique int id: @path_expr +); + +#keyset[id, index] +path_expr_attrs( + int id: @path_expr ref, + int index: int ref, + int attr: @attr ref +); + +traits( + unique int id: @trait +); + +#keyset[id] +trait_assoc_item_lists( + int id: @trait ref, + int assoc_item_list: @assoc_item_list ref +); + +#keyset[id, index] +trait_attrs( + int id: @trait ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +trait_generic_param_lists( + int id: @trait ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +trait_is_auto( + int id: @trait ref +); + +#keyset[id] +trait_is_unsafe( + int id: @trait ref +); + +#keyset[id] +trait_names( + int id: @trait ref, + int name: @name ref +); + +#keyset[id] +trait_type_bound_lists( + int id: @trait ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +trait_visibilities( + int id: @trait ref, + int visibility: @visibility ref +); + +#keyset[id] +trait_where_clauses( + int id: @trait ref, + int where_clause: @where_clause ref +); + +trait_aliases( + unique int id: @trait_alias +); + +#keyset[id, index] +trait_alias_attrs( + int id: @trait_alias ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +trait_alias_generic_param_lists( + int id: @trait_alias ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +trait_alias_names( + int id: @trait_alias ref, + int name: @name ref +); + +#keyset[id] +trait_alias_type_bound_lists( + int id: @trait_alias ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +trait_alias_visibilities( + int id: @trait_alias ref, + int visibility: @visibility ref +); + +#keyset[id] +trait_alias_where_clauses( + int id: @trait_alias ref, + int where_clause: @where_clause ref +); + +uses( + unique int id: @use +); + +#keyset[id, index] +use_attrs( + int id: @use ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +use_use_trees( + int id: @use ref, + int use_tree: @use_tree ref +); + +#keyset[id] +use_visibilities( + int id: @use ref, + int visibility: @visibility ref +); + +consts( + unique int id: @const +); + +#keyset[id, index] +const_attrs( + int id: @const ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +const_bodies( + int id: @const ref, + int body: @expr ref +); + +#keyset[id] +const_generic_param_lists( + int id: @const ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +const_is_const( + int id: @const ref +); + +#keyset[id] +const_is_default( + int id: @const ref +); + +#keyset[id] +const_names( + int id: @const ref, + int name: @name ref +); + +#keyset[id] +const_type_reprs( + int id: @const ref, + int type_repr: @type_repr ref +); + +#keyset[id] +const_visibilities( + int id: @const ref, + int visibility: @visibility ref +); + +#keyset[id] +const_where_clauses( + int id: @const ref, + int where_clause: @where_clause ref +); + +#keyset[id] +const_has_implementation( + int id: @const ref +); + +enums( + unique int id: @enum +); + +#keyset[id, index] +enum_attrs( + int id: @enum ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +enum_generic_param_lists( + int id: @enum ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +enum_names( + int id: @enum ref, + int name: @name ref +); + +#keyset[id] +enum_variant_lists( + int id: @enum ref, + int variant_list: @variant_list ref +); + +#keyset[id] +enum_visibilities( + int id: @enum ref, + int visibility: @visibility ref +); + +#keyset[id] +enum_where_clauses( + int id: @enum ref, + int where_clause: @where_clause ref +); + +for_exprs( + unique int id: @for_expr +); + +#keyset[id, index] +for_expr_attrs( + int id: @for_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +for_expr_iterables( + int id: @for_expr ref, + int iterable: @expr ref +); + +#keyset[id] +for_expr_pats( + int id: @for_expr ref, + int pat: @pat ref +); + +functions( + unique int id: @function +); + +#keyset[id] +function_abis( + int id: @function ref, + int abi: @abi ref +); + +#keyset[id] +function_function_bodies( + int id: @function ref, + int function_body: @block_expr ref +); + +#keyset[id] +function_generic_param_lists( + int id: @function ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +function_is_async( + int id: @function ref +); + +#keyset[id] +function_is_const( + int id: @function ref +); + +#keyset[id] +function_is_default( + int id: @function ref +); + +#keyset[id] +function_is_gen( + int id: @function ref +); + +#keyset[id] +function_is_unsafe( + int id: @function ref +); + +#keyset[id] +function_names( + int id: @function ref, + int name: @name ref +); + +#keyset[id] +function_ret_types( + int id: @function ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +function_visibilities( + int id: @function ref, + int visibility: @visibility ref +); + +#keyset[id] +function_where_clauses( + int id: @function ref, + int where_clause: @where_clause ref +); + +#keyset[id] +function_has_implementation( + int id: @function ref +); + +loop_exprs( + unique int id: @loop_expr +); + +#keyset[id, index] +loop_expr_attrs( + int id: @loop_expr ref, + int index: int ref, + int attr: @attr ref +); + +macro_calls( + unique int id: @macro_call +); + +#keyset[id, index] +macro_call_attrs( + int id: @macro_call ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +macro_call_paths( + int id: @macro_call ref, + int path: @path ref +); + +#keyset[id] +macro_call_token_trees( + int id: @macro_call ref, + int token_tree: @token_tree ref +); + +#keyset[id] +macro_call_macro_call_expansions( + int id: @macro_call ref, + int macro_call_expansion: @ast_node ref +); + +statics( + unique int id: @static +); + +#keyset[id, index] +static_attrs( + int id: @static ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +static_bodies( + int id: @static ref, + int body: @expr ref +); + +#keyset[id] +static_is_mut( + int id: @static ref +); + +#keyset[id] +static_is_static( + int id: @static ref +); + +#keyset[id] +static_is_unsafe( + int id: @static ref +); + +#keyset[id] +static_names( + int id: @static ref, + int name: @name ref +); + +#keyset[id] +static_type_reprs( + int id: @static ref, + int type_repr: @type_repr ref +); + +#keyset[id] +static_visibilities( + int id: @static ref, + int visibility: @visibility ref +); + +structs( + unique int id: @struct +); + +#keyset[id, index] +struct_attrs( + int id: @struct ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +struct_field_lists_( + int id: @struct ref, + int field_list: @field_list ref +); + +#keyset[id] +struct_generic_param_lists( + int id: @struct ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +struct_names( + int id: @struct ref, + int name: @name ref +); + +#keyset[id] +struct_visibilities( + int id: @struct ref, + int visibility: @visibility ref +); + +#keyset[id] +struct_where_clauses( + int id: @struct ref, + int where_clause: @where_clause ref +); + +type_aliases( + unique int id: @type_alias +); + +#keyset[id, index] +type_alias_attrs( + int id: @type_alias ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +type_alias_generic_param_lists( + int id: @type_alias ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +type_alias_is_default( + int id: @type_alias ref +); + +#keyset[id] +type_alias_names( + int id: @type_alias ref, + int name: @name ref +); + +#keyset[id] +type_alias_type_reprs( + int id: @type_alias ref, + int type_repr: @type_repr ref +); + +#keyset[id] +type_alias_type_bound_lists( + int id: @type_alias ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +type_alias_visibilities( + int id: @type_alias ref, + int visibility: @visibility ref +); + +#keyset[id] +type_alias_where_clauses( + int id: @type_alias ref, + int where_clause: @where_clause ref +); + +unions( + unique int id: @union +); + +#keyset[id, index] +union_attrs( + int id: @union ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +union_generic_param_lists( + int id: @union ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +union_names( + int id: @union ref, + int name: @name ref +); + +#keyset[id] +union_struct_field_lists( + int id: @union ref, + int struct_field_list: @struct_field_list ref +); + +#keyset[id] +union_visibilities( + int id: @union ref, + int visibility: @visibility ref +); + +#keyset[id] +union_where_clauses( + int id: @union ref, + int where_clause: @where_clause ref +); + +while_exprs( + unique int id: @while_expr +); + +#keyset[id, index] +while_expr_attrs( + int id: @while_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +while_expr_conditions( + int id: @while_expr ref, + int condition: @expr ref +); diff --git a/rust/ql/lib/upgrades/30a0713e5bf69c60d003e4994e5abd1c78a36826/rust.dbscheme b/rust/ql/lib/upgrades/30a0713e5bf69c60d003e4994e5abd1c78a36826/rust.dbscheme new file mode 100644 index 00000000000..e54d01f67a4 --- /dev/null +++ b/rust/ql/lib/upgrades/30a0713e5bf69c60d003e4994e5abd1c78a36826/rust.dbscheme @@ -0,0 +1,3624 @@ +// generated by codegen, do not edit + +// from ../shared/tree-sitter-extractor/src/generator/prefix.dbscheme +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Empty location -*/ + +empty_location( + int location: @location_default ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- Diagnostic messages: severity -*/ + +case @diagnostic.severity of + 10 = @diagnostic_debug +| 20 = @diagnostic_info +| 30 = @diagnostic_warning +| 40 = @diagnostic_error +; + +/*- YAML -*/ + +#keyset[parent, idx] +yaml (unique int id: @yaml_node, + int kind: int ref, + int parent: @yaml_node_parent ref, + int idx: int ref, + string tag: string ref, + string tostring: string ref); + +case @yaml_node.kind of + 0 = @yaml_scalar_node +| 1 = @yaml_mapping_node +| 2 = @yaml_sequence_node +| 3 = @yaml_alias_node +; + +@yaml_collection_node = @yaml_mapping_node | @yaml_sequence_node; + +@yaml_node_parent = @yaml_collection_node | @file; + +yaml_anchors (unique int node: @yaml_node ref, + string anchor: string ref); + +yaml_aliases (unique int alias: @yaml_alias_node ref, + string target: string ref); + +yaml_scalars (unique int scalar: @yaml_scalar_node ref, + int style: int ref, + string value: string ref); + +yaml_errors (unique int id: @yaml_error, + string message: string ref); + +yaml_locations(unique int locatable: @yaml_locatable ref, + int location: @location_default ref); + +@yaml_locatable = @yaml_node | @yaml_error; + +/*- Database metadata -*/ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +overlayChangedFiles( + string path: string ref +); + + +// from prefix.dbscheme +#keyset[id] +locatable_locations( + int id: @locatable ref, + int location: @location_default ref +); + + +// from schema + +@element = + @extractor_step +| @locatable +| @named_crate +| @unextracted +; + +extractor_steps( + unique int id: @extractor_step, + string action: string ref, + int duration_ms: int ref +); + +#keyset[id] +extractor_step_files( + int id: @extractor_step ref, + int file: @file ref +); + +@locatable = + @ast_node +| @crate +; + +named_crates( + unique int id: @named_crate, + string name: string ref, + int crate: @crate ref +); + +@unextracted = + @missing +| @unimplemented +; + +@ast_node = + @abi +| @addressable +| @arg_list +| @asm_dir_spec +| @asm_operand +| @asm_operand_expr +| @asm_option +| @asm_piece +| @asm_reg_spec +| @assoc_item_list +| @attr +| @callable +| @expr +| @extern_item_list +| @field_list +| @for_binder +| @format_args_arg +| @generic_arg +| @generic_arg_list +| @generic_param +| @generic_param_list +| @item_list +| @label +| @let_else +| @macro_items +| @match_arm +| @match_arm_list +| @match_guard +| @meta +| @name +| @param_base +| @param_list +| @parenthesized_arg_list +| @pat +| @path +| @path_ast_node +| @path_segment +| @rename +| @ret_type_repr +| @return_type_syntax +| @source_file +| @stmt +| @stmt_list +| @struct_expr_field +| @struct_expr_field_list +| @struct_field +| @struct_pat_field +| @struct_pat_field_list +| @token +| @token_tree +| @tuple_field +| @type_bound +| @type_bound_list +| @type_repr +| @use_bound_generic_arg +| @use_bound_generic_args +| @use_tree +| @use_tree_list +| @variant_list +| @visibility +| @where_clause +| @where_pred +; + +crates( + unique int id: @crate +); + +#keyset[id] +crate_names( + int id: @crate ref, + string name: string ref +); + +#keyset[id] +crate_versions( + int id: @crate ref, + string version: string ref +); + +#keyset[id, index] +crate_cfg_options( + int id: @crate ref, + int index: int ref, + string cfg_option: string ref +); + +#keyset[id, index] +crate_named_dependencies( + int id: @crate ref, + int index: int ref, + int named_dependency: @named_crate ref +); + +missings( + unique int id: @missing +); + +unimplementeds( + unique int id: @unimplemented +); + +abis( + unique int id: @abi +); + +#keyset[id] +abi_abi_strings( + int id: @abi ref, + string abi_string: string ref +); + +@addressable = + @item +| @variant +; + +arg_lists( + unique int id: @arg_list +); + +#keyset[id, index] +arg_list_args( + int id: @arg_list ref, + int index: int ref, + int arg: @expr ref +); + +asm_dir_specs( + unique int id: @asm_dir_spec +); + +@asm_operand = + @asm_const +| @asm_label +| @asm_reg_operand +| @asm_sym +; + +asm_operand_exprs( + unique int id: @asm_operand_expr +); + +#keyset[id] +asm_operand_expr_in_exprs( + int id: @asm_operand_expr ref, + int in_expr: @expr ref +); + +#keyset[id] +asm_operand_expr_out_exprs( + int id: @asm_operand_expr ref, + int out_expr: @expr ref +); + +asm_options( + unique int id: @asm_option +); + +#keyset[id] +asm_option_is_raw( + int id: @asm_option ref +); + +@asm_piece = + @asm_clobber_abi +| @asm_operand_named +| @asm_options_list +; + +asm_reg_specs( + unique int id: @asm_reg_spec +); + +#keyset[id] +asm_reg_spec_identifiers( + int id: @asm_reg_spec ref, + int identifier: @name_ref ref +); + +assoc_item_lists( + unique int id: @assoc_item_list +); + +#keyset[id, index] +assoc_item_list_assoc_items( + int id: @assoc_item_list ref, + int index: int ref, + int assoc_item: @assoc_item ref +); + +#keyset[id, index] +assoc_item_list_attrs( + int id: @assoc_item_list ref, + int index: int ref, + int attr: @attr ref +); + +attrs( + unique int id: @attr +); + +#keyset[id] +attr_meta( + int id: @attr ref, + int meta: @meta ref +); + +@callable = + @closure_expr +| @function +; + +#keyset[id] +callable_param_lists( + int id: @callable ref, + int param_list: @param_list ref +); + +#keyset[id, index] +callable_attrs( + int id: @callable ref, + int index: int ref, + int attr: @attr ref +); + +@expr = + @array_expr_internal +| @asm_expr +| @await_expr +| @become_expr +| @binary_expr +| @break_expr +| @call_expr +| @cast_expr +| @closure_expr +| @continue_expr +| @field_expr +| @format_args_expr +| @if_expr +| @index_expr +| @labelable_expr +| @let_expr +| @literal_expr +| @macro_block_expr +| @macro_expr +| @match_expr +| @method_call_expr +| @offset_of_expr +| @paren_expr +| @path_expr_base +| @prefix_expr +| @range_expr +| @ref_expr +| @return_expr +| @struct_expr +| @try_expr +| @tuple_expr +| @underscore_expr +| @yeet_expr +| @yield_expr +; + +extern_item_lists( + unique int id: @extern_item_list +); + +#keyset[id, index] +extern_item_list_attrs( + int id: @extern_item_list ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +extern_item_list_extern_items( + int id: @extern_item_list ref, + int index: int ref, + int extern_item: @extern_item ref +); + +@field_list = + @struct_field_list +| @tuple_field_list +; + +for_binders( + unique int id: @for_binder +); + +#keyset[id] +for_binder_generic_param_lists( + int id: @for_binder ref, + int generic_param_list: @generic_param_list ref +); + +format_args_args( + unique int id: @format_args_arg +); + +#keyset[id] +format_args_arg_exprs( + int id: @format_args_arg ref, + int expr: @expr ref +); + +#keyset[id] +format_args_arg_names( + int id: @format_args_arg ref, + int name: @name ref +); + +@generic_arg = + @assoc_type_arg +| @const_arg +| @lifetime_arg +| @type_arg +; + +generic_arg_lists( + unique int id: @generic_arg_list +); + +#keyset[id, index] +generic_arg_list_generic_args( + int id: @generic_arg_list ref, + int index: int ref, + int generic_arg: @generic_arg ref +); + +@generic_param = + @const_param +| @lifetime_param +| @type_param +; + +generic_param_lists( + unique int id: @generic_param_list +); + +#keyset[id, index] +generic_param_list_generic_params( + int id: @generic_param_list ref, + int index: int ref, + int generic_param: @generic_param ref +); + +item_lists( + unique int id: @item_list +); + +#keyset[id, index] +item_list_attrs( + int id: @item_list ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +item_list_items( + int id: @item_list ref, + int index: int ref, + int item: @item ref +); + +labels( + unique int id: @label +); + +#keyset[id] +label_lifetimes( + int id: @label ref, + int lifetime: @lifetime ref +); + +let_elses( + unique int id: @let_else +); + +#keyset[id] +let_else_block_exprs( + int id: @let_else ref, + int block_expr: @block_expr ref +); + +macro_items( + unique int id: @macro_items +); + +#keyset[id, index] +macro_items_items( + int id: @macro_items ref, + int index: int ref, + int item: @item ref +); + +match_arms( + unique int id: @match_arm +); + +#keyset[id, index] +match_arm_attrs( + int id: @match_arm ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +match_arm_exprs( + int id: @match_arm ref, + int expr: @expr ref +); + +#keyset[id] +match_arm_guards( + int id: @match_arm ref, + int guard: @match_guard ref +); + +#keyset[id] +match_arm_pats( + int id: @match_arm ref, + int pat: @pat ref +); + +match_arm_lists( + unique int id: @match_arm_list +); + +#keyset[id, index] +match_arm_list_arms( + int id: @match_arm_list ref, + int index: int ref, + int arm: @match_arm ref +); + +#keyset[id, index] +match_arm_list_attrs( + int id: @match_arm_list ref, + int index: int ref, + int attr: @attr ref +); + +match_guards( + unique int id: @match_guard +); + +#keyset[id] +match_guard_conditions( + int id: @match_guard ref, + int condition: @expr ref +); + +meta( + unique int id: @meta +); + +#keyset[id] +meta_exprs( + int id: @meta ref, + int expr: @expr ref +); + +#keyset[id] +meta_is_unsafe( + int id: @meta ref +); + +#keyset[id] +meta_paths( + int id: @meta ref, + int path: @path ref +); + +#keyset[id] +meta_token_trees( + int id: @meta ref, + int token_tree: @token_tree ref +); + +names( + unique int id: @name +); + +#keyset[id] +name_texts( + int id: @name ref, + string text: string ref +); + +@param_base = + @param +| @self_param +; + +#keyset[id, index] +param_base_attrs( + int id: @param_base ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +param_base_type_reprs( + int id: @param_base ref, + int type_repr: @type_repr ref +); + +param_lists( + unique int id: @param_list +); + +#keyset[id, index] +param_list_params( + int id: @param_list ref, + int index: int ref, + int param: @param ref +); + +#keyset[id] +param_list_self_params( + int id: @param_list ref, + int self_param: @self_param ref +); + +parenthesized_arg_lists( + unique int id: @parenthesized_arg_list +); + +#keyset[id, index] +parenthesized_arg_list_type_args( + int id: @parenthesized_arg_list ref, + int index: int ref, + int type_arg: @type_arg ref +); + +@pat = + @box_pat +| @const_block_pat +| @ident_pat +| @literal_pat +| @macro_pat +| @or_pat +| @paren_pat +| @path_pat +| @range_pat +| @ref_pat +| @rest_pat +| @slice_pat +| @struct_pat +| @tuple_pat +| @tuple_struct_pat +| @wildcard_pat +; + +paths( + unique int id: @path +); + +#keyset[id] +path_qualifiers( + int id: @path ref, + int qualifier: @path ref +); + +#keyset[id] +path_segments_( + int id: @path ref, + int segment: @path_segment ref +); + +@path_ast_node = + @path_expr +| @path_pat +| @struct_expr +| @struct_pat +| @tuple_struct_pat +; + +#keyset[id] +path_ast_node_paths( + int id: @path_ast_node ref, + int path: @path ref +); + +path_segments( + unique int id: @path_segment +); + +#keyset[id] +path_segment_generic_arg_lists( + int id: @path_segment ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +path_segment_identifiers( + int id: @path_segment ref, + int identifier: @name_ref ref +); + +#keyset[id] +path_segment_parenthesized_arg_lists( + int id: @path_segment ref, + int parenthesized_arg_list: @parenthesized_arg_list ref +); + +#keyset[id] +path_segment_ret_types( + int id: @path_segment ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +path_segment_return_type_syntaxes( + int id: @path_segment ref, + int return_type_syntax: @return_type_syntax ref +); + +#keyset[id] +path_segment_type_reprs( + int id: @path_segment ref, + int type_repr: @type_repr ref +); + +#keyset[id] +path_segment_trait_type_reprs( + int id: @path_segment ref, + int trait_type_repr: @path_type_repr ref +); + +renames( + unique int id: @rename +); + +#keyset[id] +rename_names( + int id: @rename ref, + int name: @name ref +); + +ret_type_reprs( + unique int id: @ret_type_repr +); + +#keyset[id] +ret_type_repr_type_reprs( + int id: @ret_type_repr ref, + int type_repr: @type_repr ref +); + +return_type_syntaxes( + unique int id: @return_type_syntax +); + +source_files( + unique int id: @source_file +); + +#keyset[id, index] +source_file_attrs( + int id: @source_file ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +source_file_items( + int id: @source_file ref, + int index: int ref, + int item: @item ref +); + +@stmt = + @expr_stmt +| @item +| @let_stmt +; + +stmt_lists( + unique int id: @stmt_list +); + +#keyset[id, index] +stmt_list_attrs( + int id: @stmt_list ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +stmt_list_statements( + int id: @stmt_list ref, + int index: int ref, + int statement: @stmt ref +); + +#keyset[id] +stmt_list_tail_exprs( + int id: @stmt_list ref, + int tail_expr: @expr ref +); + +struct_expr_fields( + unique int id: @struct_expr_field +); + +#keyset[id, index] +struct_expr_field_attrs( + int id: @struct_expr_field ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +struct_expr_field_exprs( + int id: @struct_expr_field ref, + int expr: @expr ref +); + +#keyset[id] +struct_expr_field_identifiers( + int id: @struct_expr_field ref, + int identifier: @name_ref ref +); + +struct_expr_field_lists( + unique int id: @struct_expr_field_list +); + +#keyset[id, index] +struct_expr_field_list_attrs( + int id: @struct_expr_field_list ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +struct_expr_field_list_fields( + int id: @struct_expr_field_list ref, + int index: int ref, + int field: @struct_expr_field ref +); + +#keyset[id] +struct_expr_field_list_spreads( + int id: @struct_expr_field_list ref, + int spread: @expr ref +); + +struct_fields( + unique int id: @struct_field +); + +#keyset[id, index] +struct_field_attrs( + int id: @struct_field ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +struct_field_defaults( + int id: @struct_field ref, + int default: @expr ref +); + +#keyset[id] +struct_field_is_unsafe( + int id: @struct_field ref +); + +#keyset[id] +struct_field_names( + int id: @struct_field ref, + int name: @name ref +); + +#keyset[id] +struct_field_type_reprs( + int id: @struct_field ref, + int type_repr: @type_repr ref +); + +#keyset[id] +struct_field_visibilities( + int id: @struct_field ref, + int visibility: @visibility ref +); + +struct_pat_fields( + unique int id: @struct_pat_field +); + +#keyset[id, index] +struct_pat_field_attrs( + int id: @struct_pat_field ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +struct_pat_field_identifiers( + int id: @struct_pat_field ref, + int identifier: @name_ref ref +); + +#keyset[id] +struct_pat_field_pats( + int id: @struct_pat_field ref, + int pat: @pat ref +); + +struct_pat_field_lists( + unique int id: @struct_pat_field_list +); + +#keyset[id, index] +struct_pat_field_list_fields( + int id: @struct_pat_field_list ref, + int index: int ref, + int field: @struct_pat_field ref +); + +#keyset[id] +struct_pat_field_list_rest_pats( + int id: @struct_pat_field_list ref, + int rest_pat: @rest_pat ref +); + +@token = + @comment +; + +token_trees( + unique int id: @token_tree +); + +tuple_fields( + unique int id: @tuple_field +); + +#keyset[id, index] +tuple_field_attrs( + int id: @tuple_field ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +tuple_field_type_reprs( + int id: @tuple_field ref, + int type_repr: @type_repr ref +); + +#keyset[id] +tuple_field_visibilities( + int id: @tuple_field ref, + int visibility: @visibility ref +); + +type_bounds( + unique int id: @type_bound +); + +#keyset[id] +type_bound_for_binders( + int id: @type_bound ref, + int for_binder: @for_binder ref +); + +#keyset[id] +type_bound_is_async( + int id: @type_bound ref +); + +#keyset[id] +type_bound_is_const( + int id: @type_bound ref +); + +#keyset[id] +type_bound_lifetimes( + int id: @type_bound ref, + int lifetime: @lifetime ref +); + +#keyset[id] +type_bound_type_reprs( + int id: @type_bound ref, + int type_repr: @type_repr ref +); + +#keyset[id] +type_bound_use_bound_generic_args( + int id: @type_bound ref, + int use_bound_generic_args: @use_bound_generic_args ref +); + +type_bound_lists( + unique int id: @type_bound_list +); + +#keyset[id, index] +type_bound_list_bounds( + int id: @type_bound_list ref, + int index: int ref, + int bound: @type_bound ref +); + +@type_repr = + @array_type_repr +| @dyn_trait_type_repr +| @fn_ptr_type_repr +| @for_type_repr +| @impl_trait_type_repr +| @infer_type_repr +| @macro_type_repr +| @never_type_repr +| @paren_type_repr +| @path_type_repr +| @ptr_type_repr +| @ref_type_repr +| @slice_type_repr +| @tuple_type_repr +; + +@use_bound_generic_arg = + @lifetime +| @name_ref +; + +use_bound_generic_args( + unique int id: @use_bound_generic_args +); + +#keyset[id, index] +use_bound_generic_args_use_bound_generic_args( + int id: @use_bound_generic_args ref, + int index: int ref, + int use_bound_generic_arg: @use_bound_generic_arg ref +); + +use_trees( + unique int id: @use_tree +); + +#keyset[id] +use_tree_is_glob( + int id: @use_tree ref +); + +#keyset[id] +use_tree_paths( + int id: @use_tree ref, + int path: @path ref +); + +#keyset[id] +use_tree_renames( + int id: @use_tree ref, + int rename: @rename ref +); + +#keyset[id] +use_tree_use_tree_lists( + int id: @use_tree ref, + int use_tree_list: @use_tree_list ref +); + +use_tree_lists( + unique int id: @use_tree_list +); + +#keyset[id, index] +use_tree_list_use_trees( + int id: @use_tree_list ref, + int index: int ref, + int use_tree: @use_tree ref +); + +variant_lists( + unique int id: @variant_list +); + +#keyset[id, index] +variant_list_variants( + int id: @variant_list ref, + int index: int ref, + int variant: @variant ref +); + +visibilities( + unique int id: @visibility +); + +#keyset[id] +visibility_paths( + int id: @visibility ref, + int path: @path ref +); + +where_clauses( + unique int id: @where_clause +); + +#keyset[id, index] +where_clause_predicates( + int id: @where_clause ref, + int index: int ref, + int predicate: @where_pred ref +); + +where_preds( + unique int id: @where_pred +); + +#keyset[id] +where_pred_for_binders( + int id: @where_pred ref, + int for_binder: @for_binder ref +); + +#keyset[id] +where_pred_lifetimes( + int id: @where_pred ref, + int lifetime: @lifetime ref +); + +#keyset[id] +where_pred_type_reprs( + int id: @where_pred ref, + int type_repr: @type_repr ref +); + +#keyset[id] +where_pred_type_bound_lists( + int id: @where_pred ref, + int type_bound_list: @type_bound_list ref +); + +array_expr_internals( + unique int id: @array_expr_internal +); + +#keyset[id, index] +array_expr_internal_attrs( + int id: @array_expr_internal ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +array_expr_internal_exprs( + int id: @array_expr_internal ref, + int index: int ref, + int expr: @expr ref +); + +#keyset[id] +array_expr_internal_is_semicolon( + int id: @array_expr_internal ref +); + +array_type_reprs( + unique int id: @array_type_repr +); + +#keyset[id] +array_type_repr_const_args( + int id: @array_type_repr ref, + int const_arg: @const_arg ref +); + +#keyset[id] +array_type_repr_element_type_reprs( + int id: @array_type_repr ref, + int element_type_repr: @type_repr ref +); + +asm_clobber_abis( + unique int id: @asm_clobber_abi +); + +asm_consts( + unique int id: @asm_const +); + +#keyset[id] +asm_const_exprs( + int id: @asm_const ref, + int expr: @expr ref +); + +#keyset[id] +asm_const_is_const( + int id: @asm_const ref +); + +asm_labels( + unique int id: @asm_label +); + +#keyset[id] +asm_label_block_exprs( + int id: @asm_label ref, + int block_expr: @block_expr ref +); + +asm_operand_nameds( + unique int id: @asm_operand_named +); + +#keyset[id] +asm_operand_named_asm_operands( + int id: @asm_operand_named ref, + int asm_operand: @asm_operand ref +); + +#keyset[id] +asm_operand_named_names( + int id: @asm_operand_named ref, + int name: @name ref +); + +asm_options_lists( + unique int id: @asm_options_list +); + +#keyset[id, index] +asm_options_list_asm_options( + int id: @asm_options_list ref, + int index: int ref, + int asm_option: @asm_option ref +); + +asm_reg_operands( + unique int id: @asm_reg_operand +); + +#keyset[id] +asm_reg_operand_asm_dir_specs( + int id: @asm_reg_operand ref, + int asm_dir_spec: @asm_dir_spec ref +); + +#keyset[id] +asm_reg_operand_asm_operand_exprs( + int id: @asm_reg_operand ref, + int asm_operand_expr: @asm_operand_expr ref +); + +#keyset[id] +asm_reg_operand_asm_reg_specs( + int id: @asm_reg_operand ref, + int asm_reg_spec: @asm_reg_spec ref +); + +asm_syms( + unique int id: @asm_sym +); + +#keyset[id] +asm_sym_paths( + int id: @asm_sym ref, + int path: @path ref +); + +assoc_type_args( + unique int id: @assoc_type_arg +); + +#keyset[id] +assoc_type_arg_const_args( + int id: @assoc_type_arg ref, + int const_arg: @const_arg ref +); + +#keyset[id] +assoc_type_arg_generic_arg_lists( + int id: @assoc_type_arg ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +assoc_type_arg_identifiers( + int id: @assoc_type_arg ref, + int identifier: @name_ref ref +); + +#keyset[id] +assoc_type_arg_param_lists( + int id: @assoc_type_arg ref, + int param_list: @param_list ref +); + +#keyset[id] +assoc_type_arg_ret_types( + int id: @assoc_type_arg ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +assoc_type_arg_return_type_syntaxes( + int id: @assoc_type_arg ref, + int return_type_syntax: @return_type_syntax ref +); + +#keyset[id] +assoc_type_arg_type_reprs( + int id: @assoc_type_arg ref, + int type_repr: @type_repr ref +); + +#keyset[id] +assoc_type_arg_type_bound_lists( + int id: @assoc_type_arg ref, + int type_bound_list: @type_bound_list ref +); + +await_exprs( + unique int id: @await_expr +); + +#keyset[id, index] +await_expr_attrs( + int id: @await_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +await_expr_exprs( + int id: @await_expr ref, + int expr: @expr ref +); + +become_exprs( + unique int id: @become_expr +); + +#keyset[id, index] +become_expr_attrs( + int id: @become_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +become_expr_exprs( + int id: @become_expr ref, + int expr: @expr ref +); + +binary_exprs( + unique int id: @binary_expr +); + +#keyset[id, index] +binary_expr_attrs( + int id: @binary_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +binary_expr_lhs( + int id: @binary_expr ref, + int lhs: @expr ref +); + +#keyset[id] +binary_expr_operator_names( + int id: @binary_expr ref, + string operator_name: string ref +); + +#keyset[id] +binary_expr_rhs( + int id: @binary_expr ref, + int rhs: @expr ref +); + +box_pats( + unique int id: @box_pat +); + +#keyset[id] +box_pat_pats( + int id: @box_pat ref, + int pat: @pat ref +); + +break_exprs( + unique int id: @break_expr +); + +#keyset[id, index] +break_expr_attrs( + int id: @break_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +break_expr_exprs( + int id: @break_expr ref, + int expr: @expr ref +); + +#keyset[id] +break_expr_lifetimes( + int id: @break_expr ref, + int lifetime: @lifetime ref +); + +call_exprs( + unique int id: @call_expr +); + +#keyset[id] +call_expr_arg_lists( + int id: @call_expr ref, + int arg_list: @arg_list ref +); + +#keyset[id, index] +call_expr_attrs( + int id: @call_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +call_expr_functions( + int id: @call_expr ref, + int function: @expr ref +); + +cast_exprs( + unique int id: @cast_expr +); + +#keyset[id, index] +cast_expr_attrs( + int id: @cast_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +cast_expr_exprs( + int id: @cast_expr ref, + int expr: @expr ref +); + +#keyset[id] +cast_expr_type_reprs( + int id: @cast_expr ref, + int type_repr: @type_repr ref +); + +closure_exprs( + unique int id: @closure_expr +); + +#keyset[id] +closure_expr_closure_bodies( + int id: @closure_expr ref, + int closure_body: @expr ref +); + +#keyset[id] +closure_expr_for_binders( + int id: @closure_expr ref, + int for_binder: @for_binder ref +); + +#keyset[id] +closure_expr_is_async( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_const( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_gen( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_move( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_static( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_ret_types( + int id: @closure_expr ref, + int ret_type: @ret_type_repr ref +); + +comments( + unique int id: @comment, + int parent: @ast_node ref, + string text: string ref +); + +const_args( + unique int id: @const_arg +); + +#keyset[id] +const_arg_exprs( + int id: @const_arg ref, + int expr: @expr ref +); + +const_block_pats( + unique int id: @const_block_pat +); + +#keyset[id] +const_block_pat_block_exprs( + int id: @const_block_pat ref, + int block_expr: @block_expr ref +); + +#keyset[id] +const_block_pat_is_const( + int id: @const_block_pat ref +); + +const_params( + unique int id: @const_param +); + +#keyset[id, index] +const_param_attrs( + int id: @const_param ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +const_param_default_vals( + int id: @const_param ref, + int default_val: @const_arg ref +); + +#keyset[id] +const_param_is_const( + int id: @const_param ref +); + +#keyset[id] +const_param_names( + int id: @const_param ref, + int name: @name ref +); + +#keyset[id] +const_param_type_reprs( + int id: @const_param ref, + int type_repr: @type_repr ref +); + +continue_exprs( + unique int id: @continue_expr +); + +#keyset[id, index] +continue_expr_attrs( + int id: @continue_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +continue_expr_lifetimes( + int id: @continue_expr ref, + int lifetime: @lifetime ref +); + +dyn_trait_type_reprs( + unique int id: @dyn_trait_type_repr +); + +#keyset[id] +dyn_trait_type_repr_type_bound_lists( + int id: @dyn_trait_type_repr ref, + int type_bound_list: @type_bound_list ref +); + +expr_stmts( + unique int id: @expr_stmt +); + +#keyset[id] +expr_stmt_exprs( + int id: @expr_stmt ref, + int expr: @expr ref +); + +field_exprs( + unique int id: @field_expr +); + +#keyset[id, index] +field_expr_attrs( + int id: @field_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +field_expr_containers( + int id: @field_expr ref, + int container: @expr ref +); + +#keyset[id] +field_expr_identifiers( + int id: @field_expr ref, + int identifier: @name_ref ref +); + +fn_ptr_type_reprs( + unique int id: @fn_ptr_type_repr +); + +#keyset[id] +fn_ptr_type_repr_abis( + int id: @fn_ptr_type_repr ref, + int abi: @abi ref +); + +#keyset[id] +fn_ptr_type_repr_is_async( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_is_const( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_is_unsafe( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_param_lists( + int id: @fn_ptr_type_repr ref, + int param_list: @param_list ref +); + +#keyset[id] +fn_ptr_type_repr_ret_types( + int id: @fn_ptr_type_repr ref, + int ret_type: @ret_type_repr ref +); + +for_type_reprs( + unique int id: @for_type_repr +); + +#keyset[id] +for_type_repr_for_binders( + int id: @for_type_repr ref, + int for_binder: @for_binder ref +); + +#keyset[id] +for_type_repr_type_reprs( + int id: @for_type_repr ref, + int type_repr: @type_repr ref +); + +format_args_exprs( + unique int id: @format_args_expr +); + +#keyset[id, index] +format_args_expr_args( + int id: @format_args_expr ref, + int index: int ref, + int arg: @format_args_arg ref +); + +#keyset[id, index] +format_args_expr_attrs( + int id: @format_args_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +format_args_expr_templates( + int id: @format_args_expr ref, + int template: @expr ref +); + +ident_pats( + unique int id: @ident_pat +); + +#keyset[id, index] +ident_pat_attrs( + int id: @ident_pat ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +ident_pat_is_mut( + int id: @ident_pat ref +); + +#keyset[id] +ident_pat_is_ref( + int id: @ident_pat ref +); + +#keyset[id] +ident_pat_names( + int id: @ident_pat ref, + int name: @name ref +); + +#keyset[id] +ident_pat_pats( + int id: @ident_pat ref, + int pat: @pat ref +); + +if_exprs( + unique int id: @if_expr +); + +#keyset[id, index] +if_expr_attrs( + int id: @if_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +if_expr_conditions( + int id: @if_expr ref, + int condition: @expr ref +); + +#keyset[id] +if_expr_elses( + int id: @if_expr ref, + int else: @expr ref +); + +#keyset[id] +if_expr_thens( + int id: @if_expr ref, + int then: @block_expr ref +); + +impl_trait_type_reprs( + unique int id: @impl_trait_type_repr +); + +#keyset[id] +impl_trait_type_repr_type_bound_lists( + int id: @impl_trait_type_repr ref, + int type_bound_list: @type_bound_list ref +); + +index_exprs( + unique int id: @index_expr +); + +#keyset[id, index] +index_expr_attrs( + int id: @index_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +index_expr_bases( + int id: @index_expr ref, + int base: @expr ref +); + +#keyset[id] +index_expr_indices( + int id: @index_expr ref, + int index: @expr ref +); + +infer_type_reprs( + unique int id: @infer_type_repr +); + +@item = + @adt +| @asm_expr +| @assoc_item +| @extern_block +| @extern_crate +| @extern_item +| @impl +| @macro_def +| @macro_rules +| @module +| @trait +| @trait_alias +| @use +; + +#keyset[id] +item_attribute_macro_expansions( + int id: @item ref, + int attribute_macro_expansion: @macro_items ref +); + +@labelable_expr = + @block_expr +| @looping_expr +; + +#keyset[id] +labelable_expr_labels( + int id: @labelable_expr ref, + int label: @label ref +); + +let_exprs( + unique int id: @let_expr +); + +#keyset[id, index] +let_expr_attrs( + int id: @let_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +let_expr_scrutinees( + int id: @let_expr ref, + int scrutinee: @expr ref +); + +#keyset[id] +let_expr_pats( + int id: @let_expr ref, + int pat: @pat ref +); + +let_stmts( + unique int id: @let_stmt +); + +#keyset[id, index] +let_stmt_attrs( + int id: @let_stmt ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +let_stmt_initializers( + int id: @let_stmt ref, + int initializer: @expr ref +); + +#keyset[id] +let_stmt_let_elses( + int id: @let_stmt ref, + int let_else: @let_else ref +); + +#keyset[id] +let_stmt_pats( + int id: @let_stmt ref, + int pat: @pat ref +); + +#keyset[id] +let_stmt_type_reprs( + int id: @let_stmt ref, + int type_repr: @type_repr ref +); + +lifetimes( + unique int id: @lifetime +); + +#keyset[id] +lifetime_texts( + int id: @lifetime ref, + string text: string ref +); + +lifetime_args( + unique int id: @lifetime_arg +); + +#keyset[id] +lifetime_arg_lifetimes( + int id: @lifetime_arg ref, + int lifetime: @lifetime ref +); + +lifetime_params( + unique int id: @lifetime_param +); + +#keyset[id, index] +lifetime_param_attrs( + int id: @lifetime_param ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +lifetime_param_lifetimes( + int id: @lifetime_param ref, + int lifetime: @lifetime ref +); + +#keyset[id] +lifetime_param_type_bound_lists( + int id: @lifetime_param ref, + int type_bound_list: @type_bound_list ref +); + +literal_exprs( + unique int id: @literal_expr +); + +#keyset[id, index] +literal_expr_attrs( + int id: @literal_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +literal_expr_text_values( + int id: @literal_expr ref, + string text_value: string ref +); + +literal_pats( + unique int id: @literal_pat +); + +#keyset[id] +literal_pat_literals( + int id: @literal_pat ref, + int literal: @literal_expr ref +); + +macro_block_exprs( + unique int id: @macro_block_expr +); + +#keyset[id, index] +macro_block_expr_statements( + int id: @macro_block_expr ref, + int index: int ref, + int statement: @stmt ref +); + +#keyset[id] +macro_block_expr_tail_exprs( + int id: @macro_block_expr ref, + int tail_expr: @expr ref +); + +macro_exprs( + unique int id: @macro_expr +); + +#keyset[id] +macro_expr_macro_calls( + int id: @macro_expr ref, + int macro_call: @macro_call ref +); + +macro_pats( + unique int id: @macro_pat +); + +#keyset[id] +macro_pat_macro_calls( + int id: @macro_pat ref, + int macro_call: @macro_call ref +); + +macro_type_reprs( + unique int id: @macro_type_repr +); + +#keyset[id] +macro_type_repr_macro_calls( + int id: @macro_type_repr ref, + int macro_call: @macro_call ref +); + +match_exprs( + unique int id: @match_expr +); + +#keyset[id, index] +match_expr_attrs( + int id: @match_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +match_expr_scrutinees( + int id: @match_expr ref, + int scrutinee: @expr ref +); + +#keyset[id] +match_expr_match_arm_lists( + int id: @match_expr ref, + int match_arm_list: @match_arm_list ref +); + +method_call_exprs( + unique int id: @method_call_expr +); + +#keyset[id] +method_call_expr_arg_lists( + int id: @method_call_expr ref, + int arg_list: @arg_list ref +); + +#keyset[id, index] +method_call_expr_attrs( + int id: @method_call_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +method_call_expr_generic_arg_lists( + int id: @method_call_expr ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +method_call_expr_identifiers( + int id: @method_call_expr ref, + int identifier: @name_ref ref +); + +#keyset[id] +method_call_expr_receivers( + int id: @method_call_expr ref, + int receiver: @expr ref +); + +name_refs( + unique int id: @name_ref +); + +#keyset[id] +name_ref_texts( + int id: @name_ref ref, + string text: string ref +); + +never_type_reprs( + unique int id: @never_type_repr +); + +offset_of_exprs( + unique int id: @offset_of_expr +); + +#keyset[id, index] +offset_of_expr_attrs( + int id: @offset_of_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +offset_of_expr_fields( + int id: @offset_of_expr ref, + int index: int ref, + int field: @name_ref ref +); + +#keyset[id] +offset_of_expr_type_reprs( + int id: @offset_of_expr ref, + int type_repr: @type_repr ref +); + +or_pats( + unique int id: @or_pat +); + +#keyset[id, index] +or_pat_pats( + int id: @or_pat ref, + int index: int ref, + int pat: @pat ref +); + +params( + unique int id: @param +); + +#keyset[id] +param_pats( + int id: @param ref, + int pat: @pat ref +); + +paren_exprs( + unique int id: @paren_expr +); + +#keyset[id, index] +paren_expr_attrs( + int id: @paren_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +paren_expr_exprs( + int id: @paren_expr ref, + int expr: @expr ref +); + +paren_pats( + unique int id: @paren_pat +); + +#keyset[id] +paren_pat_pats( + int id: @paren_pat ref, + int pat: @pat ref +); + +paren_type_reprs( + unique int id: @paren_type_repr +); + +#keyset[id] +paren_type_repr_type_reprs( + int id: @paren_type_repr ref, + int type_repr: @type_repr ref +); + +@path_expr_base = + @path_expr +; + +path_pats( + unique int id: @path_pat +); + +path_type_reprs( + unique int id: @path_type_repr +); + +#keyset[id] +path_type_repr_paths( + int id: @path_type_repr ref, + int path: @path ref +); + +prefix_exprs( + unique int id: @prefix_expr +); + +#keyset[id, index] +prefix_expr_attrs( + int id: @prefix_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +prefix_expr_exprs( + int id: @prefix_expr ref, + int expr: @expr ref +); + +#keyset[id] +prefix_expr_operator_names( + int id: @prefix_expr ref, + string operator_name: string ref +); + +ptr_type_reprs( + unique int id: @ptr_type_repr +); + +#keyset[id] +ptr_type_repr_is_const( + int id: @ptr_type_repr ref +); + +#keyset[id] +ptr_type_repr_is_mut( + int id: @ptr_type_repr ref +); + +#keyset[id] +ptr_type_repr_type_reprs( + int id: @ptr_type_repr ref, + int type_repr: @type_repr ref +); + +range_exprs( + unique int id: @range_expr +); + +#keyset[id, index] +range_expr_attrs( + int id: @range_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +range_expr_ends( + int id: @range_expr ref, + int end: @expr ref +); + +#keyset[id] +range_expr_operator_names( + int id: @range_expr ref, + string operator_name: string ref +); + +#keyset[id] +range_expr_starts( + int id: @range_expr ref, + int start: @expr ref +); + +range_pats( + unique int id: @range_pat +); + +#keyset[id] +range_pat_ends( + int id: @range_pat ref, + int end: @pat ref +); + +#keyset[id] +range_pat_operator_names( + int id: @range_pat ref, + string operator_name: string ref +); + +#keyset[id] +range_pat_starts( + int id: @range_pat ref, + int start: @pat ref +); + +ref_exprs( + unique int id: @ref_expr +); + +#keyset[id, index] +ref_expr_attrs( + int id: @ref_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +ref_expr_exprs( + int id: @ref_expr ref, + int expr: @expr ref +); + +#keyset[id] +ref_expr_is_const( + int id: @ref_expr ref +); + +#keyset[id] +ref_expr_is_mut( + int id: @ref_expr ref +); + +#keyset[id] +ref_expr_is_raw( + int id: @ref_expr ref +); + +ref_pats( + unique int id: @ref_pat +); + +#keyset[id] +ref_pat_is_mut( + int id: @ref_pat ref +); + +#keyset[id] +ref_pat_pats( + int id: @ref_pat ref, + int pat: @pat ref +); + +ref_type_reprs( + unique int id: @ref_type_repr +); + +#keyset[id] +ref_type_repr_is_mut( + int id: @ref_type_repr ref +); + +#keyset[id] +ref_type_repr_lifetimes( + int id: @ref_type_repr ref, + int lifetime: @lifetime ref +); + +#keyset[id] +ref_type_repr_type_reprs( + int id: @ref_type_repr ref, + int type_repr: @type_repr ref +); + +rest_pats( + unique int id: @rest_pat +); + +#keyset[id, index] +rest_pat_attrs( + int id: @rest_pat ref, + int index: int ref, + int attr: @attr ref +); + +return_exprs( + unique int id: @return_expr +); + +#keyset[id, index] +return_expr_attrs( + int id: @return_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +return_expr_exprs( + int id: @return_expr ref, + int expr: @expr ref +); + +self_params( + unique int id: @self_param +); + +#keyset[id] +self_param_is_ref( + int id: @self_param ref +); + +#keyset[id] +self_param_is_mut( + int id: @self_param ref +); + +#keyset[id] +self_param_lifetimes( + int id: @self_param ref, + int lifetime: @lifetime ref +); + +#keyset[id] +self_param_names( + int id: @self_param ref, + int name: @name ref +); + +slice_pats( + unique int id: @slice_pat +); + +#keyset[id, index] +slice_pat_pats( + int id: @slice_pat ref, + int index: int ref, + int pat: @pat ref +); + +slice_type_reprs( + unique int id: @slice_type_repr +); + +#keyset[id] +slice_type_repr_type_reprs( + int id: @slice_type_repr ref, + int type_repr: @type_repr ref +); + +struct_exprs( + unique int id: @struct_expr +); + +#keyset[id] +struct_expr_struct_expr_field_lists( + int id: @struct_expr ref, + int struct_expr_field_list: @struct_expr_field_list ref +); + +struct_field_lists( + unique int id: @struct_field_list +); + +#keyset[id, index] +struct_field_list_fields( + int id: @struct_field_list ref, + int index: int ref, + int field: @struct_field ref +); + +struct_pats( + unique int id: @struct_pat +); + +#keyset[id] +struct_pat_struct_pat_field_lists( + int id: @struct_pat ref, + int struct_pat_field_list: @struct_pat_field_list ref +); + +try_exprs( + unique int id: @try_expr +); + +#keyset[id, index] +try_expr_attrs( + int id: @try_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +try_expr_exprs( + int id: @try_expr ref, + int expr: @expr ref +); + +tuple_exprs( + unique int id: @tuple_expr +); + +#keyset[id, index] +tuple_expr_attrs( + int id: @tuple_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +tuple_expr_fields( + int id: @tuple_expr ref, + int index: int ref, + int field: @expr ref +); + +tuple_field_lists( + unique int id: @tuple_field_list +); + +#keyset[id, index] +tuple_field_list_fields( + int id: @tuple_field_list ref, + int index: int ref, + int field: @tuple_field ref +); + +tuple_pats( + unique int id: @tuple_pat +); + +#keyset[id, index] +tuple_pat_fields( + int id: @tuple_pat ref, + int index: int ref, + int field: @pat ref +); + +tuple_struct_pats( + unique int id: @tuple_struct_pat +); + +#keyset[id, index] +tuple_struct_pat_fields( + int id: @tuple_struct_pat ref, + int index: int ref, + int field: @pat ref +); + +tuple_type_reprs( + unique int id: @tuple_type_repr +); + +#keyset[id, index] +tuple_type_repr_fields( + int id: @tuple_type_repr ref, + int index: int ref, + int field: @type_repr ref +); + +type_args( + unique int id: @type_arg +); + +#keyset[id] +type_arg_type_reprs( + int id: @type_arg ref, + int type_repr: @type_repr ref +); + +type_params( + unique int id: @type_param +); + +#keyset[id, index] +type_param_attrs( + int id: @type_param ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +type_param_default_types( + int id: @type_param ref, + int default_type: @type_repr ref +); + +#keyset[id] +type_param_names( + int id: @type_param ref, + int name: @name ref +); + +#keyset[id] +type_param_type_bound_lists( + int id: @type_param ref, + int type_bound_list: @type_bound_list ref +); + +underscore_exprs( + unique int id: @underscore_expr +); + +#keyset[id, index] +underscore_expr_attrs( + int id: @underscore_expr ref, + int index: int ref, + int attr: @attr ref +); + +variants( + unique int id: @variant +); + +#keyset[id, index] +variant_attrs( + int id: @variant ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +variant_discriminants( + int id: @variant ref, + int discriminant: @expr ref +); + +#keyset[id] +variant_field_lists( + int id: @variant ref, + int field_list: @field_list ref +); + +#keyset[id] +variant_names( + int id: @variant ref, + int name: @name ref +); + +#keyset[id] +variant_visibilities( + int id: @variant ref, + int visibility: @visibility ref +); + +wildcard_pats( + unique int id: @wildcard_pat +); + +yeet_exprs( + unique int id: @yeet_expr +); + +#keyset[id, index] +yeet_expr_attrs( + int id: @yeet_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +yeet_expr_exprs( + int id: @yeet_expr ref, + int expr: @expr ref +); + +yield_exprs( + unique int id: @yield_expr +); + +#keyset[id, index] +yield_expr_attrs( + int id: @yield_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +yield_expr_exprs( + int id: @yield_expr ref, + int expr: @expr ref +); + +@adt = + @enum +| @struct +| @union +; + +#keyset[id, index] +adt_derive_macro_expansions( + int id: @adt ref, + int index: int ref, + int derive_macro_expansion: @macro_items ref +); + +asm_exprs( + unique int id: @asm_expr +); + +#keyset[id, index] +asm_expr_asm_pieces( + int id: @asm_expr ref, + int index: int ref, + int asm_piece: @asm_piece ref +); + +#keyset[id, index] +asm_expr_attrs( + int id: @asm_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id, index] +asm_expr_templates( + int id: @asm_expr ref, + int index: int ref, + int template: @expr ref +); + +@assoc_item = + @const +| @function +| @macro_call +| @type_alias +; + +block_exprs( + unique int id: @block_expr +); + +#keyset[id, index] +block_expr_attrs( + int id: @block_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +block_expr_is_async( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_const( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_gen( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_move( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_try( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_unsafe( + int id: @block_expr ref +); + +#keyset[id] +block_expr_stmt_lists( + int id: @block_expr ref, + int stmt_list: @stmt_list ref +); + +extern_blocks( + unique int id: @extern_block +); + +#keyset[id] +extern_block_abis( + int id: @extern_block ref, + int abi: @abi ref +); + +#keyset[id, index] +extern_block_attrs( + int id: @extern_block ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +extern_block_extern_item_lists( + int id: @extern_block ref, + int extern_item_list: @extern_item_list ref +); + +#keyset[id] +extern_block_is_unsafe( + int id: @extern_block ref +); + +extern_crates( + unique int id: @extern_crate +); + +#keyset[id, index] +extern_crate_attrs( + int id: @extern_crate ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +extern_crate_identifiers( + int id: @extern_crate ref, + int identifier: @name_ref ref +); + +#keyset[id] +extern_crate_renames( + int id: @extern_crate ref, + int rename: @rename ref +); + +#keyset[id] +extern_crate_visibilities( + int id: @extern_crate ref, + int visibility: @visibility ref +); + +@extern_item = + @function +| @macro_call +| @static +| @type_alias +; + +impls( + unique int id: @impl +); + +#keyset[id] +impl_assoc_item_lists( + int id: @impl ref, + int assoc_item_list: @assoc_item_list ref +); + +#keyset[id, index] +impl_attrs( + int id: @impl ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +impl_generic_param_lists( + int id: @impl ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +impl_is_const( + int id: @impl ref +); + +#keyset[id] +impl_is_default( + int id: @impl ref +); + +#keyset[id] +impl_is_unsafe( + int id: @impl ref +); + +#keyset[id] +impl_self_ties( + int id: @impl ref, + int self_ty: @type_repr ref +); + +#keyset[id] +impl_traits( + int id: @impl ref, + int trait: @type_repr ref +); + +#keyset[id] +impl_visibilities( + int id: @impl ref, + int visibility: @visibility ref +); + +#keyset[id] +impl_where_clauses( + int id: @impl ref, + int where_clause: @where_clause ref +); + +@looping_expr = + @for_expr +| @loop_expr +| @while_expr +; + +#keyset[id] +looping_expr_loop_bodies( + int id: @looping_expr ref, + int loop_body: @block_expr ref +); + +macro_defs( + unique int id: @macro_def +); + +#keyset[id] +macro_def_args( + int id: @macro_def ref, + int args: @token_tree ref +); + +#keyset[id, index] +macro_def_attrs( + int id: @macro_def ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +macro_def_bodies( + int id: @macro_def ref, + int body: @token_tree ref +); + +#keyset[id] +macro_def_names( + int id: @macro_def ref, + int name: @name ref +); + +#keyset[id] +macro_def_visibilities( + int id: @macro_def ref, + int visibility: @visibility ref +); + +macro_rules( + unique int id: @macro_rules +); + +#keyset[id, index] +macro_rules_attrs( + int id: @macro_rules ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +macro_rules_names( + int id: @macro_rules ref, + int name: @name ref +); + +#keyset[id] +macro_rules_token_trees( + int id: @macro_rules ref, + int token_tree: @token_tree ref +); + +#keyset[id] +macro_rules_visibilities( + int id: @macro_rules ref, + int visibility: @visibility ref +); + +modules( + unique int id: @module +); + +#keyset[id, index] +module_attrs( + int id: @module ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +module_item_lists( + int id: @module ref, + int item_list: @item_list ref +); + +#keyset[id] +module_names( + int id: @module ref, + int name: @name ref +); + +#keyset[id] +module_visibilities( + int id: @module ref, + int visibility: @visibility ref +); + +path_exprs( + unique int id: @path_expr +); + +#keyset[id, index] +path_expr_attrs( + int id: @path_expr ref, + int index: int ref, + int attr: @attr ref +); + +traits( + unique int id: @trait +); + +#keyset[id] +trait_assoc_item_lists( + int id: @trait ref, + int assoc_item_list: @assoc_item_list ref +); + +#keyset[id, index] +trait_attrs( + int id: @trait ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +trait_generic_param_lists( + int id: @trait ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +trait_is_auto( + int id: @trait ref +); + +#keyset[id] +trait_is_unsafe( + int id: @trait ref +); + +#keyset[id] +trait_names( + int id: @trait ref, + int name: @name ref +); + +#keyset[id] +trait_type_bound_lists( + int id: @trait ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +trait_visibilities( + int id: @trait ref, + int visibility: @visibility ref +); + +#keyset[id] +trait_where_clauses( + int id: @trait ref, + int where_clause: @where_clause ref +); + +trait_aliases( + unique int id: @trait_alias +); + +#keyset[id, index] +trait_alias_attrs( + int id: @trait_alias ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +trait_alias_generic_param_lists( + int id: @trait_alias ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +trait_alias_names( + int id: @trait_alias ref, + int name: @name ref +); + +#keyset[id] +trait_alias_type_bound_lists( + int id: @trait_alias ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +trait_alias_visibilities( + int id: @trait_alias ref, + int visibility: @visibility ref +); + +#keyset[id] +trait_alias_where_clauses( + int id: @trait_alias ref, + int where_clause: @where_clause ref +); + +uses( + unique int id: @use +); + +#keyset[id, index] +use_attrs( + int id: @use ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +use_use_trees( + int id: @use ref, + int use_tree: @use_tree ref +); + +#keyset[id] +use_visibilities( + int id: @use ref, + int visibility: @visibility ref +); + +consts( + unique int id: @const +); + +#keyset[id, index] +const_attrs( + int id: @const ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +const_bodies( + int id: @const ref, + int body: @expr ref +); + +#keyset[id] +const_generic_param_lists( + int id: @const ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +const_is_const( + int id: @const ref +); + +#keyset[id] +const_is_default( + int id: @const ref +); + +#keyset[id] +const_names( + int id: @const ref, + int name: @name ref +); + +#keyset[id] +const_type_reprs( + int id: @const ref, + int type_repr: @type_repr ref +); + +#keyset[id] +const_visibilities( + int id: @const ref, + int visibility: @visibility ref +); + +#keyset[id] +const_where_clauses( + int id: @const ref, + int where_clause: @where_clause ref +); + +#keyset[id] +const_has_implementation( + int id: @const ref +); + +enums( + unique int id: @enum +); + +#keyset[id, index] +enum_attrs( + int id: @enum ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +enum_generic_param_lists( + int id: @enum ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +enum_names( + int id: @enum ref, + int name: @name ref +); + +#keyset[id] +enum_variant_lists( + int id: @enum ref, + int variant_list: @variant_list ref +); + +#keyset[id] +enum_visibilities( + int id: @enum ref, + int visibility: @visibility ref +); + +#keyset[id] +enum_where_clauses( + int id: @enum ref, + int where_clause: @where_clause ref +); + +for_exprs( + unique int id: @for_expr +); + +#keyset[id, index] +for_expr_attrs( + int id: @for_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +for_expr_iterables( + int id: @for_expr ref, + int iterable: @expr ref +); + +#keyset[id] +for_expr_pats( + int id: @for_expr ref, + int pat: @pat ref +); + +functions( + unique int id: @function +); + +#keyset[id] +function_abis( + int id: @function ref, + int abi: @abi ref +); + +#keyset[id] +function_function_bodies( + int id: @function ref, + int function_body: @block_expr ref +); + +#keyset[id] +function_generic_param_lists( + int id: @function ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +function_is_async( + int id: @function ref +); + +#keyset[id] +function_is_const( + int id: @function ref +); + +#keyset[id] +function_is_default( + int id: @function ref +); + +#keyset[id] +function_is_gen( + int id: @function ref +); + +#keyset[id] +function_is_unsafe( + int id: @function ref +); + +#keyset[id] +function_names( + int id: @function ref, + int name: @name ref +); + +#keyset[id] +function_ret_types( + int id: @function ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +function_visibilities( + int id: @function ref, + int visibility: @visibility ref +); + +#keyset[id] +function_where_clauses( + int id: @function ref, + int where_clause: @where_clause ref +); + +#keyset[id] +function_has_implementation( + int id: @function ref +); + +loop_exprs( + unique int id: @loop_expr +); + +#keyset[id, index] +loop_expr_attrs( + int id: @loop_expr ref, + int index: int ref, + int attr: @attr ref +); + +macro_calls( + unique int id: @macro_call +); + +#keyset[id, index] +macro_call_attrs( + int id: @macro_call ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +macro_call_paths( + int id: @macro_call ref, + int path: @path ref +); + +#keyset[id] +macro_call_token_trees( + int id: @macro_call ref, + int token_tree: @token_tree ref +); + +#keyset[id] +macro_call_macro_call_expansions( + int id: @macro_call ref, + int macro_call_expansion: @ast_node ref +); + +statics( + unique int id: @static +); + +#keyset[id, index] +static_attrs( + int id: @static ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +static_bodies( + int id: @static ref, + int body: @expr ref +); + +#keyset[id] +static_is_mut( + int id: @static ref +); + +#keyset[id] +static_is_static( + int id: @static ref +); + +#keyset[id] +static_is_unsafe( + int id: @static ref +); + +#keyset[id] +static_names( + int id: @static ref, + int name: @name ref +); + +#keyset[id] +static_type_reprs( + int id: @static ref, + int type_repr: @type_repr ref +); + +#keyset[id] +static_visibilities( + int id: @static ref, + int visibility: @visibility ref +); + +structs( + unique int id: @struct +); + +#keyset[id, index] +struct_attrs( + int id: @struct ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +struct_field_lists_( + int id: @struct ref, + int field_list: @field_list ref +); + +#keyset[id] +struct_generic_param_lists( + int id: @struct ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +struct_names( + int id: @struct ref, + int name: @name ref +); + +#keyset[id] +struct_visibilities( + int id: @struct ref, + int visibility: @visibility ref +); + +#keyset[id] +struct_where_clauses( + int id: @struct ref, + int where_clause: @where_clause ref +); + +type_aliases( + unique int id: @type_alias +); + +#keyset[id, index] +type_alias_attrs( + int id: @type_alias ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +type_alias_generic_param_lists( + int id: @type_alias ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +type_alias_is_default( + int id: @type_alias ref +); + +#keyset[id] +type_alias_names( + int id: @type_alias ref, + int name: @name ref +); + +#keyset[id] +type_alias_type_reprs( + int id: @type_alias ref, + int type_repr: @type_repr ref +); + +#keyset[id] +type_alias_type_bound_lists( + int id: @type_alias ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +type_alias_visibilities( + int id: @type_alias ref, + int visibility: @visibility ref +); + +#keyset[id] +type_alias_where_clauses( + int id: @type_alias ref, + int where_clause: @where_clause ref +); + +unions( + unique int id: @union +); + +#keyset[id, index] +union_attrs( + int id: @union ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +union_generic_param_lists( + int id: @union ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +union_names( + int id: @union ref, + int name: @name ref +); + +#keyset[id] +union_struct_field_lists( + int id: @union ref, + int struct_field_list: @struct_field_list ref +); + +#keyset[id] +union_visibilities( + int id: @union ref, + int visibility: @visibility ref +); + +#keyset[id] +union_where_clauses( + int id: @union ref, + int where_clause: @where_clause ref +); + +while_exprs( + unique int id: @while_expr +); + +#keyset[id, index] +while_expr_attrs( + int id: @while_expr ref, + int index: int ref, + int attr: @attr ref +); + +#keyset[id] +while_expr_conditions( + int id: @while_expr ref, + int condition: @expr ref +); diff --git a/rust/ql/lib/upgrades/30a0713e5bf69c60d003e4994e5abd1c78a36826/upgrade.properties b/rust/ql/lib/upgrades/30a0713e5bf69c60d003e4994e5abd1c78a36826/upgrade.properties new file mode 100644 index 00000000000..d3abc91cc1b --- /dev/null +++ b/rust/ql/lib/upgrades/30a0713e5bf69c60d003e4994e5abd1c78a36826/upgrade.properties @@ -0,0 +1,10 @@ +description: Removed the `@call_expr_base` union type +compatibility: backwards + +call_expr_base_arg_lists.rel: delete +call_expr_base_attrs.rel: delete + +call_expr_arg_lists.rel: run upgrade.ql call_expr_arg_lists +call_expr_attrs.rel: run upgrade.ql call_expr_attrs +method_call_expr_arg_lists.rel: run upgrade.ql method_call_expr_arg_lists +method_call_expr_attrs.rel: run upgrade.ql method_call_expr_attrs diff --git a/rust/ql/lib/upgrades/30a0713e5bf69c60d003e4994e5abd1c78a36826/upgrade.ql b/rust/ql/lib/upgrades/30a0713e5bf69c60d003e4994e5abd1c78a36826/upgrade.ql new file mode 100644 index 00000000000..727b13634ef --- /dev/null +++ b/rust/ql/lib/upgrades/30a0713e5bf69c60d003e4994e5abd1c78a36826/upgrade.ql @@ -0,0 +1,23 @@ +class Element extends @element { + string toString() { none() } +} + +class CallExpr extends Element, @call_expr { } + +class ArgList extends Element, @arg_list { } + +class Attr extends Element, @attr { } + +class MethodCallExpr extends Element, @method_call_expr { } + +query predicate call_expr_arg_lists(CallExpr c, ArgList l) { call_expr_base_arg_lists(c, l) } + +query predicate call_expr_attrs(CallExpr c, int i, Attr a) { call_expr_base_attrs(c, i, a) } + +query predicate method_call_expr_arg_lists(MethodCallExpr c, ArgList l) { + call_expr_base_arg_lists(c, l) +} + +query predicate method_call_expr_attrs(MethodCallExpr c, int i, Attr a) { + call_expr_base_attrs(c, i, a) +} diff --git a/rust/ql/lib/utils/test/InlineFlowTest.qll b/rust/ql/lib/utils/test/InlineFlowTest.qll index 938559620fc..aad06087d28 100644 --- a/rust/ql/lib/utils/test/InlineFlowTest.qll +++ b/rust/ql/lib/utils/test/InlineFlowTest.qll @@ -26,15 +26,21 @@ private module FlowTestImpl implements InputSig { predicate defaultSource(DataFlow::Node source) { callTargetName(source.asExpr(), "source") } predicate defaultSink(DataFlow::Node sink) { - any(CallExpr call | callTargetName(call, "sink")).getAnArg() = sink.asExpr() + any(CallExpr call | callTargetName(call, "sink")).getASyntacticArgument() = sink.asExpr() } private string getSourceArgString(DataFlow::Node src) { defaultSource(src) and - result = src.asExpr().(CallExpr).getArg(0).toString() + exists(Expr arg | arg = src.asExpr().(Call).getPositionalArgument(0) | + not arg instanceof ArrayListExpr and + result = arg.toString() + or + result = arg.(ArrayListExpr).getExpr(0).toString() + ) or sourceNode(src, _) and - result = src.(Node::FlowSummaryNode).getSourceElement().getCall().getArg(0).toString() and + result = + src.(Node::FlowSummaryNode).getSourceElement().getCall().getPositionalArgument(0).toString() and // Don't use the result if it contains spaces not result.matches("% %") } diff --git a/rust/ql/src/CHANGELOG.md b/rust/ql/src/CHANGELOG.md index d292205bfdc..61c5c651894 100644 --- a/rust/ql/src/CHANGELOG.md +++ b/rust/ql/src/CHANGELOG.md @@ -1,3 +1,19 @@ +## 0.1.22 + +No user-facing changes. + +## 0.1.21 + +### New Queries + +* Added a new query `rust/xss`, to detect cross-site scripting security vulnerabilities. +* Added a new query `rust/disabled-certificate-check`, to detect disabled TLS certificate checks. +* Added three example queries (`rust/examples/empty-if`, `rust/examples/simple-sql-injection` and `rust/examples/simple-constant-password`) to help developers learn to write CodeQL queries for Rust. + +### Minor Analysis Improvements + +* The `rust/access-invalid-pointer` query has been improved with new flow sources and barriers. + ## 0.1.20 ### Minor Analysis Improvements diff --git a/rust/ql/src/change-notes/2025-11-07-example-queries.md b/rust/ql/src/change-notes/2025-11-07-example-queries.md deleted file mode 100644 index 9e11d4e0a93..00000000000 --- a/rust/ql/src/change-notes/2025-11-07-example-queries.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: newQuery ---- -* Added three example queries (`rust/examples/empty-if`, `rust/examples/simple-sql-injection` and `rust/examples/simple-constant-password`) to help developers learn to write CodeQL queries for Rust. diff --git a/rust/ql/src/change-notes/2025-12-01-hard-coded-cryptographic-value.md b/rust/ql/src/change-notes/2025-12-01-hard-coded-cryptographic-value.md new file mode 100644 index 00000000000..f211982df62 --- /dev/null +++ b/rust/ql/src/change-notes/2025-12-01-hard-coded-cryptographic-value.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* The `rust/hard-coded-cryptographic-value` query has been extended with new heuristic sinks identifying passwords, initialization vectors, nonces and salts. diff --git a/rust/ql/src/change-notes/2025-12-04-access-after-lifetime-ended.md b/rust/ql/src/change-notes/2025-12-04-access-after-lifetime-ended.md new file mode 100644 index 00000000000..1e9200eec8f --- /dev/null +++ b/rust/ql/src/change-notes/2025-12-04-access-after-lifetime-ended.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Fixed false positives from the `rust/access-after-lifetime-ended` query, involving calls to trait methods. diff --git a/rust/ql/src/change-notes/released/0.1.21.md b/rust/ql/src/change-notes/released/0.1.21.md new file mode 100644 index 00000000000..6fd41f2d6c4 --- /dev/null +++ b/rust/ql/src/change-notes/released/0.1.21.md @@ -0,0 +1,11 @@ +## 0.1.21 + +### New Queries + +* Added a new query `rust/xss`, to detect cross-site scripting security vulnerabilities. +* Added a new query `rust/disabled-certificate-check`, to detect disabled TLS certificate checks. +* Added three example queries (`rust/examples/empty-if`, `rust/examples/simple-sql-injection` and `rust/examples/simple-constant-password`) to help developers learn to write CodeQL queries for Rust. + +### Minor Analysis Improvements + +* The `rust/access-invalid-pointer` query has been improved with new flow sources and barriers. diff --git a/rust/ql/src/change-notes/released/0.1.22.md b/rust/ql/src/change-notes/released/0.1.22.md new file mode 100644 index 00000000000..26e5511ae0c --- /dev/null +++ b/rust/ql/src/change-notes/released/0.1.22.md @@ -0,0 +1,3 @@ +## 0.1.22 + +No user-facing changes. diff --git a/rust/ql/src/codeql-pack.release.yml b/rust/ql/src/codeql-pack.release.yml index 9910e8d039f..c9f15f8e72c 100644 --- a/rust/ql/src/codeql-pack.release.yml +++ b/rust/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.1.20 +lastReleaseVersion: 0.1.22 diff --git a/rust/ql/src/qlpack.yml b/rust/ql/src/qlpack.yml index 557990e8f36..0ff9d3d1f2e 100644 --- a/rust/ql/src/qlpack.yml +++ b/rust/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rust-queries -version: 0.1.21-dev +version: 0.1.23-dev groups: - rust - queries diff --git a/rust/ql/src/queries/security/CWE-079/XSS.qhelp b/rust/ql/src/queries/security/CWE-079/XSS.qhelp new file mode 100644 index 00000000000..13b7c026f3c --- /dev/null +++ b/rust/ql/src/queries/security/CWE-079/XSS.qhelp @@ -0,0 +1,48 @@ + + + + +

    Directly writing user input (for example, an HTTP request parameter) to a webpage, +without properly sanitizing the input first, allows for a cross-site +scripting vulnerability.

    +
    + + +

    To guard against cross-site scripting, consider encoding/escaping the untrusted +input before including it in the HTML.

    +
    + + + +

    The following example shows a simple web handler that writes a URL path parameter +directly to an HTML response, leaving the website vulnerable to cross-site +scripting:

    + + + +

    To fix this vulnerability, the user input should be HTML-encoded before being +included in the response. In the following example, encode_text from +the html_escape +crate is used to achieve this:

    + + + +
    + + +
  • + OWASP: + +Cross Site Scripting Prevention Cheat Sheet. +
  • +
  • + Wikipedia: Cross-site scripting. +
  • +
  • + OWASP: + Cross Site Scripting (XSS). +
  • +
    +
    diff --git a/rust/ql/src/queries/security/CWE-079/XSS.ql b/rust/ql/src/queries/security/CWE-079/XSS.ql new file mode 100644 index 00000000000..3c43f5043c7 --- /dev/null +++ b/rust/ql/src/queries/security/CWE-079/XSS.ql @@ -0,0 +1,42 @@ +/** + * @name Cross-site scripting + * @description Writing user input directly to a webpage + * allows for a cross-site scripting vulnerability. + * @kind path-problem + * @problem.severity error + * @security-severity 6.1 + * @precision high + * @id rust/xss + * @tags security + * external/cwe/cwe-079 + * external/cwe/cwe-116 + */ + +import rust +import codeql.rust.dataflow.DataFlow +import codeql.rust.dataflow.TaintTracking +import codeql.rust.security.XssExtensions + +/** + * A taint configuration for tainted data that reaches an XSS sink. + */ +module XssConfig implements DataFlow::ConfigSig { + import Xss + + predicate isSource(DataFlow::Node node) { node instanceof Source } + + predicate isSink(DataFlow::Node node) { node instanceof Sink } + + predicate isBarrier(DataFlow::Node barrier) { barrier instanceof Barrier } + + predicate observeDiffInformedIncrementalMode() { any() } +} + +module XssFlow = TaintTracking::Global; + +import XssFlow::PathGraph + +from XssFlow::PathNode sourceNode, XssFlow::PathNode sinkNode +where XssFlow::flowPath(sourceNode, sinkNode) +select sinkNode.getNode(), sourceNode, sinkNode, "Cross-site scripting vulnerability due to a $@.", + sourceNode.getNode(), "user-provided value" diff --git a/rust/ql/src/queries/security/CWE-079/XSSBad.rs b/rust/ql/src/queries/security/CWE-079/XSSBad.rs new file mode 100644 index 00000000000..a8f08e0de7a --- /dev/null +++ b/rust/ql/src/queries/security/CWE-079/XSSBad.rs @@ -0,0 +1,21 @@ +use actix_web::{web, HttpResponse, Result}; + +// BAD: User input is directly included in HTML response without sanitization +async fn vulnerable_handler(path: web::Path) -> impl Responder { + let user_input = path.into_inner(); + + let html = format!( + r#" + + + Welcome + +

    Hello, {}!

    + + + "#, + user_input + ); + + Html::new(html) // Unsafe: User input included directly in the response +} diff --git a/rust/ql/src/queries/security/CWE-079/XSSGood.rs b/rust/ql/src/queries/security/CWE-079/XSSGood.rs new file mode 100644 index 00000000000..de62691f79c --- /dev/null +++ b/rust/ql/src/queries/security/CWE-079/XSSGood.rs @@ -0,0 +1,21 @@ +use actix_web::{web, HttpResponse, Result}; + +// GOOD: Manual HTML encoding using an `html_escape::encode_text` function +async fn safe_handler_with_encoding(path: web::Path) -> impl Responder { + let user_input = path.into_inner(); + let escaped_input = html_escape::encode_text(&user_input); + let html = format!( + r#" + + + Welcome + +

    Hello, {}!

    + + + "#, + escaped_input + ); + + Html::new(html) // Safe: user input is HTML-encoded +} diff --git a/rust/ql/src/queries/security/CWE-295/DisabledCertificateCheck.qhelp b/rust/ql/src/queries/security/CWE-295/DisabledCertificateCheck.qhelp new file mode 100644 index 00000000000..1824f6e78df --- /dev/null +++ b/rust/ql/src/queries/security/CWE-295/DisabledCertificateCheck.qhelp @@ -0,0 +1,42 @@ + + + + +

    +The danger_accept_invalid_certs option on TLS connectors and HTTP clients controls whether certificate verification is performed. If this option is set to true, the client will accept any certificate, making it susceptible to man-in-the-middle attacks. +

    +

    +Similarly, the danger_accept_invalid_hostnames option controls whether hostname verification is performed. If this option is set to true, the client will accept any valid certificate regardless of the site that certificate is for, again making it susceptible to man-in-the-middle attacks. +

    +
    + + +

    +Do not set danger_accept_invalid_certs or danger_accept_invalid_hostnames to true, except in controlled environments such as tests. In production, always ensure certificate and hostname verification is enabled to prevent security risks. +

    +
    + + +

    +The following code snippet shows a function that creates an HTTP client with certificate verification disabled: +

    + +

    +In production code, always configure clients to verify certificates: +

    + +
    + +
  • +Rust native-tls crate: TlsConnectorBuilder. +
  • +
  • +Rust reqwest crate: ClientBuilder. +
  • +
  • +SSL.com: Browsers and Certificate Validation. +
  • +
    +
    diff --git a/rust/ql/src/queries/security/CWE-295/DisabledCertificateCheck.ql b/rust/ql/src/queries/security/CWE-295/DisabledCertificateCheck.ql new file mode 100644 index 00000000000..ae22a3c9d2c --- /dev/null +++ b/rust/ql/src/queries/security/CWE-295/DisabledCertificateCheck.ql @@ -0,0 +1,47 @@ +/** + * @name Disabled TLS certificate check + * @description An application that disables TLS certificate checking is more vulnerable to + * man-in-the-middle attacks. + * @kind path-problem + * @problem.severity warning + * @security-severity 7.5 + * @precision high + * @id rust/disabled-certificate-check + * @tags security + * external/cwe/cwe-295 + */ + +import rust +import codeql.rust.dataflow.DataFlow +import codeql.rust.dataflow.TaintTracking +import codeql.rust.security.DisabledCertificateCheckExtensions +import codeql.rust.Concepts + +/** + * A taint configuration for disabled TLS certificate checks. + */ +module DisabledCertificateCheckConfig implements DataFlow::ConfigSig { + import DisabledCertificateCheckExtensions + + predicate isSource(DataFlow::Node node) { + // the constant `true` + node.asExpr().(BooleanLiteralExpr).getTextValue() = "true" + or + // a value controlled by a potential attacker + node instanceof ActiveThreatModelSource + } + + predicate isSink(DataFlow::Node node) { node instanceof Sink } + + predicate observeDiffInformedIncrementalMode() { any() } +} + +module DisabledCertificateCheckFlow = TaintTracking::Global; + +import DisabledCertificateCheckFlow::PathGraph + +from + DisabledCertificateCheckFlow::PathNode sourceNode, DisabledCertificateCheckFlow::PathNode sinkNode +where DisabledCertificateCheckFlow::flowPath(sourceNode, sinkNode) +select sinkNode.getNode(), sourceNode, sinkNode, + "Disabling TLS certificate validation can expose the application to man-in-the-middle attacks." diff --git a/rust/ql/src/queries/security/CWE-295/DisabledCertificateCheckBad.rs b/rust/ql/src/queries/security/CWE-295/DisabledCertificateCheckBad.rs new file mode 100644 index 00000000000..9e4102c64cc --- /dev/null +++ b/rust/ql/src/queries/security/CWE-295/DisabledCertificateCheckBad.rs @@ -0,0 +1,6 @@ +// BAD: Disabling certificate validation in Rust + +let _client = reqwest::Client::builder() + .danger_accept_invalid_certs(true) // disables certificate validation + .build() + .unwrap(); diff --git a/rust/ql/src/queries/security/CWE-295/DisabledCertificateCheckGood.rs b/rust/ql/src/queries/security/CWE-295/DisabledCertificateCheckGood.rs new file mode 100644 index 00000000000..c726a756c38 --- /dev/null +++ b/rust/ql/src/queries/security/CWE-295/DisabledCertificateCheckGood.rs @@ -0,0 +1,10 @@ +// GOOD: Certificate validation is enabled (default) + +let _client = reqwest::Client::builder() + .danger_accept_invalid_certs(false) // certificate validation enabled explicitly + .build() + .unwrap(); + +let _client = native_tls::TlsConnector::builder() // certificate validation enabled by default + .build() + .unwrap(); diff --git a/rust/ql/src/queries/security/CWE-614/InsecureCookie.ql b/rust/ql/src/queries/security/CWE-614/InsecureCookie.ql index 61996adaf05..4de9cc98948 100644 --- a/rust/ql/src/queries/security/CWE-614/InsecureCookie.ql +++ b/rust/ql/src/queries/security/CWE-614/InsecureCookie.ql @@ -88,5 +88,5 @@ import InsecureCookieFlow::PathGraph from InsecureCookieFlow::PathNode sourceNode, InsecureCookieFlow::PathNode sinkNode where InsecureCookieFlow::flowPath(sourceNode, sinkNode) and - not PartitionedCookieFlow::flow(_, sinkNode.getNode()) + not PartitionedCookieFlow::flowTo(sinkNode.getNode()) select sinkNode.getNode(), sourceNode, sinkNode, "Cookie attribute 'Secure' is not set to true." diff --git a/rust/ql/src/queries/security/CWE-696/BadCtorInitialization.ql b/rust/ql/src/queries/security/CWE-696/BadCtorInitialization.ql index f0f7cdf0d98..7a206856adf 100644 --- a/rust/ql/src/queries/security/CWE-696/BadCtorInitialization.ql +++ b/rust/ql/src/queries/security/CWE-696/BadCtorInitialization.ql @@ -30,10 +30,8 @@ class CtorAttr extends Attr { /** * A call into the Rust standard library, that is, a sink for this query. */ -class StdCall extends Expr { - StdCall() { - this.(CallExprBase).getStaticTarget().getCanonicalPath().matches(["std::%", " enclosed call edgesFwd(_, pred) and - pred = succ.(CallExprBase).getEnclosingCallable() + pred = succ.(Call).getEnclosingCallable() or // [forwards reachable] call -> target callable edgesFwd(_, pred) and - pred.(CallExprBase).getStaticTarget() = succ + pred.(Call).getStaticTarget() = succ } /** diff --git a/rust/ql/src/queries/security/CWE-798/HardcodedCryptographicValue.ql b/rust/ql/src/queries/security/CWE-798/HardcodedCryptographicValue.ql index f5a43c5419c..c8e6c9932cb 100644 --- a/rust/ql/src/queries/security/CWE-798/HardcodedCryptographicValue.ql +++ b/rust/ql/src/queries/security/CWE-798/HardcodedCryptographicValue.ql @@ -39,6 +39,11 @@ module HardcodedCryptographicValueConfig implements DataFlow::ConfigSig { // case like `[0, 0, 0, 0]`) isSource(node) } + + predicate isBarrierOut(DataFlow::Node node) { + // make sinks barriers so that we only report the closest instance + isSink(node) + } } module HardcodedCryptographicValueFlow = TaintTracking::Global; diff --git a/rust/ql/src/queries/security/CWE-825/AccessInvalidPointer.ql b/rust/ql/src/queries/security/CWE-825/AccessInvalidPointer.ql index 5177e1fb0e0..3c10e2b197a 100644 --- a/rust/ql/src/queries/security/CWE-825/AccessInvalidPointer.ql +++ b/rust/ql/src/queries/security/CWE-825/AccessInvalidPointer.ql @@ -22,11 +22,13 @@ import AccessInvalidPointerFlow::PathGraph * A data flow configuration for accesses to invalid pointers. */ module AccessInvalidPointerConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node node) { node instanceof AccessInvalidPointer::Source } + import AccessInvalidPointer - predicate isSink(DataFlow::Node node) { node instanceof AccessInvalidPointer::Sink } + predicate isSource(DataFlow::Node node) { node instanceof Source } - predicate isBarrier(DataFlow::Node barrier) { barrier instanceof AccessInvalidPointer::Barrier } + predicate isSink(DataFlow::Node node) { node instanceof Sink } + + predicate isBarrier(DataFlow::Node barrier) { barrier instanceof Barrier } predicate isBarrierOut(DataFlow::Node node) { // make sinks barriers so that we only report the closest instance diff --git a/rust/ql/src/queries/summary/Stats.qll b/rust/ql/src/queries/summary/Stats.qll index 7cd4fd67e24..d06389fb6a7 100644 --- a/rust/ql/src/queries/summary/Stats.qll +++ b/rust/ql/src/queries/summary/Stats.qll @@ -22,6 +22,7 @@ private import codeql.rust.security.AccessInvalidPointerExtensions private import codeql.rust.security.CleartextLoggingExtensions private import codeql.rust.security.CleartextStorageDatabaseExtensions private import codeql.rust.security.CleartextTransmissionExtensions +private import codeql.rust.security.DisabledCertificateCheckExtensions private import codeql.rust.security.HardcodedCryptographicValueExtensions private import codeql.rust.security.InsecureCookieExtensions private import codeql.rust.security.LogInjectionExtensions @@ -31,6 +32,7 @@ private import codeql.rust.security.TaintedPathExtensions private import codeql.rust.security.UncontrolledAllocationSizeExtensions private import codeql.rust.security.UseOfHttpExtensions private import codeql.rust.security.WeakSensitiveDataHashingExtensions +private import codeql.rust.security.XssExtensions /** * Gets a count of the total number of lines of code in the database. diff --git a/rust/ql/src/queries/telemetry/DatabaseQuality.qll b/rust/ql/src/queries/telemetry/DatabaseQuality.qll index 64adf9826dc..5f50cdd4c4f 100644 --- a/rust/ql/src/queries/telemetry/DatabaseQuality.qll +++ b/rust/ql/src/queries/telemetry/DatabaseQuality.qll @@ -1,12 +1,14 @@ /** * Provides database quality statistics that are reported by * `rust/telemetry/extractor-information` - * and perhaps warned about by `rust/diagnostics/database-quality`. + * and perhaps warned about by `rust/diagnostic/database-quality`. */ import rust import codeql.util.ReportStats +import codeql.rust.elements.internal.CallExprImpl::Impl as CallExprImpl import codeql.rust.internal.TypeInference as TypeInference +import codeql.rust.internal.Type /** * A file that is included in the quality statistics. @@ -19,25 +21,26 @@ private class RelevantFile extends File { } module CallTargetStats implements StatsSig { - int getNumberOfOk() { - result = - count(CallExprBase c | c.getFile() instanceof RelevantFile and exists(c.getStaticTarget())) + /** + * A call-like expression that is relevant for call target statistics. + * + * Note that this also includes tuple struct instantiations and tuple + * variant instantiations. + */ + private class RelevantInvocationExpr extends InvocationExpr { + RelevantInvocationExpr() { + this.getFile() instanceof RelevantFile and + not this instanceof CallExprImpl::DynamicCallExpr and + not this = any(Operation o | not o.isOverloaded(_, _, _)) and + not this = any(DerefExpr de | TypeInference::inferType(de.getExpr()) instanceof PtrType) + } } - private predicate isLambdaCall(CallExpr call) { - exists(Expr receiver | receiver = call.getFunction() | - // All calls to complex expressions and local variable accesses are lambda calls - receiver instanceof PathExpr implies receiver = any(Variable v).getAnAccess() - ) - } + int getNumberOfOk() { result = count(RelevantInvocationExpr e | exists(e.getResolvedTarget())) } - additional predicate isNotOkCall(CallExprBase c) { - c.getFile() instanceof RelevantFile and - not exists(c.getStaticTarget()) and - not isLambdaCall(c) - } + additional predicate isNotOkCall(RelevantInvocationExpr e) { not exists(e.getResolvedTarget()) } - int getNumberOfNotOk() { result = count(CallExprBase c | isNotOkCall(c)) } + int getNumberOfNotOk() { result = count(RelevantInvocationExpr e | isNotOkCall(e)) } string getOkText() { result = "calls with call target" } diff --git a/rust/ql/src/utils/modelgenerator/CaptureContentSummaryModels.ql b/rust/ql/src/utils/modelgenerator/CaptureContentSummaryModels.ql index 9dd63e06ea7..38568b02ad4 100644 --- a/rust/ql/src/utils/modelgenerator/CaptureContentSummaryModels.ql +++ b/rust/ql/src/utils/modelgenerator/CaptureContentSummaryModels.ql @@ -1,5 +1,5 @@ /** - * @name Capture content based summary models. + * @name Capture content based summary models * @description Finds applicable content based summary models to be used by other queries. * @kind diagnostic * @id rust/utils/modelgenerator/contentbased-summary-models diff --git a/rust/ql/src/utils/modelgenerator/CaptureNeutralModels.ql b/rust/ql/src/utils/modelgenerator/CaptureNeutralModels.ql index 556d1624f39..aade0ea4037 100644 --- a/rust/ql/src/utils/modelgenerator/CaptureNeutralModels.ql +++ b/rust/ql/src/utils/modelgenerator/CaptureNeutralModels.ql @@ -1,5 +1,5 @@ /** - * @name Capture neutral models. + * @name Capture neutral models * @description Finds neutral models to be used by other queries. * @kind diagnostic * @id rust/utils/modelgenerator/neutral-models diff --git a/rust/ql/src/utils/modelgenerator/CaptureSinkModels.ql b/rust/ql/src/utils/modelgenerator/CaptureSinkModels.ql index 989637a867e..cbd15849b15 100644 --- a/rust/ql/src/utils/modelgenerator/CaptureSinkModels.ql +++ b/rust/ql/src/utils/modelgenerator/CaptureSinkModels.ql @@ -1,5 +1,5 @@ /** - * @name Capture sink models. + * @name Capture sink models * @description Finds public methods that act as sinks as they flow into a known sink. * @kind diagnostic * @id rust/utils/modelgenerator/sink-models diff --git a/rust/ql/src/utils/modelgenerator/CaptureSourceModels.ql b/rust/ql/src/utils/modelgenerator/CaptureSourceModels.ql index 2ffc4894b18..5403e2e3e50 100644 --- a/rust/ql/src/utils/modelgenerator/CaptureSourceModels.ql +++ b/rust/ql/src/utils/modelgenerator/CaptureSourceModels.ql @@ -1,5 +1,5 @@ /** - * @name Capture source models. + * @name Capture source models * @description Finds APIs that act as sources as they expose already known sources. * @kind diagnostic * @id rust/utils/modelgenerator/source-models diff --git a/rust/ql/src/utils/modelgenerator/CaptureSummaryModels.ql b/rust/ql/src/utils/modelgenerator/CaptureSummaryModels.ql index d0b3152c9be..48789e72231 100644 --- a/rust/ql/src/utils/modelgenerator/CaptureSummaryModels.ql +++ b/rust/ql/src/utils/modelgenerator/CaptureSummaryModels.ql @@ -1,5 +1,5 @@ /** - * @name Capture summary models. + * @name Capture summary models * @description Finds applicable summary models to be used by other queries. * @kind diagnostic * @id rust/utils/modelgenerator/summary-models diff --git a/rust/ql/src/utils/modelgenerator/internal/CaptureModels.qll b/rust/ql/src/utils/modelgenerator/internal/CaptureModels.qll index 420051f4ee1..9826f56795f 100644 --- a/rust/ql/src/utils/modelgenerator/internal/CaptureModels.qll +++ b/rust/ql/src/utils/modelgenerator/internal/CaptureModels.qll @@ -67,8 +67,9 @@ module ModelGeneratorCommonInput implements string parameterExactAccess(R::ParamBase p) { result = - "Argument[" + any(DataFlowImpl::ParameterPosition pos | p = pos.getParameterIn(_)).toString() + - "]" + "Argument[" + + any(DataFlowImpl::RustDataFlow::ParameterPosition pos | p = pos.getParameterIn(_)) + .toString() + "]" } string parameterApproximateAccess(R::ParamBase p) { result = parameterExactAccess(p) } @@ -78,12 +79,16 @@ module ModelGeneratorCommonInput implements } bindingset[c] - string paramReturnNodeAsApproximateOutput(QualifiedCallable c, DataFlowImpl::ParameterPosition pos) { + string paramReturnNodeAsApproximateOutput( + QualifiedCallable c, DataFlowImpl::RustDataFlow::ParameterPosition pos + ) { result = paramReturnNodeAsExactOutput(c, pos) } bindingset[c] - string paramReturnNodeAsExactOutput(QualifiedCallable c, DataFlowImpl::ParameterPosition pos) { + string paramReturnNodeAsExactOutput( + QualifiedCallable c, DataFlowImpl::RustDataFlow::ParameterPosition pos + ) { result = parameterExactAccess(c.getFunction().getParam(pos.getPosition())) or pos.isSelf() and result = qualifierString() diff --git a/rust/ql/test/extractor-tests/generated/.generated_tests.list b/rust/ql/test/extractor-tests/generated/.generated_tests.list index 879695fb758..a0f338af420 100644 --- a/rust/ql/test/extractor-tests/generated/.generated_tests.list +++ b/rust/ql/test/extractor-tests/generated/.generated_tests.list @@ -23,7 +23,7 @@ BinaryExpr/gen_binary_expr.rs 5ea68396dc2e3ff7fcaf5a5201636dd175dd45be36647b6ae0 BlockExpr/gen_block_expr.rs 17b06c726e304e0efcfde8e71afd9c657860312be554366894236125cb08719e 17b06c726e304e0efcfde8e71afd9c657860312be554366894236125cb08719e BoxPat/gen_box_pat.rs 1493e24b732370b577ade38c47db17fa157df19f5390606a67a6040e49b501c0 1493e24b732370b577ade38c47db17fa157df19f5390606a67a6040e49b501c0 BreakExpr/gen_break_expr.rs aacdf9df7fc51d19742b9e813835c0bd0913017e8d62765960e06b27d58b9031 aacdf9df7fc51d19742b9e813835c0bd0913017e8d62765960e06b27d58b9031 -CallExpr/gen_call_expr.rs 013a7c878996aefb25b94b68eebc4f0b1bb74ccd09e91c491980817a383e2401 013a7c878996aefb25b94b68eebc4f0b1bb74ccd09e91c491980817a383e2401 +CallExpr/gen_call_expr.rs 228705e9b0c46d34aa035da3c139a8c3e93fb144d3310592d5bad38ac97382c2 228705e9b0c46d34aa035da3c139a8c3e93fb144d3310592d5bad38ac97382c2 CastExpr/gen_cast_expr.rs c3892211fbae4fed7cb1f25ff1679fd79d2878bf0bf2bd4b7982af23d00129f5 c3892211fbae4fed7cb1f25ff1679fd79d2878bf0bf2bd4b7982af23d00129f5 ClosureExpr/gen_closure_expr.rs bd95408103b7f2084e526e6d35cf3319b2e9d7219aff4c80e4e6691180c549b4 bd95408103b7f2084e526e6d35cf3319b2e9d7219aff4c80e4e6691180c549b4 Comment/gen_comment.rs 1e1f9f43161a79c096c2056e8b7f5346385ab7addcdec68c2d53b383dd3debe6 1e1f9f43161a79c096c2056e8b7f5346385ab7addcdec68c2d53b383dd3debe6 @@ -80,7 +80,7 @@ MatchArmList/gen_match_arm_list.rs 6dcb92591c86771d2aeb762e4274d3e61a7d6c1a42da3 MatchExpr/gen_match_expr.rs 081c5d4c78cb71ccd13fb37a93d7f525267c51b179f44b5a22ca3297897002a0 081c5d4c78cb71ccd13fb37a93d7f525267c51b179f44b5a22ca3297897002a0 MatchGuard/gen_match_guard.rs f0e84a1f608c0361983c516a40216cea149620a36e0aed7ff39b0b7d77a9ab8a f0e84a1f608c0361983c516a40216cea149620a36e0aed7ff39b0b7d77a9ab8a Meta/gen_meta.rs 39172a1f7dd02fa3149e7a1fc1dc1f135aa87c84057ee721cd9b373517042b25 39172a1f7dd02fa3149e7a1fc1dc1f135aa87c84057ee721cd9b373517042b25 -MethodCallExpr/gen_method_call_expr.rs f2b4679eb1ec095981fe6bd656b632c22bf6bd0da133309da3f7ef5bd1ab4b5d f2b4679eb1ec095981fe6bd656b632c22bf6bd0da133309da3f7ef5bd1ab4b5d +MethodCallExpr/gen_method_call_expr.rs f696e63c5302f46dcac7bc2914fe899d029996d5064ffe8252cfa173a06f9dd3 f696e63c5302f46dcac7bc2914fe899d029996d5064ffe8252cfa173a06f9dd3 Module/gen_module.rs 815605a604fea1d9276684f8d6738a4e833eacad57ceeb27e2095fc450264fc1 815605a604fea1d9276684f8d6738a4e833eacad57ceeb27e2095fc450264fc1 Name/gen_name.rs 8a7fe65ee632a47d12eaa313e7248ac9210e5a381e9522499ca68f94c39e72c0 8a7fe65ee632a47d12eaa313e7248ac9210e5a381e9522499ca68f94c39e72c0 NameRef/gen_name_ref.rs c8c922e77a7d62b8272359ccdabbf7e15411f31ca85f15a3afdd94bec7ec64e7 c8c922e77a7d62b8272359ccdabbf7e15411f31ca85f15a3afdd94bec7ec64e7 @@ -129,8 +129,8 @@ Trait/gen_trait.rs bac694993e224f9c6dd86cfb28c54846ae1b3bae45a1e58d3149c88418448 TraitAlias/gen_trait_alias.rs 425d78a7cb87db7737ceaf713c9a62e0411537374d1bc58c5b1fb80cc25732c9 425d78a7cb87db7737ceaf713c9a62e0411537374d1bc58c5b1fb80cc25732c9 TryExpr/gen_try_expr.rs f60198181a423661f4ed1bf6f98d475f40ada190b7b5fc6af97aa5e45ca29a1e f60198181a423661f4ed1bf6f98d475f40ada190b7b5fc6af97aa5e45ca29a1e TupleExpr/gen_tuple_expr.rs 27e56846b3f08c37c8a345169c2a532b2023d231d46a5bdf586bbc6d8fb36a01 27e56846b3f08c37c8a345169c2a532b2023d231d46a5bdf586bbc6d8fb36a01 -TupleField/gen_tuple_field.rs 5d6b4f356af895541f975cc1fd90116fd047fe914c2049d47f61e4a43a8c2af4 5d6b4f356af895541f975cc1fd90116fd047fe914c2049d47f61e4a43a8c2af4 -TupleFieldList/gen_tuple_field_list.rs 42f0af8c391fb9e33fe09b791e0e719cadf5143b58764f8a5d38f8d9054daca7 42f0af8c391fb9e33fe09b791e0e719cadf5143b58764f8a5d38f8d9054daca7 +TupleField/gen_tuple_field.rs 20507753ddb979a33d0e568ae5ebe466f039e7ab7b8f2e6ce15b28b3e4450615 20507753ddb979a33d0e568ae5ebe466f039e7ab7b8f2e6ce15b28b3e4450615 +TupleFieldList/gen_tuple_field_list.rs 4702b92cfca9c4db9b84cb846c5d44569ad3f3e40cd07e9015d144152c684fd0 4702b92cfca9c4db9b84cb846c5d44569ad3f3e40cd07e9015d144152c684fd0 TuplePat/gen_tuple_pat.rs b1b0c9c5ff1b787f380644691c77807655a4f6441fc7431c90ecf78c54c26148 b1b0c9c5ff1b787f380644691c77807655a4f6441fc7431c90ecf78c54c26148 TupleStructPat/gen_tuple_struct_pat.rs 601ca8813272d15b4c8fd7402d0d28a42a62be82865eb5e86b985ad31464ca98 601ca8813272d15b4c8fd7402d0d28a42a62be82865eb5e86b985ad31464ca98 TupleTypeRepr/gen_tuple_type_repr.rs 64873a6a1cd5df6cd10165d7e9fa0399902b6bfbac086ef3a7ce83237b816879 64873a6a1cd5df6cd10165d7e9fa0399902b6bfbac086ef3a7ce83237b816879 diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected index 3aaaed00da2..16e6f165028 100644 --- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected @@ -1,21 +1,16 @@ instances -| gen_call_expr.rs:5:5:5:11 | foo(...) | -| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | -| gen_call_expr.rs:7:5:7:14 | ...(...) | -| gen_call_expr.rs:8:5:8:10 | foo(...) | +| gen_call_expr.rs:8:5:8:11 | foo(...) | +| gen_call_expr.rs:9:5:9:23 | foo::<...>(...) | +| gen_call_expr.rs:10:5:10:14 | ...(...) | +| gen_call_expr.rs:11:5:11:20 | ...::Some(...) | getArgList -| gen_call_expr.rs:5:5:5:11 | foo(...) | gen_call_expr.rs:5:8:5:11 | ArgList | -| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | gen_call_expr.rs:6:20:6:23 | ArgList | -| gen_call_expr.rs:7:5:7:14 | ...(...) | gen_call_expr.rs:7:11:7:14 | ArgList | -| gen_call_expr.rs:8:5:8:10 | foo(...) | gen_call_expr.rs:8:8:8:10 | ArgList | +| gen_call_expr.rs:8:5:8:11 | foo(...) | gen_call_expr.rs:8:8:8:11 | ArgList | +| gen_call_expr.rs:9:5:9:23 | foo::<...>(...) | gen_call_expr.rs:9:20:9:23 | ArgList | +| gen_call_expr.rs:10:5:10:14 | ...(...) | gen_call_expr.rs:10:11:10:14 | ArgList | +| gen_call_expr.rs:11:5:11:20 | ...::Some(...) | gen_call_expr.rs:11:17:11:20 | ArgList | getAttr -getArg -| gen_call_expr.rs:5:5:5:11 | foo(...) | 0 | gen_call_expr.rs:5:9:5:10 | 42 | -| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | 0 | gen_call_expr.rs:6:21:6:22 | 42 | -| gen_call_expr.rs:7:5:7:14 | ...(...) | 0 | gen_call_expr.rs:7:12:7:13 | 42 | -| gen_call_expr.rs:8:5:8:10 | foo(...) | 0 | gen_call_expr.rs:8:9:8:9 | 1 | getFunction -| gen_call_expr.rs:5:5:5:11 | foo(...) | gen_call_expr.rs:5:5:5:7 | foo | -| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | gen_call_expr.rs:6:5:6:19 | foo::<...> | -| gen_call_expr.rs:7:5:7:14 | ...(...) | gen_call_expr.rs:7:5:7:10 | foo[0] | -| gen_call_expr.rs:8:5:8:10 | foo(...) | gen_call_expr.rs:8:5:8:7 | foo | +| gen_call_expr.rs:8:5:8:11 | foo(...) | gen_call_expr.rs:8:5:8:7 | foo | +| gen_call_expr.rs:9:5:9:23 | foo::<...>(...) | gen_call_expr.rs:9:5:9:19 | foo::<...> | +| gen_call_expr.rs:10:5:10:14 | ...(...) | gen_call_expr.rs:10:5:10:10 | foo[0] | +| gen_call_expr.rs:11:5:11:20 | ...::Some(...) | gen_call_expr.rs:11:5:11:16 | ...::Some | diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql index e16ab837325..4d3b26f2f78 100644 --- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql @@ -12,10 +12,6 @@ query predicate getAttr(CallExpr x, int index, Attr getAttr) { toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) } -query predicate getArg(CallExpr x, int index, Expr getArg) { - toBeTested(x) and not x.isUnknown() and getArg = x.getArg(index) -} - query predicate getFunction(CallExpr x, Expr getFunction) { toBeTested(x) and not x.isUnknown() and getFunction = x.getFunction() } diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/gen_call_expr.rs b/rust/ql/test/extractor-tests/generated/CallExpr/gen_call_expr.rs index b2436cc0042..3ab2646ae37 100644 --- a/rust/ql/test/extractor-tests/generated/CallExpr/gen_call_expr.rs +++ b/rust/ql/test/extractor-tests/generated/CallExpr/gen_call_expr.rs @@ -1,9 +1,12 @@ // generated by codegen, do not edit fn test_call_expr() -> () { - // A function call expression. For example: + // NOTE: Consider using `Call` instead, as that excludes call expressions that are + // instantiations of tuple structs and tuple variants. + // + // A call expression. For example: foo(42); foo::(42); foo[0](42); - foo(1) = 4; + Option::Some(42); // tuple variant instantiation } diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.expected b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.expected index ba510853f06..e35d59d6588 100644 --- a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.expected +++ b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.expected @@ -9,4 +9,4 @@ getBody getName | gen_macro_def.rs:4:5:9:5 | MacroDef | gen_macro_def.rs:7:15:7:24 | vec_of_two | getVisibility -| gen_macro_def.rs:4:5:9:5 | MacroDef | gen_macro_def.rs:7:5:7:7 | Visibility | +| gen_macro_def.rs:4:5:9:5 | MacroDef | gen_macro_def.rs:7:5:7:7 | pub | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected index 0eedcc70b5d..34d44431de2 100644 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected @@ -1,18 +1,15 @@ instances -| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | -| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | +| gen_method_call_expr.rs:9:5:9:13 | x.foo(...) | +| gen_method_call_expr.rs:10:5:10:25 | x.foo(...) | getArgList -| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | gen_method_call_expr.rs:5:10:5:13 | ArgList | -| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | gen_method_call_expr.rs:6:22:6:25 | ArgList | +| gen_method_call_expr.rs:9:5:9:13 | x.foo(...) | gen_method_call_expr.rs:9:10:9:13 | ArgList | +| gen_method_call_expr.rs:10:5:10:25 | x.foo(...) | gen_method_call_expr.rs:10:22:10:25 | ArgList | getAttr -getArg -| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | 0 | gen_method_call_expr.rs:5:11:5:12 | 42 | -| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | 0 | gen_method_call_expr.rs:6:23:6:24 | 42 | getGenericArgList -| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | gen_method_call_expr.rs:6:10:6:21 | <...> | +| gen_method_call_expr.rs:10:5:10:25 | x.foo(...) | gen_method_call_expr.rs:10:10:10:21 | <...> | getIdentifier -| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | gen_method_call_expr.rs:5:7:5:9 | foo | -| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | gen_method_call_expr.rs:6:7:6:9 | foo | +| gen_method_call_expr.rs:9:5:9:13 | x.foo(...) | gen_method_call_expr.rs:9:7:9:9 | foo | +| gen_method_call_expr.rs:10:5:10:25 | x.foo(...) | gen_method_call_expr.rs:10:7:10:9 | foo | getReceiver -| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | gen_method_call_expr.rs:5:5:5:5 | x | -| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | gen_method_call_expr.rs:6:5:6:5 | x | +| gen_method_call_expr.rs:9:5:9:13 | x.foo(...) | gen_method_call_expr.rs:9:5:9:5 | x | +| gen_method_call_expr.rs:10:5:10:25 | x.foo(...) | gen_method_call_expr.rs:10:5:10:5 | x | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql index d1b6d5a1304..8ecc14ee820 100644 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql @@ -12,10 +12,6 @@ query predicate getAttr(MethodCallExpr x, int index, Attr getAttr) { toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) } -query predicate getArg(MethodCallExpr x, int index, Expr getArg) { - toBeTested(x) and not x.isUnknown() and getArg = x.getArg(index) -} - query predicate getGenericArgList(MethodCallExpr x, GenericArgList getGenericArgList) { toBeTested(x) and not x.isUnknown() and getGenericArgList = x.getGenericArgList() } diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/gen_method_call_expr.rs b/rust/ql/test/extractor-tests/generated/MethodCallExpr/gen_method_call_expr.rs index f8bf728d257..5b4f22e8efc 100644 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/gen_method_call_expr.rs +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/gen_method_call_expr.rs @@ -1,6 +1,10 @@ // generated by codegen, do not edit fn test_method_call_expr() -> () { + // NOTE: Consider using `MethodCall` instead, as that also includes calls to methods using + // call syntax (such as `Foo::method(x)`), operation syntax (such as `x + y`), and + // indexing syntax (such as `x[y]`). + // // A method call expression. For example: x.foo(42); x.foo::(42); diff --git a/rust/ql/test/extractor-tests/generated/Module/Module.expected b/rust/ql/test/extractor-tests/generated/Module/Module.expected index d0259df5ee8..a22ef831d9f 100644 --- a/rust/ql/test/extractor-tests/generated/Module/Module.expected +++ b/rust/ql/test/extractor-tests/generated/Module/Module.expected @@ -11,4 +11,4 @@ getName | gen_module.rs:5:1:7:1 | mod bar | gen_module.rs:5:5:5:7 | bar | | lib.rs:1:1:1:19 | mod gen_module | lib.rs:1:9:1:18 | gen_module | getVisibility -| lib.rs:1:1:1:19 | mod gen_module | lib.rs:1:1:1:3 | Visibility | +| lib.rs:1:1:1:19 | mod gen_module | lib.rs:1:1:1:3 | pub | diff --git a/rust/ql/test/extractor-tests/generated/StructField/StructField.expected b/rust/ql/test/extractor-tests/generated/StructField/StructField.expected index 3b5d0d7b71c..285d3530c66 100644 --- a/rust/ql/test/extractor-tests/generated/StructField/StructField.expected +++ b/rust/ql/test/extractor-tests/generated/StructField/StructField.expected @@ -1,9 +1,9 @@ instances -| gen_struct_field.rs:7:16:7:21 | StructField | isUnsafe: | no | +| gen_struct_field.rs:7:16:7:21 | x: i32 | isUnsafe: | no | getAttr getDefault getName -| gen_struct_field.rs:7:16:7:21 | StructField | gen_struct_field.rs:7:16:7:16 | x | +| gen_struct_field.rs:7:16:7:21 | x: i32 | gen_struct_field.rs:7:16:7:16 | x | getTypeRepr -| gen_struct_field.rs:7:16:7:21 | StructField | gen_struct_field.rs:7:19:7:21 | i32 | +| gen_struct_field.rs:7:16:7:21 | x: i32 | gen_struct_field.rs:7:19:7:21 | i32 | getVisibility diff --git a/rust/ql/test/extractor-tests/generated/StructFieldList/StructFieldList.expected b/rust/ql/test/extractor-tests/generated/StructFieldList/StructFieldList.expected index 847bfd3c937..3e9fe67dd29 100644 --- a/rust/ql/test/extractor-tests/generated/StructFieldList/StructFieldList.expected +++ b/rust/ql/test/extractor-tests/generated/StructFieldList/StructFieldList.expected @@ -1,5 +1,5 @@ instances | gen_struct_field_list.rs:7:14:7:31 | StructFieldList | getField -| gen_struct_field_list.rs:7:14:7:31 | StructFieldList | 0 | gen_struct_field_list.rs:7:16:7:21 | StructField | -| gen_struct_field_list.rs:7:14:7:31 | StructFieldList | 1 | gen_struct_field_list.rs:7:24:7:29 | StructField | +| gen_struct_field_list.rs:7:14:7:31 | StructFieldList | 0 | gen_struct_field_list.rs:7:16:7:21 | x: i32 | +| gen_struct_field_list.rs:7:14:7:31 | StructFieldList | 1 | gen_struct_field_list.rs:7:24:7:29 | y: i32 | diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait.expected index e0f91737d5e..9e8d41cb5ff 100644 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait.expected +++ b/rust/ql/test/extractor-tests/generated/Trait/Trait.expected @@ -13,6 +13,6 @@ getName | gen_trait.rs:10:1:10:57 | trait Foo | gen_trait.rs:10:11:10:13 | Foo | getTypeBoundList getVisibility -| gen_trait.rs:10:1:10:57 | trait Foo | gen_trait.rs:10:1:10:3 | Visibility | +| gen_trait.rs:10:1:10:57 | trait Foo | gen_trait.rs:10:1:10:3 | pub | getWhereClause | gen_trait.rs:10:1:10:57 | trait Foo | gen_trait.rs:10:32:10:54 | WhereClause | diff --git a/rust/ql/test/extractor-tests/generated/TupleField/gen_tuple_field.rs b/rust/ql/test/extractor-tests/generated/TupleField/gen_tuple_field.rs index 96fe3582e40..e7a28dd5939 100644 --- a/rust/ql/test/extractor-tests/generated/TupleField/gen_tuple_field.rs +++ b/rust/ql/test/extractor-tests/generated/TupleField/gen_tuple_field.rs @@ -1,7 +1,7 @@ // generated by codegen, do not edit fn test_tuple_field() -> () { - // A field in a tuple struct or tuple enum variant. + // A field in a tuple struct or tuple variant. // // For example: struct S(i32, String); diff --git a/rust/ql/test/extractor-tests/generated/TupleFieldList/gen_tuple_field_list.rs b/rust/ql/test/extractor-tests/generated/TupleFieldList/gen_tuple_field_list.rs index 26f955c4add..d010d73c207 100644 --- a/rust/ql/test/extractor-tests/generated/TupleFieldList/gen_tuple_field_list.rs +++ b/rust/ql/test/extractor-tests/generated/TupleFieldList/gen_tuple_field_list.rs @@ -1,7 +1,7 @@ // generated by codegen, do not edit fn test_tuple_field_list() -> () { - // A list of fields in a tuple struct or tuple enum variant. + // A list of fields in a tuple struct or tuple variant. // // For example: struct S(i32, String); diff --git a/rust/ql/test/extractor-tests/generated/Visibility/Visibility.expected b/rust/ql/test/extractor-tests/generated/Visibility/Visibility.expected index 4bc7fefe4c1..2d032d6eee4 100644 --- a/rust/ql/test/extractor-tests/generated/Visibility/Visibility.expected +++ b/rust/ql/test/extractor-tests/generated/Visibility/Visibility.expected @@ -1,4 +1,4 @@ instances -| gen_visibility.rs:7:7:7:9 | Visibility | -| lib.rs:1:1:1:3 | Visibility | +| gen_visibility.rs:7:7:7:9 | pub | +| lib.rs:1:1:1:3 | pub | getPath diff --git a/rust/ql/test/extractor-tests/macro-expansion/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/extractor-tests/macro-expansion/CONSISTENCY/PathResolutionConsistency.expected index 141cfc355b9..f5a5b9b7b19 100644 --- a/rust/ql/test/extractor-tests/macro-expansion/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/extractor-tests/macro-expansion/CONSISTENCY/PathResolutionConsistency.expected @@ -1,2 +1,2 @@ -multipleCallTargets +multipleResolvedTargets | proc_macro.rs:44:27:44:30 | ...::to_tokens(...) | diff --git a/rust/ql/test/extractor-tests/macro-expansion/PrintAst.expected b/rust/ql/test/extractor-tests/macro-expansion/PrintAst.expected index 1a0ded6950d..e50dc4d5274 100644 --- a/rust/ql/test/extractor-tests/macro-expansion/PrintAst.expected +++ b/rust/ql/test/extractor-tests/macro-expansion/PrintAst.expected @@ -146,10 +146,10 @@ lib.rs: # 1| [SourceFile] SourceFile # 1| getItem(0): [Module] mod call # 1| getName(): [Name] call -# 1| getVisibility(): [Visibility] Visibility +# 1| getVisibility(): [Visibility] pub # 2| getItem(1): [Module] mod macro_expansion # 2| getName(): [Name] macro_expansion -# 2| getVisibility(): [Visibility] Visibility +# 2| getVisibility(): [Visibility] pub macro_expansion.rs: # 1| [SourceFile] SourceFile # 1| getItem(0): [Use] use proc_macro::{...} @@ -223,7 +223,7 @@ macro_expansion.rs: # 11| getSegment(): [PathSegment] inner_1 # 11| getIdentifier(): [NameRef] inner_1 # 4| getName(): [Name] foo -# 4| getVisibility(): [Visibility] Visibility +# 4| getVisibility(): [Visibility] pub # 4| getItem(1): [Function] fn foo_new # 4| getParamList(): [ParamList] ParamList # 4| getFunctionBody(): [BlockExpr] { ... } @@ -271,7 +271,7 @@ macro_expansion.rs: # 11| getSegment(): [PathSegment] inner_1 # 11| getIdentifier(): [NameRef] inner_1 # 4| getName(): [Name] foo_new -# 4| getVisibility(): [Visibility] Visibility +# 4| getVisibility(): [Visibility] pub # 3| getAttr(0): [Attr] Attr # 3| getMeta(): [Meta] Meta # 3| getPath(): [Path] add_one @@ -286,13 +286,13 @@ macro_expansion.rs: # 16| getFunctionBody(): [BlockExpr] { ... } # 16| getStmtList(): [StmtList] StmtList # 16| getName(): [Name] bar_0 -# 16| getVisibility(): [Visibility] Visibility +# 16| getVisibility(): [Visibility] pub # 16| getItem(1): [Function] fn bar_0_new # 16| getParamList(): [ParamList] ParamList # 16| getFunctionBody(): [BlockExpr] { ... } # 16| getStmtList(): [StmtList] StmtList # 16| getName(): [Name] bar_0_new -# 16| getVisibility(): [Visibility] Visibility +# 16| getVisibility(): [Visibility] pub # 15| getAttr(0): [Attr] Attr # 15| getMeta(): [Meta] Meta # 15| getPath(): [Path] add_one @@ -305,13 +305,13 @@ macro_expansion.rs: # 16| getFunctionBody(): [BlockExpr] { ... } # 16| getStmtList(): [StmtList] StmtList # 16| getName(): [Name] bar_1 -# 16| getVisibility(): [Visibility] Visibility +# 16| getVisibility(): [Visibility] pub # 16| getItem(1): [Function] fn bar_1_new # 16| getParamList(): [ParamList] ParamList # 16| getFunctionBody(): [BlockExpr] { ... } # 16| getStmtList(): [StmtList] StmtList # 16| getName(): [Name] bar_1_new -# 16| getVisibility(): [Visibility] Visibility +# 16| getVisibility(): [Visibility] pub # 15| getAttr(0): [Attr] Attr # 15| getMeta(): [Meta] Meta # 15| getPath(): [Path] add_one @@ -340,7 +340,7 @@ macro_expansion.rs: # 22| getTokenTree(): [TokenTree] TokenTree # 28| getItem(5): [Struct] struct S # 28| getName(): [Name] S -# 28| getVisibility(): [Visibility] Visibility +# 28| getVisibility(): [Visibility] pub # 30| getItem(6): [Impl] impl S { ... } # 30| getAssocItemList(): [AssocItemList] AssocItemList # 31| getAssocItem(0): [Function] (item with attribute macro expansion) @@ -392,7 +392,7 @@ macro_expansion.rs: # 31| getSegment(): [PathSegment] _print # 31| getIdentifier(): [NameRef] _print # 32| getName(): [Name] bzz_0 -# 32| getVisibility(): [Visibility] Visibility +# 32| getVisibility(): [Visibility] pub # 32| getItem(1): [Function] fn bzz_1 # 32| getParamList(): [ParamList] ParamList # 32| getFunctionBody(): [BlockExpr] { ... } @@ -440,7 +440,7 @@ macro_expansion.rs: # 31| getSegment(): [PathSegment] _print # 31| getIdentifier(): [NameRef] _print # 32| getName(): [Name] bzz_1 -# 32| getVisibility(): [Visibility] Visibility +# 32| getVisibility(): [Visibility] pub # 32| getItem(2): [Function] fn bzz_2 # 32| getParamList(): [ParamList] ParamList # 32| getFunctionBody(): [BlockExpr] { ... } @@ -488,7 +488,7 @@ macro_expansion.rs: # 31| getSegment(): [PathSegment] _print # 31| getIdentifier(): [NameRef] _print # 32| getName(): [Name] bzz_2 -# 32| getVisibility(): [Visibility] Visibility +# 32| getVisibility(): [Visibility] pub # 31| getAttr(0): [Attr] Attr # 31| getMeta(): [Meta] Meta # 31| getPath(): [Path] repeat @@ -515,7 +515,7 @@ macro_expansion.rs: # 44| getFunctionBody(): [BlockExpr] { ... } # 44| getStmtList(): [StmtList] StmtList # 44| getName(): [Name] x -# 44| getVisibility(): [Visibility] Visibility +# 44| getVisibility(): [Visibility] pub # 43| getSelfTy(): [PathTypeRepr] S # 43| getPath(): [Path] S # 43| getSegment(): [PathSegment] S @@ -660,7 +660,7 @@ macro_expansion.rs: # 71| getSegment(): [PathSegment] i32 # 71| getIdentifier(): [NameRef] i32 # 72| getTailExpr(): [CastExpr] a as ... -# 72| getExpr(): [PathExpr,VariableAccess] a +# 72| getExpr(): [VariableAccess] a # 72| getPath(): [Path] a # 72| getSegment(): [PathSegment] a # 72| getIdentifier(): [NameRef] a @@ -700,7 +700,7 @@ macro_expansion.rs: # 76| getIdentifier(): [NameRef] i32 # 78| getItem(16): [Struct] struct MyStruct # 78| getFieldList(): [StructFieldList] StructFieldList -# 79| getField(0): [StructField] StructField +# 79| getField(0): [StructField] field: ... # 79| getName(): [Name] field # 79| getTypeRepr(): [MacroTypeRepr] MacroTypeRepr # 79| getMacroCall(): [MacroCall] my_int!... @@ -738,7 +738,7 @@ macro_expansion.rs: # 84| getFunctionBody(): [BlockExpr] { ... } # 84| getStmtList(): [StmtList] StmtList # 84| getTailExpr(): [MatchExpr] match self { ... } -# 83| getScrutinee(): [PathExpr,VariableAccess] self +# 83| getScrutinee(): [VariableAccess] self # 83| getPath(): [Path] self # 83| getSegment(): [PathSegment] self # 83| getIdentifier(): [NameRef] self @@ -751,7 +751,7 @@ macro_expansion.rs: # 85| getArgList(): [ArgList] ArgList # 83| getArg(0): [StringLiteralExpr] "field" # 85| getArg(1): [RefExpr] &field -# 85| getExpr(): [PathExpr,VariableAccess] field +# 85| getExpr(): [VariableAccess] field # 85| getPath(): [Path] field # 85| getSegment(): [PathSegment] field # 85| getIdentifier(): [NameRef] field @@ -760,7 +760,7 @@ macro_expansion.rs: # 83| getArgList(): [ArgList] ArgList # 83| getArg(0): [StringLiteralExpr] "MyDerive" # 83| getIdentifier(): [NameRef] debug_struct -# 83| getReceiver(): [PathExpr,VariableAccess] f +# 83| getReceiver(): [VariableAccess] f # 83| getPath(): [Path] f # 83| getSegment(): [PathSegment] f # 83| getIdentifier(): [NameRef] f @@ -809,7 +809,7 @@ macro_expansion.rs: # 83| getIdentifier(): [NameRef] derive # 83| getTokenTree(): [TokenTree] TokenTree # 84| getFieldList(): [StructFieldList] StructFieldList -# 85| getField(0): [StructField] StructField +# 85| getField(0): [StructField] field: usize # 85| getName(): [Name] field # 85| getTypeRepr(): [PathTypeRepr] usize # 85| getPath(): [Path] usize @@ -836,11 +836,11 @@ macro_expansion.rs: # 89| getStmtList(): [StmtList] StmtList # 89| getTailExpr(): [MatchExpr] match ... { ... } # 88| getScrutinee(): [TupleExpr] TupleExpr -# 88| getField(0): [PathExpr,VariableAccess] self +# 88| getField(0): [VariableAccess] self # 88| getPath(): [Path] self # 88| getSegment(): [PathSegment] self # 88| getIdentifier(): [NameRef] self -# 88| getField(1): [PathExpr,VariableAccess] other +# 88| getField(1): [VariableAccess] other # 88| getPath(): [Path] other # 88| getSegment(): [PathSegment] other # 88| getIdentifier(): [NameRef] other @@ -990,13 +990,13 @@ macro_expansion.rs: # 98| getTokenTree(): [TokenTree] TokenTree # 99| getName(): [Name] MyDeriveUnion # 99| getStructFieldList(): [StructFieldList] StructFieldList -# 100| getField(0): [StructField] StructField +# 100| getField(0): [StructField] field1: usize # 100| getName(): [Name] field1 # 100| getTypeRepr(): [PathTypeRepr] usize # 100| getPath(): [Path] usize # 100| getSegment(): [PathSegment] usize # 100| getIdentifier(): [NameRef] usize -# 101| getField(1): [StructField] StructField +# 101| getField(1): [StructField] field2: f64 # 101| getName(): [Name] field2 # 101| getTypeRepr(): [PathTypeRepr] f64 # 101| getPath(): [Path] f64 @@ -1076,7 +1076,7 @@ proc_macro.rs: # 6| getMacroCallExpansion(): [MatchExpr] match ... { ... } # 6| getScrutinee(): [CallExpr] ...::parse::<...>(...) # 6| getArgList(): [ArgList] ArgList -# 6| getArg(0): [PathExpr,VariableAccess] attr +# 6| getArg(0): [VariableAccess] attr # 6| getPath(): [Path] attr # 6| getSegment(): [PathSegment] attr # 6| getIdentifier(): [NameRef] attr @@ -1098,7 +1098,7 @@ proc_macro.rs: # 6| getIdentifier(): [NameRef] parse # 6| getMatchArmList(): [MatchArmList] MatchArmList # 6| getArm(0): [MatchArm] ... => data -# 6| getExpr(): [PathExpr,VariableAccess] data +# 6| getExpr(): [VariableAccess] data # 6| getPath(): [Path] data # 6| getSegment(): [PathSegment] data # 6| getIdentifier(): [NameRef] data @@ -1124,7 +1124,7 @@ proc_macro.rs: # 6| getArg(0): [MethodCallExpr] err.to_compile_error() # 6| getArgList(): [ArgList] ArgList # 6| getIdentifier(): [NameRef] to_compile_error -# 6| getReceiver(): [PathExpr,VariableAccess] err +# 6| getReceiver(): [VariableAccess] err # 6| getPath(): [Path] err # 6| getSegment(): [PathSegment] err # 6| getIdentifier(): [NameRef] err @@ -1168,7 +1168,7 @@ proc_macro.rs: # 7| getMacroCallExpansion(): [MatchExpr] match ... { ... } # 7| getScrutinee(): [CallExpr] ...::parse::<...>(...) # 7| getArgList(): [ArgList] ArgList -# 7| getArg(0): [PathExpr,VariableAccess] item +# 7| getArg(0): [VariableAccess] item # 7| getPath(): [Path] item # 7| getSegment(): [PathSegment] item # 7| getIdentifier(): [NameRef] item @@ -1190,7 +1190,7 @@ proc_macro.rs: # 7| getIdentifier(): [NameRef] parse # 7| getMatchArmList(): [MatchArmList] MatchArmList # 7| getArm(0): [MatchArm] ... => data -# 7| getExpr(): [PathExpr,VariableAccess] data +# 7| getExpr(): [VariableAccess] data # 7| getPath(): [Path] data # 7| getSegment(): [PathSegment] data # 7| getIdentifier(): [NameRef] data @@ -1216,7 +1216,7 @@ proc_macro.rs: # 7| getArg(0): [MethodCallExpr] err.to_compile_error() # 7| getArgList(): [ArgList] ArgList # 7| getIdentifier(): [NameRef] to_compile_error -# 7| getReceiver(): [PathExpr,VariableAccess] err +# 7| getReceiver(): [VariableAccess] err # 7| getPath(): [Path] err # 7| getSegment(): [PathSegment] err # 7| getIdentifier(): [NameRef] err @@ -1273,7 +1273,7 @@ proc_macro.rs: # 10| getInitializer(): [MethodCallExpr] ast.clone() # 10| getArgList(): [ArgList] ArgList # 10| getIdentifier(): [NameRef] clone -# 10| getReceiver(): [PathExpr,VariableAccess] ast +# 10| getReceiver(): [VariableAccess] ast # 10| getPath(): [Path] ast # 10| getSegment(): [PathSegment] ast # 10| getIdentifier(): [NameRef] ast @@ -1283,7 +1283,7 @@ proc_macro.rs: # 11| getExpr(): [AssignmentExpr] ... = ... # 11| getLhs(): [FieldExpr] ... .ident # 11| getContainer(): [FieldExpr] new_ast.sig -# 11| getContainer(): [PathExpr,VariableAccess] new_ast +# 11| getContainer(): [VariableAccess] new_ast # 11| getPath(): [Path] new_ast # 11| getSegment(): [PathSegment] new_ast # 11| getIdentifier(): [NameRef] new_ast @@ -1320,14 +1320,14 @@ proc_macro.rs: # 11| getArg(0): [FormatArgsArg] FormatArgsArg # 11| getExpr(): [FieldExpr] ... .ident # 11| getContainer(): [FieldExpr] ast.sig -# 11| getContainer(): [PathExpr,VariableAccess] ast +# 11| getContainer(): [VariableAccess] ast # 11| getPath(): [Path] ast # 11| getSegment(): [PathSegment] ast # 11| getIdentifier(): [NameRef] ast # 11| getIdentifier(): [NameRef] sig # 11| getIdentifier(): [NameRef] ident # 11| getArg(1): [FormatArgsArg] FormatArgsArg -# 11| getExpr(): [PathExpr,VariableAccess] i +# 11| getExpr(): [VariableAccess] i # 11| getPath(): [Path] i # 11| getSegment(): [PathSegment] i # 11| getIdentifier(): [NameRef] i @@ -1359,7 +1359,7 @@ proc_macro.rs: # 11| getIdentifier(): [NameRef] span # 11| getReceiver(): [FieldExpr] ... .ident # 11| getContainer(): [FieldExpr] ast.sig -# 11| getContainer(): [PathExpr,VariableAccess] ast +# 11| getContainer(): [VariableAccess] ast # 11| getPath(): [Path] ast # 11| getSegment(): [PathSegment] ast # 11| getIdentifier(): [NameRef] ast @@ -1375,14 +1375,14 @@ proc_macro.rs: # 11| getIdentifier(): [NameRef] Ident # 11| getSegment(): [PathSegment] new # 11| getIdentifier(): [NameRef] new -# 12| getTailExpr(): [PathExpr,VariableAccess] new_ast +# 12| getTailExpr(): [VariableAccess] new_ast # 12| getPath(): [Path] new_ast # 12| getSegment(): [PathSegment] new_ast # 12| getIdentifier(): [NameRef] new_ast # 9| getIdentifier(): [NameRef] map # 8| getReceiver(): [ParenExpr] (...) # 8| getExpr(): [RangeExpr] 0..number -# 8| getEnd(): [PathExpr,VariableAccess] number +# 8| getEnd(): [VariableAccess] number # 8| getPath(): [Path] number # 8| getSegment(): [PathSegment] number # 8| getIdentifier(): [NameRef] number @@ -1614,7 +1614,7 @@ proc_macro.rs: # 16| getInitializer(): [MethodCallExpr] items.quote_into_iter() # 15| getArgList(): [ArgList] ArgList # 15| getIdentifier(): [NameRef] quote_into_iter -# 16| getReceiver(): [PathExpr,VariableAccess] items +# 16| getReceiver(): [VariableAccess] items # 16| getPath(): [Path] items # 16| getSegment(): [PathSegment] items # 16| getIdentifier(): [NameRef] items @@ -1625,11 +1625,11 @@ proc_macro.rs: # 15| getName(): [Name] i # 15| getStatement(1): [LetStmt] let ... = ... # 15| getInitializer(): [BinaryExpr] ... | ... -# 15| getLhs(): [PathExpr,VariableAccess] has_iter +# 15| getLhs(): [VariableAccess] has_iter # 15| getPath(): [Path] has_iter # 15| getSegment(): [PathSegment] has_iter # 15| getIdentifier(): [NameRef] has_iter -# 15| getRhs(): [PathExpr,VariableAccess] i +# 15| getRhs(): [VariableAccess] i # 15| getPath(): [Path] i # 15| getSegment(): [PathSegment] i # 15| getIdentifier(): [NameRef] i @@ -1646,7 +1646,7 @@ proc_macro.rs: # 16| getTokenTree(): [TokenTree] TokenTree # 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr # 15| getStatement(3): [LetStmt] let _ = has_iter -# 15| getInitializer(): [PathExpr,VariableAccess] has_iter +# 15| getInitializer(): [VariableAccess] has_iter # 15| getPath(): [Path] has_iter # 15| getSegment(): [PathSegment] has_iter # 15| getIdentifier(): [NameRef] has_iter @@ -1764,15 +1764,15 @@ proc_macro.rs: # 16| getScrutinee(): [MethodCallExpr] items.next() # 15| getArgList(): [ArgList] ArgList # 15| getIdentifier(): [NameRef] next -# 16| getReceiver(): [PathExpr,VariableAccess] items +# 16| getReceiver(): [VariableAccess] items # 16| getPath(): [Path] items # 16| getSegment(): [PathSegment] items # 16| getIdentifier(): [NameRef] items # 15| getMatchArmList(): [MatchArmList] MatchArmList # 15| getArm(0): [MatchArm] ... => ... -# 15| getExpr(): [CallExpr] ...::RepInterp(...) +# 15| getExpr(): [TupleStructExpr] ...::RepInterp(...) # 15| getArgList(): [ArgList] ArgList -# 15| getArg(0): [PathExpr] _x +# 15| getArg(0): [VariableAccess] _x # 15| getPath(): [Path] _x # 15| getSegment(): [PathSegment] _x # 15| getIdentifier(): [NameRef] _x @@ -1876,12 +1876,12 @@ proc_macro.rs: # 16| getExpr(): [CallExpr] ...::to_tokens(...) # 16| getArgList(): [ArgList] ArgList # 16| getArg(0): [RefExpr] &items -# 16| getExpr(): [PathExpr,VariableAccess] items +# 16| getExpr(): [VariableAccess] items # 16| getPath(): [Path] items # 16| getSegment(): [PathSegment] items # 16| getIdentifier(): [NameRef] items # 15| getArg(1): [RefExpr] &mut _s -# 15| getExpr(): [PathExpr] _s +# 15| getExpr(): [VariableAccess] _s # 15| getPath(): [Path] _s # 15| getSegment(): [PathSegment] _s # 15| getIdentifier(): [NameRef] _s @@ -1993,7 +1993,7 @@ proc_macro.rs: # 15| getIdentifier(): [NameRef] quote_token_with_context # 16| getTokenTree(): [TokenTree] TokenTree # 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr -# 15| getTailExpr(): [PathExpr] _s +# 15| getTailExpr(): [VariableAccess] _s # 15| getPath(): [Path] _s # 15| getSegment(): [PathSegment] _s # 15| getIdentifier(): [NameRef] _s @@ -2003,7 +2003,7 @@ proc_macro.rs: # 5| getPath(): [Path] TokenStream # 5| getSegment(): [PathSegment] TokenStream # 5| getIdentifier(): [NameRef] TokenStream -# 5| getVisibility(): [Visibility] Visibility +# 5| getVisibility(): [Visibility] pub # 20| getItem(3): [Function] fn add_one # 21| getParamList(): [ParamList] ParamList # 21| getParam(0): [Param] ...: TokenStream @@ -2040,7 +2040,7 @@ proc_macro.rs: # 22| getMacroCallExpansion(): [MatchExpr] match ... { ... } # 22| getScrutinee(): [CallExpr] ...::parse::<...>(...) # 22| getArgList(): [ArgList] ArgList -# 22| getArg(0): [PathExpr,VariableAccess] item +# 22| getArg(0): [VariableAccess] item # 22| getPath(): [Path] item # 22| getSegment(): [PathSegment] item # 22| getIdentifier(): [NameRef] item @@ -2062,7 +2062,7 @@ proc_macro.rs: # 22| getIdentifier(): [NameRef] parse # 22| getMatchArmList(): [MatchArmList] MatchArmList # 22| getArm(0): [MatchArm] ... => data -# 22| getExpr(): [PathExpr,VariableAccess] data +# 22| getExpr(): [VariableAccess] data # 22| getPath(): [Path] data # 22| getSegment(): [PathSegment] data # 22| getIdentifier(): [NameRef] data @@ -2088,7 +2088,7 @@ proc_macro.rs: # 22| getArg(0): [MethodCallExpr] err.to_compile_error() # 22| getArgList(): [ArgList] ArgList # 22| getIdentifier(): [NameRef] to_compile_error -# 22| getReceiver(): [PathExpr,VariableAccess] err +# 22| getReceiver(): [VariableAccess] err # 22| getPath(): [Path] err # 22| getSegment(): [PathSegment] err # 22| getIdentifier(): [NameRef] err @@ -2123,7 +2123,7 @@ proc_macro.rs: # 23| getInitializer(): [MethodCallExpr] ast.clone() # 23| getArgList(): [ArgList] ArgList # 23| getIdentifier(): [NameRef] clone -# 23| getReceiver(): [PathExpr,VariableAccess] ast +# 23| getReceiver(): [VariableAccess] ast # 23| getPath(): [Path] ast # 23| getSegment(): [PathSegment] ast # 23| getIdentifier(): [NameRef] ast @@ -2133,7 +2133,7 @@ proc_macro.rs: # 24| getExpr(): [AssignmentExpr] ... = ... # 24| getLhs(): [FieldExpr] ... .ident # 24| getContainer(): [FieldExpr] new_ast.sig -# 24| getContainer(): [PathExpr,VariableAccess] new_ast +# 24| getContainer(): [VariableAccess] new_ast # 24| getPath(): [Path] new_ast # 24| getSegment(): [PathSegment] new_ast # 24| getIdentifier(): [NameRef] new_ast @@ -2170,7 +2170,7 @@ proc_macro.rs: # 24| getArg(0): [FormatArgsArg] FormatArgsArg # 24| getExpr(): [FieldExpr] ... .ident # 24| getContainer(): [FieldExpr] ast.sig -# 24| getContainer(): [PathExpr,VariableAccess] ast +# 24| getContainer(): [VariableAccess] ast # 24| getPath(): [Path] ast # 24| getSegment(): [PathSegment] ast # 24| getIdentifier(): [NameRef] ast @@ -2203,7 +2203,7 @@ proc_macro.rs: # 24| getIdentifier(): [NameRef] span # 24| getReceiver(): [FieldExpr] ... .ident # 24| getContainer(): [FieldExpr] ast.sig -# 24| getContainer(): [PathExpr,VariableAccess] ast +# 24| getContainer(): [VariableAccess] ast # 24| getPath(): [Path] ast # 24| getSegment(): [PathSegment] ast # 24| getIdentifier(): [NameRef] ast @@ -2317,12 +2317,12 @@ proc_macro.rs: # 26| getExpr(): [CallExpr] ...::to_tokens(...) # 26| getArgList(): [ArgList] ArgList # 26| getArg(0): [RefExpr] &ast -# 26| getExpr(): [PathExpr,VariableAccess] ast +# 26| getExpr(): [VariableAccess] ast # 26| getPath(): [Path] ast # 26| getSegment(): [PathSegment] ast # 26| getIdentifier(): [NameRef] ast # 25| getArg(1): [RefExpr] &mut _s -# 25| getExpr(): [PathExpr] _s +# 25| getExpr(): [VariableAccess] _s # 25| getPath(): [Path] _s # 25| getSegment(): [PathSegment] _s # 25| getIdentifier(): [NameRef] _s @@ -2362,12 +2362,12 @@ proc_macro.rs: # 27| getExpr(): [CallExpr] ...::to_tokens(...) # 27| getArgList(): [ArgList] ArgList # 27| getArg(0): [RefExpr] &new_ast -# 27| getExpr(): [PathExpr,VariableAccess] new_ast +# 27| getExpr(): [VariableAccess] new_ast # 27| getPath(): [Path] new_ast # 27| getSegment(): [PathSegment] new_ast # 27| getIdentifier(): [NameRef] new_ast # 25| getArg(1): [RefExpr] &mut _s -# 25| getExpr(): [PathExpr] _s +# 25| getExpr(): [VariableAccess] _s # 25| getPath(): [Path] _s # 25| getSegment(): [PathSegment] _s # 25| getIdentifier(): [NameRef] _s @@ -2424,7 +2424,7 @@ proc_macro.rs: # 25| getIdentifier(): [NameRef] quote_token_with_context # 27| getTokenTree(): [TokenTree] TokenTree # 25| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr -# 25| getTailExpr(): [PathExpr] _s +# 25| getTailExpr(): [VariableAccess] _s # 25| getPath(): [Path] _s # 25| getSegment(): [PathSegment] _s # 25| getIdentifier(): [NameRef] _s @@ -2434,7 +2434,7 @@ proc_macro.rs: # 21| getPath(): [Path] TokenStream # 21| getSegment(): [PathSegment] TokenStream # 21| getIdentifier(): [NameRef] TokenStream -# 21| getVisibility(): [Visibility] Visibility +# 21| getVisibility(): [Visibility] pub # 31| getItem(4): [Function] fn erase # 32| getParamList(): [ParamList] ParamList # 32| getParam(0): [Param] ...: TokenStream @@ -2473,7 +2473,7 @@ proc_macro.rs: # 32| getPath(): [Path] TokenStream # 32| getSegment(): [PathSegment] TokenStream # 32| getIdentifier(): [NameRef] TokenStream -# 32| getVisibility(): [Visibility] Visibility +# 32| getVisibility(): [Visibility] pub # 36| getItem(5): [Function] fn my_trait_derive # 37| getParamList(): [ParamList] ParamList # 37| getParam(0): [Param] ...: TokenStream @@ -2504,7 +2504,7 @@ proc_macro.rs: # 38| getMacroCallExpansion(): [MatchExpr] match ... { ... } # 38| getScrutinee(): [CallExpr] ...::parse::<...>(...) # 38| getArgList(): [ArgList] ArgList -# 38| getArg(0): [PathExpr,VariableAccess] input +# 38| getArg(0): [VariableAccess] input # 38| getPath(): [Path] input # 38| getSegment(): [PathSegment] input # 38| getIdentifier(): [NameRef] input @@ -2526,7 +2526,7 @@ proc_macro.rs: # 38| getIdentifier(): [NameRef] parse # 38| getMatchArmList(): [MatchArmList] MatchArmList # 38| getArm(0): [MatchArm] ... => data -# 38| getExpr(): [PathExpr,VariableAccess] data +# 38| getExpr(): [VariableAccess] data # 38| getPath(): [Path] data # 38| getSegment(): [PathSegment] data # 38| getIdentifier(): [NameRef] data @@ -2552,7 +2552,7 @@ proc_macro.rs: # 38| getArg(0): [MethodCallExpr] err.to_compile_error() # 38| getArgList(): [ArgList] ArgList # 38| getIdentifier(): [NameRef] to_compile_error -# 38| getReceiver(): [PathExpr,VariableAccess] err +# 38| getReceiver(): [VariableAccess] err # 38| getPath(): [Path] err # 38| getSegment(): [PathSegment] err # 38| getIdentifier(): [NameRef] err @@ -2586,7 +2586,7 @@ proc_macro.rs: # 39| getStatement(1): [LetStmt] let ... = ... # 39| getInitializer(): [RefExpr] &... # 39| getExpr(): [FieldExpr] ast.ident -# 39| getContainer(): [PathExpr,VariableAccess] ast +# 39| getContainer(): [VariableAccess] ast # 39| getPath(): [Path] ast # 39| getSegment(): [PathSegment] ast # 39| getIdentifier(): [NameRef] ast @@ -2623,7 +2623,7 @@ proc_macro.rs: # 40| getTokenTree(): [TokenTree] TokenTree # 40| getMacroCallExpansion(): [FormatArgsExpr] FormatArgsExpr # 40| getArg(0): [FormatArgsArg] FormatArgsArg -# 40| getExpr(): [PathExpr,VariableAccess] name +# 40| getExpr(): [VariableAccess] name # 40| getPath(): [Path] name # 40| getSegment(): [PathSegment] name # 40| getIdentifier(): [NameRef] name @@ -2652,7 +2652,7 @@ proc_macro.rs: # 40| getArg(1): [MethodCallExpr] name.span() # 40| getArgList(): [ArgList] ArgList # 40| getIdentifier(): [NameRef] span -# 40| getReceiver(): [PathExpr,VariableAccess] name +# 40| getReceiver(): [VariableAccess] name # 40| getPath(): [Path] name # 40| getSegment(): [PathSegment] name # 40| getIdentifier(): [NameRef] name @@ -2776,7 +2776,7 @@ proc_macro.rs: # 42| getExpr(): [CallExpr] ...::push_ident(...) # 42| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -2812,12 +2812,12 @@ proc_macro.rs: # 42| getExpr(): [CallExpr] ...::to_tokens(...) # 42| getArgList(): [ArgList] ArgList # 42| getArg(0): [RefExpr] &const_ident -# 42| getExpr(): [PathExpr,VariableAccess] const_ident +# 42| getExpr(): [VariableAccess] const_ident # 42| getPath(): [Path] const_ident # 42| getSegment(): [PathSegment] const_ident # 42| getIdentifier(): [NameRef] const_ident # 41| getArg(1): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -2867,7 +2867,7 @@ proc_macro.rs: # 41| getExpr(): [CallExpr] ...::push_colon(...) # 41| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -2906,7 +2906,7 @@ proc_macro.rs: # 42| getExpr(): [CallExpr] ...::push_ident(...) # 42| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -2952,7 +2952,7 @@ proc_macro.rs: # 41| getExpr(): [CallExpr] ...::push_eq(...) # 41| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -2991,7 +2991,7 @@ proc_macro.rs: # 42| getExpr(): [CallExpr] ...::parse(...) # 42| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3037,7 +3037,7 @@ proc_macro.rs: # 41| getExpr(): [CallExpr] ...::push_semi(...) # 41| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3076,7 +3076,7 @@ proc_macro.rs: # 44| getExpr(): [CallExpr] ...::push_ident(...) # 44| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3122,7 +3122,7 @@ proc_macro.rs: # 44| getExpr(): [CallExpr] ...::push_ident(...) # 44| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3168,7 +3168,7 @@ proc_macro.rs: # 44| getExpr(): [CallExpr] ...::push_ident(...) # 44| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3204,12 +3204,12 @@ proc_macro.rs: # 44| getExpr(): [CallExpr] ...::to_tokens(...) # 44| getArgList(): [ArgList] ArgList # 44| getArg(0): [RefExpr] &name -# 44| getExpr(): [PathExpr,VariableAccess] name +# 44| getExpr(): [VariableAccess] name # 44| getPath(): [Path] name # 44| getSegment(): [PathSegment] name # 44| getIdentifier(): [NameRef] name # 41| getArg(1): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3259,7 +3259,7 @@ proc_macro.rs: # 45| getExpr(): [CallExpr] ...::push_group(...) # 45| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3384,7 +3384,7 @@ proc_macro.rs: # 45| getExpr(): [CallExpr] ...::push_ident(...) # 45| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3430,7 +3430,7 @@ proc_macro.rs: # 45| getExpr(): [CallExpr] ...::push_ident(...) # 45| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3476,7 +3476,7 @@ proc_macro.rs: # 41| getExpr(): [CallExpr] ...::push_group(...) # 41| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3552,7 +3552,7 @@ proc_macro.rs: # 41| getExpr(): [CallExpr] ...::push_rarrow(...) # 41| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3591,7 +3591,7 @@ proc_macro.rs: # 45| getExpr(): [CallExpr] ...::push_ident(...) # 45| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3637,7 +3637,7 @@ proc_macro.rs: # 46| getExpr(): [CallExpr] ...::push_group(...) # 46| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3687,12 +3687,12 @@ proc_macro.rs: # 46| getExpr(): [CallExpr] ...::to_tokens(...) # 46| getArgList(): [ArgList] ArgList # 46| getArg(0): [RefExpr] &const_ident -# 46| getExpr(): [PathExpr,VariableAccess] const_ident +# 46| getExpr(): [VariableAccess] const_ident # 46| getPath(): [Path] const_ident # 46| getSegment(): [PathSegment] const_ident # 46| getIdentifier(): [NameRef] const_ident # 41| getArg(1): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3706,7 +3706,7 @@ proc_macro.rs: # 41| getIdentifier(): [NameRef] ToTokens # 41| getSegment(): [PathSegment] to_tokens # 41| getIdentifier(): [NameRef] to_tokens -# 41| getTailExpr(): [PathExpr] _s +# 41| getTailExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3752,7 +3752,7 @@ proc_macro.rs: # 41| getIdentifier(): [NameRef] quote_token_with_context # 45| getTokenTree(): [TokenTree] TokenTree # 41| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr -# 41| getTailExpr(): [PathExpr] _s +# 41| getTailExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3798,7 +3798,7 @@ proc_macro.rs: # 41| getIdentifier(): [NameRef] quote_token_with_context # 44| getTokenTree(): [TokenTree] TokenTree # 41| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr -# 41| getTailExpr(): [PathExpr] _s +# 41| getTailExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3808,4 +3808,4 @@ proc_macro.rs: # 37| getPath(): [Path] TokenStream # 37| getSegment(): [PathSegment] TokenStream # 37| getIdentifier(): [NameRef] TokenStream -# 37| getVisibility(): [Visibility] Visibility +# 37| getVisibility(): [Visibility] pub diff --git a/rust/ql/test/extractor-tests/macro-in-library/PrintAst.expected b/rust/ql/test/extractor-tests/macro-in-library/PrintAst.expected index 30dbc24103b..aa0fc42f81d 100644 --- a/rust/ql/test/extractor-tests/macro-in-library/PrintAst.expected +++ b/rust/ql/test/extractor-tests/macro-in-library/PrintAst.expected @@ -2,7 +2,7 @@ lib.rs: # 1| [SourceFile] SourceFile # 1| getItem(0): [Module] mod macro_in_library # 1| getName(): [Name] macro_in_library -# 1| getVisibility(): [Visibility] Visibility +# 1| getVisibility(): [Visibility] pub macro_in_library.rs: # 1| [SourceFile] SourceFile # 1| getItem(0): [MacroCall] (item with attribute macro expansion) @@ -10,15 +10,15 @@ macro_in_library.rs: # 2| getItem(0): [Function] fn foo # 2| getParamList(): [ParamList] ParamList # 2| getName(): [Name] foo -# 2| getVisibility(): [Visibility] Visibility +# 2| getVisibility(): [Visibility] pub # 2| getItem(1): [Function] fn foo_new # 2| getParamList(): [ParamList] ParamList # 2| getName(): [Name] foo_new -# 2| getVisibility(): [Visibility] Visibility +# 2| getVisibility(): [Visibility] pub # 4| getItem(1): [Function] fn bar # 4| getParamList(): [ParamList] ParamList # 4| getName(): [Name] bar -# 4| getVisibility(): [Visibility] Visibility +# 4| getVisibility(): [Visibility] pub proc_macro.rs: # 1| [SourceFile] SourceFile # 1| getItem(0): [Use] use ...::TokenStream @@ -60,4 +60,4 @@ proc_macro.rs: # 5| getPath(): [Path] TokenStream # 5| getSegment(): [PathSegment] TokenStream # 5| getIdentifier(): [NameRef] TokenStream -# 5| getVisibility(): [Visibility] Visibility +# 5| getVisibility(): [Visibility] pub diff --git a/rust/ql/test/extractor-tests/utf8/ast.expected b/rust/ql/test/extractor-tests/utf8/ast.expected index 7fe2a9bd4ee..a5f91da6158 100644 --- a/rust/ql/test/extractor-tests/utf8/ast.expected +++ b/rust/ql/test/extractor-tests/utf8/ast.expected @@ -1,4 +1,4 @@ -| lib.rs:1:1:1:3 | Visibility | +| lib.rs:1:1:1:3 | pub | | lib.rs:1:1:1:25 | SourceFile | | lib.rs:1:1:1:25 | mod utf8_identifiers | | lib.rs:1:9:1:24 | utf8_identifiers | @@ -17,12 +17,12 @@ | utf8_identifiers.rs:6:8:6:8 | X | | utf8_identifiers.rs:6:10:8:1 | StructFieldList | | utf8_identifiers.rs:7:5:7:5 | \u03b4 | -| utf8_identifiers.rs:7:5:7:13 | StructField | +| utf8_identifiers.rs:7:5:7:13 | \u03b4: usize | | utf8_identifiers.rs:7:9:7:13 | usize | | utf8_identifiers.rs:7:9:7:13 | usize | | utf8_identifiers.rs:7:9:7:13 | usize | | utf8_identifiers.rs:7:9:7:13 | usize | -| utf8_identifiers.rs:10:1:10:3 | Visibility | +| utf8_identifiers.rs:10:1:10:3 | pub | | utf8_identifiers.rs:10:1:12:1 | fn main | | utf8_identifiers.rs:10:8:10:11 | main | | utf8_identifiers.rs:10:12:10:13 | ParamList | diff --git a/rust/ql/test/library-tests/controlflow/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/controlflow/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 00000000000..97a93c16a2d --- /dev/null +++ b/rust/ql/test/library-tests/controlflow/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,4 @@ +multipleResolvedTargets +| test.rs:419:34:419:35 | * ... | +| test.rs:420:26:420:27 | * ... | +| test.rs:597:9:597:10 | * ... | diff --git a/rust/ql/test/library-tests/dataflow/barrier/inline-flow.ql b/rust/ql/test/library-tests/dataflow/barrier/inline-flow.ql index e399ea0e5d7..5dcb7ee70a9 100644 --- a/rust/ql/test/library-tests/dataflow/barrier/inline-flow.ql +++ b/rust/ql/test/library-tests/dataflow/barrier/inline-flow.ql @@ -5,8 +5,8 @@ import rust import utils.test.InlineFlowTest import DefaultFlowTest -import ValueFlow::PathGraph +import TaintFlow::PathGraph -from ValueFlow::PathNode source, ValueFlow::PathNode sink -where ValueFlow::flowPath(source, sink) +from TaintFlow::PathNode source, TaintFlow::PathNode sink +where TaintFlow::flowPath(source, sink) select sink, source, sink, "$@", source, source.toString() diff --git a/rust/ql/test/library-tests/dataflow/collections/Cargo.lock b/rust/ql/test/library-tests/dataflow/collections/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/collections/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/library-tests/dataflow/collections/inline-flow.expected b/rust/ql/test/library-tests/dataflow/collections/inline-flow.expected new file mode 100644 index 00000000000..fdd3a25a347 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/collections/inline-flow.expected @@ -0,0 +1,254 @@ +models +| 1 | Summary: <& as core::ops::deref::Deref>::deref; Argument[self].Reference; ReturnValue; value | +| 2 | Summary: <_ as core::ops::arith::AddAssign>::add_assign; Argument[0].Reference; Argument[self].Reference; taint | +| 3 | Summary: <_ as core::ops::arith::AddAssign>::add_assign; Argument[0]; Argument[self].Reference; taint | +| 4 | Summary: <_ as core::ops::index::Index>::index; Argument[self].Reference.Element; ReturnValue.Reference; value | +edges +| main.rs:15:13:15:13 | s | main.rs:16:20:16:20 | s | provenance | | +| main.rs:15:17:15:25 | source(...) | main.rs:15:13:15:13 | s | provenance | | +| main.rs:16:13:16:15 | arr [element] | main.rs:17:14:17:16 | arr [element] | provenance | | +| main.rs:16:13:16:15 | arr [element] | main.rs:18:15:18:17 | arr [element] | provenance | | +| main.rs:16:19:16:24 | [s; 5] [element] | main.rs:16:13:16:15 | arr [element] | provenance | | +| main.rs:16:20:16:20 | s | main.rs:16:19:16:24 | [s; 5] [element] | provenance | | +| main.rs:17:14:17:16 | arr [element] | main.rs:17:14:17:19 | arr[2] | provenance | MaD:4 | +| main.rs:18:15:18:17 | arr [element] | main.rs:18:15:18:26 | arr.index(...) [&ref] | provenance | MaD:4 | +| main.rs:18:15:18:26 | arr.index(...) [&ref] | main.rs:18:14:18:26 | * ... | provenance | MaD:1 | +| main.rs:20:13:20:19 | mut arr | main.rs:21:14:21:16 | arr | provenance | | +| main.rs:20:13:20:19 | mut arr | main.rs:22:15:22:17 | arr | provenance | | +| main.rs:20:23:20:33 | source(...) | main.rs:20:13:20:19 | mut arr | provenance | | +| main.rs:21:14:21:16 | arr | main.rs:21:14:21:19 | arr[0] | provenance | MaD:4 | +| main.rs:22:15:22:17 | arr | main.rs:22:15:22:26 | arr.index(...) [&ref] | provenance | MaD:4 | +| main.rs:22:15:22:26 | arr.index(...) [&ref] | main.rs:22:14:22:26 | * ... | provenance | MaD:1 | +| main.rs:24:13:24:13 | s | main.rs:25:20:25:20 | s | provenance | | +| main.rs:24:17:24:25 | source(...) | main.rs:24:13:24:13 | s | provenance | | +| main.rs:25:13:25:15 | arr [element] | main.rs:26:18:26:20 | arr [element] | provenance | | +| main.rs:25:19:25:21 | [...] [element] | main.rs:25:13:25:15 | arr [element] | provenance | | +| main.rs:25:20:25:20 | s | main.rs:25:19:25:21 | [...] [element] | provenance | | +| main.rs:26:13:26:13 | x | main.rs:27:18:27:18 | x | provenance | | +| main.rs:26:18:26:20 | arr [element] | main.rs:26:13:26:13 | x | provenance | | +| main.rs:30:13:30:15 | arr | main.rs:32:18:32:18 | x | provenance | | +| main.rs:30:19:30:29 | source(...) | main.rs:30:13:30:15 | arr | provenance | | +| main.rs:37:9:37:11 | [post] arr [element] | main.rs:38:14:38:16 | arr [element] | provenance | | +| main.rs:37:18:37:26 | source(...) | main.rs:37:9:37:11 | [post] arr [element] | provenance | | +| main.rs:38:14:38:16 | arr [element] | main.rs:38:14:38:19 | arr[0] | provenance | MaD:4 | +| main.rs:46:9:46:14 | [post] arr[0] | main.rs:47:14:47:16 | arr | provenance | | +| main.rs:46:19:46:27 | source(...) | main.rs:46:9:46:14 | [post] arr[0] | provenance | MaD:2 | +| main.rs:46:19:46:27 | source(...) | main.rs:46:9:46:14 | [post] arr[0] | provenance | MaD:3 | +| main.rs:47:14:47:16 | arr | main.rs:47:14:47:19 | arr[0] | provenance | MaD:4 | +| main.rs:63:18:63:22 | SelfParam [&ref, S] | main.rs:63:56:65:9 | { ... } [&ref, S] | provenance | | +| main.rs:76:34:76:44 | ...: Self [S] | main.rs:77:23:77:27 | other [S] | provenance | | +| main.rs:77:13:77:16 | [post] self [&ref, S] | main.rs:76:23:76:31 | SelfParam [Return] [&ref, S] | provenance | | +| main.rs:77:13:77:16 | [post] self [&ref, tuple.0] | main.rs:76:23:76:31 | SelfParam [Return] [&ref, tuple.0] | provenance | | +| main.rs:77:13:77:18 | [post] self.0 | main.rs:77:13:77:16 | [post] self [&ref, S] | provenance | | +| main.rs:77:13:77:18 | [post] self.0 | main.rs:77:13:77:16 | [post] self [&ref, tuple.0] | provenance | | +| main.rs:77:23:77:27 | other [S] | main.rs:77:23:77:29 | other.0 | provenance | | +| main.rs:77:23:77:29 | other.0 | main.rs:77:13:77:18 | [post] self.0 | provenance | MaD:2 | +| main.rs:77:23:77:29 | other.0 | main.rs:77:13:77:18 | [post] self.0 | provenance | MaD:3 | +| main.rs:82:13:82:13 | s | main.rs:83:19:83:19 | s | provenance | | +| main.rs:82:17:82:25 | source(...) | main.rs:82:13:82:13 | s | provenance | | +| main.rs:83:13:83:13 | s [S] | main.rs:84:14:84:14 | s [S] | provenance | | +| main.rs:83:13:83:13 | s [S] | main.rs:85:16:85:16 | s [S] | provenance | | +| main.rs:83:17:83:20 | S(...) [S] | main.rs:83:13:83:13 | s [S] | provenance | | +| main.rs:83:19:83:19 | s | main.rs:83:17:83:20 | S(...) [S] | provenance | | +| main.rs:84:14:84:14 | s [S] | main.rs:63:18:63:22 | SelfParam [&ref, S] | provenance | | +| main.rs:84:14:84:14 | s [S] | main.rs:84:14:84:17 | s[0] [S] | provenance | | +| main.rs:84:14:84:17 | s[0] [S] | main.rs:84:14:84:19 | ... .0 | provenance | | +| main.rs:85:15:85:25 | * ... [S] | main.rs:85:14:85:28 | ... .0 | provenance | | +| main.rs:85:16:85:16 | s [S] | main.rs:63:18:63:22 | SelfParam [&ref, S] | provenance | | +| main.rs:85:16:85:16 | s [S] | main.rs:85:16:85:25 | s.index(...) [&ref, S] | provenance | | +| main.rs:85:16:85:25 | s.index(...) [&ref, S] | main.rs:85:15:85:25 | * ... [S] | provenance | MaD:1 | +| main.rs:89:9:89:9 | [post] s [S] | main.rs:90:14:90:14 | s [S] | provenance | | +| main.rs:89:16:89:27 | S(...) [S] | main.rs:89:9:89:9 | [post] s [S] | provenance | | +| main.rs:89:18:89:26 | source(...) | main.rs:89:16:89:27 | S(...) [S] | provenance | | +| main.rs:90:14:90:14 | s [S] | main.rs:90:14:90:16 | s.0 | provenance | | +| main.rs:94:10:94:10 | [post] s [S] | main.rs:95:14:95:14 | s [S] | provenance | | +| main.rs:94:10:94:23 | [post] s.index_mut(...) [&ref, S] | main.rs:94:10:94:10 | [post] s [S] | provenance | | +| main.rs:94:27:94:38 | S(...) [S] | main.rs:94:10:94:23 | [post] s.index_mut(...) [&ref, S] | provenance | | +| main.rs:94:29:94:37 | source(...) | main.rs:94:27:94:38 | S(...) [S] | provenance | | +| main.rs:95:14:95:14 | s [S] | main.rs:95:14:95:16 | s.0 | provenance | | +| main.rs:99:9:99:9 | [post] s [S] | main.rs:100:14:100:14 | s [S] | provenance | | +| main.rs:99:9:99:9 | [post] s [tuple.0] | main.rs:100:14:100:14 | s [tuple.0] | provenance | | +| main.rs:99:9:99:12 | [post] s[0] [S] | main.rs:99:9:99:9 | [post] s [S] | provenance | | +| main.rs:99:9:99:12 | [post] s[0] [tuple.0] | main.rs:99:9:99:9 | [post] s [tuple.0] | provenance | | +| main.rs:99:17:99:28 | S(...) [S] | main.rs:76:34:76:44 | ...: Self [S] | provenance | | +| main.rs:99:17:99:28 | S(...) [S] | main.rs:99:9:99:12 | [post] s[0] [S] | provenance | MaD:2 | +| main.rs:99:17:99:28 | S(...) [S] | main.rs:99:9:99:12 | [post] s[0] [S] | provenance | MaD:3 | +| main.rs:99:17:99:28 | S(...) [S] | main.rs:99:9:99:12 | [post] s[0] [tuple.0] | provenance | MaD:2 | +| main.rs:99:17:99:28 | S(...) [S] | main.rs:99:9:99:12 | [post] s[0] [tuple.0] | provenance | MaD:3 | +| main.rs:99:19:99:27 | source(...) | main.rs:99:17:99:28 | S(...) [S] | provenance | | +| main.rs:100:14:100:14 | s [S] | main.rs:100:14:100:16 | s.0 | provenance | | +| main.rs:100:14:100:14 | s [tuple.0] | main.rs:100:14:100:16 | s.0 | provenance | | +| main.rs:104:9:104:23 | [post] * ... [S] | main.rs:104:10:104:23 | [post] s.index_mut(...) [&ref, S] | provenance | | +| main.rs:104:9:104:23 | [post] * ... [tuple.0] | main.rs:104:10:104:23 | [post] s.index_mut(...) [&ref, tuple.0] | provenance | | +| main.rs:104:10:104:10 | [post] s [S] | main.rs:106:14:106:14 | s [S] | provenance | | +| main.rs:104:10:104:10 | [post] s [tuple.0] | main.rs:106:14:106:14 | s [tuple.0] | provenance | | +| main.rs:104:10:104:23 | [post] s.index_mut(...) [&ref, S] | main.rs:104:10:104:10 | [post] s [S] | provenance | | +| main.rs:104:10:104:23 | [post] s.index_mut(...) [&ref, tuple.0] | main.rs:104:10:104:10 | [post] s [tuple.0] | provenance | | +| main.rs:104:28:104:39 | S(...) [S] | main.rs:76:34:76:44 | ...: Self [S] | provenance | | +| main.rs:104:28:104:39 | S(...) [S] | main.rs:104:9:104:23 | [post] * ... [S] | provenance | MaD:2 | +| main.rs:104:28:104:39 | S(...) [S] | main.rs:104:9:104:23 | [post] * ... [S] | provenance | MaD:3 | +| main.rs:104:28:104:39 | S(...) [S] | main.rs:104:9:104:23 | [post] * ... [tuple.0] | provenance | MaD:2 | +| main.rs:104:28:104:39 | S(...) [S] | main.rs:104:9:104:23 | [post] * ... [tuple.0] | provenance | MaD:3 | +| main.rs:104:30:104:38 | source(...) | main.rs:104:28:104:39 | S(...) [S] | provenance | | +| main.rs:105:9:105:9 | [post] s [S] | main.rs:106:14:106:14 | s [S] | provenance | | +| main.rs:105:9:105:9 | [post] s [tuple.0] | main.rs:106:14:106:14 | s [tuple.0] | provenance | | +| main.rs:105:9:105:12 | [post] s[0] [S] | main.rs:105:9:105:9 | [post] s [S] | provenance | | +| main.rs:105:9:105:12 | [post] s[0] [tuple.0] | main.rs:105:9:105:9 | [post] s [tuple.0] | provenance | | +| main.rs:105:17:105:28 | S(...) [S] | main.rs:76:34:76:44 | ...: Self [S] | provenance | | +| main.rs:105:17:105:28 | S(...) [S] | main.rs:105:9:105:12 | [post] s[0] [S] | provenance | MaD:2 | +| main.rs:105:17:105:28 | S(...) [S] | main.rs:105:9:105:12 | [post] s[0] [S] | provenance | MaD:3 | +| main.rs:105:17:105:28 | S(...) [S] | main.rs:105:9:105:12 | [post] s[0] [tuple.0] | provenance | MaD:2 | +| main.rs:105:17:105:28 | S(...) [S] | main.rs:105:9:105:12 | [post] s[0] [tuple.0] | provenance | MaD:3 | +| main.rs:105:19:105:27 | source(...) | main.rs:105:17:105:28 | S(...) [S] | provenance | | +| main.rs:106:14:106:14 | s [S] | main.rs:106:14:106:16 | s.0 | provenance | | +| main.rs:106:14:106:14 | s [tuple.0] | main.rs:106:14:106:16 | s.0 | provenance | | +| main.rs:110:10:110:24 | [post] * ... [S] | main.rs:110:11:110:24 | [post] s.index_mut(...) [&ref, S] | provenance | | +| main.rs:110:10:110:24 | [post] * ... [tuple.0] | main.rs:110:11:110:24 | [post] s.index_mut(...) [&ref, tuple.0] | provenance | | +| main.rs:110:11:110:11 | [post] s [S] | main.rs:111:14:111:14 | s [S] | provenance | | +| main.rs:110:11:110:11 | [post] s [tuple.0] | main.rs:111:14:111:14 | s [tuple.0] | provenance | | +| main.rs:110:11:110:24 | [post] s.index_mut(...) [&ref, S] | main.rs:110:11:110:11 | [post] s [S] | provenance | | +| main.rs:110:11:110:24 | [post] s.index_mut(...) [&ref, tuple.0] | main.rs:110:11:110:11 | [post] s [tuple.0] | provenance | | +| main.rs:110:38:110:49 | S(...) [S] | main.rs:76:34:76:44 | ...: Self [S] | provenance | | +| main.rs:110:38:110:49 | S(...) [S] | main.rs:110:10:110:24 | [post] * ... [S] | provenance | MaD:2 | +| main.rs:110:38:110:49 | S(...) [S] | main.rs:110:10:110:24 | [post] * ... [S] | provenance | MaD:3 | +| main.rs:110:38:110:49 | S(...) [S] | main.rs:110:10:110:24 | [post] * ... [tuple.0] | provenance | MaD:2 | +| main.rs:110:38:110:49 | S(...) [S] | main.rs:110:10:110:24 | [post] * ... [tuple.0] | provenance | MaD:3 | +| main.rs:110:40:110:48 | source(...) | main.rs:110:38:110:49 | S(...) [S] | provenance | | +| main.rs:111:14:111:14 | s [S] | main.rs:111:14:111:16 | s.0 | provenance | | +| main.rs:111:14:111:14 | s [tuple.0] | main.rs:111:14:111:16 | s.0 | provenance | | +nodes +| main.rs:15:13:15:13 | s | semmle.label | s | +| main.rs:15:17:15:25 | source(...) | semmle.label | source(...) | +| main.rs:16:13:16:15 | arr [element] | semmle.label | arr [element] | +| main.rs:16:19:16:24 | [s; 5] [element] | semmle.label | [s; 5] [element] | +| main.rs:16:20:16:20 | s | semmle.label | s | +| main.rs:17:14:17:16 | arr [element] | semmle.label | arr [element] | +| main.rs:17:14:17:19 | arr[2] | semmle.label | arr[2] | +| main.rs:18:14:18:26 | * ... | semmle.label | * ... | +| main.rs:18:15:18:17 | arr [element] | semmle.label | arr [element] | +| main.rs:18:15:18:26 | arr.index(...) [&ref] | semmle.label | arr.index(...) [&ref] | +| main.rs:20:13:20:19 | mut arr | semmle.label | mut arr | +| main.rs:20:23:20:33 | source(...) | semmle.label | source(...) | +| main.rs:21:14:21:16 | arr | semmle.label | arr | +| main.rs:21:14:21:19 | arr[0] | semmle.label | arr[0] | +| main.rs:22:14:22:26 | * ... | semmle.label | * ... | +| main.rs:22:15:22:17 | arr | semmle.label | arr | +| main.rs:22:15:22:26 | arr.index(...) [&ref] | semmle.label | arr.index(...) [&ref] | +| main.rs:24:13:24:13 | s | semmle.label | s | +| main.rs:24:17:24:25 | source(...) | semmle.label | source(...) | +| main.rs:25:13:25:15 | arr [element] | semmle.label | arr [element] | +| main.rs:25:19:25:21 | [...] [element] | semmle.label | [...] [element] | +| main.rs:25:20:25:20 | s | semmle.label | s | +| main.rs:26:13:26:13 | x | semmle.label | x | +| main.rs:26:18:26:20 | arr [element] | semmle.label | arr [element] | +| main.rs:27:18:27:18 | x | semmle.label | x | +| main.rs:30:13:30:15 | arr | semmle.label | arr | +| main.rs:30:19:30:29 | source(...) | semmle.label | source(...) | +| main.rs:32:18:32:18 | x | semmle.label | x | +| main.rs:37:9:37:11 | [post] arr [element] | semmle.label | [post] arr [element] | +| main.rs:37:18:37:26 | source(...) | semmle.label | source(...) | +| main.rs:38:14:38:16 | arr [element] | semmle.label | arr [element] | +| main.rs:38:14:38:19 | arr[0] | semmle.label | arr[0] | +| main.rs:46:9:46:14 | [post] arr[0] | semmle.label | [post] arr[0] | +| main.rs:46:19:46:27 | source(...) | semmle.label | source(...) | +| main.rs:47:14:47:16 | arr | semmle.label | arr | +| main.rs:47:14:47:19 | arr[0] | semmle.label | arr[0] | +| main.rs:63:18:63:22 | SelfParam [&ref, S] | semmle.label | SelfParam [&ref, S] | +| main.rs:63:56:65:9 | { ... } [&ref, S] | semmle.label | { ... } [&ref, S] | +| main.rs:76:23:76:31 | SelfParam [Return] [&ref, S] | semmle.label | SelfParam [Return] [&ref, S] | +| main.rs:76:23:76:31 | SelfParam [Return] [&ref, tuple.0] | semmle.label | SelfParam [Return] [&ref, tuple.0] | +| main.rs:76:34:76:44 | ...: Self [S] | semmle.label | ...: Self [S] | +| main.rs:77:13:77:16 | [post] self [&ref, S] | semmle.label | [post] self [&ref, S] | +| main.rs:77:13:77:16 | [post] self [&ref, tuple.0] | semmle.label | [post] self [&ref, tuple.0] | +| main.rs:77:13:77:18 | [post] self.0 | semmle.label | [post] self.0 | +| main.rs:77:23:77:27 | other [S] | semmle.label | other [S] | +| main.rs:77:23:77:29 | other.0 | semmle.label | other.0 | +| main.rs:82:13:82:13 | s | semmle.label | s | +| main.rs:82:17:82:25 | source(...) | semmle.label | source(...) | +| main.rs:83:13:83:13 | s [S] | semmle.label | s [S] | +| main.rs:83:17:83:20 | S(...) [S] | semmle.label | S(...) [S] | +| main.rs:83:19:83:19 | s | semmle.label | s | +| main.rs:84:14:84:14 | s [S] | semmle.label | s [S] | +| main.rs:84:14:84:17 | s[0] [S] | semmle.label | s[0] [S] | +| main.rs:84:14:84:19 | ... .0 | semmle.label | ... .0 | +| main.rs:85:14:85:28 | ... .0 | semmle.label | ... .0 | +| main.rs:85:15:85:25 | * ... [S] | semmle.label | * ... [S] | +| main.rs:85:16:85:16 | s [S] | semmle.label | s [S] | +| main.rs:85:16:85:25 | s.index(...) [&ref, S] | semmle.label | s.index(...) [&ref, S] | +| main.rs:89:9:89:9 | [post] s [S] | semmle.label | [post] s [S] | +| main.rs:89:16:89:27 | S(...) [S] | semmle.label | S(...) [S] | +| main.rs:89:18:89:26 | source(...) | semmle.label | source(...) | +| main.rs:90:14:90:14 | s [S] | semmle.label | s [S] | +| main.rs:90:14:90:16 | s.0 | semmle.label | s.0 | +| main.rs:94:10:94:10 | [post] s [S] | semmle.label | [post] s [S] | +| main.rs:94:10:94:23 | [post] s.index_mut(...) [&ref, S] | semmle.label | [post] s.index_mut(...) [&ref, S] | +| main.rs:94:27:94:38 | S(...) [S] | semmle.label | S(...) [S] | +| main.rs:94:29:94:37 | source(...) | semmle.label | source(...) | +| main.rs:95:14:95:14 | s [S] | semmle.label | s [S] | +| main.rs:95:14:95:16 | s.0 | semmle.label | s.0 | +| main.rs:99:9:99:9 | [post] s [S] | semmle.label | [post] s [S] | +| main.rs:99:9:99:9 | [post] s [tuple.0] | semmle.label | [post] s [tuple.0] | +| main.rs:99:9:99:12 | [post] s[0] [S] | semmle.label | [post] s[0] [S] | +| main.rs:99:9:99:12 | [post] s[0] [tuple.0] | semmle.label | [post] s[0] [tuple.0] | +| main.rs:99:17:99:28 | S(...) [S] | semmle.label | S(...) [S] | +| main.rs:99:19:99:27 | source(...) | semmle.label | source(...) | +| main.rs:100:14:100:14 | s [S] | semmle.label | s [S] | +| main.rs:100:14:100:14 | s [tuple.0] | semmle.label | s [tuple.0] | +| main.rs:100:14:100:16 | s.0 | semmle.label | s.0 | +| main.rs:104:9:104:23 | [post] * ... [S] | semmle.label | [post] * ... [S] | +| main.rs:104:9:104:23 | [post] * ... [tuple.0] | semmle.label | [post] * ... [tuple.0] | +| main.rs:104:10:104:10 | [post] s [S] | semmle.label | [post] s [S] | +| main.rs:104:10:104:10 | [post] s [tuple.0] | semmle.label | [post] s [tuple.0] | +| main.rs:104:10:104:23 | [post] s.index_mut(...) [&ref, S] | semmle.label | [post] s.index_mut(...) [&ref, S] | +| main.rs:104:10:104:23 | [post] s.index_mut(...) [&ref, tuple.0] | semmle.label | [post] s.index_mut(...) [&ref, tuple.0] | +| main.rs:104:28:104:39 | S(...) [S] | semmle.label | S(...) [S] | +| main.rs:104:30:104:38 | source(...) | semmle.label | source(...) | +| main.rs:105:9:105:9 | [post] s [S] | semmle.label | [post] s [S] | +| main.rs:105:9:105:9 | [post] s [tuple.0] | semmle.label | [post] s [tuple.0] | +| main.rs:105:9:105:12 | [post] s[0] [S] | semmle.label | [post] s[0] [S] | +| main.rs:105:9:105:12 | [post] s[0] [tuple.0] | semmle.label | [post] s[0] [tuple.0] | +| main.rs:105:17:105:28 | S(...) [S] | semmle.label | S(...) [S] | +| main.rs:105:19:105:27 | source(...) | semmle.label | source(...) | +| main.rs:106:14:106:14 | s [S] | semmle.label | s [S] | +| main.rs:106:14:106:14 | s [tuple.0] | semmle.label | s [tuple.0] | +| main.rs:106:14:106:16 | s.0 | semmle.label | s.0 | +| main.rs:110:10:110:24 | [post] * ... [S] | semmle.label | [post] * ... [S] | +| main.rs:110:10:110:24 | [post] * ... [tuple.0] | semmle.label | [post] * ... [tuple.0] | +| main.rs:110:11:110:11 | [post] s [S] | semmle.label | [post] s [S] | +| main.rs:110:11:110:11 | [post] s [tuple.0] | semmle.label | [post] s [tuple.0] | +| main.rs:110:11:110:24 | [post] s.index_mut(...) [&ref, S] | semmle.label | [post] s.index_mut(...) [&ref, S] | +| main.rs:110:11:110:24 | [post] s.index_mut(...) [&ref, tuple.0] | semmle.label | [post] s.index_mut(...) [&ref, tuple.0] | +| main.rs:110:38:110:49 | S(...) [S] | semmle.label | S(...) [S] | +| main.rs:110:40:110:48 | source(...) | semmle.label | source(...) | +| main.rs:111:14:111:14 | s [S] | semmle.label | s [S] | +| main.rs:111:14:111:14 | s [tuple.0] | semmle.label | s [tuple.0] | +| main.rs:111:14:111:16 | s.0 | semmle.label | s.0 | +subpaths +| main.rs:84:14:84:14 | s [S] | main.rs:63:18:63:22 | SelfParam [&ref, S] | main.rs:63:56:65:9 | { ... } [&ref, S] | main.rs:84:14:84:17 | s[0] [S] | +| main.rs:85:16:85:16 | s [S] | main.rs:63:18:63:22 | SelfParam [&ref, S] | main.rs:63:56:65:9 | { ... } [&ref, S] | main.rs:85:16:85:25 | s.index(...) [&ref, S] | +| main.rs:99:17:99:28 | S(...) [S] | main.rs:76:34:76:44 | ...: Self [S] | main.rs:76:23:76:31 | SelfParam [Return] [&ref, S] | main.rs:99:9:99:12 | [post] s[0] [S] | +| main.rs:99:17:99:28 | S(...) [S] | main.rs:76:34:76:44 | ...: Self [S] | main.rs:76:23:76:31 | SelfParam [Return] [&ref, tuple.0] | main.rs:99:9:99:12 | [post] s[0] [tuple.0] | +| main.rs:104:28:104:39 | S(...) [S] | main.rs:76:34:76:44 | ...: Self [S] | main.rs:76:23:76:31 | SelfParam [Return] [&ref, S] | main.rs:104:9:104:23 | [post] * ... [S] | +| main.rs:104:28:104:39 | S(...) [S] | main.rs:76:34:76:44 | ...: Self [S] | main.rs:76:23:76:31 | SelfParam [Return] [&ref, tuple.0] | main.rs:104:9:104:23 | [post] * ... [tuple.0] | +| main.rs:105:17:105:28 | S(...) [S] | main.rs:76:34:76:44 | ...: Self [S] | main.rs:76:23:76:31 | SelfParam [Return] [&ref, S] | main.rs:105:9:105:12 | [post] s[0] [S] | +| main.rs:105:17:105:28 | S(...) [S] | main.rs:76:34:76:44 | ...: Self [S] | main.rs:76:23:76:31 | SelfParam [Return] [&ref, tuple.0] | main.rs:105:9:105:12 | [post] s[0] [tuple.0] | +| main.rs:110:38:110:49 | S(...) [S] | main.rs:76:34:76:44 | ...: Self [S] | main.rs:76:23:76:31 | SelfParam [Return] [&ref, S] | main.rs:110:10:110:24 | [post] * ... [S] | +| main.rs:110:38:110:49 | S(...) [S] | main.rs:76:34:76:44 | ...: Self [S] | main.rs:76:23:76:31 | SelfParam [Return] [&ref, tuple.0] | main.rs:110:10:110:24 | [post] * ... [tuple.0] | +testFailures +#select +| main.rs:17:14:17:19 | arr[2] | main.rs:15:17:15:25 | source(...) | main.rs:17:14:17:19 | arr[2] | $@ | main.rs:15:17:15:25 | source(...) | source(...) | +| main.rs:18:14:18:26 | * ... | main.rs:15:17:15:25 | source(...) | main.rs:18:14:18:26 | * ... | $@ | main.rs:15:17:15:25 | source(...) | source(...) | +| main.rs:21:14:21:19 | arr[0] | main.rs:20:23:20:33 | source(...) | main.rs:21:14:21:19 | arr[0] | $@ | main.rs:20:23:20:33 | source(...) | source(...) | +| main.rs:22:14:22:26 | * ... | main.rs:20:23:20:33 | source(...) | main.rs:22:14:22:26 | * ... | $@ | main.rs:20:23:20:33 | source(...) | source(...) | +| main.rs:27:18:27:18 | x | main.rs:24:17:24:25 | source(...) | main.rs:27:18:27:18 | x | $@ | main.rs:24:17:24:25 | source(...) | source(...) | +| main.rs:32:18:32:18 | x | main.rs:30:19:30:29 | source(...) | main.rs:32:18:32:18 | x | $@ | main.rs:30:19:30:29 | source(...) | source(...) | +| main.rs:38:14:38:19 | arr[0] | main.rs:37:18:37:26 | source(...) | main.rs:38:14:38:19 | arr[0] | $@ | main.rs:37:18:37:26 | source(...) | source(...) | +| main.rs:47:14:47:19 | arr[0] | main.rs:46:19:46:27 | source(...) | main.rs:47:14:47:19 | arr[0] | $@ | main.rs:46:19:46:27 | source(...) | source(...) | +| main.rs:84:14:84:19 | ... .0 | main.rs:82:17:82:25 | source(...) | main.rs:84:14:84:19 | ... .0 | $@ | main.rs:82:17:82:25 | source(...) | source(...) | +| main.rs:85:14:85:28 | ... .0 | main.rs:82:17:82:25 | source(...) | main.rs:85:14:85:28 | ... .0 | $@ | main.rs:82:17:82:25 | source(...) | source(...) | +| main.rs:90:14:90:16 | s.0 | main.rs:89:18:89:26 | source(...) | main.rs:90:14:90:16 | s.0 | $@ | main.rs:89:18:89:26 | source(...) | source(...) | +| main.rs:95:14:95:16 | s.0 | main.rs:94:29:94:37 | source(...) | main.rs:95:14:95:16 | s.0 | $@ | main.rs:94:29:94:37 | source(...) | source(...) | +| main.rs:100:14:100:16 | s.0 | main.rs:99:19:99:27 | source(...) | main.rs:100:14:100:16 | s.0 | $@ | main.rs:99:19:99:27 | source(...) | source(...) | +| main.rs:106:14:106:16 | s.0 | main.rs:104:30:104:38 | source(...) | main.rs:106:14:106:16 | s.0 | $@ | main.rs:104:30:104:38 | source(...) | source(...) | +| main.rs:106:14:106:16 | s.0 | main.rs:105:19:105:27 | source(...) | main.rs:106:14:106:16 | s.0 | $@ | main.rs:105:19:105:27 | source(...) | source(...) | +| main.rs:111:14:111:16 | s.0 | main.rs:110:40:110:48 | source(...) | main.rs:111:14:111:16 | s.0 | $@ | main.rs:110:40:110:48 | source(...) | source(...) | diff --git a/rust/ql/test/library-tests/dataflow/collections/inline-flow.ql b/rust/ql/test/library-tests/dataflow/collections/inline-flow.ql new file mode 100644 index 00000000000..5dcb7ee70a9 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/collections/inline-flow.ql @@ -0,0 +1,12 @@ +/** + * @kind path-problem + */ + +import rust +import utils.test.InlineFlowTest +import DefaultFlowTest +import TaintFlow::PathGraph + +from TaintFlow::PathNode source, TaintFlow::PathNode sink +where TaintFlow::flowPath(source, sink) +select sink, source, sink, "$@", source, source.toString() diff --git a/rust/ql/test/library-tests/dataflow/collections/main.rs b/rust/ql/test/library-tests/dataflow/collections/main.rs new file mode 100644 index 00000000000..e7675f9fdde --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/collections/main.rs @@ -0,0 +1,118 @@ +fn source(s: T) -> T { + s +} + +fn sink(s: i64) { + println!("{}", s); +} + +mod arrays { + use crate::*; + use std::ops::Index; + use std::ops::IndexMut; + + pub fn f() { + let s = source(0); + let arr = [s; 5]; + sink(arr[2]); // $ hasValueFlow=0 + sink(*arr.index(2)); // $ hasValueFlow=0 + + let mut arr = source([1]); + sink(arr[0]); // $ hasTaintFlow=1 + sink(*arr.index(0)); // $ hasTaintFlow=1 + + let s = source(2); + let arr = [s]; + for x in arr { + sink(x); // $ hasValueFlow=2 + } + + let arr = source([3]); + for x in arr { + sink(x); // $ hasTaintFlow=3 + } + + let mut arr = [0]; + sink(arr[0]); + arr[0] = source(4); + sink(arr[0]); // $ hasValueFlow=4 + + let mut arr = [0]; + sink(arr[0]); + *arr.index_mut(0) = source(5); + sink(arr[0]); // $ MISSING: hasValueFlow=5 -- needs generalized reverse flow + + let mut arr = [0]; + arr[0] += source(6); + sink(arr[0]); // $ hasTaintFlow=6 + } +} + +mod indexers { + use crate::*; + use std::ops::AddAssign; + use std::ops::Index; + use std::ops::IndexMut; + + #[derive(Debug)] + struct S(T); + + impl Index for S { + type Output = S; // `T` would be a better choice here, but that requires generalized reverse flow for the test to pass + + fn index(&self, index: usize) -> &Self::Output { + self + } + } + + impl IndexMut for S { + // `Self::Output` is not yet handled, so use `S` for now + fn index_mut(&mut self, index: usize) -> &mut S { + self + } + } + + impl std::ops::AddAssign for S { + fn add_assign(&mut self, other: Self) { + self.0 += other.0; + } + } + + pub fn f() { + let s = source(0); + let s = S(s); + sink(s[0].0); // $ hasValueFlow=0 + sink((*s.index(0)).0); // $ hasValueFlow=0 + + let mut s = S(0); + sink(s.0); + s[0] = S(source(1)); + sink(s.0); // $ hasValueFlow=1 + + let mut s = S(0); + sink(s.0); + *s.index_mut(0) = S(source(2)); + sink(s.0); // $ hasValueFlow=2 + + let mut s = S(0i64); + sink(s.0); + s[0] += S(source(3)); + sink(s.0); // $ hasTaintFlow=3 + + let mut s = S(0i64); + sink(s.0); + *s.index_mut(0) += S(source(5)); + s[0] += S(source(5)); + sink(s.0); // $ hasTaintFlow=5 + + let mut s = S(0i64); + sink(s.0); + (*s.index_mut(0)).add_assign(S(source(6))); + sink(s.0); // $ hasTaintFlow=6 + } +} + +fn main() { + arrays::f(); + indexers::f(); +} diff --git a/rust/ql/test/library-tests/dataflow/global/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/global/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 00000000000..10c2285e621 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/global/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,3 @@ +multipleResolvedTargets +| main.rs:236:11:236:15 | * ... | +| main.rs:272:13:272:29 | * ... | diff --git a/rust/ql/test/library-tests/dataflow/global/inline-flow.expected b/rust/ql/test/library-tests/dataflow/global/inline-flow.expected index 26984a1d377..2ffa7e10995 100644 --- a/rust/ql/test/library-tests/dataflow/global/inline-flow.expected +++ b/rust/ql/test/library-tests/dataflow/global/inline-flow.expected @@ -1,18 +1,18 @@ models -| 1 | Summary: futures_executor::local_pool::block_on; Argument[0]; ReturnValue; value | +| 1 | Summary: <& as core::ops::deref::Deref>::deref; Argument[self].Reference; ReturnValue; value | +| 2 | Summary: <_ as core::ops::arith::Mul>::mul; Argument[self]; ReturnValue; taint | +| 3 | Summary: futures_executor::local_pool::block_on; Argument[0]; ReturnValue; value | edges | main.rs:12:28:14:1 | { ... } | main.rs:17:13:17:23 | get_data(...) | provenance | | | main.rs:13:5:13:13 | source(...) | main.rs:12:28:14:1 | { ... } | provenance | | | main.rs:17:9:17:9 | a | main.rs:18:10:18:10 | a | provenance | | | main.rs:17:13:17:23 | get_data(...) | main.rs:17:9:17:9 | a | provenance | | -| main.rs:26:28:26:33 | ...: i64 | main.rs:27:24:27:24 | n | provenance | | -| main.rs:27:10:27:14 | [post] * ... [MyStruct] | main.rs:27:11:27:14 | [post] self [&ref, MyStruct] | provenance | | -| main.rs:27:11:27:14 | [post] self [&ref, MyStruct] | main.rs:26:17:26:25 | SelfParam [Return] [&ref, MyStruct] | provenance | | -| main.rs:27:24:27:24 | n | main.rs:27:10:27:14 | [post] * ... [MyStruct] | provenance | | -| main.rs:30:17:30:21 | SelfParam [&ref, MyStruct] | main.rs:31:11:31:14 | self [&ref, MyStruct] | provenance | | -| main.rs:31:9:31:20 | ... .data | main.rs:30:31:32:5 | { ... } | provenance | | -| main.rs:31:10:31:14 | * ... [MyStruct] | main.rs:31:9:31:20 | ... .data | provenance | | -| main.rs:31:11:31:14 | self [&ref, MyStruct] | main.rs:31:10:31:14 | * ... [MyStruct] | provenance | | +| main.rs:26:28:26:33 | ...: i64 | main.rs:27:21:27:21 | n | provenance | | +| main.rs:27:9:27:12 | [post] self [&ref, MyStruct] | main.rs:26:17:26:25 | SelfParam [Return] [&ref, MyStruct] | provenance | | +| main.rs:27:21:27:21 | n | main.rs:27:9:27:12 | [post] self [&ref, MyStruct] | provenance | | +| main.rs:30:17:30:21 | SelfParam [&ref, MyStruct] | main.rs:31:9:31:12 | self [&ref, MyStruct] | provenance | | +| main.rs:31:9:31:12 | self [&ref, MyStruct] | main.rs:31:9:31:17 | self.data | provenance | | +| main.rs:31:9:31:17 | self.data | main.rs:30:31:32:5 | { ... } | provenance | | | main.rs:38:6:38:11 | [post] &mut a [&ref, MyStruct] | main.rs:38:11:38:11 | [post] a [MyStruct] | provenance | | | main.rs:38:11:38:11 | [post] a [MyStruct] | main.rs:39:10:39:10 | a [MyStruct] | provenance | | | main.rs:38:23:38:31 | source(...) | main.rs:26:28:26:33 | ...: i64 | provenance | | @@ -112,16 +112,15 @@ edges | main.rs:222:9:222:35 | MyInt {...} [MyInt] | main.rs:220:42:223:5 | { ... } [MyInt] | provenance | | | main.rs:222:24:222:27 | self [MyInt] | main.rs:222:24:222:33 | self.value | provenance | | | main.rs:222:24:222:33 | self.value | main.rs:222:9:222:35 | MyInt {...} [MyInt] | provenance | | -| main.rs:227:30:227:39 | ...: MyInt [MyInt] | main.rs:228:25:228:27 | rhs [MyInt] | provenance | | -| main.rs:228:10:228:14 | [post] * ... [MyInt] | main.rs:228:11:228:14 | [post] self [&ref, MyInt] | provenance | | -| main.rs:228:11:228:14 | [post] self [&ref, MyInt] | main.rs:227:19:227:27 | SelfParam [Return] [&ref, MyInt] | provenance | | -| main.rs:228:25:228:27 | rhs [MyInt] | main.rs:228:25:228:33 | rhs.value | provenance | | -| main.rs:228:25:228:33 | rhs.value | main.rs:228:10:228:14 | [post] * ... [MyInt] | provenance | | +| main.rs:227:30:227:39 | ...: MyInt [MyInt] | main.rs:228:22:228:24 | rhs [MyInt] | provenance | | +| main.rs:228:9:228:12 | [post] self [&ref, MyInt] | main.rs:227:19:227:27 | SelfParam [Return] [&ref, MyInt] | provenance | | +| main.rs:228:22:228:24 | rhs [MyInt] | main.rs:228:22:228:30 | rhs.value | provenance | | +| main.rs:228:22:228:30 | rhs.value | main.rs:228:9:228:12 | [post] self [&ref, MyInt] | provenance | | | main.rs:235:14:235:18 | SelfParam [&ref, MyInt] | main.rs:236:12:236:15 | self [&ref, MyInt] | provenance | | | main.rs:236:9:236:22 | &... [&ref] | main.rs:235:38:237:5 | { ... } [&ref] | provenance | | | main.rs:236:10:236:22 | ... .value | main.rs:236:9:236:22 | &... [&ref] | provenance | | | main.rs:236:11:236:15 | * ... [MyInt] | main.rs:236:10:236:22 | ... .value | provenance | | -| main.rs:236:12:236:15 | self [&ref, MyInt] | main.rs:236:11:236:15 | * ... [MyInt] | provenance | | +| main.rs:236:12:236:15 | self [&ref, MyInt] | main.rs:236:11:236:15 | * ... [MyInt] | provenance | MaD:1 | | main.rs:242:9:242:9 | a [MyInt] | main.rs:244:13:244:13 | a [MyInt] | provenance | | | main.rs:242:13:242:38 | MyInt {...} [MyInt] | main.rs:242:9:242:9 | a [MyInt] | provenance | | | main.rs:242:28:242:36 | source(...) | main.rs:242:13:242:38 | MyInt {...} [MyInt] | provenance | | @@ -130,11 +129,12 @@ edges | main.rs:244:13:244:13 | a [MyInt] | main.rs:244:13:244:17 | ... + ... [MyInt] | provenance | | | main.rs:244:13:244:17 | ... + ... [MyInt] | main.rs:244:9:244:9 | c [MyInt] | provenance | | | main.rs:245:10:245:10 | c [MyInt] | main.rs:245:10:245:16 | c.value | provenance | | -| main.rs:252:9:252:9 | a [MyInt] | main.rs:220:12:220:15 | SelfParam [MyInt] | provenance | | -| main.rs:252:9:252:9 | a [MyInt] | main.rs:254:13:254:20 | a.add(...) [MyInt] | provenance | | +| main.rs:252:9:252:9 | a [MyInt] | main.rs:254:13:254:13 | a [MyInt] | provenance | | | main.rs:252:13:252:38 | MyInt {...} [MyInt] | main.rs:252:9:252:9 | a [MyInt] | provenance | | | main.rs:252:28:252:36 | source(...) | main.rs:252:13:252:38 | MyInt {...} [MyInt] | provenance | | | main.rs:254:9:254:9 | d [MyInt] | main.rs:255:10:255:10 | d [MyInt] | provenance | | +| main.rs:254:13:254:13 | a [MyInt] | main.rs:220:12:220:15 | SelfParam [MyInt] | provenance | | +| main.rs:254:13:254:13 | a [MyInt] | main.rs:254:13:254:20 | a.add(...) [MyInt] | provenance | | | main.rs:254:13:254:20 | a.add(...) [MyInt] | main.rs:254:9:254:9 | d [MyInt] | provenance | | | main.rs:255:10:255:10 | d [MyInt] | main.rs:255:10:255:16 | d.value | provenance | | | main.rs:259:9:259:9 | b [MyInt] | main.rs:261:35:261:35 | b [MyInt] | provenance | | @@ -145,15 +145,28 @@ edges | main.rs:261:35:261:35 | b [MyInt] | main.rs:227:30:227:39 | ...: MyInt [MyInt] | provenance | | | main.rs:261:35:261:35 | b [MyInt] | main.rs:261:27:261:32 | [post] &mut a [&ref, MyInt] | provenance | | | main.rs:262:10:262:10 | a [MyInt] | main.rs:262:10:262:16 | a.value | provenance | | +| main.rs:265:9:265:9 | b [MyInt] | main.rs:266:10:266:10 | b [MyInt] | provenance | | +| main.rs:265:13:265:39 | MyInt {...} [MyInt] | main.rs:265:9:265:9 | b [MyInt] | provenance | | +| main.rs:265:28:265:37 | source(...) | main.rs:265:13:265:39 | MyInt {...} [MyInt] | provenance | | +| main.rs:266:10:266:10 | b [MyInt] | main.rs:227:30:227:39 | ...: MyInt [MyInt] | provenance | | +| main.rs:266:10:266:10 | b [MyInt] | main.rs:267:10:267:10 | a [MyInt] | provenance | | +| main.rs:267:10:267:10 | a [MyInt] | main.rs:267:10:267:16 | a.value | provenance | | | main.rs:270:9:270:9 | a [MyInt] | main.rs:272:28:272:28 | a [MyInt] | provenance | | | main.rs:270:13:270:39 | MyInt {...} [MyInt] | main.rs:270:9:270:9 | a [MyInt] | provenance | | | main.rs:270:28:270:37 | source(...) | main.rs:270:13:270:39 | MyInt {...} [MyInt] | provenance | | | main.rs:272:9:272:9 | c | main.rs:273:10:273:10 | c | provenance | | | main.rs:272:13:272:29 | * ... | main.rs:272:9:272:9 | c | provenance | | -| main.rs:272:14:272:29 | ...::deref(...) [&ref] | main.rs:272:13:272:29 | * ... | provenance | | +| main.rs:272:14:272:29 | ...::deref(...) [&ref] | main.rs:272:13:272:29 | * ... | provenance | MaD:1 | | main.rs:272:27:272:28 | &a [&ref, MyInt] | main.rs:235:14:235:18 | SelfParam [&ref, MyInt] | provenance | | -| main.rs:272:27:272:28 | &a [&ref, MyInt] | main.rs:272:14:272:29 | ...::deref(...) [&ref] | provenance | | +| main.rs:272:27:272:28 | &a [&ref, MyInt] | main.rs:272:14:272:29 | ...::deref(...) [&ref] | provenance | MaD:1 | | main.rs:272:28:272:28 | a [MyInt] | main.rs:272:27:272:28 | &a [&ref, MyInt] | provenance | | +| main.rs:275:9:275:9 | a [MyInt] | main.rs:276:14:276:14 | a [MyInt] | provenance | | +| main.rs:275:13:275:39 | MyInt {...} [MyInt] | main.rs:275:9:275:9 | a [MyInt] | provenance | | +| main.rs:275:28:275:37 | source(...) | main.rs:275:13:275:39 | MyInt {...} [MyInt] | provenance | | +| main.rs:276:9:276:9 | c | main.rs:277:10:277:10 | c | provenance | | +| main.rs:276:13:276:14 | * ... | main.rs:276:9:276:9 | c | provenance | | +| main.rs:276:14:276:14 | a [MyInt] | main.rs:235:14:235:18 | SelfParam [&ref, MyInt] | provenance | | +| main.rs:276:14:276:14 | a [MyInt] | main.rs:276:13:276:14 | * ... | provenance | MaD:1 | | main.rs:289:18:289:21 | SelfParam [MyInt] | main.rs:289:48:291:5 | { ... } [MyInt] | provenance | | | main.rs:293:26:293:37 | ...: MyInt [MyInt] | main.rs:293:49:295:5 | { ... } [MyInt] | provenance | | | main.rs:299:9:299:9 | a [MyInt] | main.rs:301:50:301:50 | a [MyInt] | provenance | | @@ -180,7 +193,29 @@ edges | main.rs:326:17:326:25 | source(...) | main.rs:326:13:326:13 | c | provenance | | | main.rs:334:9:334:9 | a | main.rs:335:10:335:10 | a | provenance | | | main.rs:334:13:334:55 | ...::block_on(...) | main.rs:334:9:334:9 | a | provenance | | -| main.rs:334:41:334:54 | async_source(...) | main.rs:334:13:334:55 | ...::block_on(...) | provenance | MaD:1 | +| main.rs:334:41:334:54 | async_source(...) | main.rs:334:13:334:55 | ...::block_on(...) | provenance | MaD:3 | +| main.rs:346:44:348:9 | { ... } | main.rs:383:18:383:38 | t.get_double_number() | provenance | | +| main.rs:346:44:348:9 | { ... } | main.rs:387:18:387:50 | ...::get_double_number(...) | provenance | | +| main.rs:347:13:347:29 | self.get_number() | main.rs:347:13:347:33 | ... * ... | provenance | MaD:2 | +| main.rs:347:13:347:33 | ... * ... | main.rs:346:44:348:9 | { ... } | provenance | | +| main.rs:350:33:352:9 | { ... } | main.rs:391:18:391:37 | ...::get_default(...) | provenance | | +| main.rs:351:13:351:21 | source(...) | main.rs:350:33:352:9 | { ... } | provenance | | +| main.rs:358:37:360:9 | { ... } | main.rs:347:13:347:29 | self.get_number() | provenance | | +| main.rs:359:13:359:21 | source(...) | main.rs:358:37:360:9 | { ... } | provenance | | +| main.rs:370:44:372:9 | { ... } | main.rs:395:18:395:38 | i.get_double_number() | provenance | | +| main.rs:371:13:371:22 | source(...) | main.rs:370:44:372:9 | { ... } | provenance | | +| main.rs:374:33:376:9 | { ... } | main.rs:398:18:398:41 | ...::get_default(...) | provenance | | +| main.rs:375:13:375:21 | source(...) | main.rs:374:33:376:9 | { ... } | provenance | | +| main.rs:383:13:383:14 | n1 | main.rs:384:14:384:15 | n1 | provenance | | +| main.rs:383:18:383:38 | t.get_double_number() | main.rs:383:13:383:14 | n1 | provenance | | +| main.rs:387:13:387:14 | n2 | main.rs:388:14:388:15 | n2 | provenance | | +| main.rs:387:18:387:50 | ...::get_double_number(...) | main.rs:387:13:387:14 | n2 | provenance | | +| main.rs:391:13:391:14 | n3 | main.rs:392:14:392:15 | n3 | provenance | | +| main.rs:391:18:391:37 | ...::get_default(...) | main.rs:391:13:391:14 | n3 | provenance | | +| main.rs:395:13:395:14 | n4 | main.rs:396:14:396:15 | n4 | provenance | | +| main.rs:395:18:395:38 | i.get_double_number() | main.rs:395:13:395:14 | n4 | provenance | | +| main.rs:398:13:398:14 | n5 | main.rs:399:14:399:15 | n5 | provenance | | +| main.rs:398:18:398:41 | ...::get_default(...) | main.rs:398:13:398:14 | n5 | provenance | | nodes | main.rs:12:28:14:1 | { ... } | semmle.label | { ... } | | main.rs:13:5:13:13 | source(...) | semmle.label | source(...) | @@ -189,14 +224,12 @@ nodes | main.rs:18:10:18:10 | a | semmle.label | a | | main.rs:26:17:26:25 | SelfParam [Return] [&ref, MyStruct] | semmle.label | SelfParam [Return] [&ref, MyStruct] | | main.rs:26:28:26:33 | ...: i64 | semmle.label | ...: i64 | -| main.rs:27:10:27:14 | [post] * ... [MyStruct] | semmle.label | [post] * ... [MyStruct] | -| main.rs:27:11:27:14 | [post] self [&ref, MyStruct] | semmle.label | [post] self [&ref, MyStruct] | -| main.rs:27:24:27:24 | n | semmle.label | n | +| main.rs:27:9:27:12 | [post] self [&ref, MyStruct] | semmle.label | [post] self [&ref, MyStruct] | +| main.rs:27:21:27:21 | n | semmle.label | n | | main.rs:30:17:30:21 | SelfParam [&ref, MyStruct] | semmle.label | SelfParam [&ref, MyStruct] | | main.rs:30:31:32:5 | { ... } | semmle.label | { ... } | -| main.rs:31:9:31:20 | ... .data | semmle.label | ... .data | -| main.rs:31:10:31:14 | * ... [MyStruct] | semmle.label | * ... [MyStruct] | -| main.rs:31:11:31:14 | self [&ref, MyStruct] | semmle.label | self [&ref, MyStruct] | +| main.rs:31:9:31:12 | self [&ref, MyStruct] | semmle.label | self [&ref, MyStruct] | +| main.rs:31:9:31:17 | self.data | semmle.label | self.data | | main.rs:38:6:38:11 | [post] &mut a [&ref, MyStruct] | semmle.label | [post] &mut a [&ref, MyStruct] | | main.rs:38:11:38:11 | [post] a [MyStruct] | semmle.label | [post] a [MyStruct] | | main.rs:38:23:38:31 | source(...) | semmle.label | source(...) | @@ -307,10 +340,9 @@ nodes | main.rs:222:24:222:33 | self.value | semmle.label | self.value | | main.rs:227:19:227:27 | SelfParam [Return] [&ref, MyInt] | semmle.label | SelfParam [Return] [&ref, MyInt] | | main.rs:227:30:227:39 | ...: MyInt [MyInt] | semmle.label | ...: MyInt [MyInt] | -| main.rs:228:10:228:14 | [post] * ... [MyInt] | semmle.label | [post] * ... [MyInt] | -| main.rs:228:11:228:14 | [post] self [&ref, MyInt] | semmle.label | [post] self [&ref, MyInt] | -| main.rs:228:25:228:27 | rhs [MyInt] | semmle.label | rhs [MyInt] | -| main.rs:228:25:228:33 | rhs.value | semmle.label | rhs.value | +| main.rs:228:9:228:12 | [post] self [&ref, MyInt] | semmle.label | [post] self [&ref, MyInt] | +| main.rs:228:22:228:24 | rhs [MyInt] | semmle.label | rhs [MyInt] | +| main.rs:228:22:228:30 | rhs.value | semmle.label | rhs.value | | main.rs:235:14:235:18 | SelfParam [&ref, MyInt] | semmle.label | SelfParam [&ref, MyInt] | | main.rs:235:38:237:5 | { ... } [&ref] | semmle.label | { ... } [&ref] | | main.rs:236:9:236:22 | &... [&ref] | semmle.label | &... [&ref] | @@ -329,6 +361,7 @@ nodes | main.rs:252:13:252:38 | MyInt {...} [MyInt] | semmle.label | MyInt {...} [MyInt] | | main.rs:252:28:252:36 | source(...) | semmle.label | source(...) | | main.rs:254:9:254:9 | d [MyInt] | semmle.label | d [MyInt] | +| main.rs:254:13:254:13 | a [MyInt] | semmle.label | a [MyInt] | | main.rs:254:13:254:20 | a.add(...) [MyInt] | semmle.label | a.add(...) [MyInt] | | main.rs:255:10:255:10 | d [MyInt] | semmle.label | d [MyInt] | | main.rs:255:10:255:16 | d.value | semmle.label | d.value | @@ -340,6 +373,12 @@ nodes | main.rs:261:35:261:35 | b [MyInt] | semmle.label | b [MyInt] | | main.rs:262:10:262:10 | a [MyInt] | semmle.label | a [MyInt] | | main.rs:262:10:262:16 | a.value | semmle.label | a.value | +| main.rs:265:9:265:9 | b [MyInt] | semmle.label | b [MyInt] | +| main.rs:265:13:265:39 | MyInt {...} [MyInt] | semmle.label | MyInt {...} [MyInt] | +| main.rs:265:28:265:37 | source(...) | semmle.label | source(...) | +| main.rs:266:10:266:10 | b [MyInt] | semmle.label | b [MyInt] | +| main.rs:267:10:267:10 | a [MyInt] | semmle.label | a [MyInt] | +| main.rs:267:10:267:16 | a.value | semmle.label | a.value | | main.rs:270:9:270:9 | a [MyInt] | semmle.label | a [MyInt] | | main.rs:270:13:270:39 | MyInt {...} [MyInt] | semmle.label | MyInt {...} [MyInt] | | main.rs:270:28:270:37 | source(...) | semmle.label | source(...) | @@ -349,6 +388,13 @@ nodes | main.rs:272:27:272:28 | &a [&ref, MyInt] | semmle.label | &a [&ref, MyInt] | | main.rs:272:28:272:28 | a [MyInt] | semmle.label | a [MyInt] | | main.rs:273:10:273:10 | c | semmle.label | c | +| main.rs:275:9:275:9 | a [MyInt] | semmle.label | a [MyInt] | +| main.rs:275:13:275:39 | MyInt {...} [MyInt] | semmle.label | MyInt {...} [MyInt] | +| main.rs:275:28:275:37 | source(...) | semmle.label | source(...) | +| main.rs:276:9:276:9 | c | semmle.label | c | +| main.rs:276:13:276:14 | * ... | semmle.label | * ... | +| main.rs:276:14:276:14 | a [MyInt] | semmle.label | a [MyInt] | +| main.rs:277:10:277:10 | c | semmle.label | c | | main.rs:289:18:289:21 | SelfParam [MyInt] | semmle.label | SelfParam [MyInt] | | main.rs:289:48:291:5 | { ... } [MyInt] | semmle.label | { ... } [MyInt] | | main.rs:293:26:293:37 | ...: MyInt [MyInt] | semmle.label | ...: MyInt [MyInt] | @@ -380,6 +426,32 @@ nodes | main.rs:334:13:334:55 | ...::block_on(...) | semmle.label | ...::block_on(...) | | main.rs:334:41:334:54 | async_source(...) | semmle.label | async_source(...) | | main.rs:335:10:335:10 | a | semmle.label | a | +| main.rs:346:44:348:9 | { ... } | semmle.label | { ... } | +| main.rs:347:13:347:29 | self.get_number() | semmle.label | self.get_number() | +| main.rs:347:13:347:33 | ... * ... | semmle.label | ... * ... | +| main.rs:350:33:352:9 | { ... } | semmle.label | { ... } | +| main.rs:351:13:351:21 | source(...) | semmle.label | source(...) | +| main.rs:358:37:360:9 | { ... } | semmle.label | { ... } | +| main.rs:359:13:359:21 | source(...) | semmle.label | source(...) | +| main.rs:370:44:372:9 | { ... } | semmle.label | { ... } | +| main.rs:371:13:371:22 | source(...) | semmle.label | source(...) | +| main.rs:374:33:376:9 | { ... } | semmle.label | { ... } | +| main.rs:375:13:375:21 | source(...) | semmle.label | source(...) | +| main.rs:383:13:383:14 | n1 | semmle.label | n1 | +| main.rs:383:18:383:38 | t.get_double_number() | semmle.label | t.get_double_number() | +| main.rs:384:14:384:15 | n1 | semmle.label | n1 | +| main.rs:387:13:387:14 | n2 | semmle.label | n2 | +| main.rs:387:18:387:50 | ...::get_double_number(...) | semmle.label | ...::get_double_number(...) | +| main.rs:388:14:388:15 | n2 | semmle.label | n2 | +| main.rs:391:13:391:14 | n3 | semmle.label | n3 | +| main.rs:391:18:391:37 | ...::get_default(...) | semmle.label | ...::get_default(...) | +| main.rs:392:14:392:15 | n3 | semmle.label | n3 | +| main.rs:395:13:395:14 | n4 | semmle.label | n4 | +| main.rs:395:18:395:38 | i.get_double_number() | semmle.label | i.get_double_number() | +| main.rs:396:14:396:15 | n4 | semmle.label | n4 | +| main.rs:398:13:398:14 | n5 | semmle.label | n5 | +| main.rs:398:18:398:41 | ...::get_default(...) | semmle.label | ...::get_default(...) | +| main.rs:399:14:399:15 | n5 | semmle.label | n5 | subpaths | main.rs:38:23:38:31 | source(...) | main.rs:26:28:26:33 | ...: i64 | main.rs:26:17:26:25 | SelfParam [Return] [&ref, MyStruct] | main.rs:38:6:38:11 | [post] &mut a [&ref, MyStruct] | | main.rs:39:10:39:10 | a [MyStruct] | main.rs:30:17:30:21 | SelfParam [&ref, MyStruct] | main.rs:30:31:32:5 | { ... } | main.rs:39:10:39:21 | a.get_data() | @@ -394,9 +466,11 @@ subpaths | main.rs:194:38:194:38 | a | main.rs:112:27:112:32 | ...: i64 | main.rs:112:42:114:5 | { ... } | main.rs:194:13:194:39 | ...::data_through(...) | | main.rs:212:24:212:33 | source(...) | main.rs:206:12:206:17 | ...: i64 | main.rs:206:28:208:5 | { ... } [MyInt] | main.rs:212:13:212:34 | ...::new(...) [MyInt] | | main.rs:244:13:244:13 | a [MyInt] | main.rs:220:12:220:15 | SelfParam [MyInt] | main.rs:220:42:223:5 | { ... } [MyInt] | main.rs:244:13:244:17 | ... + ... [MyInt] | -| main.rs:252:9:252:9 | a [MyInt] | main.rs:220:12:220:15 | SelfParam [MyInt] | main.rs:220:42:223:5 | { ... } [MyInt] | main.rs:254:13:254:20 | a.add(...) [MyInt] | +| main.rs:254:13:254:13 | a [MyInt] | main.rs:220:12:220:15 | SelfParam [MyInt] | main.rs:220:42:223:5 | { ... } [MyInt] | main.rs:254:13:254:20 | a.add(...) [MyInt] | | main.rs:261:35:261:35 | b [MyInt] | main.rs:227:30:227:39 | ...: MyInt [MyInt] | main.rs:227:19:227:27 | SelfParam [Return] [&ref, MyInt] | main.rs:261:27:261:32 | [post] &mut a [&ref, MyInt] | +| main.rs:266:10:266:10 | b [MyInt] | main.rs:227:30:227:39 | ...: MyInt [MyInt] | main.rs:227:19:227:27 | SelfParam [Return] [&ref, MyInt] | main.rs:267:10:267:10 | a [MyInt] | | main.rs:272:27:272:28 | &a [&ref, MyInt] | main.rs:235:14:235:18 | SelfParam [&ref, MyInt] | main.rs:235:38:237:5 | { ... } [&ref] | main.rs:272:14:272:29 | ...::deref(...) [&ref] | +| main.rs:276:14:276:14 | a [MyInt] | main.rs:235:14:235:18 | SelfParam [&ref, MyInt] | main.rs:235:38:237:5 | { ... } [&ref] | main.rs:276:13:276:14 | * ... | | main.rs:301:50:301:50 | a [MyInt] | main.rs:289:18:289:21 | SelfParam [MyInt] | main.rs:289:48:291:5 | { ... } [MyInt] | main.rs:301:30:301:54 | ...::take_self(...) [MyInt] | | main.rs:306:55:306:55 | b [MyInt] | main.rs:293:26:293:37 | ...: MyInt [MyInt] | main.rs:293:49:295:5 | { ... } [MyInt] | main.rs:306:30:306:56 | ...::take_second(...) [MyInt] | testFailures @@ -423,9 +497,16 @@ testFailures | main.rs:245:10:245:16 | c.value | main.rs:242:28:242:36 | source(...) | main.rs:245:10:245:16 | c.value | $@ | main.rs:242:28:242:36 | source(...) | source(...) | | main.rs:255:10:255:16 | d.value | main.rs:252:28:252:36 | source(...) | main.rs:255:10:255:16 | d.value | $@ | main.rs:252:28:252:36 | source(...) | source(...) | | main.rs:262:10:262:16 | a.value | main.rs:259:28:259:37 | source(...) | main.rs:262:10:262:16 | a.value | $@ | main.rs:259:28:259:37 | source(...) | source(...) | +| main.rs:267:10:267:16 | a.value | main.rs:265:28:265:37 | source(...) | main.rs:267:10:267:16 | a.value | $@ | main.rs:265:28:265:37 | source(...) | source(...) | | main.rs:273:10:273:10 | c | main.rs:270:28:270:37 | source(...) | main.rs:273:10:273:10 | c | $@ | main.rs:270:28:270:37 | source(...) | source(...) | +| main.rs:277:10:277:10 | c | main.rs:275:28:275:37 | source(...) | main.rs:277:10:277:10 | c | $@ | main.rs:275:28:275:37 | source(...) | source(...) | | main.rs:302:10:302:10 | c | main.rs:299:28:299:36 | source(...) | main.rs:302:10:302:10 | c | $@ | main.rs:299:28:299:36 | source(...) | source(...) | | main.rs:307:10:307:10 | c | main.rs:305:28:305:37 | source(...) | main.rs:307:10:307:10 | c | $@ | main.rs:305:28:305:37 | source(...) | source(...) | | main.rs:317:10:317:10 | a | main.rs:316:13:316:21 | source(...) | main.rs:317:10:317:10 | a | $@ | main.rs:316:13:316:21 | source(...) | source(...) | | main.rs:327:14:327:14 | c | main.rs:326:17:326:25 | source(...) | main.rs:327:14:327:14 | c | $@ | main.rs:326:17:326:25 | source(...) | source(...) | | main.rs:335:10:335:10 | a | main.rs:316:13:316:21 | source(...) | main.rs:335:10:335:10 | a | $@ | main.rs:316:13:316:21 | source(...) | source(...) | +| main.rs:384:14:384:15 | n1 | main.rs:359:13:359:21 | source(...) | main.rs:384:14:384:15 | n1 | $@ | main.rs:359:13:359:21 | source(...) | source(...) | +| main.rs:388:14:388:15 | n2 | main.rs:359:13:359:21 | source(...) | main.rs:388:14:388:15 | n2 | $@ | main.rs:359:13:359:21 | source(...) | source(...) | +| main.rs:392:14:392:15 | n3 | main.rs:351:13:351:21 | source(...) | main.rs:392:14:392:15 | n3 | $@ | main.rs:351:13:351:21 | source(...) | source(...) | +| main.rs:396:14:396:15 | n4 | main.rs:371:13:371:22 | source(...) | main.rs:396:14:396:15 | n4 | $@ | main.rs:371:13:371:22 | source(...) | source(...) | +| main.rs:399:14:399:15 | n5 | main.rs:375:13:375:21 | source(...) | main.rs:399:14:399:15 | n5 | $@ | main.rs:375:13:375:21 | source(...) | source(...) | diff --git a/rust/ql/test/library-tests/dataflow/global/inline-flow.ql b/rust/ql/test/library-tests/dataflow/global/inline-flow.ql index e399ea0e5d7..5dcb7ee70a9 100644 --- a/rust/ql/test/library-tests/dataflow/global/inline-flow.ql +++ b/rust/ql/test/library-tests/dataflow/global/inline-flow.ql @@ -5,8 +5,8 @@ import rust import utils.test.InlineFlowTest import DefaultFlowTest -import ValueFlow::PathGraph +import TaintFlow::PathGraph -from ValueFlow::PathNode source, ValueFlow::PathNode sink -where ValueFlow::flowPath(source, sink) +from TaintFlow::PathNode source, TaintFlow::PathNode sink +where TaintFlow::flowPath(source, sink) select sink, source, sink, "$@", source, source.toString() diff --git a/rust/ql/test/library-tests/dataflow/global/main.rs b/rust/ql/test/library-tests/dataflow/global/main.rs index e378f16b4de..9435de4a681 100644 --- a/rust/ql/test/library-tests/dataflow/global/main.rs +++ b/rust/ql/test/library-tests/dataflow/global/main.rs @@ -24,11 +24,11 @@ struct MyStruct { impl MyStruct { fn set_data(&mut self, n: i64) { - (*self).data = n // todo: implicit deref not yet supported + self.data = n } fn get_data(&self) -> i64 { - (*self).data // todo: implicit deref not yet supported + self.data } } @@ -225,7 +225,7 @@ impl Add for MyInt { impl MulAssign for MyInt { fn mul_assign(&mut self, rhs: MyInt) { - (*self).value = rhs.value; // todo: implicit deref not yet supported + self.value = rhs.value; } } @@ -264,7 +264,7 @@ fn test_operator_overloading() { let mut a = MyInt { value: 0 }; let b = MyInt { value: source(35) }; a *= b; - sink(a.value); // $ MISSING: hasValueFlow=35 + sink(a.value); // $ hasValueFlow=35 // Tests for deref operator. let a = MyInt { value: source(27) }; @@ -274,7 +274,7 @@ fn test_operator_overloading() { let a = MyInt { value: source(28) }; let c = *a; - sink(c); // $ hasTaintFlow=28 MISSING: hasValueFlow=28 + sink(c); // $ hasValueFlow=28 } trait MyTrait2 { @@ -337,6 +337,69 @@ fn test_async_await() { futures::executor::block_on(test_async_await_async_part()); } +mod not_trait_dispatch { + use super::{sink, source}; + + trait HasNumbers { + fn get_number(&self) -> i64; + + fn get_double_number(&self) -> i64 { + self.get_number() * 2 + } + + fn get_default() -> i64 { + source(0) + } + } + + struct Three; + + impl HasNumbers for Three { + fn get_number(&self) -> i64 { + source(3) + } + } + + struct TwentyTwo; + + impl HasNumbers for TwentyTwo { + fn get_number(&self) -> i64 { + 22 + } + + fn get_double_number(&self) -> i64 { + source(44) + } + + fn get_default() -> i64 { + source(1) + } + } + + fn test_non_trait_dispatch() { + let t = Three; + + // This call is to the default method implementation. + let n1 = t.get_double_number(); + sink(n1); // $ hasTaintFlow=3 + + // This call is to the default method implementation. + let n2 = HasNumbers::get_double_number(&t); + sink(n2); // $ hasTaintFlow=3 + + // This call is to the default function implementation. + let n3 = Three::get_default(); + sink(n3); // $ hasValueFlow=0 + + let i = TwentyTwo; + let n4 = i.get_double_number(); + sink(n4); // $ hasValueFlow=44 + + let n5 = TwentyTwo::get_default(); + sink(n5); // $ hasValueFlow=1 + } +} + fn main() { data_out_of_call(); data_out_of_call_side_effect1(); diff --git a/rust/ql/test/library-tests/dataflow/global/viableCallable.expected b/rust/ql/test/library-tests/dataflow/global/viableCallable.expected index e26d70d80d6..9170332ea25 100644 --- a/rust/ql/test/library-tests/dataflow/global/viableCallable.expected +++ b/rust/ql/test/library-tests/dataflow/global/viableCallable.expected @@ -1,3 +1,4 @@ +| main.rs:2:5:2:12 | ... + ... | {EXTERNAL LOCATION} | fn add | | main.rs:13:5:13:13 | source(...) | main.rs:1:1:3:1 | fn source | | main.rs:17:13:17:23 | get_data(...) | main.rs:12:1:14:1 | fn get_data | | main.rs:18:5:18:11 | sink(...) | main.rs:5:1:7:1 | fn sink | @@ -59,6 +60,8 @@ | main.rs:212:13:212:34 | ...::new(...) | main.rs:205:5:208:5 | fn new | | main.rs:212:24:212:33 | source(...) | main.rs:1:1:3:1 | fn source | | main.rs:214:5:214:11 | sink(...) | main.rs:5:1:7:1 | fn sink | +| main.rs:236:11:236:15 | * ... | {EXTERNAL LOCATION} | fn deref | +| main.rs:236:11:236:15 | * ... | {EXTERNAL LOCATION} | fn deref | | main.rs:242:28:242:36 | source(...) | main.rs:1:1:3:1 | fn source | | main.rs:244:13:244:17 | ... + ... | main.rs:220:5:223:5 | fn add | | main.rs:245:5:245:17 | sink(...) | main.rs:5:1:7:1 | fn sink | @@ -75,6 +78,8 @@ | main.rs:266:5:266:10 | ... *= ... | main.rs:227:5:229:5 | fn mul_assign | | main.rs:267:5:267:17 | sink(...) | main.rs:5:1:7:1 | fn sink | | main.rs:270:28:270:37 | source(...) | main.rs:1:1:3:1 | fn source | +| main.rs:272:13:272:29 | * ... | {EXTERNAL LOCATION} | fn deref | +| main.rs:272:13:272:29 | * ... | {EXTERNAL LOCATION} | fn deref | | main.rs:272:14:272:29 | ...::deref(...) | main.rs:235:5:237:5 | fn deref | | main.rs:273:5:273:11 | sink(...) | main.rs:5:1:7:1 | fn sink | | main.rs:275:28:275:37 | source(...) | main.rs:1:1:3:1 | fn source | @@ -101,14 +106,31 @@ | main.rs:335:5:335:11 | sink(...) | main.rs:5:1:7:1 | fn sink | | main.rs:337:5:337:62 | ...::block_on(...) | {EXTERNAL LOCATION} | fn block_on | | main.rs:337:33:337:61 | test_async_await_async_part(...) | main.rs:321:1:331:1 | fn test_async_await_async_part | -| main.rs:341:5:341:22 | data_out_of_call(...) | main.rs:16:1:19:1 | fn data_out_of_call | -| main.rs:342:5:342:35 | data_out_of_call_side_effect1(...) | main.rs:35:1:40:1 | fn data_out_of_call_side_effect1 | -| main.rs:343:5:343:35 | data_out_of_call_side_effect2(...) | main.rs:42:1:50:1 | fn data_out_of_call_side_effect2 | -| main.rs:344:5:344:21 | data_in_to_call(...) | main.rs:56:1:59:1 | fn data_in_to_call | -| main.rs:345:5:345:23 | data_through_call(...) | main.rs:65:1:69:1 | fn data_through_call | -| main.rs:346:5:346:34 | data_through_nested_function(...) | main.rs:79:1:88:1 | fn data_through_nested_function | -| main.rs:348:5:348:24 | data_out_of_method(...) | main.rs:136:1:146:1 | fn data_out_of_method | -| main.rs:349:5:349:28 | data_in_to_method_call(...) | main.rs:153:1:163:1 | fn data_in_to_method_call | -| main.rs:350:5:350:25 | data_through_method(...) | main.rs:171:1:183:1 | fn data_through_method | -| main.rs:352:5:352:31 | test_operator_overloading(...) | main.rs:240:1:278:1 | fn test_operator_overloading | -| main.rs:353:5:353:22 | test_async_await(...) | main.rs:333:1:338:1 | fn test_async_await | +| main.rs:347:13:347:29 | self.get_number() | main.rs:358:9:360:9 | fn get_number | +| main.rs:347:13:347:29 | self.get_number() | main.rs:366:9:368:9 | fn get_number | +| main.rs:347:13:347:33 | ... * ... | {EXTERNAL LOCATION} | fn mul | +| main.rs:351:13:351:21 | source(...) | main.rs:1:1:3:1 | fn source | +| main.rs:359:13:359:21 | source(...) | main.rs:1:1:3:1 | fn source | +| main.rs:371:13:371:22 | source(...) | main.rs:1:1:3:1 | fn source | +| main.rs:375:13:375:21 | source(...) | main.rs:1:1:3:1 | fn source | +| main.rs:383:18:383:38 | t.get_double_number() | main.rs:346:9:348:9 | fn get_double_number | +| main.rs:384:9:384:16 | sink(...) | main.rs:5:1:7:1 | fn sink | +| main.rs:387:18:387:50 | ...::get_double_number(...) | main.rs:346:9:348:9 | fn get_double_number | +| main.rs:388:9:388:16 | sink(...) | main.rs:5:1:7:1 | fn sink | +| main.rs:391:18:391:37 | ...::get_default(...) | main.rs:350:9:352:9 | fn get_default | +| main.rs:392:9:392:16 | sink(...) | main.rs:5:1:7:1 | fn sink | +| main.rs:395:18:395:38 | i.get_double_number() | main.rs:370:9:372:9 | fn get_double_number | +| main.rs:396:9:396:16 | sink(...) | main.rs:5:1:7:1 | fn sink | +| main.rs:398:18:398:41 | ...::get_default(...) | main.rs:374:9:376:9 | fn get_default | +| main.rs:399:9:399:16 | sink(...) | main.rs:5:1:7:1 | fn sink | +| main.rs:404:5:404:22 | data_out_of_call(...) | main.rs:16:1:19:1 | fn data_out_of_call | +| main.rs:405:5:405:35 | data_out_of_call_side_effect1(...) | main.rs:35:1:40:1 | fn data_out_of_call_side_effect1 | +| main.rs:406:5:406:35 | data_out_of_call_side_effect2(...) | main.rs:42:1:50:1 | fn data_out_of_call_side_effect2 | +| main.rs:407:5:407:21 | data_in_to_call(...) | main.rs:56:1:59:1 | fn data_in_to_call | +| main.rs:408:5:408:23 | data_through_call(...) | main.rs:65:1:69:1 | fn data_through_call | +| main.rs:409:5:409:34 | data_through_nested_function(...) | main.rs:79:1:88:1 | fn data_through_nested_function | +| main.rs:411:5:411:24 | data_out_of_method(...) | main.rs:136:1:146:1 | fn data_out_of_method | +| main.rs:412:5:412:28 | data_in_to_method_call(...) | main.rs:153:1:163:1 | fn data_in_to_method_call | +| main.rs:413:5:413:25 | data_through_method(...) | main.rs:171:1:183:1 | fn data_through_method | +| main.rs:415:5:415:31 | test_operator_overloading(...) | main.rs:240:1:278:1 | fn test_operator_overloading | +| main.rs:416:5:416:22 | test_async_await(...) | main.rs:333:1:338:1 | fn test_async_await | diff --git a/rust/ql/test/library-tests/dataflow/lambdas/inline-flow.ql b/rust/ql/test/library-tests/dataflow/lambdas/inline-flow.ql index e399ea0e5d7..5dcb7ee70a9 100644 --- a/rust/ql/test/library-tests/dataflow/lambdas/inline-flow.ql +++ b/rust/ql/test/library-tests/dataflow/lambdas/inline-flow.ql @@ -5,8 +5,8 @@ import rust import utils.test.InlineFlowTest import DefaultFlowTest -import ValueFlow::PathGraph +import TaintFlow::PathGraph -from ValueFlow::PathNode source, ValueFlow::PathNode sink -where ValueFlow::flowPath(source, sink) +from TaintFlow::PathNode source, TaintFlow::PathNode sink +where TaintFlow::flowPath(source, sink) select sink, source, sink, "$@", source, source.toString() diff --git a/rust/ql/test/library-tests/dataflow/local/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/local/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 00000000000..f99062c73d1 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/local/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,2 @@ +multipleResolvedTargets +| main.rs:562:10:562:15 | * ... | diff --git a/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected b/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected index 36a1c74018e..d607e5fe31c 100644 --- a/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected +++ b/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected @@ -156,8 +156,6 @@ localStep | main.rs:115:9:115:9 | i | main.rs:115:9:115:9 | [SSA] i | | main.rs:115:9:115:9 | i | main.rs:115:9:115:9 | i | | main.rs:115:13:115:31 | ...::new(...) | main.rs:115:9:115:9 | i | -| main.rs:116:11:116:11 | [post] receiver for i | main.rs:116:11:116:11 | [post] i | -| main.rs:116:11:116:11 | i | main.rs:116:11:116:11 | receiver for i | | main.rs:123:9:123:9 | [SSA] a | main.rs:124:10:124:10 | a | | main.rs:123:9:123:9 | a | main.rs:123:9:123:9 | [SSA] a | | main.rs:123:9:123:9 | a | main.rs:123:9:123:9 | a | @@ -340,32 +338,22 @@ localStep | main.rs:278:9:278:10 | s1 | main.rs:278:9:278:10 | [SSA] s1 | | main.rs:278:9:278:10 | s1 | main.rs:278:9:278:10 | s1 | | main.rs:278:14:278:29 | Some(...) | main.rs:278:9:278:10 | s1 | -| main.rs:279:10:279:11 | [post] receiver for s1 | main.rs:279:10:279:11 | [post] s1 | -| main.rs:279:10:279:11 | s1 | main.rs:279:10:279:11 | receiver for s1 | | main.rs:283:9:283:10 | [SSA] s1 | main.rs:284:10:284:11 | s1 | | main.rs:283:9:283:10 | s1 | main.rs:283:9:283:10 | [SSA] s1 | | main.rs:283:9:283:10 | s1 | main.rs:283:9:283:10 | s1 | | main.rs:283:14:283:29 | Some(...) | main.rs:283:9:283:10 | s1 | -| main.rs:284:10:284:11 | [post] receiver for s1 | main.rs:284:10:284:11 | [post] s1 | -| main.rs:284:10:284:11 | s1 | main.rs:284:10:284:11 | receiver for s1 | | main.rs:286:9:286:10 | [SSA] s2 | main.rs:287:10:287:11 | s2 | | main.rs:286:9:286:10 | s2 | main.rs:286:9:286:10 | [SSA] s2 | | main.rs:286:9:286:10 | s2 | main.rs:286:9:286:10 | s2 | | main.rs:286:14:286:20 | Some(...) | main.rs:286:9:286:10 | s2 | -| main.rs:287:10:287:11 | [post] receiver for s2 | main.rs:287:10:287:11 | [post] s2 | -| main.rs:287:10:287:11 | s2 | main.rs:287:10:287:11 | receiver for s2 | | main.rs:291:9:291:10 | [SSA] s1 | main.rs:292:10:292:11 | s1 | | main.rs:291:9:291:10 | s1 | main.rs:291:9:291:10 | [SSA] s1 | | main.rs:291:9:291:10 | s1 | main.rs:291:9:291:10 | s1 | | main.rs:291:14:291:29 | Some(...) | main.rs:291:9:291:10 | s1 | -| main.rs:292:10:292:11 | [post] receiver for s1 | main.rs:292:10:292:11 | [post] s1 | -| main.rs:292:10:292:11 | s1 | main.rs:292:10:292:11 | receiver for s1 | | main.rs:294:9:294:10 | [SSA] s2 | main.rs:295:10:295:11 | s2 | | main.rs:294:9:294:10 | s2 | main.rs:294:9:294:10 | [SSA] s2 | | main.rs:294:9:294:10 | s2 | main.rs:294:9:294:10 | s2 | | main.rs:294:14:294:17 | None | main.rs:294:9:294:10 | s2 | -| main.rs:295:10:295:11 | [post] receiver for s2 | main.rs:295:10:295:11 | [post] s2 | -| main.rs:295:10:295:11 | s2 | main.rs:295:10:295:11 | receiver for s2 | | main.rs:299:9:299:10 | [SSA] s1 | main.rs:301:14:301:15 | s1 | | main.rs:299:9:299:10 | s1 | main.rs:299:9:299:10 | [SSA] s1 | | main.rs:299:9:299:10 | s1 | main.rs:299:9:299:10 | s1 | @@ -387,20 +375,12 @@ localStep | main.rs:309:9:309:11 | o1a | main.rs:309:9:309:11 | [SSA] o1a | | main.rs:309:9:309:11 | o1a | main.rs:309:9:309:11 | o1a | | main.rs:309:28:309:29 | [post] r1 | main.rs:310:28:310:29 | r1 | -| main.rs:309:28:309:29 | [post] receiver for r1 | main.rs:309:28:309:29 | [post] r1 | -| main.rs:309:28:309:29 | r1 | main.rs:309:28:309:29 | receiver for r1 | | main.rs:309:28:309:29 | r1 | main.rs:310:28:310:29 | r1 | | main.rs:309:28:309:34 | r1.ok() | main.rs:309:9:309:11 | o1a | | main.rs:310:9:310:11 | [SSA] o1b | main.rs:312:10:312:12 | o1b | | main.rs:310:9:310:11 | o1b | main.rs:310:9:310:11 | [SSA] o1b | | main.rs:310:9:310:11 | o1b | main.rs:310:9:310:11 | o1b | -| main.rs:310:28:310:29 | [post] receiver for r1 | main.rs:310:28:310:29 | [post] r1 | -| main.rs:310:28:310:29 | r1 | main.rs:310:28:310:29 | receiver for r1 | | main.rs:310:28:310:35 | r1.err() | main.rs:310:9:310:11 | o1b | -| main.rs:311:10:311:12 | [post] receiver for o1a | main.rs:311:10:311:12 | [post] o1a | -| main.rs:311:10:311:12 | o1a | main.rs:311:10:311:12 | receiver for o1a | -| main.rs:312:10:312:12 | [post] receiver for o1b | main.rs:312:10:312:12 | [post] o1b | -| main.rs:312:10:312:12 | o1b | main.rs:312:10:312:12 | receiver for o1b | | main.rs:314:9:314:10 | [SSA] r2 | main.rs:315:28:315:29 | r2 | | main.rs:314:9:314:10 | r2 | main.rs:314:9:314:10 | [SSA] r2 | | main.rs:314:9:314:10 | r2 | main.rs:314:9:314:10 | r2 | @@ -409,20 +389,12 @@ localStep | main.rs:315:9:315:11 | o2a | main.rs:315:9:315:11 | [SSA] o2a | | main.rs:315:9:315:11 | o2a | main.rs:315:9:315:11 | o2a | | main.rs:315:28:315:29 | [post] r2 | main.rs:316:28:316:29 | r2 | -| main.rs:315:28:315:29 | [post] receiver for r2 | main.rs:315:28:315:29 | [post] r2 | -| main.rs:315:28:315:29 | r2 | main.rs:315:28:315:29 | receiver for r2 | | main.rs:315:28:315:29 | r2 | main.rs:316:28:316:29 | r2 | | main.rs:315:28:315:34 | r2.ok() | main.rs:315:9:315:11 | o2a | | main.rs:316:9:316:11 | [SSA] o2b | main.rs:318:10:318:12 | o2b | | main.rs:316:9:316:11 | o2b | main.rs:316:9:316:11 | [SSA] o2b | | main.rs:316:9:316:11 | o2b | main.rs:316:9:316:11 | o2b | -| main.rs:316:28:316:29 | [post] receiver for r2 | main.rs:316:28:316:29 | [post] r2 | -| main.rs:316:28:316:29 | r2 | main.rs:316:28:316:29 | receiver for r2 | | main.rs:316:28:316:35 | r2.err() | main.rs:316:9:316:11 | o2b | -| main.rs:317:10:317:12 | [post] receiver for o2a | main.rs:317:10:317:12 | [post] o2a | -| main.rs:317:10:317:12 | o2a | main.rs:317:10:317:12 | receiver for o2a | -| main.rs:318:10:318:12 | [post] receiver for o2b | main.rs:318:10:318:12 | [post] o2b | -| main.rs:318:10:318:12 | o2b | main.rs:318:10:318:12 | receiver for o2b | | main.rs:322:9:322:10 | [SSA] s1 | main.rs:325:14:325:15 | s1 | | main.rs:322:9:322:10 | s1 | main.rs:322:9:322:10 | [SSA] s1 | | main.rs:322:9:322:10 | s1 | main.rs:322:9:322:10 | s1 | @@ -452,22 +424,14 @@ localStep | main.rs:335:9:335:10 | s1 | main.rs:335:9:335:10 | [SSA] s1 | | main.rs:335:9:335:10 | s1 | main.rs:335:9:335:10 | s1 | | main.rs:335:32:335:45 | Ok(...) | main.rs:335:9:335:10 | s1 | -| main.rs:336:10:336:11 | [post] receiver for s1 | main.rs:336:10:336:11 | [post] s1 | | main.rs:336:10:336:11 | [post] s1 | main.rs:337:10:337:11 | s1 | -| main.rs:336:10:336:11 | s1 | main.rs:336:10:336:11 | receiver for s1 | | main.rs:336:10:336:11 | s1 | main.rs:337:10:337:11 | s1 | -| main.rs:337:10:337:11 | [post] receiver for s1 | main.rs:337:10:337:11 | [post] s1 | -| main.rs:337:10:337:11 | s1 | main.rs:337:10:337:11 | receiver for s1 | | main.rs:339:9:339:10 | [SSA] s2 | main.rs:340:10:340:11 | s2 | | main.rs:339:9:339:10 | s2 | main.rs:339:9:339:10 | [SSA] s2 | | main.rs:339:9:339:10 | s2 | main.rs:339:9:339:10 | s2 | | main.rs:339:32:339:46 | Err(...) | main.rs:339:9:339:10 | s2 | -| main.rs:340:10:340:11 | [post] receiver for s2 | main.rs:340:10:340:11 | [post] s2 | | main.rs:340:10:340:11 | [post] s2 | main.rs:341:10:341:11 | s2 | -| main.rs:340:10:340:11 | s2 | main.rs:340:10:340:11 | receiver for s2 | | main.rs:340:10:340:11 | s2 | main.rs:341:10:341:11 | s2 | -| main.rs:341:10:341:11 | [post] receiver for s2 | main.rs:341:10:341:11 | [post] s2 | -| main.rs:341:10:341:11 | s2 | main.rs:341:10:341:11 | receiver for s2 | | main.rs:350:9:350:10 | [SSA] s1 | main.rs:352:11:352:12 | s1 | | main.rs:350:9:350:10 | s1 | main.rs:350:9:350:10 | [SSA] s1 | | main.rs:350:9:350:10 | s1 | main.rs:350:9:350:10 | s1 | @@ -704,8 +668,6 @@ localStep | main.rs:478:39:478:72 | ...: Vec::<...> | main.rs:478:39:478:43 | names | | main.rs:479:9:479:20 | default_name | main.rs:479:9:479:20 | [SSA] default_name | | main.rs:479:9:479:20 | default_name | main.rs:479:9:479:20 | default_name | -| main.rs:479:24:479:33 | [post] receiver for source(...) | main.rs:479:24:479:33 | [post] source(...) | -| main.rs:479:24:479:33 | source(...) | main.rs:479:24:479:33 | receiver for source(...) | | main.rs:479:24:479:45 | ... .to_string() | main.rs:479:9:479:20 | default_name | | main.rs:479:24:479:45 | ... .to_string() | main.rs:480:9:480:20 | SSA phi read(default_name) | | main.rs:480:5:486:5 | for ... in ... { ... } | main.rs:478:75:487:1 | { ... } | @@ -721,16 +683,10 @@ localStep | main.rs:482:17:482:17 | [SSA] n | main.rs:483:18:483:18 | n | | main.rs:482:17:482:17 | n | main.rs:482:17:482:17 | [SSA] n | | main.rs:482:17:482:17 | n | main.rs:482:17:482:17 | n | -| main.rs:482:21:482:24 | [post] receiver for name | main.rs:482:21:482:24 | [post] name | -| main.rs:482:21:482:24 | name | main.rs:482:21:482:24 | receiver for name | | main.rs:482:21:482:68 | name.unwrap_or_else(...) | main.rs:482:17:482:17 | n | | main.rs:482:41:482:67 | [post] default_name | main.rs:480:9:480:20 | SSA phi read(default_name) | | main.rs:482:41:482:67 | closure self in \|...\| ... | main.rs:482:44:482:55 | this | | main.rs:482:41:482:67 | default_name | main.rs:480:9:480:20 | SSA phi read(default_name) | -| main.rs:482:44:482:55 | [post] receiver for default_name | main.rs:482:44:482:55 | [post] default_name | -| main.rs:482:44:482:55 | default_name | main.rs:482:44:482:55 | receiver for default_name | -| main.rs:483:18:483:18 | [post] receiver for n | main.rs:483:18:483:18 | [post] n | -| main.rs:483:18:483:18 | n | main.rs:483:18:483:18 | receiver for n | | main.rs:496:9:496:9 | [SSA] s | main.rs:497:10:497:10 | s | | main.rs:496:9:496:9 | s | main.rs:496:9:496:9 | [SSA] s | | main.rs:496:9:496:9 | s | main.rs:496:9:496:9 | s | @@ -752,29 +708,19 @@ localStep | main.rs:506:9:506:9 | b | main.rs:506:9:506:9 | [SSA] b | | main.rs:506:9:506:9 | b | main.rs:506:9:506:9 | b | | main.rs:506:13:506:13 | [post] a | main.rs:510:10:510:10 | a | -| main.rs:506:13:506:13 | [post] receiver for a | main.rs:506:13:506:13 | [post] a | -| main.rs:506:13:506:13 | a | main.rs:506:13:506:13 | receiver for a | | main.rs:506:13:506:13 | a | main.rs:510:10:510:10 | a | | main.rs:506:13:506:25 | a.to_string() | main.rs:506:9:506:9 | b | | main.rs:507:9:507:9 | [SSA] c | main.rs:512:10:512:10 | c | | main.rs:507:9:507:9 | c | main.rs:507:9:507:9 | [SSA] c | | main.rs:507:9:507:9 | c | main.rs:507:9:507:9 | c | | main.rs:507:13:507:13 | [post] b | main.rs:508:18:508:18 | b | -| main.rs:507:13:507:13 | [post] receiver for b | main.rs:507:13:507:13 | [post] b | -| main.rs:507:13:507:13 | b | main.rs:507:13:507:13 | receiver for b | | main.rs:507:13:507:13 | b | main.rs:508:18:508:18 | b | -| main.rs:507:13:507:28 | [post] receiver for b.parse() | main.rs:507:13:507:28 | [post] b.parse() | -| main.rs:507:13:507:28 | b.parse() | main.rs:507:13:507:28 | receiver for b.parse() | | main.rs:507:13:507:37 | ... .unwrap() | main.rs:507:9:507:9 | c | | main.rs:508:9:508:9 | [SSA] d | main.rs:513:10:513:10 | d | | main.rs:508:9:508:9 | d | main.rs:508:9:508:9 | [SSA] d | | main.rs:508:9:508:9 | d | main.rs:508:9:508:9 | d | | main.rs:508:18:508:18 | [post] b | main.rs:511:17:511:17 | b | -| main.rs:508:18:508:18 | [post] receiver for b | main.rs:508:18:508:18 | [post] b | -| main.rs:508:18:508:18 | b | main.rs:508:18:508:18 | receiver for b | | main.rs:508:18:508:18 | b | main.rs:511:17:511:17 | b | -| main.rs:508:18:508:26 | [post] receiver for b.parse() | main.rs:508:18:508:26 | [post] b.parse() | -| main.rs:508:18:508:26 | b.parse() | main.rs:508:18:508:26 | receiver for b.parse() | | main.rs:508:18:508:35 | ... .unwrap() | main.rs:508:9:508:9 | d | | main.rs:517:9:517:10 | [SSA] vs | main.rs:519:10:519:11 | vs | | main.rs:517:9:517:10 | vs | main.rs:517:9:517:10 | [SSA] vs | @@ -782,26 +728,10 @@ localStep | main.rs:517:14:517:34 | [...] | main.rs:517:9:517:10 | vs | | main.rs:519:10:519:11 | [post] vs | main.rs:520:11:520:12 | vs | | main.rs:519:10:519:11 | vs | main.rs:520:11:520:12 | vs | -| main.rs:520:11:520:12 | [post] receiver for vs | main.rs:520:11:520:12 | [post] vs | | main.rs:520:11:520:12 | [post] vs | main.rs:521:11:521:12 | vs | -| main.rs:520:11:520:12 | vs | main.rs:520:11:520:12 | receiver for vs | | main.rs:520:11:520:12 | vs | main.rs:521:11:521:12 | vs | -| main.rs:520:11:520:19 | [post] receiver for vs.iter() | main.rs:520:11:520:19 | [post] vs.iter() | -| main.rs:520:11:520:19 | vs.iter() | main.rs:520:11:520:19 | receiver for vs.iter() | -| main.rs:520:11:520:26 | ... .next() | main.rs:520:11:520:26 | receiver for ... .next() | -| main.rs:520:11:520:26 | [post] receiver for ... .next() | main.rs:520:11:520:26 | [post] ... .next() | -| main.rs:520:11:520:35 | ... .unwrap() | main.rs:520:11:520:35 | receiver for ... .unwrap() | -| main.rs:520:11:520:35 | [post] receiver for ... .unwrap() | main.rs:520:11:520:35 | [post] ... .unwrap() | -| main.rs:521:11:521:12 | [post] receiver for vs | main.rs:521:11:521:12 | [post] vs | | main.rs:521:11:521:12 | [post] vs | main.rs:523:14:523:15 | vs | -| main.rs:521:11:521:12 | vs | main.rs:521:11:521:12 | receiver for vs | | main.rs:521:11:521:12 | vs | main.rs:523:14:523:15 | vs | -| main.rs:521:11:521:19 | [post] receiver for vs.iter() | main.rs:521:11:521:19 | [post] vs.iter() | -| main.rs:521:11:521:19 | vs.iter() | main.rs:521:11:521:19 | receiver for vs.iter() | -| main.rs:521:11:521:26 | ... .nth(...) | main.rs:521:11:521:26 | receiver for ... .nth(...) | -| main.rs:521:11:521:26 | [post] receiver for ... .nth(...) | main.rs:521:11:521:26 | [post] ... .nth(...) | -| main.rs:521:11:521:35 | ... .unwrap() | main.rs:521:11:521:35 | receiver for ... .unwrap() | -| main.rs:521:11:521:35 | [post] receiver for ... .unwrap() | main.rs:521:11:521:35 | [post] ... .unwrap() | | main.rs:523:9:523:9 | [SSA] v | main.rs:524:14:524:14 | v | | main.rs:523:9:523:9 | v | main.rs:523:9:523:9 | [SSA] v | | main.rs:523:9:523:9 | v | main.rs:523:9:523:9 | v | @@ -809,52 +739,32 @@ localStep | main.rs:526:10:526:10 | [SSA] v | main.rs:527:14:527:14 | v | | main.rs:526:10:526:10 | v | main.rs:526:10:526:10 | [SSA] v | | main.rs:526:10:526:10 | v | main.rs:526:10:526:10 | v | -| main.rs:526:15:526:16 | [post] receiver for vs | main.rs:526:15:526:16 | [post] vs | | main.rs:526:15:526:16 | [post] vs | main.rs:530:26:530:27 | vs | -| main.rs:526:15:526:16 | vs | main.rs:526:15:526:16 | receiver for vs | | main.rs:526:15:526:16 | vs | main.rs:530:26:530:27 | vs | | main.rs:530:9:530:11 | [SSA] vs2 | main.rs:531:15:531:17 | vs2 | | main.rs:530:9:530:11 | vs2 | main.rs:530:9:530:11 | [SSA] vs2 | | main.rs:530:9:530:11 | vs2 | main.rs:530:9:530:11 | vs2 | -| main.rs:530:26:530:27 | [post] receiver for vs | main.rs:530:26:530:27 | [post] vs | | main.rs:530:26:530:27 | [post] vs | main.rs:535:5:535:6 | vs | -| main.rs:530:26:530:27 | vs | main.rs:530:26:530:27 | receiver for vs | | main.rs:530:26:530:27 | vs | main.rs:535:5:535:6 | vs | -| main.rs:530:26:530:34 | [post] receiver for vs.iter() | main.rs:530:26:530:34 | [post] vs.iter() | -| main.rs:530:26:530:34 | vs.iter() | main.rs:530:26:530:34 | receiver for vs.iter() | | main.rs:530:26:530:44 | ... .collect() | main.rs:530:9:530:11 | vs2 | | main.rs:531:10:531:10 | [SSA] v | main.rs:532:14:532:14 | v | | main.rs:531:10:531:10 | v | main.rs:531:10:531:10 | [SSA] v | | main.rs:531:10:531:10 | v | main.rs:531:10:531:10 | v | -| main.rs:535:5:535:6 | [post] receiver for vs | main.rs:535:5:535:6 | [post] vs | | main.rs:535:5:535:6 | [post] vs | main.rs:536:5:536:6 | vs | -| main.rs:535:5:535:6 | vs | main.rs:535:5:535:6 | receiver for vs | | main.rs:535:5:535:6 | vs | main.rs:536:5:536:6 | vs | -| main.rs:535:5:535:13 | [post] receiver for vs.iter() | main.rs:535:5:535:13 | [post] vs.iter() | -| main.rs:535:5:535:13 | vs.iter() | main.rs:535:5:535:13 | receiver for vs.iter() | | main.rs:535:20:535:20 | ... | main.rs:535:20:535:20 | x | | main.rs:535:20:535:20 | [SSA] x | main.rs:535:29:535:29 | x | | main.rs:535:20:535:20 | x | main.rs:535:20:535:20 | [SSA] x | | main.rs:535:20:535:20 | x | main.rs:535:20:535:20 | x | -| main.rs:535:29:535:29 | [post] receiver for x | main.rs:535:29:535:29 | [post] x | -| main.rs:535:29:535:29 | x | main.rs:535:29:535:29 | receiver for x | -| main.rs:536:5:536:6 | [post] receiver for vs | main.rs:536:5:536:6 | [post] vs | | main.rs:536:5:536:6 | [post] vs | main.rs:538:14:538:15 | vs | -| main.rs:536:5:536:6 | vs | main.rs:536:5:536:6 | receiver for vs | | main.rs:536:5:536:6 | vs | main.rs:538:14:538:15 | vs | -| main.rs:536:5:536:13 | [post] receiver for vs.iter() | main.rs:536:5:536:13 | [post] vs.iter() | -| main.rs:536:5:536:13 | vs.iter() | main.rs:536:5:536:13 | receiver for vs.iter() | | main.rs:536:25:536:25 | ... | main.rs:536:25:536:25 | x | | main.rs:536:25:536:25 | [SSA] x | main.rs:536:34:536:34 | x | | main.rs:536:25:536:25 | x | main.rs:536:25:536:25 | [SSA] x | | main.rs:536:25:536:25 | x | main.rs:536:25:536:25 | x | -| main.rs:536:34:536:34 | [post] receiver for x | main.rs:536:34:536:34 | [post] x | -| main.rs:536:34:536:34 | x | main.rs:536:34:536:34 | receiver for x | | main.rs:538:9:538:9 | [SSA] v | main.rs:539:14:539:14 | v | | main.rs:538:9:538:9 | v | main.rs:538:9:538:9 | [SSA] v | | main.rs:538:9:538:9 | v | main.rs:538:9:538:9 | v | -| main.rs:538:14:538:15 | [post] receiver for vs | main.rs:538:14:538:15 | [post] vs | -| main.rs:538:14:538:15 | vs | main.rs:538:14:538:15 | receiver for vs | | main.rs:542:9:542:18 | mut vs_mut | main.rs:542:13:542:18 | vs_mut | | main.rs:542:13:542:18 | [SSA] vs_mut | main.rs:544:10:544:15 | vs_mut | | main.rs:542:13:542:18 | vs_mut | main.rs:542:13:542:18 | [SSA] vs_mut | @@ -865,35 +775,17 @@ localStep | main.rs:544:10:544:15 | vs_mut | main.rs:545:11:545:16 | vs_mut | | main.rs:545:11:545:16 | [SSA] vs_mut | main.rs:546:11:546:16 | [SSA] vs_mut | | main.rs:545:11:545:16 | [SSA] vs_mut | main.rs:546:11:546:16 | vs_mut | -| main.rs:545:11:545:16 | [post] receiver for vs_mut | main.rs:545:11:545:16 | [post] vs_mut | | main.rs:545:11:545:16 | [post] vs_mut | main.rs:546:11:546:16 | [SSA] vs_mut | | main.rs:545:11:545:16 | [post] vs_mut | main.rs:546:11:546:16 | vs_mut | -| main.rs:545:11:545:16 | vs_mut | main.rs:545:11:545:16 | receiver for vs_mut | | main.rs:545:11:545:16 | vs_mut | main.rs:546:11:546:16 | [SSA] vs_mut | | main.rs:545:11:545:16 | vs_mut | main.rs:546:11:546:16 | vs_mut | -| main.rs:545:11:545:23 | [post] receiver for vs_mut.iter() | main.rs:545:11:545:23 | [post] vs_mut.iter() | -| main.rs:545:11:545:23 | vs_mut.iter() | main.rs:545:11:545:23 | receiver for vs_mut.iter() | -| main.rs:545:11:545:30 | ... .next() | main.rs:545:11:545:30 | receiver for ... .next() | -| main.rs:545:11:545:30 | [post] receiver for ... .next() | main.rs:545:11:545:30 | [post] ... .next() | -| main.rs:545:11:545:39 | ... .unwrap() | main.rs:545:11:545:39 | receiver for ... .unwrap() | -| main.rs:545:11:545:39 | [post] receiver for ... .unwrap() | main.rs:545:11:545:39 | [post] ... .unwrap() | | main.rs:546:11:546:16 | [SSA] vs_mut | main.rs:548:19:548:24 | vs_mut | -| main.rs:546:11:546:16 | [post] receiver for vs_mut | main.rs:546:11:546:16 | [post] vs_mut | | main.rs:546:11:546:16 | [post] vs_mut | main.rs:548:19:548:24 | vs_mut | -| main.rs:546:11:546:16 | vs_mut | main.rs:546:11:546:16 | receiver for vs_mut | | main.rs:546:11:546:16 | vs_mut | main.rs:548:19:548:24 | vs_mut | -| main.rs:546:11:546:23 | [post] receiver for vs_mut.iter() | main.rs:546:11:546:23 | [post] vs_mut.iter() | -| main.rs:546:11:546:23 | vs_mut.iter() | main.rs:546:11:546:23 | receiver for vs_mut.iter() | -| main.rs:546:11:546:30 | ... .nth(...) | main.rs:546:11:546:30 | receiver for ... .nth(...) | -| main.rs:546:11:546:30 | [post] receiver for ... .nth(...) | main.rs:546:11:546:30 | [post] ... .nth(...) | -| main.rs:546:11:546:39 | ... .unwrap() | main.rs:546:11:546:39 | receiver for ... .unwrap() | -| main.rs:546:11:546:39 | [post] receiver for ... .unwrap() | main.rs:546:11:546:39 | [post] ... .unwrap() | | main.rs:548:5:550:5 | for ... in ... { ... } | main.rs:516:16:551:1 | { ... } | | main.rs:548:14:548:14 | [SSA] v | main.rs:549:14:549:14 | v | | main.rs:548:14:548:14 | v | main.rs:548:14:548:14 | [SSA] v | | main.rs:548:14:548:14 | v | main.rs:548:14:548:14 | v | -| main.rs:548:19:548:24 | [post] receiver for vs_mut | main.rs:548:19:548:24 | [post] vs_mut | -| main.rs:548:19:548:24 | vs_mut | main.rs:548:19:548:24 | receiver for vs_mut | | main.rs:554:9:554:9 | [SSA] a | main.rs:559:10:559:10 | a | | main.rs:554:9:554:9 | a | main.rs:554:9:554:9 | [SSA] a | | main.rs:554:9:554:9 | a | main.rs:554:9:554:9 | a | @@ -912,8 +804,6 @@ localStep | main.rs:557:17:557:18 | &c | main.rs:557:9:557:13 | c_ref | | main.rs:561:14:561:18 | [post] c_ref | main.rs:562:11:562:15 | c_ref | | main.rs:561:14:561:18 | c_ref | main.rs:562:11:562:15 | c_ref | -| main.rs:562:11:562:15 | [post] receiver for c_ref | main.rs:562:11:562:15 | [post] c_ref | -| main.rs:562:11:562:15 | c_ref | main.rs:562:11:562:15 | receiver for c_ref | | main.rs:566:9:566:9 | [SSA] a | main.rs:568:10:568:10 | a | | main.rs:566:9:566:9 | a | main.rs:566:9:566:9 | [SSA] a | | main.rs:566:9:566:9 | a | main.rs:566:9:566:9 | a | @@ -921,8 +811,6 @@ localStep | main.rs:568:10:568:10 | [post] a | main.rs:569:10:569:10 | a | | main.rs:568:10:568:10 | a | main.rs:569:10:569:10 | a | | main.rs:569:10:569:10 | [post] a | main.rs:570:20:570:20 | a | -| main.rs:569:10:569:10 | [post] receiver for a | main.rs:569:10:569:10 | [post] a | -| main.rs:569:10:569:10 | a | main.rs:569:10:569:10 | receiver for a | | main.rs:569:10:569:10 | a | main.rs:570:20:570:20 | a | | main.rs:572:9:572:9 | [SSA] b | main.rs:574:10:574:10 | b | | main.rs:572:9:572:9 | b | main.rs:572:9:572:9 | [SSA] b | @@ -931,16 +819,14 @@ localStep | main.rs:574:10:574:10 | [post] b | main.rs:575:10:575:10 | b | | main.rs:574:10:574:10 | b | main.rs:575:10:575:10 | b | | main.rs:575:10:575:10 | [post] b | main.rs:576:20:576:20 | b | -| main.rs:575:10:575:10 | [post] receiver for b | main.rs:575:10:575:10 | [post] b | -| main.rs:575:10:575:10 | b | main.rs:575:10:575:10 | receiver for b | | main.rs:575:10:575:10 | b | main.rs:576:20:576:20 | b | | main.rs:604:13:604:33 | result_questionmark(...) | main.rs:604:9:604:9 | _ | | main.rs:616:36:616:39 | ...::new(...) | main.rs:616:36:616:41 | MacroExpr | | main.rs:616:36:616:41 | [post] MacroExpr | main.rs:616:36:616:39 | [post] ...::new(...) | readStep | main.rs:50:9:50:15 | Some(...) | {EXTERNAL LOCATION} | Some | main.rs:50:14:50:14 | _ | -| main.rs:116:11:116:11 | [post] receiver for i | file://:0:0:0:0 | &ref | main.rs:116:11:116:11 | [post] i | -| main.rs:116:11:116:11 | i | file://:0:0:0:0 | &ref | main.rs:116:10:116:11 | * ... | +| main.rs:116:10:116:11 | * ... [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:116:10:116:11 | * ... | +| main.rs:116:11:116:11 | [post] i [borrowed] | file://:0:0:0:0 | &ref | main.rs:116:11:116:11 | [post] i | | main.rs:124:10:124:10 | a | file://:0:0:0:0 | tuple.0 | main.rs:124:10:124:12 | a.0 | | main.rs:125:10:125:10 | a | file://:0:0:0:0 | tuple.1 | main.rs:125:10:125:12 | a.1 | | main.rs:130:9:130:20 | TuplePat | file://:0:0:0:0 | tuple.0 | main.rs:130:10:130:11 | a0 | @@ -1018,53 +904,62 @@ readStep | main.rs:418:28:418:43 | D {...} | main.rs:385:9:385:20 | D | main.rs:418:41:418:41 | n | | main.rs:421:9:421:24 | C {...} | main.rs:384:9:384:20 | C | main.rs:421:22:421:22 | n | | main.rs:422:9:422:24 | D {...} | main.rs:385:9:385:20 | D | main.rs:422:22:422:22 | n | -| main.rs:431:14:431:17 | arr1 | file://:0:0:0:0 | element | main.rs:431:14:431:20 | arr1[2] | -| main.rs:435:14:435:17 | arr2 | file://:0:0:0:0 | element | main.rs:435:14:435:20 | arr2[4] | -| main.rs:439:14:439:17 | arr3 | file://:0:0:0:0 | element | main.rs:439:14:439:20 | arr3[2] | +| main.rs:431:14:431:17 | [post] arr1 [borrowed] | file://:0:0:0:0 | &ref | main.rs:431:14:431:17 | [post] arr1 | +| main.rs:431:14:431:20 | arr1[2] [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:431:14:431:20 | arr1[2] | +| main.rs:435:14:435:17 | [post] arr2 [borrowed] | file://:0:0:0:0 | &ref | main.rs:435:14:435:17 | [post] arr2 | +| main.rs:435:14:435:20 | arr2[4] [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:435:14:435:20 | arr2[4] | +| main.rs:439:14:439:17 | [post] arr3 [borrowed] | file://:0:0:0:0 | &ref | main.rs:439:14:439:17 | [post] arr3 | +| main.rs:439:14:439:20 | arr3[2] [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:439:14:439:20 | arr3[2] | | main.rs:445:15:445:18 | arr1 | file://:0:0:0:0 | element | main.rs:445:9:445:10 | n1 | | main.rs:450:15:450:18 | arr2 | file://:0:0:0:0 | element | main.rs:450:9:450:10 | n2 | | main.rs:458:9:458:17 | SlicePat | file://:0:0:0:0 | element | main.rs:458:10:458:10 | a | | main.rs:458:9:458:17 | SlicePat | file://:0:0:0:0 | element | main.rs:458:13:458:13 | b | | main.rs:458:9:458:17 | SlicePat | file://:0:0:0:0 | element | main.rs:458:16:458:16 | c | -| main.rs:468:10:468:16 | mut_arr | file://:0:0:0:0 | element | main.rs:468:10:468:19 | mut_arr[1] | -| main.rs:470:5:470:11 | mut_arr | file://:0:0:0:0 | element | main.rs:470:5:470:14 | mut_arr[1] | -| main.rs:471:13:471:19 | mut_arr | file://:0:0:0:0 | element | main.rs:471:13:471:22 | mut_arr[1] | -| main.rs:473:10:473:16 | mut_arr | file://:0:0:0:0 | element | main.rs:473:10:473:19 | mut_arr[0] | -| main.rs:479:24:479:33 | [post] receiver for source(...) | file://:0:0:0:0 | &ref | main.rs:479:24:479:33 | [post] source(...) | +| main.rs:468:10:468:16 | [post] mut_arr [borrowed] | file://:0:0:0:0 | &ref | main.rs:468:10:468:16 | [post] mut_arr | +| main.rs:468:10:468:19 | mut_arr[1] [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:468:10:468:19 | mut_arr[1] | +| main.rs:470:5:470:11 | [post] mut_arr [borrowed] | file://:0:0:0:0 | &ref | main.rs:470:5:470:11 | [post] mut_arr | +| main.rs:470:5:470:14 | mut_arr[1] [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:470:5:470:14 | mut_arr[1] | +| main.rs:471:13:471:19 | [post] mut_arr [borrowed] | file://:0:0:0:0 | &ref | main.rs:471:13:471:19 | [post] mut_arr | +| main.rs:471:13:471:22 | mut_arr[1] [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:471:13:471:22 | mut_arr[1] | +| main.rs:473:10:473:16 | [post] mut_arr [borrowed] | file://:0:0:0:0 | &ref | main.rs:473:10:473:16 | [post] mut_arr | +| main.rs:473:10:473:19 | mut_arr[0] [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:473:10:473:19 | mut_arr[0] | +| main.rs:479:24:479:33 | [post] source(...) [borrowed] | file://:0:0:0:0 | &ref | main.rs:479:24:479:33 | [post] source(...) | | main.rs:480:9:480:20 | TuplePat | file://:0:0:0:0 | tuple.0 | main.rs:480:10:480:13 | cond | | main.rs:480:9:480:20 | TuplePat | file://:0:0:0:0 | tuple.1 | main.rs:480:16:480:19 | name | | main.rs:480:25:480:29 | names | file://:0:0:0:0 | element | main.rs:480:9:480:20 | TuplePat | | main.rs:482:41:482:67 | [post] \|...\| ... | main.rs:479:9:479:20 | captured default_name | main.rs:482:41:482:67 | [post] default_name | -| main.rs:482:44:482:55 | [post] receiver for default_name | file://:0:0:0:0 | &ref | main.rs:482:44:482:55 | [post] default_name | +| main.rs:482:44:482:55 | [post] default_name [borrowed] | file://:0:0:0:0 | &ref | main.rs:482:44:482:55 | [post] default_name | | main.rs:482:44:482:55 | this | main.rs:479:9:479:20 | captured default_name | main.rs:482:44:482:55 | default_name | -| main.rs:483:18:483:18 | [post] receiver for n | file://:0:0:0:0 | &ref | main.rs:483:18:483:18 | [post] n | -| main.rs:506:13:506:13 | [post] receiver for a | file://:0:0:0:0 | &ref | main.rs:506:13:506:13 | [post] a | -| main.rs:519:10:519:11 | vs | file://:0:0:0:0 | element | main.rs:519:10:519:14 | vs[0] | -| main.rs:520:11:520:35 | ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:520:10:520:35 | * ... | -| main.rs:520:11:520:35 | [post] receiver for ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:520:11:520:35 | [post] ... .unwrap() | -| main.rs:521:11:521:35 | ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:521:10:521:35 | * ... | -| main.rs:521:11:521:35 | [post] receiver for ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:521:11:521:35 | [post] ... .unwrap() | +| main.rs:483:18:483:18 | [post] n [borrowed] | file://:0:0:0:0 | &ref | main.rs:483:18:483:18 | [post] n | +| main.rs:506:13:506:13 | [post] a [borrowed] | file://:0:0:0:0 | &ref | main.rs:506:13:506:13 | [post] a | +| main.rs:519:10:519:11 | [post] vs [borrowed] | file://:0:0:0:0 | &ref | main.rs:519:10:519:11 | [post] vs | +| main.rs:519:10:519:14 | vs[0] [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:519:10:519:14 | vs[0] | +| main.rs:520:10:520:35 | * ... [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:520:10:520:35 | * ... | +| main.rs:520:11:520:35 | [post] ... .unwrap() [borrowed] | file://:0:0:0:0 | &ref | main.rs:520:11:520:35 | [post] ... .unwrap() | +| main.rs:521:10:521:35 | * ... [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:521:10:521:35 | * ... | +| main.rs:521:11:521:35 | [post] ... .unwrap() [borrowed] | file://:0:0:0:0 | &ref | main.rs:521:11:521:35 | [post] ... .unwrap() | | main.rs:523:14:523:15 | vs | file://:0:0:0:0 | element | main.rs:523:9:523:9 | v | | main.rs:526:9:526:10 | &... | file://:0:0:0:0 | &ref | main.rs:526:10:526:10 | v | | main.rs:526:15:526:23 | vs.iter() | file://:0:0:0:0 | element | main.rs:526:9:526:10 | &... | | main.rs:531:9:531:10 | &... | file://:0:0:0:0 | &ref | main.rs:531:10:531:10 | v | | main.rs:531:15:531:17 | vs2 | file://:0:0:0:0 | element | main.rs:531:9:531:10 | &... | -| main.rs:535:29:535:29 | [post] receiver for x | file://:0:0:0:0 | &ref | main.rs:535:29:535:29 | [post] x | -| main.rs:535:29:535:29 | x | file://:0:0:0:0 | &ref | main.rs:535:28:535:29 | * ... | -| main.rs:536:34:536:34 | [post] receiver for x | file://:0:0:0:0 | &ref | main.rs:536:34:536:34 | [post] x | -| main.rs:536:34:536:34 | x | file://:0:0:0:0 | &ref | main.rs:536:33:536:34 | * ... | +| main.rs:535:28:535:29 | * ... [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:535:28:535:29 | * ... | +| main.rs:535:29:535:29 | [post] x [borrowed] | file://:0:0:0:0 | &ref | main.rs:535:29:535:29 | [post] x | +| main.rs:536:33:536:34 | * ... [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:536:33:536:34 | * ... | +| main.rs:536:34:536:34 | [post] x [borrowed] | file://:0:0:0:0 | &ref | main.rs:536:34:536:34 | [post] x | | main.rs:538:14:538:27 | vs.into_iter() | file://:0:0:0:0 | element | main.rs:538:9:538:9 | v | -| main.rs:544:10:544:15 | vs_mut | file://:0:0:0:0 | element | main.rs:544:10:544:18 | vs_mut[0] | -| main.rs:545:11:545:39 | ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:545:10:545:39 | * ... | -| main.rs:545:11:545:39 | [post] receiver for ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:545:11:545:39 | [post] ... .unwrap() | -| main.rs:546:11:546:39 | ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:546:10:546:39 | * ... | -| main.rs:546:11:546:39 | [post] receiver for ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:546:11:546:39 | [post] ... .unwrap() | +| main.rs:544:10:544:15 | [post] vs_mut [borrowed] | file://:0:0:0:0 | &ref | main.rs:544:10:544:15 | [post] vs_mut | +| main.rs:544:10:544:18 | vs_mut[0] [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:544:10:544:18 | vs_mut[0] | +| main.rs:545:10:545:39 | * ... [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:545:10:545:39 | * ... | +| main.rs:545:11:545:39 | [post] ... .unwrap() [borrowed] | file://:0:0:0:0 | &ref | main.rs:545:11:545:39 | [post] ... .unwrap() | +| main.rs:546:10:546:39 | * ... [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:546:10:546:39 | * ... | +| main.rs:546:11:546:39 | [post] ... .unwrap() [borrowed] | file://:0:0:0:0 | &ref | main.rs:546:11:546:39 | [post] ... .unwrap() | | main.rs:548:9:548:14 | &mut ... | file://:0:0:0:0 | &ref | main.rs:548:14:548:14 | v | | main.rs:548:19:548:35 | vs_mut.iter_mut() | file://:0:0:0:0 | element | main.rs:548:9:548:14 | &mut ... | -| main.rs:562:11:562:15 | [post] receiver for c_ref | file://:0:0:0:0 | &ref | main.rs:562:11:562:15 | [post] c_ref | -| main.rs:562:11:562:15 | c_ref | file://:0:0:0:0 | &ref | main.rs:562:10:562:15 | * ... | +| main.rs:562:10:562:15 | * ... [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:562:10:562:15 | * ... | +| main.rs:562:11:562:15 | [post] c_ref [borrowed] | file://:0:0:0:0 | &ref | main.rs:562:11:562:15 | [post] c_ref | storeStep -| main.rs:116:11:116:11 | i | file://:0:0:0:0 | &ref | main.rs:116:11:116:11 | receiver for i | +| main.rs:116:11:116:11 | i | file://:0:0:0:0 | &ref | main.rs:116:11:116:11 | i [borrowed] | | main.rs:123:14:123:22 | source(...) | file://:0:0:0:0 | tuple.0 | main.rs:123:13:123:26 | TupleExpr | | main.rs:123:25:123:25 | 2 | file://:0:0:0:0 | tuple.1 | main.rs:123:13:123:26 | TupleExpr | | main.rs:129:14:129:14 | 2 | file://:0:0:0:0 | tuple.0 | main.rs:129:13:129:30 | TupleExpr | @@ -1126,10 +1021,13 @@ storeStep | main.rs:430:17:430:17 | 1 | file://:0:0:0:0 | element | main.rs:430:16:430:33 | [...] | | main.rs:430:20:430:20 | 2 | file://:0:0:0:0 | element | main.rs:430:16:430:33 | [...] | | main.rs:430:23:430:32 | source(...) | file://:0:0:0:0 | element | main.rs:430:16:430:33 | [...] | +| main.rs:431:14:431:17 | arr1 | file://:0:0:0:0 | &ref | main.rs:431:14:431:17 | arr1 [borrowed] | | main.rs:434:17:434:26 | source(...) | file://:0:0:0:0 | element | main.rs:434:16:434:31 | [...; 10] | +| main.rs:435:14:435:17 | arr2 | file://:0:0:0:0 | &ref | main.rs:435:14:435:17 | arr2 [borrowed] | | main.rs:438:17:438:17 | 1 | file://:0:0:0:0 | element | main.rs:438:16:438:24 | [...] | | main.rs:438:20:438:20 | 2 | file://:0:0:0:0 | element | main.rs:438:16:438:24 | [...] | | main.rs:438:23:438:23 | 3 | file://:0:0:0:0 | element | main.rs:438:16:438:24 | [...] | +| main.rs:439:14:439:17 | arr3 | file://:0:0:0:0 | &ref | main.rs:439:14:439:17 | arr3 [borrowed] | | main.rs:444:17:444:17 | 1 | file://:0:0:0:0 | element | main.rs:444:16:444:33 | [...] | | main.rs:444:20:444:20 | 2 | file://:0:0:0:0 | element | main.rs:444:16:444:33 | [...] | | main.rs:444:23:444:32 | source(...) | file://:0:0:0:0 | element | main.rs:444:16:444:33 | [...] | @@ -1142,27 +1040,34 @@ storeStep | main.rs:467:24:467:24 | 1 | file://:0:0:0:0 | element | main.rs:467:23:467:31 | [...] | | main.rs:467:27:467:27 | 2 | file://:0:0:0:0 | element | main.rs:467:23:467:31 | [...] | | main.rs:467:30:467:30 | 3 | file://:0:0:0:0 | element | main.rs:467:23:467:31 | [...] | +| main.rs:468:10:468:16 | mut_arr | file://:0:0:0:0 | &ref | main.rs:468:10:468:16 | mut_arr [borrowed] | +| main.rs:470:5:470:11 | mut_arr | file://:0:0:0:0 | &ref | main.rs:470:5:470:11 | mut_arr [borrowed] | +| main.rs:470:18:470:27 | source(...) | file://:0:0:0:0 | &ref | main.rs:470:5:470:14 | [post] mut_arr[1] [pre-dereferenced] | | main.rs:470:18:470:27 | source(...) | file://:0:0:0:0 | element | main.rs:470:5:470:11 | [post] mut_arr | -| main.rs:479:24:479:33 | source(...) | file://:0:0:0:0 | &ref | main.rs:479:24:479:33 | receiver for source(...) | +| main.rs:471:13:471:19 | mut_arr | file://:0:0:0:0 | &ref | main.rs:471:13:471:19 | mut_arr [borrowed] | +| main.rs:473:10:473:16 | mut_arr | file://:0:0:0:0 | &ref | main.rs:473:10:473:16 | mut_arr [borrowed] | +| main.rs:479:24:479:33 | source(...) | file://:0:0:0:0 | &ref | main.rs:479:24:479:33 | source(...) [borrowed] | | main.rs:482:41:482:67 | default_name | main.rs:479:9:479:20 | captured default_name | main.rs:482:41:482:67 | \|...\| ... | -| main.rs:482:44:482:55 | default_name | file://:0:0:0:0 | &ref | main.rs:482:44:482:55 | receiver for default_name | -| main.rs:483:18:483:18 | n | file://:0:0:0:0 | &ref | main.rs:483:18:483:18 | receiver for n | -| main.rs:506:13:506:13 | a | file://:0:0:0:0 | &ref | main.rs:506:13:506:13 | receiver for a | +| main.rs:482:44:482:55 | default_name | file://:0:0:0:0 | &ref | main.rs:482:44:482:55 | default_name [borrowed] | +| main.rs:483:18:483:18 | n | file://:0:0:0:0 | &ref | main.rs:483:18:483:18 | n [borrowed] | +| main.rs:506:13:506:13 | a | file://:0:0:0:0 | &ref | main.rs:506:13:506:13 | a [borrowed] | | main.rs:517:15:517:24 | source(...) | file://:0:0:0:0 | element | main.rs:517:14:517:34 | [...] | | main.rs:517:27:517:27 | 2 | file://:0:0:0:0 | element | main.rs:517:14:517:34 | [...] | | main.rs:517:30:517:30 | 3 | file://:0:0:0:0 | element | main.rs:517:14:517:34 | [...] | | main.rs:517:33:517:33 | 4 | file://:0:0:0:0 | element | main.rs:517:14:517:34 | [...] | -| main.rs:520:11:520:35 | ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:520:11:520:35 | receiver for ... .unwrap() | -| main.rs:521:11:521:35 | ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:521:11:521:35 | receiver for ... .unwrap() | -| main.rs:535:29:535:29 | x | file://:0:0:0:0 | &ref | main.rs:535:29:535:29 | receiver for x | -| main.rs:536:34:536:34 | x | file://:0:0:0:0 | &ref | main.rs:536:34:536:34 | receiver for x | +| main.rs:519:10:519:11 | vs | file://:0:0:0:0 | &ref | main.rs:519:10:519:11 | vs [borrowed] | +| main.rs:520:11:520:35 | ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:520:11:520:35 | ... .unwrap() [borrowed] | +| main.rs:521:11:521:35 | ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:521:11:521:35 | ... .unwrap() [borrowed] | +| main.rs:535:29:535:29 | x | file://:0:0:0:0 | &ref | main.rs:535:29:535:29 | x [borrowed] | +| main.rs:536:34:536:34 | x | file://:0:0:0:0 | &ref | main.rs:536:34:536:34 | x [borrowed] | | main.rs:542:23:542:32 | source(...) | file://:0:0:0:0 | element | main.rs:542:22:542:42 | [...] | | main.rs:542:35:542:35 | 2 | file://:0:0:0:0 | element | main.rs:542:22:542:42 | [...] | | main.rs:542:38:542:38 | 3 | file://:0:0:0:0 | element | main.rs:542:22:542:42 | [...] | | main.rs:542:41:542:41 | 4 | file://:0:0:0:0 | element | main.rs:542:22:542:42 | [...] | -| main.rs:545:11:545:39 | ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:545:11:545:39 | receiver for ... .unwrap() | -| main.rs:546:11:546:39 | ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:546:11:546:39 | receiver for ... .unwrap() | +| main.rs:544:10:544:15 | vs_mut | file://:0:0:0:0 | &ref | main.rs:544:10:544:15 | vs_mut [borrowed] | +| main.rs:545:11:545:39 | ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:545:11:545:39 | ... .unwrap() [borrowed] | +| main.rs:546:11:546:39 | ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:546:11:546:39 | ... .unwrap() [borrowed] | | main.rs:557:18:557:18 | c | file://:0:0:0:0 | &ref | main.rs:557:17:557:18 | &c | | main.rs:560:15:560:15 | b | file://:0:0:0:0 | &ref | main.rs:560:14:560:15 | &b | -| main.rs:562:11:562:15 | c_ref | file://:0:0:0:0 | &ref | main.rs:562:11:562:15 | receiver for c_ref | +| main.rs:562:11:562:15 | c_ref | file://:0:0:0:0 | &ref | main.rs:562:11:562:15 | c_ref [borrowed] | | main.rs:583:27:583:27 | 0 | {EXTERNAL LOCATION} | Some | main.rs:583:22:583:28 | Some(...) | diff --git a/rust/ql/test/library-tests/dataflow/local/inline-flow.expected b/rust/ql/test/library-tests/dataflow/local/inline-flow.expected index 7b6fd011d03..61c4771068b 100644 --- a/rust/ql/test/library-tests/dataflow/local/inline-flow.expected +++ b/rust/ql/test/library-tests/dataflow/local/inline-flow.expected @@ -1,14 +1,22 @@ models -| 1 | Summary: ::new; Argument[0]; ReturnValue.Reference; value | -| 2 | Summary: ::unwrap; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | -| 3 | Summary: ::unwrap_or; Argument[0]; ReturnValue; value | -| 4 | Summary: ::unwrap_or; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | -| 5 | Summary: ::unwrap_or_else; Argument[0].ReturnValue; ReturnValue; value | -| 6 | Summary: ::unwrap_or_else; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | -| 7 | Summary: ::err; Argument[self].Field[core::result::Result::Err(0)]; ReturnValue.Field[core::option::Option::Some(0)]; value | -| 8 | Summary: ::expect; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | -| 9 | Summary: ::expect_err; Argument[self].Field[core::result::Result::Err(0)]; ReturnValue; value | -| 10 | Summary: ::ok; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue.Field[core::option::Option::Some(0)]; value | +| 1 | Summary: <& as core::ops::deref::Deref>::deref; Argument[self].Reference; ReturnValue; value | +| 2 | Summary: <_ as alloc::string::ToString>::to_string; Argument[self].Reference; ReturnValue; taint | +| 3 | Summary: <_ as core::convert::From>::from; Argument[0]; ReturnValue; taint | +| 4 | Summary: <_ as core::ops::index::Index>::index; Argument[self].Reference.Element; ReturnValue.Reference; value | +| 5 | Summary: ::deref; Argument[self].Reference.Field[alloc::boxed::Box(0)]; ReturnValue.Reference; value | +| 6 | Summary: ::new; Argument[0]; ReturnValue.Field[alloc::boxed::Box(0)]; value | +| 7 | Summary: ::from; Argument[0]; ReturnValue; taint | +| 8 | Summary: ::unwrap; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | +| 9 | Summary: ::unwrap_or; Argument[0]; ReturnValue; value | +| 10 | Summary: ::unwrap_or; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | +| 11 | Summary: ::unwrap_or_else; Argument[0].ReturnValue; ReturnValue; value | +| 12 | Summary: ::unwrap_or_else; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | +| 13 | Summary: ::err; Argument[self].Field[core::result::Result::Err(0)]; ReturnValue.Field[core::option::Option::Some(0)]; value | +| 14 | Summary: ::expect; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | +| 15 | Summary: ::expect_err; Argument[self].Field[core::result::Result::Err(0)]; ReturnValue; value | +| 16 | Summary: ::ok; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue.Field[core::option::Option::Some(0)]; value | +| 17 | Summary: ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | +| 18 | Summary: ::parse; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | edges | main.rs:23:9:23:9 | s | main.rs:24:10:24:10 | s | provenance | | | main.rs:23:9:23:9 | s | main.rs:26:12:26:12 | x | provenance | | @@ -34,10 +42,10 @@ edges | main.rs:81:9:81:13 | mut l | main.rs:82:5:82:5 | l | provenance | | | main.rs:81:17:81:25 | source(...) | main.rs:81:9:81:13 | mut l | provenance | | | main.rs:82:5:82:5 | l | main.rs:83:10:83:10 | l | provenance | | -| main.rs:115:9:115:9 | i [&ref] | main.rs:116:11:116:11 | i [&ref] | provenance | | -| main.rs:115:13:115:31 | ...::new(...) [&ref] | main.rs:115:9:115:9 | i [&ref] | provenance | | -| main.rs:115:22:115:30 | source(...) | main.rs:115:13:115:31 | ...::new(...) [&ref] | provenance | MaD:1 | -| main.rs:116:11:116:11 | i [&ref] | main.rs:116:10:116:11 | * ... | provenance | | +| main.rs:115:9:115:9 | i [Box(0)] | main.rs:116:11:116:11 | i [Box(0)] | provenance | | +| main.rs:115:13:115:31 | ...::new(...) [Box(0)] | main.rs:115:9:115:9 | i [Box(0)] | provenance | | +| main.rs:115:22:115:30 | source(...) | main.rs:115:13:115:31 | ...::new(...) [Box(0)] | provenance | MaD:6 | +| main.rs:116:11:116:11 | i [Box(0)] | main.rs:116:10:116:11 | * ... | provenance | MaD:5 | | main.rs:123:9:123:9 | a [tuple.0] | main.rs:124:10:124:10 | a [tuple.0] | provenance | | | main.rs:123:13:123:26 | TupleExpr [tuple.0] | main.rs:123:9:123:9 | a [tuple.0] | provenance | | | main.rs:123:14:123:22 | source(...) | main.rs:123:13:123:26 | TupleExpr [tuple.0] | provenance | | @@ -117,45 +125,54 @@ edges | main.rs:267:12:267:18 | Some(...) [Some] | main.rs:267:17:267:17 | n | provenance | | | main.rs:267:17:267:17 | n | main.rs:269:18:269:18 | n | provenance | | | main.rs:267:17:267:17 | n | main.rs:273:14:273:14 | n | provenance | | -| main.rs:278:9:278:10 | s1 [Some] | main.rs:279:10:279:20 | s1.unwrap() | provenance | MaD:2 | +| main.rs:278:9:278:10 | s1 [Some] | main.rs:279:10:279:11 | s1 [Some] | provenance | | | main.rs:278:14:278:29 | Some(...) [Some] | main.rs:278:9:278:10 | s1 [Some] | provenance | | | main.rs:278:19:278:28 | source(...) | main.rs:278:14:278:29 | Some(...) [Some] | provenance | | -| main.rs:283:9:283:10 | s1 [Some] | main.rs:284:10:284:24 | s1.unwrap_or(...) | provenance | MaD:4 | +| main.rs:279:10:279:11 | s1 [Some] | main.rs:279:10:279:20 | s1.unwrap() | provenance | MaD:8 | +| main.rs:283:9:283:10 | s1 [Some] | main.rs:284:10:284:11 | s1 [Some] | provenance | | | main.rs:283:14:283:29 | Some(...) [Some] | main.rs:283:9:283:10 | s1 [Some] | provenance | | | main.rs:283:19:283:28 | source(...) | main.rs:283:14:283:29 | Some(...) [Some] | provenance | | -| main.rs:287:23:287:32 | source(...) | main.rs:287:10:287:33 | s2.unwrap_or(...) | provenance | MaD:3 | -| main.rs:291:9:291:10 | s1 [Some] | main.rs:292:10:292:32 | s1.unwrap_or_else(...) | provenance | MaD:6 | +| main.rs:284:10:284:11 | s1 [Some] | main.rs:284:10:284:24 | s1.unwrap_or(...) | provenance | MaD:10 | +| main.rs:287:23:287:32 | source(...) | main.rs:287:10:287:33 | s2.unwrap_or(...) | provenance | MaD:9 | +| main.rs:291:9:291:10 | s1 [Some] | main.rs:292:10:292:11 | s1 [Some] | provenance | | | main.rs:291:14:291:29 | Some(...) [Some] | main.rs:291:9:291:10 | s1 [Some] | provenance | | | main.rs:291:19:291:28 | source(...) | main.rs:291:14:291:29 | Some(...) [Some] | provenance | | -| main.rs:295:31:295:40 | source(...) | main.rs:295:10:295:41 | s2.unwrap_or_else(...) | provenance | MaD:5 | +| main.rs:292:10:292:11 | s1 [Some] | main.rs:292:10:292:32 | s1.unwrap_or_else(...) | provenance | MaD:12 | +| main.rs:295:31:295:40 | source(...) | main.rs:295:10:295:41 | s2.unwrap_or_else(...) | provenance | MaD:11 | | main.rs:299:9:299:10 | s1 [Some] | main.rs:301:14:301:15 | s1 [Some] | provenance | | | main.rs:299:14:299:29 | Some(...) [Some] | main.rs:299:9:299:10 | s1 [Some] | provenance | | | main.rs:299:19:299:28 | source(...) | main.rs:299:14:299:29 | Some(...) [Some] | provenance | | | main.rs:301:9:301:10 | i1 | main.rs:302:10:302:11 | i1 | provenance | | | main.rs:301:14:301:15 | s1 [Some] | main.rs:301:14:301:16 | TryExpr | provenance | | | main.rs:301:14:301:16 | TryExpr | main.rs:301:9:301:10 | i1 | provenance | | -| main.rs:308:9:308:10 | r1 [Ok] | main.rs:309:28:309:34 | r1.ok() [Some] | provenance | MaD:10 | +| main.rs:308:9:308:10 | r1 [Ok] | main.rs:309:28:309:29 | r1 [Ok] | provenance | | | main.rs:308:32:308:45 | Ok(...) [Ok] | main.rs:308:9:308:10 | r1 [Ok] | provenance | | | main.rs:308:35:308:44 | source(...) | main.rs:308:32:308:45 | Ok(...) [Ok] | provenance | | -| main.rs:309:9:309:11 | o1a [Some] | main.rs:311:10:311:21 | o1a.unwrap() | provenance | MaD:2 | +| main.rs:309:9:309:11 | o1a [Some] | main.rs:311:10:311:12 | o1a [Some] | provenance | | +| main.rs:309:28:309:29 | r1 [Ok] | main.rs:309:28:309:34 | r1.ok() [Some] | provenance | MaD:16 | | main.rs:309:28:309:34 | r1.ok() [Some] | main.rs:309:9:309:11 | o1a [Some] | provenance | | -| main.rs:314:9:314:10 | r2 [Err] | main.rs:316:28:316:35 | r2.err() [Some] | provenance | MaD:7 | +| main.rs:311:10:311:12 | o1a [Some] | main.rs:311:10:311:21 | o1a.unwrap() | provenance | MaD:8 | +| main.rs:314:9:314:10 | r2 [Err] | main.rs:316:28:316:29 | r2 [Err] | provenance | | | main.rs:314:32:314:46 | Err(...) [Err] | main.rs:314:9:314:10 | r2 [Err] | provenance | | | main.rs:314:36:314:45 | source(...) | main.rs:314:32:314:46 | Err(...) [Err] | provenance | | -| main.rs:316:9:316:11 | o2b [Some] | main.rs:318:10:318:21 | o2b.unwrap() | provenance | MaD:2 | +| main.rs:316:9:316:11 | o2b [Some] | main.rs:318:10:318:12 | o2b [Some] | provenance | | +| main.rs:316:28:316:29 | r2 [Err] | main.rs:316:28:316:35 | r2.err() [Some] | provenance | MaD:13 | | main.rs:316:28:316:35 | r2.err() [Some] | main.rs:316:9:316:11 | o2b [Some] | provenance | | +| main.rs:318:10:318:12 | o2b [Some] | main.rs:318:10:318:21 | o2b.unwrap() | provenance | MaD:8 | | main.rs:322:9:322:10 | s1 [Ok] | main.rs:325:14:325:15 | s1 [Ok] | provenance | | | main.rs:322:32:322:45 | Ok(...) [Ok] | main.rs:322:9:322:10 | s1 [Ok] | provenance | | | main.rs:322:35:322:44 | source(...) | main.rs:322:32:322:45 | Ok(...) [Ok] | provenance | | | main.rs:325:9:325:10 | i1 | main.rs:327:10:327:11 | i1 | provenance | | | main.rs:325:14:325:15 | s1 [Ok] | main.rs:325:14:325:16 | TryExpr | provenance | | | main.rs:325:14:325:16 | TryExpr | main.rs:325:9:325:10 | i1 | provenance | | -| main.rs:335:9:335:10 | s1 [Ok] | main.rs:336:10:336:22 | s1.expect(...) | provenance | MaD:8 | +| main.rs:335:9:335:10 | s1 [Ok] | main.rs:336:10:336:11 | s1 [Ok] | provenance | | | main.rs:335:32:335:45 | Ok(...) [Ok] | main.rs:335:9:335:10 | s1 [Ok] | provenance | | | main.rs:335:35:335:44 | source(...) | main.rs:335:32:335:45 | Ok(...) [Ok] | provenance | | -| main.rs:339:9:339:10 | s2 [Err] | main.rs:341:10:341:26 | s2.expect_err(...) | provenance | MaD:9 | +| main.rs:336:10:336:11 | s1 [Ok] | main.rs:336:10:336:22 | s1.expect(...) | provenance | MaD:14 | +| main.rs:339:9:339:10 | s2 [Err] | main.rs:341:10:341:11 | s2 [Err] | provenance | | | main.rs:339:32:339:46 | Err(...) [Err] | main.rs:339:9:339:10 | s2 [Err] | provenance | | | main.rs:339:36:339:45 | source(...) | main.rs:339:32:339:46 | Err(...) [Err] | provenance | | +| main.rs:341:10:341:11 | s2 [Err] | main.rs:341:10:341:26 | s2.expect_err(...) | provenance | MaD:15 | | main.rs:350:9:350:10 | s1 [A] | main.rs:352:11:352:12 | s1 [A] | provenance | | | main.rs:350:14:350:39 | ...::A(...) [A] | main.rs:350:9:350:10 | s1 [A] | provenance | | | main.rs:350:29:350:38 | source(...) | main.rs:350:14:350:39 | ...::A(...) [A] | provenance | | @@ -204,13 +221,13 @@ edges | main.rs:430:16:430:33 | [...] [element] | main.rs:430:9:430:12 | arr1 [element] | provenance | | | main.rs:430:23:430:32 | source(...) | main.rs:430:16:430:33 | [...] [element] | provenance | | | main.rs:431:9:431:10 | n1 | main.rs:432:10:432:11 | n1 | provenance | | -| main.rs:431:14:431:17 | arr1 [element] | main.rs:431:14:431:20 | arr1[2] | provenance | | +| main.rs:431:14:431:17 | arr1 [element] | main.rs:431:14:431:20 | arr1[2] | provenance | MaD:4 | | main.rs:431:14:431:20 | arr1[2] | main.rs:431:9:431:10 | n1 | provenance | | | main.rs:434:9:434:12 | arr2 [element] | main.rs:435:14:435:17 | arr2 [element] | provenance | | | main.rs:434:16:434:31 | [...; 10] [element] | main.rs:434:9:434:12 | arr2 [element] | provenance | | | main.rs:434:17:434:26 | source(...) | main.rs:434:16:434:31 | [...; 10] [element] | provenance | | | main.rs:435:9:435:10 | n2 | main.rs:436:10:436:11 | n2 | provenance | | -| main.rs:435:14:435:17 | arr2 [element] | main.rs:435:14:435:20 | arr2[4] | provenance | | +| main.rs:435:14:435:17 | arr2 [element] | main.rs:435:14:435:20 | arr2[4] | provenance | MaD:4 | | main.rs:435:14:435:20 | arr2[4] | main.rs:435:9:435:10 | n2 | provenance | | | main.rs:444:9:444:12 | arr1 [element] | main.rs:445:15:445:18 | arr1 [element] | provenance | | | main.rs:444:16:444:33 | [...] [element] | main.rs:444:9:444:12 | arr1 [element] | provenance | | @@ -231,32 +248,57 @@ edges | main.rs:470:5:470:11 | [post] mut_arr [element] | main.rs:473:10:473:16 | mut_arr [element] | provenance | | | main.rs:470:18:470:27 | source(...) | main.rs:470:5:470:11 | [post] mut_arr [element] | provenance | | | main.rs:471:9:471:9 | d | main.rs:472:10:472:10 | d | provenance | | -| main.rs:471:13:471:19 | mut_arr [element] | main.rs:471:13:471:22 | mut_arr[1] | provenance | | +| main.rs:471:13:471:19 | mut_arr [element] | main.rs:471:13:471:22 | mut_arr[1] | provenance | MaD:4 | | main.rs:471:13:471:22 | mut_arr[1] | main.rs:471:9:471:9 | d | provenance | | -| main.rs:473:10:473:16 | mut_arr [element] | main.rs:473:10:473:19 | mut_arr[0] | provenance | | +| main.rs:473:10:473:16 | mut_arr [element] | main.rs:473:10:473:19 | mut_arr[0] | provenance | MaD:4 | | main.rs:496:9:496:9 | s | main.rs:497:10:497:10 | s | provenance | | | main.rs:496:25:496:26 | source(...) | main.rs:496:9:496:9 | s | provenance | | +| main.rs:505:9:505:9 | a | main.rs:506:13:506:13 | a | provenance | | | main.rs:505:9:505:9 | a | main.rs:510:10:510:10 | a | provenance | | | main.rs:505:13:505:22 | source(...) | main.rs:505:9:505:9 | a | provenance | | +| main.rs:506:9:506:9 | b | main.rs:507:13:507:13 | b | provenance | | +| main.rs:506:9:506:9 | b | main.rs:508:18:508:18 | b | provenance | | +| main.rs:506:9:506:9 | b | main.rs:511:17:511:17 | b | provenance | | +| main.rs:506:13:506:13 | a | main.rs:506:13:506:25 | a.to_string() | provenance | MaD:2 | +| main.rs:506:13:506:25 | a.to_string() | main.rs:506:9:506:9 | b | provenance | | +| main.rs:507:9:507:9 | c | main.rs:512:10:512:10 | c | provenance | | +| main.rs:507:13:507:13 | b | main.rs:507:13:507:28 | b.parse() [Ok] | provenance | MaD:18 | +| main.rs:507:13:507:28 | b.parse() [Ok] | main.rs:507:13:507:37 | ... .unwrap() | provenance | MaD:17 | +| main.rs:507:13:507:37 | ... .unwrap() | main.rs:507:9:507:9 | c | provenance | | +| main.rs:508:9:508:9 | d | main.rs:513:10:513:10 | d | provenance | | +| main.rs:508:18:508:18 | b | main.rs:508:18:508:26 | b.parse() [Ok] | provenance | MaD:18 | +| main.rs:508:18:508:26 | b.parse() [Ok] | main.rs:508:18:508:35 | ... .unwrap() | provenance | MaD:17 | +| main.rs:508:18:508:35 | ... .unwrap() | main.rs:508:9:508:9 | d | provenance | | | main.rs:517:9:517:10 | vs [element] | main.rs:519:10:519:11 | vs [element] | provenance | | | main.rs:517:9:517:10 | vs [element] | main.rs:523:14:523:15 | vs [element] | provenance | | | main.rs:517:14:517:34 | [...] [element] | main.rs:517:9:517:10 | vs [element] | provenance | | | main.rs:517:15:517:24 | source(...) | main.rs:517:14:517:34 | [...] [element] | provenance | | -| main.rs:519:10:519:11 | vs [element] | main.rs:519:10:519:14 | vs[0] | provenance | | +| main.rs:519:10:519:11 | vs [element] | main.rs:519:10:519:14 | vs[0] | provenance | MaD:4 | | main.rs:523:9:523:9 | v | main.rs:524:14:524:14 | v | provenance | | | main.rs:523:14:523:15 | vs [element] | main.rs:523:9:523:9 | v | provenance | | | main.rs:542:9:542:18 | mut vs_mut [element] | main.rs:544:10:544:15 | vs_mut [element] | provenance | | | main.rs:542:22:542:42 | [...] [element] | main.rs:542:9:542:18 | mut vs_mut [element] | provenance | | | main.rs:542:23:542:32 | source(...) | main.rs:542:22:542:42 | [...] [element] | provenance | | -| main.rs:544:10:544:15 | vs_mut [element] | main.rs:544:10:544:18 | vs_mut[0] | provenance | | +| main.rs:544:10:544:15 | vs_mut [element] | main.rs:544:10:544:18 | vs_mut[0] | provenance | MaD:4 | | main.rs:554:9:554:9 | a | main.rs:559:10:559:10 | a | provenance | | | main.rs:554:13:554:22 | source(...) | main.rs:554:9:554:9 | a | provenance | | +| main.rs:555:9:555:9 | b | main.rs:560:15:560:15 | b | provenance | | +| main.rs:555:13:555:22 | source(...) | main.rs:555:9:555:9 | b | provenance | | | main.rs:556:9:556:9 | c | main.rs:557:18:557:18 | c | provenance | | | main.rs:556:13:556:22 | source(...) | main.rs:556:9:556:9 | c | provenance | | +| main.rs:557:9:557:13 | c_ref [&ref] | main.rs:561:14:561:18 | c_ref | provenance | | | main.rs:557:9:557:13 | c_ref [&ref] | main.rs:562:11:562:15 | c_ref [&ref] | provenance | | | main.rs:557:17:557:18 | &c [&ref] | main.rs:557:9:557:13 | c_ref [&ref] | provenance | | | main.rs:557:18:557:18 | c | main.rs:557:17:557:18 | &c [&ref] | provenance | | -| main.rs:562:11:562:15 | c_ref [&ref] | main.rs:562:10:562:15 | * ... | provenance | | +| main.rs:560:15:560:15 | b | main.rs:560:14:560:15 | &b | provenance | | +| main.rs:562:11:562:15 | c_ref [&ref] | main.rs:562:10:562:15 | * ... | provenance | MaD:1 | +| main.rs:566:9:566:9 | a | main.rs:568:10:568:17 | a as i64 | provenance | | +| main.rs:566:18:566:27 | source(...) | main.rs:566:9:566:9 | a | provenance | | +| main.rs:572:9:572:9 | b | main.rs:574:10:574:17 | b as i64 | provenance | | +| main.rs:572:9:572:9 | b | main.rs:576:20:576:20 | b | provenance | | +| main.rs:572:18:572:27 | source(...) | main.rs:572:9:572:9 | b | provenance | | +| main.rs:576:20:576:20 | b | main.rs:576:10:576:21 | ...::from(...) | provenance | MaD:3 | +| main.rs:576:20:576:20 | b | main.rs:576:10:576:21 | ...::from(...) | provenance | MaD:7 | nodes | main.rs:19:10:19:18 | source(...) | semmle.label | source(...) | | main.rs:23:9:23:9 | s | semmle.label | s | @@ -290,11 +332,11 @@ nodes | main.rs:81:17:81:25 | source(...) | semmle.label | source(...) | | main.rs:82:5:82:5 | l | semmle.label | l | | main.rs:83:10:83:10 | l | semmle.label | l | -| main.rs:115:9:115:9 | i [&ref] | semmle.label | i [&ref] | -| main.rs:115:13:115:31 | ...::new(...) [&ref] | semmle.label | ...::new(...) [&ref] | +| main.rs:115:9:115:9 | i [Box(0)] | semmle.label | i [Box(0)] | +| main.rs:115:13:115:31 | ...::new(...) [Box(0)] | semmle.label | ...::new(...) [Box(0)] | | main.rs:115:22:115:30 | source(...) | semmle.label | source(...) | | main.rs:116:10:116:11 | * ... | semmle.label | * ... | -| main.rs:116:11:116:11 | i [&ref] | semmle.label | i [&ref] | +| main.rs:116:11:116:11 | i [Box(0)] | semmle.label | i [Box(0)] | | main.rs:123:9:123:9 | a [tuple.0] | semmle.label | a [tuple.0] | | main.rs:123:13:123:26 | TupleExpr [tuple.0] | semmle.label | TupleExpr [tuple.0] | | main.rs:123:14:123:22 | source(...) | semmle.label | source(...) | @@ -391,16 +433,19 @@ nodes | main.rs:278:9:278:10 | s1 [Some] | semmle.label | s1 [Some] | | main.rs:278:14:278:29 | Some(...) [Some] | semmle.label | Some(...) [Some] | | main.rs:278:19:278:28 | source(...) | semmle.label | source(...) | +| main.rs:279:10:279:11 | s1 [Some] | semmle.label | s1 [Some] | | main.rs:279:10:279:20 | s1.unwrap() | semmle.label | s1.unwrap() | | main.rs:283:9:283:10 | s1 [Some] | semmle.label | s1 [Some] | | main.rs:283:14:283:29 | Some(...) [Some] | semmle.label | Some(...) [Some] | | main.rs:283:19:283:28 | source(...) | semmle.label | source(...) | +| main.rs:284:10:284:11 | s1 [Some] | semmle.label | s1 [Some] | | main.rs:284:10:284:24 | s1.unwrap_or(...) | semmle.label | s1.unwrap_or(...) | | main.rs:287:10:287:33 | s2.unwrap_or(...) | semmle.label | s2.unwrap_or(...) | | main.rs:287:23:287:32 | source(...) | semmle.label | source(...) | | main.rs:291:9:291:10 | s1 [Some] | semmle.label | s1 [Some] | | main.rs:291:14:291:29 | Some(...) [Some] | semmle.label | Some(...) [Some] | | main.rs:291:19:291:28 | source(...) | semmle.label | source(...) | +| main.rs:292:10:292:11 | s1 [Some] | semmle.label | s1 [Some] | | main.rs:292:10:292:32 | s1.unwrap_or_else(...) | semmle.label | s1.unwrap_or_else(...) | | main.rs:295:10:295:41 | s2.unwrap_or_else(...) | semmle.label | s2.unwrap_or_else(...) | | main.rs:295:31:295:40 | source(...) | semmle.label | source(...) | @@ -415,13 +460,17 @@ nodes | main.rs:308:32:308:45 | Ok(...) [Ok] | semmle.label | Ok(...) [Ok] | | main.rs:308:35:308:44 | source(...) | semmle.label | source(...) | | main.rs:309:9:309:11 | o1a [Some] | semmle.label | o1a [Some] | +| main.rs:309:28:309:29 | r1 [Ok] | semmle.label | r1 [Ok] | | main.rs:309:28:309:34 | r1.ok() [Some] | semmle.label | r1.ok() [Some] | +| main.rs:311:10:311:12 | o1a [Some] | semmle.label | o1a [Some] | | main.rs:311:10:311:21 | o1a.unwrap() | semmle.label | o1a.unwrap() | | main.rs:314:9:314:10 | r2 [Err] | semmle.label | r2 [Err] | | main.rs:314:32:314:46 | Err(...) [Err] | semmle.label | Err(...) [Err] | | main.rs:314:36:314:45 | source(...) | semmle.label | source(...) | | main.rs:316:9:316:11 | o2b [Some] | semmle.label | o2b [Some] | +| main.rs:316:28:316:29 | r2 [Err] | semmle.label | r2 [Err] | | main.rs:316:28:316:35 | r2.err() [Some] | semmle.label | r2.err() [Some] | +| main.rs:318:10:318:12 | o2b [Some] | semmle.label | o2b [Some] | | main.rs:318:10:318:21 | o2b.unwrap() | semmle.label | o2b.unwrap() | | main.rs:322:9:322:10 | s1 [Ok] | semmle.label | s1 [Ok] | | main.rs:322:32:322:45 | Ok(...) [Ok] | semmle.label | Ok(...) [Ok] | @@ -433,10 +482,12 @@ nodes | main.rs:335:9:335:10 | s1 [Ok] | semmle.label | s1 [Ok] | | main.rs:335:32:335:45 | Ok(...) [Ok] | semmle.label | Ok(...) [Ok] | | main.rs:335:35:335:44 | source(...) | semmle.label | source(...) | +| main.rs:336:10:336:11 | s1 [Ok] | semmle.label | s1 [Ok] | | main.rs:336:10:336:22 | s1.expect(...) | semmle.label | s1.expect(...) | | main.rs:339:9:339:10 | s2 [Err] | semmle.label | s2 [Err] | | main.rs:339:32:339:46 | Err(...) [Err] | semmle.label | Err(...) [Err] | | main.rs:339:36:339:45 | source(...) | semmle.label | source(...) | +| main.rs:341:10:341:11 | s2 [Err] | semmle.label | s2 [Err] | | main.rs:341:10:341:26 | s2.expect_err(...) | semmle.label | s2.expect_err(...) | | main.rs:350:9:350:10 | s1 [A] | semmle.label | s1 [A] | | main.rs:350:14:350:39 | ...::A(...) [A] | semmle.label | ...::A(...) [A] | @@ -530,7 +581,21 @@ nodes | main.rs:497:10:497:10 | s | semmle.label | s | | main.rs:505:9:505:9 | a | semmle.label | a | | main.rs:505:13:505:22 | source(...) | semmle.label | source(...) | +| main.rs:506:9:506:9 | b | semmle.label | b | +| main.rs:506:13:506:13 | a | semmle.label | a | +| main.rs:506:13:506:25 | a.to_string() | semmle.label | a.to_string() | +| main.rs:507:9:507:9 | c | semmle.label | c | +| main.rs:507:13:507:13 | b | semmle.label | b | +| main.rs:507:13:507:28 | b.parse() [Ok] | semmle.label | b.parse() [Ok] | +| main.rs:507:13:507:37 | ... .unwrap() | semmle.label | ... .unwrap() | +| main.rs:508:9:508:9 | d | semmle.label | d | +| main.rs:508:18:508:18 | b | semmle.label | b | +| main.rs:508:18:508:26 | b.parse() [Ok] | semmle.label | b.parse() [Ok] | +| main.rs:508:18:508:35 | ... .unwrap() | semmle.label | ... .unwrap() | | main.rs:510:10:510:10 | a | semmle.label | a | +| main.rs:511:17:511:17 | b | semmle.label | b | +| main.rs:512:10:512:10 | c | semmle.label | c | +| main.rs:513:10:513:10 | d | semmle.label | d | | main.rs:517:9:517:10 | vs [element] | semmle.label | vs [element] | | main.rs:517:14:517:34 | [...] [element] | semmle.label | [...] [element] | | main.rs:517:15:517:24 | source(...) | semmle.label | source(...) | @@ -546,14 +611,27 @@ nodes | main.rs:544:10:544:18 | vs_mut[0] | semmle.label | vs_mut[0] | | main.rs:554:9:554:9 | a | semmle.label | a | | main.rs:554:13:554:22 | source(...) | semmle.label | source(...) | +| main.rs:555:9:555:9 | b | semmle.label | b | +| main.rs:555:13:555:22 | source(...) | semmle.label | source(...) | | main.rs:556:9:556:9 | c | semmle.label | c | | main.rs:556:13:556:22 | source(...) | semmle.label | source(...) | | main.rs:557:9:557:13 | c_ref [&ref] | semmle.label | c_ref [&ref] | | main.rs:557:17:557:18 | &c [&ref] | semmle.label | &c [&ref] | | main.rs:557:18:557:18 | c | semmle.label | c | | main.rs:559:10:559:10 | a | semmle.label | a | +| main.rs:560:14:560:15 | &b | semmle.label | &b | +| main.rs:560:15:560:15 | b | semmle.label | b | +| main.rs:561:14:561:18 | c_ref | semmle.label | c_ref | | main.rs:562:10:562:15 | * ... | semmle.label | * ... | | main.rs:562:11:562:15 | c_ref [&ref] | semmle.label | c_ref [&ref] | +| main.rs:566:9:566:9 | a | semmle.label | a | +| main.rs:566:18:566:27 | source(...) | semmle.label | source(...) | +| main.rs:568:10:568:17 | a as i64 | semmle.label | a as i64 | +| main.rs:572:9:572:9 | b | semmle.label | b | +| main.rs:572:18:572:27 | source(...) | semmle.label | source(...) | +| main.rs:574:10:574:17 | b as i64 | semmle.label | b as i64 | +| main.rs:576:10:576:21 | ...::from(...) | semmle.label | ...::from(...) | +| main.rs:576:20:576:20 | b | semmle.label | b | subpaths testFailures #select @@ -615,8 +693,16 @@ testFailures | main.rs:473:10:473:19 | mut_arr[0] | main.rs:470:18:470:27 | source(...) | main.rs:473:10:473:19 | mut_arr[0] | $@ | main.rs:470:18:470:27 | source(...) | source(...) | | main.rs:497:10:497:10 | s | main.rs:496:25:496:26 | source(...) | main.rs:497:10:497:10 | s | $@ | main.rs:496:25:496:26 | source(...) | source(...) | | main.rs:510:10:510:10 | a | main.rs:505:13:505:22 | source(...) | main.rs:510:10:510:10 | a | $@ | main.rs:505:13:505:22 | source(...) | source(...) | +| main.rs:511:17:511:17 | b | main.rs:505:13:505:22 | source(...) | main.rs:511:17:511:17 | b | $@ | main.rs:505:13:505:22 | source(...) | source(...) | +| main.rs:512:10:512:10 | c | main.rs:505:13:505:22 | source(...) | main.rs:512:10:512:10 | c | $@ | main.rs:505:13:505:22 | source(...) | source(...) | +| main.rs:513:10:513:10 | d | main.rs:505:13:505:22 | source(...) | main.rs:513:10:513:10 | d | $@ | main.rs:505:13:505:22 | source(...) | source(...) | | main.rs:519:10:519:14 | vs[0] | main.rs:517:15:517:24 | source(...) | main.rs:519:10:519:14 | vs[0] | $@ | main.rs:517:15:517:24 | source(...) | source(...) | | main.rs:524:14:524:14 | v | main.rs:517:15:517:24 | source(...) | main.rs:524:14:524:14 | v | $@ | main.rs:517:15:517:24 | source(...) | source(...) | | main.rs:544:10:544:18 | vs_mut[0] | main.rs:542:23:542:32 | source(...) | main.rs:544:10:544:18 | vs_mut[0] | $@ | main.rs:542:23:542:32 | source(...) | source(...) | | main.rs:559:10:559:10 | a | main.rs:554:13:554:22 | source(...) | main.rs:559:10:559:10 | a | $@ | main.rs:554:13:554:22 | source(...) | source(...) | +| main.rs:560:14:560:15 | &b | main.rs:555:13:555:22 | source(...) | main.rs:560:14:560:15 | &b | $@ | main.rs:555:13:555:22 | source(...) | source(...) | +| main.rs:561:14:561:18 | c_ref | main.rs:556:13:556:22 | source(...) | main.rs:561:14:561:18 | c_ref | $@ | main.rs:556:13:556:22 | source(...) | source(...) | | main.rs:562:10:562:15 | * ... | main.rs:556:13:556:22 | source(...) | main.rs:562:10:562:15 | * ... | $@ | main.rs:556:13:556:22 | source(...) | source(...) | +| main.rs:568:10:568:17 | a as i64 | main.rs:566:18:566:27 | source(...) | main.rs:568:10:568:17 | a as i64 | $@ | main.rs:566:18:566:27 | source(...) | source(...) | +| main.rs:574:10:574:17 | b as i64 | main.rs:572:18:572:27 | source(...) | main.rs:574:10:574:17 | b as i64 | $@ | main.rs:572:18:572:27 | source(...) | source(...) | +| main.rs:576:10:576:21 | ...::from(...) | main.rs:572:18:572:27 | source(...) | main.rs:576:10:576:21 | ...::from(...) | $@ | main.rs:572:18:572:27 | source(...) | source(...) | diff --git a/rust/ql/test/library-tests/dataflow/local/inline-flow.ql b/rust/ql/test/library-tests/dataflow/local/inline-flow.ql index e399ea0e5d7..5dcb7ee70a9 100644 --- a/rust/ql/test/library-tests/dataflow/local/inline-flow.ql +++ b/rust/ql/test/library-tests/dataflow/local/inline-flow.ql @@ -5,8 +5,8 @@ import rust import utils.test.InlineFlowTest import DefaultFlowTest -import ValueFlow::PathGraph +import TaintFlow::PathGraph -from ValueFlow::PathNode source, ValueFlow::PathNode sink -where ValueFlow::flowPath(source, sink) +from TaintFlow::PathNode source, TaintFlow::PathNode sink +where TaintFlow::flowPath(source, sink) select sink, source, sink, "$@", source, source.toString() diff --git a/rust/ql/test/library-tests/dataflow/modeled/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/modeled/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 00000000000..9ec1dde87a0 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/modeled/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,2 @@ +multipleResolvedTargets +| main.rs:115:14:115:35 | * ... | diff --git a/rust/ql/test/library-tests/dataflow/modeled/inline-flow.expected b/rust/ql/test/library-tests/dataflow/modeled/inline-flow.expected index 3a9e28258d5..d8d2a909d9e 100644 --- a/rust/ql/test/library-tests/dataflow/modeled/inline-flow.expected +++ b/rust/ql/test/library-tests/dataflow/modeled/inline-flow.expected @@ -1,54 +1,64 @@ models -| 1 | Summary: <_ as core::clone::Clone>::clone; Argument[self].Reference; ReturnValue; value | -| 2 | Summary: ::into_pin; Argument[0]; ReturnValue; value | -| 3 | Summary: ::new; Argument[0]; ReturnValue.Reference; value | -| 4 | Summary: ::pin; Argument[0]; ReturnValue.Reference; value | -| 5 | Summary: ::clone; Argument[self].Reference; ReturnValue; value | -| 6 | Summary: ::unwrap; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | -| 7 | Summary: ::zip; Argument[0].Field[core::option::Option::Some(0)]; ReturnValue.Field[core::option::Option::Some(0)].Field[1]; value | -| 8 | Summary: ::into_inner; Argument[0]; ReturnValue; value | -| 9 | Summary: ::into_inner_unchecked; Argument[0]; ReturnValue; value | -| 10 | Summary: ::new; Argument[0].Reference; ReturnValue; value | -| 11 | Summary: ::new; Argument[0]; ReturnValue; value | -| 12 | Summary: ::new_unchecked; Argument[0].Reference; ReturnValue; value | -| 13 | Summary: ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | -| 14 | Summary: core::ptr::read; Argument[0].Reference; ReturnValue; value | -| 15 | Summary: core::ptr::write; Argument[1]; Argument[0].Reference; value | +| 1 | Summary: <& as core::ops::deref::Deref>::deref; Argument[self].Reference; ReturnValue; value | +| 2 | Summary: <_ as core::clone::Clone>::clone; Argument[self].Reference; ReturnValue; value | +| 3 | Summary: <_ as core::ops::arith::Add>::add; Argument[0].Reference; ReturnValue; taint | +| 4 | Summary: <_ as core::ops::arith::Add>::add; Argument[0]; ReturnValue; taint | +| 5 | Summary: ::into_pin; Argument[0]; ReturnValue.Field[core::pin::Pin::pointer]; value | +| 6 | Summary: ::new; Argument[0]; ReturnValue.Field[alloc::boxed::Box(0)]; value | +| 7 | Summary: ::pin; Argument[0]; ReturnValue.Field[core::pin::Pin::pointer].Field[alloc::boxed::Box(0)]; value | +| 8 | Summary: ::clone; Argument[self].Reference; ReturnValue; value | +| 9 | Summary: ::map_or; Argument[1].ReturnValue; ReturnValue; value | +| 10 | Summary: ::unwrap; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | +| 11 | Summary: ::zip; Argument[0].Field[core::option::Option::Some(0)]; ReturnValue.Field[core::option::Option::Some(0)].Field[1]; value | +| 12 | Summary: ::deref; Argument[self].Reference.Field[core::pin::Pin::pointer].Field[alloc::boxed::Box(0)]; ReturnValue.Reference; value | +| 13 | Summary: ::deref; Argument[self].Reference.Field[core::pin::Pin::pointer].Reference; ReturnValue.Reference; value | +| 14 | Summary: ::into_inner; Argument[0].Field[core::pin::Pin::pointer]; ReturnValue; value | +| 15 | Summary: ::into_inner_unchecked; Argument[0].Field[core::pin::Pin::pointer]; ReturnValue; value | +| 16 | Summary: ::new; Argument[0]; ReturnValue.Field[core::pin::Pin::pointer]; value | +| 17 | Summary: ::new_unchecked; Argument[0]; ReturnValue.Field[core::pin::Pin::pointer]; value | +| 18 | Summary: ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | +| 19 | Summary: core::ptr::read; Argument[0].Reference; ReturnValue; value | +| 20 | Summary: core::ptr::write; Argument[1]; Argument[0].Reference; value | edges -| main.rs:12:9:12:9 | a [Some] | main.rs:13:10:13:19 | a.unwrap() | provenance | MaD:6 | +| main.rs:12:9:12:9 | a [Some] | main.rs:13:10:13:10 | a [Some] | provenance | | | main.rs:12:9:12:9 | a [Some] | main.rs:14:13:14:13 | a [Some] | provenance | | | main.rs:12:13:12:28 | Some(...) [Some] | main.rs:12:9:12:9 | a [Some] | provenance | | | main.rs:12:18:12:27 | source(...) | main.rs:12:13:12:28 | Some(...) [Some] | provenance | | -| main.rs:14:9:14:9 | b [Some] | main.rs:15:10:15:19 | b.unwrap() | provenance | MaD:6 | -| main.rs:14:13:14:13 | a [Some] | main.rs:14:13:14:21 | a.clone() [Some] | provenance | MaD:1 | +| main.rs:13:10:13:10 | a [Some] | main.rs:13:10:13:19 | a.unwrap() | provenance | MaD:10 | +| main.rs:14:9:14:9 | b [Some] | main.rs:15:10:15:10 | b [Some] | provenance | | +| main.rs:14:13:14:13 | a [Some] | main.rs:14:13:14:21 | a.clone() [Some] | provenance | MaD:2 | | main.rs:14:13:14:21 | a.clone() [Some] | main.rs:14:9:14:9 | b [Some] | provenance | | -| main.rs:19:9:19:9 | a [Ok] | main.rs:20:10:20:19 | a.unwrap() | provenance | MaD:13 | +| main.rs:15:10:15:10 | b [Some] | main.rs:15:10:15:19 | b.unwrap() | provenance | MaD:10 | +| main.rs:19:9:19:9 | a [Ok] | main.rs:20:10:20:10 | a [Ok] | provenance | | | main.rs:19:9:19:9 | a [Ok] | main.rs:21:13:21:13 | a [Ok] | provenance | | | main.rs:19:31:19:44 | Ok(...) [Ok] | main.rs:19:9:19:9 | a [Ok] | provenance | | | main.rs:19:34:19:43 | source(...) | main.rs:19:31:19:44 | Ok(...) [Ok] | provenance | | -| main.rs:21:9:21:9 | b [Ok] | main.rs:22:10:22:19 | b.unwrap() | provenance | MaD:13 | -| main.rs:21:13:21:13 | a [Ok] | main.rs:21:13:21:21 | a.clone() [Ok] | provenance | MaD:1 | +| main.rs:20:10:20:10 | a [Ok] | main.rs:20:10:20:19 | a.unwrap() | provenance | MaD:18 | +| main.rs:21:9:21:9 | b [Ok] | main.rs:22:10:22:10 | b [Ok] | provenance | | +| main.rs:21:13:21:13 | a [Ok] | main.rs:21:13:21:21 | a.clone() [Ok] | provenance | MaD:2 | | main.rs:21:13:21:21 | a.clone() [Ok] | main.rs:21:9:21:9 | b [Ok] | provenance | | +| main.rs:22:10:22:10 | b [Ok] | main.rs:22:10:22:19 | b.unwrap() | provenance | MaD:18 | | main.rs:26:9:26:9 | a | main.rs:27:10:27:10 | a | provenance | | | main.rs:26:9:26:9 | a | main.rs:28:13:28:13 | a | provenance | | | main.rs:26:13:26:22 | source(...) | main.rs:26:9:26:9 | a | provenance | | | main.rs:28:9:28:9 | b | main.rs:29:10:29:10 | b | provenance | | -| main.rs:28:13:28:13 | a | main.rs:28:13:28:21 | a.clone() | provenance | MaD:1 | -| main.rs:28:13:28:13 | a | main.rs:28:13:28:21 | a.clone() | provenance | MaD:5 | +| main.rs:28:13:28:13 | a | main.rs:28:13:28:21 | a.clone() | provenance | MaD:2 | +| main.rs:28:13:28:13 | a | main.rs:28:13:28:21 | a.clone() | provenance | MaD:8 | | main.rs:28:13:28:21 | a.clone() | main.rs:28:9:28:9 | b | provenance | | -| main.rs:43:18:43:22 | SelfParam [Wrapper] | main.rs:44:26:44:29 | self [Wrapper] | provenance | | +| main.rs:43:18:43:22 | SelfParam [&ref, Wrapper] | main.rs:44:26:44:29 | self [&ref, Wrapper] | provenance | | | main.rs:44:13:44:33 | Wrapper {...} [Wrapper] | main.rs:43:33:45:9 | { ... } [Wrapper] | provenance | | -| main.rs:44:26:44:29 | self [Wrapper] | main.rs:44:26:44:31 | self.n | provenance | | +| main.rs:44:26:44:29 | self [&ref, Wrapper] | main.rs:44:26:44:31 | self.n | provenance | | | main.rs:44:26:44:31 | self.n | main.rs:44:13:44:33 | Wrapper {...} [Wrapper] | provenance | | | main.rs:49:13:49:13 | w [Wrapper] | main.rs:50:15:50:15 | w [Wrapper] | provenance | | | main.rs:49:17:49:41 | Wrapper {...} [Wrapper] | main.rs:49:13:49:13 | w [Wrapper] | provenance | | | main.rs:49:30:49:39 | source(...) | main.rs:49:17:49:41 | Wrapper {...} [Wrapper] | provenance | | -| main.rs:50:15:50:15 | w [Wrapper] | main.rs:43:18:43:22 | SelfParam [Wrapper] | provenance | | | main.rs:50:15:50:15 | w [Wrapper] | main.rs:51:13:51:28 | Wrapper {...} [Wrapper] | provenance | | -| main.rs:50:15:50:15 | w [Wrapper] | main.rs:53:17:53:25 | w.clone() [Wrapper] | provenance | | +| main.rs:50:15:50:15 | w [Wrapper] | main.rs:53:17:53:17 | w [Wrapper] | provenance | | | main.rs:51:13:51:28 | Wrapper {...} [Wrapper] | main.rs:51:26:51:26 | n | provenance | | | main.rs:51:26:51:26 | n | main.rs:51:38:51:38 | n | provenance | | | main.rs:53:13:53:13 | u [Wrapper] | main.rs:54:15:54:15 | u [Wrapper] | provenance | | +| main.rs:53:17:53:17 | w [Wrapper] | main.rs:43:18:43:22 | SelfParam [&ref, Wrapper] | provenance | | +| main.rs:53:17:53:17 | w [Wrapper] | main.rs:53:17:53:25 | w.clone() [Wrapper] | provenance | | | main.rs:53:17:53:25 | w.clone() [Wrapper] | main.rs:53:13:53:13 | u [Wrapper] | provenance | | | main.rs:54:15:54:15 | u [Wrapper] | main.rs:55:13:55:28 | Wrapper {...} [Wrapper] | provenance | | | main.rs:55:13:55:28 | Wrapper {...} [Wrapper] | main.rs:55:26:55:26 | n | provenance | | @@ -58,72 +68,88 @@ edges | main.rs:66:22:66:31 | source(...) | main.rs:66:17:66:32 | Some(...) [Some] | provenance | | | main.rs:67:13:67:13 | z [Some, tuple.1] | main.rs:68:15:68:15 | z [Some, tuple.1] | provenance | | | main.rs:67:17:67:24 | a.zip(...) [Some, tuple.1] | main.rs:67:13:67:13 | z [Some, tuple.1] | provenance | | -| main.rs:67:23:67:23 | b [Some] | main.rs:67:17:67:24 | a.zip(...) [Some, tuple.1] | provenance | MaD:7 | +| main.rs:67:23:67:23 | b [Some] | main.rs:67:17:67:24 | a.zip(...) [Some, tuple.1] | provenance | MaD:11 | | main.rs:68:15:68:15 | z [Some, tuple.1] | main.rs:69:13:69:24 | Some(...) [Some, tuple.1] | provenance | | | main.rs:69:13:69:24 | Some(...) [Some, tuple.1] | main.rs:69:18:69:23 | TuplePat [tuple.1] | provenance | | | main.rs:69:18:69:23 | TuplePat [tuple.1] | main.rs:69:22:69:22 | m | provenance | | | main.rs:69:22:69:22 | m | main.rs:71:22:71:22 | m | provenance | | +| main.rs:79:13:79:13 | b | main.rs:80:14:80:14 | b | provenance | | +| main.rs:79:17:79:47 | a.map_or(...) | main.rs:79:13:79:13 | b | provenance | | +| main.rs:79:33:79:46 | ... + ... | main.rs:79:17:79:47 | a.map_or(...) | provenance | MaD:9 | +| main.rs:79:37:79:46 | source(...) | main.rs:79:33:79:46 | ... + ... | provenance | MaD:3 | +| main.rs:79:37:79:46 | source(...) | main.rs:79:33:79:46 | ... + ... | provenance | MaD:4 | | main.rs:92:29:92:29 | [post] y [&ref] | main.rs:93:33:93:33 | y [&ref] | provenance | | -| main.rs:92:32:92:41 | source(...) | main.rs:92:29:92:29 | [post] y [&ref] | provenance | MaD:15 | -| main.rs:93:33:93:33 | y [&ref] | main.rs:93:18:93:34 | ...::read(...) | provenance | MaD:14 | +| main.rs:92:32:92:41 | source(...) | main.rs:92:29:92:29 | [post] y [&ref] | provenance | MaD:20 | +| main.rs:93:33:93:33 | y [&ref] | main.rs:93:18:93:34 | ...::read(...) | provenance | MaD:19 | | main.rs:108:13:108:17 | mut i | main.rs:109:34:109:34 | i | provenance | | | main.rs:108:13:108:17 | mut i | main.rs:110:33:110:33 | i | provenance | | | main.rs:108:13:108:17 | mut i | main.rs:111:47:111:47 | i | provenance | | +| main.rs:108:13:108:17 | mut i | main.rs:112:24:112:27 | mut pinned | provenance | | | main.rs:108:13:108:17 | mut i | main.rs:113:14:113:14 | i | provenance | | | main.rs:108:21:108:30 | source(...) | main.rs:108:13:108:17 | mut i | provenance | | -| main.rs:109:13:109:20 | mut pin1 [&ref] | main.rs:114:15:114:18 | pin1 [&ref] | provenance | | -| main.rs:109:13:109:20 | mut pin1 [&ref] | main.rs:115:31:115:34 | pin1 [&ref] | provenance | | -| main.rs:109:24:109:35 | ...::new(...) [&ref] | main.rs:109:13:109:20 | mut pin1 [&ref] | provenance | | -| main.rs:109:33:109:34 | &i [&ref] | main.rs:109:24:109:35 | ...::new(...) [&ref] | provenance | MaD:11 | +| main.rs:109:13:109:20 | mut pin1 [Pin, &ref] | main.rs:114:15:114:18 | pin1 [Pin, &ref] | provenance | | +| main.rs:109:13:109:20 | mut pin1 [Pin, &ref] | main.rs:115:31:115:34 | pin1 [Pin, &ref] | provenance | | +| main.rs:109:24:109:35 | ...::new(...) [Pin, &ref] | main.rs:109:13:109:20 | mut pin1 [Pin, &ref] | provenance | | +| main.rs:109:33:109:34 | &i [&ref] | main.rs:109:24:109:35 | ...::new(...) [Pin, &ref] | provenance | MaD:16 | | main.rs:109:34:109:34 | i | main.rs:109:33:109:34 | &i [&ref] | provenance | | -| main.rs:110:13:110:20 | mut pin2 [&ref] | main.rs:116:15:116:18 | pin2 [&ref] | provenance | | -| main.rs:110:24:110:34 | ...::pin(...) [&ref] | main.rs:110:13:110:20 | mut pin2 [&ref] | provenance | | -| main.rs:110:33:110:33 | i | main.rs:110:24:110:34 | ...::pin(...) [&ref] | provenance | MaD:4 | -| main.rs:111:13:111:20 | mut pin3 [&ref] | main.rs:117:15:117:18 | pin3 [&ref] | provenance | | -| main.rs:111:24:111:49 | ...::into_pin(...) [&ref] | main.rs:111:13:111:20 | mut pin3 [&ref] | provenance | | -| main.rs:111:38:111:48 | ...::new(...) [&ref] | main.rs:111:24:111:49 | ...::into_pin(...) [&ref] | provenance | MaD:2 | -| main.rs:111:47:111:47 | i | main.rs:111:38:111:48 | ...::new(...) [&ref] | provenance | MaD:3 | -| main.rs:114:15:114:18 | pin1 [&ref] | main.rs:114:14:114:18 | * ... | provenance | | -| main.rs:115:15:115:35 | ...::into_inner(...) [&ref] | main.rs:115:14:115:35 | * ... | provenance | | -| main.rs:115:31:115:34 | pin1 [&ref] | main.rs:115:15:115:35 | ...::into_inner(...) [&ref] | provenance | MaD:8 | -| main.rs:116:15:116:18 | pin2 [&ref] | main.rs:116:14:116:18 | * ... | provenance | | -| main.rs:117:15:117:18 | pin3 [&ref] | main.rs:117:14:117:18 | * ... | provenance | | +| main.rs:110:13:110:20 | mut pin2 [Pin, Box(0)] | main.rs:116:15:116:18 | pin2 [Pin, Box(0)] | provenance | | +| main.rs:110:24:110:34 | ...::pin(...) [Pin, Box(0)] | main.rs:110:13:110:20 | mut pin2 [Pin, Box(0)] | provenance | | +| main.rs:110:33:110:33 | i | main.rs:110:24:110:34 | ...::pin(...) [Pin, Box(0)] | provenance | MaD:7 | +| main.rs:111:13:111:20 | mut pin3 [Pin, Box(0)] | main.rs:117:15:117:18 | pin3 [Pin, Box(0)] | provenance | | +| main.rs:111:24:111:49 | ...::into_pin(...) [Pin, Box(0)] | main.rs:111:13:111:20 | mut pin3 [Pin, Box(0)] | provenance | | +| main.rs:111:38:111:48 | ...::new(...) [Box(0)] | main.rs:111:24:111:49 | ...::into_pin(...) [Pin, Box(0)] | provenance | MaD:5 | +| main.rs:111:47:111:47 | i | main.rs:111:38:111:48 | ...::new(...) [Box(0)] | provenance | MaD:6 | +| main.rs:112:13:112:20 | mut pin4 [Pin, &ref] | main.rs:118:15:118:18 | pin4 [Pin, &ref] | provenance | | +| main.rs:112:24:112:27 | &mut pinned [&ref] | main.rs:112:24:112:27 | ...::new_unchecked(...) [Pin, &ref] | provenance | MaD:17 | +| main.rs:112:24:112:27 | ...::new_unchecked(...) [Pin, &ref] | main.rs:112:13:112:20 | mut pin4 [Pin, &ref] | provenance | | +| main.rs:112:24:112:27 | mut pinned | main.rs:112:24:112:27 | pinned | provenance | | +| main.rs:112:24:112:27 | pinned | main.rs:112:24:112:27 | &mut pinned [&ref] | provenance | | +| main.rs:114:15:114:18 | pin1 [Pin, &ref] | main.rs:114:14:114:18 | * ... | provenance | MaD:13 | +| main.rs:115:15:115:35 | ...::into_inner(...) [&ref] | main.rs:115:14:115:35 | * ... | provenance | MaD:1 | +| main.rs:115:31:115:34 | pin1 [Pin, &ref] | main.rs:115:15:115:35 | ...::into_inner(...) [&ref] | provenance | MaD:14 | +| main.rs:116:15:116:18 | pin2 [Pin, Box(0)] | main.rs:116:14:116:18 | * ... | provenance | MaD:12 | +| main.rs:117:15:117:18 | pin3 [Pin, Box(0)] | main.rs:117:14:117:18 | * ... | provenance | MaD:12 | +| main.rs:118:15:118:18 | pin4 [Pin, &ref] | main.rs:118:14:118:18 | * ... | provenance | MaD:13 | | main.rs:122:13:122:18 | mut ms [MyStruct] | main.rs:123:34:123:35 | ms [MyStruct] | provenance | | | main.rs:122:13:122:18 | mut ms [MyStruct] | main.rs:127:14:127:15 | ms [MyStruct] | provenance | | | main.rs:122:22:122:49 | MyStruct {...} [MyStruct] | main.rs:122:13:122:18 | mut ms [MyStruct] | provenance | | | main.rs:122:38:122:47 | source(...) | main.rs:122:22:122:49 | MyStruct {...} [MyStruct] | provenance | | -| main.rs:123:13:123:20 | mut pin1 [MyStruct] | main.rs:129:30:129:33 | pin1 [MyStruct] | provenance | | -| main.rs:123:24:123:36 | ...::new(...) [MyStruct] | main.rs:123:13:123:20 | mut pin1 [MyStruct] | provenance | | -| main.rs:123:33:123:35 | &ms [&ref, MyStruct] | main.rs:123:24:123:36 | ...::new(...) [MyStruct] | provenance | MaD:10 | +| main.rs:123:13:123:20 | mut pin1 [Pin, &ref, MyStruct] | main.rs:129:30:129:33 | pin1 [Pin, &ref, MyStruct] | provenance | | +| main.rs:123:24:123:36 | ...::new(...) [Pin, &ref, MyStruct] | main.rs:123:13:123:20 | mut pin1 [Pin, &ref, MyStruct] | provenance | | +| main.rs:123:33:123:35 | &ms [&ref, MyStruct] | main.rs:123:24:123:36 | ...::new(...) [Pin, &ref, MyStruct] | provenance | MaD:16 | | main.rs:123:34:123:35 | ms [MyStruct] | main.rs:123:33:123:35 | &ms [&ref, MyStruct] | provenance | | | main.rs:127:14:127:15 | ms [MyStruct] | main.rs:127:14:127:19 | ms.val | provenance | | -| main.rs:129:14:129:34 | ...::into_inner(...) [MyStruct] | main.rs:129:14:129:38 | ... .val | provenance | | -| main.rs:129:30:129:33 | pin1 [MyStruct] | main.rs:129:14:129:34 | ...::into_inner(...) [MyStruct] | provenance | MaD:8 | +| main.rs:129:14:129:34 | ...::into_inner(...) [&ref, MyStruct] | main.rs:129:14:129:38 | ... .val | provenance | | +| main.rs:129:30:129:33 | pin1 [Pin, &ref, MyStruct] | main.rs:129:14:129:34 | ...::into_inner(...) [&ref, MyStruct] | provenance | MaD:14 | | main.rs:136:13:136:18 | mut ms [MyStruct] | main.rs:137:44:137:45 | ms [MyStruct] | provenance | | | main.rs:136:22:136:49 | MyStruct {...} [MyStruct] | main.rs:136:13:136:18 | mut ms [MyStruct] | provenance | | | main.rs:136:38:136:47 | source(...) | main.rs:136:22:136:49 | MyStruct {...} [MyStruct] | provenance | | -| main.rs:137:13:137:20 | mut pin5 [MyStruct] | main.rs:139:40:139:43 | pin5 [MyStruct] | provenance | | -| main.rs:137:24:137:46 | ...::new_unchecked(...) [MyStruct] | main.rs:137:13:137:20 | mut pin5 [MyStruct] | provenance | | -| main.rs:137:43:137:45 | &ms [&ref, MyStruct] | main.rs:137:24:137:46 | ...::new_unchecked(...) [MyStruct] | provenance | MaD:12 | +| main.rs:137:13:137:20 | mut pin5 [Pin, &ref, MyStruct] | main.rs:139:40:139:43 | pin5 [Pin, &ref, MyStruct] | provenance | | +| main.rs:137:24:137:46 | ...::new_unchecked(...) [Pin, &ref, MyStruct] | main.rs:137:13:137:20 | mut pin5 [Pin, &ref, MyStruct] | provenance | | +| main.rs:137:43:137:45 | &ms [&ref, MyStruct] | main.rs:137:24:137:46 | ...::new_unchecked(...) [Pin, &ref, MyStruct] | provenance | MaD:17 | | main.rs:137:44:137:45 | ms [MyStruct] | main.rs:137:43:137:45 | &ms [&ref, MyStruct] | provenance | | -| main.rs:139:14:139:44 | ...::into_inner_unchecked(...) [MyStruct] | main.rs:139:14:139:48 | ... .val | provenance | | -| main.rs:139:40:139:43 | pin5 [MyStruct] | main.rs:139:14:139:44 | ...::into_inner_unchecked(...) [MyStruct] | provenance | MaD:9 | +| main.rs:139:14:139:44 | ...::into_inner_unchecked(...) [&ref, MyStruct] | main.rs:139:14:139:48 | ... .val | provenance | | +| main.rs:139:40:139:43 | pin5 [Pin, &ref, MyStruct] | main.rs:139:14:139:44 | ...::into_inner_unchecked(...) [&ref, MyStruct] | provenance | MaD:15 | nodes | main.rs:12:9:12:9 | a [Some] | semmle.label | a [Some] | | main.rs:12:13:12:28 | Some(...) [Some] | semmle.label | Some(...) [Some] | | main.rs:12:18:12:27 | source(...) | semmle.label | source(...) | +| main.rs:13:10:13:10 | a [Some] | semmle.label | a [Some] | | main.rs:13:10:13:19 | a.unwrap() | semmle.label | a.unwrap() | | main.rs:14:9:14:9 | b [Some] | semmle.label | b [Some] | | main.rs:14:13:14:13 | a [Some] | semmle.label | a [Some] | | main.rs:14:13:14:21 | a.clone() [Some] | semmle.label | a.clone() [Some] | +| main.rs:15:10:15:10 | b [Some] | semmle.label | b [Some] | | main.rs:15:10:15:19 | b.unwrap() | semmle.label | b.unwrap() | | main.rs:19:9:19:9 | a [Ok] | semmle.label | a [Ok] | | main.rs:19:31:19:44 | Ok(...) [Ok] | semmle.label | Ok(...) [Ok] | | main.rs:19:34:19:43 | source(...) | semmle.label | source(...) | +| main.rs:20:10:20:10 | a [Ok] | semmle.label | a [Ok] | | main.rs:20:10:20:19 | a.unwrap() | semmle.label | a.unwrap() | | main.rs:21:9:21:9 | b [Ok] | semmle.label | b [Ok] | | main.rs:21:13:21:13 | a [Ok] | semmle.label | a [Ok] | | main.rs:21:13:21:21 | a.clone() [Ok] | semmle.label | a.clone() [Ok] | +| main.rs:22:10:22:10 | b [Ok] | semmle.label | b [Ok] | | main.rs:22:10:22:19 | b.unwrap() | semmle.label | b.unwrap() | | main.rs:26:9:26:9 | a | semmle.label | a | | main.rs:26:13:26:22 | source(...) | semmle.label | source(...) | @@ -132,10 +158,10 @@ nodes | main.rs:28:13:28:13 | a | semmle.label | a | | main.rs:28:13:28:21 | a.clone() | semmle.label | a.clone() | | main.rs:29:10:29:10 | b | semmle.label | b | -| main.rs:43:18:43:22 | SelfParam [Wrapper] | semmle.label | SelfParam [Wrapper] | +| main.rs:43:18:43:22 | SelfParam [&ref, Wrapper] | semmle.label | SelfParam [&ref, Wrapper] | | main.rs:43:33:45:9 | { ... } [Wrapper] | semmle.label | { ... } [Wrapper] | | main.rs:44:13:44:33 | Wrapper {...} [Wrapper] | semmle.label | Wrapper {...} [Wrapper] | -| main.rs:44:26:44:29 | self [Wrapper] | semmle.label | self [Wrapper] | +| main.rs:44:26:44:29 | self [&ref, Wrapper] | semmle.label | self [&ref, Wrapper] | | main.rs:44:26:44:31 | self.n | semmle.label | self.n | | main.rs:49:13:49:13 | w [Wrapper] | semmle.label | w [Wrapper] | | main.rs:49:17:49:41 | Wrapper {...} [Wrapper] | semmle.label | Wrapper {...} [Wrapper] | @@ -145,6 +171,7 @@ nodes | main.rs:51:26:51:26 | n | semmle.label | n | | main.rs:51:38:51:38 | n | semmle.label | n | | main.rs:53:13:53:13 | u [Wrapper] | semmle.label | u [Wrapper] | +| main.rs:53:17:53:17 | w [Wrapper] | semmle.label | w [Wrapper] | | main.rs:53:17:53:25 | w.clone() [Wrapper] | semmle.label | w.clone() [Wrapper] | | main.rs:54:15:54:15 | u [Wrapper] | semmle.label | u [Wrapper] | | main.rs:55:13:55:28 | Wrapper {...} [Wrapper] | semmle.label | Wrapper {...} [Wrapper] | @@ -161,57 +188,69 @@ nodes | main.rs:69:18:69:23 | TuplePat [tuple.1] | semmle.label | TuplePat [tuple.1] | | main.rs:69:22:69:22 | m | semmle.label | m | | main.rs:71:22:71:22 | m | semmle.label | m | +| main.rs:79:13:79:13 | b | semmle.label | b | +| main.rs:79:17:79:47 | a.map_or(...) | semmle.label | a.map_or(...) | +| main.rs:79:33:79:46 | ... + ... | semmle.label | ... + ... | +| main.rs:79:37:79:46 | source(...) | semmle.label | source(...) | +| main.rs:80:14:80:14 | b | semmle.label | b | | main.rs:92:29:92:29 | [post] y [&ref] | semmle.label | [post] y [&ref] | | main.rs:92:32:92:41 | source(...) | semmle.label | source(...) | | main.rs:93:18:93:34 | ...::read(...) | semmle.label | ...::read(...) | | main.rs:93:33:93:33 | y [&ref] | semmle.label | y [&ref] | | main.rs:108:13:108:17 | mut i | semmle.label | mut i | | main.rs:108:21:108:30 | source(...) | semmle.label | source(...) | -| main.rs:109:13:109:20 | mut pin1 [&ref] | semmle.label | mut pin1 [&ref] | -| main.rs:109:24:109:35 | ...::new(...) [&ref] | semmle.label | ...::new(...) [&ref] | +| main.rs:109:13:109:20 | mut pin1 [Pin, &ref] | semmle.label | mut pin1 [Pin, &ref] | +| main.rs:109:24:109:35 | ...::new(...) [Pin, &ref] | semmle.label | ...::new(...) [Pin, &ref] | | main.rs:109:33:109:34 | &i [&ref] | semmle.label | &i [&ref] | | main.rs:109:34:109:34 | i | semmle.label | i | -| main.rs:110:13:110:20 | mut pin2 [&ref] | semmle.label | mut pin2 [&ref] | -| main.rs:110:24:110:34 | ...::pin(...) [&ref] | semmle.label | ...::pin(...) [&ref] | +| main.rs:110:13:110:20 | mut pin2 [Pin, Box(0)] | semmle.label | mut pin2 [Pin, Box(0)] | +| main.rs:110:24:110:34 | ...::pin(...) [Pin, Box(0)] | semmle.label | ...::pin(...) [Pin, Box(0)] | | main.rs:110:33:110:33 | i | semmle.label | i | -| main.rs:111:13:111:20 | mut pin3 [&ref] | semmle.label | mut pin3 [&ref] | -| main.rs:111:24:111:49 | ...::into_pin(...) [&ref] | semmle.label | ...::into_pin(...) [&ref] | -| main.rs:111:38:111:48 | ...::new(...) [&ref] | semmle.label | ...::new(...) [&ref] | +| main.rs:111:13:111:20 | mut pin3 [Pin, Box(0)] | semmle.label | mut pin3 [Pin, Box(0)] | +| main.rs:111:24:111:49 | ...::into_pin(...) [Pin, Box(0)] | semmle.label | ...::into_pin(...) [Pin, Box(0)] | +| main.rs:111:38:111:48 | ...::new(...) [Box(0)] | semmle.label | ...::new(...) [Box(0)] | | main.rs:111:47:111:47 | i | semmle.label | i | +| main.rs:112:13:112:20 | mut pin4 [Pin, &ref] | semmle.label | mut pin4 [Pin, &ref] | +| main.rs:112:24:112:27 | &mut pinned [&ref] | semmle.label | &mut pinned [&ref] | +| main.rs:112:24:112:27 | ...::new_unchecked(...) [Pin, &ref] | semmle.label | ...::new_unchecked(...) [Pin, &ref] | +| main.rs:112:24:112:27 | mut pinned | semmle.label | mut pinned | +| main.rs:112:24:112:27 | pinned | semmle.label | pinned | | main.rs:113:14:113:14 | i | semmle.label | i | | main.rs:114:14:114:18 | * ... | semmle.label | * ... | -| main.rs:114:15:114:18 | pin1 [&ref] | semmle.label | pin1 [&ref] | +| main.rs:114:15:114:18 | pin1 [Pin, &ref] | semmle.label | pin1 [Pin, &ref] | | main.rs:115:14:115:35 | * ... | semmle.label | * ... | | main.rs:115:15:115:35 | ...::into_inner(...) [&ref] | semmle.label | ...::into_inner(...) [&ref] | -| main.rs:115:31:115:34 | pin1 [&ref] | semmle.label | pin1 [&ref] | +| main.rs:115:31:115:34 | pin1 [Pin, &ref] | semmle.label | pin1 [Pin, &ref] | | main.rs:116:14:116:18 | * ... | semmle.label | * ... | -| main.rs:116:15:116:18 | pin2 [&ref] | semmle.label | pin2 [&ref] | +| main.rs:116:15:116:18 | pin2 [Pin, Box(0)] | semmle.label | pin2 [Pin, Box(0)] | | main.rs:117:14:117:18 | * ... | semmle.label | * ... | -| main.rs:117:15:117:18 | pin3 [&ref] | semmle.label | pin3 [&ref] | +| main.rs:117:15:117:18 | pin3 [Pin, Box(0)] | semmle.label | pin3 [Pin, Box(0)] | +| main.rs:118:14:118:18 | * ... | semmle.label | * ... | +| main.rs:118:15:118:18 | pin4 [Pin, &ref] | semmle.label | pin4 [Pin, &ref] | | main.rs:122:13:122:18 | mut ms [MyStruct] | semmle.label | mut ms [MyStruct] | | main.rs:122:22:122:49 | MyStruct {...} [MyStruct] | semmle.label | MyStruct {...} [MyStruct] | | main.rs:122:38:122:47 | source(...) | semmle.label | source(...) | -| main.rs:123:13:123:20 | mut pin1 [MyStruct] | semmle.label | mut pin1 [MyStruct] | -| main.rs:123:24:123:36 | ...::new(...) [MyStruct] | semmle.label | ...::new(...) [MyStruct] | +| main.rs:123:13:123:20 | mut pin1 [Pin, &ref, MyStruct] | semmle.label | mut pin1 [Pin, &ref, MyStruct] | +| main.rs:123:24:123:36 | ...::new(...) [Pin, &ref, MyStruct] | semmle.label | ...::new(...) [Pin, &ref, MyStruct] | | main.rs:123:33:123:35 | &ms [&ref, MyStruct] | semmle.label | &ms [&ref, MyStruct] | | main.rs:123:34:123:35 | ms [MyStruct] | semmle.label | ms [MyStruct] | | main.rs:127:14:127:15 | ms [MyStruct] | semmle.label | ms [MyStruct] | | main.rs:127:14:127:19 | ms.val | semmle.label | ms.val | -| main.rs:129:14:129:34 | ...::into_inner(...) [MyStruct] | semmle.label | ...::into_inner(...) [MyStruct] | +| main.rs:129:14:129:34 | ...::into_inner(...) [&ref, MyStruct] | semmle.label | ...::into_inner(...) [&ref, MyStruct] | | main.rs:129:14:129:38 | ... .val | semmle.label | ... .val | -| main.rs:129:30:129:33 | pin1 [MyStruct] | semmle.label | pin1 [MyStruct] | +| main.rs:129:30:129:33 | pin1 [Pin, &ref, MyStruct] | semmle.label | pin1 [Pin, &ref, MyStruct] | | main.rs:136:13:136:18 | mut ms [MyStruct] | semmle.label | mut ms [MyStruct] | | main.rs:136:22:136:49 | MyStruct {...} [MyStruct] | semmle.label | MyStruct {...} [MyStruct] | | main.rs:136:38:136:47 | source(...) | semmle.label | source(...) | -| main.rs:137:13:137:20 | mut pin5 [MyStruct] | semmle.label | mut pin5 [MyStruct] | -| main.rs:137:24:137:46 | ...::new_unchecked(...) [MyStruct] | semmle.label | ...::new_unchecked(...) [MyStruct] | +| main.rs:137:13:137:20 | mut pin5 [Pin, &ref, MyStruct] | semmle.label | mut pin5 [Pin, &ref, MyStruct] | +| main.rs:137:24:137:46 | ...::new_unchecked(...) [Pin, &ref, MyStruct] | semmle.label | ...::new_unchecked(...) [Pin, &ref, MyStruct] | | main.rs:137:43:137:45 | &ms [&ref, MyStruct] | semmle.label | &ms [&ref, MyStruct] | | main.rs:137:44:137:45 | ms [MyStruct] | semmle.label | ms [MyStruct] | -| main.rs:139:14:139:44 | ...::into_inner_unchecked(...) [MyStruct] | semmle.label | ...::into_inner_unchecked(...) [MyStruct] | +| main.rs:139:14:139:44 | ...::into_inner_unchecked(...) [&ref, MyStruct] | semmle.label | ...::into_inner_unchecked(...) [&ref, MyStruct] | | main.rs:139:14:139:48 | ... .val | semmle.label | ... .val | -| main.rs:139:40:139:43 | pin5 [MyStruct] | semmle.label | pin5 [MyStruct] | +| main.rs:139:40:139:43 | pin5 [Pin, &ref, MyStruct] | semmle.label | pin5 [Pin, &ref, MyStruct] | subpaths -| main.rs:50:15:50:15 | w [Wrapper] | main.rs:43:18:43:22 | SelfParam [Wrapper] | main.rs:43:33:45:9 | { ... } [Wrapper] | main.rs:53:17:53:25 | w.clone() [Wrapper] | +| main.rs:53:17:53:17 | w [Wrapper] | main.rs:43:18:43:22 | SelfParam [&ref, Wrapper] | main.rs:43:33:45:9 | { ... } [Wrapper] | main.rs:53:17:53:25 | w.clone() [Wrapper] | testFailures #select | main.rs:13:10:13:19 | a.unwrap() | main.rs:12:18:12:27 | source(...) | main.rs:13:10:13:19 | a.unwrap() | $@ | main.rs:12:18:12:27 | source(...) | source(...) | @@ -223,12 +262,14 @@ testFailures | main.rs:51:38:51:38 | n | main.rs:49:30:49:39 | source(...) | main.rs:51:38:51:38 | n | $@ | main.rs:49:30:49:39 | source(...) | source(...) | | main.rs:55:38:55:38 | n | main.rs:49:30:49:39 | source(...) | main.rs:55:38:55:38 | n | $@ | main.rs:49:30:49:39 | source(...) | source(...) | | main.rs:71:22:71:22 | m | main.rs:66:22:66:31 | source(...) | main.rs:71:22:71:22 | m | $@ | main.rs:66:22:66:31 | source(...) | source(...) | +| main.rs:80:14:80:14 | b | main.rs:79:37:79:46 | source(...) | main.rs:80:14:80:14 | b | $@ | main.rs:79:37:79:46 | source(...) | source(...) | | main.rs:93:18:93:34 | ...::read(...) | main.rs:92:32:92:41 | source(...) | main.rs:93:18:93:34 | ...::read(...) | $@ | main.rs:92:32:92:41 | source(...) | source(...) | | main.rs:113:14:113:14 | i | main.rs:108:21:108:30 | source(...) | main.rs:113:14:113:14 | i | $@ | main.rs:108:21:108:30 | source(...) | source(...) | | main.rs:114:14:114:18 | * ... | main.rs:108:21:108:30 | source(...) | main.rs:114:14:114:18 | * ... | $@ | main.rs:108:21:108:30 | source(...) | source(...) | | main.rs:115:14:115:35 | * ... | main.rs:108:21:108:30 | source(...) | main.rs:115:14:115:35 | * ... | $@ | main.rs:108:21:108:30 | source(...) | source(...) | | main.rs:116:14:116:18 | * ... | main.rs:108:21:108:30 | source(...) | main.rs:116:14:116:18 | * ... | $@ | main.rs:108:21:108:30 | source(...) | source(...) | | main.rs:117:14:117:18 | * ... | main.rs:108:21:108:30 | source(...) | main.rs:117:14:117:18 | * ... | $@ | main.rs:108:21:108:30 | source(...) | source(...) | +| main.rs:118:14:118:18 | * ... | main.rs:108:21:108:30 | source(...) | main.rs:118:14:118:18 | * ... | $@ | main.rs:108:21:108:30 | source(...) | source(...) | | main.rs:127:14:127:19 | ms.val | main.rs:122:38:122:47 | source(...) | main.rs:127:14:127:19 | ms.val | $@ | main.rs:122:38:122:47 | source(...) | source(...) | | main.rs:129:14:129:38 | ... .val | main.rs:122:38:122:47 | source(...) | main.rs:129:14:129:38 | ... .val | $@ | main.rs:122:38:122:47 | source(...) | source(...) | | main.rs:139:14:139:48 | ... .val | main.rs:136:38:136:47 | source(...) | main.rs:139:14:139:48 | ... .val | $@ | main.rs:136:38:136:47 | source(...) | source(...) | diff --git a/rust/ql/test/library-tests/dataflow/modeled/inline-flow.ql b/rust/ql/test/library-tests/dataflow/modeled/inline-flow.ql index e399ea0e5d7..5dcb7ee70a9 100644 --- a/rust/ql/test/library-tests/dataflow/modeled/inline-flow.ql +++ b/rust/ql/test/library-tests/dataflow/modeled/inline-flow.ql @@ -5,8 +5,8 @@ import rust import utils.test.InlineFlowTest import DefaultFlowTest -import ValueFlow::PathGraph +import TaintFlow::PathGraph -from ValueFlow::PathNode source, ValueFlow::PathNode sink -where ValueFlow::flowPath(source, sink) +from TaintFlow::PathNode source, TaintFlow::PathNode sink +where TaintFlow::flowPath(source, sink) select sink, source, sink, "$@", source, source.toString() diff --git a/rust/ql/test/library-tests/dataflow/modeled/main.rs b/rust/ql/test/library-tests/dataflow/modeled/main.rs index 66a92878226..eb5a8de5256 100644 --- a/rust/ql/test/library-tests/dataflow/modeled/main.rs +++ b/rust/ql/test/library-tests/dataflow/modeled/main.rs @@ -115,7 +115,7 @@ fn test_pin() { sink(*Pin::into_inner(pin1)); // $ hasValueFlow=40 sink(*pin2); // $ hasValueFlow=40 sink(*pin3); // $ hasValueFlow=40 - sink(*pin4); // $ hasTaintFlow=40 + sink(*pin4); // $ hasValueFlow=40 } { diff --git a/rust/ql/test/library-tests/dataflow/models/models.expected b/rust/ql/test/library-tests/dataflow/models/models.expected index 955b0b81b44..90133f0e6a9 100644 --- a/rust/ql/test/library-tests/dataflow/models/models.expected +++ b/rust/ql/test/library-tests/dataflow/models/models.expected @@ -9,20 +9,21 @@ models | 8 | Source: main::source_into_function::pass_source; Argument[1].Parameter[0]; test-source | | 9 | Summary: <_ as core::cmp::Ord>::max; Argument[self]; ReturnValue; value | | 10 | Summary: <_ as core::cmp::PartialOrd>::lt; Argument[self].Reference; ReturnValue; taint | -| 11 | Summary: main::apply; Argument[0]; Argument[1].Parameter[0]; value | -| 12 | Summary: main::apply; Argument[1].ReturnValue; ReturnValue; value | -| 13 | Summary: main::coerce; Argument[0]; ReturnValue; taint | -| 14 | Summary: main::get_array_element; Argument[0].Element; ReturnValue; value | -| 15 | Summary: main::get_async_number; Argument[0]; ReturnValue.Future; value | -| 16 | Summary: main::get_struct_field; Argument[0].Field[main::MyStruct::field1]; ReturnValue; value | -| 17 | Summary: main::get_tuple_element; Argument[0].Field[0]; ReturnValue; value | -| 18 | Summary: main::get_var_field; Argument[0].Field[main::MyFieldEnum::C::field_c]; ReturnValue; value | -| 19 | Summary: main::get_var_pos; Argument[0].Field[main::MyPosEnum::A(0)]; ReturnValue; value | -| 20 | Summary: main::set_array_element; Argument[0]; ReturnValue.Element; value | -| 21 | Summary: main::set_struct_field; Argument[0]; ReturnValue.Field[main::MyStruct::field2]; value | -| 22 | Summary: main::set_tuple_element; Argument[0]; ReturnValue.Field[1]; value | -| 23 | Summary: main::set_var_field; Argument[0]; ReturnValue.Field[main::MyFieldEnum::D::field_d]; value | -| 24 | Summary: main::set_var_pos; Argument[0]; ReturnValue.Field[main::MyPosEnum::B(0)]; value | +| 11 | Summary: <_ as core::ops::index::Index>::index; Argument[self].Reference.Element; ReturnValue.Reference; value | +| 12 | Summary: main::apply; Argument[0]; Argument[1].Parameter[0]; value | +| 13 | Summary: main::apply; Argument[1].ReturnValue; ReturnValue; value | +| 14 | Summary: main::coerce; Argument[0]; ReturnValue; taint | +| 15 | Summary: main::get_array_element; Argument[0].Element; ReturnValue; value | +| 16 | Summary: main::get_async_number; Argument[0]; ReturnValue.Future; value | +| 17 | Summary: main::get_struct_field; Argument[0].Field[main::MyStruct::field1]; ReturnValue; value | +| 18 | Summary: main::get_tuple_element; Argument[0].Field[0]; ReturnValue; value | +| 19 | Summary: main::get_var_field; Argument[0].Field[main::MyFieldEnum::C::field_c]; ReturnValue; value | +| 20 | Summary: main::get_var_pos; Argument[0].Field[main::MyPosEnum::A(0)]; ReturnValue; value | +| 21 | Summary: main::set_array_element; Argument[0]; ReturnValue.Element; value | +| 22 | Summary: main::set_struct_field; Argument[0]; ReturnValue.Field[main::MyStruct::field2]; value | +| 23 | Summary: main::set_tuple_element; Argument[0]; ReturnValue.Field[1]; value | +| 24 | Summary: main::set_var_field; Argument[0]; ReturnValue.Field[main::MyFieldEnum::D::field_d]; value | +| 25 | Summary: main::set_var_pos; Argument[0]; ReturnValue.Field[main::MyPosEnum::B(0)]; value | edges | main.rs:15:9:15:9 | s | main.rs:16:19:16:19 | s | provenance | | | main.rs:15:9:15:9 | s | main.rs:16:19:16:19 | s | provenance | | @@ -32,7 +33,7 @@ edges | main.rs:16:19:16:19 | s | main.rs:16:10:16:20 | identity(...) | provenance | QL | | main.rs:25:9:25:9 | s | main.rs:26:17:26:17 | s | provenance | | | main.rs:25:13:25:22 | source(...) | main.rs:25:9:25:9 | s | provenance | | -| main.rs:26:17:26:17 | s | main.rs:26:10:26:18 | coerce(...) | provenance | MaD:13 | +| main.rs:26:17:26:17 | s | main.rs:26:10:26:18 | coerce(...) | provenance | MaD:14 | | main.rs:40:9:40:9 | s | main.rs:41:27:41:27 | s | provenance | | | main.rs:40:9:40:9 | s | main.rs:41:27:41:27 | s | provenance | | | main.rs:40:13:40:21 | source(...) | main.rs:40:9:40:9 | s | provenance | | @@ -43,8 +44,8 @@ edges | main.rs:41:14:41:28 | ...::A(...) [A] | main.rs:41:9:41:10 | e1 [A] | provenance | | | main.rs:41:27:41:27 | s | main.rs:41:14:41:28 | ...::A(...) [A] | provenance | | | main.rs:41:27:41:27 | s | main.rs:41:14:41:28 | ...::A(...) [A] | provenance | | -| main.rs:42:22:42:23 | e1 [A] | main.rs:42:10:42:24 | get_var_pos(...) | provenance | MaD:19 | -| main.rs:42:22:42:23 | e1 [A] | main.rs:42:10:42:24 | get_var_pos(...) | provenance | MaD:19 | +| main.rs:42:22:42:23 | e1 [A] | main.rs:42:10:42:24 | get_var_pos(...) | provenance | MaD:20 | +| main.rs:42:22:42:23 | e1 [A] | main.rs:42:10:42:24 | get_var_pos(...) | provenance | MaD:20 | | main.rs:53:9:53:9 | s | main.rs:54:26:54:26 | s | provenance | | | main.rs:53:9:53:9 | s | main.rs:54:26:54:26 | s | provenance | | | main.rs:53:13:53:21 | source(...) | main.rs:53:9:53:9 | s | provenance | | @@ -53,8 +54,8 @@ edges | main.rs:54:9:54:10 | e1 [B] | main.rs:55:11:55:12 | e1 [B] | provenance | | | main.rs:54:14:54:27 | set_var_pos(...) [B] | main.rs:54:9:54:10 | e1 [B] | provenance | | | main.rs:54:14:54:27 | set_var_pos(...) [B] | main.rs:54:9:54:10 | e1 [B] | provenance | | -| main.rs:54:26:54:26 | s | main.rs:54:14:54:27 | set_var_pos(...) [B] | provenance | MaD:24 | -| main.rs:54:26:54:26 | s | main.rs:54:14:54:27 | set_var_pos(...) [B] | provenance | MaD:24 | +| main.rs:54:26:54:26 | s | main.rs:54:14:54:27 | set_var_pos(...) [B] | provenance | MaD:25 | +| main.rs:54:26:54:26 | s | main.rs:54:14:54:27 | set_var_pos(...) [B] | provenance | MaD:25 | | main.rs:55:11:55:12 | e1 [B] | main.rs:57:9:57:23 | ...::B(...) [B] | provenance | | | main.rs:55:11:55:12 | e1 [B] | main.rs:57:9:57:23 | ...::B(...) [B] | provenance | | | main.rs:57:9:57:23 | ...::B(...) [B] | main.rs:57:22:57:22 | i | provenance | | @@ -71,8 +72,8 @@ edges | main.rs:73:14:73:42 | ...::C {...} [C] | main.rs:73:9:73:10 | e1 [C] | provenance | | | main.rs:73:40:73:40 | s | main.rs:73:14:73:42 | ...::C {...} [C] | provenance | | | main.rs:73:40:73:40 | s | main.rs:73:14:73:42 | ...::C {...} [C] | provenance | | -| main.rs:74:24:74:25 | e1 [C] | main.rs:74:10:74:26 | get_var_field(...) | provenance | MaD:18 | -| main.rs:74:24:74:25 | e1 [C] | main.rs:74:10:74:26 | get_var_field(...) | provenance | MaD:18 | +| main.rs:74:24:74:25 | e1 [C] | main.rs:74:10:74:26 | get_var_field(...) | provenance | MaD:19 | +| main.rs:74:24:74:25 | e1 [C] | main.rs:74:10:74:26 | get_var_field(...) | provenance | MaD:19 | | main.rs:85:9:85:9 | s | main.rs:86:28:86:28 | s | provenance | | | main.rs:85:9:85:9 | s | main.rs:86:28:86:28 | s | provenance | | | main.rs:85:13:85:21 | source(...) | main.rs:85:9:85:9 | s | provenance | | @@ -81,8 +82,8 @@ edges | main.rs:86:9:86:10 | e1 [D] | main.rs:87:11:87:12 | e1 [D] | provenance | | | main.rs:86:14:86:29 | set_var_field(...) [D] | main.rs:86:9:86:10 | e1 [D] | provenance | | | main.rs:86:14:86:29 | set_var_field(...) [D] | main.rs:86:9:86:10 | e1 [D] | provenance | | -| main.rs:86:28:86:28 | s | main.rs:86:14:86:29 | set_var_field(...) [D] | provenance | MaD:23 | -| main.rs:86:28:86:28 | s | main.rs:86:14:86:29 | set_var_field(...) [D] | provenance | MaD:23 | +| main.rs:86:28:86:28 | s | main.rs:86:14:86:29 | set_var_field(...) [D] | provenance | MaD:24 | +| main.rs:86:28:86:28 | s | main.rs:86:14:86:29 | set_var_field(...) [D] | provenance | MaD:24 | | main.rs:87:11:87:12 | e1 [D] | main.rs:89:9:89:37 | ...::D {...} [D] | provenance | | | main.rs:87:11:87:12 | e1 [D] | main.rs:89:9:89:37 | ...::D {...} [D] | provenance | | | main.rs:89:9:89:37 | ...::D {...} [D] | main.rs:89:35:89:35 | i | provenance | | @@ -99,8 +100,8 @@ edges | main.rs:105:21:108:5 | MyStruct {...} [MyStruct.field1] | main.rs:105:9:105:17 | my_struct [MyStruct.field1] | provenance | | | main.rs:106:17:106:17 | s | main.rs:105:21:108:5 | MyStruct {...} [MyStruct.field1] | provenance | | | main.rs:106:17:106:17 | s | main.rs:105:21:108:5 | MyStruct {...} [MyStruct.field1] | provenance | | -| main.rs:109:27:109:35 | my_struct [MyStruct.field1] | main.rs:109:10:109:36 | get_struct_field(...) | provenance | MaD:16 | -| main.rs:109:27:109:35 | my_struct [MyStruct.field1] | main.rs:109:10:109:36 | get_struct_field(...) | provenance | MaD:16 | +| main.rs:109:27:109:35 | my_struct [MyStruct.field1] | main.rs:109:10:109:36 | get_struct_field(...) | provenance | MaD:17 | +| main.rs:109:27:109:35 | my_struct [MyStruct.field1] | main.rs:109:10:109:36 | get_struct_field(...) | provenance | MaD:17 | | main.rs:126:9:126:9 | s | main.rs:127:38:127:38 | s | provenance | | | main.rs:126:9:126:9 | s | main.rs:127:38:127:38 | s | provenance | | | main.rs:126:13:126:21 | source(...) | main.rs:126:9:126:9 | s | provenance | | @@ -109,16 +110,16 @@ edges | main.rs:127:9:127:17 | my_struct [MyStruct.field2] | main.rs:129:10:129:18 | my_struct [MyStruct.field2] | provenance | | | main.rs:127:21:127:39 | set_struct_field(...) [MyStruct.field2] | main.rs:127:9:127:17 | my_struct [MyStruct.field2] | provenance | | | main.rs:127:21:127:39 | set_struct_field(...) [MyStruct.field2] | main.rs:127:9:127:17 | my_struct [MyStruct.field2] | provenance | | -| main.rs:127:38:127:38 | s | main.rs:127:21:127:39 | set_struct_field(...) [MyStruct.field2] | provenance | MaD:21 | -| main.rs:127:38:127:38 | s | main.rs:127:21:127:39 | set_struct_field(...) [MyStruct.field2] | provenance | MaD:21 | +| main.rs:127:38:127:38 | s | main.rs:127:21:127:39 | set_struct_field(...) [MyStruct.field2] | provenance | MaD:22 | +| main.rs:127:38:127:38 | s | main.rs:127:21:127:39 | set_struct_field(...) [MyStruct.field2] | provenance | MaD:22 | | main.rs:129:10:129:18 | my_struct [MyStruct.field2] | main.rs:129:10:129:25 | my_struct.field2 | provenance | | | main.rs:129:10:129:18 | my_struct [MyStruct.field2] | main.rs:129:10:129:25 | my_struct.field2 | provenance | | | main.rs:138:9:138:9 | s | main.rs:139:29:139:29 | s | provenance | | | main.rs:138:9:138:9 | s | main.rs:139:29:139:29 | s | provenance | | | main.rs:138:13:138:21 | source(...) | main.rs:138:9:138:9 | s | provenance | | | main.rs:138:13:138:21 | source(...) | main.rs:138:9:138:9 | s | provenance | | -| main.rs:139:28:139:30 | [...] [element] | main.rs:139:10:139:31 | get_array_element(...) | provenance | MaD:14 | -| main.rs:139:28:139:30 | [...] [element] | main.rs:139:10:139:31 | get_array_element(...) | provenance | MaD:14 | +| main.rs:139:28:139:30 | [...] [element] | main.rs:139:10:139:31 | get_array_element(...) | provenance | MaD:15 | +| main.rs:139:28:139:30 | [...] [element] | main.rs:139:10:139:31 | get_array_element(...) | provenance | MaD:15 | | main.rs:139:29:139:29 | s | main.rs:139:28:139:30 | [...] [element] | provenance | | | main.rs:139:29:139:29 | s | main.rs:139:28:139:30 | [...] [element] | provenance | | | main.rs:148:9:148:9 | s | main.rs:149:33:149:33 | s | provenance | | @@ -129,10 +130,10 @@ edges | main.rs:149:9:149:11 | arr [element] | main.rs:150:10:150:12 | arr [element] | provenance | | | main.rs:149:15:149:34 | set_array_element(...) [element] | main.rs:149:9:149:11 | arr [element] | provenance | | | main.rs:149:15:149:34 | set_array_element(...) [element] | main.rs:149:9:149:11 | arr [element] | provenance | | -| main.rs:149:33:149:33 | s | main.rs:149:15:149:34 | set_array_element(...) [element] | provenance | MaD:20 | -| main.rs:149:33:149:33 | s | main.rs:149:15:149:34 | set_array_element(...) [element] | provenance | MaD:20 | -| main.rs:150:10:150:12 | arr [element] | main.rs:150:10:150:15 | arr[0] | provenance | | -| main.rs:150:10:150:12 | arr [element] | main.rs:150:10:150:15 | arr[0] | provenance | | +| main.rs:149:33:149:33 | s | main.rs:149:15:149:34 | set_array_element(...) [element] | provenance | MaD:21 | +| main.rs:149:33:149:33 | s | main.rs:149:15:149:34 | set_array_element(...) [element] | provenance | MaD:21 | +| main.rs:150:10:150:12 | arr [element] | main.rs:150:10:150:15 | arr[0] | provenance | MaD:11 | +| main.rs:150:10:150:12 | arr [element] | main.rs:150:10:150:15 | arr[0] | provenance | MaD:11 | | main.rs:159:9:159:9 | s | main.rs:160:14:160:14 | s | provenance | | | main.rs:159:9:159:9 | s | main.rs:160:14:160:14 | s | provenance | | | main.rs:159:13:159:22 | source(...) | main.rs:159:9:159:9 | s | provenance | | @@ -143,8 +144,8 @@ edges | main.rs:160:13:160:18 | TupleExpr [tuple.0] | main.rs:160:9:160:9 | t [tuple.0] | provenance | | | main.rs:160:14:160:14 | s | main.rs:160:13:160:18 | TupleExpr [tuple.0] | provenance | | | main.rs:160:14:160:14 | s | main.rs:160:13:160:18 | TupleExpr [tuple.0] | provenance | | -| main.rs:161:28:161:28 | t [tuple.0] | main.rs:161:10:161:29 | get_tuple_element(...) | provenance | MaD:17 | -| main.rs:161:28:161:28 | t [tuple.0] | main.rs:161:10:161:29 | get_tuple_element(...) | provenance | MaD:17 | +| main.rs:161:28:161:28 | t [tuple.0] | main.rs:161:10:161:29 | get_tuple_element(...) | provenance | MaD:18 | +| main.rs:161:28:161:28 | t [tuple.0] | main.rs:161:10:161:29 | get_tuple_element(...) | provenance | MaD:18 | | main.rs:172:9:172:9 | s | main.rs:173:31:173:31 | s | provenance | | | main.rs:172:9:172:9 | s | main.rs:173:31:173:31 | s | provenance | | | main.rs:172:13:172:22 | source(...) | main.rs:172:9:172:9 | s | provenance | | @@ -153,8 +154,8 @@ edges | main.rs:173:9:173:9 | t [tuple.1] | main.rs:175:10:175:10 | t [tuple.1] | provenance | | | main.rs:173:13:173:32 | set_tuple_element(...) [tuple.1] | main.rs:173:9:173:9 | t [tuple.1] | provenance | | | main.rs:173:13:173:32 | set_tuple_element(...) [tuple.1] | main.rs:173:9:173:9 | t [tuple.1] | provenance | | -| main.rs:173:31:173:31 | s | main.rs:173:13:173:32 | set_tuple_element(...) [tuple.1] | provenance | MaD:22 | -| main.rs:173:31:173:31 | s | main.rs:173:13:173:32 | set_tuple_element(...) [tuple.1] | provenance | MaD:22 | +| main.rs:173:31:173:31 | s | main.rs:173:13:173:32 | set_tuple_element(...) [tuple.1] | provenance | MaD:23 | +| main.rs:173:31:173:31 | s | main.rs:173:13:173:32 | set_tuple_element(...) [tuple.1] | provenance | MaD:23 | | main.rs:175:10:175:10 | t [tuple.1] | main.rs:175:10:175:12 | t.1 | provenance | | | main.rs:175:10:175:10 | t [tuple.1] | main.rs:175:10:175:12 | t.1 | provenance | | | main.rs:187:9:187:9 | s | main.rs:192:11:192:11 | s | provenance | | @@ -163,8 +164,8 @@ edges | main.rs:187:13:187:22 | source(...) | main.rs:187:9:187:9 | s | provenance | | | main.rs:188:14:188:14 | ... | main.rs:189:14:189:14 | n | provenance | | | main.rs:188:14:188:14 | ... | main.rs:189:14:189:14 | n | provenance | | -| main.rs:192:11:192:11 | s | main.rs:188:14:188:14 | ... | provenance | MaD:11 | -| main.rs:192:11:192:11 | s | main.rs:188:14:188:14 | ... | provenance | MaD:11 | +| main.rs:192:11:192:11 | s | main.rs:188:14:188:14 | ... | provenance | MaD:12 | +| main.rs:192:11:192:11 | s | main.rs:188:14:188:14 | ... | provenance | MaD:12 | | main.rs:196:13:196:22 | source(...) | main.rs:198:23:198:23 | f [captured s] | provenance | | | main.rs:196:13:196:22 | source(...) | main.rs:198:23:198:23 | f [captured s] | provenance | | | main.rs:197:40:197:40 | s | main.rs:197:17:197:42 | if ... {...} else {...} | provenance | | @@ -173,14 +174,14 @@ edges | main.rs:198:9:198:9 | t | main.rs:199:10:199:10 | t | provenance | | | main.rs:198:13:198:24 | apply(...) | main.rs:198:9:198:9 | t | provenance | | | main.rs:198:13:198:24 | apply(...) | main.rs:198:9:198:9 | t | provenance | | -| main.rs:198:23:198:23 | f [captured s] | main.rs:197:40:197:40 | s | provenance | MaD:11 | -| main.rs:198:23:198:23 | f [captured s] | main.rs:197:40:197:40 | s | provenance | MaD:11 | | main.rs:198:23:198:23 | f [captured s] | main.rs:197:40:197:40 | s | provenance | MaD:12 | | main.rs:198:23:198:23 | f [captured s] | main.rs:197:40:197:40 | s | provenance | MaD:12 | -| main.rs:198:23:198:23 | f [captured s] | main.rs:198:13:198:24 | apply(...) | provenance | MaD:11 | -| main.rs:198:23:198:23 | f [captured s] | main.rs:198:13:198:24 | apply(...) | provenance | MaD:11 | +| main.rs:198:23:198:23 | f [captured s] | main.rs:197:40:197:40 | s | provenance | MaD:13 | +| main.rs:198:23:198:23 | f [captured s] | main.rs:197:40:197:40 | s | provenance | MaD:13 | | main.rs:198:23:198:23 | f [captured s] | main.rs:198:13:198:24 | apply(...) | provenance | MaD:12 | | main.rs:198:23:198:23 | f [captured s] | main.rs:198:13:198:24 | apply(...) | provenance | MaD:12 | +| main.rs:198:23:198:23 | f [captured s] | main.rs:198:13:198:24 | apply(...) | provenance | MaD:13 | +| main.rs:198:23:198:23 | f [captured s] | main.rs:198:13:198:24 | apply(...) | provenance | MaD:13 | | main.rs:203:9:203:9 | s | main.rs:205:19:205:19 | s | provenance | | | main.rs:203:9:203:9 | s | main.rs:205:19:205:19 | s | provenance | | | main.rs:203:13:203:22 | source(...) | main.rs:203:9:203:9 | s | provenance | | @@ -191,10 +192,10 @@ edges | main.rs:205:9:205:9 | t | main.rs:206:10:206:10 | t | provenance | | | main.rs:205:13:205:23 | apply(...) | main.rs:205:9:205:9 | t | provenance | | | main.rs:205:13:205:23 | apply(...) | main.rs:205:9:205:9 | t | provenance | | -| main.rs:205:19:205:19 | s | main.rs:204:14:204:14 | ... | provenance | MaD:11 | -| main.rs:205:19:205:19 | s | main.rs:204:14:204:14 | ... | provenance | MaD:11 | -| main.rs:205:19:205:19 | s | main.rs:205:13:205:23 | apply(...) | provenance | MaD:11 | -| main.rs:205:19:205:19 | s | main.rs:205:13:205:23 | apply(...) | provenance | MaD:11 | +| main.rs:205:19:205:19 | s | main.rs:204:14:204:14 | ... | provenance | MaD:12 | +| main.rs:205:19:205:19 | s | main.rs:204:14:204:14 | ... | provenance | MaD:12 | +| main.rs:205:19:205:19 | s | main.rs:205:13:205:23 | apply(...) | provenance | MaD:12 | +| main.rs:205:19:205:19 | s | main.rs:205:13:205:23 | apply(...) | provenance | MaD:12 | | main.rs:215:9:215:9 | s | main.rs:216:30:216:30 | s | provenance | | | main.rs:215:9:215:9 | s | main.rs:216:30:216:30 | s | provenance | | | main.rs:215:13:215:22 | source(...) | main.rs:215:9:215:9 | s | provenance | | @@ -205,8 +206,8 @@ edges | main.rs:216:13:216:31 | get_async_number(...) [future] | main.rs:216:13:216:37 | await ... | provenance | | | main.rs:216:13:216:37 | await ... | main.rs:216:9:216:9 | t | provenance | | | main.rs:216:13:216:37 | await ... | main.rs:216:9:216:9 | t | provenance | | -| main.rs:216:30:216:30 | s | main.rs:216:13:216:31 | get_async_number(...) [future] | provenance | MaD:15 | -| main.rs:216:30:216:30 | s | main.rs:216:13:216:31 | get_async_number(...) [future] | provenance | MaD:15 | +| main.rs:216:30:216:30 | s | main.rs:216:13:216:31 | get_async_number(...) [future] | provenance | MaD:16 | +| main.rs:216:30:216:30 | s | main.rs:216:13:216:31 | get_async_number(...) [future] | provenance | MaD:16 | | main.rs:236:9:236:9 | s [D] | main.rs:237:11:237:11 | s [D] | provenance | | | main.rs:236:9:236:9 | s [D] | main.rs:237:11:237:11 | s [D] | provenance | | | main.rs:236:13:236:23 | enum_source | main.rs:236:13:236:27 | enum_source(...) [D] | provenance | Src:MaD:6 | diff --git a/rust/ql/test/library-tests/dataflow/pointers/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/pointers/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 00000000000..3610f061406 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/pointers/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,26 @@ +multipleResolvedTargets +| main.rs:19:17:19:18 | * ... | +| main.rs:53:14:53:15 | * ... | +| main.rs:59:33:59:34 | * ... | +| main.rs:72:14:72:15 | * ... | +| main.rs:73:9:73:10 | * ... | +| main.rs:74:14:74:15 | * ... | +| main.rs:75:9:75:10 | * ... | +| main.rs:76:14:76:15 | * ... | +| main.rs:83:9:83:10 | * ... | +| main.rs:90:9:90:17 | * ... | +| main.rs:97:9:97:10 | * ... | +| main.rs:105:9:105:10 | * ... | +| main.rs:106:14:106:15 | * ... | +| main.rs:113:14:113:15 | * ... | +| main.rs:114:9:114:10 | * ... | +| main.rs:115:14:115:15 | * ... | +| main.rs:122:9:122:10 | * ... | +| main.rs:125:9:125:10 | * ... | +| main.rs:135:17:135:18 | * ... | +| main.rs:136:17:136:18 | * ... | +| main.rs:201:9:201:10 | * ... | +| main.rs:209:14:209:15 | * ... | +| main.rs:211:14:211:15 | * ... | +| main.rs:224:13:224:17 | * ... | +| main.rs:229:9:229:10 | * ... | diff --git a/rust/ql/test/library-tests/dataflow/pointers/inline-flow.expected b/rust/ql/test/library-tests/dataflow/pointers/inline-flow.expected index 8da24883ea7..2c7fbc9381f 100644 --- a/rust/ql/test/library-tests/dataflow/pointers/inline-flow.expected +++ b/rust/ql/test/library-tests/dataflow/pointers/inline-flow.expected @@ -1,4 +1,5 @@ models +| 1 | Summary: <& as core::ops::deref::Deref>::deref; Argument[self].Reference; ReturnValue; value | edges | main.rs:17:13:17:13 | a | main.rs:18:18:18:18 | a | provenance | | | main.rs:17:17:17:26 | source(...) | main.rs:17:13:17:13 | a | provenance | | @@ -7,7 +8,7 @@ edges | main.rs:18:18:18:18 | a | main.rs:18:17:18:18 | &a [&ref] | provenance | | | main.rs:19:13:19:13 | c | main.rs:20:14:20:14 | c | provenance | | | main.rs:19:17:19:18 | * ... | main.rs:19:13:19:13 | c | provenance | | -| main.rs:19:18:19:18 | b [&ref] | main.rs:19:17:19:18 | * ... | provenance | | +| main.rs:19:18:19:18 | b [&ref] | main.rs:19:17:19:18 | * ... | provenance | MaD:1 | | main.rs:23:29:23:30 | &... [&ref] | main.rs:23:30:23:30 | n | provenance | | | main.rs:23:29:23:36 | ...: ... [&ref] | main.rs:23:29:23:30 | &... [&ref] | provenance | | | main.rs:23:30:23:30 | n | main.rs:24:14:24:14 | n | provenance | | @@ -28,7 +29,7 @@ edges | main.rs:51:17:51:26 | source(...) | main.rs:51:13:51:13 | a | provenance | | | main.rs:52:13:52:17 | ref p | main.rs:52:17:52:17 | p [&ref] | provenance | | | main.rs:52:17:52:17 | p [&ref] | main.rs:53:15:53:15 | p [&ref] | provenance | | -| main.rs:53:15:53:15 | p [&ref] | main.rs:53:14:53:15 | * ... | provenance | | +| main.rs:53:15:53:15 | p [&ref] | main.rs:53:14:53:15 | * ... | provenance | MaD:1 | | main.rs:57:13:57:13 | a [Some] | main.rs:58:15:58:15 | a [Some] | provenance | | | main.rs:57:17:57:32 | Some(...) [Some] | main.rs:57:13:57:13 | a [Some] | provenance | | | main.rs:57:22:57:31 | source(...) | main.rs:57:17:57:32 | Some(...) [Some] | provenance | | @@ -36,17 +37,20 @@ edges | main.rs:59:13:59:23 | Some(...) [Some] | main.rs:59:18:59:22 | ref p | provenance | | | main.rs:59:18:59:22 | ref p | main.rs:59:22:59:22 | p [&ref] | provenance | | | main.rs:59:22:59:22 | p [&ref] | main.rs:59:34:59:34 | p [&ref] | provenance | | -| main.rs:59:34:59:34 | p [&ref] | main.rs:59:33:59:34 | * ... | provenance | | +| main.rs:59:34:59:34 | p [&ref] | main.rs:59:33:59:34 | * ... | provenance | MaD:1 | | main.rs:73:10:73:10 | [post] b [&ref] | main.rs:74:15:74:15 | b [&ref] | provenance | | | main.rs:73:14:73:23 | source(...) | main.rs:73:10:73:10 | [post] b [&ref] | provenance | | -| main.rs:74:15:74:15 | b [&ref] | main.rs:74:14:74:15 | * ... | provenance | | +| main.rs:74:15:74:15 | b [&ref] | main.rs:74:14:74:15 | * ... | provenance | MaD:1 | +| main.rs:90:11:90:16 | [post] &mut a [&ref] | main.rs:90:16:90:16 | [post] a | provenance | | +| main.rs:90:16:90:16 | [post] a | main.rs:91:14:91:14 | a | provenance | | +| main.rs:90:21:90:30 | source(...) | main.rs:90:11:90:16 | [post] &mut a [&ref] | provenance | | | main.rs:105:10:105:10 | [post] c [&ref] | main.rs:106:15:106:15 | c [&ref] | provenance | | | main.rs:105:14:105:23 | source(...) | main.rs:105:10:105:10 | [post] c [&ref] | provenance | | -| main.rs:106:15:106:15 | c [&ref] | main.rs:106:14:106:15 | * ... | provenance | | +| main.rs:106:15:106:15 | c [&ref] | main.rs:106:14:106:15 | * ... | provenance | MaD:1 | | main.rs:112:13:112:21 | ref mut a | main.rs:112:21:112:21 | a [&ref] | provenance | | | main.rs:112:21:112:21 | a [&ref] | main.rs:113:15:113:15 | a [&ref] | provenance | | | main.rs:112:25:112:34 | source(...) | main.rs:112:13:112:21 | ref mut a | provenance | | -| main.rs:113:15:113:15 | a [&ref] | main.rs:113:14:113:15 | * ... | provenance | | +| main.rs:113:15:113:15 | a [&ref] | main.rs:113:14:113:15 | * ... | provenance | MaD:1 | | main.rs:149:14:149:24 | ...: MyNumber [MyNumber] | main.rs:150:11:150:11 | m [MyNumber] | provenance | | | main.rs:150:11:150:11 | m [MyNumber] | main.rs:151:9:151:34 | ...::MyNumber(...) [MyNumber] | provenance | | | main.rs:151:9:151:34 | ...::MyNumber(...) [MyNumber] | main.rs:151:28:151:33 | number | provenance | | @@ -60,10 +64,11 @@ edges | main.rs:164:13:164:39 | &... [&ref, MyNumber] | main.rs:164:14:164:39 | ...::MyNumber(...) [MyNumber] | provenance | | | main.rs:164:14:164:39 | ...::MyNumber(...) [MyNumber] | main.rs:164:33:164:38 | number | provenance | | | main.rs:164:33:164:38 | number | main.rs:162:26:166:5 | { ... } | provenance | | -| main.rs:174:13:174:21 | my_number [MyNumber] | main.rs:156:18:156:21 | SelfParam [MyNumber] | provenance | | -| main.rs:174:13:174:21 | my_number [MyNumber] | main.rs:175:14:175:34 | my_number.to_number() | provenance | | +| main.rs:174:13:174:21 | my_number [MyNumber] | main.rs:175:14:175:22 | my_number [MyNumber] | provenance | | | main.rs:174:25:174:54 | ...::MyNumber(...) [MyNumber] | main.rs:174:13:174:21 | my_number [MyNumber] | provenance | | | main.rs:174:44:174:53 | source(...) | main.rs:174:25:174:54 | ...::MyNumber(...) [MyNumber] | provenance | | +| main.rs:175:14:175:22 | my_number [MyNumber] | main.rs:156:18:156:21 | SelfParam [MyNumber] | provenance | | +| main.rs:175:14:175:22 | my_number [MyNumber] | main.rs:175:14:175:34 | my_number.to_number() | provenance | | | main.rs:179:13:179:21 | my_number [MyNumber] | main.rs:180:16:180:24 | my_number [MyNumber] | provenance | | | main.rs:179:25:179:54 | ...::MyNumber(...) [MyNumber] | main.rs:179:13:179:21 | my_number [MyNumber] | provenance | | | main.rs:179:44:179:53 | source(...) | main.rs:179:25:179:54 | ...::MyNumber(...) [MyNumber] | provenance | | @@ -87,7 +92,7 @@ edges | main.rs:210:17:210:17 | [post] p [&ref] | main.rs:211:15:211:15 | p [&ref] | provenance | | | main.rs:210:20:210:29 | source(...) | main.rs:200:29:200:38 | ...: i64 | provenance | | | main.rs:210:20:210:29 | source(...) | main.rs:210:17:210:17 | [post] p [&ref] | provenance | | -| main.rs:211:15:211:15 | p [&ref] | main.rs:211:14:211:15 | * ... | provenance | | +| main.rs:211:15:211:15 | p [&ref] | main.rs:211:14:211:15 | * ... | provenance | MaD:1 | | main.rs:218:17:218:22 | [post] &mut n [&ref] | main.rs:218:22:218:22 | [post] n | provenance | | | main.rs:218:22:218:22 | [post] n | main.rs:219:14:219:14 | n | provenance | | | main.rs:218:25:218:34 | source(...) | main.rs:200:29:200:38 | ...: i64 | provenance | | @@ -173,6 +178,10 @@ nodes | main.rs:73:14:73:23 | source(...) | semmle.label | source(...) | | main.rs:74:14:74:15 | * ... | semmle.label | * ... | | main.rs:74:15:74:15 | b [&ref] | semmle.label | b [&ref] | +| main.rs:90:11:90:16 | [post] &mut a [&ref] | semmle.label | [post] &mut a [&ref] | +| main.rs:90:16:90:16 | [post] a | semmle.label | [post] a | +| main.rs:90:21:90:30 | source(...) | semmle.label | source(...) | +| main.rs:91:14:91:14 | a | semmle.label | a | | main.rs:105:10:105:10 | [post] c [&ref] | semmle.label | [post] c [&ref] | | main.rs:105:14:105:23 | source(...) | semmle.label | source(...) | | main.rs:106:14:106:15 | * ... | semmle.label | * ... | @@ -201,6 +210,7 @@ nodes | main.rs:174:13:174:21 | my_number [MyNumber] | semmle.label | my_number [MyNumber] | | main.rs:174:25:174:54 | ...::MyNumber(...) [MyNumber] | semmle.label | ...::MyNumber(...) [MyNumber] | | main.rs:174:44:174:53 | source(...) | semmle.label | source(...) | +| main.rs:175:14:175:22 | my_number [MyNumber] | semmle.label | my_number [MyNumber] | | main.rs:175:14:175:34 | my_number.to_number() | semmle.label | my_number.to_number() | | main.rs:179:13:179:21 | my_number [MyNumber] | semmle.label | my_number [MyNumber] | | main.rs:179:25:179:54 | ...::MyNumber(...) [MyNumber] | semmle.label | ...::MyNumber(...) [MyNumber] | @@ -262,7 +272,7 @@ nodes | main.rs:255:14:255:33 | to_number(...) | semmle.label | to_number(...) | | main.rs:255:24:255:32 | my_number [MyNumber] | semmle.label | my_number [MyNumber] | subpaths -| main.rs:174:13:174:21 | my_number [MyNumber] | main.rs:156:18:156:21 | SelfParam [MyNumber] | main.rs:156:31:160:5 | { ... } | main.rs:175:14:175:34 | my_number.to_number() | +| main.rs:175:14:175:22 | my_number [MyNumber] | main.rs:156:18:156:21 | SelfParam [MyNumber] | main.rs:156:31:160:5 | { ... } | main.rs:175:14:175:34 | my_number.to_number() | | main.rs:180:15:180:24 | &my_number [&ref, MyNumber] | main.rs:162:12:162:16 | SelfParam [&ref, MyNumber] | main.rs:162:26:166:5 | { ... } | main.rs:180:14:180:31 | ... .get() | | main.rs:186:14:186:22 | my_number [MyNumber] | main.rs:162:12:162:16 | SelfParam [&ref, MyNumber] | main.rs:162:26:166:5 | { ... } | main.rs:186:14:186:28 | my_number.get() | | main.rs:192:14:192:22 | my_number [&ref, MyNumber] | main.rs:156:18:156:21 | SelfParam [MyNumber] | main.rs:156:31:160:5 | { ... } | main.rs:192:14:192:34 | my_number.to_number() | @@ -285,6 +295,7 @@ testFailures | main.rs:53:14:53:15 | * ... | main.rs:51:17:51:26 | source(...) | main.rs:53:14:53:15 | * ... | $@ | main.rs:51:17:51:26 | source(...) | source(...) | | main.rs:59:33:59:34 | * ... | main.rs:57:22:57:31 | source(...) | main.rs:59:33:59:34 | * ... | $@ | main.rs:57:22:57:31 | source(...) | source(...) | | main.rs:74:14:74:15 | * ... | main.rs:73:14:73:23 | source(...) | main.rs:74:14:74:15 | * ... | $@ | main.rs:73:14:73:23 | source(...) | source(...) | +| main.rs:91:14:91:14 | a | main.rs:90:21:90:30 | source(...) | main.rs:91:14:91:14 | a | $@ | main.rs:90:21:90:30 | source(...) | source(...) | | main.rs:106:14:106:15 | * ... | main.rs:105:14:105:23 | source(...) | main.rs:106:14:106:15 | * ... | $@ | main.rs:105:14:105:23 | source(...) | source(...) | | main.rs:113:14:113:15 | * ... | main.rs:112:25:112:34 | source(...) | main.rs:113:14:113:15 | * ... | $@ | main.rs:112:25:112:34 | source(...) | source(...) | | main.rs:175:14:175:34 | my_number.to_number() | main.rs:174:44:174:53 | source(...) | main.rs:175:14:175:34 | my_number.to_number() | $@ | main.rs:174:44:174:53 | source(...) | source(...) | diff --git a/rust/ql/test/library-tests/dataflow/pointers/inline-flow.ql b/rust/ql/test/library-tests/dataflow/pointers/inline-flow.ql index e399ea0e5d7..5dcb7ee70a9 100644 --- a/rust/ql/test/library-tests/dataflow/pointers/inline-flow.ql +++ b/rust/ql/test/library-tests/dataflow/pointers/inline-flow.ql @@ -5,8 +5,8 @@ import rust import utils.test.InlineFlowTest import DefaultFlowTest -import ValueFlow::PathGraph +import TaintFlow::PathGraph -from ValueFlow::PathNode source, ValueFlow::PathNode sink -where ValueFlow::flowPath(source, sink) +from TaintFlow::PathNode source, TaintFlow::PathNode sink +where TaintFlow::flowPath(source, sink) select sink, source, sink, "$@", source, source.toString() diff --git a/rust/ql/test/library-tests/dataflow/pointers/main.rs b/rust/ql/test/library-tests/dataflow/pointers/main.rs index d7e28c9368f..2ebd5ee28df 100644 --- a/rust/ql/test/library-tests/dataflow/pointers/main.rs +++ b/rust/ql/test/library-tests/dataflow/pointers/main.rs @@ -88,7 +88,7 @@ mod intraprocedural_mutable_borrows { let mut a = 1; sink(a); *(&mut a) = source(87); - sink(a); // $ MISSING: hasValueFlow=87 + sink(a); // $ hasValueFlow=87 } pub fn clear_through_borrow() { diff --git a/rust/ql/test/library-tests/dataflow/sources/database/InlineFlow.expected b/rust/ql/test/library-tests/dataflow/sources/database/InlineFlow.expected index db1e69c43fb..7fd1387d652 100644 --- a/rust/ql/test/library-tests/dataflow/sources/database/InlineFlow.expected +++ b/rust/ql/test/library-tests/dataflow/sources/database/InlineFlow.expected @@ -54,7 +54,6 @@ edges | test.rs:64:21:67:10 | conn.query_fold(...) [Ok] | test.rs:64:21:67:11 | TryExpr | provenance | | | test.rs:64:21:67:11 | TryExpr | test.rs:64:13:64:17 | total | provenance | | | test.rs:64:26:64:35 | query_fold | test.rs:64:76:64:83 | ...: i64 | provenance | Src:MaD:2 | -| test.rs:64:76:64:83 | ...: i64 | test.rs:64:86:67:9 | { ... } | provenance | | | test.rs:64:76:64:83 | ...: i64 | test.rs:65:18:65:20 | row | provenance | | | test.rs:64:76:64:83 | ...: i64 | test.rs:66:19:66:21 | row | provenance | | | test.rs:64:86:67:9 | { ... } | test.rs:64:21:67:10 | conn.query_fold(...) [Ok] | provenance | MaD:13 | @@ -87,7 +86,6 @@ edges | test.rs:151:21:154:16 | await ... [Ok] | test.rs:151:21:154:17 | TryExpr | provenance | | | test.rs:151:21:154:17 | TryExpr | test.rs:151:13:151:17 | total | provenance | | | test.rs:151:26:151:35 | query_fold | test.rs:151:76:151:83 | ...: i64 | provenance | Src:MaD:4 | -| test.rs:151:76:151:83 | ...: i64 | test.rs:151:86:154:9 | { ... } | provenance | | | test.rs:151:76:151:83 | ...: i64 | test.rs:152:18:152:20 | row | provenance | | | test.rs:151:76:151:83 | ...: i64 | test.rs:153:19:153:21 | row | provenance | | | test.rs:151:86:154:9 | { ... } | test.rs:151:21:154:10 | conn.query_fold(...) [future, Ok] | provenance | MaD:14 | diff --git a/rust/ql/test/library-tests/dataflow/sources/env/InlineFlow.expected b/rust/ql/test/library-tests/dataflow/sources/env/InlineFlow.expected index 00821decfdf..60066fdd74e 100644 --- a/rust/ql/test/library-tests/dataflow/sources/env/InlineFlow.expected +++ b/rust/ql/test/library-tests/dataflow/sources/env/InlineFlow.expected @@ -7,22 +7,23 @@ models | 6 | Source: std::env::var; ReturnValue.Field[core::result::Result::Ok(0)]; environment | | 7 | Source: std::env::var_os; ReturnValue.Field[core::option::Option::Some(0)]; environment | | 8 | Summary: <_ as core::iter::traits::iterator::Iterator>::collect; Argument[self].Element; ReturnValue.Element; value | -| 9 | Summary: <_ as core::iter::traits::iterator::Iterator>::nth; Argument[self].Element; ReturnValue.Field[core::option::Option::Some(0)]; value | -| 10 | Summary: ::expect; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | -| 11 | Summary: ::unwrap; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | -| 12 | Summary: ::expect; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | -| 13 | Summary: ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | -| 14 | Summary: ::parse; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | +| 9 | Summary: <_ as core::iter::traits::iterator::Iterator>::nth; Argument[self].Reference.Element; ReturnValue.Field[core::option::Option::Some(0)]; value | +| 10 | Summary: <_ as core::ops::index::Index>::index; Argument[self].Reference.Element; ReturnValue.Reference; value | +| 11 | Summary: ::expect; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | +| 12 | Summary: ::unwrap; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | +| 13 | Summary: ::expect; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | +| 14 | Summary: ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | +| 15 | Summary: ::parse; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | edges | test.rs:6:10:6:22 | ...::var | test.rs:6:10:6:30 | ...::var(...) | provenance | Src:MaD:6 | | test.rs:7:10:7:25 | ...::var_os | test.rs:7:10:7:33 | ...::var_os(...) | provenance | Src:MaD:7 | | test.rs:9:9:9:12 | var1 | test.rs:12:10:12:13 | var1 | provenance | | | test.rs:9:16:9:28 | ...::var | test.rs:9:16:9:36 | ...::var(...) [Ok] | provenance | Src:MaD:6 | -| test.rs:9:16:9:36 | ...::var(...) [Ok] | test.rs:9:16:9:59 | ... .expect(...) | provenance | MaD:12 | +| test.rs:9:16:9:36 | ...::var(...) [Ok] | test.rs:9:16:9:59 | ... .expect(...) | provenance | MaD:13 | | test.rs:9:16:9:59 | ... .expect(...) | test.rs:9:9:9:12 | var1 | provenance | | | test.rs:10:9:10:12 | var2 | test.rs:13:10:13:13 | var2 | provenance | | | test.rs:10:16:10:31 | ...::var_os | test.rs:10:16:10:39 | ...::var_os(...) [Some] | provenance | Src:MaD:7 | -| test.rs:10:16:10:39 | ...::var_os(...) [Some] | test.rs:10:16:10:48 | ... .unwrap() | provenance | MaD:11 | +| test.rs:10:16:10:39 | ...::var_os(...) [Some] | test.rs:10:16:10:48 | ... .unwrap() | provenance | MaD:12 | | test.rs:10:16:10:48 | ... .unwrap() | test.rs:10:9:10:12 | var2 | provenance | | | test.rs:27:9:27:12 | args [element] | test.rs:28:20:28:23 | args [element] | provenance | | | test.rs:27:9:27:12 | args [element] | test.rs:29:17:29:20 | args [element] | provenance | | @@ -31,28 +32,28 @@ edges | test.rs:27:29:27:54 | ... .collect() [element] | test.rs:27:9:27:12 | args [element] | provenance | | | test.rs:28:9:28:15 | my_path [&ref] | test.rs:34:10:34:16 | my_path | provenance | | | test.rs:28:19:28:26 | &... [&ref] | test.rs:28:9:28:15 | my_path [&ref] | provenance | | -| test.rs:28:20:28:23 | args [element] | test.rs:28:20:28:26 | args[0] | provenance | | +| test.rs:28:20:28:23 | args [element] | test.rs:28:20:28:26 | args[0] | provenance | MaD:10 | | test.rs:28:20:28:26 | args[0] | test.rs:28:19:28:26 | &... [&ref] | provenance | | | test.rs:29:9:29:12 | arg1 [&ref] | test.rs:35:10:35:13 | arg1 | provenance | | | test.rs:29:16:29:23 | &... [&ref] | test.rs:29:9:29:12 | arg1 [&ref] | provenance | | -| test.rs:29:17:29:20 | args [element] | test.rs:29:17:29:23 | args[1] | provenance | | +| test.rs:29:17:29:20 | args [element] | test.rs:29:17:29:23 | args[1] | provenance | MaD:10 | | test.rs:29:17:29:23 | args[1] | test.rs:29:16:29:23 | &... [&ref] | provenance | | | test.rs:30:9:30:12 | arg2 | test.rs:36:10:36:13 | arg2 | provenance | | | test.rs:30:16:30:29 | ...::args | test.rs:30:16:30:31 | ...::args(...) [element] | provenance | Src:MaD:1 | | test.rs:30:16:30:31 | ...::args(...) [element] | test.rs:30:16:30:38 | ... .nth(...) [Some] | provenance | MaD:9 | -| test.rs:30:16:30:38 | ... .nth(...) [Some] | test.rs:30:16:30:47 | ... .unwrap() | provenance | MaD:11 | +| test.rs:30:16:30:38 | ... .nth(...) [Some] | test.rs:30:16:30:47 | ... .unwrap() | provenance | MaD:12 | | test.rs:30:16:30:47 | ... .unwrap() | test.rs:30:9:30:12 | arg2 | provenance | | | test.rs:31:9:31:12 | arg3 | test.rs:37:10:37:13 | arg3 | provenance | | | test.rs:31:16:31:32 | ...::args_os | test.rs:31:16:31:34 | ...::args_os(...) [element] | provenance | Src:MaD:2 | | test.rs:31:16:31:34 | ...::args_os(...) [element] | test.rs:31:16:31:41 | ... .nth(...) [Some] | provenance | MaD:9 | -| test.rs:31:16:31:41 | ... .nth(...) [Some] | test.rs:31:16:31:50 | ... .unwrap() | provenance | MaD:11 | +| test.rs:31:16:31:41 | ... .nth(...) [Some] | test.rs:31:16:31:50 | ... .unwrap() | provenance | MaD:12 | | test.rs:31:16:31:50 | ... .unwrap() | test.rs:31:9:31:12 | arg3 | provenance | | | test.rs:32:9:32:12 | arg4 | test.rs:38:10:38:13 | arg4 | provenance | | | test.rs:32:16:32:29 | ...::args | test.rs:32:16:32:31 | ...::args(...) [element] | provenance | Src:MaD:1 | | test.rs:32:16:32:31 | ...::args(...) [element] | test.rs:32:16:32:38 | ... .nth(...) [Some] | provenance | MaD:9 | -| test.rs:32:16:32:38 | ... .nth(...) [Some] | test.rs:32:16:32:47 | ... .unwrap() | provenance | MaD:11 | -| test.rs:32:16:32:47 | ... .unwrap() | test.rs:32:16:32:64 | ... .parse() [Ok] | provenance | MaD:14 | -| test.rs:32:16:32:64 | ... .parse() [Ok] | test.rs:32:16:32:73 | ... .unwrap() | provenance | MaD:13 | +| test.rs:32:16:32:38 | ... .nth(...) [Some] | test.rs:32:16:32:47 | ... .unwrap() | provenance | MaD:12 | +| test.rs:32:16:32:47 | ... .unwrap() | test.rs:32:16:32:64 | ... .parse() [Ok] | provenance | MaD:15 | +| test.rs:32:16:32:64 | ... .parse() [Ok] | test.rs:32:16:32:73 | ... .unwrap() | provenance | MaD:14 | | test.rs:32:16:32:73 | ... .unwrap() | test.rs:32:9:32:12 | arg4 | provenance | | | test.rs:40:9:40:11 | arg | test.rs:41:14:41:16 | arg | provenance | | | test.rs:40:16:40:29 | ...::args | test.rs:40:16:40:31 | ...::args(...) [element] | provenance | Src:MaD:1 | @@ -62,15 +63,15 @@ edges | test.rs:44:16:44:34 | ...::args_os(...) [element] | test.rs:44:9:44:11 | arg | provenance | | | test.rs:50:9:50:11 | dir | test.rs:54:10:54:12 | dir | provenance | | | test.rs:50:15:50:35 | ...::current_dir | test.rs:50:15:50:37 | ...::current_dir(...) [Ok] | provenance | Src:MaD:3 | -| test.rs:50:15:50:37 | ...::current_dir(...) [Ok] | test.rs:50:15:50:54 | ... .expect(...) | provenance | MaD:12 | +| test.rs:50:15:50:37 | ...::current_dir(...) [Ok] | test.rs:50:15:50:54 | ... .expect(...) | provenance | MaD:13 | | test.rs:50:15:50:54 | ... .expect(...) | test.rs:50:9:50:11 | dir | provenance | | | test.rs:51:9:51:11 | exe | test.rs:55:10:55:12 | exe | provenance | | | test.rs:51:15:51:35 | ...::current_exe | test.rs:51:15:51:37 | ...::current_exe(...) [Ok] | provenance | Src:MaD:4 | -| test.rs:51:15:51:37 | ...::current_exe(...) [Ok] | test.rs:51:15:51:54 | ... .expect(...) | provenance | MaD:12 | +| test.rs:51:15:51:37 | ...::current_exe(...) [Ok] | test.rs:51:15:51:54 | ... .expect(...) | provenance | MaD:13 | | test.rs:51:15:51:54 | ... .expect(...) | test.rs:51:9:51:11 | exe | provenance | | | test.rs:52:9:52:12 | home | test.rs:56:10:56:13 | home | provenance | | | test.rs:52:16:52:33 | ...::home_dir | test.rs:52:16:52:35 | ...::home_dir(...) [Some] | provenance | Src:MaD:5 | -| test.rs:52:16:52:35 | ...::home_dir(...) [Some] | test.rs:52:16:52:52 | ... .expect(...) | provenance | MaD:10 | +| test.rs:52:16:52:35 | ...::home_dir(...) [Some] | test.rs:52:16:52:52 | ... .expect(...) | provenance | MaD:11 | | test.rs:52:16:52:52 | ... .expect(...) | test.rs:52:9:52:12 | home | provenance | | nodes | test.rs:6:10:6:22 | ...::var | semmle.label | ...::var | diff --git a/rust/ql/test/library-tests/dataflow/sources/file/InlineFlow.expected b/rust/ql/test/library-tests/dataflow/sources/file/InlineFlow.expected index 90d01d250d0..22bc5f61d77 100644 --- a/rust/ql/test/library-tests/dataflow/sources/file/InlineFlow.expected +++ b/rust/ql/test/library-tests/dataflow/sources/file/InlineFlow.expected @@ -18,30 +18,26 @@ models | 17 | Source: tokio::fs::read_link::read_link; ReturnValue.Future.Field[core::result::Result::Ok(0)]; file | | 18 | Source: tokio::fs::read_to_string::read_to_string; ReturnValue.Future.Field[core::result::Result::Ok(0)]; file | | 19 | Summary: <_ as async_std::io::read::ReadExt>::read; Argument[self].Reference; Argument[0].Reference; taint | -| 20 | Summary: <_ as async_std::io::read::ReadExt>::read; Argument[self]; Argument[0].Reference; taint | -| 21 | Summary: <_ as core::clone::Clone>::clone; Argument[self].Reference; ReturnValue; value | -| 22 | Summary: <_ as std::io::Read>::bytes; Argument[self]; ReturnValue; taint | -| 23 | Summary: <_ as std::io::Read>::chain; Argument[0]; ReturnValue; taint | -| 24 | Summary: <_ as std::io::Read>::chain; Argument[self]; ReturnValue; taint | -| 25 | Summary: <_ as std::io::Read>::read; Argument[self]; Argument[0].Reference; taint | -| 26 | Summary: <_ as std::io::Read>::read_exact; Argument[self]; Argument[0].Reference; taint | -| 27 | Summary: <_ as std::io::Read>::read_to_end; Argument[self]; Argument[0].Reference; taint | -| 28 | Summary: <_ as std::io::Read>::read_to_string; Argument[self]; Argument[0].Reference; taint | -| 29 | Summary: <_ as std::io::Read>::take; Argument[self]; ReturnValue; taint | -| 30 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read; Argument[self]; Argument[0].Reference; taint | -| 31 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_buf; Argument[self]; Argument[0].Reference; taint | -| 32 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_exact; Argument[self]; Argument[0].Reference; taint | -| 33 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_f32; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | -| 34 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i16; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | -| 35 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i64_le; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | -| 36 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_to_end; Argument[self]; Argument[0].Reference; taint | -| 37 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_to_string; Argument[self]; Argument[0].Reference; taint | -| 38 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u8; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | -| 39 | Summary: ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | -| 40 | Summary: ::read; Argument[self]; Argument[0]; taint | -| 41 | Summary: ::read_to_end; Argument[self]; Argument[0]; taint | -| 42 | Summary: ::read_to_string; Argument[self]; Argument[0]; taint | -| 43 | Summary: ::as_path; Argument[self]; ReturnValue; value | +| 20 | Summary: <_ as core::clone::Clone>::clone; Argument[self].Reference; ReturnValue; value | +| 21 | Summary: <_ as std::io::Read>::bytes; Argument[self]; ReturnValue; taint | +| 22 | Summary: <_ as std::io::Read>::chain; Argument[0]; ReturnValue; taint | +| 23 | Summary: <_ as std::io::Read>::chain; Argument[self]; ReturnValue; taint | +| 24 | Summary: <_ as std::io::Read>::read; Argument[self].Reference; Argument[0].Reference; taint | +| 25 | Summary: <_ as std::io::Read>::read_exact; Argument[self].Reference; Argument[0].Reference; taint | +| 26 | Summary: <_ as std::io::Read>::read_to_end; Argument[self].Reference; Argument[0].Reference; taint | +| 27 | Summary: <_ as std::io::Read>::read_to_string; Argument[self].Reference; Argument[0].Reference; taint | +| 28 | Summary: <_ as std::io::Read>::take; Argument[self]; ReturnValue; taint | +| 29 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read; Argument[self].Reference; Argument[0].Reference; taint | +| 30 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_buf; Argument[self].Reference; Argument[0].Reference; taint | +| 31 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_exact; Argument[self].Reference; Argument[0].Reference; taint | +| 32 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_f32; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | +| 33 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i16; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | +| 34 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i64_le; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | +| 35 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_to_end; Argument[self].Reference; Argument[0].Reference; taint | +| 36 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_to_string; Argument[self].Reference; Argument[0].Reference; taint | +| 37 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u8; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | +| 38 | Summary: ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | +| 39 | Summary: ::as_path; Argument[self]; ReturnValue; value | edges | test.rs:12:13:12:18 | buffer | test.rs:13:14:13:19 | buffer | provenance | | | test.rs:12:31:12:43 | ...::read | test.rs:12:31:12:43 | ...::read [Ok] | provenance | Src:MaD:11 | @@ -62,21 +58,18 @@ edges | test.rs:22:22:22:51 | ...::read_to_string(...) [Ok] | test.rs:22:22:22:52 | TryExpr | provenance | | | test.rs:22:22:22:52 | TryExpr | test.rs:22:13:22:18 | buffer | provenance | | | test.rs:29:13:29:16 | path | test.rs:30:14:30:17 | path | provenance | | -| test.rs:29:13:29:16 | path | test.rs:30:14:30:25 | path.clone() | provenance | MaD:21 | | test.rs:29:13:29:16 | path | test.rs:31:14:31:17 | path | provenance | | -| test.rs:29:13:29:16 | path | test.rs:31:14:31:25 | path.clone() | provenance | MaD:21 | | test.rs:29:13:29:16 | path | test.rs:41:14:41:17 | path | provenance | | | test.rs:29:20:29:27 | e.path() | test.rs:29:13:29:16 | path | provenance | | | test.rs:29:22:29:25 | path | test.rs:29:20:29:27 | e.path() | provenance | Src:MaD:4 MaD:4 | -| test.rs:30:14:30:17 | path | test.rs:30:14:30:25 | path.clone() | provenance | MaD:21 | -| test.rs:31:14:31:17 | path | test.rs:31:14:31:25 | path.clone() | provenance | MaD:21 | -| test.rs:31:14:31:25 | path.clone() | test.rs:31:14:31:35 | ... .as_path() | provenance | MaD:43 | +| test.rs:30:14:30:17 | path | test.rs:30:14:30:25 | path.clone() | provenance | MaD:20 | +| test.rs:31:14:31:17 | path | test.rs:31:14:31:25 | path.clone() | provenance | MaD:20 | +| test.rs:31:14:31:25 | path.clone() | test.rs:31:14:31:35 | ... .as_path() | provenance | MaD:39 | | test.rs:43:13:43:21 | file_name | test.rs:44:14:44:22 | file_name | provenance | | -| test.rs:43:13:43:21 | file_name | test.rs:44:14:44:30 | file_name.clone() | provenance | MaD:21 | | test.rs:43:13:43:21 | file_name | test.rs:49:14:49:22 | file_name | provenance | | | test.rs:43:25:43:37 | e.file_name() | test.rs:43:13:43:21 | file_name | provenance | | | test.rs:43:27:43:35 | file_name | test.rs:43:25:43:37 | e.file_name() | provenance | Src:MaD:3 MaD:3 | -| test.rs:44:14:44:22 | file_name | test.rs:44:14:44:30 | file_name.clone() | provenance | MaD:21 | +| test.rs:44:14:44:22 | file_name | test.rs:44:14:44:30 | file_name.clone() | provenance | MaD:20 | | test.rs:65:13:65:18 | target | test.rs:66:14:66:19 | target | provenance | | | test.rs:65:22:65:34 | ...::read_link | test.rs:65:22:65:49 | ...::read_link(...) [Ok] | provenance | Src:MaD:13 | | test.rs:65:22:65:49 | ...::read_link(...) [Ok] | test.rs:65:22:65:50 | TryExpr | provenance | | @@ -109,61 +102,57 @@ edges | test.rs:97:22:97:56 | ...::read_link(...) [future, Ok] | test.rs:97:22:97:62 | await ... [Ok] | provenance | | | test.rs:97:22:97:62 | await ... [Ok] | test.rs:97:22:97:63 | TryExpr | provenance | | | test.rs:97:22:97:63 | TryExpr | test.rs:97:13:97:18 | target | provenance | | -| test.rs:107:9:107:16 | mut file | test.rs:111:32:111:42 | [post] &mut buffer | provenance | MaD:40 | -| test.rs:107:9:107:16 | mut file | test.rs:111:32:111:42 | [post] &mut buffer [&ref] | provenance | MaD:25 | -| test.rs:107:9:107:16 | mut file | test.rs:117:39:117:49 | [post] &mut buffer | provenance | MaD:41 | -| test.rs:107:9:107:16 | mut file | test.rs:117:39:117:49 | [post] &mut buffer [&ref] | provenance | MaD:27 | -| test.rs:107:9:107:16 | mut file | test.rs:123:42:123:52 | [post] &mut buffer | provenance | MaD:42 | -| test.rs:107:9:107:16 | mut file | test.rs:123:42:123:52 | [post] &mut buffer [&ref] | provenance | MaD:28 | -| test.rs:107:9:107:16 | mut file | test.rs:129:25:129:35 | [post] &mut buffer [&ref] | provenance | MaD:26 | -| test.rs:107:9:107:16 | mut file | test.rs:133:17:133:28 | file.bytes() | provenance | MaD:22 | +| test.rs:107:9:107:16 | mut file | test.rs:111:22:111:25 | file | provenance | | +| test.rs:107:9:107:16 | mut file | test.rs:117:22:117:25 | file | provenance | | +| test.rs:107:9:107:16 | mut file | test.rs:123:22:123:25 | file | provenance | | +| test.rs:107:9:107:16 | mut file | test.rs:129:9:129:12 | file | provenance | | +| test.rs:107:9:107:16 | mut file | test.rs:133:17:133:20 | file | provenance | | | test.rs:107:20:107:38 | ...::open | test.rs:107:20:107:50 | ...::open(...) [Ok] | provenance | Src:MaD:5 | | test.rs:107:20:107:50 | ...::open(...) [Ok] | test.rs:107:20:107:51 | TryExpr | provenance | | | test.rs:107:20:107:51 | TryExpr | test.rs:107:9:107:16 | mut file | provenance | | -| test.rs:111:32:111:42 | [post] &mut buffer | test.rs:112:15:112:20 | buffer | provenance | | +| test.rs:111:22:111:25 | file | test.rs:111:32:111:42 | [post] &mut buffer [&ref] | provenance | MaD:24 | | test.rs:111:32:111:42 | [post] &mut buffer [&ref] | test.rs:111:37:111:42 | [post] buffer | provenance | | | test.rs:111:37:111:42 | [post] buffer | test.rs:112:15:112:20 | buffer | provenance | | | test.rs:112:15:112:20 | buffer | test.rs:112:14:112:20 | &buffer | provenance | | -| test.rs:117:39:117:49 | [post] &mut buffer | test.rs:118:15:118:20 | buffer | provenance | | +| test.rs:117:22:117:25 | file | test.rs:117:39:117:49 | [post] &mut buffer [&ref] | provenance | MaD:26 | | test.rs:117:39:117:49 | [post] &mut buffer [&ref] | test.rs:117:44:117:49 | [post] buffer | provenance | | | test.rs:117:44:117:49 | [post] buffer | test.rs:118:15:118:20 | buffer | provenance | | | test.rs:118:15:118:20 | buffer | test.rs:118:14:118:20 | &buffer | provenance | | -| test.rs:123:42:123:52 | [post] &mut buffer | test.rs:124:15:124:20 | buffer | provenance | | +| test.rs:123:22:123:25 | file | test.rs:123:42:123:52 | [post] &mut buffer [&ref] | provenance | MaD:27 | | test.rs:123:42:123:52 | [post] &mut buffer [&ref] | test.rs:123:47:123:52 | [post] buffer | provenance | | | test.rs:123:47:123:52 | [post] buffer | test.rs:124:15:124:20 | buffer | provenance | | | test.rs:124:15:124:20 | buffer | test.rs:124:14:124:20 | &buffer | provenance | | +| test.rs:129:9:129:12 | file | test.rs:129:25:129:35 | [post] &mut buffer [&ref] | provenance | MaD:25 | | test.rs:129:25:129:35 | [post] &mut buffer [&ref] | test.rs:129:30:129:35 | [post] buffer | provenance | | | test.rs:129:30:129:35 | [post] buffer | test.rs:130:15:130:20 | buffer | provenance | | | test.rs:130:15:130:20 | buffer | test.rs:130:14:130:20 | &buffer | provenance | | +| test.rs:133:17:133:20 | file | test.rs:133:17:133:28 | file.bytes() | provenance | MaD:21 | | test.rs:133:17:133:28 | file.bytes() | test.rs:134:14:134:17 | byte | provenance | | -| test.rs:140:13:140:18 | mut f1 | test.rs:142:30:142:40 | [post] &mut buffer | provenance | MaD:40 | -| test.rs:140:13:140:18 | mut f1 | test.rs:142:30:142:40 | [post] &mut buffer [&ref] | provenance | MaD:25 | -| test.rs:140:22:140:63 | ... .open(...) [Ok] | test.rs:140:22:140:72 | ... .unwrap() | provenance | MaD:39 | +| test.rs:140:13:140:18 | mut f1 | test.rs:142:22:142:23 | f1 | provenance | | +| test.rs:140:22:140:63 | ... .open(...) [Ok] | test.rs:140:22:140:72 | ... .unwrap() | provenance | MaD:38 | | test.rs:140:22:140:72 | ... .unwrap() | test.rs:140:13:140:18 | mut f1 | provenance | | | test.rs:140:50:140:53 | open | test.rs:140:22:140:63 | ... .open(...) [Ok] | provenance | Src:MaD:6 | -| test.rs:142:30:142:40 | [post] &mut buffer | test.rs:143:15:143:20 | buffer | provenance | | +| test.rs:142:22:142:23 | f1 | test.rs:142:30:142:40 | [post] &mut buffer [&ref] | provenance | MaD:24 | | test.rs:142:30:142:40 | [post] &mut buffer [&ref] | test.rs:142:35:142:40 | [post] buffer | provenance | | | test.rs:142:35:142:40 | [post] buffer | test.rs:143:15:143:20 | buffer | provenance | | | test.rs:143:15:143:20 | buffer | test.rs:143:14:143:20 | &buffer | provenance | | -| test.rs:147:13:147:18 | mut f2 | test.rs:149:30:149:40 | [post] &mut buffer | provenance | MaD:40 | -| test.rs:147:13:147:18 | mut f2 | test.rs:149:30:149:40 | [post] &mut buffer [&ref] | provenance | MaD:25 | -| test.rs:147:22:147:80 | ... .open(...) [Ok] | test.rs:147:22:147:89 | ... .unwrap() | provenance | MaD:39 | +| test.rs:147:13:147:18 | mut f2 | test.rs:149:22:149:23 | f2 | provenance | | +| test.rs:147:22:147:80 | ... .open(...) [Ok] | test.rs:147:22:147:89 | ... .unwrap() | provenance | MaD:38 | | test.rs:147:22:147:89 | ... .unwrap() | test.rs:147:13:147:18 | mut f2 | provenance | | | test.rs:147:67:147:70 | open | test.rs:147:22:147:80 | ... .open(...) [Ok] | provenance | Src:MaD:6 | -| test.rs:149:30:149:40 | [post] &mut buffer | test.rs:150:15:150:20 | buffer | provenance | | +| test.rs:149:22:149:23 | f2 | test.rs:149:30:149:40 | [post] &mut buffer [&ref] | provenance | MaD:24 | | test.rs:149:30:149:40 | [post] &mut buffer [&ref] | test.rs:149:35:149:40 | [post] buffer | provenance | | | test.rs:149:35:149:40 | [post] buffer | test.rs:150:15:150:20 | buffer | provenance | | | test.rs:150:15:150:20 | buffer | test.rs:150:14:150:20 | &buffer | provenance | | -| test.rs:154:13:154:18 | mut f3 | test.rs:156:30:156:40 | [post] &mut buffer | provenance | MaD:40 | -| test.rs:154:13:154:18 | mut f3 | test.rs:156:30:156:40 | [post] &mut buffer [&ref] | provenance | MaD:25 | -| test.rs:154:22:154:114 | ... .open(...) [Ok] | test.rs:154:22:154:123 | ... .unwrap() | provenance | MaD:39 | +| test.rs:154:13:154:18 | mut f3 | test.rs:156:22:156:23 | f3 | provenance | | +| test.rs:154:22:154:114 | ... .open(...) [Ok] | test.rs:154:22:154:123 | ... .unwrap() | provenance | MaD:38 | | test.rs:154:22:154:123 | ... .unwrap() | test.rs:154:13:154:18 | mut f3 | provenance | | | test.rs:154:101:154:104 | open | test.rs:154:22:154:114 | ... .open(...) [Ok] | provenance | Src:MaD:6 | -| test.rs:156:30:156:40 | [post] &mut buffer | test.rs:157:15:157:20 | buffer | provenance | | +| test.rs:156:22:156:23 | f3 | test.rs:156:30:156:40 | [post] &mut buffer [&ref] | provenance | MaD:24 | | test.rs:156:30:156:40 | [post] &mut buffer [&ref] | test.rs:156:35:156:40 | [post] buffer | provenance | | | test.rs:156:35:156:40 | [post] buffer | test.rs:157:15:157:20 | buffer | provenance | | | test.rs:157:15:157:20 | buffer | test.rs:157:14:157:20 | &buffer | provenance | | -| test.rs:164:13:164:17 | file1 | test.rs:166:26:166:43 | file1.chain(...) | provenance | MaD:24 | +| test.rs:164:13:164:17 | file1 | test.rs:166:26:166:30 | file1 | provenance | | | test.rs:164:21:164:39 | ...::open | test.rs:164:21:164:51 | ...::open(...) [Ok] | provenance | Src:MaD:5 | | test.rs:164:21:164:51 | ...::open(...) [Ok] | test.rs:164:21:164:52 | TryExpr | provenance | | | test.rs:164:21:164:52 | TryExpr | test.rs:164:13:164:17 | file1 | provenance | | @@ -171,76 +160,88 @@ edges | test.rs:165:21:165:39 | ...::open | test.rs:165:21:165:59 | ...::open(...) [Ok] | provenance | Src:MaD:5 | | test.rs:165:21:165:59 | ...::open(...) [Ok] | test.rs:165:21:165:60 | TryExpr | provenance | | | test.rs:165:21:165:60 | TryExpr | test.rs:165:13:165:17 | file2 | provenance | | -| test.rs:166:13:166:22 | mut reader | test.rs:167:31:167:41 | [post] &mut buffer [&ref] | provenance | MaD:28 | +| test.rs:166:13:166:22 | mut reader | test.rs:167:9:167:14 | reader | provenance | | +| test.rs:166:26:166:30 | file1 | test.rs:166:26:166:43 | file1.chain(...) | provenance | MaD:23 | | test.rs:166:26:166:43 | file1.chain(...) | test.rs:166:13:166:22 | mut reader | provenance | | -| test.rs:166:38:166:42 | file2 | test.rs:166:26:166:43 | file1.chain(...) | provenance | MaD:23 | +| test.rs:166:38:166:42 | file2 | test.rs:166:26:166:43 | file1.chain(...) | provenance | MaD:22 | +| test.rs:167:9:167:14 | reader | test.rs:167:31:167:41 | [post] &mut buffer [&ref] | provenance | MaD:27 | | test.rs:167:31:167:41 | [post] &mut buffer [&ref] | test.rs:167:36:167:41 | [post] buffer | provenance | | | test.rs:167:36:167:41 | [post] buffer | test.rs:168:15:168:20 | buffer | provenance | | | test.rs:168:15:168:20 | buffer | test.rs:168:14:168:20 | &buffer | provenance | | -| test.rs:173:13:173:17 | file1 | test.rs:174:26:174:40 | file1.take(...) | provenance | MaD:29 | +| test.rs:173:13:173:17 | file1 | test.rs:174:26:174:30 | file1 | provenance | | | test.rs:173:21:173:39 | ...::open | test.rs:173:21:173:51 | ...::open(...) [Ok] | provenance | Src:MaD:5 | | test.rs:173:21:173:51 | ...::open(...) [Ok] | test.rs:173:21:173:52 | TryExpr | provenance | | | test.rs:173:21:173:52 | TryExpr | test.rs:173:13:173:17 | file1 | provenance | | -| test.rs:174:13:174:22 | mut reader | test.rs:175:31:175:41 | [post] &mut buffer [&ref] | provenance | MaD:28 | +| test.rs:174:13:174:22 | mut reader | test.rs:175:9:175:14 | reader | provenance | | +| test.rs:174:26:174:30 | file1 | test.rs:174:26:174:40 | file1.take(...) | provenance | MaD:28 | | test.rs:174:26:174:40 | file1.take(...) | test.rs:174:13:174:22 | mut reader | provenance | | +| test.rs:175:9:175:14 | reader | test.rs:175:31:175:41 | [post] &mut buffer [&ref] | provenance | MaD:27 | | test.rs:175:31:175:41 | [post] &mut buffer [&ref] | test.rs:175:36:175:41 | [post] buffer | provenance | | | test.rs:175:36:175:41 | [post] buffer | test.rs:176:15:176:20 | buffer | provenance | | | test.rs:176:15:176:20 | buffer | test.rs:176:14:176:20 | &buffer | provenance | | -| test.rs:185:9:185:16 | mut file | test.rs:189:32:189:42 | [post] &mut buffer [&ref] | provenance | MaD:30 | -| test.rs:185:9:185:16 | mut file | test.rs:195:39:195:49 | [post] &mut buffer [&ref] | provenance | MaD:36 | -| test.rs:185:9:185:16 | mut file | test.rs:201:42:201:52 | [post] &mut buffer [&ref] | provenance | MaD:37 | -| test.rs:185:9:185:16 | mut file | test.rs:207:25:207:35 | [post] &mut buffer [&ref] | provenance | MaD:32 | -| test.rs:185:9:185:16 | mut file | test.rs:212:18:212:31 | file.read_u8() [future, Ok] | provenance | MaD:38 | -| test.rs:185:9:185:16 | mut file | test.rs:213:18:213:32 | file.read_i16() [future, Ok] | provenance | MaD:34 | -| test.rs:185:9:185:16 | mut file | test.rs:214:18:214:32 | file.read_f32() [future, Ok] | provenance | MaD:33 | -| test.rs:185:9:185:16 | mut file | test.rs:215:18:215:35 | file.read_i64_le() [future, Ok] | provenance | MaD:35 | -| test.rs:185:9:185:16 | mut file | test.rs:224:23:224:33 | [post] &mut buffer [&ref] | provenance | MaD:31 | +| test.rs:185:9:185:16 | mut file | test.rs:189:22:189:25 | file | provenance | | +| test.rs:185:9:185:16 | mut file | test.rs:195:22:195:25 | file | provenance | | +| test.rs:185:9:185:16 | mut file | test.rs:201:22:201:25 | file | provenance | | +| test.rs:185:9:185:16 | mut file | test.rs:207:9:207:12 | file | provenance | | +| test.rs:185:9:185:16 | mut file | test.rs:212:18:212:21 | file | provenance | | +| test.rs:185:9:185:16 | mut file | test.rs:213:18:213:21 | file | provenance | | +| test.rs:185:9:185:16 | mut file | test.rs:214:18:214:21 | file | provenance | | +| test.rs:185:9:185:16 | mut file | test.rs:215:18:215:21 | file | provenance | | +| test.rs:185:9:185:16 | mut file | test.rs:224:9:224:12 | file | provenance | | | test.rs:185:20:185:40 | ...::open | test.rs:185:20:185:52 | ...::open(...) [future, Ok] | provenance | Src:MaD:7 | | test.rs:185:20:185:52 | ...::open(...) [future, Ok] | test.rs:185:20:185:58 | await ... [Ok] | provenance | | | test.rs:185:20:185:58 | await ... [Ok] | test.rs:185:20:185:59 | TryExpr | provenance | | | test.rs:185:20:185:59 | TryExpr | test.rs:185:9:185:16 | mut file | provenance | | +| test.rs:189:22:189:25 | file | test.rs:189:32:189:42 | [post] &mut buffer [&ref] | provenance | MaD:29 | | test.rs:189:32:189:42 | [post] &mut buffer [&ref] | test.rs:189:37:189:42 | [post] buffer | provenance | | | test.rs:189:37:189:42 | [post] buffer | test.rs:190:15:190:20 | buffer | provenance | | | test.rs:190:15:190:20 | buffer | test.rs:190:14:190:20 | &buffer | provenance | | +| test.rs:195:22:195:25 | file | test.rs:195:39:195:49 | [post] &mut buffer [&ref] | provenance | MaD:35 | | test.rs:195:39:195:49 | [post] &mut buffer [&ref] | test.rs:195:44:195:49 | [post] buffer | provenance | | | test.rs:195:44:195:49 | [post] buffer | test.rs:196:15:196:20 | buffer | provenance | | | test.rs:196:15:196:20 | buffer | test.rs:196:14:196:20 | &buffer | provenance | | +| test.rs:201:22:201:25 | file | test.rs:201:42:201:52 | [post] &mut buffer [&ref] | provenance | MaD:36 | | test.rs:201:42:201:52 | [post] &mut buffer [&ref] | test.rs:201:47:201:52 | [post] buffer | provenance | | | test.rs:201:47:201:52 | [post] buffer | test.rs:202:15:202:20 | buffer | provenance | | | test.rs:202:15:202:20 | buffer | test.rs:202:14:202:20 | &buffer | provenance | | +| test.rs:207:9:207:12 | file | test.rs:207:25:207:35 | [post] &mut buffer [&ref] | provenance | MaD:31 | | test.rs:207:25:207:35 | [post] &mut buffer [&ref] | test.rs:207:30:207:35 | [post] buffer | provenance | | | test.rs:207:30:207:35 | [post] buffer | test.rs:208:15:208:20 | buffer | provenance | | | test.rs:208:15:208:20 | buffer | test.rs:208:14:208:20 | &buffer | provenance | | | test.rs:212:13:212:14 | v1 | test.rs:216:14:216:15 | v1 | provenance | | +| test.rs:212:18:212:21 | file | test.rs:212:18:212:31 | file.read_u8() [future, Ok] | provenance | MaD:37 | | test.rs:212:18:212:31 | file.read_u8() [future, Ok] | test.rs:212:18:212:37 | await ... [Ok] | provenance | | | test.rs:212:18:212:37 | await ... [Ok] | test.rs:212:18:212:38 | TryExpr | provenance | | | test.rs:212:18:212:38 | TryExpr | test.rs:212:13:212:14 | v1 | provenance | | | test.rs:213:13:213:14 | v2 | test.rs:217:14:217:15 | v2 | provenance | | +| test.rs:213:18:213:21 | file | test.rs:213:18:213:32 | file.read_i16() [future, Ok] | provenance | MaD:33 | | test.rs:213:18:213:32 | file.read_i16() [future, Ok] | test.rs:213:18:213:38 | await ... [Ok] | provenance | | | test.rs:213:18:213:38 | await ... [Ok] | test.rs:213:18:213:39 | TryExpr | provenance | | | test.rs:213:18:213:39 | TryExpr | test.rs:213:13:213:14 | v2 | provenance | | | test.rs:214:13:214:14 | v3 | test.rs:218:14:218:15 | v3 | provenance | | +| test.rs:214:18:214:21 | file | test.rs:214:18:214:32 | file.read_f32() [future, Ok] | provenance | MaD:32 | | test.rs:214:18:214:32 | file.read_f32() [future, Ok] | test.rs:214:18:214:38 | await ... [Ok] | provenance | | | test.rs:214:18:214:38 | await ... [Ok] | test.rs:214:18:214:39 | TryExpr | provenance | | | test.rs:214:18:214:39 | TryExpr | test.rs:214:13:214:14 | v3 | provenance | | | test.rs:215:13:215:14 | v4 | test.rs:219:14:219:15 | v4 | provenance | | +| test.rs:215:18:215:21 | file | test.rs:215:18:215:35 | file.read_i64_le() [future, Ok] | provenance | MaD:34 | | test.rs:215:18:215:35 | file.read_i64_le() [future, Ok] | test.rs:215:18:215:41 | await ... [Ok] | provenance | | | test.rs:215:18:215:41 | await ... [Ok] | test.rs:215:18:215:42 | TryExpr | provenance | | | test.rs:215:18:215:42 | TryExpr | test.rs:215:13:215:14 | v4 | provenance | | +| test.rs:224:9:224:12 | file | test.rs:224:23:224:33 | [post] &mut buffer [&ref] | provenance | MaD:30 | | test.rs:224:23:224:33 | [post] &mut buffer [&ref] | test.rs:224:28:224:33 | [post] buffer | provenance | | | test.rs:224:28:224:33 | [post] buffer | test.rs:225:15:225:20 | buffer | provenance | | | test.rs:225:15:225:20 | buffer | test.rs:225:14:225:20 | &buffer | provenance | | -| test.rs:231:13:231:18 | mut f1 | test.rs:233:30:233:40 | [post] &mut buffer [&ref] | provenance | MaD:30 | +| test.rs:231:13:231:18 | mut f1 | test.rs:233:22:233:23 | f1 | provenance | | | test.rs:231:22:231:65 | ... .open(...) [future, Ok] | test.rs:231:22:231:71 | await ... [Ok] | provenance | | | test.rs:231:22:231:71 | await ... [Ok] | test.rs:231:22:231:72 | TryExpr | provenance | | | test.rs:231:22:231:72 | TryExpr | test.rs:231:13:231:18 | mut f1 | provenance | | | test.rs:231:52:231:55 | open | test.rs:231:22:231:65 | ... .open(...) [future, Ok] | provenance | Src:MaD:8 | +| test.rs:233:22:233:23 | f1 | test.rs:233:30:233:40 | [post] &mut buffer [&ref] | provenance | MaD:29 | | test.rs:233:30:233:40 | [post] &mut buffer [&ref] | test.rs:233:35:233:40 | [post] buffer | provenance | | | test.rs:233:35:233:40 | [post] buffer | test.rs:234:15:234:20 | buffer | provenance | | | test.rs:234:15:234:20 | buffer | test.rs:234:14:234:20 | &buffer | provenance | | | test.rs:262:9:262:16 | mut file | test.rs:266:22:266:25 | file | provenance | | -| test.rs:262:9:262:16 | mut file | test.rs:266:32:266:42 | [post] &mut buffer [&ref] | provenance | MaD:19 | -| test.rs:262:9:262:16 | mut file | test.rs:266:32:266:42 | [post] &mut buffer [&ref] | provenance | MaD:20 | | test.rs:262:20:262:44 | ...::open | test.rs:262:20:262:56 | ...::open(...) [future, Ok] | provenance | Src:MaD:1 | | test.rs:262:20:262:56 | ...::open(...) [future, Ok] | test.rs:262:20:262:62 | await ... [Ok] | provenance | | | test.rs:262:20:262:62 | await ... [Ok] | test.rs:262:20:262:63 | TryExpr | provenance | | @@ -250,8 +251,6 @@ edges | test.rs:266:37:266:42 | [post] buffer | test.rs:267:15:267:20 | buffer | provenance | | | test.rs:267:15:267:20 | buffer | test.rs:267:14:267:20 | &buffer | provenance | | | test.rs:273:13:273:18 | mut f1 | test.rs:275:22:275:23 | f1 | provenance | | -| test.rs:273:13:273:18 | mut f1 | test.rs:275:30:275:40 | [post] &mut buffer [&ref] | provenance | MaD:19 | -| test.rs:273:13:273:18 | mut f1 | test.rs:275:30:275:40 | [post] &mut buffer [&ref] | provenance | MaD:20 | | test.rs:273:22:273:69 | ... .open(...) [future, Ok] | test.rs:273:22:273:75 | await ... [Ok] | provenance | | | test.rs:273:22:273:75 | await ... [Ok] | test.rs:273:22:273:76 | TryExpr | provenance | | | test.rs:273:22:273:76 | TryExpr | test.rs:273:13:273:18 | mut f1 | provenance | | @@ -337,32 +336,34 @@ nodes | test.rs:107:20:107:38 | ...::open | semmle.label | ...::open | | test.rs:107:20:107:50 | ...::open(...) [Ok] | semmle.label | ...::open(...) [Ok] | | test.rs:107:20:107:51 | TryExpr | semmle.label | TryExpr | -| test.rs:111:32:111:42 | [post] &mut buffer | semmle.label | [post] &mut buffer | +| test.rs:111:22:111:25 | file | semmle.label | file | | test.rs:111:32:111:42 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:111:37:111:42 | [post] buffer | semmle.label | [post] buffer | | test.rs:112:14:112:20 | &buffer | semmle.label | &buffer | | test.rs:112:15:112:20 | buffer | semmle.label | buffer | -| test.rs:117:39:117:49 | [post] &mut buffer | semmle.label | [post] &mut buffer | +| test.rs:117:22:117:25 | file | semmle.label | file | | test.rs:117:39:117:49 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:117:44:117:49 | [post] buffer | semmle.label | [post] buffer | | test.rs:118:14:118:20 | &buffer | semmle.label | &buffer | | test.rs:118:15:118:20 | buffer | semmle.label | buffer | -| test.rs:123:42:123:52 | [post] &mut buffer | semmle.label | [post] &mut buffer | +| test.rs:123:22:123:25 | file | semmle.label | file | | test.rs:123:42:123:52 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:123:47:123:52 | [post] buffer | semmle.label | [post] buffer | | test.rs:124:14:124:20 | &buffer | semmle.label | &buffer | | test.rs:124:15:124:20 | buffer | semmle.label | buffer | +| test.rs:129:9:129:12 | file | semmle.label | file | | test.rs:129:25:129:35 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:129:30:129:35 | [post] buffer | semmle.label | [post] buffer | | test.rs:130:14:130:20 | &buffer | semmle.label | &buffer | | test.rs:130:15:130:20 | buffer | semmle.label | buffer | +| test.rs:133:17:133:20 | file | semmle.label | file | | test.rs:133:17:133:28 | file.bytes() | semmle.label | file.bytes() | | test.rs:134:14:134:17 | byte | semmle.label | byte | | test.rs:140:13:140:18 | mut f1 | semmle.label | mut f1 | | test.rs:140:22:140:63 | ... .open(...) [Ok] | semmle.label | ... .open(...) [Ok] | | test.rs:140:22:140:72 | ... .unwrap() | semmle.label | ... .unwrap() | | test.rs:140:50:140:53 | open | semmle.label | open | -| test.rs:142:30:142:40 | [post] &mut buffer | semmle.label | [post] &mut buffer | +| test.rs:142:22:142:23 | f1 | semmle.label | f1 | | test.rs:142:30:142:40 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:142:35:142:40 | [post] buffer | semmle.label | [post] buffer | | test.rs:143:14:143:20 | &buffer | semmle.label | &buffer | @@ -371,7 +372,7 @@ nodes | test.rs:147:22:147:80 | ... .open(...) [Ok] | semmle.label | ... .open(...) [Ok] | | test.rs:147:22:147:89 | ... .unwrap() | semmle.label | ... .unwrap() | | test.rs:147:67:147:70 | open | semmle.label | open | -| test.rs:149:30:149:40 | [post] &mut buffer | semmle.label | [post] &mut buffer | +| test.rs:149:22:149:23 | f2 | semmle.label | f2 | | test.rs:149:30:149:40 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:149:35:149:40 | [post] buffer | semmle.label | [post] buffer | | test.rs:150:14:150:20 | &buffer | semmle.label | &buffer | @@ -380,7 +381,7 @@ nodes | test.rs:154:22:154:114 | ... .open(...) [Ok] | semmle.label | ... .open(...) [Ok] | | test.rs:154:22:154:123 | ... .unwrap() | semmle.label | ... .unwrap() | | test.rs:154:101:154:104 | open | semmle.label | open | -| test.rs:156:30:156:40 | [post] &mut buffer | semmle.label | [post] &mut buffer | +| test.rs:156:22:156:23 | f3 | semmle.label | f3 | | test.rs:156:30:156:40 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:156:35:156:40 | [post] buffer | semmle.label | [post] buffer | | test.rs:157:14:157:20 | &buffer | semmle.label | &buffer | @@ -394,8 +395,10 @@ nodes | test.rs:165:21:165:59 | ...::open(...) [Ok] | semmle.label | ...::open(...) [Ok] | | test.rs:165:21:165:60 | TryExpr | semmle.label | TryExpr | | test.rs:166:13:166:22 | mut reader | semmle.label | mut reader | +| test.rs:166:26:166:30 | file1 | semmle.label | file1 | | test.rs:166:26:166:43 | file1.chain(...) | semmle.label | file1.chain(...) | | test.rs:166:38:166:42 | file2 | semmle.label | file2 | +| test.rs:167:9:167:14 | reader | semmle.label | reader | | test.rs:167:31:167:41 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:167:36:167:41 | [post] buffer | semmle.label | [post] buffer | | test.rs:168:14:168:20 | &buffer | semmle.label | &buffer | @@ -405,7 +408,9 @@ nodes | test.rs:173:21:173:51 | ...::open(...) [Ok] | semmle.label | ...::open(...) [Ok] | | test.rs:173:21:173:52 | TryExpr | semmle.label | TryExpr | | test.rs:174:13:174:22 | mut reader | semmle.label | mut reader | +| test.rs:174:26:174:30 | file1 | semmle.label | file1 | | test.rs:174:26:174:40 | file1.take(...) | semmle.label | file1.take(...) | +| test.rs:175:9:175:14 | reader | semmle.label | reader | | test.rs:175:31:175:41 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:175:36:175:41 | [post] buffer | semmle.label | [post] buffer | | test.rs:176:14:176:20 | &buffer | semmle.label | &buffer | @@ -415,35 +420,43 @@ nodes | test.rs:185:20:185:52 | ...::open(...) [future, Ok] | semmle.label | ...::open(...) [future, Ok] | | test.rs:185:20:185:58 | await ... [Ok] | semmle.label | await ... [Ok] | | test.rs:185:20:185:59 | TryExpr | semmle.label | TryExpr | +| test.rs:189:22:189:25 | file | semmle.label | file | | test.rs:189:32:189:42 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:189:37:189:42 | [post] buffer | semmle.label | [post] buffer | | test.rs:190:14:190:20 | &buffer | semmle.label | &buffer | | test.rs:190:15:190:20 | buffer | semmle.label | buffer | +| test.rs:195:22:195:25 | file | semmle.label | file | | test.rs:195:39:195:49 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:195:44:195:49 | [post] buffer | semmle.label | [post] buffer | | test.rs:196:14:196:20 | &buffer | semmle.label | &buffer | | test.rs:196:15:196:20 | buffer | semmle.label | buffer | +| test.rs:201:22:201:25 | file | semmle.label | file | | test.rs:201:42:201:52 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:201:47:201:52 | [post] buffer | semmle.label | [post] buffer | | test.rs:202:14:202:20 | &buffer | semmle.label | &buffer | | test.rs:202:15:202:20 | buffer | semmle.label | buffer | +| test.rs:207:9:207:12 | file | semmle.label | file | | test.rs:207:25:207:35 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:207:30:207:35 | [post] buffer | semmle.label | [post] buffer | | test.rs:208:14:208:20 | &buffer | semmle.label | &buffer | | test.rs:208:15:208:20 | buffer | semmle.label | buffer | | test.rs:212:13:212:14 | v1 | semmle.label | v1 | +| test.rs:212:18:212:21 | file | semmle.label | file | | test.rs:212:18:212:31 | file.read_u8() [future, Ok] | semmle.label | file.read_u8() [future, Ok] | | test.rs:212:18:212:37 | await ... [Ok] | semmle.label | await ... [Ok] | | test.rs:212:18:212:38 | TryExpr | semmle.label | TryExpr | | test.rs:213:13:213:14 | v2 | semmle.label | v2 | +| test.rs:213:18:213:21 | file | semmle.label | file | | test.rs:213:18:213:32 | file.read_i16() [future, Ok] | semmle.label | file.read_i16() [future, Ok] | | test.rs:213:18:213:38 | await ... [Ok] | semmle.label | await ... [Ok] | | test.rs:213:18:213:39 | TryExpr | semmle.label | TryExpr | | test.rs:214:13:214:14 | v3 | semmle.label | v3 | +| test.rs:214:18:214:21 | file | semmle.label | file | | test.rs:214:18:214:32 | file.read_f32() [future, Ok] | semmle.label | file.read_f32() [future, Ok] | | test.rs:214:18:214:38 | await ... [Ok] | semmle.label | await ... [Ok] | | test.rs:214:18:214:39 | TryExpr | semmle.label | TryExpr | | test.rs:215:13:215:14 | v4 | semmle.label | v4 | +| test.rs:215:18:215:21 | file | semmle.label | file | | test.rs:215:18:215:35 | file.read_i64_le() [future, Ok] | semmle.label | file.read_i64_le() [future, Ok] | | test.rs:215:18:215:41 | await ... [Ok] | semmle.label | await ... [Ok] | | test.rs:215:18:215:42 | TryExpr | semmle.label | TryExpr | @@ -451,6 +464,7 @@ nodes | test.rs:217:14:217:15 | v2 | semmle.label | v2 | | test.rs:218:14:218:15 | v3 | semmle.label | v3 | | test.rs:219:14:219:15 | v4 | semmle.label | v4 | +| test.rs:224:9:224:12 | file | semmle.label | file | | test.rs:224:23:224:33 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:224:28:224:33 | [post] buffer | semmle.label | [post] buffer | | test.rs:225:14:225:20 | &buffer | semmle.label | &buffer | @@ -460,6 +474,7 @@ nodes | test.rs:231:22:231:71 | await ... [Ok] | semmle.label | await ... [Ok] | | test.rs:231:22:231:72 | TryExpr | semmle.label | TryExpr | | test.rs:231:52:231:55 | open | semmle.label | open | +| test.rs:233:22:233:23 | f1 | semmle.label | f1 | | test.rs:233:30:233:40 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:233:35:233:40 | [post] buffer | semmle.label | [post] buffer | | test.rs:234:14:234:20 | &buffer | semmle.label | &buffer | diff --git a/rust/ql/test/library-tests/dataflow/sources/file/TaintSources.expected b/rust/ql/test/library-tests/dataflow/sources/file/TaintSources.expected index d73106fb1cf..f7687e025d7 100644 --- a/rust/ql/test/library-tests/dataflow/sources/file/TaintSources.expected +++ b/rust/ql/test/library-tests/dataflow/sources/file/TaintSources.expected @@ -4,8 +4,10 @@ | test.rs:17:31:17:38 | ...::read | Flow source 'FileSource' of type file (DEFAULT). | | test.rs:22:22:22:39 | ...::read_to_string | Flow source 'FileSource' of type file (DEFAULT). | | test.rs:22:22:22:39 | ...::read_to_string | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:26:18:26:29 | ...::read_dir | Flow source 'FileSource' of type file (DEFAULT). | | test.rs:29:22:29:25 | path | Flow source 'FileSource' of type file (DEFAULT). | | test.rs:43:27:43:35 | file_name | Flow source 'FileSource' of type file (DEFAULT). | +| test.rs:51:52:51:59 | read_dir | Flow source 'FileSource' of type file (DEFAULT). | | test.rs:54:22:54:25 | path | Flow source 'FileSource' of type file (DEFAULT). | | test.rs:55:27:55:35 | file_name | Flow source 'FileSource' of type file (DEFAULT). | | test.rs:65:22:65:34 | ...::read_link | Flow source 'FileSource' of type file (DEFAULT). | diff --git a/rust/ql/test/library-tests/dataflow/sources/file/test.rs b/rust/ql/test/library-tests/dataflow/sources/file/test.rs index 35a7d2cc1b8..0124d2a094e 100644 --- a/rust/ql/test/library-tests/dataflow/sources/file/test.rs +++ b/rust/ql/test/library-tests/dataflow/sources/file/test.rs @@ -23,7 +23,7 @@ fn test_fs() -> Result<(), Box> { sink(buffer); // $ hasTaintFlow="file.txt" } - for entry in fs::read_dir("directory")? { + for entry in fs::read_dir("directory")? { // $ Alert[rust/summary/taint-sources] let e = entry?; let path = e.path(); // $ Alert[rust/summary/taint-sources] @@ -48,7 +48,7 @@ fn test_fs() -> Result<(), Box> { sink(file_name.clone().as_encoded_bytes()); // $ MISSING: hasTaintFlow sink(file_name); // $ hasTaintFlow } - for entry in std::path::Path::new("directory").read_dir()? { + for entry in std::path::Path::new("directory").read_dir()? { // $ Alert[rust/summary/taint-sources] let e = entry?; let path = e.path(); // $ Alert[rust/summary/taint-sources] diff --git a/rust/ql/test/library-tests/dataflow/sources/net/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/sources/net/CONSISTENCY/PathResolutionConsistency.expected index ca5c386b720..5dfb62baf4b 100644 --- a/rust/ql/test/library-tests/dataflow/sources/net/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/library-tests/dataflow/sources/net/CONSISTENCY/PathResolutionConsistency.expected @@ -1,4 +1,4 @@ -multipleCallTargets +multipleResolvedTargets | test.rs:59:62:59:77 | ...::from(...) | | test.rs:66:58:66:73 | ...::from(...) | | test.rs:389:30:389:67 | pinned.poll_read(...) | diff --git a/rust/ql/test/library-tests/dataflow/sources/net/InlineFlow.expected b/rust/ql/test/library-tests/dataflow/sources/net/InlineFlow.expected index d29b19fe58a..2b39cf16c42 100644 --- a/rust/ql/test/library-tests/dataflow/sources/net/InlineFlow.expected +++ b/rust/ql/test/library-tests/dataflow/sources/net/InlineFlow.expected @@ -6,67 +6,64 @@ models | 5 | Source: ::connect; ReturnValue.Future.Field[core::result::Result::Ok(0)]; remote | | 6 | Source: reqwest::blocking::get; ReturnValue.Field[core::result::Result::Ok(0)]; remote | | 7 | Source: reqwest::get; ReturnValue.Future.Field[core::result::Result::Ok(0)]; remote | -| 8 | Summary: <_ as futures_io::if_std::AsyncBufRead>::poll_fill_buf; Argument[self].Reference; ReturnValue.Field[core::task::poll::Poll::Ready(0)].Field[core::result::Result::Ok(0)]; taint | -| 9 | Summary: <_ as futures_io::if_std::AsyncRead>::poll_read; Argument[self].Reference; Argument[1].Reference; taint | -| 10 | Summary: <_ as futures_util::io::AsyncBufReadExt>::fill_buf; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | -| 11 | Summary: <_ as futures_util::io::AsyncBufReadExt>::read_line; Argument[self].Reference; Argument[0].Reference; taint | -| 12 | Summary: <_ as futures_util::io::AsyncBufReadExt>::read_line; Argument[self]; Argument[0].Reference; taint | +| 8 | Summary: <_ as core::ops::index::Index>::index; Argument[self].Reference.Element; ReturnValue.Reference; value | +| 9 | Summary: <_ as futures_io::if_std::AsyncBufRead>::poll_fill_buf; Argument[self].Reference; ReturnValue.Field[core::task::poll::Poll::Ready(0)].Field[core::result::Result::Ok(0)]; taint | +| 10 | Summary: <_ as futures_io::if_std::AsyncRead>::poll_read; Argument[self].Reference; Argument[1].Reference; taint | +| 11 | Summary: <_ as futures_util::io::AsyncBufReadExt>::fill_buf; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | +| 12 | Summary: <_ as futures_util::io::AsyncBufReadExt>::read_line; Argument[self].Reference; Argument[0].Reference; taint | | 13 | Summary: <_ as futures_util::io::AsyncBufReadExt>::read_until; Argument[self].Reference; Argument[1].Reference; taint | -| 14 | Summary: <_ as futures_util::io::AsyncBufReadExt>::read_until; Argument[self]; Argument[1].Reference; taint | -| 15 | Summary: <_ as futures_util::io::AsyncReadExt>::read; Argument[self].Reference; Argument[0].Reference; taint | -| 16 | Summary: <_ as futures_util::io::AsyncReadExt>::read; Argument[self]; Argument[0].Reference; taint | -| 17 | Summary: <_ as futures_util::io::AsyncReadExt>::read_to_end; Argument[self].Reference; Argument[0].Reference; taint | -| 18 | Summary: <_ as futures_util::io::AsyncReadExt>::read_to_end; Argument[self]; Argument[0].Reference; taint | -| 19 | Summary: <_ as std::io::BufRead>::read_line; Argument[self]; Argument[0].Reference; taint | -| 20 | Summary: <_ as std::io::Read>::read; Argument[self]; Argument[0].Reference; taint | -| 21 | Summary: <_ as std::io::Read>::take; Argument[self]; ReturnValue; taint | -| 22 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read; Argument[self]; Argument[0].Reference; taint | -| 23 | Summary: ::unwrap; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | -| 24 | Summary: ::new; Argument[0].Reference; ReturnValue; value | -| 25 | Summary: ::new; Argument[0]; ReturnValue; value | -| 26 | Summary: ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | -| 27 | Summary: ::connect; Argument[1]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | -| 28 | Summary: ::new; Argument[0]; ReturnValue; taint | -| 29 | Summary: ::bytes; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | -| 30 | Summary: ::chunk; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]; taint | -| 31 | Summary: ::text; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | -| 32 | Summary: ::bytes; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | -| 33 | Summary: ::text; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | -| 34 | Summary: ::text_with_charset; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | -| 35 | Summary: ::new; Argument[0]; ReturnValue; taint | -| 36 | Summary: ::peek; Argument[self]; Argument[0].Reference; taint | -| 37 | Summary: ::try_read; Argument[self]; Argument[0].Reference; taint | -| 38 | Summary: ::try_read_buf; Argument[self]; Argument[0].Reference; taint | +| 14 | Summary: <_ as futures_util::io::AsyncReadExt>::read; Argument[self].Reference; Argument[0].Reference; taint | +| 15 | Summary: <_ as futures_util::io::AsyncReadExt>::read_to_end; Argument[self].Reference; Argument[0].Reference; taint | +| 16 | Summary: <_ as std::io::BufRead>::read_line; Argument[self].Reference; Argument[0].Reference; taint | +| 17 | Summary: <_ as std::io::Read>::read; Argument[self].Reference; Argument[0].Reference; taint | +| 18 | Summary: <_ as std::io::Read>::take; Argument[self]; ReturnValue; taint | +| 19 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read; Argument[self].Reference; Argument[0].Reference; taint | +| 20 | Summary: ::unwrap; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | +| 21 | Summary: ::new; Argument[0].Reference; ReturnValue; value | +| 22 | Summary: ::new; Argument[0]; ReturnValue.Field[core::pin::Pin::pointer]; value | +| 23 | Summary: ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | +| 24 | Summary: ::connect; Argument[1]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | +| 25 | Summary: ::new; Argument[0]; ReturnValue; taint | +| 26 | Summary: ::bytes; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | +| 27 | Summary: ::chunk; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]; taint | +| 28 | Summary: ::text; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | +| 29 | Summary: ::bytes; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | +| 30 | Summary: ::text; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | +| 31 | Summary: ::text_with_charset; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | +| 32 | Summary: ::new; Argument[0]; ReturnValue; taint | +| 33 | Summary: ::peek; Argument[self].Reference; Argument[0].Reference; taint | +| 34 | Summary: ::try_read; Argument[self].Reference; Argument[0].Reference; taint | +| 35 | Summary: ::try_read_buf; Argument[self].Reference; Argument[0].Reference; taint | edges | test.rs:11:9:11:22 | remote_string1 | test.rs:12:10:12:23 | remote_string1 | provenance | | | test.rs:11:26:11:47 | ...::get | test.rs:11:26:11:62 | ...::get(...) [Ok] | provenance | Src:MaD:6 | | test.rs:11:26:11:62 | ...::get(...) [Ok] | test.rs:11:26:11:63 | TryExpr | provenance | | -| test.rs:11:26:11:63 | TryExpr | test.rs:11:26:11:70 | ... .text() [Ok] | provenance | MaD:33 | +| test.rs:11:26:11:63 | TryExpr | test.rs:11:26:11:70 | ... .text() [Ok] | provenance | MaD:30 | | test.rs:11:26:11:70 | ... .text() [Ok] | test.rs:11:26:11:71 | TryExpr | provenance | | | test.rs:11:26:11:71 | TryExpr | test.rs:11:9:11:22 | remote_string1 | provenance | | | test.rs:14:9:14:22 | remote_string2 | test.rs:15:10:15:23 | remote_string2 | provenance | | | test.rs:14:26:14:47 | ...::get | test.rs:14:26:14:62 | ...::get(...) [Ok] | provenance | Src:MaD:6 | -| test.rs:14:26:14:62 | ...::get(...) [Ok] | test.rs:14:26:14:71 | ... .unwrap() | provenance | MaD:26 | -| test.rs:14:26:14:71 | ... .unwrap() | test.rs:14:26:14:78 | ... .text() [Ok] | provenance | MaD:33 | -| test.rs:14:26:14:78 | ... .text() [Ok] | test.rs:14:26:14:87 | ... .unwrap() | provenance | MaD:26 | +| test.rs:14:26:14:62 | ...::get(...) [Ok] | test.rs:14:26:14:71 | ... .unwrap() | provenance | MaD:23 | +| test.rs:14:26:14:71 | ... .unwrap() | test.rs:14:26:14:78 | ... .text() [Ok] | provenance | MaD:30 | +| test.rs:14:26:14:78 | ... .text() [Ok] | test.rs:14:26:14:87 | ... .unwrap() | provenance | MaD:23 | | test.rs:14:26:14:87 | ... .unwrap() | test.rs:14:9:14:22 | remote_string2 | provenance | | | test.rs:17:9:17:22 | remote_string3 | test.rs:18:10:18:23 | remote_string3 | provenance | | | test.rs:17:26:17:47 | ...::get | test.rs:17:26:17:62 | ...::get(...) [Ok] | provenance | Src:MaD:6 | -| test.rs:17:26:17:62 | ...::get(...) [Ok] | test.rs:17:26:17:71 | ... .unwrap() | provenance | MaD:26 | -| test.rs:17:26:17:71 | ... .unwrap() | test.rs:17:26:17:98 | ... .text_with_charset(...) [Ok] | provenance | MaD:34 | -| test.rs:17:26:17:98 | ... .text_with_charset(...) [Ok] | test.rs:17:26:17:107 | ... .unwrap() | provenance | MaD:26 | +| test.rs:17:26:17:62 | ...::get(...) [Ok] | test.rs:17:26:17:71 | ... .unwrap() | provenance | MaD:23 | +| test.rs:17:26:17:71 | ... .unwrap() | test.rs:17:26:17:98 | ... .text_with_charset(...) [Ok] | provenance | MaD:31 | +| test.rs:17:26:17:98 | ... .text_with_charset(...) [Ok] | test.rs:17:26:17:107 | ... .unwrap() | provenance | MaD:23 | | test.rs:17:26:17:107 | ... .unwrap() | test.rs:17:9:17:22 | remote_string3 | provenance | | | test.rs:20:9:20:22 | remote_string4 | test.rs:21:10:21:23 | remote_string4 | provenance | | | test.rs:20:26:20:47 | ...::get | test.rs:20:26:20:62 | ...::get(...) [Ok] | provenance | Src:MaD:6 | -| test.rs:20:26:20:62 | ...::get(...) [Ok] | test.rs:20:26:20:71 | ... .unwrap() | provenance | MaD:26 | -| test.rs:20:26:20:71 | ... .unwrap() | test.rs:20:26:20:79 | ... .bytes() [Ok] | provenance | MaD:32 | -| test.rs:20:26:20:79 | ... .bytes() [Ok] | test.rs:20:26:20:88 | ... .unwrap() | provenance | MaD:26 | +| test.rs:20:26:20:62 | ...::get(...) [Ok] | test.rs:20:26:20:71 | ... .unwrap() | provenance | MaD:23 | +| test.rs:20:26:20:71 | ... .unwrap() | test.rs:20:26:20:79 | ... .bytes() [Ok] | provenance | MaD:29 | +| test.rs:20:26:20:79 | ... .bytes() [Ok] | test.rs:20:26:20:88 | ... .unwrap() | provenance | MaD:23 | | test.rs:20:26:20:88 | ... .unwrap() | test.rs:20:9:20:22 | remote_string4 | provenance | | | test.rs:23:9:23:22 | remote_string5 | test.rs:24:10:24:23 | remote_string5 | provenance | | | test.rs:23:26:23:37 | ...::get | test.rs:23:26:23:52 | ...::get(...) [future, Ok] | provenance | Src:MaD:7 | | test.rs:23:26:23:52 | ...::get(...) [future, Ok] | test.rs:23:26:23:58 | await ... [Ok] | provenance | | | test.rs:23:26:23:58 | await ... [Ok] | test.rs:23:26:23:59 | TryExpr | provenance | | -| test.rs:23:26:23:59 | TryExpr | test.rs:23:26:23:66 | ... .text() [future, Ok] | provenance | MaD:31 | +| test.rs:23:26:23:59 | TryExpr | test.rs:23:26:23:66 | ... .text() [future, Ok] | provenance | MaD:28 | | test.rs:23:26:23:66 | ... .text() [future, Ok] | test.rs:23:26:23:72 | await ... [Ok] | provenance | | | test.rs:23:26:23:72 | await ... [Ok] | test.rs:23:26:23:73 | TryExpr | provenance | | | test.rs:23:26:23:73 | TryExpr | test.rs:23:9:23:22 | remote_string5 | provenance | | @@ -74,21 +71,23 @@ edges | test.rs:26:26:26:37 | ...::get | test.rs:26:26:26:52 | ...::get(...) [future, Ok] | provenance | Src:MaD:7 | | test.rs:26:26:26:52 | ...::get(...) [future, Ok] | test.rs:26:26:26:58 | await ... [Ok] | provenance | | | test.rs:26:26:26:58 | await ... [Ok] | test.rs:26:26:26:59 | TryExpr | provenance | | -| test.rs:26:26:26:59 | TryExpr | test.rs:26:26:26:67 | ... .bytes() [future, Ok] | provenance | MaD:29 | +| test.rs:26:26:26:59 | TryExpr | test.rs:26:26:26:67 | ... .bytes() [future, Ok] | provenance | MaD:26 | | test.rs:26:26:26:67 | ... .bytes() [future, Ok] | test.rs:26:26:26:73 | await ... [Ok] | provenance | | | test.rs:26:26:26:73 | await ... [Ok] | test.rs:26:26:26:74 | TryExpr | provenance | | | test.rs:26:26:26:74 | TryExpr | test.rs:26:9:26:22 | remote_string6 | provenance | | -| test.rs:29:9:29:20 | mut request1 | test.rs:30:10:30:25 | request1.chunk() [future, Ok, Some] | provenance | MaD:30 | -| test.rs:29:9:29:20 | mut request1 | test.rs:31:29:31:44 | request1.chunk() [future, Ok, Some] | provenance | MaD:30 | +| test.rs:29:9:29:20 | mut request1 | test.rs:30:10:30:17 | request1 | provenance | | +| test.rs:29:9:29:20 | mut request1 | test.rs:31:29:31:36 | request1 | provenance | | | test.rs:29:24:29:35 | ...::get | test.rs:29:24:29:50 | ...::get(...) [future, Ok] | provenance | Src:MaD:7 | | test.rs:29:24:29:50 | ...::get(...) [future, Ok] | test.rs:29:24:29:56 | await ... [Ok] | provenance | | | test.rs:29:24:29:56 | await ... [Ok] | test.rs:29:24:29:57 | TryExpr | provenance | | | test.rs:29:24:29:57 | TryExpr | test.rs:29:9:29:20 | mut request1 | provenance | | +| test.rs:30:10:30:17 | request1 | test.rs:30:10:30:25 | request1.chunk() [future, Ok, Some] | provenance | MaD:27 | | test.rs:30:10:30:25 | request1.chunk() [future, Ok, Some] | test.rs:30:10:30:31 | await ... [Ok, Some] | provenance | | | test.rs:30:10:30:31 | await ... [Ok, Some] | test.rs:30:10:30:32 | TryExpr [Some] | provenance | | -| test.rs:30:10:30:32 | TryExpr [Some] | test.rs:30:10:30:41 | ... .unwrap() | provenance | MaD:23 | +| test.rs:30:10:30:32 | TryExpr [Some] | test.rs:30:10:30:41 | ... .unwrap() | provenance | MaD:20 | | test.rs:31:15:31:25 | Some(...) [Some] | test.rs:31:20:31:24 | chunk | provenance | | | test.rs:31:20:31:24 | chunk | test.rs:32:14:32:18 | chunk | provenance | | +| test.rs:31:29:31:36 | request1 | test.rs:31:29:31:44 | request1.chunk() [future, Ok, Some] | provenance | MaD:27 | | test.rs:31:29:31:44 | request1.chunk() [future, Ok, Some] | test.rs:31:29:31:50 | await ... [Ok, Some] | provenance | | | test.rs:31:29:31:50 | await ... [Ok, Some] | test.rs:31:29:31:51 | TryExpr [Some] | provenance | | | test.rs:31:29:31:51 | TryExpr [Some] | test.rs:31:15:31:25 | Some(...) [Some] | provenance | | @@ -105,44 +104,53 @@ edges | test.rs:67:24:67:58 | TryExpr | test.rs:67:9:67:20 | mut response | provenance | | | test.rs:67:31:67:42 | send_request | test.rs:67:24:67:51 | sender.send_request(...) [future, Ok] | provenance | Src:MaD:2 | | test.rs:68:11:68:18 | response | test.rs:68:10:68:18 | &response | provenance | | -| test.rs:155:13:155:22 | mut stream | test.rs:162:29:162:39 | [post] &mut buffer [&ref] | provenance | MaD:20 | +| test.rs:155:13:155:22 | mut stream | test.rs:162:17:162:22 | stream | provenance | | | test.rs:155:26:155:53 | ...::connect | test.rs:155:26:155:62 | ...::connect(...) [Ok] | provenance | Src:MaD:3 | | test.rs:155:26:155:62 | ...::connect(...) [Ok] | test.rs:155:26:155:63 | TryExpr | provenance | | | test.rs:155:26:155:63 | TryExpr | test.rs:155:13:155:22 | mut stream | provenance | | +| test.rs:162:17:162:22 | stream | test.rs:162:29:162:39 | [post] &mut buffer [&ref] | provenance | MaD:17 | | test.rs:162:29:162:39 | [post] &mut buffer [&ref] | test.rs:162:34:162:39 | [post] buffer | provenance | | | test.rs:162:34:162:39 | [post] buffer | test.rs:165:15:165:20 | buffer | provenance | | -| test.rs:162:34:162:39 | [post] buffer | test.rs:166:14:166:22 | buffer[0] | provenance | | +| test.rs:162:34:162:39 | [post] buffer | test.rs:166:14:166:19 | buffer | provenance | | | test.rs:165:15:165:20 | buffer | test.rs:165:14:165:20 | &buffer | provenance | | +| test.rs:166:14:166:19 | buffer | test.rs:166:14:166:22 | buffer[0] | provenance | MaD:8 | | test.rs:174:13:174:22 | mut stream | test.rs:182:58:182:63 | stream | provenance | | | test.rs:174:26:174:61 | ...::connect_timeout | test.rs:174:26:174:105 | ...::connect_timeout(...) [Ok] | provenance | Src:MaD:4 | | test.rs:174:26:174:105 | ...::connect_timeout(...) [Ok] | test.rs:174:26:174:106 | TryExpr | provenance | | | test.rs:174:26:174:106 | TryExpr | test.rs:174:13:174:22 | mut stream | provenance | | -| test.rs:182:21:182:30 | mut reader | test.rs:185:44:185:52 | [post] &mut line [&ref] | provenance | MaD:19 | -| test.rs:182:34:182:64 | ...::new(...) | test.rs:182:34:182:74 | ... .take(...) | provenance | MaD:21 | +| test.rs:182:21:182:30 | mut reader | test.rs:185:27:185:32 | reader | provenance | | +| test.rs:182:34:182:64 | ...::new(...) | test.rs:182:34:182:74 | ... .take(...) | provenance | MaD:18 | | test.rs:182:34:182:74 | ... .take(...) | test.rs:182:21:182:30 | mut reader | provenance | | -| test.rs:182:58:182:63 | stream | test.rs:182:34:182:64 | ...::new(...) | provenance | MaD:35 | +| test.rs:182:58:182:63 | stream | test.rs:182:34:182:64 | ...::new(...) | provenance | MaD:32 | +| test.rs:185:27:185:32 | reader | test.rs:185:44:185:52 | [post] &mut line [&ref] | provenance | MaD:16 | | test.rs:185:44:185:52 | [post] &mut line [&ref] | test.rs:185:49:185:52 | [post] line | provenance | | | test.rs:185:49:185:52 | [post] line | test.rs:192:35:192:38 | line | provenance | | | test.rs:192:35:192:38 | line | test.rs:192:34:192:38 | &line | provenance | | -| test.rs:224:9:224:24 | mut tokio_stream | test.rs:232:35:232:46 | [post] &mut buffer1 [&ref] | provenance | MaD:36 | -| test.rs:224:9:224:24 | mut tokio_stream | test.rs:236:36:236:47 | [post] &mut buffer2 [&ref] | provenance | MaD:22 | -| test.rs:224:9:224:24 | mut tokio_stream | test.rs:252:41:252:51 | [post] &mut buffer [&ref] | provenance | MaD:37 | -| test.rs:224:9:224:24 | mut tokio_stream | test.rs:275:45:275:55 | [post] &mut buffer [&ref] | provenance | MaD:38 | +| test.rs:224:9:224:24 | mut tokio_stream | test.rs:232:17:232:28 | tokio_stream | provenance | | +| test.rs:224:9:224:24 | mut tokio_stream | test.rs:236:18:236:29 | tokio_stream | provenance | | +| test.rs:224:9:224:24 | mut tokio_stream | test.rs:252:19:252:30 | tokio_stream | provenance | | +| test.rs:224:9:224:24 | mut tokio_stream | test.rs:275:19:275:30 | tokio_stream | provenance | | | test.rs:224:28:224:57 | ...::connect | test.rs:224:28:224:66 | ...::connect(...) [future, Ok] | provenance | Src:MaD:5 | | test.rs:224:28:224:66 | ...::connect(...) [future, Ok] | test.rs:224:28:224:72 | await ... [Ok] | provenance | | | test.rs:224:28:224:72 | await ... [Ok] | test.rs:224:28:224:73 | TryExpr | provenance | | | test.rs:224:28:224:73 | TryExpr | test.rs:224:9:224:24 | mut tokio_stream | provenance | | +| test.rs:232:17:232:28 | tokio_stream | test.rs:232:35:232:46 | [post] &mut buffer1 [&ref] | provenance | MaD:33 | | test.rs:232:35:232:46 | [post] &mut buffer1 [&ref] | test.rs:232:40:232:46 | [post] buffer1 | provenance | | | test.rs:232:40:232:46 | [post] buffer1 | test.rs:239:15:239:21 | buffer1 | provenance | | -| test.rs:232:40:232:46 | [post] buffer1 | test.rs:240:14:240:23 | buffer1[0] | provenance | | +| test.rs:232:40:232:46 | [post] buffer1 | test.rs:240:14:240:20 | buffer1 | provenance | | +| test.rs:236:18:236:29 | tokio_stream | test.rs:236:36:236:47 | [post] &mut buffer2 [&ref] | provenance | MaD:19 | | test.rs:236:36:236:47 | [post] &mut buffer2 [&ref] | test.rs:236:41:236:47 | [post] buffer2 | provenance | | | test.rs:236:41:236:47 | [post] buffer2 | test.rs:243:15:243:21 | buffer2 | provenance | | -| test.rs:236:41:236:47 | [post] buffer2 | test.rs:244:14:244:23 | buffer2[0] | provenance | | +| test.rs:236:41:236:47 | [post] buffer2 | test.rs:244:14:244:20 | buffer2 | provenance | | | test.rs:239:15:239:21 | buffer1 | test.rs:239:14:239:21 | &buffer1 | provenance | | +| test.rs:240:14:240:20 | buffer1 | test.rs:240:14:240:23 | buffer1[0] | provenance | MaD:8 | | test.rs:243:15:243:21 | buffer2 | test.rs:243:14:243:21 | &buffer2 | provenance | | +| test.rs:244:14:244:20 | buffer2 | test.rs:244:14:244:23 | buffer2[0] | provenance | MaD:8 | +| test.rs:252:19:252:30 | tokio_stream | test.rs:252:41:252:51 | [post] &mut buffer [&ref] | provenance | MaD:34 | | test.rs:252:41:252:51 | [post] &mut buffer [&ref] | test.rs:252:46:252:51 | [post] buffer | provenance | | | test.rs:252:46:252:51 | [post] buffer | test.rs:259:27:259:32 | buffer | provenance | | | test.rs:259:27:259:32 | buffer | test.rs:259:26:259:32 | &buffer | provenance | | +| test.rs:275:19:275:30 | tokio_stream | test.rs:275:45:275:55 | [post] &mut buffer [&ref] | provenance | MaD:35 | | test.rs:275:45:275:55 | [post] &mut buffer [&ref] | test.rs:275:50:275:55 | [post] buffer | provenance | | | test.rs:275:50:275:55 | [post] buffer | test.rs:282:27:282:32 | buffer | provenance | | | test.rs:282:27:282:32 | buffer | test.rs:282:26:282:32 | &buffer | provenance | | @@ -157,86 +165,80 @@ edges | test.rs:380:13:380:22 | mut reader | test.rs:386:44:386:49 | reader | provenance | | | test.rs:380:13:380:22 | mut reader | test.rs:399:68:399:73 | reader | provenance | | | test.rs:380:13:380:22 | mut reader | test.rs:403:31:403:36 | reader | provenance | | -| test.rs:380:13:380:22 | mut reader | test.rs:403:43:403:54 | [post] &mut buffer2 [&ref] | provenance | MaD:15 | -| test.rs:380:13:380:22 | mut reader | test.rs:403:43:403:54 | [post] &mut buffer2 [&ref] | provenance | MaD:16 | | test.rs:380:13:380:22 | mut reader | test.rs:408:55:408:60 | reader | provenance | | | test.rs:380:26:380:60 | connector.connect(...) [future, Ok] | test.rs:380:26:380:66 | await ... [Ok] | provenance | | | test.rs:380:26:380:66 | await ... [Ok] | test.rs:380:26:380:67 | TryExpr | provenance | | | test.rs:380:26:380:67 | TryExpr | test.rs:380:13:380:22 | mut reader | provenance | | -| test.rs:380:57:380:59 | tcp | test.rs:380:26:380:60 | connector.connect(...) [future, Ok] | provenance | MaD:27 | +| test.rs:380:57:380:59 | tcp | test.rs:380:26:380:60 | connector.connect(...) [future, Ok] | provenance | MaD:24 | | test.rs:381:15:381:20 | reader | test.rs:381:14:381:20 | &reader | provenance | | | test.rs:386:17:386:26 | mut pinned | test.rs:387:19:387:24 | pinned | provenance | | -| test.rs:386:17:386:26 | mut pinned | test.rs:389:56:389:66 | [post] &mut buffer [&ref] | provenance | MaD:9 | -| test.rs:386:17:386:26 | mut pinned [&ref] | test.rs:387:19:387:24 | pinned [&ref] | provenance | | -| test.rs:386:17:386:26 | mut pinned [&ref] | test.rs:389:56:389:66 | [post] &mut buffer [&ref] | provenance | MaD:9 | +| test.rs:386:17:386:26 | mut pinned | test.rs:389:30:389:35 | pinned | provenance | | +| test.rs:386:17:386:26 | mut pinned [Pin, &ref] | test.rs:387:19:387:24 | pinned [Pin, &ref] | provenance | | | test.rs:386:30:386:50 | ...::new(...) | test.rs:386:17:386:26 | mut pinned | provenance | | -| test.rs:386:30:386:50 | ...::new(...) [&ref] | test.rs:386:17:386:26 | mut pinned [&ref] | provenance | | -| test.rs:386:39:386:49 | &mut reader [&ref] | test.rs:386:30:386:50 | ...::new(...) | provenance | MaD:24 | -| test.rs:386:39:386:49 | &mut reader [&ref] | test.rs:386:30:386:50 | ...::new(...) [&ref] | provenance | MaD:25 | +| test.rs:386:30:386:50 | ...::new(...) [Pin, &ref] | test.rs:386:17:386:26 | mut pinned [Pin, &ref] | provenance | | +| test.rs:386:39:386:49 | &mut reader [&ref] | test.rs:386:30:386:50 | ...::new(...) | provenance | MaD:21 | +| test.rs:386:39:386:49 | &mut reader [&ref] | test.rs:386:30:386:50 | ...::new(...) [Pin, &ref] | provenance | MaD:22 | | test.rs:386:44:386:49 | reader | test.rs:386:39:386:49 | &mut reader [&ref] | provenance | | | test.rs:387:19:387:24 | pinned | test.rs:387:18:387:24 | &pinned | provenance | | -| test.rs:387:19:387:24 | pinned [&ref] | test.rs:387:18:387:24 | &pinned | provenance | | +| test.rs:387:19:387:24 | pinned [Pin, &ref] | test.rs:387:18:387:24 | &pinned | provenance | | +| test.rs:389:30:389:35 | pinned | test.rs:389:56:389:66 | [post] &mut buffer [&ref] | provenance | MaD:10 | | test.rs:389:56:389:66 | [post] &mut buffer [&ref] | test.rs:389:61:389:66 | [post] buffer | provenance | | | test.rs:389:61:389:66 | [post] buffer | test.rs:391:23:391:28 | buffer | provenance | | +| test.rs:389:61:389:66 | [post] buffer | test.rs:392:23:392:28 | buffer | provenance | | | test.rs:389:61:389:66 | [post] buffer | test.rs:392:23:392:33 | buffer[...] | provenance | | | test.rs:391:23:391:28 | buffer | test.rs:391:22:391:28 | &buffer | provenance | | +| test.rs:392:23:392:28 | buffer | test.rs:392:23:392:33 | buffer[...] | provenance | MaD:8 | | test.rs:392:23:392:33 | buffer[...] | test.rs:392:22:392:33 | &... | provenance | | -| test.rs:399:63:399:73 | &mut reader [&ref] | test.rs:399:76:399:87 | [post] &mut buffer1 [&ref] | provenance | MaD:15 | +| test.rs:399:63:399:73 | &mut reader [&ref] | test.rs:399:76:399:87 | [post] &mut buffer1 [&ref] | provenance | MaD:14 | | test.rs:399:68:399:73 | reader | test.rs:399:63:399:73 | &mut reader [&ref] | provenance | | | test.rs:399:76:399:87 | [post] &mut buffer1 [&ref] | test.rs:399:81:399:87 | [post] buffer1 | provenance | | +| test.rs:399:81:399:87 | [post] buffer1 | test.rs:400:19:400:25 | buffer1 | provenance | | | test.rs:399:81:399:87 | [post] buffer1 | test.rs:400:19:400:40 | buffer1[...] | provenance | | +| test.rs:400:19:400:25 | buffer1 | test.rs:400:19:400:40 | buffer1[...] | provenance | MaD:8 | | test.rs:400:19:400:40 | buffer1[...] | test.rs:400:18:400:40 | &... | provenance | | -| test.rs:403:31:403:36 | reader | test.rs:403:43:403:54 | [post] &mut buffer2 [&ref] | provenance | MaD:15 | +| test.rs:403:31:403:36 | reader | test.rs:403:43:403:54 | [post] &mut buffer2 [&ref] | provenance | MaD:14 | | test.rs:403:43:403:54 | [post] &mut buffer2 [&ref] | test.rs:403:48:403:54 | [post] buffer2 | provenance | | +| test.rs:403:48:403:54 | [post] buffer2 | test.rs:405:19:405:25 | buffer2 | provenance | | | test.rs:403:48:403:54 | [post] buffer2 | test.rs:405:19:405:40 | buffer2[...] | provenance | | +| test.rs:405:19:405:25 | buffer2 | test.rs:405:19:405:40 | buffer2[...] | provenance | MaD:8 | | test.rs:405:19:405:40 | buffer2[...] | test.rs:405:18:405:40 | &... | provenance | | | test.rs:408:13:408:23 | mut reader2 | test.rs:409:15:409:21 | reader2 | provenance | | | test.rs:408:13:408:23 | mut reader2 | test.rs:413:44:413:50 | reader2 | provenance | | | test.rs:408:13:408:23 | mut reader2 | test.rs:423:41:423:47 | reader2 | provenance | | -| test.rs:408:13:408:23 | mut reader2 | test.rs:437:26:437:43 | reader2.fill_buf() [future, Ok] | provenance | MaD:10 | +| test.rs:408:13:408:23 | mut reader2 | test.rs:437:26:437:32 | reader2 | provenance | | | test.rs:408:13:408:23 | mut reader2 | test.rs:444:44:444:50 | reader2 | provenance | | | test.rs:408:13:408:23 | mut reader2 | test.rs:457:68:457:74 | reader2 | provenance | | | test.rs:408:13:408:23 | mut reader2 | test.rs:461:31:461:37 | reader2 | provenance | | -| test.rs:408:13:408:23 | mut reader2 | test.rs:461:44:461:55 | [post] &mut buffer2 [&ref] | provenance | MaD:15 | -| test.rs:408:13:408:23 | mut reader2 | test.rs:461:44:461:55 | [post] &mut buffer2 [&ref] | provenance | MaD:16 | | test.rs:408:13:408:23 | mut reader2 | test.rs:467:44:467:50 | reader2 | provenance | | -| test.rs:408:13:408:23 | mut reader2 | test.rs:479:26:479:43 | reader2.fill_buf() [future, Ok] | provenance | MaD:10 | +| test.rs:408:13:408:23 | mut reader2 | test.rs:479:26:479:32 | reader2 | provenance | | | test.rs:408:13:408:23 | mut reader2 | test.rs:486:31:486:37 | reader2 | provenance | | -| test.rs:408:13:408:23 | mut reader2 | test.rs:486:57:486:65 | [post] &mut line [&ref] | provenance | MaD:13 | -| test.rs:408:13:408:23 | mut reader2 | test.rs:486:57:486:65 | [post] &mut line [&ref] | provenance | MaD:14 | | test.rs:408:13:408:23 | mut reader2 | test.rs:493:31:493:37 | reader2 | provenance | | -| test.rs:408:13:408:23 | mut reader2 | test.rs:493:49:493:57 | [post] &mut line [&ref] | provenance | MaD:11 | -| test.rs:408:13:408:23 | mut reader2 | test.rs:493:49:493:57 | [post] &mut line [&ref] | provenance | MaD:12 | | test.rs:408:13:408:23 | mut reader2 | test.rs:500:31:500:37 | reader2 | provenance | | -| test.rs:408:13:408:23 | mut reader2 | test.rs:500:51:500:61 | [post] &mut buffer [&ref] | provenance | MaD:17 | -| test.rs:408:13:408:23 | mut reader2 | test.rs:500:51:500:61 | [post] &mut buffer [&ref] | provenance | MaD:18 | | test.rs:408:27:408:61 | ...::new(...) | test.rs:408:13:408:23 | mut reader2 | provenance | | -| test.rs:408:55:408:60 | reader | test.rs:408:27:408:61 | ...::new(...) | provenance | MaD:28 | +| test.rs:408:55:408:60 | reader | test.rs:408:27:408:61 | ...::new(...) | provenance | MaD:25 | | test.rs:409:15:409:21 | reader2 | test.rs:409:14:409:21 | &reader2 | provenance | | | test.rs:413:17:413:26 | mut pinned | test.rs:414:19:414:24 | pinned | provenance | | -| test.rs:413:17:413:26 | mut pinned | test.rs:416:26:416:54 | pinned.poll_fill_buf(...) [Ready, Ok] | provenance | MaD:8 | -| test.rs:413:17:413:26 | mut pinned [&ref] | test.rs:414:19:414:24 | pinned [&ref] | provenance | | -| test.rs:413:17:413:26 | mut pinned [&ref] | test.rs:416:26:416:54 | pinned.poll_fill_buf(...) [Ready, Ok] | provenance | MaD:8 | +| test.rs:413:17:413:26 | mut pinned | test.rs:416:26:416:31 | pinned | provenance | | +| test.rs:413:17:413:26 | mut pinned [Pin, &ref] | test.rs:414:19:414:24 | pinned [Pin, &ref] | provenance | | | test.rs:413:30:413:51 | ...::new(...) | test.rs:413:17:413:26 | mut pinned | provenance | | -| test.rs:413:30:413:51 | ...::new(...) [&ref] | test.rs:413:17:413:26 | mut pinned [&ref] | provenance | | -| test.rs:413:39:413:50 | &mut reader2 [&ref] | test.rs:413:30:413:51 | ...::new(...) | provenance | MaD:24 | -| test.rs:413:39:413:50 | &mut reader2 [&ref] | test.rs:413:30:413:51 | ...::new(...) [&ref] | provenance | MaD:25 | +| test.rs:413:30:413:51 | ...::new(...) [Pin, &ref] | test.rs:413:17:413:26 | mut pinned [Pin, &ref] | provenance | | +| test.rs:413:39:413:50 | &mut reader2 [&ref] | test.rs:413:30:413:51 | ...::new(...) | provenance | MaD:21 | +| test.rs:413:39:413:50 | &mut reader2 [&ref] | test.rs:413:30:413:51 | ...::new(...) [Pin, &ref] | provenance | MaD:22 | | test.rs:413:44:413:50 | reader2 | test.rs:413:39:413:50 | &mut reader2 [&ref] | provenance | | | test.rs:414:19:414:24 | pinned | test.rs:414:18:414:24 | &pinned | provenance | | -| test.rs:414:19:414:24 | pinned [&ref] | test.rs:414:18:414:24 | &pinned | provenance | | +| test.rs:414:19:414:24 | pinned [Pin, &ref] | test.rs:414:18:414:24 | &pinned | provenance | | | test.rs:416:17:416:22 | buffer [Ready, Ok] | test.rs:417:20:417:39 | ...::Ready(...) [Ready, Ok] | provenance | | | test.rs:416:17:416:22 | buffer [Ready, Ok] | test.rs:418:23:418:28 | buffer [Ready, Ok] | provenance | | +| test.rs:416:26:416:31 | pinned | test.rs:416:26:416:54 | pinned.poll_fill_buf(...) [Ready, Ok] | provenance | MaD:9 | | test.rs:416:26:416:54 | pinned.poll_fill_buf(...) [Ready, Ok] | test.rs:416:17:416:22 | buffer [Ready, Ok] | provenance | | | test.rs:417:20:417:39 | ...::Ready(...) [Ready, Ok] | test.rs:417:32:417:38 | Ok(...) [Ok] | provenance | | | test.rs:417:32:417:38 | Ok(...) [Ok] | test.rs:417:35:417:37 | buf | provenance | | | test.rs:417:35:417:37 | buf | test.rs:419:22:419:24 | buf | provenance | | | test.rs:418:23:418:28 | buffer [Ready, Ok] | test.rs:418:22:418:28 | &buffer | provenance | | | test.rs:423:17:423:23 | buffer2 [Ready, Ok] | test.rs:424:20:424:26 | buffer2 [Ready, Ok] | provenance | | -| test.rs:423:27:423:48 | ...::new(...) | test.rs:423:27:423:71 | ... .poll_fill_buf(...) [Ready, Ok] | provenance | MaD:8 | -| test.rs:423:27:423:48 | ...::new(...) [&ref] | test.rs:423:27:423:71 | ... .poll_fill_buf(...) [Ready, Ok] | provenance | MaD:8 | +| test.rs:423:27:423:48 | ...::new(...) | test.rs:423:27:423:71 | ... .poll_fill_buf(...) [Ready, Ok] | provenance | MaD:9 | | test.rs:423:27:423:71 | ... .poll_fill_buf(...) [Ready, Ok] | test.rs:423:17:423:23 | buffer2 [Ready, Ok] | provenance | | -| test.rs:423:36:423:47 | &mut reader2 [&ref] | test.rs:423:27:423:48 | ...::new(...) | provenance | MaD:24 | -| test.rs:423:36:423:47 | &mut reader2 [&ref] | test.rs:423:27:423:48 | ...::new(...) [&ref] | provenance | MaD:25 | +| test.rs:423:36:423:47 | &mut reader2 [&ref] | test.rs:423:27:423:48 | ...::new(...) | provenance | MaD:21 | | test.rs:423:41:423:47 | reader2 | test.rs:423:36:423:47 | &mut reader2 [&ref] | provenance | | | test.rs:424:20:424:26 | buffer2 [Ready, Ok] | test.rs:425:17:425:36 | ...::Ready(...) [Ready, Ok] | provenance | | | test.rs:424:20:424:26 | buffer2 [Ready, Ok] | test.rs:426:27:426:33 | buffer2 [Ready, Ok] | provenance | | @@ -245,53 +247,61 @@ edges | test.rs:425:32:425:34 | buf | test.rs:427:26:427:28 | buf | provenance | | | test.rs:426:27:426:33 | buffer2 [Ready, Ok] | test.rs:426:26:426:33 | &buffer2 | provenance | | | test.rs:437:17:437:22 | buffer | test.rs:438:18:438:23 | buffer | provenance | | +| test.rs:437:26:437:32 | reader2 | test.rs:437:26:437:43 | reader2.fill_buf() [future, Ok] | provenance | MaD:11 | | test.rs:437:26:437:43 | reader2.fill_buf() [future, Ok] | test.rs:437:26:437:49 | await ... [Ok] | provenance | | | test.rs:437:26:437:49 | await ... [Ok] | test.rs:437:26:437:50 | TryExpr | provenance | | | test.rs:437:26:437:50 | TryExpr | test.rs:437:17:437:22 | buffer | provenance | | | test.rs:444:17:444:26 | mut pinned | test.rs:445:19:445:24 | pinned | provenance | | -| test.rs:444:17:444:26 | mut pinned | test.rs:447:56:447:66 | [post] &mut buffer [&ref] | provenance | MaD:9 | -| test.rs:444:17:444:26 | mut pinned [&ref] | test.rs:445:19:445:24 | pinned [&ref] | provenance | | -| test.rs:444:17:444:26 | mut pinned [&ref] | test.rs:447:56:447:66 | [post] &mut buffer [&ref] | provenance | MaD:9 | +| test.rs:444:17:444:26 | mut pinned | test.rs:447:30:447:35 | pinned | provenance | | +| test.rs:444:17:444:26 | mut pinned [Pin, &ref] | test.rs:445:19:445:24 | pinned [Pin, &ref] | provenance | | | test.rs:444:30:444:51 | ...::new(...) | test.rs:444:17:444:26 | mut pinned | provenance | | -| test.rs:444:30:444:51 | ...::new(...) [&ref] | test.rs:444:17:444:26 | mut pinned [&ref] | provenance | | -| test.rs:444:39:444:50 | &mut reader2 [&ref] | test.rs:444:30:444:51 | ...::new(...) | provenance | MaD:24 | -| test.rs:444:39:444:50 | &mut reader2 [&ref] | test.rs:444:30:444:51 | ...::new(...) [&ref] | provenance | MaD:25 | +| test.rs:444:30:444:51 | ...::new(...) [Pin, &ref] | test.rs:444:17:444:26 | mut pinned [Pin, &ref] | provenance | | +| test.rs:444:39:444:50 | &mut reader2 [&ref] | test.rs:444:30:444:51 | ...::new(...) | provenance | MaD:21 | +| test.rs:444:39:444:50 | &mut reader2 [&ref] | test.rs:444:30:444:51 | ...::new(...) [Pin, &ref] | provenance | MaD:22 | | test.rs:444:44:444:50 | reader2 | test.rs:444:39:444:50 | &mut reader2 [&ref] | provenance | | | test.rs:445:19:445:24 | pinned | test.rs:445:18:445:24 | &pinned | provenance | | -| test.rs:445:19:445:24 | pinned [&ref] | test.rs:445:18:445:24 | &pinned | provenance | | +| test.rs:445:19:445:24 | pinned [Pin, &ref] | test.rs:445:18:445:24 | &pinned | provenance | | +| test.rs:447:30:447:35 | pinned | test.rs:447:56:447:66 | [post] &mut buffer [&ref] | provenance | MaD:10 | | test.rs:447:56:447:66 | [post] &mut buffer [&ref] | test.rs:447:61:447:66 | [post] buffer | provenance | | | test.rs:447:61:447:66 | [post] buffer | test.rs:448:19:448:24 | buffer | provenance | | +| test.rs:447:61:447:66 | [post] buffer | test.rs:450:23:450:28 | buffer | provenance | | | test.rs:447:61:447:66 | [post] buffer | test.rs:450:23:450:33 | buffer[...] | provenance | | | test.rs:448:19:448:24 | buffer | test.rs:448:18:448:24 | &buffer | provenance | | +| test.rs:450:23:450:28 | buffer | test.rs:450:23:450:33 | buffer[...] | provenance | MaD:8 | | test.rs:450:23:450:33 | buffer[...] | test.rs:450:22:450:33 | &... | provenance | | -| test.rs:457:63:457:74 | &mut reader2 [&ref] | test.rs:457:77:457:88 | [post] &mut buffer1 [&ref] | provenance | MaD:15 | +| test.rs:457:63:457:74 | &mut reader2 [&ref] | test.rs:457:77:457:88 | [post] &mut buffer1 [&ref] | provenance | MaD:14 | | test.rs:457:68:457:74 | reader2 | test.rs:457:63:457:74 | &mut reader2 [&ref] | provenance | | | test.rs:457:77:457:88 | [post] &mut buffer1 [&ref] | test.rs:457:82:457:88 | [post] buffer1 | provenance | | +| test.rs:457:82:457:88 | [post] buffer1 | test.rs:458:19:458:25 | buffer1 | provenance | | | test.rs:457:82:457:88 | [post] buffer1 | test.rs:458:19:458:40 | buffer1[...] | provenance | | +| test.rs:458:19:458:25 | buffer1 | test.rs:458:19:458:40 | buffer1[...] | provenance | MaD:8 | | test.rs:458:19:458:40 | buffer1[...] | test.rs:458:18:458:40 | &... | provenance | | -| test.rs:461:31:461:37 | reader2 | test.rs:461:44:461:55 | [post] &mut buffer2 [&ref] | provenance | MaD:15 | +| test.rs:461:31:461:37 | reader2 | test.rs:461:44:461:55 | [post] &mut buffer2 [&ref] | provenance | MaD:14 | | test.rs:461:44:461:55 | [post] &mut buffer2 [&ref] | test.rs:461:49:461:55 | [post] buffer2 | provenance | | +| test.rs:461:49:461:55 | [post] buffer2 | test.rs:462:19:462:25 | buffer2 | provenance | | | test.rs:461:49:461:55 | [post] buffer2 | test.rs:462:19:462:40 | buffer2[...] | provenance | | +| test.rs:462:19:462:25 | buffer2 | test.rs:462:19:462:40 | buffer2[...] | provenance | MaD:8 | | test.rs:462:19:462:40 | buffer2[...] | test.rs:462:18:462:40 | &... | provenance | | | test.rs:467:17:467:26 | mut pinned | test.rs:468:19:468:24 | pinned | provenance | | -| test.rs:467:17:467:26 | mut pinned | test.rs:470:26:470:54 | pinned.poll_fill_buf(...) [Ready, Ok] | provenance | MaD:8 | -| test.rs:467:17:467:26 | mut pinned [&ref] | test.rs:468:19:468:24 | pinned [&ref] | provenance | | -| test.rs:467:17:467:26 | mut pinned [&ref] | test.rs:470:26:470:54 | pinned.poll_fill_buf(...) [Ready, Ok] | provenance | MaD:8 | +| test.rs:467:17:467:26 | mut pinned | test.rs:470:26:470:31 | pinned | provenance | | +| test.rs:467:17:467:26 | mut pinned [Pin, &ref] | test.rs:468:19:468:24 | pinned [Pin, &ref] | provenance | | | test.rs:467:30:467:51 | ...::new(...) | test.rs:467:17:467:26 | mut pinned | provenance | | -| test.rs:467:30:467:51 | ...::new(...) [&ref] | test.rs:467:17:467:26 | mut pinned [&ref] | provenance | | -| test.rs:467:39:467:50 | &mut reader2 [&ref] | test.rs:467:30:467:51 | ...::new(...) | provenance | MaD:24 | -| test.rs:467:39:467:50 | &mut reader2 [&ref] | test.rs:467:30:467:51 | ...::new(...) [&ref] | provenance | MaD:25 | +| test.rs:467:30:467:51 | ...::new(...) [Pin, &ref] | test.rs:467:17:467:26 | mut pinned [Pin, &ref] | provenance | | +| test.rs:467:39:467:50 | &mut reader2 [&ref] | test.rs:467:30:467:51 | ...::new(...) | provenance | MaD:21 | +| test.rs:467:39:467:50 | &mut reader2 [&ref] | test.rs:467:30:467:51 | ...::new(...) [Pin, &ref] | provenance | MaD:22 | | test.rs:467:44:467:50 | reader2 | test.rs:467:39:467:50 | &mut reader2 [&ref] | provenance | | | test.rs:468:19:468:24 | pinned | test.rs:468:18:468:24 | &pinned | provenance | | -| test.rs:468:19:468:24 | pinned [&ref] | test.rs:468:18:468:24 | &pinned | provenance | | +| test.rs:468:19:468:24 | pinned [Pin, &ref] | test.rs:468:18:468:24 | &pinned | provenance | | | test.rs:470:17:470:22 | buffer [Ready, Ok] | test.rs:471:19:471:24 | buffer [Ready, Ok] | provenance | | | test.rs:470:17:470:22 | buffer [Ready, Ok] | test.rs:472:20:472:39 | ...::Ready(...) [Ready, Ok] | provenance | | +| test.rs:470:26:470:31 | pinned | test.rs:470:26:470:54 | pinned.poll_fill_buf(...) [Ready, Ok] | provenance | MaD:9 | | test.rs:470:26:470:54 | pinned.poll_fill_buf(...) [Ready, Ok] | test.rs:470:17:470:22 | buffer [Ready, Ok] | provenance | | | test.rs:471:19:471:24 | buffer [Ready, Ok] | test.rs:471:18:471:24 | &buffer | provenance | | | test.rs:472:20:472:39 | ...::Ready(...) [Ready, Ok] | test.rs:472:32:472:38 | Ok(...) [Ok] | provenance | | | test.rs:472:32:472:38 | Ok(...) [Ok] | test.rs:472:35:472:37 | buf | provenance | | | test.rs:472:35:472:37 | buf | test.rs:473:22:473:24 | buf | provenance | | | test.rs:479:17:479:22 | buffer | test.rs:480:18:480:23 | buffer | provenance | | +| test.rs:479:26:479:32 | reader2 | test.rs:479:26:479:43 | reader2.fill_buf() [future, Ok] | provenance | MaD:11 | | test.rs:479:26:479:43 | reader2.fill_buf() [future, Ok] | test.rs:479:26:479:49 | await ... [Ok] | provenance | | | test.rs:479:26:479:49 | await ... [Ok] | test.rs:479:26:479:50 | TryExpr | provenance | | | test.rs:479:26:479:50 | TryExpr | test.rs:479:17:479:22 | buffer | provenance | | @@ -299,11 +309,11 @@ edges | test.rs:486:57:486:65 | [post] &mut line [&ref] | test.rs:486:62:486:65 | [post] line | provenance | | | test.rs:486:62:486:65 | [post] line | test.rs:487:19:487:22 | line | provenance | | | test.rs:487:19:487:22 | line | test.rs:487:18:487:22 | &line | provenance | | -| test.rs:493:31:493:37 | reader2 | test.rs:493:49:493:57 | [post] &mut line [&ref] | provenance | MaD:11 | +| test.rs:493:31:493:37 | reader2 | test.rs:493:49:493:57 | [post] &mut line [&ref] | provenance | MaD:12 | | test.rs:493:49:493:57 | [post] &mut line [&ref] | test.rs:493:54:493:57 | [post] line | provenance | | | test.rs:493:54:493:57 | [post] line | test.rs:494:19:494:22 | line | provenance | | | test.rs:494:19:494:22 | line | test.rs:494:18:494:22 | &line | provenance | | -| test.rs:500:31:500:37 | reader2 | test.rs:500:51:500:61 | [post] &mut buffer [&ref] | provenance | MaD:17 | +| test.rs:500:31:500:37 | reader2 | test.rs:500:51:500:61 | [post] &mut buffer [&ref] | provenance | MaD:15 | | test.rs:500:51:500:61 | [post] &mut buffer [&ref] | test.rs:500:56:500:61 | [post] buffer | provenance | | | test.rs:500:56:500:61 | [post] buffer | test.rs:501:19:501:24 | buffer | provenance | | | test.rs:501:19:501:24 | buffer | test.rs:501:18:501:24 | &buffer | provenance | | @@ -359,12 +369,14 @@ nodes | test.rs:29:24:29:50 | ...::get(...) [future, Ok] | semmle.label | ...::get(...) [future, Ok] | | test.rs:29:24:29:56 | await ... [Ok] | semmle.label | await ... [Ok] | | test.rs:29:24:29:57 | TryExpr | semmle.label | TryExpr | +| test.rs:30:10:30:17 | request1 | semmle.label | request1 | | test.rs:30:10:30:25 | request1.chunk() [future, Ok, Some] | semmle.label | request1.chunk() [future, Ok, Some] | | test.rs:30:10:30:31 | await ... [Ok, Some] | semmle.label | await ... [Ok, Some] | | test.rs:30:10:30:32 | TryExpr [Some] | semmle.label | TryExpr [Some] | | test.rs:30:10:30:41 | ... .unwrap() | semmle.label | ... .unwrap() | | test.rs:31:15:31:25 | Some(...) [Some] | semmle.label | Some(...) [Some] | | test.rs:31:20:31:24 | chunk | semmle.label | chunk | +| test.rs:31:29:31:36 | request1 | semmle.label | request1 | | test.rs:31:29:31:44 | request1.chunk() [future, Ok, Some] | semmle.label | request1.chunk() [future, Ok, Some] | | test.rs:31:29:31:50 | await ... [Ok, Some] | semmle.label | await ... [Ok, Some] | | test.rs:31:29:31:51 | TryExpr [Some] | semmle.label | TryExpr [Some] | @@ -388,10 +400,12 @@ nodes | test.rs:155:26:155:53 | ...::connect | semmle.label | ...::connect | | test.rs:155:26:155:62 | ...::connect(...) [Ok] | semmle.label | ...::connect(...) [Ok] | | test.rs:155:26:155:63 | TryExpr | semmle.label | TryExpr | +| test.rs:162:17:162:22 | stream | semmle.label | stream | | test.rs:162:29:162:39 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:162:34:162:39 | [post] buffer | semmle.label | [post] buffer | | test.rs:165:14:165:20 | &buffer | semmle.label | &buffer | | test.rs:165:15:165:20 | buffer | semmle.label | buffer | +| test.rs:166:14:166:19 | buffer | semmle.label | buffer | | test.rs:166:14:166:22 | buffer[0] | semmle.label | buffer[0] | | test.rs:174:13:174:22 | mut stream | semmle.label | mut stream | | test.rs:174:26:174:61 | ...::connect_timeout | semmle.label | ...::connect_timeout | @@ -401,6 +415,7 @@ nodes | test.rs:182:34:182:64 | ...::new(...) | semmle.label | ...::new(...) | | test.rs:182:34:182:74 | ... .take(...) | semmle.label | ... .take(...) | | test.rs:182:58:182:63 | stream | semmle.label | stream | +| test.rs:185:27:185:32 | reader | semmle.label | reader | | test.rs:185:44:185:52 | [post] &mut line [&ref] | semmle.label | [post] &mut line [&ref] | | test.rs:185:49:185:52 | [post] line | semmle.label | [post] line | | test.rs:192:34:192:38 | &line | semmle.label | &line | @@ -410,20 +425,26 @@ nodes | test.rs:224:28:224:66 | ...::connect(...) [future, Ok] | semmle.label | ...::connect(...) [future, Ok] | | test.rs:224:28:224:72 | await ... [Ok] | semmle.label | await ... [Ok] | | test.rs:224:28:224:73 | TryExpr | semmle.label | TryExpr | +| test.rs:232:17:232:28 | tokio_stream | semmle.label | tokio_stream | | test.rs:232:35:232:46 | [post] &mut buffer1 [&ref] | semmle.label | [post] &mut buffer1 [&ref] | | test.rs:232:40:232:46 | [post] buffer1 | semmle.label | [post] buffer1 | +| test.rs:236:18:236:29 | tokio_stream | semmle.label | tokio_stream | | test.rs:236:36:236:47 | [post] &mut buffer2 [&ref] | semmle.label | [post] &mut buffer2 [&ref] | | test.rs:236:41:236:47 | [post] buffer2 | semmle.label | [post] buffer2 | | test.rs:239:14:239:21 | &buffer1 | semmle.label | &buffer1 | | test.rs:239:15:239:21 | buffer1 | semmle.label | buffer1 | +| test.rs:240:14:240:20 | buffer1 | semmle.label | buffer1 | | test.rs:240:14:240:23 | buffer1[0] | semmle.label | buffer1[0] | | test.rs:243:14:243:21 | &buffer2 | semmle.label | &buffer2 | | test.rs:243:15:243:21 | buffer2 | semmle.label | buffer2 | +| test.rs:244:14:244:20 | buffer2 | semmle.label | buffer2 | | test.rs:244:14:244:23 | buffer2[0] | semmle.label | buffer2[0] | +| test.rs:252:19:252:30 | tokio_stream | semmle.label | tokio_stream | | test.rs:252:41:252:51 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:252:46:252:51 | [post] buffer | semmle.label | [post] buffer | | test.rs:259:26:259:32 | &buffer | semmle.label | &buffer | | test.rs:259:27:259:32 | buffer | semmle.label | buffer | +| test.rs:275:19:275:30 | tokio_stream | semmle.label | tokio_stream | | test.rs:275:45:275:55 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:275:50:275:55 | [post] buffer | semmle.label | [post] buffer | | test.rs:282:26:282:32 | &buffer | semmle.label | &buffer | @@ -443,30 +464,34 @@ nodes | test.rs:381:14:381:20 | &reader | semmle.label | &reader | | test.rs:381:15:381:20 | reader | semmle.label | reader | | test.rs:386:17:386:26 | mut pinned | semmle.label | mut pinned | -| test.rs:386:17:386:26 | mut pinned [&ref] | semmle.label | mut pinned [&ref] | +| test.rs:386:17:386:26 | mut pinned [Pin, &ref] | semmle.label | mut pinned [Pin, &ref] | | test.rs:386:30:386:50 | ...::new(...) | semmle.label | ...::new(...) | -| test.rs:386:30:386:50 | ...::new(...) [&ref] | semmle.label | ...::new(...) [&ref] | +| test.rs:386:30:386:50 | ...::new(...) [Pin, &ref] | semmle.label | ...::new(...) [Pin, &ref] | | test.rs:386:39:386:49 | &mut reader [&ref] | semmle.label | &mut reader [&ref] | | test.rs:386:44:386:49 | reader | semmle.label | reader | | test.rs:387:18:387:24 | &pinned | semmle.label | &pinned | | test.rs:387:19:387:24 | pinned | semmle.label | pinned | -| test.rs:387:19:387:24 | pinned [&ref] | semmle.label | pinned [&ref] | +| test.rs:387:19:387:24 | pinned [Pin, &ref] | semmle.label | pinned [Pin, &ref] | +| test.rs:389:30:389:35 | pinned | semmle.label | pinned | | test.rs:389:56:389:66 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:389:61:389:66 | [post] buffer | semmle.label | [post] buffer | | test.rs:391:22:391:28 | &buffer | semmle.label | &buffer | | test.rs:391:23:391:28 | buffer | semmle.label | buffer | | test.rs:392:22:392:33 | &... | semmle.label | &... | +| test.rs:392:23:392:28 | buffer | semmle.label | buffer | | test.rs:392:23:392:33 | buffer[...] | semmle.label | buffer[...] | | test.rs:399:63:399:73 | &mut reader [&ref] | semmle.label | &mut reader [&ref] | | test.rs:399:68:399:73 | reader | semmle.label | reader | | test.rs:399:76:399:87 | [post] &mut buffer1 [&ref] | semmle.label | [post] &mut buffer1 [&ref] | | test.rs:399:81:399:87 | [post] buffer1 | semmle.label | [post] buffer1 | | test.rs:400:18:400:40 | &... | semmle.label | &... | +| test.rs:400:19:400:25 | buffer1 | semmle.label | buffer1 | | test.rs:400:19:400:40 | buffer1[...] | semmle.label | buffer1[...] | | test.rs:403:31:403:36 | reader | semmle.label | reader | | test.rs:403:43:403:54 | [post] &mut buffer2 [&ref] | semmle.label | [post] &mut buffer2 [&ref] | | test.rs:403:48:403:54 | [post] buffer2 | semmle.label | [post] buffer2 | | test.rs:405:18:405:40 | &... | semmle.label | &... | +| test.rs:405:19:405:25 | buffer2 | semmle.label | buffer2 | | test.rs:405:19:405:40 | buffer2[...] | semmle.label | buffer2[...] | | test.rs:408:13:408:23 | mut reader2 | semmle.label | mut reader2 | | test.rs:408:27:408:61 | ...::new(...) | semmle.label | ...::new(...) | @@ -474,15 +499,16 @@ nodes | test.rs:409:14:409:21 | &reader2 | semmle.label | &reader2 | | test.rs:409:15:409:21 | reader2 | semmle.label | reader2 | | test.rs:413:17:413:26 | mut pinned | semmle.label | mut pinned | -| test.rs:413:17:413:26 | mut pinned [&ref] | semmle.label | mut pinned [&ref] | +| test.rs:413:17:413:26 | mut pinned [Pin, &ref] | semmle.label | mut pinned [Pin, &ref] | | test.rs:413:30:413:51 | ...::new(...) | semmle.label | ...::new(...) | -| test.rs:413:30:413:51 | ...::new(...) [&ref] | semmle.label | ...::new(...) [&ref] | +| test.rs:413:30:413:51 | ...::new(...) [Pin, &ref] | semmle.label | ...::new(...) [Pin, &ref] | | test.rs:413:39:413:50 | &mut reader2 [&ref] | semmle.label | &mut reader2 [&ref] | | test.rs:413:44:413:50 | reader2 | semmle.label | reader2 | | test.rs:414:18:414:24 | &pinned | semmle.label | &pinned | | test.rs:414:19:414:24 | pinned | semmle.label | pinned | -| test.rs:414:19:414:24 | pinned [&ref] | semmle.label | pinned [&ref] | +| test.rs:414:19:414:24 | pinned [Pin, &ref] | semmle.label | pinned [Pin, &ref] | | test.rs:416:17:416:22 | buffer [Ready, Ok] | semmle.label | buffer [Ready, Ok] | +| test.rs:416:26:416:31 | pinned | semmle.label | pinned | | test.rs:416:26:416:54 | pinned.poll_fill_buf(...) [Ready, Ok] | semmle.label | pinned.poll_fill_buf(...) [Ready, Ok] | | test.rs:417:20:417:39 | ...::Ready(...) [Ready, Ok] | semmle.label | ...::Ready(...) [Ready, Ok] | | test.rs:417:32:417:38 | Ok(...) [Ok] | semmle.label | Ok(...) [Ok] | @@ -492,7 +518,6 @@ nodes | test.rs:419:22:419:24 | buf | semmle.label | buf | | test.rs:423:17:423:23 | buffer2 [Ready, Ok] | semmle.label | buffer2 [Ready, Ok] | | test.rs:423:27:423:48 | ...::new(...) | semmle.label | ...::new(...) | -| test.rs:423:27:423:48 | ...::new(...) [&ref] | semmle.label | ...::new(...) [&ref] | | test.rs:423:27:423:71 | ... .poll_fill_buf(...) [Ready, Ok] | semmle.label | ... .poll_fill_buf(...) [Ready, Ok] | | test.rs:423:36:423:47 | &mut reader2 [&ref] | semmle.label | &mut reader2 [&ref] | | test.rs:423:41:423:47 | reader2 | semmle.label | reader2 | @@ -504,46 +529,52 @@ nodes | test.rs:426:27:426:33 | buffer2 [Ready, Ok] | semmle.label | buffer2 [Ready, Ok] | | test.rs:427:26:427:28 | buf | semmle.label | buf | | test.rs:437:17:437:22 | buffer | semmle.label | buffer | +| test.rs:437:26:437:32 | reader2 | semmle.label | reader2 | | test.rs:437:26:437:43 | reader2.fill_buf() [future, Ok] | semmle.label | reader2.fill_buf() [future, Ok] | | test.rs:437:26:437:49 | await ... [Ok] | semmle.label | await ... [Ok] | | test.rs:437:26:437:50 | TryExpr | semmle.label | TryExpr | | test.rs:438:18:438:23 | buffer | semmle.label | buffer | | test.rs:444:17:444:26 | mut pinned | semmle.label | mut pinned | -| test.rs:444:17:444:26 | mut pinned [&ref] | semmle.label | mut pinned [&ref] | +| test.rs:444:17:444:26 | mut pinned [Pin, &ref] | semmle.label | mut pinned [Pin, &ref] | | test.rs:444:30:444:51 | ...::new(...) | semmle.label | ...::new(...) | -| test.rs:444:30:444:51 | ...::new(...) [&ref] | semmle.label | ...::new(...) [&ref] | +| test.rs:444:30:444:51 | ...::new(...) [Pin, &ref] | semmle.label | ...::new(...) [Pin, &ref] | | test.rs:444:39:444:50 | &mut reader2 [&ref] | semmle.label | &mut reader2 [&ref] | | test.rs:444:44:444:50 | reader2 | semmle.label | reader2 | | test.rs:445:18:445:24 | &pinned | semmle.label | &pinned | | test.rs:445:19:445:24 | pinned | semmle.label | pinned | -| test.rs:445:19:445:24 | pinned [&ref] | semmle.label | pinned [&ref] | +| test.rs:445:19:445:24 | pinned [Pin, &ref] | semmle.label | pinned [Pin, &ref] | +| test.rs:447:30:447:35 | pinned | semmle.label | pinned | | test.rs:447:56:447:66 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:447:61:447:66 | [post] buffer | semmle.label | [post] buffer | | test.rs:448:18:448:24 | &buffer | semmle.label | &buffer | | test.rs:448:19:448:24 | buffer | semmle.label | buffer | | test.rs:450:22:450:33 | &... | semmle.label | &... | +| test.rs:450:23:450:28 | buffer | semmle.label | buffer | | test.rs:450:23:450:33 | buffer[...] | semmle.label | buffer[...] | | test.rs:457:63:457:74 | &mut reader2 [&ref] | semmle.label | &mut reader2 [&ref] | | test.rs:457:68:457:74 | reader2 | semmle.label | reader2 | | test.rs:457:77:457:88 | [post] &mut buffer1 [&ref] | semmle.label | [post] &mut buffer1 [&ref] | | test.rs:457:82:457:88 | [post] buffer1 | semmle.label | [post] buffer1 | | test.rs:458:18:458:40 | &... | semmle.label | &... | +| test.rs:458:19:458:25 | buffer1 | semmle.label | buffer1 | | test.rs:458:19:458:40 | buffer1[...] | semmle.label | buffer1[...] | | test.rs:461:31:461:37 | reader2 | semmle.label | reader2 | | test.rs:461:44:461:55 | [post] &mut buffer2 [&ref] | semmle.label | [post] &mut buffer2 [&ref] | | test.rs:461:49:461:55 | [post] buffer2 | semmle.label | [post] buffer2 | | test.rs:462:18:462:40 | &... | semmle.label | &... | +| test.rs:462:19:462:25 | buffer2 | semmle.label | buffer2 | | test.rs:462:19:462:40 | buffer2[...] | semmle.label | buffer2[...] | | test.rs:467:17:467:26 | mut pinned | semmle.label | mut pinned | -| test.rs:467:17:467:26 | mut pinned [&ref] | semmle.label | mut pinned [&ref] | +| test.rs:467:17:467:26 | mut pinned [Pin, &ref] | semmle.label | mut pinned [Pin, &ref] | | test.rs:467:30:467:51 | ...::new(...) | semmle.label | ...::new(...) | -| test.rs:467:30:467:51 | ...::new(...) [&ref] | semmle.label | ...::new(...) [&ref] | +| test.rs:467:30:467:51 | ...::new(...) [Pin, &ref] | semmle.label | ...::new(...) [Pin, &ref] | | test.rs:467:39:467:50 | &mut reader2 [&ref] | semmle.label | &mut reader2 [&ref] | | test.rs:467:44:467:50 | reader2 | semmle.label | reader2 | | test.rs:468:18:468:24 | &pinned | semmle.label | &pinned | | test.rs:468:19:468:24 | pinned | semmle.label | pinned | -| test.rs:468:19:468:24 | pinned [&ref] | semmle.label | pinned [&ref] | +| test.rs:468:19:468:24 | pinned [Pin, &ref] | semmle.label | pinned [Pin, &ref] | | test.rs:470:17:470:22 | buffer [Ready, Ok] | semmle.label | buffer [Ready, Ok] | +| test.rs:470:26:470:31 | pinned | semmle.label | pinned | | test.rs:470:26:470:54 | pinned.poll_fill_buf(...) [Ready, Ok] | semmle.label | pinned.poll_fill_buf(...) [Ready, Ok] | | test.rs:471:18:471:24 | &buffer | semmle.label | &buffer | | test.rs:471:19:471:24 | buffer [Ready, Ok] | semmle.label | buffer [Ready, Ok] | @@ -552,6 +583,7 @@ nodes | test.rs:472:35:472:37 | buf | semmle.label | buf | | test.rs:473:22:473:24 | buf | semmle.label | buf | | test.rs:479:17:479:22 | buffer | semmle.label | buffer | +| test.rs:479:26:479:32 | reader2 | semmle.label | reader2 | | test.rs:479:26:479:43 | reader2.fill_buf() [future, Ok] | semmle.label | reader2.fill_buf() [future, Ok] | | test.rs:479:26:479:49 | await ... [Ok] | semmle.label | await ... [Ok] | | test.rs:479:26:479:50 | TryExpr | semmle.label | TryExpr | diff --git a/rust/ql/test/library-tests/dataflow/sources/stdin/InlineFlow.expected b/rust/ql/test/library-tests/dataflow/sources/stdin/InlineFlow.expected index 5e0e79e5e5d..01693b0041f 100644 --- a/rust/ql/test/library-tests/dataflow/sources/stdin/InlineFlow.expected +++ b/rust/ql/test/library-tests/dataflow/sources/stdin/InlineFlow.expected @@ -1,48 +1,44 @@ models | 1 | Source: std::io::stdio::stdin; ReturnValue; stdin | | 2 | Source: tokio::io::stdin::stdin; ReturnValue; stdin | -| 3 | Summary: <_ as core::iter::traits::iterator::Iterator>::next; Argument[self].Element; ReturnValue.Field[core::option::Option::Some(0)].Field[core::result::Result::Ok(0)]; value | -| 4 | Summary: <_ as std::io::BufRead>::fill_buf; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | +| 3 | Summary: <_ as core::ops::index::Index>::index; Argument[self].Reference.Element; ReturnValue.Reference; value | +| 4 | Summary: <_ as std::io::BufRead>::fill_buf; Argument[self].Reference; ReturnValue.Field[core::result::Result::Ok(0)]; taint | | 5 | Summary: <_ as std::io::BufRead>::lines; Argument[self]; ReturnValue; taint | -| 6 | Summary: <_ as std::io::BufRead>::read_line; Argument[self]; Argument[0].Reference; taint | -| 7 | Summary: <_ as std::io::BufRead>::read_until; Argument[self]; Argument[1].Reference; taint | +| 6 | Summary: <_ as std::io::BufRead>::read_line; Argument[self].Reference; Argument[0].Reference; taint | +| 7 | Summary: <_ as std::io::BufRead>::read_until; Argument[self].Reference; Argument[1].Reference; taint | | 8 | Summary: <_ as std::io::BufRead>::split; Argument[self]; ReturnValue; taint | | 9 | Summary: <_ as std::io::Read>::bytes; Argument[self]; ReturnValue; taint | -| 10 | Summary: <_ as std::io::Read>::read; Argument[self]; Argument[0].Reference; taint | -| 11 | Summary: <_ as std::io::Read>::read_exact; Argument[self]; Argument[0].Reference; taint | -| 12 | Summary: <_ as std::io::Read>::read_to_end; Argument[self]; Argument[0].Reference; taint | -| 13 | Summary: <_ as std::io::Read>::read_to_string; Argument[self]; Argument[0].Reference; taint | -| 14 | Summary: <_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::fill_buf; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | +| 10 | Summary: <_ as std::io::Read>::read; Argument[self].Reference; Argument[0].Reference; taint | +| 11 | Summary: <_ as std::io::Read>::read_exact; Argument[self].Reference; Argument[0].Reference; taint | +| 12 | Summary: <_ as std::io::Read>::read_to_end; Argument[self].Reference; Argument[0].Reference; taint | +| 13 | Summary: <_ as std::io::Read>::read_to_string; Argument[self].Reference; Argument[0].Reference; taint | +| 14 | Summary: <_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::fill_buf; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | | 15 | Summary: <_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::lines; Argument[self]; ReturnValue; taint | -| 16 | Summary: <_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::read_line; Argument[self]; Argument[0].Reference; taint | -| 17 | Summary: <_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::read_until; Argument[self]; Argument[1].Reference; taint | +| 16 | Summary: <_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::read_line; Argument[self].Reference; Argument[0].Reference; taint | +| 17 | Summary: <_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::read_until; Argument[self].Reference; Argument[1].Reference; taint | | 18 | Summary: <_ as tokio::io::util::async_buf_read_ext::AsyncBufReadExt>::split; Argument[self]; ReturnValue; taint | -| 19 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read; Argument[self]; Argument[0].Reference; taint | -| 20 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_buf; Argument[self]; Argument[0].Reference; taint | -| 21 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_exact; Argument[self]; Argument[0].Reference; taint | -| 22 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_f32; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | -| 23 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i16; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | -| 24 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i64_le; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | -| 25 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_to_end; Argument[self]; Argument[0].Reference; taint | -| 26 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_to_string; Argument[self]; Argument[0].Reference; taint | -| 27 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u8; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | +| 19 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read; Argument[self].Reference; Argument[0].Reference; taint | +| 20 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_buf; Argument[self].Reference; Argument[0].Reference; taint | +| 21 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_exact; Argument[self].Reference; Argument[0].Reference; taint | +| 22 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_f32; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | +| 23 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i16; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | +| 24 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_i64_le; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | +| 25 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_to_end; Argument[self].Reference; Argument[0].Reference; taint | +| 26 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_to_string; Argument[self].Reference; Argument[0].Reference; taint | +| 27 | Summary: <_ as tokio::io::util::async_read_ext::AsyncReadExt>::read_u8; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)]; taint | | 28 | Summary: ::unwrap; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | | 29 | Summary: ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | -| 30 | Summary: ::buffer; Argument[self]; ReturnValue; taint | -| 31 | Summary: ::new; Argument[0]; ReturnValue; taint | -| 32 | Summary: ::read; Argument[self]; Argument[0]; taint | -| 33 | Summary: ::read_exact; Argument[self]; Argument[0]; taint | -| 34 | Summary: ::read_to_string; Argument[self]; Argument[0]; taint | -| 35 | Summary: ::lock; Argument[self]; ReturnValue; taint | -| 36 | Summary: ::buffer; Argument[self]; ReturnValue; taint | -| 37 | Summary: ::new; Argument[0]; ReturnValue; taint | -| 38 | Summary: ::next_line; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]; taint | -| 39 | Summary: ::next_segment; Argument[self]; ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]; taint | +| 30 | Summary: ::next; Argument[self].Reference.Element; ReturnValue.Field[core::option::Option::Some(0)].Field[core::result::Result::Ok(0)]; value | +| 31 | Summary: ::buffer; Argument[self].Reference; ReturnValue.Reference; taint | +| 32 | Summary: ::new; Argument[0]; ReturnValue; taint | +| 33 | Summary: ::lock; Argument[self].Reference; ReturnValue; taint | +| 34 | Summary: ::buffer; Argument[self].Reference; ReturnValue.Reference; taint | +| 35 | Summary: ::new; Argument[0]; ReturnValue; taint | +| 36 | Summary: ::next_line; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]; taint | +| 37 | Summary: ::next_segment; Argument[self].Reference; ReturnValue.Future.Field[core::result::Result::Ok(0)].Field[core::option::Option::Some(0)]; taint | edges | test.rs:13:22:13:35 | ...::stdin | test.rs:13:22:13:37 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 | -| test.rs:13:22:13:37 | ...::stdin(...) | test.rs:13:44:13:54 | [post] &mut buffer | provenance | MaD:32 | | test.rs:13:22:13:37 | ...::stdin(...) | test.rs:13:44:13:54 | [post] &mut buffer [&ref] | provenance | MaD:10 | -| test.rs:13:44:13:54 | [post] &mut buffer | test.rs:14:15:14:20 | buffer | provenance | | | test.rs:13:44:13:54 | [post] &mut buffer [&ref] | test.rs:13:49:13:54 | [post] buffer | provenance | | | test.rs:13:49:13:54 | [post] buffer | test.rs:14:15:14:20 | buffer | provenance | | | test.rs:14:15:14:20 | buffer | test.rs:14:14:14:20 | &buffer | provenance | | @@ -52,190 +48,213 @@ edges | test.rs:19:56:19:61 | [post] buffer | test.rs:20:15:20:20 | buffer | provenance | | | test.rs:20:15:20:20 | buffer | test.rs:20:14:20:20 | &buffer | provenance | | | test.rs:25:22:25:35 | ...::stdin | test.rs:25:22:25:37 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 | -| test.rs:25:22:25:37 | ...::stdin(...) | test.rs:25:54:25:64 | [post] &mut buffer | provenance | MaD:34 | | test.rs:25:22:25:37 | ...::stdin(...) | test.rs:25:54:25:64 | [post] &mut buffer [&ref] | provenance | MaD:13 | -| test.rs:25:54:25:64 | [post] &mut buffer | test.rs:26:15:26:20 | buffer | provenance | | | test.rs:25:54:25:64 | [post] &mut buffer [&ref] | test.rs:25:59:25:64 | [post] buffer | provenance | | | test.rs:25:59:25:64 | [post] buffer | test.rs:26:15:26:20 | buffer | provenance | | | test.rs:26:15:26:20 | buffer | test.rs:26:14:26:20 | &buffer | provenance | | | test.rs:31:22:31:35 | ...::stdin | test.rs:31:22:31:37 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 | -| test.rs:31:22:31:37 | ...::stdin(...) | test.rs:31:22:31:44 | ... .lock() | provenance | MaD:35 | +| test.rs:31:22:31:37 | ...::stdin(...) | test.rs:31:22:31:44 | ... .lock() | provenance | MaD:33 | | test.rs:31:22:31:44 | ... .lock() | test.rs:31:61:31:71 | [post] &mut buffer [&ref] | provenance | MaD:13 | | test.rs:31:61:31:71 | [post] &mut buffer [&ref] | test.rs:31:66:31:71 | [post] buffer | provenance | | | test.rs:31:66:31:71 | [post] buffer | test.rs:32:15:32:20 | buffer | provenance | | | test.rs:32:15:32:20 | buffer | test.rs:32:14:32:20 | &buffer | provenance | | | test.rs:37:9:37:22 | ...::stdin | test.rs:37:9:37:24 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 | -| test.rs:37:9:37:24 | ...::stdin(...) | test.rs:37:37:37:47 | [post] &mut buffer | provenance | MaD:33 | | test.rs:37:9:37:24 | ...::stdin(...) | test.rs:37:37:37:47 | [post] &mut buffer [&ref] | provenance | MaD:11 | -| test.rs:37:37:37:47 | [post] &mut buffer | test.rs:38:15:38:20 | buffer | provenance | | | test.rs:37:37:37:47 | [post] &mut buffer [&ref] | test.rs:37:42:37:47 | [post] buffer | provenance | | | test.rs:37:42:37:47 | [post] buffer | test.rs:38:15:38:20 | buffer | provenance | | | test.rs:38:15:38:20 | buffer | test.rs:38:14:38:20 | &buffer | provenance | | | test.rs:41:17:41:30 | ...::stdin | test.rs:41:17:41:32 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 | | test.rs:41:17:41:32 | ...::stdin(...) | test.rs:41:17:41:40 | ... .bytes() | provenance | MaD:9 | | test.rs:41:17:41:40 | ... .bytes() | test.rs:42:14:42:17 | byte | provenance | | -| test.rs:48:13:48:22 | mut reader | test.rs:49:20:49:36 | reader.fill_buf() [Ok] | provenance | MaD:4 | +| test.rs:48:13:48:22 | mut reader | test.rs:49:20:49:25 | reader | provenance | | | test.rs:48:26:48:66 | ...::new(...) | test.rs:48:13:48:22 | mut reader | provenance | | | test.rs:48:50:48:63 | ...::stdin | test.rs:48:50:48:65 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 | -| test.rs:48:50:48:65 | ...::stdin(...) | test.rs:48:26:48:66 | ...::new(...) | provenance | MaD:31 | +| test.rs:48:50:48:65 | ...::stdin(...) | test.rs:48:26:48:66 | ...::new(...) | provenance | MaD:32 | | test.rs:49:13:49:16 | data | test.rs:50:15:50:18 | data | provenance | | +| test.rs:49:20:49:25 | reader | test.rs:49:20:49:36 | reader.fill_buf() [Ok] | provenance | MaD:4 | | test.rs:49:20:49:36 | reader.fill_buf() [Ok] | test.rs:49:20:49:37 | TryExpr | provenance | | | test.rs:49:20:49:37 | TryExpr | test.rs:49:13:49:16 | data | provenance | | | test.rs:50:15:50:18 | data | test.rs:50:14:50:18 | &data | provenance | | -| test.rs:54:13:54:18 | reader | test.rs:55:20:55:34 | reader.buffer() | provenance | MaD:30 | +| test.rs:54:13:54:18 | reader | test.rs:55:20:55:25 | reader | provenance | | | test.rs:54:22:54:62 | ...::new(...) | test.rs:54:13:54:18 | reader | provenance | | | test.rs:54:46:54:59 | ...::stdin | test.rs:54:46:54:61 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 | -| test.rs:54:46:54:61 | ...::stdin(...) | test.rs:54:22:54:62 | ...::new(...) | provenance | MaD:31 | -| test.rs:55:13:55:16 | data | test.rs:56:15:56:18 | data | provenance | | -| test.rs:55:20:55:34 | reader.buffer() | test.rs:55:13:55:16 | data | provenance | | -| test.rs:56:15:56:18 | data | test.rs:56:14:56:18 | &data | provenance | | -| test.rs:61:13:61:22 | mut reader | test.rs:62:26:62:36 | [post] &mut buffer [&ref] | provenance | MaD:6 | +| test.rs:54:46:54:61 | ...::stdin(...) | test.rs:54:22:54:62 | ...::new(...) | provenance | MaD:32 | +| test.rs:55:13:55:16 | data [&ref] | test.rs:56:15:56:18 | data [&ref] | provenance | | +| test.rs:55:20:55:25 | reader | test.rs:55:20:55:34 | reader.buffer() [&ref] | provenance | MaD:31 | +| test.rs:55:20:55:34 | reader.buffer() [&ref] | test.rs:55:13:55:16 | data [&ref] | provenance | | +| test.rs:56:15:56:18 | data [&ref] | test.rs:56:14:56:18 | &data | provenance | | +| test.rs:61:13:61:22 | mut reader | test.rs:62:9:62:14 | reader | provenance | | | test.rs:61:26:61:66 | ...::new(...) | test.rs:61:13:61:22 | mut reader | provenance | | | test.rs:61:50:61:63 | ...::stdin | test.rs:61:50:61:65 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 | -| test.rs:61:50:61:65 | ...::stdin(...) | test.rs:61:26:61:66 | ...::new(...) | provenance | MaD:31 | +| test.rs:61:50:61:65 | ...::stdin(...) | test.rs:61:26:61:66 | ...::new(...) | provenance | MaD:32 | +| test.rs:62:9:62:14 | reader | test.rs:62:26:62:36 | [post] &mut buffer [&ref] | provenance | MaD:6 | | test.rs:62:26:62:36 | [post] &mut buffer [&ref] | test.rs:62:31:62:36 | [post] buffer | provenance | | | test.rs:62:31:62:36 | [post] buffer | test.rs:63:15:63:20 | buffer | provenance | | | test.rs:63:15:63:20 | buffer | test.rs:63:14:63:20 | &buffer | provenance | | -| test.rs:68:13:68:22 | mut reader | test.rs:69:33:69:43 | [post] &mut buffer [&ref] | provenance | MaD:7 | +| test.rs:68:13:68:22 | mut reader | test.rs:69:9:69:14 | reader | provenance | | | test.rs:68:26:68:66 | ...::new(...) | test.rs:68:13:68:22 | mut reader | provenance | | | test.rs:68:50:68:63 | ...::stdin | test.rs:68:50:68:65 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 | -| test.rs:68:50:68:65 | ...::stdin(...) | test.rs:68:26:68:66 | ...::new(...) | provenance | MaD:31 | +| test.rs:68:50:68:65 | ...::stdin(...) | test.rs:68:26:68:66 | ...::new(...) | provenance | MaD:32 | +| test.rs:69:9:69:14 | reader | test.rs:69:33:69:43 | [post] &mut buffer [&ref] | provenance | MaD:7 | | test.rs:69:33:69:43 | [post] &mut buffer [&ref] | test.rs:69:38:69:43 | [post] buffer | provenance | | | test.rs:69:38:69:43 | [post] buffer | test.rs:70:15:70:20 | buffer | provenance | | -| test.rs:69:38:69:43 | [post] buffer | test.rs:71:14:71:22 | buffer[0] | provenance | | +| test.rs:69:38:69:43 | [post] buffer | test.rs:71:14:71:19 | buffer | provenance | | | test.rs:70:15:70:20 | buffer | test.rs:70:14:70:20 | &buffer | provenance | | -| test.rs:75:13:75:28 | mut reader_split | test.rs:76:14:76:32 | reader_split.next() [Some, Ok] | provenance | MaD:3 | -| test.rs:75:13:75:28 | mut reader_split | test.rs:77:33:77:51 | reader_split.next() [Some, Ok] | provenance | MaD:3 | +| test.rs:71:14:71:19 | buffer | test.rs:71:14:71:22 | buffer[0] | provenance | MaD:3 | +| test.rs:75:13:75:28 | mut reader_split | test.rs:76:14:76:25 | reader_split | provenance | | +| test.rs:75:13:75:28 | mut reader_split | test.rs:77:33:77:44 | reader_split | provenance | | | test.rs:75:32:75:72 | ...::new(...) | test.rs:75:32:75:84 | ... .split(...) | provenance | MaD:8 | | test.rs:75:32:75:84 | ... .split(...) | test.rs:75:13:75:28 | mut reader_split | provenance | | | test.rs:75:56:75:69 | ...::stdin | test.rs:75:56:75:71 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 | -| test.rs:75:56:75:71 | ...::stdin(...) | test.rs:75:32:75:72 | ...::new(...) | provenance | MaD:31 | +| test.rs:75:56:75:71 | ...::stdin(...) | test.rs:75:32:75:72 | ...::new(...) | provenance | MaD:32 | +| test.rs:76:14:76:25 | reader_split | test.rs:76:14:76:32 | reader_split.next() [Some, Ok] | provenance | MaD:30 | | test.rs:76:14:76:32 | reader_split.next() [Some, Ok] | test.rs:76:14:76:41 | ... .unwrap() [Ok] | provenance | MaD:28 | | test.rs:76:14:76:41 | ... .unwrap() [Ok] | test.rs:76:14:76:50 | ... .unwrap() | provenance | MaD:29 | | test.rs:77:19:77:29 | Some(...) [Some, Ok] | test.rs:77:24:77:28 | chunk [Ok] | provenance | | -| test.rs:77:24:77:28 | chunk [Ok] | test.rs:78:18:78:31 | chunk.unwrap() | provenance | MaD:29 | +| test.rs:77:24:77:28 | chunk [Ok] | test.rs:78:18:78:22 | chunk [Ok] | provenance | | +| test.rs:77:33:77:44 | reader_split | test.rs:77:33:77:51 | reader_split.next() [Some, Ok] | provenance | MaD:30 | | test.rs:77:33:77:51 | reader_split.next() [Some, Ok] | test.rs:77:19:77:29 | Some(...) [Some, Ok] | provenance | | -| test.rs:83:13:83:18 | reader | test.rs:84:21:84:34 | reader.lines() | provenance | MaD:5 | +| test.rs:78:18:78:22 | chunk [Ok] | test.rs:78:18:78:31 | chunk.unwrap() | provenance | MaD:29 | +| test.rs:83:13:83:18 | reader | test.rs:84:21:84:26 | reader | provenance | | | test.rs:83:22:83:62 | ...::new(...) | test.rs:83:13:83:18 | reader | provenance | | | test.rs:83:46:83:59 | ...::stdin | test.rs:83:46:83:61 | ...::stdin(...) | provenance | Src:MaD:1 MaD:1 | -| test.rs:83:46:83:61 | ...::stdin(...) | test.rs:83:22:83:62 | ...::new(...) | provenance | MaD:31 | +| test.rs:83:46:83:61 | ...::stdin(...) | test.rs:83:22:83:62 | ...::new(...) | provenance | MaD:32 | +| test.rs:84:21:84:26 | reader | test.rs:84:21:84:34 | reader.lines() | provenance | MaD:5 | | test.rs:84:21:84:34 | reader.lines() | test.rs:85:18:85:21 | line | provenance | | -| test.rs:109:13:109:21 | mut stdin | test.rs:111:33:111:43 | [post] &mut buffer [&ref] | provenance | MaD:19 | +| test.rs:109:13:109:21 | mut stdin | test.rs:111:22:111:26 | stdin | provenance | | | test.rs:109:25:109:40 | ...::stdin | test.rs:109:25:109:42 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 | | test.rs:109:25:109:42 | ...::stdin(...) | test.rs:109:13:109:21 | mut stdin | provenance | | +| test.rs:111:22:111:26 | stdin | test.rs:111:33:111:43 | [post] &mut buffer [&ref] | provenance | MaD:19 | | test.rs:111:33:111:43 | [post] &mut buffer [&ref] | test.rs:111:38:111:43 | [post] buffer | provenance | | | test.rs:111:38:111:43 | [post] buffer | test.rs:112:15:112:20 | buffer | provenance | | | test.rs:112:15:112:20 | buffer | test.rs:112:14:112:20 | &buffer | provenance | | -| test.rs:116:13:116:21 | mut stdin | test.rs:118:40:118:50 | [post] &mut buffer [&ref] | provenance | MaD:25 | +| test.rs:116:13:116:21 | mut stdin | test.rs:118:22:118:26 | stdin | provenance | | | test.rs:116:25:116:40 | ...::stdin | test.rs:116:25:116:42 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 | | test.rs:116:25:116:42 | ...::stdin(...) | test.rs:116:13:116:21 | mut stdin | provenance | | +| test.rs:118:22:118:26 | stdin | test.rs:118:40:118:50 | [post] &mut buffer [&ref] | provenance | MaD:25 | | test.rs:118:40:118:50 | [post] &mut buffer [&ref] | test.rs:118:45:118:50 | [post] buffer | provenance | | | test.rs:118:45:118:50 | [post] buffer | test.rs:119:15:119:20 | buffer | provenance | | | test.rs:119:15:119:20 | buffer | test.rs:119:14:119:20 | &buffer | provenance | | -| test.rs:123:13:123:21 | mut stdin | test.rs:125:43:125:53 | [post] &mut buffer [&ref] | provenance | MaD:26 | +| test.rs:123:13:123:21 | mut stdin | test.rs:125:22:125:26 | stdin | provenance | | | test.rs:123:25:123:40 | ...::stdin | test.rs:123:25:123:42 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 | | test.rs:123:25:123:42 | ...::stdin(...) | test.rs:123:13:123:21 | mut stdin | provenance | | +| test.rs:125:22:125:26 | stdin | test.rs:125:43:125:53 | [post] &mut buffer [&ref] | provenance | MaD:26 | | test.rs:125:43:125:53 | [post] &mut buffer [&ref] | test.rs:125:48:125:53 | [post] buffer | provenance | | | test.rs:125:48:125:53 | [post] buffer | test.rs:126:15:126:20 | buffer | provenance | | | test.rs:126:15:126:20 | buffer | test.rs:126:14:126:20 | &buffer | provenance | | -| test.rs:130:13:130:21 | mut stdin | test.rs:132:26:132:36 | [post] &mut buffer [&ref] | provenance | MaD:21 | +| test.rs:130:13:130:21 | mut stdin | test.rs:132:9:132:13 | stdin | provenance | | | test.rs:130:25:130:40 | ...::stdin | test.rs:130:25:130:42 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 | | test.rs:130:25:130:42 | ...::stdin(...) | test.rs:130:13:130:21 | mut stdin | provenance | | +| test.rs:132:9:132:13 | stdin | test.rs:132:26:132:36 | [post] &mut buffer [&ref] | provenance | MaD:21 | | test.rs:132:26:132:36 | [post] &mut buffer [&ref] | test.rs:132:31:132:36 | [post] buffer | provenance | | | test.rs:132:31:132:36 | [post] buffer | test.rs:133:15:133:20 | buffer | provenance | | | test.rs:133:15:133:20 | buffer | test.rs:133:14:133:20 | &buffer | provenance | | -| test.rs:137:13:137:21 | mut stdin | test.rs:138:18:138:32 | stdin.read_u8() [future, Ok] | provenance | MaD:27 | -| test.rs:137:13:137:21 | mut stdin | test.rs:139:18:139:33 | stdin.read_i16() [future, Ok] | provenance | MaD:23 | -| test.rs:137:13:137:21 | mut stdin | test.rs:140:18:140:33 | stdin.read_f32() [future, Ok] | provenance | MaD:22 | -| test.rs:137:13:137:21 | mut stdin | test.rs:141:18:141:36 | stdin.read_i64_le() [future, Ok] | provenance | MaD:24 | +| test.rs:137:13:137:21 | mut stdin | test.rs:138:18:138:22 | stdin | provenance | | +| test.rs:137:13:137:21 | mut stdin | test.rs:139:18:139:22 | stdin | provenance | | +| test.rs:137:13:137:21 | mut stdin | test.rs:140:18:140:22 | stdin | provenance | | +| test.rs:137:13:137:21 | mut stdin | test.rs:141:18:141:22 | stdin | provenance | | | test.rs:137:25:137:40 | ...::stdin | test.rs:137:25:137:42 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 | | test.rs:137:25:137:42 | ...::stdin(...) | test.rs:137:13:137:21 | mut stdin | provenance | | | test.rs:138:13:138:14 | v1 | test.rs:142:14:142:15 | v1 | provenance | | +| test.rs:138:18:138:22 | stdin | test.rs:138:18:138:32 | stdin.read_u8() [future, Ok] | provenance | MaD:27 | | test.rs:138:18:138:32 | stdin.read_u8() [future, Ok] | test.rs:138:18:138:38 | await ... [Ok] | provenance | | | test.rs:138:18:138:38 | await ... [Ok] | test.rs:138:18:138:39 | TryExpr | provenance | | | test.rs:138:18:138:39 | TryExpr | test.rs:138:13:138:14 | v1 | provenance | | | test.rs:139:13:139:14 | v2 | test.rs:143:14:143:15 | v2 | provenance | | +| test.rs:139:18:139:22 | stdin | test.rs:139:18:139:33 | stdin.read_i16() [future, Ok] | provenance | MaD:23 | | test.rs:139:18:139:33 | stdin.read_i16() [future, Ok] | test.rs:139:18:139:39 | await ... [Ok] | provenance | | | test.rs:139:18:139:39 | await ... [Ok] | test.rs:139:18:139:40 | TryExpr | provenance | | | test.rs:139:18:139:40 | TryExpr | test.rs:139:13:139:14 | v2 | provenance | | | test.rs:140:13:140:14 | v3 | test.rs:144:14:144:15 | v3 | provenance | | +| test.rs:140:18:140:22 | stdin | test.rs:140:18:140:33 | stdin.read_f32() [future, Ok] | provenance | MaD:22 | | test.rs:140:18:140:33 | stdin.read_f32() [future, Ok] | test.rs:140:18:140:39 | await ... [Ok] | provenance | | | test.rs:140:18:140:39 | await ... [Ok] | test.rs:140:18:140:40 | TryExpr | provenance | | | test.rs:140:18:140:40 | TryExpr | test.rs:140:13:140:14 | v3 | provenance | | | test.rs:141:13:141:14 | v4 | test.rs:145:14:145:15 | v4 | provenance | | +| test.rs:141:18:141:22 | stdin | test.rs:141:18:141:36 | stdin.read_i64_le() [future, Ok] | provenance | MaD:24 | | test.rs:141:18:141:36 | stdin.read_i64_le() [future, Ok] | test.rs:141:18:141:42 | await ... [Ok] | provenance | | | test.rs:141:18:141:42 | await ... [Ok] | test.rs:141:18:141:43 | TryExpr | provenance | | | test.rs:141:18:141:43 | TryExpr | test.rs:141:13:141:14 | v4 | provenance | | -| test.rs:149:13:149:21 | mut stdin | test.rs:151:24:151:34 | [post] &mut buffer [&ref] | provenance | MaD:20 | +| test.rs:149:13:149:21 | mut stdin | test.rs:151:9:151:13 | stdin | provenance | | | test.rs:149:25:149:40 | ...::stdin | test.rs:149:25:149:42 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 | | test.rs:149:25:149:42 | ...::stdin(...) | test.rs:149:13:149:21 | mut stdin | provenance | | +| test.rs:151:9:151:13 | stdin | test.rs:151:24:151:34 | [post] &mut buffer [&ref] | provenance | MaD:20 | | test.rs:151:24:151:34 | [post] &mut buffer [&ref] | test.rs:151:29:151:34 | [post] buffer | provenance | | | test.rs:151:29:151:34 | [post] buffer | test.rs:152:15:152:20 | buffer | provenance | | | test.rs:152:15:152:20 | buffer | test.rs:152:14:152:20 | &buffer | provenance | | -| test.rs:158:13:158:22 | mut reader | test.rs:159:20:159:36 | reader.fill_buf() [future, Ok] | provenance | MaD:14 | +| test.rs:158:13:158:22 | mut reader | test.rs:159:20:159:25 | reader | provenance | | | test.rs:158:26:158:70 | ...::new(...) | test.rs:158:13:158:22 | mut reader | provenance | | | test.rs:158:52:158:67 | ...::stdin | test.rs:158:52:158:69 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 | -| test.rs:158:52:158:69 | ...::stdin(...) | test.rs:158:26:158:70 | ...::new(...) | provenance | MaD:37 | +| test.rs:158:52:158:69 | ...::stdin(...) | test.rs:158:26:158:70 | ...::new(...) | provenance | MaD:35 | | test.rs:159:13:159:16 | data | test.rs:160:15:160:18 | data | provenance | | +| test.rs:159:20:159:25 | reader | test.rs:159:20:159:36 | reader.fill_buf() [future, Ok] | provenance | MaD:14 | | test.rs:159:20:159:36 | reader.fill_buf() [future, Ok] | test.rs:159:20:159:42 | await ... [Ok] | provenance | | | test.rs:159:20:159:42 | await ... [Ok] | test.rs:159:20:159:43 | TryExpr | provenance | | | test.rs:159:20:159:43 | TryExpr | test.rs:159:13:159:16 | data | provenance | | | test.rs:160:15:160:18 | data | test.rs:160:14:160:18 | &data | provenance | | -| test.rs:164:13:164:18 | reader | test.rs:165:20:165:34 | reader.buffer() | provenance | MaD:36 | +| test.rs:164:13:164:18 | reader | test.rs:165:20:165:25 | reader | provenance | | | test.rs:164:22:164:66 | ...::new(...) | test.rs:164:13:164:18 | reader | provenance | | | test.rs:164:48:164:63 | ...::stdin | test.rs:164:48:164:65 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 | -| test.rs:164:48:164:65 | ...::stdin(...) | test.rs:164:22:164:66 | ...::new(...) | provenance | MaD:37 | -| test.rs:165:13:165:16 | data | test.rs:166:15:166:18 | data | provenance | | -| test.rs:165:20:165:34 | reader.buffer() | test.rs:165:13:165:16 | data | provenance | | -| test.rs:166:15:166:18 | data | test.rs:166:14:166:18 | &data | provenance | | -| test.rs:171:13:171:22 | mut reader | test.rs:172:26:172:36 | [post] &mut buffer [&ref] | provenance | MaD:16 | +| test.rs:164:48:164:65 | ...::stdin(...) | test.rs:164:22:164:66 | ...::new(...) | provenance | MaD:35 | +| test.rs:165:13:165:16 | data [&ref] | test.rs:166:15:166:18 | data [&ref] | provenance | | +| test.rs:165:20:165:25 | reader | test.rs:165:20:165:34 | reader.buffer() [&ref] | provenance | MaD:34 | +| test.rs:165:20:165:34 | reader.buffer() [&ref] | test.rs:165:13:165:16 | data [&ref] | provenance | | +| test.rs:166:15:166:18 | data [&ref] | test.rs:166:14:166:18 | &data | provenance | | +| test.rs:171:13:171:22 | mut reader | test.rs:172:9:172:14 | reader | provenance | | | test.rs:171:26:171:70 | ...::new(...) | test.rs:171:13:171:22 | mut reader | provenance | | | test.rs:171:52:171:67 | ...::stdin | test.rs:171:52:171:69 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 | -| test.rs:171:52:171:69 | ...::stdin(...) | test.rs:171:26:171:70 | ...::new(...) | provenance | MaD:37 | +| test.rs:171:52:171:69 | ...::stdin(...) | test.rs:171:26:171:70 | ...::new(...) | provenance | MaD:35 | +| test.rs:172:9:172:14 | reader | test.rs:172:26:172:36 | [post] &mut buffer [&ref] | provenance | MaD:16 | | test.rs:172:26:172:36 | [post] &mut buffer [&ref] | test.rs:172:31:172:36 | [post] buffer | provenance | | | test.rs:172:31:172:36 | [post] buffer | test.rs:173:15:173:20 | buffer | provenance | | | test.rs:173:15:173:20 | buffer | test.rs:173:14:173:20 | &buffer | provenance | | -| test.rs:178:13:178:22 | mut reader | test.rs:179:33:179:43 | [post] &mut buffer [&ref] | provenance | MaD:17 | +| test.rs:178:13:178:22 | mut reader | test.rs:179:9:179:14 | reader | provenance | | | test.rs:178:26:178:70 | ...::new(...) | test.rs:178:13:178:22 | mut reader | provenance | | | test.rs:178:52:178:67 | ...::stdin | test.rs:178:52:178:69 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 | -| test.rs:178:52:178:69 | ...::stdin(...) | test.rs:178:26:178:70 | ...::new(...) | provenance | MaD:37 | +| test.rs:178:52:178:69 | ...::stdin(...) | test.rs:178:26:178:70 | ...::new(...) | provenance | MaD:35 | +| test.rs:179:9:179:14 | reader | test.rs:179:33:179:43 | [post] &mut buffer [&ref] | provenance | MaD:17 | | test.rs:179:33:179:43 | [post] &mut buffer [&ref] | test.rs:179:38:179:43 | [post] buffer | provenance | | | test.rs:179:38:179:43 | [post] buffer | test.rs:180:15:180:20 | buffer | provenance | | -| test.rs:179:38:179:43 | [post] buffer | test.rs:181:14:181:22 | buffer[0] | provenance | | +| test.rs:179:38:179:43 | [post] buffer | test.rs:181:14:181:19 | buffer | provenance | | | test.rs:180:15:180:20 | buffer | test.rs:180:14:180:20 | &buffer | provenance | | -| test.rs:185:13:185:28 | mut reader_split | test.rs:186:14:186:40 | reader_split.next_segment() [future, Ok, Some] | provenance | MaD:39 | -| test.rs:185:13:185:28 | mut reader_split | test.rs:187:33:187:59 | reader_split.next_segment() [future, Ok, Some] | provenance | MaD:39 | +| test.rs:181:14:181:19 | buffer | test.rs:181:14:181:22 | buffer[0] | provenance | MaD:3 | +| test.rs:185:13:185:28 | mut reader_split | test.rs:186:14:186:25 | reader_split | provenance | | +| test.rs:185:13:185:28 | mut reader_split | test.rs:187:33:187:44 | reader_split | provenance | | | test.rs:185:32:185:76 | ...::new(...) | test.rs:185:32:185:88 | ... .split(...) | provenance | MaD:18 | | test.rs:185:32:185:88 | ... .split(...) | test.rs:185:13:185:28 | mut reader_split | provenance | | | test.rs:185:58:185:73 | ...::stdin | test.rs:185:58:185:75 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 | -| test.rs:185:58:185:75 | ...::stdin(...) | test.rs:185:32:185:76 | ...::new(...) | provenance | MaD:37 | +| test.rs:185:58:185:75 | ...::stdin(...) | test.rs:185:32:185:76 | ...::new(...) | provenance | MaD:35 | +| test.rs:186:14:186:25 | reader_split | test.rs:186:14:186:40 | reader_split.next_segment() [future, Ok, Some] | provenance | MaD:37 | | test.rs:186:14:186:40 | reader_split.next_segment() [future, Ok, Some] | test.rs:186:14:186:46 | await ... [Ok, Some] | provenance | | | test.rs:186:14:186:46 | await ... [Ok, Some] | test.rs:186:14:186:47 | TryExpr [Some] | provenance | | | test.rs:186:14:186:47 | TryExpr [Some] | test.rs:186:14:186:56 | ... .unwrap() | provenance | MaD:28 | | test.rs:187:19:187:29 | Some(...) [Some] | test.rs:187:24:187:28 | chunk | provenance | | | test.rs:187:24:187:28 | chunk | test.rs:188:18:188:22 | chunk | provenance | | +| test.rs:187:33:187:44 | reader_split | test.rs:187:33:187:59 | reader_split.next_segment() [future, Ok, Some] | provenance | MaD:37 | | test.rs:187:33:187:59 | reader_split.next_segment() [future, Ok, Some] | test.rs:187:33:187:65 | await ... [Ok, Some] | provenance | | | test.rs:187:33:187:65 | await ... [Ok, Some] | test.rs:187:33:187:66 | TryExpr [Some] | provenance | | | test.rs:187:33:187:66 | TryExpr [Some] | test.rs:187:19:187:29 | Some(...) [Some] | provenance | | -| test.rs:193:13:193:18 | reader | test.rs:194:25:194:38 | reader.lines() | provenance | MaD:15 | +| test.rs:193:13:193:18 | reader | test.rs:194:25:194:30 | reader | provenance | | | test.rs:193:22:193:66 | ...::new(...) | test.rs:193:13:193:18 | reader | provenance | | | test.rs:193:48:193:63 | ...::stdin | test.rs:193:48:193:65 | ...::stdin(...) | provenance | Src:MaD:2 MaD:2 | -| test.rs:193:48:193:65 | ...::stdin(...) | test.rs:193:22:193:66 | ...::new(...) | provenance | MaD:37 | -| test.rs:194:13:194:21 | mut lines | test.rs:195:14:195:30 | lines.next_line() [future, Ok, Some] | provenance | MaD:38 | -| test.rs:194:13:194:21 | mut lines | test.rs:196:32:196:48 | lines.next_line() [future, Ok, Some] | provenance | MaD:38 | +| test.rs:193:48:193:65 | ...::stdin(...) | test.rs:193:22:193:66 | ...::new(...) | provenance | MaD:35 | +| test.rs:194:13:194:21 | mut lines | test.rs:195:14:195:18 | lines | provenance | | +| test.rs:194:13:194:21 | mut lines | test.rs:196:32:196:36 | lines | provenance | | +| test.rs:194:25:194:30 | reader | test.rs:194:25:194:38 | reader.lines() | provenance | MaD:15 | | test.rs:194:25:194:38 | reader.lines() | test.rs:194:13:194:21 | mut lines | provenance | | +| test.rs:195:14:195:18 | lines | test.rs:195:14:195:30 | lines.next_line() [future, Ok, Some] | provenance | MaD:36 | | test.rs:195:14:195:30 | lines.next_line() [future, Ok, Some] | test.rs:195:14:195:36 | await ... [Ok, Some] | provenance | | | test.rs:195:14:195:36 | await ... [Ok, Some] | test.rs:195:14:195:37 | TryExpr [Some] | provenance | | | test.rs:195:14:195:37 | TryExpr [Some] | test.rs:195:14:195:46 | ... .unwrap() | provenance | MaD:28 | | test.rs:196:19:196:28 | Some(...) [Some] | test.rs:196:24:196:27 | line | provenance | | | test.rs:196:24:196:27 | line | test.rs:197:18:197:21 | line | provenance | | +| test.rs:196:32:196:36 | lines | test.rs:196:32:196:48 | lines.next_line() [future, Ok, Some] | provenance | MaD:36 | | test.rs:196:32:196:48 | lines.next_line() [future, Ok, Some] | test.rs:196:32:196:54 | await ... [Ok, Some] | provenance | | | test.rs:196:32:196:54 | await ... [Ok, Some] | test.rs:196:32:196:55 | TryExpr [Some] | provenance | | | test.rs:196:32:196:55 | TryExpr [Some] | test.rs:196:19:196:28 | Some(...) [Some] | provenance | | nodes | test.rs:13:22:13:35 | ...::stdin | semmle.label | ...::stdin | | test.rs:13:22:13:37 | ...::stdin(...) | semmle.label | ...::stdin(...) | -| test.rs:13:44:13:54 | [post] &mut buffer | semmle.label | [post] &mut buffer | | test.rs:13:44:13:54 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:13:49:13:54 | [post] buffer | semmle.label | [post] buffer | | test.rs:14:14:14:20 | &buffer | semmle.label | &buffer | @@ -248,7 +267,6 @@ nodes | test.rs:20:15:20:20 | buffer | semmle.label | buffer | | test.rs:25:22:25:35 | ...::stdin | semmle.label | ...::stdin | | test.rs:25:22:25:37 | ...::stdin(...) | semmle.label | ...::stdin(...) | -| test.rs:25:54:25:64 | [post] &mut buffer | semmle.label | [post] &mut buffer | | test.rs:25:54:25:64 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:25:59:25:64 | [post] buffer | semmle.label | [post] buffer | | test.rs:26:14:26:20 | &buffer | semmle.label | &buffer | @@ -262,7 +280,6 @@ nodes | test.rs:32:15:32:20 | buffer | semmle.label | buffer | | test.rs:37:9:37:22 | ...::stdin | semmle.label | ...::stdin | | test.rs:37:9:37:24 | ...::stdin(...) | semmle.label | ...::stdin(...) | -| test.rs:37:37:37:47 | [post] &mut buffer | semmle.label | [post] &mut buffer | | test.rs:37:37:37:47 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:37:42:37:47 | [post] buffer | semmle.label | [post] buffer | | test.rs:38:14:38:20 | &buffer | semmle.label | &buffer | @@ -276,6 +293,7 @@ nodes | test.rs:48:50:48:63 | ...::stdin | semmle.label | ...::stdin | | test.rs:48:50:48:65 | ...::stdin(...) | semmle.label | ...::stdin(...) | | test.rs:49:13:49:16 | data | semmle.label | data | +| test.rs:49:20:49:25 | reader | semmle.label | reader | | test.rs:49:20:49:36 | reader.fill_buf() [Ok] | semmle.label | reader.fill_buf() [Ok] | | test.rs:49:20:49:37 | TryExpr | semmle.label | TryExpr | | test.rs:50:14:50:18 | &data | semmle.label | &data | @@ -284,14 +302,16 @@ nodes | test.rs:54:22:54:62 | ...::new(...) | semmle.label | ...::new(...) | | test.rs:54:46:54:59 | ...::stdin | semmle.label | ...::stdin | | test.rs:54:46:54:61 | ...::stdin(...) | semmle.label | ...::stdin(...) | -| test.rs:55:13:55:16 | data | semmle.label | data | -| test.rs:55:20:55:34 | reader.buffer() | semmle.label | reader.buffer() | +| test.rs:55:13:55:16 | data [&ref] | semmle.label | data [&ref] | +| test.rs:55:20:55:25 | reader | semmle.label | reader | +| test.rs:55:20:55:34 | reader.buffer() [&ref] | semmle.label | reader.buffer() [&ref] | | test.rs:56:14:56:18 | &data | semmle.label | &data | -| test.rs:56:15:56:18 | data | semmle.label | data | +| test.rs:56:15:56:18 | data [&ref] | semmle.label | data [&ref] | | test.rs:61:13:61:22 | mut reader | semmle.label | mut reader | | test.rs:61:26:61:66 | ...::new(...) | semmle.label | ...::new(...) | | test.rs:61:50:61:63 | ...::stdin | semmle.label | ...::stdin | | test.rs:61:50:61:65 | ...::stdin(...) | semmle.label | ...::stdin(...) | +| test.rs:62:9:62:14 | reader | semmle.label | reader | | test.rs:62:26:62:36 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:62:31:62:36 | [post] buffer | semmle.label | [post] buffer | | test.rs:63:14:63:20 | &buffer | semmle.label | &buffer | @@ -300,32 +320,39 @@ nodes | test.rs:68:26:68:66 | ...::new(...) | semmle.label | ...::new(...) | | test.rs:68:50:68:63 | ...::stdin | semmle.label | ...::stdin | | test.rs:68:50:68:65 | ...::stdin(...) | semmle.label | ...::stdin(...) | +| test.rs:69:9:69:14 | reader | semmle.label | reader | | test.rs:69:33:69:43 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:69:38:69:43 | [post] buffer | semmle.label | [post] buffer | | test.rs:70:14:70:20 | &buffer | semmle.label | &buffer | | test.rs:70:15:70:20 | buffer | semmle.label | buffer | +| test.rs:71:14:71:19 | buffer | semmle.label | buffer | | test.rs:71:14:71:22 | buffer[0] | semmle.label | buffer[0] | | test.rs:75:13:75:28 | mut reader_split | semmle.label | mut reader_split | | test.rs:75:32:75:72 | ...::new(...) | semmle.label | ...::new(...) | | test.rs:75:32:75:84 | ... .split(...) | semmle.label | ... .split(...) | | test.rs:75:56:75:69 | ...::stdin | semmle.label | ...::stdin | | test.rs:75:56:75:71 | ...::stdin(...) | semmle.label | ...::stdin(...) | +| test.rs:76:14:76:25 | reader_split | semmle.label | reader_split | | test.rs:76:14:76:32 | reader_split.next() [Some, Ok] | semmle.label | reader_split.next() [Some, Ok] | | test.rs:76:14:76:41 | ... .unwrap() [Ok] | semmle.label | ... .unwrap() [Ok] | | test.rs:76:14:76:50 | ... .unwrap() | semmle.label | ... .unwrap() | | test.rs:77:19:77:29 | Some(...) [Some, Ok] | semmle.label | Some(...) [Some, Ok] | | test.rs:77:24:77:28 | chunk [Ok] | semmle.label | chunk [Ok] | +| test.rs:77:33:77:44 | reader_split | semmle.label | reader_split | | test.rs:77:33:77:51 | reader_split.next() [Some, Ok] | semmle.label | reader_split.next() [Some, Ok] | +| test.rs:78:18:78:22 | chunk [Ok] | semmle.label | chunk [Ok] | | test.rs:78:18:78:31 | chunk.unwrap() | semmle.label | chunk.unwrap() | | test.rs:83:13:83:18 | reader | semmle.label | reader | | test.rs:83:22:83:62 | ...::new(...) | semmle.label | ...::new(...) | | test.rs:83:46:83:59 | ...::stdin | semmle.label | ...::stdin | | test.rs:83:46:83:61 | ...::stdin(...) | semmle.label | ...::stdin(...) | +| test.rs:84:21:84:26 | reader | semmle.label | reader | | test.rs:84:21:84:34 | reader.lines() | semmle.label | reader.lines() | | test.rs:85:18:85:21 | line | semmle.label | line | | test.rs:109:13:109:21 | mut stdin | semmle.label | mut stdin | | test.rs:109:25:109:40 | ...::stdin | semmle.label | ...::stdin | | test.rs:109:25:109:42 | ...::stdin(...) | semmle.label | ...::stdin(...) | +| test.rs:111:22:111:26 | stdin | semmle.label | stdin | | test.rs:111:33:111:43 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:111:38:111:43 | [post] buffer | semmle.label | [post] buffer | | test.rs:112:14:112:20 | &buffer | semmle.label | &buffer | @@ -333,6 +360,7 @@ nodes | test.rs:116:13:116:21 | mut stdin | semmle.label | mut stdin | | test.rs:116:25:116:40 | ...::stdin | semmle.label | ...::stdin | | test.rs:116:25:116:42 | ...::stdin(...) | semmle.label | ...::stdin(...) | +| test.rs:118:22:118:26 | stdin | semmle.label | stdin | | test.rs:118:40:118:50 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:118:45:118:50 | [post] buffer | semmle.label | [post] buffer | | test.rs:119:14:119:20 | &buffer | semmle.label | &buffer | @@ -340,6 +368,7 @@ nodes | test.rs:123:13:123:21 | mut stdin | semmle.label | mut stdin | | test.rs:123:25:123:40 | ...::stdin | semmle.label | ...::stdin | | test.rs:123:25:123:42 | ...::stdin(...) | semmle.label | ...::stdin(...) | +| test.rs:125:22:125:26 | stdin | semmle.label | stdin | | test.rs:125:43:125:53 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:125:48:125:53 | [post] buffer | semmle.label | [post] buffer | | test.rs:126:14:126:20 | &buffer | semmle.label | &buffer | @@ -347,6 +376,7 @@ nodes | test.rs:130:13:130:21 | mut stdin | semmle.label | mut stdin | | test.rs:130:25:130:40 | ...::stdin | semmle.label | ...::stdin | | test.rs:130:25:130:42 | ...::stdin(...) | semmle.label | ...::stdin(...) | +| test.rs:132:9:132:13 | stdin | semmle.label | stdin | | test.rs:132:26:132:36 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:132:31:132:36 | [post] buffer | semmle.label | [post] buffer | | test.rs:133:14:133:20 | &buffer | semmle.label | &buffer | @@ -355,18 +385,22 @@ nodes | test.rs:137:25:137:40 | ...::stdin | semmle.label | ...::stdin | | test.rs:137:25:137:42 | ...::stdin(...) | semmle.label | ...::stdin(...) | | test.rs:138:13:138:14 | v1 | semmle.label | v1 | +| test.rs:138:18:138:22 | stdin | semmle.label | stdin | | test.rs:138:18:138:32 | stdin.read_u8() [future, Ok] | semmle.label | stdin.read_u8() [future, Ok] | | test.rs:138:18:138:38 | await ... [Ok] | semmle.label | await ... [Ok] | | test.rs:138:18:138:39 | TryExpr | semmle.label | TryExpr | | test.rs:139:13:139:14 | v2 | semmle.label | v2 | +| test.rs:139:18:139:22 | stdin | semmle.label | stdin | | test.rs:139:18:139:33 | stdin.read_i16() [future, Ok] | semmle.label | stdin.read_i16() [future, Ok] | | test.rs:139:18:139:39 | await ... [Ok] | semmle.label | await ... [Ok] | | test.rs:139:18:139:40 | TryExpr | semmle.label | TryExpr | | test.rs:140:13:140:14 | v3 | semmle.label | v3 | +| test.rs:140:18:140:22 | stdin | semmle.label | stdin | | test.rs:140:18:140:33 | stdin.read_f32() [future, Ok] | semmle.label | stdin.read_f32() [future, Ok] | | test.rs:140:18:140:39 | await ... [Ok] | semmle.label | await ... [Ok] | | test.rs:140:18:140:40 | TryExpr | semmle.label | TryExpr | | test.rs:141:13:141:14 | v4 | semmle.label | v4 | +| test.rs:141:18:141:22 | stdin | semmle.label | stdin | | test.rs:141:18:141:36 | stdin.read_i64_le() [future, Ok] | semmle.label | stdin.read_i64_le() [future, Ok] | | test.rs:141:18:141:42 | await ... [Ok] | semmle.label | await ... [Ok] | | test.rs:141:18:141:43 | TryExpr | semmle.label | TryExpr | @@ -377,6 +411,7 @@ nodes | test.rs:149:13:149:21 | mut stdin | semmle.label | mut stdin | | test.rs:149:25:149:40 | ...::stdin | semmle.label | ...::stdin | | test.rs:149:25:149:42 | ...::stdin(...) | semmle.label | ...::stdin(...) | +| test.rs:151:9:151:13 | stdin | semmle.label | stdin | | test.rs:151:24:151:34 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:151:29:151:34 | [post] buffer | semmle.label | [post] buffer | | test.rs:152:14:152:20 | &buffer | semmle.label | &buffer | @@ -386,6 +421,7 @@ nodes | test.rs:158:52:158:67 | ...::stdin | semmle.label | ...::stdin | | test.rs:158:52:158:69 | ...::stdin(...) | semmle.label | ...::stdin(...) | | test.rs:159:13:159:16 | data | semmle.label | data | +| test.rs:159:20:159:25 | reader | semmle.label | reader | | test.rs:159:20:159:36 | reader.fill_buf() [future, Ok] | semmle.label | reader.fill_buf() [future, Ok] | | test.rs:159:20:159:42 | await ... [Ok] | semmle.label | await ... [Ok] | | test.rs:159:20:159:43 | TryExpr | semmle.label | TryExpr | @@ -395,14 +431,16 @@ nodes | test.rs:164:22:164:66 | ...::new(...) | semmle.label | ...::new(...) | | test.rs:164:48:164:63 | ...::stdin | semmle.label | ...::stdin | | test.rs:164:48:164:65 | ...::stdin(...) | semmle.label | ...::stdin(...) | -| test.rs:165:13:165:16 | data | semmle.label | data | -| test.rs:165:20:165:34 | reader.buffer() | semmle.label | reader.buffer() | +| test.rs:165:13:165:16 | data [&ref] | semmle.label | data [&ref] | +| test.rs:165:20:165:25 | reader | semmle.label | reader | +| test.rs:165:20:165:34 | reader.buffer() [&ref] | semmle.label | reader.buffer() [&ref] | | test.rs:166:14:166:18 | &data | semmle.label | &data | -| test.rs:166:15:166:18 | data | semmle.label | data | +| test.rs:166:15:166:18 | data [&ref] | semmle.label | data [&ref] | | test.rs:171:13:171:22 | mut reader | semmle.label | mut reader | | test.rs:171:26:171:70 | ...::new(...) | semmle.label | ...::new(...) | | test.rs:171:52:171:67 | ...::stdin | semmle.label | ...::stdin | | test.rs:171:52:171:69 | ...::stdin(...) | semmle.label | ...::stdin(...) | +| test.rs:172:9:172:14 | reader | semmle.label | reader | | test.rs:172:26:172:36 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:172:31:172:36 | [post] buffer | semmle.label | [post] buffer | | test.rs:173:14:173:20 | &buffer | semmle.label | &buffer | @@ -411,22 +449,26 @@ nodes | test.rs:178:26:178:70 | ...::new(...) | semmle.label | ...::new(...) | | test.rs:178:52:178:67 | ...::stdin | semmle.label | ...::stdin | | test.rs:178:52:178:69 | ...::stdin(...) | semmle.label | ...::stdin(...) | +| test.rs:179:9:179:14 | reader | semmle.label | reader | | test.rs:179:33:179:43 | [post] &mut buffer [&ref] | semmle.label | [post] &mut buffer [&ref] | | test.rs:179:38:179:43 | [post] buffer | semmle.label | [post] buffer | | test.rs:180:14:180:20 | &buffer | semmle.label | &buffer | | test.rs:180:15:180:20 | buffer | semmle.label | buffer | +| test.rs:181:14:181:19 | buffer | semmle.label | buffer | | test.rs:181:14:181:22 | buffer[0] | semmle.label | buffer[0] | | test.rs:185:13:185:28 | mut reader_split | semmle.label | mut reader_split | | test.rs:185:32:185:76 | ...::new(...) | semmle.label | ...::new(...) | | test.rs:185:32:185:88 | ... .split(...) | semmle.label | ... .split(...) | | test.rs:185:58:185:73 | ...::stdin | semmle.label | ...::stdin | | test.rs:185:58:185:75 | ...::stdin(...) | semmle.label | ...::stdin(...) | +| test.rs:186:14:186:25 | reader_split | semmle.label | reader_split | | test.rs:186:14:186:40 | reader_split.next_segment() [future, Ok, Some] | semmle.label | reader_split.next_segment() [future, Ok, Some] | | test.rs:186:14:186:46 | await ... [Ok, Some] | semmle.label | await ... [Ok, Some] | | test.rs:186:14:186:47 | TryExpr [Some] | semmle.label | TryExpr [Some] | | test.rs:186:14:186:56 | ... .unwrap() | semmle.label | ... .unwrap() | | test.rs:187:19:187:29 | Some(...) [Some] | semmle.label | Some(...) [Some] | | test.rs:187:24:187:28 | chunk | semmle.label | chunk | +| test.rs:187:33:187:44 | reader_split | semmle.label | reader_split | | test.rs:187:33:187:59 | reader_split.next_segment() [future, Ok, Some] | semmle.label | reader_split.next_segment() [future, Ok, Some] | | test.rs:187:33:187:65 | await ... [Ok, Some] | semmle.label | await ... [Ok, Some] | | test.rs:187:33:187:66 | TryExpr [Some] | semmle.label | TryExpr [Some] | @@ -436,13 +478,16 @@ nodes | test.rs:193:48:193:63 | ...::stdin | semmle.label | ...::stdin | | test.rs:193:48:193:65 | ...::stdin(...) | semmle.label | ...::stdin(...) | | test.rs:194:13:194:21 | mut lines | semmle.label | mut lines | +| test.rs:194:25:194:30 | reader | semmle.label | reader | | test.rs:194:25:194:38 | reader.lines() | semmle.label | reader.lines() | +| test.rs:195:14:195:18 | lines | semmle.label | lines | | test.rs:195:14:195:30 | lines.next_line() [future, Ok, Some] | semmle.label | lines.next_line() [future, Ok, Some] | | test.rs:195:14:195:36 | await ... [Ok, Some] | semmle.label | await ... [Ok, Some] | | test.rs:195:14:195:37 | TryExpr [Some] | semmle.label | TryExpr [Some] | | test.rs:195:14:195:46 | ... .unwrap() | semmle.label | ... .unwrap() | | test.rs:196:19:196:28 | Some(...) [Some] | semmle.label | Some(...) [Some] | | test.rs:196:24:196:27 | line | semmle.label | line | +| test.rs:196:32:196:36 | lines | semmle.label | lines | | test.rs:196:32:196:48 | lines.next_line() [future, Ok, Some] | semmle.label | lines.next_line() [future, Ok, Some] | | test.rs:196:32:196:54 | await ... [Ok, Some] | semmle.label | await ... [Ok, Some] | | test.rs:196:32:196:55 | TryExpr [Some] | semmle.label | TryExpr [Some] | diff --git a/rust/ql/test/library-tests/dataflow/sources/web_frameworks/InlineFlow.expected b/rust/ql/test/library-tests/dataflow/sources/web_frameworks/InlineFlow.expected index 24a0cf78aec..1b1e8c7fc7a 100644 --- a/rust/ql/test/library-tests/dataflow/sources/web_frameworks/InlineFlow.expected +++ b/rust/ql/test/library-tests/dataflow/sources/web_frameworks/InlineFlow.expected @@ -12,37 +12,28 @@ models | 11 | Summary: ::as_str; Argument[self]; ReturnValue; value | edges | test.rs:11:31:11:31 | a | test.rs:13:14:13:14 | a | provenance | | -| test.rs:11:31:11:31 | a | test.rs:13:14:13:23 | a.as_str() | provenance | MaD:11 | | test.rs:11:31:11:31 | a | test.rs:14:14:14:14 | a | provenance | | -| test.rs:11:31:11:31 | a | test.rs:14:14:14:25 | a.as_bytes() | provenance | MaD:10 | | test.rs:11:31:11:31 | a | test.rs:15:14:15:14 | a | provenance | | | test.rs:13:14:13:14 | a | test.rs:13:14:13:23 | a.as_str() | provenance | MaD:11 | | test.rs:14:14:14:14 | a | test.rs:14:14:14:25 | a.as_bytes() | provenance | MaD:10 | | test.rs:68:15:68:15 | a | test.rs:70:14:70:14 | a | provenance | | -| test.rs:98:9:98:31 | ...: ...::Path::<...> | test.rs:100:17:100:33 | path.into_inner() | provenance | MaD:9 | -| test.rs:98:9:98:31 | ...: ...::Path::<...> | test.rs:100:17:100:33 | path.into_inner() [tuple.0] | provenance | MaD:6 | -| test.rs:98:9:98:31 | ...: ...::Path::<...> | test.rs:100:17:100:33 | path.into_inner() [tuple.1] | provenance | MaD:7 | -| test.rs:98:9:98:31 | ...: ...::Path::<...> | test.rs:100:17:100:33 | path.into_inner() [tuple.2] | provenance | MaD:8 | +| test.rs:98:9:98:31 | ...: ...::Path::<...> | test.rs:100:17:100:20 | path | provenance | | | test.rs:100:13:100:13 | a | test.rs:101:14:101:14 | a | provenance | | -| test.rs:100:13:100:13 | a | test.rs:101:14:101:23 | a.as_str() | provenance | MaD:11 | | test.rs:100:13:100:13 | a | test.rs:102:14:102:14 | a | provenance | | -| test.rs:100:13:100:13 | a | test.rs:102:14:102:25 | a.as_bytes() | provenance | MaD:10 | | test.rs:100:13:100:13 | a | test.rs:103:14:103:14 | a | provenance | | | test.rs:100:13:100:13 | a [tuple.0] | test.rs:101:14:101:14 | a [tuple.0] | provenance | | -| test.rs:100:13:100:13 | a [tuple.0] | test.rs:101:14:101:23 | a.as_str() | provenance | MaD:11 | | test.rs:100:13:100:13 | a [tuple.0] | test.rs:102:14:102:14 | a [tuple.0] | provenance | | -| test.rs:100:13:100:13 | a [tuple.0] | test.rs:102:14:102:25 | a.as_bytes() | provenance | MaD:10 | | test.rs:100:13:100:13 | a [tuple.0] | test.rs:103:14:103:14 | a | provenance | | | test.rs:100:13:100:13 | a [tuple.1] | test.rs:101:14:101:14 | a [tuple.1] | provenance | | -| test.rs:100:13:100:13 | a [tuple.1] | test.rs:101:14:101:23 | a.as_str() | provenance | MaD:11 | | test.rs:100:13:100:13 | a [tuple.1] | test.rs:102:14:102:14 | a [tuple.1] | provenance | | -| test.rs:100:13:100:13 | a [tuple.1] | test.rs:102:14:102:25 | a.as_bytes() | provenance | MaD:10 | | test.rs:100:13:100:13 | a [tuple.1] | test.rs:103:14:103:14 | a | provenance | | | test.rs:100:13:100:13 | a [tuple.2] | test.rs:101:14:101:14 | a [tuple.2] | provenance | | -| test.rs:100:13:100:13 | a [tuple.2] | test.rs:101:14:101:23 | a.as_str() | provenance | MaD:11 | | test.rs:100:13:100:13 | a [tuple.2] | test.rs:102:14:102:14 | a [tuple.2] | provenance | | -| test.rs:100:13:100:13 | a [tuple.2] | test.rs:102:14:102:25 | a.as_bytes() | provenance | MaD:10 | | test.rs:100:13:100:13 | a [tuple.2] | test.rs:103:14:103:14 | a | provenance | | +| test.rs:100:17:100:20 | path | test.rs:100:17:100:33 | path.into_inner() | provenance | MaD:9 | +| test.rs:100:17:100:20 | path | test.rs:100:17:100:33 | path.into_inner() [tuple.0] | provenance | MaD:6 | +| test.rs:100:17:100:20 | path | test.rs:100:17:100:33 | path.into_inner() [tuple.1] | provenance | MaD:7 | +| test.rs:100:17:100:20 | path | test.rs:100:17:100:33 | path.into_inner() [tuple.2] | provenance | MaD:8 | | test.rs:100:17:100:33 | path.into_inner() | test.rs:100:13:100:13 | a | provenance | | | test.rs:100:17:100:33 | path.into_inner() [tuple.0] | test.rs:100:13:100:13 | a [tuple.0] | provenance | | | test.rs:100:17:100:33 | path.into_inner() [tuple.1] | test.rs:100:13:100:13 | a [tuple.1] | provenance | | @@ -55,23 +46,25 @@ edges | test.rs:102:14:102:14 | a [tuple.0] | test.rs:102:14:102:25 | a.as_bytes() | provenance | MaD:10 | | test.rs:102:14:102:14 | a [tuple.1] | test.rs:102:14:102:25 | a.as_bytes() | provenance | MaD:10 | | test.rs:102:14:102:14 | a [tuple.2] | test.rs:102:14:102:25 | a.as_bytes() | provenance | MaD:10 | -| test.rs:109:9:109:41 | ...: ...::Path::<...> | test.rs:111:22:111:38 | path.into_inner() [tuple.0] | provenance | MaD:6 | -| test.rs:109:9:109:41 | ...: ...::Path::<...> | test.rs:111:22:111:38 | path.into_inner() [tuple.1] | provenance | MaD:7 | +| test.rs:109:9:109:41 | ...: ...::Path::<...> | test.rs:111:22:111:25 | path | provenance | | | test.rs:111:13:111:18 | TuplePat [tuple.0] | test.rs:111:14:111:14 | a | provenance | | | test.rs:111:13:111:18 | TuplePat [tuple.1] | test.rs:111:17:111:17 | b | provenance | | | test.rs:111:14:111:14 | a | test.rs:113:14:113:14 | a | provenance | | | test.rs:111:17:111:17 | b | test.rs:114:14:114:14 | b | provenance | | +| test.rs:111:22:111:25 | path | test.rs:111:22:111:38 | path.into_inner() [tuple.0] | provenance | MaD:6 | +| test.rs:111:22:111:25 | path | test.rs:111:22:111:38 | path.into_inner() [tuple.1] | provenance | MaD:7 | | test.rs:111:22:111:38 | path.into_inner() [tuple.0] | test.rs:111:13:111:18 | TuplePat [tuple.0] | provenance | | | test.rs:111:22:111:38 | path.into_inner() [tuple.1] | test.rs:111:13:111:18 | TuplePat [tuple.1] | provenance | | | test.rs:127:5:127:20 | to | test.rs:129:9:129:31 | ...: ...::Path::<...> | provenance | Src:MaD:4 | -| test.rs:129:9:129:31 | ...: ...::Path::<...> | test.rs:131:17:131:33 | path.into_inner() | provenance | MaD:9 | -| test.rs:129:9:129:31 | ...: ...::Path::<...> | test.rs:131:17:131:33 | path.into_inner() [tuple.0] | provenance | MaD:6 | -| test.rs:129:9:129:31 | ...: ...::Path::<...> | test.rs:131:17:131:33 | path.into_inner() [tuple.1] | provenance | MaD:7 | -| test.rs:129:9:129:31 | ...: ...::Path::<...> | test.rs:131:17:131:33 | path.into_inner() [tuple.2] | provenance | MaD:8 | +| test.rs:129:9:129:31 | ...: ...::Path::<...> | test.rs:131:17:131:20 | path | provenance | | | test.rs:131:13:131:13 | a | test.rs:132:14:132:14 | a | provenance | | | test.rs:131:13:131:13 | a [tuple.0] | test.rs:132:14:132:14 | a | provenance | | | test.rs:131:13:131:13 | a [tuple.1] | test.rs:132:14:132:14 | a | provenance | | | test.rs:131:13:131:13 | a [tuple.2] | test.rs:132:14:132:14 | a | provenance | | +| test.rs:131:17:131:20 | path | test.rs:131:17:131:33 | path.into_inner() | provenance | MaD:9 | +| test.rs:131:17:131:20 | path | test.rs:131:17:131:33 | path.into_inner() [tuple.0] | provenance | MaD:6 | +| test.rs:131:17:131:20 | path | test.rs:131:17:131:33 | path.into_inner() [tuple.1] | provenance | MaD:7 | +| test.rs:131:17:131:20 | path | test.rs:131:17:131:33 | path.into_inner() [tuple.2] | provenance | MaD:8 | | test.rs:131:17:131:33 | path.into_inner() | test.rs:131:13:131:13 | a | provenance | | | test.rs:131:17:131:33 | path.into_inner() [tuple.0] | test.rs:131:13:131:13 | a [tuple.0] | provenance | | | test.rs:131:17:131:33 | path.into_inner() [tuple.1] | test.rs:131:13:131:13 | a [tuple.1] | provenance | | @@ -100,6 +93,7 @@ nodes | test.rs:100:13:100:13 | a [tuple.0] | semmle.label | a [tuple.0] | | test.rs:100:13:100:13 | a [tuple.1] | semmle.label | a [tuple.1] | | test.rs:100:13:100:13 | a [tuple.2] | semmle.label | a [tuple.2] | +| test.rs:100:17:100:20 | path | semmle.label | path | | test.rs:100:17:100:33 | path.into_inner() | semmle.label | path.into_inner() | | test.rs:100:17:100:33 | path.into_inner() [tuple.0] | semmle.label | path.into_inner() [tuple.0] | | test.rs:100:17:100:33 | path.into_inner() [tuple.1] | semmle.label | path.into_inner() [tuple.1] | @@ -120,6 +114,7 @@ nodes | test.rs:111:13:111:18 | TuplePat [tuple.1] | semmle.label | TuplePat [tuple.1] | | test.rs:111:14:111:14 | a | semmle.label | a | | test.rs:111:17:111:17 | b | semmle.label | b | +| test.rs:111:22:111:25 | path | semmle.label | path | | test.rs:111:22:111:38 | path.into_inner() [tuple.0] | semmle.label | path.into_inner() [tuple.0] | | test.rs:111:22:111:38 | path.into_inner() [tuple.1] | semmle.label | path.into_inner() [tuple.1] | | test.rs:113:14:113:14 | a | semmle.label | a | @@ -130,6 +125,7 @@ nodes | test.rs:131:13:131:13 | a [tuple.0] | semmle.label | a [tuple.0] | | test.rs:131:13:131:13 | a [tuple.1] | semmle.label | a [tuple.1] | | test.rs:131:13:131:13 | a [tuple.2] | semmle.label | a [tuple.2] | +| test.rs:131:17:131:20 | path | semmle.label | path | | test.rs:131:17:131:33 | path.into_inner() | semmle.label | path.into_inner() | | test.rs:131:17:131:33 | path.into_inner() [tuple.0] | semmle.label | path.into_inner() [tuple.0] | | test.rs:131:17:131:33 | path.into_inner() [tuple.1] | semmle.label | path.into_inner() [tuple.1] | diff --git a/rust/ql/test/library-tests/dataflow/strings/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/strings/CONSISTENCY/PathResolutionConsistency.expected index ccda75006f9..a8f80f6f39c 100644 --- a/rust/ql/test/library-tests/dataflow/strings/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/library-tests/dataflow/strings/CONSISTENCY/PathResolutionConsistency.expected @@ -1,2 +1,2 @@ -multipleCallTargets +multipleResolvedTargets | main.rs:52:14:52:29 | ...::from(...) | diff --git a/rust/ql/test/library-tests/dataflow/strings/inline-taint-flow.expected b/rust/ql/test/library-tests/dataflow/strings/inline-taint-flow.expected index 6cb680fa6ca..ddc016e3d37 100644 --- a/rust/ql/test/library-tests/dataflow/strings/inline-taint-flow.expected +++ b/rust/ql/test/library-tests/dataflow/strings/inline-taint-flow.expected @@ -1,25 +1,27 @@ models -| 1 | Summary: <_ as alloc::string::ToString>::to_string; Argument[self]; ReturnValue; taint | +| 1 | Summary: <_ as alloc::string::ToString>::to_string; Argument[self].Reference; ReturnValue; taint | | 2 | Summary: <_ as core::convert::From>::from; Argument[0]; ReturnValue; taint | | 3 | Summary: <_ as core::ops::arith::Add>::add; Argument[0].Reference; ReturnValue; taint | | 4 | Summary: <_ as core::ops::arith::Add>::add; Argument[self]; ReturnValue; taint | -| 5 | Summary: ::from; Argument[0].Reference; ReturnValue; value | -| 6 | Summary: ::add; Argument[self]; ReturnValue; value | -| 7 | Summary: ::as_str; Argument[self]; ReturnValue; value | -| 8 | Summary: alloc::fmt::format; Argument[0]; ReturnValue; taint | -| 9 | Summary: core::hint::must_use; Argument[0]; ReturnValue; value | +| 5 | Summary: <_ as core::ops::index::Index>::index; Argument[self].Reference.Element; ReturnValue.Reference; value | +| 6 | Summary: ::from; Argument[0].Reference; ReturnValue; value | +| 7 | Summary: ::add; Argument[self]; ReturnValue; value | +| 8 | Summary: ::as_str; Argument[self]; ReturnValue; value | +| 9 | Summary: alloc::fmt::format; Argument[0]; ReturnValue; taint | +| 10 | Summary: core::hint::must_use; Argument[0]; ReturnValue; value | edges +| main.rs:26:9:26:9 | s | main.rs:27:19:27:19 | s | provenance | | | main.rs:26:9:26:9 | s | main.rs:27:19:27:25 | s[...] | provenance | | | main.rs:26:13:26:22 | source(...) | main.rs:26:9:26:9 | s | provenance | | | main.rs:27:9:27:14 | sliced [&ref] | main.rs:28:16:28:21 | sliced | provenance | | | main.rs:27:18:27:25 | &... [&ref] | main.rs:27:9:27:14 | sliced [&ref] | provenance | | +| main.rs:27:19:27:19 | s | main.rs:27:19:27:25 | s[...] | provenance | MaD:5 | | main.rs:27:19:27:25 | s[...] | main.rs:27:18:27:25 | &... [&ref] | provenance | | -| main.rs:32:9:32:10 | s1 | main.rs:35:9:35:10 | s4 | provenance | | | main.rs:32:9:32:10 | s1 | main.rs:35:14:35:15 | s1 | provenance | | | main.rs:32:14:32:23 | source(...) | main.rs:32:9:32:10 | s1 | provenance | | | main.rs:35:9:35:10 | s4 | main.rs:38:10:38:11 | s4 | provenance | | | main.rs:35:14:35:15 | s1 | main.rs:35:14:35:20 | ... + ... | provenance | MaD:4 | -| main.rs:35:14:35:15 | s1 | main.rs:35:14:35:20 | ... + ... | provenance | MaD:6 | +| main.rs:35:14:35:15 | s1 | main.rs:35:14:35:20 | ... + ... | provenance | MaD:7 | | main.rs:35:14:35:20 | ... + ... | main.rs:35:9:35:10 | s4 | provenance | | | main.rs:43:9:43:10 | s1 | main.rs:46:34:46:35 | s1 | provenance | | | main.rs:43:14:43:23 | source(...) | main.rs:43:9:43:10 | s1 | provenance | | @@ -30,45 +32,46 @@ edges | main.rs:52:9:52:10 | s2 | main.rs:53:10:53:11 | s2 | provenance | | | main.rs:52:14:52:29 | ...::from(...) | main.rs:52:9:52:10 | s2 | provenance | | | main.rs:52:27:52:28 | s1 | main.rs:52:14:52:29 | ...::from(...) | provenance | MaD:2 | -| main.rs:52:27:52:28 | s1 | main.rs:52:14:52:29 | ...::from(...) | provenance | MaD:5 | -| main.rs:57:9:57:10 | s1 | main.rs:58:14:58:27 | s1.to_string() | provenance | MaD:1 | +| main.rs:52:27:52:28 | s1 | main.rs:52:14:52:29 | ...::from(...) | provenance | MaD:6 | +| main.rs:57:9:57:10 | s1 | main.rs:58:14:58:15 | s1 | provenance | | | main.rs:57:14:57:29 | source_slice(...) | main.rs:57:9:57:10 | s1 | provenance | | | main.rs:58:9:58:10 | s2 | main.rs:59:10:59:11 | s2 | provenance | | +| main.rs:58:14:58:15 | s1 | main.rs:58:14:58:27 | s1.to_string() | provenance | MaD:1 | | main.rs:58:14:58:27 | s1.to_string() | main.rs:58:9:58:10 | s2 | provenance | | | main.rs:63:9:63:9 | s | main.rs:64:16:64:16 | s | provenance | | -| main.rs:63:9:63:9 | s | main.rs:64:16:64:25 | s.as_str() | provenance | MaD:7 | | main.rs:63:13:63:22 | source(...) | main.rs:63:9:63:9 | s | provenance | | -| main.rs:64:16:64:16 | s | main.rs:64:16:64:25 | s.as_str() | provenance | MaD:7 | +| main.rs:64:16:64:16 | s | main.rs:64:16:64:25 | s.as_str() | provenance | MaD:8 | | main.rs:68:9:68:9 | s | main.rs:70:34:70:61 | MacroExpr | provenance | | | main.rs:68:9:68:9 | s | main.rs:73:34:73:59 | MacroExpr | provenance | | | main.rs:68:13:68:22 | source(...) | main.rs:68:9:68:9 | s | provenance | | | main.rs:70:9:70:18 | formatted1 | main.rs:71:10:71:19 | formatted1 | provenance | | | main.rs:70:22:70:62 | ...::format(...) | main.rs:70:9:70:18 | formatted1 | provenance | | -| main.rs:70:34:70:61 | MacroExpr | main.rs:70:22:70:62 | ...::format(...) | provenance | MaD:8 | +| main.rs:70:34:70:61 | MacroExpr | main.rs:70:22:70:62 | ...::format(...) | provenance | MaD:9 | | main.rs:73:9:73:18 | formatted2 | main.rs:74:10:74:19 | formatted2 | provenance | | | main.rs:73:22:73:60 | ...::format(...) | main.rs:73:9:73:18 | formatted2 | provenance | | -| main.rs:73:34:73:59 | MacroExpr | main.rs:73:22:73:60 | ...::format(...) | provenance | MaD:8 | +| main.rs:73:34:73:59 | MacroExpr | main.rs:73:22:73:60 | ...::format(...) | provenance | MaD:9 | | main.rs:76:9:76:13 | width | main.rs:77:34:77:74 | MacroExpr | provenance | | | main.rs:76:17:76:32 | source_usize(...) | main.rs:76:9:76:13 | width | provenance | | | main.rs:77:9:77:18 | formatted3 | main.rs:78:10:78:19 | formatted3 | provenance | | | main.rs:77:22:77:75 | ...::format(...) | main.rs:77:9:77:18 | formatted3 | provenance | | -| main.rs:77:34:77:74 | MacroExpr | main.rs:77:22:77:75 | ...::format(...) | provenance | MaD:8 | +| main.rs:77:34:77:74 | MacroExpr | main.rs:77:22:77:75 | ...::format(...) | provenance | MaD:9 | | main.rs:82:9:82:10 | s1 | main.rs:86:18:86:25 | MacroExpr | provenance | | | main.rs:82:9:82:10 | s1 | main.rs:87:18:87:32 | MacroExpr | provenance | | | main.rs:82:14:82:23 | source(...) | main.rs:82:9:82:10 | s1 | provenance | | | main.rs:86:18:86:25 | ...::format(...) | main.rs:86:18:86:25 | { ... } | provenance | | | main.rs:86:18:86:25 | ...::must_use(...) | main.rs:86:10:86:26 | MacroExpr | provenance | | -| main.rs:86:18:86:25 | MacroExpr | main.rs:86:18:86:25 | ...::format(...) | provenance | MaD:8 | -| main.rs:86:18:86:25 | { ... } | main.rs:86:18:86:25 | ...::must_use(...) | provenance | MaD:9 | +| main.rs:86:18:86:25 | MacroExpr | main.rs:86:18:86:25 | ...::format(...) | provenance | MaD:9 | +| main.rs:86:18:86:25 | { ... } | main.rs:86:18:86:25 | ...::must_use(...) | provenance | MaD:10 | | main.rs:87:18:87:32 | ...::format(...) | main.rs:87:18:87:32 | { ... } | provenance | | | main.rs:87:18:87:32 | ...::must_use(...) | main.rs:87:10:87:33 | MacroExpr | provenance | | -| main.rs:87:18:87:32 | MacroExpr | main.rs:87:18:87:32 | ...::format(...) | provenance | MaD:8 | -| main.rs:87:18:87:32 | { ... } | main.rs:87:18:87:32 | ...::must_use(...) | provenance | MaD:9 | +| main.rs:87:18:87:32 | MacroExpr | main.rs:87:18:87:32 | ...::format(...) | provenance | MaD:9 | +| main.rs:87:18:87:32 | { ... } | main.rs:87:18:87:32 | ...::must_use(...) | provenance | MaD:10 | nodes | main.rs:26:9:26:9 | s | semmle.label | s | | main.rs:26:13:26:22 | source(...) | semmle.label | source(...) | | main.rs:27:9:27:14 | sliced [&ref] | semmle.label | sliced [&ref] | | main.rs:27:18:27:25 | &... [&ref] | semmle.label | &... [&ref] | +| main.rs:27:19:27:19 | s | semmle.label | s | | main.rs:27:19:27:25 | s[...] | semmle.label | s[...] | | main.rs:28:16:28:21 | sliced | semmle.label | sliced | | main.rs:32:9:32:10 | s1 | semmle.label | s1 | @@ -91,6 +94,7 @@ nodes | main.rs:57:9:57:10 | s1 | semmle.label | s1 | | main.rs:57:14:57:29 | source_slice(...) | semmle.label | source_slice(...) | | main.rs:58:9:58:10 | s2 | semmle.label | s2 | +| main.rs:58:14:58:15 | s1 | semmle.label | s1 | | main.rs:58:14:58:27 | s1.to_string() | semmle.label | s1.to_string() | | main.rs:59:10:59:11 | s2 | semmle.label | s2 | | main.rs:63:9:63:9 | s | semmle.label | s | diff --git a/rust/ql/test/library-tests/dataflow/strings/main.rs b/rust/ql/test/library-tests/dataflow/strings/main.rs index 633d9f42f46..93054834a2a 100644 --- a/rust/ql/test/library-tests/dataflow/strings/main.rs +++ b/rust/ql/test/library-tests/dataflow/strings/main.rs @@ -61,7 +61,7 @@ fn string_to_string() { fn as_str() { let s = source(67); - sink_slice(s.as_str()); // $ hasValueFlow=67 + sink_slice(s.as_str()); // $ hasTaintFlow=67 -- `s.as_str()` has type `&str`, so an implicit deref is needed at the sink } fn format_args_built_in() { diff --git a/rust/ql/test/library-tests/dataflow/taint/TaintFlowStep.expected b/rust/ql/test/library-tests/dataflow/taint/TaintFlowStep.expected index fa32f2201b2..9799d66b124 100644 --- a/rust/ql/test/library-tests/dataflow/taint/TaintFlowStep.expected +++ b/rust/ql/test/library-tests/dataflow/taint/TaintFlowStep.expected @@ -1,17 +1,19 @@ -| main.rs:4:5:4:8 | 1000 | main.rs:4:5:4:12 | ... + ... | -| main.rs:4:12:4:12 | i | main.rs:4:5:4:12 | ... + ... | | main.rs:8:20:8:20 | s | main.rs:8:14:8:20 | FormatArgsExpr | -| main.rs:13:10:13:10 | a | main.rs:13:10:13:14 | ... + ... | -| main.rs:13:14:13:14 | 1 | main.rs:13:10:13:14 | ... + ... | -| main.rs:18:11:18:11 | a | main.rs:18:10:18:11 | - ... | -| main.rs:23:13:23:13 | a | main.rs:23:13:23:19 | a as u8 | -| main.rs:24:10:24:10 | b | main.rs:24:10:24:17 | b as i64 | -| main.rs:24:10:24:17 | [post] b as i64 | main.rs:24:10:24:10 | [post] b | -| main.rs:29:23:29:23 | i | main.rs:29:17:29:23 | FormatArgsExpr | -| main.rs:33:24:33:24 | s | main.rs:33:18:33:24 | FormatArgsExpr | -| main.rs:38:23:38:23 | s | main.rs:38:23:38:29 | s[...] | -| main.rs:49:24:49:24 | i | main.rs:49:18:49:24 | FormatArgsExpr | -| main.rs:54:14:54:16 | arr | main.rs:54:14:54:19 | arr[1] | -| main.rs:64:24:64:24 | s | main.rs:64:24:64:27 | s[1] | -| main.rs:64:24:64:27 | s[1] | main.rs:64:18:64:27 | FormatArgsExpr | -| main.rs:69:9:69:12 | arr2 | main.rs:69:9:69:15 | arr2[1] | +| main.rs:16:5:16:5 | [post] b [borrowed] | main.rs:16:5:16:5 | [SSA] b | +| main.rs:20:5:20:5 | [post] c [borrowed] | main.rs:20:5:20:5 | [SSA] c | +| main.rs:31:13:31:13 | a | main.rs:31:13:31:19 | a as u8 | +| main.rs:32:10:32:10 | b | main.rs:32:10:32:17 | b as i64 | +| main.rs:32:10:32:17 | [post] b as i64 | main.rs:32:10:32:10 | [post] b | +| main.rs:37:23:37:23 | i | main.rs:37:17:37:23 | FormatArgsExpr | +| main.rs:41:24:41:24 | s | main.rs:41:18:41:24 | FormatArgsExpr | +| main.rs:46:23:46:23 | [post] s [borrowed] | main.rs:46:23:46:23 | [post] s | +| main.rs:46:23:46:23 | s | main.rs:46:23:46:29 | s[...] | +| main.rs:46:23:46:29 | s[...] [pre-dereferenced] | main.rs:46:23:46:29 | s[...] | +| main.rs:57:24:57:24 | i | main.rs:57:18:57:24 | FormatArgsExpr | +| main.rs:62:14:62:16 | [post] arr [borrowed] | main.rs:62:14:62:16 | [post] arr | +| main.rs:62:14:62:19 | arr[1] [pre-dereferenced] | main.rs:62:14:62:19 | arr[1] | +| main.rs:72:24:72:24 | [post] s [borrowed] | main.rs:72:24:72:24 | [post] s | +| main.rs:72:24:72:27 | s[1] | main.rs:72:18:72:27 | FormatArgsExpr | +| main.rs:72:24:72:27 | s[1] [pre-dereferenced] | main.rs:72:24:72:27 | s[1] | +| main.rs:77:9:77:12 | [post] arr2 [borrowed] | main.rs:77:9:77:12 | [post] arr2 | +| main.rs:77:9:77:15 | arr2[1] [pre-dereferenced] | main.rs:77:9:77:15 | arr2[1] | diff --git a/rust/ql/test/library-tests/dataflow/taint/inline-taint-flow.expected b/rust/ql/test/library-tests/dataflow/taint/inline-taint-flow.expected index a8f0b6321f5..c4393834112 100644 --- a/rust/ql/test/library-tests/dataflow/taint/inline-taint-flow.expected +++ b/rust/ql/test/library-tests/dataflow/taint/inline-taint-flow.expected @@ -1,54 +1,80 @@ models -| 1 | Summary: ::neg; Argument[self]; ReturnValue; taint | +| 1 | Summary: <_ as core::ops::arith::Add>::add; Argument[self]; ReturnValue; taint | +| 2 | Summary: <_ as core::ops::arith::AddAssign>::add_assign; Argument[0].Reference; Argument[self].Reference; taint | +| 3 | Summary: <_ as core::ops::arith::AddAssign>::add_assign; Argument[0]; Argument[self].Reference; taint | +| 4 | Summary: <_ as core::ops::arith::AddAssign>::add_assign; Argument[self].Reference; Argument[self].Reference; taint | +| 5 | Summary: <_ as core::ops::arith::Neg>::neg; Argument[self]; ReturnValue; taint | +| 6 | Summary: <_ as core::ops::index::Index>::index; Argument[self].Reference.Element; ReturnValue.Reference; value | +| 7 | Summary: ::neg; Argument[self]; ReturnValue; taint | edges -| main.rs:12:9:12:9 | a | main.rs:13:10:13:14 | ... + ... | provenance | | +| main.rs:12:9:12:9 | a | main.rs:13:10:13:10 | a | provenance | | | main.rs:12:13:12:22 | source(...) | main.rs:12:9:12:9 | a | provenance | | -| main.rs:17:9:17:9 | a | main.rs:18:10:18:11 | - ... | provenance | | -| main.rs:17:9:17:9 | a | main.rs:18:11:18:11 | a | provenance | | -| main.rs:17:13:17:22 | source(...) | main.rs:17:9:17:9 | a | provenance | | -| main.rs:18:11:18:11 | a | main.rs:18:10:18:11 | - ... | provenance | MaD:1 | -| main.rs:22:9:22:9 | a | main.rs:23:9:23:9 | b | provenance | | -| main.rs:22:13:22:22 | source(...) | main.rs:22:9:22:9 | a | provenance | | -| main.rs:23:9:23:9 | b | main.rs:24:10:24:17 | b as i64 | provenance | | -| main.rs:37:13:37:13 | s | main.rs:38:23:38:29 | s[...] | provenance | | -| main.rs:37:17:37:26 | source(...) | main.rs:37:13:37:13 | s | provenance | | -| main.rs:38:13:38:18 | sliced [&ref] | main.rs:39:14:39:19 | sliced | provenance | | -| main.rs:38:22:38:29 | &... [&ref] | main.rs:38:13:38:18 | sliced [&ref] | provenance | | -| main.rs:38:23:38:29 | s[...] | main.rs:38:22:38:29 | &... [&ref] | provenance | | -| main.rs:53:13:53:15 | arr | main.rs:54:14:54:19 | arr[1] | provenance | | -| main.rs:53:19:53:28 | source(...) | main.rs:53:13:53:15 | arr | provenance | | -| main.rs:69:9:69:12 | [post] arr2 [element] | main.rs:70:14:70:17 | arr2 | provenance | | -| main.rs:69:19:69:28 | source(...) | main.rs:69:9:69:12 | [post] arr2 [element] | provenance | | +| main.rs:13:10:13:10 | a | main.rs:13:10:13:14 | ... + ... | provenance | MaD:1 | +| main.rs:15:9:15:13 | mut b | main.rs:16:5:16:5 | b | provenance | | +| main.rs:15:17:15:26 | source(...) | main.rs:15:9:15:13 | mut b | provenance | | +| main.rs:16:5:16:5 | b | main.rs:17:10:17:10 | b | provenance | MaD:4 | +| main.rs:20:10:20:19 | source(...) | main.rs:21:10:21:10 | c | provenance | MaD:2 | +| main.rs:20:10:20:19 | source(...) | main.rs:21:10:21:10 | c | provenance | MaD:3 | +| main.rs:25:9:25:9 | a | main.rs:26:11:26:11 | a | provenance | | +| main.rs:25:13:25:22 | source(...) | main.rs:25:9:25:9 | a | provenance | | +| main.rs:26:11:26:11 | a | main.rs:26:10:26:11 | - ... | provenance | MaD:5 | +| main.rs:26:11:26:11 | a | main.rs:26:10:26:11 | - ... | provenance | MaD:7 | +| main.rs:30:9:30:9 | a | main.rs:31:9:31:9 | b | provenance | | +| main.rs:30:13:30:22 | source(...) | main.rs:30:9:30:9 | a | provenance | | +| main.rs:31:9:31:9 | b | main.rs:32:10:32:17 | b as i64 | provenance | | +| main.rs:45:13:45:13 | s | main.rs:46:23:46:23 | s | provenance | | +| main.rs:45:13:45:13 | s | main.rs:46:23:46:29 | s[...] | provenance | | +| main.rs:45:17:45:26 | source(...) | main.rs:45:13:45:13 | s | provenance | | +| main.rs:46:13:46:18 | sliced [&ref] | main.rs:47:14:47:19 | sliced | provenance | | +| main.rs:46:22:46:29 | &... [&ref] | main.rs:46:13:46:18 | sliced [&ref] | provenance | | +| main.rs:46:23:46:23 | s | main.rs:46:23:46:29 | s[...] | provenance | MaD:6 | +| main.rs:46:23:46:29 | s[...] | main.rs:46:22:46:29 | &... [&ref] | provenance | | +| main.rs:61:13:61:15 | arr | main.rs:62:14:62:16 | arr | provenance | | +| main.rs:61:19:61:28 | source(...) | main.rs:61:13:61:15 | arr | provenance | | +| main.rs:62:14:62:16 | arr | main.rs:62:14:62:19 | arr[1] | provenance | MaD:6 | +| main.rs:77:9:77:12 | [post] arr2 [element] | main.rs:78:14:78:17 | arr2 | provenance | | +| main.rs:77:19:77:28 | source(...) | main.rs:77:9:77:12 | [post] arr2 [element] | provenance | | nodes | main.rs:12:9:12:9 | a | semmle.label | a | | main.rs:12:13:12:22 | source(...) | semmle.label | source(...) | +| main.rs:13:10:13:10 | a | semmle.label | a | | main.rs:13:10:13:14 | ... + ... | semmle.label | ... + ... | -| main.rs:17:9:17:9 | a | semmle.label | a | -| main.rs:17:13:17:22 | source(...) | semmle.label | source(...) | -| main.rs:18:10:18:11 | - ... | semmle.label | - ... | -| main.rs:18:11:18:11 | a | semmle.label | a | -| main.rs:22:9:22:9 | a | semmle.label | a | -| main.rs:22:13:22:22 | source(...) | semmle.label | source(...) | -| main.rs:23:9:23:9 | b | semmle.label | b | -| main.rs:24:10:24:17 | b as i64 | semmle.label | b as i64 | -| main.rs:37:13:37:13 | s | semmle.label | s | -| main.rs:37:17:37:26 | source(...) | semmle.label | source(...) | -| main.rs:38:13:38:18 | sliced [&ref] | semmle.label | sliced [&ref] | -| main.rs:38:22:38:29 | &... [&ref] | semmle.label | &... [&ref] | -| main.rs:38:23:38:29 | s[...] | semmle.label | s[...] | -| main.rs:39:14:39:19 | sliced | semmle.label | sliced | -| main.rs:53:13:53:15 | arr | semmle.label | arr | -| main.rs:53:19:53:28 | source(...) | semmle.label | source(...) | -| main.rs:54:14:54:19 | arr[1] | semmle.label | arr[1] | -| main.rs:69:9:69:12 | [post] arr2 [element] | semmle.label | [post] arr2 [element] | -| main.rs:69:19:69:28 | source(...) | semmle.label | source(...) | -| main.rs:70:14:70:17 | arr2 | semmle.label | arr2 | +| main.rs:15:9:15:13 | mut b | semmle.label | mut b | +| main.rs:15:17:15:26 | source(...) | semmle.label | source(...) | +| main.rs:16:5:16:5 | b | semmle.label | b | +| main.rs:17:10:17:10 | b | semmle.label | b | +| main.rs:20:10:20:19 | source(...) | semmle.label | source(...) | +| main.rs:21:10:21:10 | c | semmle.label | c | +| main.rs:25:9:25:9 | a | semmle.label | a | +| main.rs:25:13:25:22 | source(...) | semmle.label | source(...) | +| main.rs:26:10:26:11 | - ... | semmle.label | - ... | +| main.rs:26:11:26:11 | a | semmle.label | a | +| main.rs:30:9:30:9 | a | semmle.label | a | +| main.rs:30:13:30:22 | source(...) | semmle.label | source(...) | +| main.rs:31:9:31:9 | b | semmle.label | b | +| main.rs:32:10:32:17 | b as i64 | semmle.label | b as i64 | +| main.rs:45:13:45:13 | s | semmle.label | s | +| main.rs:45:17:45:26 | source(...) | semmle.label | source(...) | +| main.rs:46:13:46:18 | sliced [&ref] | semmle.label | sliced [&ref] | +| main.rs:46:22:46:29 | &... [&ref] | semmle.label | &... [&ref] | +| main.rs:46:23:46:23 | s | semmle.label | s | +| main.rs:46:23:46:29 | s[...] | semmle.label | s[...] | +| main.rs:47:14:47:19 | sliced | semmle.label | sliced | +| main.rs:61:13:61:15 | arr | semmle.label | arr | +| main.rs:61:19:61:28 | source(...) | semmle.label | source(...) | +| main.rs:62:14:62:16 | arr | semmle.label | arr | +| main.rs:62:14:62:19 | arr[1] | semmle.label | arr[1] | +| main.rs:77:9:77:12 | [post] arr2 [element] | semmle.label | [post] arr2 [element] | +| main.rs:77:19:77:28 | source(...) | semmle.label | source(...) | +| main.rs:78:14:78:17 | arr2 | semmle.label | arr2 | subpaths testFailures #select | main.rs:13:10:13:14 | ... + ... | main.rs:12:13:12:22 | source(...) | main.rs:13:10:13:14 | ... + ... | $@ | main.rs:12:13:12:22 | source(...) | source(...) | -| main.rs:18:10:18:11 | - ... | main.rs:17:13:17:22 | source(...) | main.rs:18:10:18:11 | - ... | $@ | main.rs:17:13:17:22 | source(...) | source(...) | -| main.rs:24:10:24:17 | b as i64 | main.rs:22:13:22:22 | source(...) | main.rs:24:10:24:17 | b as i64 | $@ | main.rs:22:13:22:22 | source(...) | source(...) | -| main.rs:39:14:39:19 | sliced | main.rs:37:17:37:26 | source(...) | main.rs:39:14:39:19 | sliced | $@ | main.rs:37:17:37:26 | source(...) | source(...) | -| main.rs:54:14:54:19 | arr[1] | main.rs:53:19:53:28 | source(...) | main.rs:54:14:54:19 | arr[1] | $@ | main.rs:53:19:53:28 | source(...) | source(...) | -| main.rs:70:14:70:17 | arr2 | main.rs:69:19:69:28 | source(...) | main.rs:70:14:70:17 | arr2 | $@ | main.rs:69:19:69:28 | source(...) | source(...) | +| main.rs:17:10:17:10 | b | main.rs:15:17:15:26 | source(...) | main.rs:17:10:17:10 | b | $@ | main.rs:15:17:15:26 | source(...) | source(...) | +| main.rs:21:10:21:10 | c | main.rs:20:10:20:19 | source(...) | main.rs:21:10:21:10 | c | $@ | main.rs:20:10:20:19 | source(...) | source(...) | +| main.rs:26:10:26:11 | - ... | main.rs:25:13:25:22 | source(...) | main.rs:26:10:26:11 | - ... | $@ | main.rs:25:13:25:22 | source(...) | source(...) | +| main.rs:32:10:32:17 | b as i64 | main.rs:30:13:30:22 | source(...) | main.rs:32:10:32:17 | b as i64 | $@ | main.rs:30:13:30:22 | source(...) | source(...) | +| main.rs:47:14:47:19 | sliced | main.rs:45:17:45:26 | source(...) | main.rs:47:14:47:19 | sliced | $@ | main.rs:45:17:45:26 | source(...) | source(...) | +| main.rs:62:14:62:19 | arr[1] | main.rs:61:19:61:28 | source(...) | main.rs:62:14:62:19 | arr[1] | $@ | main.rs:61:19:61:28 | source(...) | source(...) | +| main.rs:78:14:78:17 | arr2 | main.rs:77:19:77:28 | source(...) | main.rs:78:14:78:17 | arr2 | $@ | main.rs:77:19:77:28 | source(...) | source(...) | diff --git a/rust/ql/test/library-tests/dataflow/taint/main.rs b/rust/ql/test/library-tests/dataflow/taint/main.rs index 90af2ec8a06..5e4f8c43501 100644 --- a/rust/ql/test/library-tests/dataflow/taint/main.rs +++ b/rust/ql/test/library-tests/dataflow/taint/main.rs @@ -11,6 +11,14 @@ fn sink(s: i64) { fn addition() { let a = source(42); sink(a + 1); // $ hasTaintFlow=42 + + let mut b = source(58); + b += 2; + sink(b); // $ hasTaintFlow=58 + + let mut c = 0; + c += source(99); + sink(c); // $ hasTaintFlow=99 } fn negation() { diff --git a/rust/ql/test/library-tests/definitions/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/definitions/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 00000000000..8ebb39522b3 --- /dev/null +++ b/rust/ql/test/library-tests/definitions/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,5 @@ +multipleResolvedTargets +| main.rs:35:5:35:14 | * ... | +| main.rs:35:5:35:14 | * ... | +| main.rs:35:5:35:14 | * ... | +| main.rs:35:5:35:14 | * ... | diff --git a/rust/ql/test/library-tests/elements/builtintypes/BuiltinTypes.expected b/rust/ql/test/library-tests/elements/builtintypes/BuiltinTypes.expected index cfab22cd61c..4a67027027b 100644 --- a/rust/ql/test/library-tests/elements/builtintypes/BuiltinTypes.expected +++ b/rust/ql/test/library-tests/elements/builtintypes/BuiltinTypes.expected @@ -1,6 +1,8 @@ | struct Array | | -| struct Ptr | | +| struct PtrConst | | +| struct PtrMut | | | struct Ref | | +| struct RefMut | | | struct Slice | | | struct Tuple0 | | | struct Tuple1 | | diff --git a/rust/ql/test/library-tests/elements/enum/Cargo.lock b/rust/ql/test/library-tests/elements/enum/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/library-tests/elements/enum/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/library-tests/elements/enum/Enum.expected b/rust/ql/test/library-tests/elements/enum/Enum.expected new file mode 100644 index 00000000000..f910b240ca7 --- /dev/null +++ b/rust/ql/test/library-tests/elements/enum/Enum.expected @@ -0,0 +1,7 @@ +fieldless +| enums.rs:1:1:5:1 | enum Foo | +| enums.rs:7:1:11:1 | enum Fieldless | +| enums.rs:13:1:18:1 | enum Direction | +unitOnly +| enums.rs:1:1:5:1 | enum Foo | +| enums.rs:13:1:18:1 | enum Direction | diff --git a/rust/ql/test/library-tests/elements/enum/Enum.ql b/rust/ql/test/library-tests/elements/enum/Enum.ql new file mode 100644 index 00000000000..82baa8dffe6 --- /dev/null +++ b/rust/ql/test/library-tests/elements/enum/Enum.ql @@ -0,0 +1,6 @@ +import rust +import TestUtils + +query predicate fieldless(Enum e) { toBeTested(e) and e.isFieldless() } + +query predicate unitOnly(Enum e) { toBeTested(e) and e.isUnitOnly() } diff --git a/rust/ql/test/library-tests/elements/enum/enums.rs b/rust/ql/test/library-tests/elements/enum/enums.rs new file mode 100644 index 00000000000..0f5a964c284 --- /dev/null +++ b/rust/ql/test/library-tests/elements/enum/enums.rs @@ -0,0 +1,24 @@ +enum Foo { + Bar, + Baz, + Qux, +} + +enum Fieldless { + Tuple(), + Struct{}, + Unit, +} + +enum Direction { + North = 0, + East = 90, + South = 180, + West = 270, +} + +enum Color { + Red(u8), + Green(u8), + Blue(u8), +} diff --git a/rust/ql/test/library-tests/elements/operations/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/elements/operations/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 00000000000..cb94b0abf16 --- /dev/null +++ b/rust/ql/test/library-tests/elements/operations/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,2 @@ +multipleResolvedTargets +| test.rs:52:2:52:5 | * ... | diff --git a/rust/ql/test/library-tests/formatstrings/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/formatstrings/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 00000000000..93e644c9abb --- /dev/null +++ b/rust/ql/test/library-tests/formatstrings/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,45 @@ +multipleResolvedTargets +| main.rs:28:5:28:14 | * ... | +| main.rs:28:5:28:14 | * ... | +| main.rs:28:5:28:14 | * ... | +| main.rs:28:5:28:14 | * ... | +| main.rs:29:5:29:14 | * ... | +| main.rs:29:5:29:14 | * ... | +| main.rs:29:5:29:14 | * ... | +| main.rs:29:5:29:14 | * ... | +| main.rs:30:5:30:14 | * ... | +| main.rs:30:5:30:14 | * ... | +| main.rs:30:5:30:14 | * ... | +| main.rs:30:5:30:14 | * ... | +| main.rs:31:5:31:14 | * ... | +| main.rs:31:5:31:14 | * ... | +| main.rs:31:5:31:14 | * ... | +| main.rs:31:5:31:14 | * ... | +| main.rs:33:5:33:14 | * ... | +| main.rs:33:5:33:14 | * ... | +| main.rs:33:5:33:14 | * ... | +| main.rs:33:5:33:14 | * ... | +| main.rs:34:5:34:14 | * ... | +| main.rs:34:5:34:14 | * ... | +| main.rs:34:5:34:14 | * ... | +| main.rs:34:5:34:14 | * ... | +| main.rs:35:5:35:14 | * ... | +| main.rs:35:5:35:14 | * ... | +| main.rs:35:5:35:14 | * ... | +| main.rs:35:5:35:14 | * ... | +| main.rs:36:5:36:14 | * ... | +| main.rs:36:5:36:14 | * ... | +| main.rs:36:5:36:14 | * ... | +| main.rs:36:5:36:14 | * ... | +| main.rs:37:5:37:14 | * ... | +| main.rs:37:5:37:14 | * ... | +| main.rs:37:5:37:14 | * ... | +| main.rs:37:5:37:14 | * ... | +| main.rs:75:5:75:14 | * ... | +| main.rs:75:5:75:14 | * ... | +| main.rs:75:5:75:14 | * ... | +| main.rs:75:5:75:14 | * ... | +| main.rs:76:5:76:14 | * ... | +| main.rs:76:5:76:14 | * ... | +| main.rs:76:5:76:14 | * ... | +| main.rs:76:5:76:14 | * ... | diff --git a/rust/ql/test/library-tests/path-resolution/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/path-resolution/CONSISTENCY/PathResolutionConsistency.expected index 6b5461f3719..23ac5e722d5 100644 --- a/rust/ql/test/library-tests/path-resolution/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/library-tests/path-resolution/CONSISTENCY/PathResolutionConsistency.expected @@ -1,6 +1,9 @@ -multipleCallTargets +multipleResolvedTargets | main.rs:126:9:126:11 | f(...) | | main.rs:366:9:368:16 | ...::f(...) | | main.rs:369:9:371:16 | ...::f(...) | -| main.rs:448:9:452:16 | ...::f(...) | -| main.rs:453:9:457:16 | ...::f(...) | +| main.rs:450:9:454:16 | ...::f(...) | +| main.rs:455:9:459:16 | ...::f(...) | +| main.rs:565:9:566:15 | ...::Assoc(...) | +| main.rs:568:9:569:12 | ...::f1(...) | +| main.rs:571:9:572:12 | ...::f1(...) | diff --git a/rust/ql/test/library-tests/path-resolution/main.rs b/rust/ql/test/library-tests/path-resolution/main.rs index 9e7ebf5fb17..761e97fced1 100644 --- a/rust/ql/test/library-tests/path-resolution/main.rs +++ b/rust/ql/test/library-tests/path-resolution/main.rs @@ -381,8 +381,9 @@ mod m16 { > { fn f(&self) -> T; // $ item=I84 - fn g(&self) -> T // $ item=I84 - ; // I85 + fn g(&self) -> T {// $ item=I84 + self.f() // $ item=f + } // I85 fn h(&self) -> T { // $ item=I84 Self::g(&self); // $ item=I85 @@ -436,8 +437,9 @@ mod m16 { > // $ item=I89 for S { // $ item=I90 fn f(&self) -> S { // $ item=I90 + Self::g(&self); // $ item=I92 println!("m16::>::f"); // $ item=println - Self::c // $ MISSING: item=I95 + Self::c // $ item=I95 } // I93 } @@ -466,6 +468,109 @@ mod m16 { > // $ item=I86 >::c; // $ MISSING: item=I95 } // I83 + + trait Trait3 { + type AssocType; + + fn f(&self); + } + + trait Trait4 { + type AssocType; + + fn g(&self); + } + + struct S2; + + #[rustfmt::skip] + impl Trait3 for S2 { // $ item=Trait3 item=S2 + type AssocType = i32 // $ item=i32 + ; // S2Trait3AssocType + + fn f(&self) { + let x: Self::AssocType = 42; // $ item=S2Trait3AssocType + } // S2asTrait3::f + } + + #[rustfmt::skip] + impl Trait4 for S2 { // $ item=Trait4 item=S2 + type AssocType = bool // $ item=bool + ; // S2Trait4AssocType + + fn g(&self) { + Self::f(&self); // $ item=S2asTrait3::f + S2::f(&self); // $ item=S2asTrait3::f + let x: Self::AssocType = true; // $ item=S2Trait4AssocType + } + } + + trait Trait5 { + type Assoc; // Trait5Assoc + + fn Assoc() -> Self::Assoc; // $ item=Trait5Assoc + } + + #[rustfmt::skip] + impl Trait5 for S { // $ item=Trait5 item=I90 + type Assoc = i32 // $ item=i32 + ; // AssocType + + fn Assoc() + -> Self::Assoc { // $ item=AssocType + Self::Assoc() + 1 // $ item=AssocFunc + } // AssocFunc + } + + struct S3(T3); // $ item=T3 + + #[rustfmt::skip] + impl Trait5 for S3 { // $ item=Trait5 item=S3 item=i32 + type Assoc = i32 // $ item=i32 + ; // S3i32AssocType + + fn Assoc() + -> Self::Assoc { // $ item=S3i32AssocType + Self::Assoc() + 1 // $ item=S3i32AssocFunc + } // S3i32AssocFunc + } + + #[rustfmt::skip] + impl Trait5 for S3 { // $ item=Trait5 item=S3 item=bool + type Assoc = bool // $ item=bool + ; // S3boolAssocType + + fn Assoc() + -> Self::Assoc { // $ item=S3boolAssocType + !Self::Assoc() // $ item=S3boolAssocFunc + } // S3boolAssocFunc + } + + #[rustfmt::skip] + impl S3 { // $ item=S3 item=i32 + fn f1() -> i32 { // $ item=i32 + 0 + } // S3i32f1 + } + + #[rustfmt::skip] + impl S3 { // $ item=S3 item=bool + fn f1() -> bool { // $ item=bool + true + } // S3boolf1 + } + + #[rustfmt::skip] + fn foo() { + S3:::: // $ item=i32 + Assoc(); // $ item=S3i32AssocFunc $ SPURIOUS: item=S3boolAssocFunc + + S3:::: // $ item=bool + f1(); // $ item=S3boolf1 $ SPURIOUS: item=S3i32f1 + + S3:::: // $ item=i32 + f1(); // $ item=S3i32f1 $ SPURIOUS: item=S3boolf1 + } } mod trait_visibility { @@ -790,6 +895,49 @@ mod impl_with_attribute_macro { } // impl_with_attribute_macro::test } +mod patterns { + #[rustfmt::skip] + pub fn test() -> Option { // $ item=Option $ item=i32 + let x = Some(42); // $ item=Some + let y : Option = match x { // $ item=Option $ item=i32 + Some(y) => { // $ item=Some + None // $ item=None + } + None => // $ item=None + None // $ item=None + }; + match y { + N0ne => // local variable + N0ne + } + } // patterns::test + + #[rustfmt::skip] + fn test2() -> Option { // $ item=Option $ item=i32 + let test_alias = test; // $ item=patterns::test + let test = test_alias(); + test + } + + #[rustfmt::skip] + const z: i32 // $ item=i32 + = 0; // constz + + #[rustfmt::skip] + fn test3() { + let x = Some(0); // $ item=Some + match x { + Some(x) // $ item=Some + => x, + _ => 0 + }; + match x { + Some(z) => z, // $ item=Some item=constz + _ => 0 + }; + } +} + fn main() { my::nested::nested1::nested2::f(); // $ item=I4 my::f(); // $ item=I38 @@ -826,4 +974,5 @@ fn main() { AStruct::z_on_type(); // $ item=I124 AStruct {}.z_on_instance(); // $ item=I123 item=I125 impl_with_attribute_macro::test(); // $ item=impl_with_attribute_macro::test + patterns::test(); // $ item=patterns::test } diff --git a/rust/ql/test/library-tests/path-resolution/path-resolution.expected b/rust/ql/test/library-tests/path-resolution/path-resolution.expected index 0ff48d11e8d..c6bac60b412 100644 --- a/rust/ql/test/library-tests/path-resolution/path-resolution.expected +++ b/rust/ql/test/library-tests/path-resolution/path-resolution.expected @@ -18,20 +18,21 @@ mod | main.rs:291:1:304:1 | mod m13 | | main.rs:295:5:303:5 | mod m14 | | main.rs:306:1:375:1 | mod m15 | -| main.rs:377:1:469:1 | mod m16 | -| main.rs:471:1:521:1 | mod trait_visibility | -| main.rs:472:5:494:5 | mod m | -| main.rs:523:1:553:1 | mod m17 | -| main.rs:555:1:573:1 | mod m18 | -| main.rs:560:5:572:5 | mod m19 | -| main.rs:565:9:571:9 | mod m20 | -| main.rs:575:1:600:1 | mod m21 | -| main.rs:576:5:582:5 | mod m22 | -| main.rs:584:5:599:5 | mod m33 | -| main.rs:602:1:627:1 | mod m23 | -| main.rs:629:1:697:1 | mod m24 | -| main.rs:714:1:766:1 | mod associated_types | -| main.rs:772:1:791:1 | mod impl_with_attribute_macro | +| main.rs:377:1:574:1 | mod m16 | +| main.rs:576:1:626:1 | mod trait_visibility | +| main.rs:577:5:599:5 | mod m | +| main.rs:628:1:658:1 | mod m17 | +| main.rs:660:1:678:1 | mod m18 | +| main.rs:665:5:677:5 | mod m19 | +| main.rs:670:9:676:9 | mod m20 | +| main.rs:680:1:705:1 | mod m21 | +| main.rs:681:5:687:5 | mod m22 | +| main.rs:689:5:704:5 | mod m33 | +| main.rs:707:1:732:1 | mod m23 | +| main.rs:734:1:802:1 | mod m24 | +| main.rs:819:1:871:1 | mod associated_types | +| main.rs:877:1:896:1 | mod impl_with_attribute_macro | +| main.rs:898:1:939:1 | mod patterns | | my2/mod.rs:1:1:1:16 | mod nested2 | | my2/mod.rs:20:1:20:12 | mod my3 | | my2/mod.rs:22:1:23:10 | mod mymod | @@ -72,7 +73,7 @@ resolvePath | main.rs:37:17:37:24 | ...::f | main.rs:26:9:28:9 | fn f | | main.rs:39:17:39:23 | println | {EXTERNAL LOCATION} | MacroRules | | main.rs:40:17:40:17 | f | main.rs:26:9:28:9 | fn f | -| main.rs:47:9:47:13 | super | main.rs:1:1:829:2 | SourceFile | +| main.rs:47:9:47:13 | super | main.rs:1:1:978:2 | SourceFile | | main.rs:47:9:47:17 | ...::m1 | main.rs:20:1:44:1 | mod m1 | | main.rs:47:9:47:21 | ...::m2 | main.rs:25:5:43:5 | mod m2 | | main.rs:47:9:47:24 | ...::g | main.rs:30:9:34:9 | fn g | @@ -87,7 +88,7 @@ resolvePath | main.rs:68:17:68:19 | Foo | main.rs:66:9:66:21 | struct Foo | | main.rs:71:13:71:15 | Foo | main.rs:60:5:60:17 | struct Foo | | main.rs:73:5:73:5 | f | main.rs:62:5:69:5 | fn f | -| main.rs:75:5:75:8 | self | main.rs:1:1:829:2 | SourceFile | +| main.rs:75:5:75:8 | self | main.rs:1:1:978:2 | SourceFile | | main.rs:75:5:75:11 | ...::i | main.rs:78:1:90:1 | fn i | | main.rs:79:5:79:11 | println | {EXTERNAL LOCATION} | MacroRules | | main.rs:81:13:81:15 | Foo | main.rs:55:1:55:13 | struct Foo | @@ -109,7 +110,7 @@ resolvePath | main.rs:112:9:112:15 | println | {EXTERNAL LOCATION} | MacroRules | | main.rs:118:9:118:15 | println | {EXTERNAL LOCATION} | MacroRules | | main.rs:122:9:122:15 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:125:13:125:17 | super | main.rs:1:1:829:2 | SourceFile | +| main.rs:125:13:125:17 | super | main.rs:1:1:978:2 | SourceFile | | main.rs:125:13:125:21 | ...::m5 | main.rs:110:1:114:1 | mod m5 | | main.rs:126:9:126:9 | f | main.rs:111:5:113:5 | fn f | | main.rs:126:9:126:9 | f | main.rs:117:5:119:5 | fn f | @@ -132,7 +133,7 @@ resolvePath | main.rs:169:22:169:29 | MyStruct | main.rs:162:5:162:22 | struct MyStruct | | main.rs:171:13:171:19 | println | {EXTERNAL LOCATION} | MacroRules | | main.rs:172:13:172:13 | f | main.rs:164:5:166:5 | fn f | -| main.rs:173:13:173:16 | Self | main.rs:168:5:179:5 | impl MyTrait for MyStruct { ... } | +| main.rs:173:13:173:16 | Self | main.rs:162:5:162:22 | struct MyStruct | | main.rs:173:13:173:19 | ...::g | main.rs:176:9:178:9 | fn g | | main.rs:177:13:177:19 | println | {EXTERNAL LOCATION} | MacroRules | | main.rs:182:10:182:17 | MyStruct | main.rs:162:5:162:22 | struct MyStruct | @@ -196,7 +197,7 @@ resolvePath | main.rs:341:10:341:15 | Trait1 | main.rs:307:5:311:5 | trait Trait1 | | main.rs:342:11:342:11 | S | main.rs:338:5:338:13 | struct S | | main.rs:344:13:344:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:345:13:345:16 | Self | main.rs:340:5:352:5 | impl Trait1 for S { ... } | +| main.rs:345:13:345:16 | Self | main.rs:338:5:338:13 | struct S | | main.rs:345:13:345:19 | ...::g | main.rs:349:9:351:9 | fn g | | main.rs:350:13:350:19 | println | {EXTERNAL LOCATION} | MacroRules | | main.rs:355:10:355:15 | Trait2 | main.rs:313:5:321:5 | trait Trait2 | @@ -212,262 +213,343 @@ resolvePath | main.rs:372:9:372:12 | ...::g | main.rs:349:9:351:9 | fn g | | main.rs:382:24:382:24 | T | main.rs:380:7:380:7 | T | | main.rs:384:24:384:24 | T | main.rs:380:7:380:7 | T | -| main.rs:387:24:387:24 | T | main.rs:380:7:380:7 | T | -| main.rs:388:13:388:16 | Self | main.rs:378:5:394:5 | trait Trait1 | -| main.rs:388:13:388:19 | ...::g | main.rs:384:9:385:9 | fn g | -| main.rs:392:18:392:18 | T | main.rs:380:7:380:7 | T | -| main.rs:400:9:402:9 | Trait1::<...> | main.rs:378:5:394:5 | trait Trait1 | -| main.rs:401:11:401:11 | T | main.rs:398:7:398:7 | T | -| main.rs:403:24:403:24 | T | main.rs:398:7:398:7 | T | -| main.rs:404:13:404:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:405:13:405:16 | Self | main.rs:396:5:409:5 | trait Trait2 | -| main.rs:405:13:405:19 | ...::g | main.rs:384:9:385:9 | fn g | -| main.rs:407:13:407:16 | Self | main.rs:396:5:409:5 | trait Trait2 | -| main.rs:407:13:407:19 | ...::c | main.rs:392:9:393:9 | Const | -| main.rs:414:10:416:5 | Trait1::<...> | main.rs:378:5:394:5 | trait Trait1 | -| main.rs:415:7:415:7 | S | main.rs:411:5:411:13 | struct S | -| main.rs:417:11:417:11 | S | main.rs:411:5:411:13 | struct S | -| main.rs:418:24:418:24 | S | main.rs:411:5:411:13 | struct S | -| main.rs:419:13:419:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:420:13:420:16 | Self | main.rs:413:5:431:5 | impl Trait1::<...> for S { ... } | -| main.rs:420:13:420:19 | ...::g | main.rs:424:9:427:9 | fn g | -| main.rs:424:24:424:24 | S | main.rs:411:5:411:13 | struct S | -| main.rs:425:13:425:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:426:13:426:16 | Self | main.rs:413:5:431:5 | impl Trait1::<...> for S { ... } | -| main.rs:426:13:426:19 | ...::c | main.rs:429:9:430:9 | Const | -| main.rs:429:18:429:18 | S | main.rs:411:5:411:13 | struct S | -| main.rs:429:22:429:22 | S | main.rs:411:5:411:13 | struct S | -| main.rs:434:10:436:5 | Trait2::<...> | main.rs:396:5:409:5 | trait Trait2 | -| main.rs:435:7:435:7 | S | main.rs:411:5:411:13 | struct S | -| main.rs:437:11:437:11 | S | main.rs:411:5:411:13 | struct S | -| main.rs:438:24:438:24 | S | main.rs:411:5:411:13 | struct S | -| main.rs:439:13:439:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:440:13:440:16 | Self | main.rs:433:5:442:5 | impl Trait2::<...> for S { ... } | -| main.rs:446:9:446:15 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:447:17:447:17 | S | main.rs:411:5:411:13 | struct S | -| main.rs:448:10:448:10 | S | main.rs:411:5:411:13 | struct S | -| main.rs:449:14:451:11 | Trait1::<...> | main.rs:378:5:394:5 | trait Trait1 | -| main.rs:450:13:450:13 | S | main.rs:411:5:411:13 | struct S | -| main.rs:453:10:453:10 | S | main.rs:411:5:411:13 | struct S | -| main.rs:454:14:456:11 | Trait2::<...> | main.rs:396:5:409:5 | trait Trait2 | -| main.rs:455:13:455:13 | S | main.rs:411:5:411:13 | struct S | -| main.rs:458:9:458:9 | S | main.rs:411:5:411:13 | struct S | -| main.rs:458:9:458:12 | ...::g | main.rs:424:9:427:9 | fn g | -| main.rs:460:9:460:9 | S | main.rs:411:5:411:13 | struct S | -| main.rs:460:9:460:12 | ...::h | main.rs:387:9:390:9 | fn h | -| main.rs:462:9:462:9 | S | main.rs:411:5:411:13 | struct S | -| main.rs:462:9:462:12 | ...::c | main.rs:429:9:430:9 | Const | -| main.rs:463:10:463:10 | S | main.rs:411:5:411:13 | struct S | -| main.rs:464:14:466:11 | Trait1::<...> | main.rs:378:5:394:5 | trait Trait1 | -| main.rs:465:13:465:13 | S | main.rs:411:5:411:13 | struct S | -| main.rs:483:14:483:16 | Foo | main.rs:473:9:475:9 | trait Foo | -| main.rs:483:22:483:22 | X | main.rs:481:9:481:21 | struct X | -| main.rs:485:17:485:23 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:489:14:489:16 | Bar | main.rs:477:9:479:9 | trait Bar | -| main.rs:489:22:489:22 | X | main.rs:481:9:481:21 | struct X | -| main.rs:491:17:491:23 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:496:9:496:9 | m | main.rs:472:5:494:5 | mod m | -| main.rs:496:9:496:12 | ...::X | main.rs:481:9:481:21 | struct X | -| main.rs:499:17:499:17 | X | main.rs:481:9:481:21 | struct X | -| main.rs:502:17:502:17 | m | main.rs:472:5:494:5 | mod m | -| main.rs:502:17:502:22 | ...::Foo | main.rs:473:9:475:9 | trait Foo | -| main.rs:503:13:503:13 | X | main.rs:481:9:481:21 | struct X | -| main.rs:503:13:503:23 | ...::a_method | main.rs:483:26:486:13 | fn a_method | -| main.rs:507:17:507:17 | m | main.rs:472:5:494:5 | mod m | -| main.rs:507:17:507:22 | ...::Bar | main.rs:477:9:479:9 | trait Bar | -| main.rs:508:13:508:13 | X | main.rs:481:9:481:21 | struct X | -| main.rs:508:13:508:23 | ...::a_method | main.rs:489:26:492:13 | fn a_method | -| main.rs:512:17:512:17 | m | main.rs:472:5:494:5 | mod m | -| main.rs:512:17:512:22 | ...::Bar | main.rs:477:9:479:9 | trait Bar | -| main.rs:513:13:513:13 | X | main.rs:481:9:481:21 | struct X | -| main.rs:513:13:513:23 | ...::a_method | main.rs:489:26:492:13 | fn a_method | -| main.rs:518:13:518:13 | m | main.rs:472:5:494:5 | mod m | -| main.rs:518:13:518:18 | ...::Bar | main.rs:477:9:479:9 | trait Bar | -| main.rs:518:13:518:28 | ...::a_method | main.rs:478:13:478:31 | fn a_method | -| main.rs:531:10:531:16 | MyTrait | main.rs:524:5:526:5 | trait MyTrait | -| main.rs:532:9:532:9 | S | main.rs:528:5:528:13 | struct S | -| main.rs:534:13:534:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:540:7:540:13 | MyTrait | main.rs:524:5:526:5 | trait MyTrait | -| main.rs:541:10:541:10 | T | main.rs:539:10:539:10 | T | -| main.rs:543:9:543:9 | T | main.rs:539:10:539:10 | T | -| main.rs:543:9:543:12 | ...::f | main.rs:525:9:525:20 | fn f | -| main.rs:544:9:544:15 | MyTrait | main.rs:524:5:526:5 | trait MyTrait | -| main.rs:544:9:544:18 | ...::f | main.rs:525:9:525:20 | fn f | -| main.rs:549:9:549:9 | g | main.rs:538:5:545:5 | fn g | -| main.rs:550:11:550:11 | S | main.rs:528:5:528:13 | struct S | -| main.rs:557:9:557:15 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:562:13:562:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:567:17:567:23 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:568:17:568:21 | super | main.rs:560:5:572:5 | mod m19 | -| main.rs:568:17:568:24 | ...::f | main.rs:561:9:563:9 | fn f | -| main.rs:569:17:569:21 | super | main.rs:560:5:572:5 | mod m19 | -| main.rs:569:17:569:28 | ...::super | main.rs:555:1:573:1 | mod m18 | -| main.rs:569:17:569:31 | ...::f | main.rs:556:5:558:5 | fn f | -| main.rs:586:13:586:17 | super | main.rs:575:1:600:1 | mod m21 | -| main.rs:586:13:586:22 | ...::m22 | main.rs:576:5:582:5 | mod m22 | -| main.rs:586:13:586:30 | ...::MyEnum | main.rs:577:9:579:9 | enum MyEnum | -| main.rs:587:13:587:16 | self | main.rs:577:9:579:9 | enum MyEnum | -| main.rs:591:13:591:17 | super | main.rs:575:1:600:1 | mod m21 | -| main.rs:591:13:591:22 | ...::m22 | main.rs:576:5:582:5 | mod m22 | -| main.rs:591:13:591:32 | ...::MyStruct | main.rs:581:9:581:28 | struct MyStruct | -| main.rs:592:13:592:16 | self | main.rs:581:9:581:28 | struct MyStruct | -| main.rs:596:21:596:26 | MyEnum | main.rs:577:9:579:9 | enum MyEnum | -| main.rs:596:21:596:29 | ...::A | main.rs:578:13:578:13 | A | -| main.rs:597:21:597:28 | MyStruct | main.rs:581:9:581:28 | struct MyStruct | -| main.rs:613:10:615:5 | Trait1::<...> | main.rs:603:5:608:5 | trait Trait1 | -| main.rs:614:7:614:10 | Self | main.rs:610:5:610:13 | struct S | -| main.rs:616:11:616:11 | S | main.rs:610:5:610:13 | struct S | -| main.rs:618:13:618:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:624:17:624:17 | S | main.rs:610:5:610:13 | struct S | -| main.rs:640:15:640:15 | T | main.rs:639:26:639:26 | T | -| main.rs:645:9:645:24 | GenericStruct::<...> | main.rs:638:5:641:5 | struct GenericStruct | -| main.rs:645:23:645:23 | T | main.rs:644:10:644:10 | T | -| main.rs:647:9:647:9 | T | main.rs:644:10:644:10 | T | -| main.rs:647:12:647:17 | TraitA | main.rs:630:5:632:5 | trait TraitA | -| main.rs:656:9:656:24 | GenericStruct::<...> | main.rs:638:5:641:5 | struct GenericStruct | -| main.rs:656:23:656:23 | T | main.rs:655:10:655:10 | T | -| main.rs:658:9:658:9 | T | main.rs:655:10:655:10 | T | -| main.rs:658:12:658:17 | TraitB | main.rs:634:5:636:5 | trait TraitB | -| main.rs:659:9:659:9 | T | main.rs:655:10:655:10 | T | -| main.rs:659:12:659:17 | TraitA | main.rs:630:5:632:5 | trait TraitA | -| main.rs:670:10:670:15 | TraitA | main.rs:630:5:632:5 | trait TraitA | -| main.rs:670:21:670:31 | Implementor | main.rs:667:5:667:23 | struct Implementor | -| main.rs:672:13:672:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:677:10:677:15 | TraitB | main.rs:634:5:636:5 | trait TraitB | -| main.rs:677:21:677:31 | Implementor | main.rs:667:5:667:23 | struct Implementor | -| main.rs:679:13:679:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:685:24:685:34 | Implementor | main.rs:667:5:667:23 | struct Implementor | -| main.rs:686:23:686:35 | GenericStruct | main.rs:638:5:641:5 | struct GenericStruct | -| main.rs:692:9:692:36 | GenericStruct::<...> | main.rs:638:5:641:5 | struct GenericStruct | -| main.rs:692:9:692:50 | ...::call_trait_a | main.rs:649:9:651:9 | fn call_trait_a | -| main.rs:692:25:692:35 | Implementor | main.rs:667:5:667:23 | struct Implementor | -| main.rs:695:9:695:36 | GenericStruct::<...> | main.rs:638:5:641:5 | struct GenericStruct | -| main.rs:695:9:695:47 | ...::call_both | main.rs:661:9:664:9 | fn call_both | -| main.rs:695:25:695:35 | Implementor | main.rs:667:5:667:23 | struct Implementor | -| main.rs:701:3:701:12 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) | -| main.rs:701:3:701:24 | ...::add_suffix | proc_macro.rs:4:1:13:1 | fn add_suffix | -| main.rs:705:6:705:12 | AStruct | main.rs:704:1:704:17 | struct AStruct | -| main.rs:707:7:707:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) | -| main.rs:707:7:707:28 | ...::add_suffix | proc_macro.rs:4:1:13:1 | fn add_suffix | -| main.rs:710:7:710:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) | -| main.rs:710:7:710:28 | ...::add_suffix | proc_macro.rs:4:1:13:1 | fn add_suffix | -| main.rs:715:9:715:11 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) | -| main.rs:715:9:715:19 | ...::marker | {EXTERNAL LOCATION} | mod marker | -| main.rs:715:9:715:32 | ...::PhantomData | {EXTERNAL LOCATION} | struct PhantomData | -| main.rs:716:9:716:11 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) | -| main.rs:716:9:716:19 | ...::result | {EXTERNAL LOCATION} | mod result | -| main.rs:716:9:716:27 | ...::Result | {EXTERNAL LOCATION} | enum Result | -| main.rs:724:19:724:22 | Self | main.rs:718:5:726:5 | trait Reduce | -| main.rs:724:19:724:29 | ...::Input | main.rs:719:9:719:19 | type Input | -| main.rs:725:14:725:46 | Result::<...> | {EXTERNAL LOCATION} | enum Result | -| main.rs:725:21:725:24 | Self | main.rs:718:5:726:5 | trait Reduce | -| main.rs:725:21:725:32 | ...::Output | main.rs:720:21:721:20 | type Output | -| main.rs:725:35:725:38 | Self | main.rs:718:5:726:5 | trait Reduce | -| main.rs:725:35:725:45 | ...::Error | main.rs:719:21:720:19 | type Error | -| main.rs:729:17:729:34 | PhantomData::<...> | {EXTERNAL LOCATION} | struct PhantomData | -| main.rs:729:29:729:33 | Input | main.rs:728:19:728:23 | Input | -| main.rs:730:17:730:34 | PhantomData::<...> | {EXTERNAL LOCATION} | struct PhantomData | -| main.rs:730:29:730:33 | Error | main.rs:728:26:728:30 | Error | -| main.rs:737:11:737:16 | Reduce | main.rs:718:5:726:5 | trait Reduce | -| main.rs:738:13:741:9 | MyImpl::<...> | main.rs:728:5:731:5 | struct MyImpl | -| main.rs:739:13:739:17 | Input | main.rs:735:13:735:17 | Input | -| main.rs:740:13:740:17 | Error | main.rs:736:13:736:17 | Error | -| main.rs:743:22:746:9 | Result::<...> | {EXTERNAL LOCATION} | enum Result | -| main.rs:744:13:744:17 | Input | main.rs:735:13:735:17 | Input | -| main.rs:745:13:745:16 | Self | main.rs:733:5:765:5 | impl Reduce for MyImpl::<...> { ... } | -| main.rs:745:13:745:23 | ...::Error | main.rs:747:11:751:9 | type Error | -| main.rs:748:22:750:9 | Option::<...> | {EXTERNAL LOCATION} | enum Option | -| main.rs:749:11:749:15 | Error | main.rs:736:13:736:17 | Error | -| main.rs:753:13:753:17 | Input | main.rs:735:13:735:17 | Input | -| main.rs:758:19:758:22 | Self | main.rs:733:5:765:5 | impl Reduce for MyImpl::<...> { ... } | -| main.rs:758:19:758:29 | ...::Input | main.rs:743:9:747:9 | type Input | -| main.rs:759:14:762:9 | Result::<...> | {EXTERNAL LOCATION} | enum Result | -| main.rs:760:13:760:16 | Self | main.rs:733:5:765:5 | impl Reduce for MyImpl::<...> { ... } | -| main.rs:760:13:760:24 | ...::Output | main.rs:751:11:754:9 | type Output | -| main.rs:761:13:761:16 | Self | main.rs:733:5:765:5 | impl Reduce for MyImpl::<...> { ... } | -| main.rs:761:13:761:23 | ...::Error | main.rs:747:11:751:9 | type Error | -| main.rs:768:5:768:7 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) | -| main.rs:768:11:768:14 | self | {EXTERNAL LOCATION} | Crate(std@0.0.0) | -| main.rs:770:15:770:17 | ztd | {EXTERNAL LOCATION} | Crate(std@0.0.0) | -| main.rs:770:15:770:25 | ...::string | {EXTERNAL LOCATION} | mod string | -| main.rs:770:15:770:33 | ...::String | {EXTERNAL LOCATION} | struct String | -| main.rs:780:7:780:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) | -| main.rs:780:7:780:26 | ...::identity | proc_macro.rs:15:1:18:1 | fn identity | -| main.rs:781:10:781:15 | ATrait | main.rs:776:5:778:5 | trait ATrait | -| main.rs:781:21:781:23 | i64 | {EXTERNAL LOCATION} | struct i64 | -| main.rs:783:11:783:13 | i64 | {EXTERNAL LOCATION} | struct i64 | -| main.rs:789:17:789:19 | Foo | main.rs:774:5:774:15 | struct Foo | -| main.rs:794:5:794:6 | my | main.rs:1:1:1:7 | mod my | -| main.rs:794:5:794:14 | ...::nested | my.rs:1:1:1:15 | mod nested | -| main.rs:794:5:794:23 | ...::nested1 | my/nested.rs:1:1:17:1 | mod nested1 | -| main.rs:794:5:794:32 | ...::nested2 | my/nested.rs:2:5:11:5 | mod nested2 | -| main.rs:794:5:794:35 | ...::f | my/nested.rs:3:9:5:9 | fn f | -| main.rs:795:5:795:6 | my | main.rs:1:1:1:7 | mod my | -| main.rs:795:5:795:9 | ...::f | my.rs:5:1:7:1 | fn f | -| main.rs:796:5:796:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 | -| main.rs:796:5:796:20 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 | -| main.rs:796:5:796:29 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 | -| main.rs:796:5:796:32 | ...::f | my2/nested2.rs:3:9:5:9 | fn f | -| main.rs:797:5:797:5 | f | my2/nested2.rs:3:9:5:9 | fn f | -| main.rs:798:5:798:5 | g | my2/nested2.rs:7:9:9:9 | fn g | -| main.rs:799:5:799:9 | crate | main.rs:0:0:0:0 | Crate(main@0.0.1) | -| main.rs:799:5:799:12 | ...::h | main.rs:57:1:76:1 | fn h | -| main.rs:800:5:800:6 | m1 | main.rs:20:1:44:1 | mod m1 | -| main.rs:800:5:800:10 | ...::m2 | main.rs:25:5:43:5 | mod m2 | -| main.rs:800:5:800:13 | ...::g | main.rs:30:9:34:9 | fn g | -| main.rs:801:5:801:6 | m1 | main.rs:20:1:44:1 | mod m1 | -| main.rs:801:5:801:10 | ...::m2 | main.rs:25:5:43:5 | mod m2 | -| main.rs:801:5:801:14 | ...::m3 | main.rs:36:9:42:9 | mod m3 | -| main.rs:801:5:801:17 | ...::h | main.rs:37:27:41:13 | fn h | -| main.rs:802:5:802:6 | m4 | main.rs:46:1:53:1 | mod m4 | -| main.rs:802:5:802:9 | ...::i | main.rs:49:5:52:5 | fn i | -| main.rs:803:5:803:5 | h | main.rs:57:1:76:1 | fn h | -| main.rs:804:5:804:11 | f_alias | my2/nested2.rs:3:9:5:9 | fn f | -| main.rs:805:5:805:11 | g_alias | my2/nested2.rs:7:9:9:9 | fn g | -| main.rs:806:5:806:5 | j | main.rs:104:1:108:1 | fn j | -| main.rs:807:5:807:6 | m6 | main.rs:116:1:128:1 | mod m6 | -| main.rs:807:5:807:9 | ...::g | main.rs:121:5:127:5 | fn g | -| main.rs:808:5:808:6 | m7 | main.rs:130:1:149:1 | mod m7 | -| main.rs:808:5:808:9 | ...::f | main.rs:141:5:148:5 | fn f | -| main.rs:809:5:809:6 | m8 | main.rs:151:1:205:1 | mod m8 | -| main.rs:809:5:809:9 | ...::g | main.rs:189:5:204:5 | fn g | -| main.rs:810:5:810:6 | m9 | main.rs:207:1:215:1 | mod m9 | -| main.rs:810:5:810:9 | ...::f | main.rs:210:5:214:5 | fn f | -| main.rs:811:5:811:7 | m11 | main.rs:238:1:275:1 | mod m11 | -| main.rs:811:5:811:10 | ...::f | main.rs:243:5:246:5 | fn f | -| main.rs:812:5:812:7 | m15 | main.rs:306:1:375:1 | mod m15 | -| main.rs:812:5:812:10 | ...::f | main.rs:362:5:374:5 | fn f | -| main.rs:813:5:813:7 | m16 | main.rs:377:1:469:1 | mod m16 | -| main.rs:813:5:813:10 | ...::f | main.rs:444:5:468:5 | fn f | -| main.rs:814:5:814:20 | trait_visibility | main.rs:471:1:521:1 | mod trait_visibility | -| main.rs:814:5:814:23 | ...::f | main.rs:498:5:520:5 | fn f | -| main.rs:815:5:815:7 | m17 | main.rs:523:1:553:1 | mod m17 | -| main.rs:815:5:815:10 | ...::f | main.rs:547:5:552:5 | fn f | -| main.rs:816:5:816:11 | nested6 | my2/nested2.rs:14:5:18:5 | mod nested6 | -| main.rs:816:5:816:14 | ...::f | my2/nested2.rs:15:9:17:9 | fn f | -| main.rs:817:5:817:11 | nested8 | my2/nested2.rs:22:5:26:5 | mod nested8 | -| main.rs:817:5:817:14 | ...::f | my2/nested2.rs:23:9:25:9 | fn f | -| main.rs:818:5:818:7 | my3 | my2/mod.rs:20:1:20:12 | mod my3 | -| main.rs:818:5:818:10 | ...::f | my2/my3/mod.rs:1:1:5:1 | fn f | -| main.rs:819:5:819:12 | nested_f | my/my4/my5/mod.rs:1:1:3:1 | fn f | -| main.rs:820:5:820:12 | my_alias | main.rs:1:1:1:7 | mod my | -| main.rs:820:5:820:22 | ...::nested_f | my/my4/my5/mod.rs:1:1:3:1 | fn f | -| main.rs:821:5:821:7 | m18 | main.rs:555:1:573:1 | mod m18 | -| main.rs:821:5:821:12 | ...::m19 | main.rs:560:5:572:5 | mod m19 | -| main.rs:821:5:821:17 | ...::m20 | main.rs:565:9:571:9 | mod m20 | -| main.rs:821:5:821:20 | ...::g | main.rs:566:13:570:13 | fn g | -| main.rs:822:5:822:7 | m23 | main.rs:602:1:627:1 | mod m23 | -| main.rs:822:5:822:10 | ...::f | main.rs:622:5:626:5 | fn f | -| main.rs:823:5:823:7 | m24 | main.rs:629:1:697:1 | mod m24 | -| main.rs:823:5:823:10 | ...::f | main.rs:683:5:696:5 | fn f | -| main.rs:824:5:824:8 | zelf | main.rs:0:0:0:0 | Crate(main@0.0.1) | -| main.rs:824:5:824:11 | ...::h | main.rs:57:1:76:1 | fn h | -| main.rs:825:5:825:13 | z_changed | main.rs:702:1:702:9 | fn z_changed | -| main.rs:826:5:826:11 | AStruct | main.rs:704:1:704:17 | struct AStruct | -| main.rs:826:5:826:22 | ...::z_on_type | main.rs:708:5:708:17 | fn z_on_type | -| main.rs:827:5:827:11 | AStruct | main.rs:704:1:704:17 | struct AStruct | -| main.rs:828:5:828:29 | impl_with_attribute_macro | main.rs:772:1:791:1 | mod impl_with_attribute_macro | -| main.rs:828:5:828:35 | ...::test | main.rs:787:5:790:5 | fn test | +| main.rs:388:24:388:24 | T | main.rs:380:7:380:7 | T | +| main.rs:389:13:389:16 | Self | main.rs:378:5:395:5 | trait Trait1 | +| main.rs:389:13:389:19 | ...::g | main.rs:384:9:386:9 | fn g | +| main.rs:393:18:393:18 | T | main.rs:380:7:380:7 | T | +| main.rs:401:9:403:9 | Trait1::<...> | main.rs:378:5:395:5 | trait Trait1 | +| main.rs:402:11:402:11 | T | main.rs:399:7:399:7 | T | +| main.rs:404:24:404:24 | T | main.rs:399:7:399:7 | T | +| main.rs:405:13:405:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:406:13:406:16 | Self | main.rs:397:5:410:5 | trait Trait2 | +| main.rs:406:13:406:19 | ...::g | main.rs:384:9:386:9 | fn g | +| main.rs:408:13:408:16 | Self | main.rs:397:5:410:5 | trait Trait2 | +| main.rs:408:13:408:19 | ...::c | main.rs:393:9:394:9 | Const | +| main.rs:415:10:417:5 | Trait1::<...> | main.rs:378:5:395:5 | trait Trait1 | +| main.rs:416:7:416:7 | S | main.rs:412:5:412:13 | struct S | +| main.rs:418:11:418:11 | S | main.rs:412:5:412:13 | struct S | +| main.rs:419:24:419:24 | S | main.rs:412:5:412:13 | struct S | +| main.rs:420:13:420:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:421:13:421:16 | Self | main.rs:412:5:412:13 | struct S | +| main.rs:421:13:421:19 | ...::g | main.rs:425:9:428:9 | fn g | +| main.rs:425:24:425:24 | S | main.rs:412:5:412:13 | struct S | +| main.rs:426:13:426:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:427:13:427:16 | Self | main.rs:412:5:412:13 | struct S | +| main.rs:427:13:427:19 | ...::c | main.rs:430:9:431:9 | Const | +| main.rs:430:18:430:18 | S | main.rs:412:5:412:13 | struct S | +| main.rs:430:22:430:22 | S | main.rs:412:5:412:13 | struct S | +| main.rs:435:10:437:5 | Trait2::<...> | main.rs:397:5:410:5 | trait Trait2 | +| main.rs:436:7:436:7 | S | main.rs:412:5:412:13 | struct S | +| main.rs:438:11:438:11 | S | main.rs:412:5:412:13 | struct S | +| main.rs:439:24:439:24 | S | main.rs:412:5:412:13 | struct S | +| main.rs:440:13:440:16 | Self | main.rs:412:5:412:13 | struct S | +| main.rs:440:13:440:19 | ...::g | main.rs:425:9:428:9 | fn g | +| main.rs:441:13:441:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:442:13:442:16 | Self | main.rs:412:5:412:13 | struct S | +| main.rs:442:13:442:19 | ...::c | main.rs:430:9:431:9 | Const | +| main.rs:448:9:448:15 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:449:17:449:17 | S | main.rs:412:5:412:13 | struct S | +| main.rs:450:10:450:10 | S | main.rs:412:5:412:13 | struct S | +| main.rs:451:14:453:11 | Trait1::<...> | main.rs:378:5:395:5 | trait Trait1 | +| main.rs:452:13:452:13 | S | main.rs:412:5:412:13 | struct S | +| main.rs:455:10:455:10 | S | main.rs:412:5:412:13 | struct S | +| main.rs:456:14:458:11 | Trait2::<...> | main.rs:397:5:410:5 | trait Trait2 | +| main.rs:457:13:457:13 | S | main.rs:412:5:412:13 | struct S | +| main.rs:460:9:460:9 | S | main.rs:412:5:412:13 | struct S | +| main.rs:460:9:460:12 | ...::g | main.rs:425:9:428:9 | fn g | +| main.rs:462:9:462:9 | S | main.rs:412:5:412:13 | struct S | +| main.rs:462:9:462:12 | ...::h | main.rs:388:9:391:9 | fn h | +| main.rs:464:9:464:9 | S | main.rs:412:5:412:13 | struct S | +| main.rs:464:9:464:12 | ...::c | main.rs:430:9:431:9 | Const | +| main.rs:465:10:465:10 | S | main.rs:412:5:412:13 | struct S | +| main.rs:466:14:468:11 | Trait1::<...> | main.rs:378:5:395:5 | trait Trait1 | +| main.rs:467:13:467:13 | S | main.rs:412:5:412:13 | struct S | +| main.rs:487:10:487:15 | Trait3 | main.rs:472:5:476:5 | trait Trait3 | +| main.rs:487:21:487:22 | S2 | main.rs:484:5:484:14 | struct S2 | +| main.rs:488:26:488:28 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:492:20:492:23 | Self | main.rs:484:5:484:14 | struct S2 | +| main.rs:492:20:492:34 | ...::AssocType | main.rs:487:26:489:9 | type AssocType | +| main.rs:497:10:497:15 | Trait4 | main.rs:478:5:482:5 | trait Trait4 | +| main.rs:497:21:497:22 | S2 | main.rs:484:5:484:14 | struct S2 | +| main.rs:498:26:498:29 | bool | {EXTERNAL LOCATION} | struct bool | +| main.rs:502:13:502:16 | Self | main.rs:484:5:484:14 | struct S2 | +| main.rs:502:13:502:19 | ...::f | main.rs:489:11:493:9 | fn f | +| main.rs:503:13:503:14 | S2 | main.rs:484:5:484:14 | struct S2 | +| main.rs:503:13:503:17 | ...::f | main.rs:489:11:493:9 | fn f | +| main.rs:504:20:504:23 | Self | main.rs:484:5:484:14 | struct S2 | +| main.rs:504:20:504:34 | ...::AssocType | main.rs:497:26:499:9 | type AssocType | +| main.rs:511:23:511:26 | Self | main.rs:508:5:512:5 | trait Trait5 | +| main.rs:511:23:511:33 | ...::Assoc | main.rs:509:9:509:19 | type Assoc | +| main.rs:515:10:515:15 | Trait5 | main.rs:508:5:512:5 | trait Trait5 | +| main.rs:515:21:515:21 | S | main.rs:412:5:412:13 | struct S | +| main.rs:516:22:516:24 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:520:16:520:19 | Self | main.rs:412:5:412:13 | struct S | +| main.rs:520:16:520:26 | ...::Assoc | main.rs:515:25:517:9 | type Assoc | +| main.rs:521:13:521:16 | Self | main.rs:412:5:412:13 | struct S | +| main.rs:521:13:521:23 | ...::Assoc | main.rs:519:9:522:9 | fn Assoc | +| main.rs:525:19:525:20 | T3 | main.rs:525:15:525:16 | T3 | +| main.rs:528:10:528:15 | Trait5 | main.rs:508:5:512:5 | trait Trait5 | +| main.rs:528:21:528:27 | S3::<...> | main.rs:525:5:525:22 | struct S3 | +| main.rs:528:24:528:26 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:529:22:529:24 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:533:16:533:19 | Self | main.rs:525:5:525:22 | struct S3 | +| main.rs:533:16:533:26 | ...::Assoc | main.rs:528:31:530:9 | type Assoc | +| main.rs:534:13:534:16 | Self | main.rs:525:5:525:22 | struct S3 | +| main.rs:534:13:534:23 | ...::Assoc | main.rs:532:9:535:9 | fn Assoc | +| main.rs:539:10:539:15 | Trait5 | main.rs:508:5:512:5 | trait Trait5 | +| main.rs:539:21:539:28 | S3::<...> | main.rs:525:5:525:22 | struct S3 | +| main.rs:539:24:539:27 | bool | {EXTERNAL LOCATION} | struct bool | +| main.rs:540:22:540:25 | bool | {EXTERNAL LOCATION} | struct bool | +| main.rs:544:16:544:19 | Self | main.rs:525:5:525:22 | struct S3 | +| main.rs:544:16:544:26 | ...::Assoc | main.rs:539:32:541:9 | type Assoc | +| main.rs:545:14:545:17 | Self | main.rs:525:5:525:22 | struct S3 | +| main.rs:545:14:545:24 | ...::Assoc | main.rs:543:9:546:9 | fn Assoc | +| main.rs:550:10:550:16 | S3::<...> | main.rs:525:5:525:22 | struct S3 | +| main.rs:550:13:550:15 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:551:20:551:22 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:557:10:557:17 | S3::<...> | main.rs:525:5:525:22 | struct S3 | +| main.rs:557:13:557:16 | bool | {EXTERNAL LOCATION} | struct bool | +| main.rs:558:20:558:23 | bool | {EXTERNAL LOCATION} | struct bool | +| main.rs:565:9:565:17 | S3::<...> | main.rs:525:5:525:22 | struct S3 | +| main.rs:565:9:566:13 | ...::Assoc | main.rs:532:9:535:9 | fn Assoc | +| main.rs:565:9:566:13 | ...::Assoc | main.rs:543:9:546:9 | fn Assoc | +| main.rs:565:14:565:16 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:568:9:568:18 | S3::<...> | main.rs:525:5:525:22 | struct S3 | +| main.rs:568:9:569:10 | ...::f1 | main.rs:550:20:553:9 | fn f1 | +| main.rs:568:9:569:10 | ...::f1 | main.rs:557:21:560:9 | fn f1 | +| main.rs:568:14:568:17 | bool | {EXTERNAL LOCATION} | struct bool | +| main.rs:571:9:571:17 | S3::<...> | main.rs:525:5:525:22 | struct S3 | +| main.rs:571:9:572:10 | ...::f1 | main.rs:550:20:553:9 | fn f1 | +| main.rs:571:9:572:10 | ...::f1 | main.rs:557:21:560:9 | fn f1 | +| main.rs:571:14:571:16 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:588:14:588:16 | Foo | main.rs:578:9:580:9 | trait Foo | +| main.rs:588:22:588:22 | X | main.rs:586:9:586:21 | struct X | +| main.rs:590:17:590:23 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:594:14:594:16 | Bar | main.rs:582:9:584:9 | trait Bar | +| main.rs:594:22:594:22 | X | main.rs:586:9:586:21 | struct X | +| main.rs:596:17:596:23 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:601:9:601:9 | m | main.rs:577:5:599:5 | mod m | +| main.rs:601:9:601:12 | ...::X | main.rs:586:9:586:21 | struct X | +| main.rs:604:17:604:17 | X | main.rs:586:9:586:21 | struct X | +| main.rs:607:17:607:17 | m | main.rs:577:5:599:5 | mod m | +| main.rs:607:17:607:22 | ...::Foo | main.rs:578:9:580:9 | trait Foo | +| main.rs:608:13:608:13 | X | main.rs:586:9:586:21 | struct X | +| main.rs:608:13:608:23 | ...::a_method | main.rs:588:26:591:13 | fn a_method | +| main.rs:612:17:612:17 | m | main.rs:577:5:599:5 | mod m | +| main.rs:612:17:612:22 | ...::Bar | main.rs:582:9:584:9 | trait Bar | +| main.rs:613:13:613:13 | X | main.rs:586:9:586:21 | struct X | +| main.rs:613:13:613:23 | ...::a_method | main.rs:594:26:597:13 | fn a_method | +| main.rs:617:17:617:17 | m | main.rs:577:5:599:5 | mod m | +| main.rs:617:17:617:22 | ...::Bar | main.rs:582:9:584:9 | trait Bar | +| main.rs:618:13:618:13 | X | main.rs:586:9:586:21 | struct X | +| main.rs:618:13:618:23 | ...::a_method | main.rs:594:26:597:13 | fn a_method | +| main.rs:623:13:623:13 | m | main.rs:577:5:599:5 | mod m | +| main.rs:623:13:623:18 | ...::Bar | main.rs:582:9:584:9 | trait Bar | +| main.rs:623:13:623:28 | ...::a_method | main.rs:583:13:583:31 | fn a_method | +| main.rs:636:10:636:16 | MyTrait | main.rs:629:5:631:5 | trait MyTrait | +| main.rs:637:9:637:9 | S | main.rs:633:5:633:13 | struct S | +| main.rs:639:13:639:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:645:7:645:13 | MyTrait | main.rs:629:5:631:5 | trait MyTrait | +| main.rs:646:10:646:10 | T | main.rs:644:10:644:10 | T | +| main.rs:648:9:648:9 | T | main.rs:644:10:644:10 | T | +| main.rs:648:9:648:12 | ...::f | main.rs:630:9:630:20 | fn f | +| main.rs:649:9:649:15 | MyTrait | main.rs:629:5:631:5 | trait MyTrait | +| main.rs:649:9:649:18 | ...::f | main.rs:630:9:630:20 | fn f | +| main.rs:654:9:654:9 | g | main.rs:643:5:650:5 | fn g | +| main.rs:655:11:655:11 | S | main.rs:633:5:633:13 | struct S | +| main.rs:662:9:662:15 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:667:13:667:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:672:17:672:23 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:673:17:673:21 | super | main.rs:665:5:677:5 | mod m19 | +| main.rs:673:17:673:24 | ...::f | main.rs:666:9:668:9 | fn f | +| main.rs:674:17:674:21 | super | main.rs:665:5:677:5 | mod m19 | +| main.rs:674:17:674:28 | ...::super | main.rs:660:1:678:1 | mod m18 | +| main.rs:674:17:674:31 | ...::f | main.rs:661:5:663:5 | fn f | +| main.rs:691:13:691:17 | super | main.rs:680:1:705:1 | mod m21 | +| main.rs:691:13:691:22 | ...::m22 | main.rs:681:5:687:5 | mod m22 | +| main.rs:691:13:691:30 | ...::MyEnum | main.rs:682:9:684:9 | enum MyEnum | +| main.rs:692:13:692:16 | self | main.rs:682:9:684:9 | enum MyEnum | +| main.rs:696:13:696:17 | super | main.rs:680:1:705:1 | mod m21 | +| main.rs:696:13:696:22 | ...::m22 | main.rs:681:5:687:5 | mod m22 | +| main.rs:696:13:696:32 | ...::MyStruct | main.rs:686:9:686:28 | struct MyStruct | +| main.rs:697:13:697:16 | self | main.rs:686:9:686:28 | struct MyStruct | +| main.rs:701:21:701:26 | MyEnum | main.rs:682:9:684:9 | enum MyEnum | +| main.rs:701:21:701:29 | ...::A | main.rs:683:13:683:13 | A | +| main.rs:702:21:702:28 | MyStruct | main.rs:686:9:686:28 | struct MyStruct | +| main.rs:718:10:720:5 | Trait1::<...> | main.rs:708:5:713:5 | trait Trait1 | +| main.rs:719:7:719:10 | Self | main.rs:715:5:715:13 | struct S | +| main.rs:721:11:721:11 | S | main.rs:715:5:715:13 | struct S | +| main.rs:723:13:723:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:729:17:729:17 | S | main.rs:715:5:715:13 | struct S | +| main.rs:745:15:745:15 | T | main.rs:744:26:744:26 | T | +| main.rs:750:9:750:24 | GenericStruct::<...> | main.rs:743:5:746:5 | struct GenericStruct | +| main.rs:750:23:750:23 | T | main.rs:749:10:749:10 | T | +| main.rs:752:9:752:9 | T | main.rs:749:10:749:10 | T | +| main.rs:752:12:752:17 | TraitA | main.rs:735:5:737:5 | trait TraitA | +| main.rs:761:9:761:24 | GenericStruct::<...> | main.rs:743:5:746:5 | struct GenericStruct | +| main.rs:761:23:761:23 | T | main.rs:760:10:760:10 | T | +| main.rs:763:9:763:9 | T | main.rs:760:10:760:10 | T | +| main.rs:763:12:763:17 | TraitB | main.rs:739:5:741:5 | trait TraitB | +| main.rs:764:9:764:9 | T | main.rs:760:10:760:10 | T | +| main.rs:764:12:764:17 | TraitA | main.rs:735:5:737:5 | trait TraitA | +| main.rs:775:10:775:15 | TraitA | main.rs:735:5:737:5 | trait TraitA | +| main.rs:775:21:775:31 | Implementor | main.rs:772:5:772:23 | struct Implementor | +| main.rs:777:13:777:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:782:10:782:15 | TraitB | main.rs:739:5:741:5 | trait TraitB | +| main.rs:782:21:782:31 | Implementor | main.rs:772:5:772:23 | struct Implementor | +| main.rs:784:13:784:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:790:24:790:34 | Implementor | main.rs:772:5:772:23 | struct Implementor | +| main.rs:791:23:791:35 | GenericStruct | main.rs:743:5:746:5 | struct GenericStruct | +| main.rs:797:9:797:36 | GenericStruct::<...> | main.rs:743:5:746:5 | struct GenericStruct | +| main.rs:797:9:797:50 | ...::call_trait_a | main.rs:754:9:756:9 | fn call_trait_a | +| main.rs:797:25:797:35 | Implementor | main.rs:772:5:772:23 | struct Implementor | +| main.rs:800:9:800:36 | GenericStruct::<...> | main.rs:743:5:746:5 | struct GenericStruct | +| main.rs:800:9:800:47 | ...::call_both | main.rs:766:9:769:9 | fn call_both | +| main.rs:800:25:800:35 | Implementor | main.rs:772:5:772:23 | struct Implementor | +| main.rs:806:3:806:12 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) | +| main.rs:806:3:806:24 | ...::add_suffix | proc_macro.rs:4:1:13:1 | fn add_suffix | +| main.rs:810:6:810:12 | AStruct | main.rs:809:1:809:17 | struct AStruct | +| main.rs:812:7:812:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) | +| main.rs:812:7:812:28 | ...::add_suffix | proc_macro.rs:4:1:13:1 | fn add_suffix | +| main.rs:815:7:815:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) | +| main.rs:815:7:815:28 | ...::add_suffix | proc_macro.rs:4:1:13:1 | fn add_suffix | +| main.rs:820:9:820:11 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) | +| main.rs:820:9:820:19 | ...::marker | {EXTERNAL LOCATION} | mod marker | +| main.rs:820:9:820:32 | ...::PhantomData | {EXTERNAL LOCATION} | struct PhantomData | +| main.rs:821:9:821:11 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) | +| main.rs:821:9:821:19 | ...::result | {EXTERNAL LOCATION} | mod result | +| main.rs:821:9:821:27 | ...::Result | {EXTERNAL LOCATION} | enum Result | +| main.rs:829:19:829:22 | Self | main.rs:823:5:831:5 | trait Reduce | +| main.rs:829:19:829:29 | ...::Input | main.rs:824:9:824:19 | type Input | +| main.rs:830:14:830:46 | Result::<...> | {EXTERNAL LOCATION} | enum Result | +| main.rs:830:21:830:24 | Self | main.rs:823:5:831:5 | trait Reduce | +| main.rs:830:21:830:32 | ...::Output | main.rs:825:21:826:20 | type Output | +| main.rs:830:35:830:38 | Self | main.rs:823:5:831:5 | trait Reduce | +| main.rs:830:35:830:45 | ...::Error | main.rs:824:21:825:19 | type Error | +| main.rs:834:17:834:34 | PhantomData::<...> | {EXTERNAL LOCATION} | struct PhantomData | +| main.rs:834:29:834:33 | Input | main.rs:833:19:833:23 | Input | +| main.rs:835:17:835:34 | PhantomData::<...> | {EXTERNAL LOCATION} | struct PhantomData | +| main.rs:835:29:835:33 | Error | main.rs:833:26:833:30 | Error | +| main.rs:842:11:842:16 | Reduce | main.rs:823:5:831:5 | trait Reduce | +| main.rs:843:13:846:9 | MyImpl::<...> | main.rs:833:5:836:5 | struct MyImpl | +| main.rs:844:13:844:17 | Input | main.rs:840:13:840:17 | Input | +| main.rs:845:13:845:17 | Error | main.rs:841:13:841:17 | Error | +| main.rs:848:22:851:9 | Result::<...> | {EXTERNAL LOCATION} | enum Result | +| main.rs:849:13:849:17 | Input | main.rs:840:13:840:17 | Input | +| main.rs:850:13:850:16 | Self | main.rs:833:5:836:5 | struct MyImpl | +| main.rs:850:13:850:23 | ...::Error | main.rs:852:11:856:9 | type Error | +| main.rs:853:22:855:9 | Option::<...> | {EXTERNAL LOCATION} | enum Option | +| main.rs:854:11:854:15 | Error | main.rs:841:13:841:17 | Error | +| main.rs:858:13:858:17 | Input | main.rs:840:13:840:17 | Input | +| main.rs:863:19:863:22 | Self | main.rs:833:5:836:5 | struct MyImpl | +| main.rs:863:19:863:29 | ...::Input | main.rs:848:9:852:9 | type Input | +| main.rs:864:14:867:9 | Result::<...> | {EXTERNAL LOCATION} | enum Result | +| main.rs:865:13:865:16 | Self | main.rs:833:5:836:5 | struct MyImpl | +| main.rs:865:13:865:24 | ...::Output | main.rs:856:11:859:9 | type Output | +| main.rs:866:13:866:16 | Self | main.rs:833:5:836:5 | struct MyImpl | +| main.rs:866:13:866:23 | ...::Error | main.rs:852:11:856:9 | type Error | +| main.rs:873:5:873:7 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) | +| main.rs:873:11:873:14 | self | {EXTERNAL LOCATION} | Crate(std@0.0.0) | +| main.rs:875:15:875:17 | ztd | {EXTERNAL LOCATION} | Crate(std@0.0.0) | +| main.rs:875:15:875:25 | ...::string | {EXTERNAL LOCATION} | mod string | +| main.rs:875:15:875:33 | ...::String | {EXTERNAL LOCATION} | struct String | +| main.rs:885:7:885:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) | +| main.rs:885:7:885:26 | ...::identity | proc_macro.rs:15:1:18:1 | fn identity | +| main.rs:886:10:886:15 | ATrait | main.rs:881:5:883:5 | trait ATrait | +| main.rs:886:21:886:23 | i64 | {EXTERNAL LOCATION} | struct i64 | +| main.rs:888:11:888:13 | i64 | {EXTERNAL LOCATION} | struct i64 | +| main.rs:894:17:894:19 | Foo | main.rs:879:5:879:15 | struct Foo | +| main.rs:900:22:900:32 | Option::<...> | {EXTERNAL LOCATION} | enum Option | +| main.rs:900:29:900:31 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:901:17:901:20 | Some | {EXTERNAL LOCATION} | Some | +| main.rs:902:17:902:27 | Option::<...> | {EXTERNAL LOCATION} | enum Option | +| main.rs:902:24:902:26 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:903:13:903:16 | Some | {EXTERNAL LOCATION} | Some | +| main.rs:904:17:904:20 | None | {EXTERNAL LOCATION} | None | +| main.rs:906:13:906:16 | None | {EXTERNAL LOCATION} | None | +| main.rs:907:17:907:20 | None | {EXTERNAL LOCATION} | None | +| main.rs:916:19:916:29 | Option::<...> | {EXTERNAL LOCATION} | enum Option | +| main.rs:916:26:916:28 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:917:26:917:29 | test | main.rs:899:5:913:5 | fn test | +| main.rs:923:14:923:16 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:928:17:928:20 | Some | {EXTERNAL LOCATION} | Some | +| main.rs:930:13:930:16 | Some | {EXTERNAL LOCATION} | Some | +| main.rs:935:13:935:16 | Some | {EXTERNAL LOCATION} | Some | +| main.rs:935:18:935:18 | z | main.rs:922:5:924:12 | Const | +| main.rs:935:24:935:24 | z | main.rs:922:5:924:12 | Const | +| main.rs:942:5:942:6 | my | main.rs:1:1:1:7 | mod my | +| main.rs:942:5:942:14 | ...::nested | my.rs:1:1:1:15 | mod nested | +| main.rs:942:5:942:23 | ...::nested1 | my/nested.rs:1:1:17:1 | mod nested1 | +| main.rs:942:5:942:32 | ...::nested2 | my/nested.rs:2:5:11:5 | mod nested2 | +| main.rs:942:5:942:35 | ...::f | my/nested.rs:3:9:5:9 | fn f | +| main.rs:943:5:943:6 | my | main.rs:1:1:1:7 | mod my | +| main.rs:943:5:943:9 | ...::f | my.rs:5:1:7:1 | fn f | +| main.rs:944:5:944:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 | +| main.rs:944:5:944:20 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 | +| main.rs:944:5:944:29 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 | +| main.rs:944:5:944:32 | ...::f | my2/nested2.rs:3:9:5:9 | fn f | +| main.rs:945:5:945:5 | f | my2/nested2.rs:3:9:5:9 | fn f | +| main.rs:946:5:946:5 | g | my2/nested2.rs:7:9:9:9 | fn g | +| main.rs:947:5:947:9 | crate | main.rs:0:0:0:0 | Crate(main@0.0.1) | +| main.rs:947:5:947:12 | ...::h | main.rs:57:1:76:1 | fn h | +| main.rs:948:5:948:6 | m1 | main.rs:20:1:44:1 | mod m1 | +| main.rs:948:5:948:10 | ...::m2 | main.rs:25:5:43:5 | mod m2 | +| main.rs:948:5:948:13 | ...::g | main.rs:30:9:34:9 | fn g | +| main.rs:949:5:949:6 | m1 | main.rs:20:1:44:1 | mod m1 | +| main.rs:949:5:949:10 | ...::m2 | main.rs:25:5:43:5 | mod m2 | +| main.rs:949:5:949:14 | ...::m3 | main.rs:36:9:42:9 | mod m3 | +| main.rs:949:5:949:17 | ...::h | main.rs:37:27:41:13 | fn h | +| main.rs:950:5:950:6 | m4 | main.rs:46:1:53:1 | mod m4 | +| main.rs:950:5:950:9 | ...::i | main.rs:49:5:52:5 | fn i | +| main.rs:951:5:951:5 | h | main.rs:57:1:76:1 | fn h | +| main.rs:952:5:952:11 | f_alias | my2/nested2.rs:3:9:5:9 | fn f | +| main.rs:953:5:953:11 | g_alias | my2/nested2.rs:7:9:9:9 | fn g | +| main.rs:954:5:954:5 | j | main.rs:104:1:108:1 | fn j | +| main.rs:955:5:955:6 | m6 | main.rs:116:1:128:1 | mod m6 | +| main.rs:955:5:955:9 | ...::g | main.rs:121:5:127:5 | fn g | +| main.rs:956:5:956:6 | m7 | main.rs:130:1:149:1 | mod m7 | +| main.rs:956:5:956:9 | ...::f | main.rs:141:5:148:5 | fn f | +| main.rs:957:5:957:6 | m8 | main.rs:151:1:205:1 | mod m8 | +| main.rs:957:5:957:9 | ...::g | main.rs:189:5:204:5 | fn g | +| main.rs:958:5:958:6 | m9 | main.rs:207:1:215:1 | mod m9 | +| main.rs:958:5:958:9 | ...::f | main.rs:210:5:214:5 | fn f | +| main.rs:959:5:959:7 | m11 | main.rs:238:1:275:1 | mod m11 | +| main.rs:959:5:959:10 | ...::f | main.rs:243:5:246:5 | fn f | +| main.rs:960:5:960:7 | m15 | main.rs:306:1:375:1 | mod m15 | +| main.rs:960:5:960:10 | ...::f | main.rs:362:5:374:5 | fn f | +| main.rs:961:5:961:7 | m16 | main.rs:377:1:574:1 | mod m16 | +| main.rs:961:5:961:10 | ...::f | main.rs:446:5:470:5 | fn f | +| main.rs:962:5:962:20 | trait_visibility | main.rs:576:1:626:1 | mod trait_visibility | +| main.rs:962:5:962:23 | ...::f | main.rs:603:5:625:5 | fn f | +| main.rs:963:5:963:7 | m17 | main.rs:628:1:658:1 | mod m17 | +| main.rs:963:5:963:10 | ...::f | main.rs:652:5:657:5 | fn f | +| main.rs:964:5:964:11 | nested6 | my2/nested2.rs:14:5:18:5 | mod nested6 | +| main.rs:964:5:964:14 | ...::f | my2/nested2.rs:15:9:17:9 | fn f | +| main.rs:965:5:965:11 | nested8 | my2/nested2.rs:22:5:26:5 | mod nested8 | +| main.rs:965:5:965:14 | ...::f | my2/nested2.rs:23:9:25:9 | fn f | +| main.rs:966:5:966:7 | my3 | my2/mod.rs:20:1:20:12 | mod my3 | +| main.rs:966:5:966:10 | ...::f | my2/my3/mod.rs:1:1:5:1 | fn f | +| main.rs:967:5:967:12 | nested_f | my/my4/my5/mod.rs:1:1:3:1 | fn f | +| main.rs:968:5:968:12 | my_alias | main.rs:1:1:1:7 | mod my | +| main.rs:968:5:968:22 | ...::nested_f | my/my4/my5/mod.rs:1:1:3:1 | fn f | +| main.rs:969:5:969:7 | m18 | main.rs:660:1:678:1 | mod m18 | +| main.rs:969:5:969:12 | ...::m19 | main.rs:665:5:677:5 | mod m19 | +| main.rs:969:5:969:17 | ...::m20 | main.rs:670:9:676:9 | mod m20 | +| main.rs:969:5:969:20 | ...::g | main.rs:671:13:675:13 | fn g | +| main.rs:970:5:970:7 | m23 | main.rs:707:1:732:1 | mod m23 | +| main.rs:970:5:970:10 | ...::f | main.rs:727:5:731:5 | fn f | +| main.rs:971:5:971:7 | m24 | main.rs:734:1:802:1 | mod m24 | +| main.rs:971:5:971:10 | ...::f | main.rs:788:5:801:5 | fn f | +| main.rs:972:5:972:8 | zelf | main.rs:0:0:0:0 | Crate(main@0.0.1) | +| main.rs:972:5:972:11 | ...::h | main.rs:57:1:76:1 | fn h | +| main.rs:973:5:973:13 | z_changed | main.rs:807:1:807:9 | fn z_changed | +| main.rs:974:5:974:11 | AStruct | main.rs:809:1:809:17 | struct AStruct | +| main.rs:974:5:974:22 | ...::z_on_type | main.rs:813:5:813:17 | fn z_on_type | +| main.rs:975:5:975:11 | AStruct | main.rs:809:1:809:17 | struct AStruct | +| main.rs:976:5:976:29 | impl_with_attribute_macro | main.rs:877:1:896:1 | mod impl_with_attribute_macro | +| main.rs:976:5:976:35 | ...::test | main.rs:892:5:895:5 | fn test | +| main.rs:977:5:977:12 | patterns | main.rs:898:1:939:1 | mod patterns | +| main.rs:977:5:977:18 | ...::test | main.rs:899:5:913:5 | fn test | | my2/mod.rs:4:5:4:11 | println | {EXTERNAL LOCATION} | MacroRules | | my2/mod.rs:5:5:5:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 | | my2/mod.rs:5:5:5:20 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 | @@ -493,7 +575,7 @@ resolvePath | my2/my3/mod.rs:3:5:3:5 | g | my2/mod.rs:3:1:6:1 | fn g | | my2/my3/mod.rs:4:5:4:5 | h | main.rs:57:1:76:1 | fn h | | my2/my3/mod.rs:7:5:7:9 | super | my2/mod.rs:1:1:25:34 | SourceFile | -| my2/my3/mod.rs:7:5:7:16 | ...::super | main.rs:1:1:829:2 | SourceFile | +| my2/my3/mod.rs:7:5:7:16 | ...::super | main.rs:1:1:978:2 | SourceFile | | my2/my3/mod.rs:7:5:7:19 | ...::h | main.rs:57:1:76:1 | fn h | | my2/my3/mod.rs:8:5:8:9 | super | my2/mod.rs:1:1:25:34 | SourceFile | | my2/my3/mod.rs:8:5:8:12 | ...::g | my2/mod.rs:3:1:6:1 | fn g | diff --git a/rust/ql/test/library-tests/path-resolution/path-resolution.ql b/rust/ql/test/library-tests/path-resolution/path-resolution.ql index 0fe49a8e386..f7955929b83 100644 --- a/rust/ql/test/library-tests/path-resolution/path-resolution.ql +++ b/rust/ql/test/library-tests/path-resolution/path-resolution.ql @@ -5,7 +5,7 @@ import TestUtils query predicate mod(Module m) { toBeTested(m) } -query predicate resolvePath(Path p, ItemNode i) { +query predicate resolvePath(PathExt p, ItemNode i) { toBeTested(p) and not p.isFromMacroExpansion() and i = resolvePath(p) diff --git a/rust/ql/test/library-tests/sensitivedata/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/sensitivedata/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index ce79c75327a..00000000000 --- a/rust/ql/test/library-tests/sensitivedata/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -multipleCallTargets -| test.rs:288:7:288:36 | ... .as_str() | diff --git a/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected index 7ee176a136f..38a68818c75 100644 --- a/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected @@ -1,14 +1,34 @@ -multipleCallTargets +multipleResolvedTargets +| blanket_impl.rs:33:13:33:17 | * ... | | dereference.rs:69:15:69:24 | e1.deref() | +| dereference.rs:73:15:73:17 | * ... | +| dereference.rs:77:16:77:18 | * ... | | dereference.rs:182:17:182:26 | ... .foo() | | dereference.rs:183:17:183:23 | S.foo() | | dereference.rs:184:17:184:30 | ... .foo() | | dereference.rs:186:17:186:25 | S.bar(...) | | dereference.rs:187:17:187:29 | S.bar(...) | -| main.rs:590:9:590:18 | ...::m(...) | +| dyn_type.rs:65:20:65:23 | * ... | +| dyn_type.rs:69:21:69:24 | * ... | +| dyn_type.rs:90:10:90:13 | * ... | +| invalid/main.rs:69:13:69:17 | * ... | +| invalid/main.rs:76:13:76:17 | * ... | +| main.rs:1077:14:1077:18 | * ... | +| main.rs:1159:26:1159:30 | * ... | +| main.rs:1504:14:1504:21 | * ... | +| main.rs:1504:16:1504:20 | * ... | +| main.rs:1509:14:1509:18 | * ... | +| main.rs:1540:27:1540:29 | * ... | +| main.rs:1654:17:1654:24 | * ... | +| main.rs:1654:18:1654:24 | * ... | +| main.rs:1792:17:1792:21 | * ... | +| main.rs:1807:28:1807:32 | * ... | +| main.rs:2440:13:2440:18 | * ... | | main.rs:2634:13:2634:31 | ...::from(...) | | main.rs:2635:13:2635:31 | ...::from(...) | | main.rs:2636:13:2636:31 | ...::from(...) | | main.rs:2642:13:2642:31 | ...::from(...) | | main.rs:2643:13:2643:31 | ...::from(...) | | main.rs:2644:13:2644:31 | ...::from(...) | +| pattern_matching.rs:273:13:273:27 | * ... | +| pattern_matching.rs:273:14:273:27 | * ... | diff --git a/rust/ql/test/library-tests/type-inference/main.rs b/rust/ql/test/library-tests/type-inference/main.rs index bf53c4906e3..f78202969b8 100644 --- a/rust/ql/test/library-tests/type-inference/main.rs +++ b/rust/ql/test/library-tests/type-inference/main.rs @@ -587,7 +587,7 @@ mod impl_overlap { println!("{:?}", S3::m(&w, x)); // $ target=S3::m S4.m(); // $ target=::m - S4::m(&S4); // $ target=::m $ SPURIOUS: target=MyTrait1::m + S4::m(&S4); // $ target=::m S5(0i32).m(); // $ target=_as_MyTrait1>::m S5::m(&S5(0i32)); // $ target=_as_MyTrait1>::m S5(true).m(); // $ target=MyTrait1::m diff --git a/rust/ql/test/library-tests/type-inference/raw_pointer.rs b/rust/ql/test/library-tests/type-inference/raw_pointer.rs new file mode 100644 index 00000000000..bf4537f30ce --- /dev/null +++ b/rust/ql/test/library-tests/type-inference/raw_pointer.rs @@ -0,0 +1,60 @@ +use std::ptr::null_mut; + +fn raw_pointer_const_deref(x: *const i32) -> i32 { + let _y = unsafe { *x }; // $ type=_y:i32 + 0 +} + +fn raw_pointer_mut_deref(x: *mut bool) -> i32 { + let _y = unsafe { *x }; // $ type=_y:bool + 0 +} + +fn raw_const_borrow() { + let a: i64 = 10; + let x = &raw const a; // $ type=x:TPtrConst.i64 + unsafe { + let _y = *x; // $ type=_y:i64 + } +} + +fn raw_mut_borrow() { + let mut a = 10i32; + let x = &raw mut a; // $ type=x:TPtrMut.i32 + unsafe { + let _y = *x; // $ type=_y:i32 + } +} + +fn raw_mut_write(cond: bool) { + let a = 10i32; + // The type of `ptr_written` must be inferred from the write below. + let ptr_written = null_mut(); // $ target=null_mut type=ptr_written:TPtrMut.i32 + if cond { + unsafe { + // NOTE: This write is undefined behavior because `ptr_written` is a null pointer. + *ptr_written = a; + let _y = *ptr_written; // $ type=_y:i32 + } + } +} + +fn raw_type_from_deref(cond: bool) { + // The type of `ptr_read` must be inferred from the read below. + let ptr_read = null_mut(); // $ target=null_mut type=ptr_read:TPtrMut.i64 + if cond { + unsafe { + // NOTE: This read is undefined behavior because `ptr_read` is a null pointer. + let _y: i64 = *ptr_read; + } + } +} + +pub fn test() { + raw_pointer_const_deref(&10); // $ target=raw_pointer_const_deref + raw_pointer_mut_deref(&mut true); // $ target=raw_pointer_mut_deref + raw_const_borrow(); // $ target=raw_const_borrow + raw_mut_borrow(); // $ target=raw_mut_borrow + raw_mut_write(false); // $ target=raw_mut_write + raw_type_from_deref(false); // $ target=raw_type_from_deref +} diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected index a56b6b7c475..ff3545f0c0f 100644 --- a/rust/ql/test/library-tests/type-inference/type-inference.expected +++ b/rust/ql/test/library-tests/type-inference/type-inference.expected @@ -1,3 +1,4485 @@ +inferCertainType +| blanket_impl.rs:15:18:15:22 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:15:18:15:22 | SelfParam | TRef | blanket_impl.rs:9:5:10:14 | S2 | +| blanket_impl.rs:15:42:17:9 | { ... } | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:15:42:17:9 | { ... } | TRef | blanket_impl.rs:6:5:7:14 | S1 | +| blanket_impl.rs:16:13:16:15 | &S1 | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:21:19:21:23 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:21:19:21:23 | SelfParam | TRef | blanket_impl.rs:20:5:22:5 | Self [trait Clone1] | +| blanket_impl.rs:25:22:25:26 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:25:22:25:26 | SelfParam | TRef | blanket_impl.rs:24:5:28:5 | Self [trait Duplicatable] | +| blanket_impl.rs:32:19:32:23 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:32:19:32:23 | SelfParam | TRef | blanket_impl.rs:6:5:7:14 | S1 | +| blanket_impl.rs:32:34:34:9 | { ... } | | blanket_impl.rs:6:5:7:14 | S1 | +| blanket_impl.rs:33:14:33:17 | self | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:33:14:33:17 | self | TRef | blanket_impl.rs:6:5:7:14 | S1 | +| blanket_impl.rs:40:22:40:26 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:40:22:40:26 | SelfParam | TRef | blanket_impl.rs:38:10:38:18 | T | +| blanket_impl.rs:40:37:42:9 | { ... } | | blanket_impl.rs:38:10:38:18 | T | +| blanket_impl.rs:41:13:41:16 | self | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:41:13:41:16 | self | TRef | blanket_impl.rs:38:10:38:18 | T | +| blanket_impl.rs:45:33:60:5 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:47:18:47:25 | "{x1:?}\\n" | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:47:18:47:25 | "{x1:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| blanket_impl.rs:47:18:47:25 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:47:18:47:25 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:48:18:48:22 | (...) | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:48:19:48:21 | &S1 | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:49:18:49:25 | "{x2:?}\\n" | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:49:18:49:25 | "{x2:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| blanket_impl.rs:49:18:49:25 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:49:18:49:25 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:51:18:51:25 | "{x3:?}\\n" | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:51:18:51:25 | "{x3:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| blanket_impl.rs:51:18:51:25 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:51:18:51:25 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:52:18:52:22 | (...) | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:52:19:52:21 | &S1 | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:53:18:53:25 | "{x4:?}\\n" | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:53:18:53:25 | "{x4:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| blanket_impl.rs:53:18:53:25 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:53:18:53:25 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:54:32:54:34 | &S1 | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:55:18:55:25 | "{x5:?}\\n" | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:55:18:55:25 | "{x5:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| blanket_impl.rs:55:18:55:25 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:55:18:55:25 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:57:18:57:25 | "{x6:?}\\n" | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:57:18:57:25 | "{x6:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| blanket_impl.rs:57:18:57:25 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:57:18:57:25 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:58:18:58:22 | (...) | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:58:19:58:21 | &S2 | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:59:18:59:25 | "{x7:?}\\n" | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:59:18:59:25 | "{x7:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| blanket_impl.rs:59:18:59:25 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:59:18:59:25 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:68:24:68:24 | x | | {EXTERNAL LOCATION} | i64 | +| blanket_impl.rs:68:32:68:32 | y | | blanket_impl.rs:67:5:69:5 | Self [trait Trait1] | +| blanket_impl.rs:72:24:72:24 | x | | {EXTERNAL LOCATION} | i64 | +| blanket_impl.rs:72:32:72:32 | y | | blanket_impl.rs:71:5:73:5 | Self [trait Trait2] | +| blanket_impl.rs:77:24:77:24 | x | | {EXTERNAL LOCATION} | i64 | +| blanket_impl.rs:77:32:77:32 | y | | blanket_impl.rs:64:5:65:14 | S1 | +| blanket_impl.rs:77:49:79:9 | { ... } | | blanket_impl.rs:64:5:65:14 | S1 | +| blanket_impl.rs:78:13:78:13 | y | | blanket_impl.rs:64:5:65:14 | S1 | +| blanket_impl.rs:84:24:84:24 | x | | {EXTERNAL LOCATION} | i64 | +| blanket_impl.rs:84:32:84:32 | y | | blanket_impl.rs:82:10:82:18 | T | +| blanket_impl.rs:84:49:86:9 | { ... } | | blanket_impl.rs:82:10:82:18 | T | +| blanket_impl.rs:85:28:85:28 | x | | {EXTERNAL LOCATION} | i64 | +| blanket_impl.rs:85:31:85:31 | y | | blanket_impl.rs:82:10:82:18 | T | +| blanket_impl.rs:89:33:98:5 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:90:13:90:14 | x1 | | blanket_impl.rs:64:5:65:14 | S1 | +| blanket_impl.rs:90:18:90:39 | ...::assoc_func1(...) | | blanket_impl.rs:64:5:65:14 | S1 | +| blanket_impl.rs:91:18:91:25 | "{x1:?}\\n" | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:91:18:91:25 | "{x1:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| blanket_impl.rs:91:18:91:25 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:91:18:91:25 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:91:20:91:21 | x1 | | blanket_impl.rs:64:5:65:14 | S1 | +| blanket_impl.rs:93:18:93:25 | "{x2:?}\\n" | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:93:18:93:25 | "{x2:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| blanket_impl.rs:93:18:93:25 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:93:18:93:25 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:95:18:95:25 | "{x3:?}\\n" | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:95:18:95:25 | "{x3:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| blanket_impl.rs:95:18:95:25 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:95:18:95:25 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:97:18:97:25 | "{x4:?}\\n" | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:97:18:97:25 | "{x4:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| blanket_impl.rs:97:18:97:25 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:97:18:97:25 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:108:22:108:26 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:108:22:108:26 | SelfParam | TRef | blanket_impl.rs:107:5:109:5 | Self [trait Flag] | +| blanket_impl.rs:112:26:112:30 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:112:26:112:30 | SelfParam | TRef | blanket_impl.rs:111:5:113:5 | Self [trait TryFlag] | +| blanket_impl.rs:119:26:119:30 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:119:26:119:30 | SelfParam | TRef | blanket_impl.rs:115:10:115:11 | Fl | +| blanket_impl.rs:119:49:121:9 | { ... } | | {EXTERNAL LOCATION} | Option | +| blanket_impl.rs:119:49:121:9 | { ... } | T | {EXTERNAL LOCATION} | bool | +| blanket_impl.rs:120:18:120:21 | self | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:120:18:120:21 | self | TRef | blanket_impl.rs:115:10:115:11 | Fl | +| blanket_impl.rs:126:32:126:36 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:126:32:126:36 | SelfParam | TRef | blanket_impl.rs:124:5:129:5 | Self [trait TryFlagExt] | +| blanket_impl.rs:126:55:128:9 | { ... } | | {EXTERNAL LOCATION} | Option | +| blanket_impl.rs:126:55:128:9 | { ... } | T | {EXTERNAL LOCATION} | bool | +| blanket_impl.rs:127:13:127:16 | self | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:127:13:127:16 | self | TRef | blanket_impl.rs:124:5:129:5 | Self [trait TryFlagExt] | +| blanket_impl.rs:135:32:135:36 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:135:32:135:36 | SelfParam | TRef | blanket_impl.rs:133:5:136:5 | Self [trait AnotherTryFlag] | +| blanket_impl.rs:144:26:144:30 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:144:26:144:30 | SelfParam | TRef | blanket_impl.rs:138:5:140:5 | MyTryFlag | +| blanket_impl.rs:144:49:146:9 | { ... } | | {EXTERNAL LOCATION} | Option | +| blanket_impl.rs:144:49:146:9 | { ... } | T | {EXTERNAL LOCATION} | bool | +| blanket_impl.rs:145:18:145:21 | self | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:145:18:145:21 | self | TRef | blanket_impl.rs:138:5:140:5 | MyTryFlag | +| blanket_impl.rs:155:22:155:26 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:155:22:155:26 | SelfParam | TRef | blanket_impl.rs:149:5:151:5 | MyFlag | +| blanket_impl.rs:155:37:157:9 | { ... } | | {EXTERNAL LOCATION} | bool | +| blanket_impl.rs:156:13:156:16 | self | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:156:13:156:16 | self | TRef | blanket_impl.rs:149:5:151:5 | MyFlag | +| blanket_impl.rs:166:32:166:36 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:166:32:166:36 | SelfParam | TRef | blanket_impl.rs:160:5:162:5 | MyOtherFlag | +| blanket_impl.rs:166:55:168:9 | { ... } | | {EXTERNAL LOCATION} | Option | +| blanket_impl.rs:166:55:168:9 | { ... } | T | {EXTERNAL LOCATION} | bool | +| blanket_impl.rs:167:18:167:21 | self | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:167:18:167:21 | self | TRef | blanket_impl.rs:160:5:162:5 | MyOtherFlag | +| blanket_impl.rs:171:15:184:5 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:172:13:172:23 | my_try_flag | | blanket_impl.rs:138:5:140:5 | MyTryFlag | +| blanket_impl.rs:172:27:172:50 | MyTryFlag {...} | | blanket_impl.rs:138:5:140:5 | MyTryFlag | +| blanket_impl.rs:172:45:172:48 | true | | {EXTERNAL LOCATION} | bool | +| blanket_impl.rs:173:22:173:32 | my_try_flag | | blanket_impl.rs:138:5:140:5 | MyTryFlag | +| blanket_impl.rs:175:13:175:19 | my_flag | | blanket_impl.rs:149:5:151:5 | MyFlag | +| blanket_impl.rs:175:23:175:43 | MyFlag {...} | | blanket_impl.rs:149:5:151:5 | MyFlag | +| blanket_impl.rs:175:38:175:41 | true | | {EXTERNAL LOCATION} | bool | +| blanket_impl.rs:178:22:178:28 | my_flag | | blanket_impl.rs:149:5:151:5 | MyFlag | +| blanket_impl.rs:180:13:180:25 | my_other_flag | | blanket_impl.rs:160:5:162:5 | MyOtherFlag | +| blanket_impl.rs:180:29:180:54 | MyOtherFlag {...} | | blanket_impl.rs:160:5:162:5 | MyOtherFlag | +| blanket_impl.rs:180:49:180:52 | true | | {EXTERNAL LOCATION} | bool | +| blanket_impl.rs:183:22:183:34 | my_other_flag | | blanket_impl.rs:160:5:162:5 | MyOtherFlag | +| blanket_impl.rs:196:15:196:18 | SelfParam | | blanket_impl.rs:194:5:197:5 | Self [trait MyTrait1] | +| blanket_impl.rs:201:15:201:18 | SelfParam | | blanket_impl.rs:199:5:202:5 | Self [trait MyTrait2] | +| blanket_impl.rs:206:15:206:18 | SelfParam | | blanket_impl.rs:204:5:207:5 | Self [trait MyTrait3] | +| blanket_impl.rs:211:15:211:18 | SelfParam | | blanket_impl.rs:209:5:212:5 | Self [trait MyTrait4a] | +| blanket_impl.rs:216:15:216:18 | SelfParam | | blanket_impl.rs:214:5:217:5 | Self [trait MyTrait4b] | +| blanket_impl.rs:221:15:221:18 | SelfParam | | blanket_impl.rs:188:5:189:14 | S1 | +| blanket_impl.rs:221:21:221:22 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:226:15:226:18 | SelfParam | | blanket_impl.rs:188:5:189:14 | S1 | +| blanket_impl.rs:226:21:226:22 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:231:15:231:18 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:231:15:231:18 | SelfParam | TRef | blanket_impl.rs:229:10:229:27 | T | +| blanket_impl.rs:231:21:233:9 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:232:13:232:16 | self | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:232:13:232:16 | self | TRef | blanket_impl.rs:229:10:229:27 | T | +| blanket_impl.rs:238:15:238:18 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:238:15:238:18 | SelfParam | TRef | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:238:15:238:18 | SelfParam | TRef.TRef | blanket_impl.rs:188:5:189:14 | S1 | +| blanket_impl.rs:238:21:240:9 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:239:13:239:16 | self | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:239:13:239:16 | self | TRef | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:239:13:239:16 | self | TRef.TRef | blanket_impl.rs:188:5:189:14 | S1 | +| blanket_impl.rs:245:15:245:18 | SelfParam | | blanket_impl.rs:243:10:243:20 | T | +| blanket_impl.rs:245:21:247:9 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:246:13:246:16 | self | | blanket_impl.rs:243:10:243:20 | T | +| blanket_impl.rs:252:15:252:18 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:252:15:252:18 | SelfParam | TRef | blanket_impl.rs:250:10:250:10 | T | +| blanket_impl.rs:252:21:252:22 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:255:33:263:5 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:257:18:257:22 | (...) | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:257:19:257:21 | &S1 | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:258:18:258:23 | (...) | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:258:19:258:22 | &... | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:258:20:258:22 | &S1 | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:260:18:260:22 | (...) | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:260:19:260:21 | &S1 | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:262:18:262:22 | (...) | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:262:19:262:21 | &S2 | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:272:21:272:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:272:21:272:25 | SelfParam | TRef | blanket_impl.rs:271:5:274:5 | Self [trait Executor] | +| blanket_impl.rs:273:24:273:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:273:24:273:28 | SelfParam | TRef | blanket_impl.rs:271:5:274:5 | Self [trait Executor] | +| blanket_impl.rs:273:31:273:35 | query | | blanket_impl.rs:273:21:273:21 | E | +| blanket_impl.rs:277:21:277:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:277:21:277:25 | SelfParam | TRef | blanket_impl.rs:276:10:276:22 | T | +| blanket_impl.rs:277:28:279:9 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:278:22:278:41 | "Executor::execute1\\n" | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:278:22:278:41 | "Executor::execute1\\n" | TRef | {EXTERNAL LOCATION} | str | +| blanket_impl.rs:278:22:278:41 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:278:22:278:41 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:281:24:281:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:281:24:281:28 | SelfParam | TRef | blanket_impl.rs:276:10:276:22 | T | +| blanket_impl.rs:281:31:281:36 | _query | | blanket_impl.rs:281:21:281:21 | E | +| blanket_impl.rs:281:42:283:9 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:282:22:282:41 | "Executor::execute2\\n" | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:282:22:282:41 | "Executor::execute2\\n" | TRef | {EXTERNAL LOCATION} | str | +| blanket_impl.rs:282:22:282:41 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:282:22:282:41 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:290:16:300:5 | { ... } | | {EXTERNAL LOCATION} | () | +| blanket_impl.rs:291:13:291:13 | c | | blanket_impl.rs:286:5:286:29 | MySqlConnection | +| blanket_impl.rs:291:17:291:34 | MySqlConnection {...} | | blanket_impl.rs:286:5:286:29 | MySqlConnection | +| blanket_impl.rs:293:9:293:9 | c | | blanket_impl.rs:286:5:286:29 | MySqlConnection | +| blanket_impl.rs:294:35:294:36 | &c | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:294:36:294:36 | c | | blanket_impl.rs:286:5:286:29 | MySqlConnection | +| blanket_impl.rs:296:9:296:9 | c | | blanket_impl.rs:286:5:286:29 | MySqlConnection | +| blanket_impl.rs:296:20:296:40 | "SELECT * FROM users" | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:296:20:296:40 | "SELECT * FROM users" | TRef | {EXTERNAL LOCATION} | str | +| blanket_impl.rs:297:9:297:9 | c | | blanket_impl.rs:286:5:286:29 | MySqlConnection | +| blanket_impl.rs:297:28:297:48 | "SELECT * FROM users" | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:297:28:297:48 | "SELECT * FROM users" | TRef | {EXTERNAL LOCATION} | str | +| blanket_impl.rs:298:35:298:36 | &c | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:298:36:298:36 | c | | blanket_impl.rs:286:5:286:29 | MySqlConnection | +| blanket_impl.rs:298:39:298:59 | "SELECT * FROM users" | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:298:39:298:59 | "SELECT * FROM users" | TRef | {EXTERNAL LOCATION} | str | +| blanket_impl.rs:299:43:299:44 | &c | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:299:44:299:44 | c | | blanket_impl.rs:286:5:286:29 | MySqlConnection | +| blanket_impl.rs:299:47:299:67 | "SELECT * FROM users" | | {EXTERNAL LOCATION} | & | +| blanket_impl.rs:299:47:299:67 | "SELECT * FROM users" | TRef | {EXTERNAL LOCATION} | str | +| closure.rs:4:19:31:5 | { ... } | | {EXTERNAL LOCATION} | () | +| closure.rs:6:27:6:27 | a | | {EXTERNAL LOCATION} | bool | +| closure.rs:6:30:6:30 | b | | {EXTERNAL LOCATION} | bool | +| closure.rs:6:33:6:33 | a | | {EXTERNAL LOCATION} | bool | +| closure.rs:6:33:6:38 | ... && ... | | {EXTERNAL LOCATION} | bool | +| closure.rs:6:38:6:38 | b | | {EXTERNAL LOCATION} | bool | +| closure.rs:8:13:8:13 | x | | {EXTERNAL LOCATION} | i64 | +| closure.rs:8:22:8:25 | 1i64 | | {EXTERNAL LOCATION} | i64 | +| closure.rs:9:31:9:34 | 1i64 | | {EXTERNAL LOCATION} | i64 | +| closure.rs:10:26:10:26 | x | | {EXTERNAL LOCATION} | i64 | +| closure.rs:14:25:14:25 | n | | {EXTERNAL LOCATION} | i64 | +| closure.rs:14:33:14:33 | n | | {EXTERNAL LOCATION} | i64 | +| closure.rs:25:21:25:24 | true | | {EXTERNAL LOCATION} | bool | +| closure.rs:30:13:30:15 | _b2 | | {EXTERNAL LOCATION} | bool | +| closure.rs:35:44:35:44 | f | | closure.rs:35:20:35:41 | F | +| closure.rs:35:50:37:5 | { ... } | | {EXTERNAL LOCATION} | () | +| closure.rs:36:23:36:23 | f | | closure.rs:35:20:35:41 | F | +| closure.rs:36:25:36:28 | true | | {EXTERNAL LOCATION} | bool | +| closure.rs:39:46:39:46 | f | | closure.rs:39:22:39:43 | F | +| closure.rs:39:52:42:5 | { ... } | | {EXTERNAL LOCATION} | () | +| closure.rs:41:9:41:9 | f | | closure.rs:39:22:39:43 | F | +| closure.rs:44:39:44:39 | f | | closure.rs:44:20:44:36 | F | +| closure.rs:44:45:44:45 | a | | closure.rs:44:14:44:14 | A | +| closure.rs:44:56:46:5 | { ... } | | closure.rs:44:17:44:17 | B | +| closure.rs:45:9:45:9 | f | | closure.rs:44:20:44:36 | F | +| closure.rs:45:11:45:11 | a | | closure.rs:44:14:44:14 | A | +| closure.rs:48:18:48:18 | f | | closure.rs:48:21:48:43 | impl ... | +| closure.rs:48:53:50:5 | { ... } | | {EXTERNAL LOCATION} | i64 | +| closure.rs:49:9:49:9 | f | | closure.rs:48:21:48:43 | impl ... | +| closure.rs:52:15:64:5 | { ... } | | {EXTERNAL LOCATION} | () | +| closure.rs:53:18:53:18 | x | | {EXTERNAL LOCATION} | bool | +| closure.rs:54:16:54:16 | x | | {EXTERNAL LOCATION} | bool | +| closure.rs:60:27:60:30 | true | | {EXTERNAL LOCATION} | bool | +| closure.rs:63:13:63:15 | _r2 | | {EXTERNAL LOCATION} | i64 | +| closure.rs:63:19:63:30 | apply_two(...) | | {EXTERNAL LOCATION} | i64 | +| closure.rs:68:54:68:54 | f | | {EXTERNAL LOCATION} | Box | +| closure.rs:68:54:68:54 | f | A | {EXTERNAL LOCATION} | Global | +| closure.rs:68:54:68:54 | f | T | closure.rs:68:26:68:51 | F | +| closure.rs:68:65:68:67 | arg | | closure.rs:68:20:68:20 | A | +| closure.rs:68:78:70:5 | { ... } | | closure.rs:68:23:68:23 | B | +| closure.rs:69:9:69:9 | f | | {EXTERNAL LOCATION} | Box | +| closure.rs:69:9:69:9 | f | A | {EXTERNAL LOCATION} | Global | +| closure.rs:69:9:69:9 | f | T | closure.rs:68:26:68:51 | F | +| closure.rs:69:11:69:13 | arg | | closure.rs:68:20:68:20 | A | +| closure.rs:72:30:72:30 | f | | {EXTERNAL LOCATION} | Box | +| closure.rs:72:30:72:30 | f | A | {EXTERNAL LOCATION} | Global | +| closure.rs:72:30:72:30 | f | T | {EXTERNAL LOCATION} | dyn FnOnce | +| closure.rs:72:30:72:30 | f | T.dyn(Args) | {EXTERNAL LOCATION} | (T_1) | +| closure.rs:72:30:72:30 | f | T.dyn(Args).T0 | closure.rs:72:24:72:24 | A | +| closure.rs:72:30:72:30 | f | T.dyn(Output) | closure.rs:72:27:72:27 | B | +| closure.rs:72:58:72:60 | arg | | closure.rs:72:24:72:24 | A | +| closure.rs:72:66:75:5 | { ... } | | {EXTERNAL LOCATION} | () | +| closure.rs:73:31:73:31 | f | | {EXTERNAL LOCATION} | Box | +| closure.rs:73:31:73:31 | f | A | {EXTERNAL LOCATION} | Global | +| closure.rs:73:31:73:31 | f | T | {EXTERNAL LOCATION} | dyn FnOnce | +| closure.rs:73:31:73:31 | f | T.dyn(Args) | {EXTERNAL LOCATION} | (T_1) | +| closure.rs:73:31:73:31 | f | T.dyn(Args).T0 | closure.rs:72:24:72:24 | A | +| closure.rs:73:31:73:31 | f | T.dyn(Output) | closure.rs:72:27:72:27 | B | +| closure.rs:73:34:73:36 | arg | | closure.rs:72:24:72:24 | A | +| closure.rs:74:31:74:53 | ...::new(...) | | {EXTERNAL LOCATION} | Box | +| closure.rs:74:31:74:53 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | +| closure.rs:74:41:74:41 | _ | | {EXTERNAL LOCATION} | i64 | +| closure.rs:74:49:74:52 | true | | {EXTERNAL LOCATION} | bool | +| dereference.rs:12:14:12:18 | SelfParam | | {EXTERNAL LOCATION} | & | +| dereference.rs:12:14:12:18 | SelfParam | TRef | dereference.rs:4:1:6:1 | MyIntPointer | +| dereference.rs:12:29:14:5 | { ... } | | {EXTERNAL LOCATION} | & | +| dereference.rs:12:29:14:5 | { ... } | TRef | {EXTERNAL LOCATION} | i64 | +| dereference.rs:13:9:13:19 | &... | | {EXTERNAL LOCATION} | & | +| dereference.rs:13:10:13:13 | self | | {EXTERNAL LOCATION} | & | +| dereference.rs:13:10:13:13 | self | TRef | dereference.rs:4:1:6:1 | MyIntPointer | +| dereference.rs:25:14:25:18 | SelfParam | | {EXTERNAL LOCATION} | & | +| dereference.rs:25:14:25:18 | SelfParam | TRef | dereference.rs:17:1:19:1 | MySmartPointer | +| dereference.rs:25:14:25:18 | SelfParam | TRef.T | dereference.rs:21:6:21:6 | T | +| dereference.rs:25:27:27:5 | { ... } | | {EXTERNAL LOCATION} | & | +| dereference.rs:25:27:27:5 | { ... } | TRef | dereference.rs:21:6:21:6 | T | +| dereference.rs:26:9:26:19 | &... | | {EXTERNAL LOCATION} | & | +| dereference.rs:26:10:26:13 | self | | {EXTERNAL LOCATION} | & | +| dereference.rs:26:10:26:13 | self | TRef | dereference.rs:17:1:19:1 | MySmartPointer | +| dereference.rs:26:10:26:13 | self | TRef.T | dereference.rs:21:6:21:6 | T | +| dereference.rs:33:12:33:16 | SelfParam | | {EXTERNAL LOCATION} | & | +| dereference.rs:33:12:33:16 | SelfParam | TRef | dereference.rs:30:1:30:15 | S | +| dereference.rs:33:12:33:16 | SelfParam | TRef.T | dereference.rs:32:6:32:6 | T | +| dereference.rs:33:25:35:5 | { ... } | | {EXTERNAL LOCATION} | & | +| dereference.rs:33:25:35:5 | { ... } | TRef | dereference.rs:32:6:32:6 | T | +| dereference.rs:34:9:34:15 | &... | | {EXTERNAL LOCATION} | & | +| dereference.rs:34:10:34:13 | self | | {EXTERNAL LOCATION} | & | +| dereference.rs:34:10:34:13 | self | TRef | dereference.rs:30:1:30:15 | S | +| dereference.rs:34:10:34:13 | self | TRef.T | dereference.rs:32:6:32:6 | T | +| dereference.rs:38:39:50:1 | { ... } | | {EXTERNAL LOCATION} | () | +| dereference.rs:40:9:40:10 | a1 | | dereference.rs:4:1:6:1 | MyIntPointer | +| dereference.rs:40:14:40:42 | MyIntPointer {...} | | dereference.rs:4:1:6:1 | MyIntPointer | +| dereference.rs:40:36:40:40 | 34i64 | | {EXTERNAL LOCATION} | i64 | +| dereference.rs:41:15:41:16 | a1 | | dereference.rs:4:1:6:1 | MyIntPointer | +| dereference.rs:44:9:44:10 | a2 | | dereference.rs:4:1:6:1 | MyIntPointer | +| dereference.rs:44:14:44:42 | MyIntPointer {...} | | dereference.rs:4:1:6:1 | MyIntPointer | +| dereference.rs:44:36:44:40 | 34i64 | | {EXTERNAL LOCATION} | i64 | +| dereference.rs:45:16:45:17 | a2 | | dereference.rs:4:1:6:1 | MyIntPointer | +| dereference.rs:48:9:48:10 | a3 | | dereference.rs:4:1:6:1 | MyIntPointer | +| dereference.rs:48:14:48:42 | MyIntPointer {...} | | dereference.rs:4:1:6:1 | MyIntPointer | +| dereference.rs:48:36:48:40 | 34i64 | | {EXTERNAL LOCATION} | i64 | +| dereference.rs:49:17:49:18 | a3 | | dereference.rs:4:1:6:1 | MyIntPointer | +| dereference.rs:52:39:64:1 | { ... } | | {EXTERNAL LOCATION} | () | +| dereference.rs:54:9:54:10 | c1 | | dereference.rs:17:1:19:1 | MySmartPointer | +| dereference.rs:54:14:54:42 | MySmartPointer {...} | | dereference.rs:17:1:19:1 | MySmartPointer | +| dereference.rs:54:38:54:40 | 'a' | | {EXTERNAL LOCATION} | char | +| dereference.rs:55:15:55:16 | c1 | | dereference.rs:17:1:19:1 | MySmartPointer | +| dereference.rs:58:9:58:10 | c2 | | dereference.rs:17:1:19:1 | MySmartPointer | +| dereference.rs:58:14:58:42 | MySmartPointer {...} | | dereference.rs:17:1:19:1 | MySmartPointer | +| dereference.rs:58:38:58:40 | 'a' | | {EXTERNAL LOCATION} | char | +| dereference.rs:59:16:59:17 | c2 | | dereference.rs:17:1:19:1 | MySmartPointer | +| dereference.rs:62:9:62:10 | c3 | | dereference.rs:17:1:19:1 | MySmartPointer | +| dereference.rs:62:14:62:44 | MySmartPointer {...} | | dereference.rs:17:1:19:1 | MySmartPointer | +| dereference.rs:62:38:62:42 | 34i64 | | {EXTERNAL LOCATION} | i64 | +| dereference.rs:63:17:63:18 | c3 | | dereference.rs:17:1:19:1 | MySmartPointer | +| dereference.rs:66:31:78:1 | { ... } | | {EXTERNAL LOCATION} | () | +| dereference.rs:68:9:68:10 | e1 | | {EXTERNAL LOCATION} | & | +| dereference.rs:68:14:68:17 | &'a' | | {EXTERNAL LOCATION} | & | +| dereference.rs:68:15:68:17 | 'a' | | {EXTERNAL LOCATION} | char | +| dereference.rs:69:15:69:16 | e1 | | {EXTERNAL LOCATION} | & | +| dereference.rs:72:9:72:10 | e2 | | {EXTERNAL LOCATION} | & | +| dereference.rs:72:14:72:17 | &'a' | | {EXTERNAL LOCATION} | & | +| dereference.rs:72:15:72:17 | 'a' | | {EXTERNAL LOCATION} | char | +| dereference.rs:73:16:73:17 | e2 | | {EXTERNAL LOCATION} | & | +| dereference.rs:76:9:76:10 | e3 | | {EXTERNAL LOCATION} | & | +| dereference.rs:76:14:76:19 | &34i64 | | {EXTERNAL LOCATION} | & | +| dereference.rs:76:15:76:19 | 34i64 | | {EXTERNAL LOCATION} | i64 | +| dereference.rs:77:17:77:18 | e3 | | {EXTERNAL LOCATION} | & | +| dereference.rs:80:31:92:1 | { ... } | | {EXTERNAL LOCATION} | () | +| dereference.rs:82:9:82:10 | g1 | | {EXTERNAL LOCATION} | Box | +| dereference.rs:82:9:82:10 | g1 | A | {EXTERNAL LOCATION} | Global | +| dereference.rs:82:9:82:10 | g1 | T | {EXTERNAL LOCATION} | char | +| dereference.rs:82:25:82:37 | ...::new(...) | | {EXTERNAL LOCATION} | Box | +| dereference.rs:82:25:82:37 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | +| dereference.rs:82:34:82:36 | 'a' | | {EXTERNAL LOCATION} | char | +| dereference.rs:83:15:83:16 | g1 | | {EXTERNAL LOCATION} | Box | +| dereference.rs:83:15:83:16 | g1 | A | {EXTERNAL LOCATION} | Global | +| dereference.rs:83:15:83:16 | g1 | T | {EXTERNAL LOCATION} | char | +| dereference.rs:86:9:86:10 | g2 | | {EXTERNAL LOCATION} | Box | +| dereference.rs:86:9:86:10 | g2 | A | {EXTERNAL LOCATION} | Global | +| dereference.rs:86:9:86:10 | g2 | T | {EXTERNAL LOCATION} | char | +| dereference.rs:86:25:86:37 | ...::new(...) | | {EXTERNAL LOCATION} | Box | +| dereference.rs:86:25:86:37 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | +| dereference.rs:86:34:86:36 | 'a' | | {EXTERNAL LOCATION} | char | +| dereference.rs:87:16:87:17 | g2 | | {EXTERNAL LOCATION} | Box | +| dereference.rs:87:16:87:17 | g2 | A | {EXTERNAL LOCATION} | Global | +| dereference.rs:87:16:87:17 | g2 | T | {EXTERNAL LOCATION} | char | +| dereference.rs:90:9:90:10 | g3 | | {EXTERNAL LOCATION} | Box | +| dereference.rs:90:9:90:10 | g3 | A | {EXTERNAL LOCATION} | Global | +| dereference.rs:90:9:90:10 | g3 | T | {EXTERNAL LOCATION} | i64 | +| dereference.rs:90:24:90:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box | +| dereference.rs:90:24:90:38 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | +| dereference.rs:90:33:90:37 | 34i64 | | {EXTERNAL LOCATION} | i64 | +| dereference.rs:91:17:91:18 | g3 | | {EXTERNAL LOCATION} | Box | +| dereference.rs:91:17:91:18 | g3 | A | {EXTERNAL LOCATION} | Global | +| dereference.rs:91:17:91:18 | g3 | T | {EXTERNAL LOCATION} | i64 | +| dereference.rs:94:27:105:1 | { ... } | | {EXTERNAL LOCATION} | () | +| dereference.rs:96:9:96:9 | x | | dereference.rs:4:1:6:1 | MyIntPointer | +| dereference.rs:96:13:96:41 | MyIntPointer {...} | | dereference.rs:4:1:6:1 | MyIntPointer | +| dereference.rs:96:35:96:39 | 34i64 | | {EXTERNAL LOCATION} | i64 | +| dereference.rs:97:14:97:14 | x | | dereference.rs:4:1:6:1 | MyIntPointer | +| dereference.rs:100:9:100:9 | x | | dereference.rs:17:1:19:1 | MySmartPointer | +| dereference.rs:100:13:100:43 | MySmartPointer {...} | | dereference.rs:17:1:19:1 | MySmartPointer | +| dereference.rs:100:37:100:41 | 34i64 | | {EXTERNAL LOCATION} | i64 | +| dereference.rs:101:14:101:14 | x | | dereference.rs:17:1:19:1 | MySmartPointer | +| dereference.rs:103:9:103:9 | z | | dereference.rs:17:1:19:1 | MySmartPointer | +| dereference.rs:103:13:103:45 | MySmartPointer {...} | | dereference.rs:17:1:19:1 | MySmartPointer | +| dereference.rs:103:39:103:42 | 0i64 | | {EXTERNAL LOCATION} | i64 | +| dereference.rs:104:14:104:14 | z | | dereference.rs:17:1:19:1 | MySmartPointer | +| dereference.rs:131:19:139:5 | { ... } | | {EXTERNAL LOCATION} | () | +| dereference.rs:132:17:132:26 | key_to_key | | {EXTERNAL LOCATION} | HashMap | +| dereference.rs:132:17:132:26 | key_to_key | K | {EXTERNAL LOCATION} | & | +| dereference.rs:132:17:132:26 | key_to_key | K.TRef | dereference.rs:110:5:111:21 | Key | +| dereference.rs:132:17:132:26 | key_to_key | S | {EXTERNAL LOCATION} | RandomState | +| dereference.rs:132:17:132:26 | key_to_key | V | {EXTERNAL LOCATION} | & | +| dereference.rs:132:17:132:26 | key_to_key | V.TRef | dereference.rs:110:5:111:21 | Key | +| dereference.rs:132:30:132:57 | ...::new(...) | | {EXTERNAL LOCATION} | HashMap | +| dereference.rs:132:30:132:57 | ...::new(...) | K | {EXTERNAL LOCATION} | & | +| dereference.rs:132:30:132:57 | ...::new(...) | K.TRef | dereference.rs:110:5:111:21 | Key | +| dereference.rs:132:30:132:57 | ...::new(...) | S | {EXTERNAL LOCATION} | RandomState | +| dereference.rs:132:30:132:57 | ...::new(...) | V | {EXTERNAL LOCATION} | & | +| dereference.rs:132:30:132:57 | ...::new(...) | V.TRef | dereference.rs:110:5:111:21 | Key | +| dereference.rs:133:17:133:19 | key | | {EXTERNAL LOCATION} | & | +| dereference.rs:133:23:133:29 | &... | | {EXTERNAL LOCATION} | & | +| dereference.rs:133:24:133:29 | Key {...} | | dereference.rs:110:5:111:21 | Key | +| dereference.rs:134:9:137:9 | if ... {...} | | {EXTERNAL LOCATION} | () | +| dereference.rs:134:32:134:41 | key_to_key | | {EXTERNAL LOCATION} | HashMap | +| dereference.rs:134:32:134:41 | key_to_key | K | {EXTERNAL LOCATION} | & | +| dereference.rs:134:32:134:41 | key_to_key | K.TRef | dereference.rs:110:5:111:21 | Key | +| dereference.rs:134:32:134:41 | key_to_key | S | {EXTERNAL LOCATION} | RandomState | +| dereference.rs:134:32:134:41 | key_to_key | V | {EXTERNAL LOCATION} | & | +| dereference.rs:134:32:134:41 | key_to_key | V.TRef | dereference.rs:110:5:111:21 | Key | +| dereference.rs:134:47:134:49 | key | | {EXTERNAL LOCATION} | & | +| dereference.rs:134:52:137:9 | { ... } | | {EXTERNAL LOCATION} | () | +| dereference.rs:136:13:136:15 | key | | {EXTERNAL LOCATION} | & | +| dereference.rs:138:9:138:18 | key_to_key | | {EXTERNAL LOCATION} | HashMap | +| dereference.rs:138:9:138:18 | key_to_key | K | {EXTERNAL LOCATION} | & | +| dereference.rs:138:9:138:18 | key_to_key | K.TRef | dereference.rs:110:5:111:21 | Key | +| dereference.rs:138:9:138:18 | key_to_key | S | {EXTERNAL LOCATION} | RandomState | +| dereference.rs:138:9:138:18 | key_to_key | V | {EXTERNAL LOCATION} | & | +| dereference.rs:138:9:138:18 | key_to_key | V.TRef | dereference.rs:110:5:111:21 | Key | +| dereference.rs:138:27:138:29 | key | | {EXTERNAL LOCATION} | & | +| dereference.rs:138:32:138:34 | key | | {EXTERNAL LOCATION} | & | +| dereference.rs:144:16:144:19 | SelfParam | | dereference.rs:143:5:145:5 | Self [trait MyTrait1] | +| dereference.rs:151:16:151:19 | SelfParam | | {EXTERNAL LOCATION} | & | +| dereference.rs:151:16:151:19 | SelfParam | TRef | dereference.rs:147:5:147:13 | S | +| dereference.rs:151:27:153:9 | { ... } | | dereference.rs:147:5:147:13 | S | +| dereference.rs:158:16:158:19 | SelfParam | | {EXTERNAL LOCATION} | & | +| dereference.rs:158:16:158:19 | SelfParam | TRef | dereference.rs:147:5:147:13 | S | +| dereference.rs:158:29:160:9 | { ... } | | {EXTERNAL LOCATION} | i64 | +| dereference.rs:164:16:164:19 | SelfParam | | dereference.rs:163:5:165:5 | Self [trait MyTrait2] | +| dereference.rs:164:22:164:24 | arg | | dereference.rs:163:20:163:21 | T1 | +| dereference.rs:169:16:169:19 | SelfParam | | dereference.rs:147:5:147:13 | S | +| dereference.rs:169:22:169:24 | arg | | {EXTERNAL LOCATION} | & | +| dereference.rs:169:22:169:24 | arg | TRef | dereference.rs:147:5:147:13 | S | +| dereference.rs:169:36:171:9 | { ... } | | dereference.rs:147:5:147:13 | S | +| dereference.rs:176:16:176:19 | SelfParam | | dereference.rs:147:5:147:13 | S | +| dereference.rs:176:22:176:24 | arg | | {EXTERNAL LOCATION} | & | +| dereference.rs:176:22:176:24 | arg | TRef | dereference.rs:147:5:147:13 | S | +| dereference.rs:176:42:178:9 | { ... } | | {EXTERNAL LOCATION} | i64 | +| dereference.rs:181:19:188:5 | { ... } | | {EXTERNAL LOCATION} | () | +| dereference.rs:182:17:182:20 | (...) | | {EXTERNAL LOCATION} | & | +| dereference.rs:182:18:182:19 | &S | | {EXTERNAL LOCATION} | & | +| dereference.rs:184:17:184:24 | (...) | | {EXTERNAL LOCATION} | & | +| dereference.rs:184:18:184:23 | &mut S | | {EXTERNAL LOCATION} | & | +| dereference.rs:186:23:186:24 | &S | | {EXTERNAL LOCATION} | & | +| dereference.rs:187:23:187:28 | &mut S | | {EXTERNAL LOCATION} | & | +| dereference.rs:196:16:196:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| dereference.rs:196:16:196:20 | SelfParam | TRef | dereference.rs:195:5:197:5 | Self [trait Bar] | +| dereference.rs:201:16:201:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| dereference.rs:201:16:201:24 | SelfParam | TRef | dereference.rs:193:5:193:17 | Foo | +| dereference.rs:201:27:203:9 | { ... } | | {EXTERNAL LOCATION} | () | +| dereference.rs:202:22:202:38 | "In struct impl!\\n" | | {EXTERNAL LOCATION} | & | +| dereference.rs:202:22:202:38 | "In struct impl!\\n" | TRef | {EXTERNAL LOCATION} | str | +| dereference.rs:202:22:202:38 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| dereference.rs:202:22:202:38 | { ... } | | {EXTERNAL LOCATION} | () | +| dereference.rs:208:16:208:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| dereference.rs:208:16:208:20 | SelfParam | TRef | dereference.rs:193:5:193:17 | Foo | +| dereference.rs:208:23:210:9 | { ... } | | {EXTERNAL LOCATION} | () | +| dereference.rs:209:22:209:37 | "In trait impl!\\n" | | {EXTERNAL LOCATION} | & | +| dereference.rs:209:22:209:37 | "In trait impl!\\n" | TRef | {EXTERNAL LOCATION} | str | +| dereference.rs:209:22:209:37 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| dereference.rs:209:22:209:37 | { ... } | | {EXTERNAL LOCATION} | () | +| dereference.rs:213:19:216:5 | { ... } | | {EXTERNAL LOCATION} | () | +| dereference.rs:214:17:214:17 | f | | dereference.rs:193:5:193:17 | Foo | +| dereference.rs:214:21:214:26 | Foo {...} | | dereference.rs:193:5:193:17 | Foo | +| dereference.rs:215:9:215:9 | f | | dereference.rs:193:5:193:17 | Foo | +| dereference.rs:219:15:228:1 | { ... } | | {EXTERNAL LOCATION} | () | +| dereference.rs:220:5:220:38 | explicit_monomorphic_dereference(...) | | {EXTERNAL LOCATION} | () | +| dereference.rs:221:5:221:38 | explicit_polymorphic_dereference(...) | | {EXTERNAL LOCATION} | () | +| dereference.rs:222:5:222:30 | explicit_ref_dereference(...) | | {EXTERNAL LOCATION} | () | +| dereference.rs:223:5:223:30 | explicit_box_dereference(...) | | {EXTERNAL LOCATION} | () | +| dereference.rs:224:5:224:26 | implicit_dereference(...) | | {EXTERNAL LOCATION} | () | +| dereference.rs:225:5:225:41 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| dereference.rs:226:5:226:26 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| dereference.rs:227:5:227:34 | ...::main(...) | | {EXTERNAL LOCATION} | () | +| dyn_type.rs:7:10:7:14 | SelfParam | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:7:10:7:14 | SelfParam | TRef | dyn_type.rs:5:1:8:1 | Self [trait MyTrait1] | +| dyn_type.rs:12:12:12:16 | SelfParam | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:12:12:12:16 | SelfParam | TRef | dyn_type.rs:10:1:13:1 | Self [trait GenericGet] | +| dyn_type.rs:18:12:18:16 | SelfParam | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:18:12:18:16 | SelfParam | TRef | dyn_type.rs:15:1:19:1 | Self [trait AssocTrait] | +| dyn_type.rs:28:10:28:14 | SelfParam | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:28:10:28:14 | SelfParam | TRef | dyn_type.rs:21:1:24:1 | MyStruct | +| dyn_type.rs:28:27:30:5 | { ... } | | {EXTERNAL LOCATION} | String | +| dyn_type.rs:29:17:29:30 | "MyTrait1: {}" | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:29:17:29:30 | "MyTrait1: {}" | TRef | {EXTERNAL LOCATION} | str | +| dyn_type.rs:29:17:29:42 | ...::format(...) | | {EXTERNAL LOCATION} | String | +| dyn_type.rs:29:33:29:36 | self | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:29:33:29:36 | self | TRef | dyn_type.rs:21:1:24:1 | MyStruct | +| dyn_type.rs:40:12:40:16 | SelfParam | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:40:12:40:16 | SelfParam | TRef | dyn_type.rs:33:1:36:1 | GenStruct | +| dyn_type.rs:40:12:40:16 | SelfParam | TRef.A | dyn_type.rs:38:6:38:21 | A | +| dyn_type.rs:40:24:42:5 | { ... } | | dyn_type.rs:38:6:38:21 | A | +| dyn_type.rs:41:9:41:12 | self | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:41:9:41:12 | self | TRef | dyn_type.rs:33:1:36:1 | GenStruct | +| dyn_type.rs:41:9:41:12 | self | TRef.A | dyn_type.rs:38:6:38:21 | A | +| dyn_type.rs:51:12:51:16 | SelfParam | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:51:12:51:16 | SelfParam | TRef | dyn_type.rs:33:1:36:1 | GenStruct | +| dyn_type.rs:51:12:51:16 | SelfParam | TRef.A | dyn_type.rs:45:6:45:8 | GGP | +| dyn_type.rs:51:34:53:5 | { ... } | | {EXTERNAL LOCATION} | (T_2) | +| dyn_type.rs:51:34:53:5 | { ... } | T0 | dyn_type.rs:45:6:45:8 | GGP | +| dyn_type.rs:51:34:53:5 | { ... } | T1 | {EXTERNAL LOCATION} | bool | +| dyn_type.rs:52:9:52:34 | TupleExpr | | {EXTERNAL LOCATION} | (T_2) | +| dyn_type.rs:52:10:52:13 | self | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:52:10:52:13 | self | TRef | dyn_type.rs:33:1:36:1 | GenStruct | +| dyn_type.rs:52:10:52:13 | self | TRef.A | dyn_type.rs:45:6:45:8 | GGP | +| dyn_type.rs:52:30:52:33 | true | | {EXTERNAL LOCATION} | bool | +| dyn_type.rs:56:40:56:40 | a | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:56:40:56:40 | a | TRef | dyn_type.rs:56:13:56:37 | G | +| dyn_type.rs:56:52:58:1 | { ... } | | dyn_type.rs:56:10:56:10 | A | +| dyn_type.rs:57:5:57:5 | a | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:57:5:57:5 | a | TRef | dyn_type.rs:56:13:56:37 | G | +| dyn_type.rs:60:46:60:46 | a | | dyn_type.rs:60:18:60:43 | A | +| dyn_type.rs:60:78:62:1 | { ... } | | {EXTERNAL LOCATION} | Box | +| dyn_type.rs:60:78:62:1 | { ... } | A | {EXTERNAL LOCATION} | Global | +| dyn_type.rs:60:78:62:1 | { ... } | T | dyn_type.rs:10:1:13:1 | dyn GenericGet | +| dyn_type.rs:60:78:62:1 | { ... } | T.dyn(A) | dyn_type.rs:60:18:60:43 | A | +| dyn_type.rs:61:5:61:36 | ...::new(...) | | {EXTERNAL LOCATION} | Box | +| dyn_type.rs:61:5:61:36 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | +| dyn_type.rs:61:14:61:35 | GenStruct {...} | | dyn_type.rs:33:1:36:1 | GenStruct | +| dyn_type.rs:61:33:61:33 | a | | dyn_type.rs:60:18:60:43 | A | +| dyn_type.rs:64:25:64:27 | obj | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:64:25:64:27 | obj | TRef | dyn_type.rs:5:1:8:1 | dyn MyTrait1 | +| dyn_type.rs:64:45:66:1 | { ... } | | {EXTERNAL LOCATION} | () | +| dyn_type.rs:65:21:65:23 | obj | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:65:21:65:23 | obj | TRef | dyn_type.rs:5:1:8:1 | dyn MyTrait1 | +| dyn_type.rs:68:27:68:29 | obj | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:68:27:68:29 | obj | TRef | dyn_type.rs:10:1:13:1 | dyn GenericGet | +| dyn_type.rs:68:27:68:29 | obj | TRef.dyn(A) | {EXTERNAL LOCATION} | String | +| dyn_type.rs:68:57:71:1 | { ... } | | {EXTERNAL LOCATION} | () | +| dyn_type.rs:69:22:69:24 | obj | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:69:22:69:24 | obj | TRef | dyn_type.rs:10:1:13:1 | dyn GenericGet | +| dyn_type.rs:69:22:69:24 | obj | TRef.dyn(A) | {EXTERNAL LOCATION} | String | +| dyn_type.rs:70:26:70:28 | obj | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:70:26:70:28 | obj | TRef | dyn_type.rs:10:1:13:1 | dyn GenericGet | +| dyn_type.rs:70:26:70:28 | obj | TRef.dyn(A) | {EXTERNAL LOCATION} | String | +| dyn_type.rs:73:26:76:1 | { ... } | | {EXTERNAL LOCATION} | () | +| dyn_type.rs:74:9:74:11 | obj | | {EXTERNAL LOCATION} | Box | +| dyn_type.rs:74:9:74:11 | obj | A | {EXTERNAL LOCATION} | Global | +| dyn_type.rs:74:9:74:11 | obj | T | dyn_type.rs:10:1:13:1 | dyn GenericGet | +| dyn_type.rs:74:15:74:33 | get_box_trait(...) | | {EXTERNAL LOCATION} | Box | +| dyn_type.rs:74:15:74:33 | get_box_trait(...) | A | {EXTERNAL LOCATION} | Global | +| dyn_type.rs:74:15:74:33 | get_box_trait(...) | T | dyn_type.rs:10:1:13:1 | dyn GenericGet | +| dyn_type.rs:74:29:74:32 | true | | {EXTERNAL LOCATION} | bool | +| dyn_type.rs:75:21:75:23 | obj | | {EXTERNAL LOCATION} | Box | +| dyn_type.rs:75:21:75:23 | obj | A | {EXTERNAL LOCATION} | Global | +| dyn_type.rs:75:21:75:23 | obj | T | dyn_type.rs:10:1:13:1 | dyn GenericGet | +| dyn_type.rs:78:24:78:24 | a | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:78:24:78:24 | a | TRef | dyn_type.rs:15:1:19:1 | dyn AssocTrait | +| dyn_type.rs:78:24:78:24 | a | TRef.dyn(AP) | dyn_type.rs:78:21:78:21 | B | +| dyn_type.rs:78:24:78:24 | a | TRef.dyn(GP) | dyn_type.rs:78:18:78:18 | A | +| dyn_type.rs:78:65:80:1 | { ... } | | {EXTERNAL LOCATION} | (T_2) | +| dyn_type.rs:78:65:80:1 | { ... } | T0 | dyn_type.rs:78:18:78:18 | A | +| dyn_type.rs:78:65:80:1 | { ... } | T1 | dyn_type.rs:78:21:78:21 | B | +| dyn_type.rs:79:5:79:5 | a | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:79:5:79:5 | a | TRef | dyn_type.rs:15:1:19:1 | dyn AssocTrait | +| dyn_type.rs:79:5:79:5 | a | TRef.dyn(AP) | dyn_type.rs:78:21:78:21 | B | +| dyn_type.rs:79:5:79:5 | a | TRef.dyn(GP) | dyn_type.rs:78:18:78:18 | A | +| dyn_type.rs:82:55:82:55 | a | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:82:55:82:55 | a | TRef | dyn_type.rs:82:20:82:52 | T | +| dyn_type.rs:82:72:84:1 | { ... } | | {EXTERNAL LOCATION} | (T_2) | +| dyn_type.rs:82:72:84:1 | { ... } | T0 | dyn_type.rs:82:14:82:14 | A | +| dyn_type.rs:82:72:84:1 | { ... } | T1 | dyn_type.rs:82:17:82:17 | B | +| dyn_type.rs:83:5:83:5 | a | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:83:5:83:5 | a | TRef | dyn_type.rs:82:20:82:52 | T | +| dyn_type.rs:86:20:86:22 | obj | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:86:20:86:22 | obj | TRef | dyn_type.rs:15:1:19:1 | dyn AssocTrait | +| dyn_type.rs:86:20:86:22 | obj | TRef.dyn(AP) | {EXTERNAL LOCATION} | bool | +| dyn_type.rs:86:20:86:22 | obj | TRef.dyn(GP) | {EXTERNAL LOCATION} | i64 | +| dyn_type.rs:86:58:99:1 | { ... } | | {EXTERNAL LOCATION} | () | +| dyn_type.rs:87:9:90:5 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| dyn_type.rs:90:11:90:13 | obj | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:90:11:90:13 | obj | TRef | dyn_type.rs:15:1:19:1 | dyn AssocTrait | +| dyn_type.rs:90:11:90:13 | obj | TRef.dyn(AP) | {EXTERNAL LOCATION} | bool | +| dyn_type.rs:90:11:90:13 | obj | TRef.dyn(GP) | {EXTERNAL LOCATION} | i64 | +| dyn_type.rs:91:9:94:5 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| dyn_type.rs:94:9:94:26 | assoc_dyn_get(...) | | {EXTERNAL LOCATION} | (T_2) | +| dyn_type.rs:94:23:94:25 | obj | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:94:23:94:25 | obj | TRef | dyn_type.rs:15:1:19:1 | dyn AssocTrait | +| dyn_type.rs:94:23:94:25 | obj | TRef.dyn(AP) | {EXTERNAL LOCATION} | bool | +| dyn_type.rs:94:23:94:25 | obj | TRef.dyn(GP) | {EXTERNAL LOCATION} | i64 | +| dyn_type.rs:95:9:98:5 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| dyn_type.rs:98:9:98:22 | assoc_get(...) | | {EXTERNAL LOCATION} | (T_2) | +| dyn_type.rs:98:19:98:21 | obj | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:98:19:98:21 | obj | TRef | dyn_type.rs:15:1:19:1 | dyn AssocTrait | +| dyn_type.rs:98:19:98:21 | obj | TRef.dyn(AP) | {EXTERNAL LOCATION} | bool | +| dyn_type.rs:98:19:98:21 | obj | TRef.dyn(GP) | {EXTERNAL LOCATION} | i64 | +| dyn_type.rs:101:15:108:1 | { ... } | | {EXTERNAL LOCATION} | () | +| dyn_type.rs:102:5:102:49 | test_basic_dyn_trait(...) | | {EXTERNAL LOCATION} | () | +| dyn_type.rs:102:26:102:48 | &... | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:102:27:102:48 | MyStruct {...} | | dyn_type.rs:21:1:24:1 | MyStruct | +| dyn_type.rs:103:5:105:6 | test_generic_dyn_trait(...) | | {EXTERNAL LOCATION} | () | +| dyn_type.rs:103:28:105:5 | &... | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:103:29:105:5 | GenStruct {...} | | dyn_type.rs:33:1:36:1 | GenStruct | +| dyn_type.rs:104:16:104:17 | "" | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:104:16:104:17 | "" | TRef | {EXTERNAL LOCATION} | str | +| dyn_type.rs:106:5:106:25 | test_poly_dyn_trait(...) | | {EXTERNAL LOCATION} | () | +| dyn_type.rs:107:5:107:46 | test_assoc_type(...) | | {EXTERNAL LOCATION} | () | +| dyn_type.rs:107:21:107:45 | &... | | {EXTERNAL LOCATION} | & | +| dyn_type.rs:107:22:107:45 | GenStruct {...} | | dyn_type.rs:33:1:36:1 | GenStruct | +| invalid/main.rs:8:16:8:19 | SelfParam | | invalid/main.rs:7:5:9:5 | Self [trait T1] | +| invalid/main.rs:8:22:8:23 | { ... } | | {EXTERNAL LOCATION} | () | +| invalid/main.rs:12:16:12:19 | SelfParam | | invalid/main.rs:11:5:15:5 | Self [trait T2] | +| invalid/main.rs:12:22:14:9 | { ... } | | {EXTERNAL LOCATION} | () | +| invalid/main.rs:13:13:13:16 | self | | invalid/main.rs:11:5:15:5 | Self [trait T2] | +| invalid/main.rs:25:22:25:25 | SelfParam | | invalid/main.rs:24:5:26:5 | Self [trait AddAlias] | +| invalid/main.rs:25:28:25:32 | other | | invalid/main.rs:24:5:26:5 | Self [trait AddAlias] | +| invalid/main.rs:29:22:29:25 | SelfParam | | invalid/main.rs:21:5:22:20 | Num | +| invalid/main.rs:29:28:29:32 | other | | invalid/main.rs:21:5:22:20 | Num | +| invalid/main.rs:29:49:31:9 | { ... } | | invalid/main.rs:21:5:22:20 | Num | +| invalid/main.rs:30:17:30:20 | self | | invalid/main.rs:21:5:22:20 | Num | +| invalid/main.rs:30:26:30:30 | other | | invalid/main.rs:21:5:22:20 | Num | +| invalid/main.rs:39:16:39:19 | SelfParam | | invalid/main.rs:35:10:35:20 | T | +| invalid/main.rs:39:22:39:26 | other | | invalid/main.rs:35:10:35:20 | T | +| invalid/main.rs:39:43:41:9 | { ... } | | invalid/main.rs:35:10:35:20 | T | +| invalid/main.rs:40:13:40:16 | self | | invalid/main.rs:35:10:35:20 | T | +| invalid/main.rs:40:28:40:32 | other | | invalid/main.rs:35:10:35:20 | T | +| invalid/main.rs:44:30:49:5 | { ... } | | {EXTERNAL LOCATION} | () | +| invalid/main.rs:57:19:57:23 | SelfParam | | {EXTERNAL LOCATION} | & | +| invalid/main.rs:57:19:57:23 | SelfParam | TRef | invalid/main.rs:56:5:58:5 | Self [trait Clone1] | +| invalid/main.rs:61:22:61:26 | SelfParam | | {EXTERNAL LOCATION} | & | +| invalid/main.rs:61:22:61:26 | SelfParam | TRef | invalid/main.rs:60:5:64:5 | Self [trait Duplicatable] | +| invalid/main.rs:68:19:68:23 | SelfParam | | {EXTERNAL LOCATION} | & | +| invalid/main.rs:68:19:68:23 | SelfParam | TRef | invalid/main.rs:53:5:54:14 | S1 | +| invalid/main.rs:68:34:70:9 | { ... } | | invalid/main.rs:53:5:54:14 | S1 | +| invalid/main.rs:69:14:69:17 | self | | {EXTERNAL LOCATION} | & | +| invalid/main.rs:69:14:69:17 | self | TRef | invalid/main.rs:53:5:54:14 | S1 | +| invalid/main.rs:75:22:75:26 | SelfParam | | {EXTERNAL LOCATION} | & | +| invalid/main.rs:75:22:75:26 | SelfParam | TRef | invalid/main.rs:53:5:54:14 | S1 | +| invalid/main.rs:75:37:77:9 | { ... } | | invalid/main.rs:53:5:54:14 | S1 | +| invalid/main.rs:76:14:76:17 | self | | {EXTERNAL LOCATION} | & | +| invalid/main.rs:76:14:76:17 | self | TRef | invalid/main.rs:53:5:54:14 | S1 | +| invalid/main.rs:83:22:83:26 | SelfParam | | {EXTERNAL LOCATION} | & | +| invalid/main.rs:83:22:83:26 | SelfParam | TRef | invalid/main.rs:81:10:81:18 | T | +| invalid/main.rs:83:37:85:9 | { ... } | | invalid/main.rs:81:10:81:18 | T | +| invalid/main.rs:84:13:84:16 | self | | {EXTERNAL LOCATION} | & | +| invalid/main.rs:84:13:84:16 | self | TRef | invalid/main.rs:81:10:81:18 | T | +| invalid/main.rs:88:33:92:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:25:30:28:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:26:13:26:13 | x | | main.rs:5:5:8:5 | MyThing | +| main.rs:26:17:26:32 | MyThing {...} | | main.rs:5:5:8:5 | MyThing | +| main.rs:27:18:27:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:27:18:27:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:27:18:27:28 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:27:18:27:28 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:27:26:27:26 | x | | main.rs:5:5:8:5 | MyThing | +| main.rs:30:29:30:29 | x | | main.rs:16:5:19:5 | GenericThing | +| main.rs:30:29:30:29 | x | A | {EXTERNAL LOCATION} | bool | +| main.rs:30:46:33:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:31:17:31:17 | x | | main.rs:16:5:19:5 | GenericThing | +| main.rs:31:17:31:17 | x | A | {EXTERNAL LOCATION} | bool | +| main.rs:32:18:32:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:32:18:32:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:32:18:32:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:32:18:32:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:35:31:63:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:37:13:37:13 | x | | main.rs:16:5:19:5 | GenericThing | +| main.rs:37:13:37:13 | x | A | main.rs:3:5:4:13 | S | +| main.rs:37:17:37:42 | GenericThing::<...> {...} | | main.rs:16:5:19:5 | GenericThing | +| main.rs:37:17:37:42 | GenericThing::<...> {...} | A | main.rs:3:5:4:13 | S | +| main.rs:38:18:38:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:38:18:38:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:38:18:38:28 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:38:18:38:28 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:38:26:38:26 | x | | main.rs:16:5:19:5 | GenericThing | +| main.rs:38:26:38:26 | x | A | main.rs:3:5:4:13 | S | +| main.rs:41:13:41:13 | y | | main.rs:16:5:19:5 | GenericThing | +| main.rs:41:17:41:37 | GenericThing {...} | | main.rs:16:5:19:5 | GenericThing | +| main.rs:42:18:42:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:42:18:42:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:42:18:42:28 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:42:18:42:28 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:42:26:42:26 | x | | main.rs:16:5:19:5 | GenericThing | +| main.rs:42:26:42:26 | x | A | main.rs:3:5:4:13 | S | +| main.rs:46:13:46:13 | x | | main.rs:21:5:23:5 | OptionS | +| main.rs:46:17:48:9 | OptionS {...} | | main.rs:21:5:23:5 | OptionS | +| main.rs:49:18:49:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:49:18:49:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:49:18:49:28 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:49:18:49:28 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:49:26:49:26 | x | | main.rs:21:5:23:5 | OptionS | +| main.rs:52:13:52:13 | x | | main.rs:16:5:19:5 | GenericThing | +| main.rs:52:13:52:13 | x | A | main.rs:10:5:14:5 | MyOption | +| main.rs:52:13:52:13 | x | A.T | main.rs:3:5:4:13 | S | +| main.rs:52:17:54:9 | GenericThing::<...> {...} | | main.rs:16:5:19:5 | GenericThing | +| main.rs:52:17:54:9 | GenericThing::<...> {...} | A | main.rs:10:5:14:5 | MyOption | +| main.rs:52:17:54:9 | GenericThing::<...> {...} | A.T | main.rs:3:5:4:13 | S | +| main.rs:55:18:55:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:55:18:55:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:55:18:55:28 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:55:18:55:28 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:55:26:55:26 | x | | main.rs:16:5:19:5 | GenericThing | +| main.rs:55:26:55:26 | x | A | main.rs:10:5:14:5 | MyOption | +| main.rs:55:26:55:26 | x | A.T | main.rs:3:5:4:13 | S | +| main.rs:57:17:57:17 | x | | main.rs:16:5:19:5 | GenericThing | +| main.rs:57:21:59:9 | GenericThing {...} | | main.rs:16:5:19:5 | GenericThing | +| main.rs:61:13:61:13 | a | | main.rs:10:5:14:5 | MyOption | +| main.rs:61:13:61:13 | a | T | main.rs:3:5:4:13 | S | +| main.rs:61:30:61:30 | x | | main.rs:16:5:19:5 | GenericThing | +| main.rs:62:18:62:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:62:18:62:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:62:18:62:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:62:18:62:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:62:26:62:26 | a | | main.rs:10:5:14:5 | MyOption | +| main.rs:62:26:62:26 | a | T | main.rs:3:5:4:13 | S | +| main.rs:65:16:68:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:66:9:66:29 | simple_field_access(...) | | {EXTERNAL LOCATION} | () | +| main.rs:67:9:67:30 | generic_field_access(...) | | {EXTERNAL LOCATION} | () | +| main.rs:75:19:75:22 | SelfParam | | main.rs:72:5:72:21 | Foo | +| main.rs:75:33:77:9 | { ... } | | main.rs:72:5:72:21 | Foo | +| main.rs:76:13:76:16 | self | | main.rs:72:5:72:21 | Foo | +| main.rs:79:19:79:22 | SelfParam | | main.rs:72:5:72:21 | Foo | +| main.rs:79:32:81:9 | { ... } | | main.rs:72:5:72:21 | Foo | +| main.rs:80:13:80:16 | self | | main.rs:72:5:72:21 | Foo | +| main.rs:84:23:89:5 | { ... } | | main.rs:72:5:72:21 | Foo | +| main.rs:85:18:85:33 | "main.rs::m1::f\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:85:18:85:33 | "main.rs::m1::f\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:85:18:85:33 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:85:18:85:33 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:86:13:86:13 | x | | main.rs:72:5:72:21 | Foo | +| main.rs:86:17:86:22 | Foo {...} | | main.rs:72:5:72:21 | Foo | +| main.rs:87:20:87:25 | Foo {...} | | main.rs:72:5:72:21 | Foo | +| main.rs:88:9:88:9 | x | | main.rs:72:5:72:21 | Foo | +| main.rs:91:14:91:14 | x | | main.rs:72:5:72:21 | Foo | +| main.rs:91:22:91:22 | y | | main.rs:72:5:72:21 | Foo | +| main.rs:91:37:95:5 | { ... } | | main.rs:72:5:72:21 | Foo | +| main.rs:92:18:92:33 | "main.rs::m1::g\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:92:18:92:33 | "main.rs::m1::g\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:92:18:92:33 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:92:18:92:33 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:93:9:93:9 | x | | main.rs:72:5:72:21 | Foo | +| main.rs:94:9:94:9 | y | | main.rs:72:5:72:21 | Foo | +| main.rs:105:25:105:28 | SelfParam | | main.rs:104:5:106:5 | Self [trait MyTrait] | +| main.rs:110:25:110:28 | SelfParam | | main.rs:99:5:102:5 | MyThing | +| main.rs:110:39:112:9 | { ... } | | {EXTERNAL LOCATION} | bool | +| main.rs:111:13:111:16 | self | | main.rs:99:5:102:5 | MyThing | +| main.rs:115:16:121:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:116:13:116:13 | x | | main.rs:99:5:102:5 | MyThing | +| main.rs:116:17:116:39 | MyThing {...} | | main.rs:99:5:102:5 | MyThing | +| main.rs:116:34:116:37 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:117:17:117:17 | x | | main.rs:99:5:102:5 | MyThing | +| main.rs:119:13:119:13 | y | | main.rs:99:5:102:5 | MyThing | +| main.rs:119:17:119:40 | MyThing {...} | | main.rs:99:5:102:5 | MyThing | +| main.rs:119:34:119:38 | false | | {EXTERNAL LOCATION} | bool | +| main.rs:120:39:120:39 | y | | main.rs:99:5:102:5 | MyThing | +| main.rs:130:25:130:29 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:130:25:130:29 | SelfParam | TRef | main.rs:128:9:133:9 | Self [trait Foo] | +| main.rs:130:32:132:13 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:131:26:131:31 | "foo!\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:131:26:131:31 | "foo!\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:131:26:131:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:131:26:131:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:137:25:137:29 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:137:25:137:29 | SelfParam | TRef | main.rs:135:9:140:9 | Self [trait Bar] | +| main.rs:137:32:139:13 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:138:26:138:31 | "bar!\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:138:26:138:31 | "bar!\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:138:26:138:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:138:26:138:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:149:15:170:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:151:9:154:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:155:9:158:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:159:9:162:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:163:9:169:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:167:13:167:29 | ...::a_method(...) | | {EXTERNAL LOCATION} | () | +| main.rs:167:27:167:28 | &x | | {EXTERNAL LOCATION} | & | +| main.rs:168:13:168:29 | ...::a_method(...) | | {EXTERNAL LOCATION} | () | +| main.rs:168:27:168:28 | &x | | {EXTERNAL LOCATION} | & | +| main.rs:186:15:186:18 | SelfParam | | main.rs:174:5:177:5 | MyThing | +| main.rs:186:15:186:18 | SelfParam | A | main.rs:179:5:180:14 | S1 | +| main.rs:186:27:188:9 | { ... } | | main.rs:179:5:180:14 | S1 | +| main.rs:187:13:187:16 | self | | main.rs:174:5:177:5 | MyThing | +| main.rs:187:13:187:16 | self | A | main.rs:179:5:180:14 | S1 | +| main.rs:193:15:193:18 | SelfParam | | main.rs:174:5:177:5 | MyThing | +| main.rs:193:15:193:18 | SelfParam | A | main.rs:181:5:182:14 | S2 | +| main.rs:193:29:195:9 | { ... } | | main.rs:174:5:177:5 | MyThing | +| main.rs:193:29:195:9 | { ... } | A | main.rs:181:5:182:14 | S2 | +| main.rs:194:13:194:30 | Self {...} | | main.rs:174:5:177:5 | MyThing | +| main.rs:194:13:194:30 | Self {...} | A | main.rs:181:5:182:14 | S2 | +| main.rs:194:23:194:26 | self | | main.rs:174:5:177:5 | MyThing | +| main.rs:194:23:194:26 | self | A | main.rs:181:5:182:14 | S2 | +| main.rs:199:15:199:18 | SelfParam | | main.rs:174:5:177:5 | MyThing | +| main.rs:199:15:199:18 | SelfParam | A | main.rs:198:10:198:10 | T | +| main.rs:199:26:201:9 | { ... } | | main.rs:198:10:198:10 | T | +| main.rs:200:13:200:16 | self | | main.rs:174:5:177:5 | MyThing | +| main.rs:200:13:200:16 | self | A | main.rs:198:10:198:10 | T | +| main.rs:204:16:220:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:205:13:205:13 | x | | main.rs:174:5:177:5 | MyThing | +| main.rs:205:17:205:33 | MyThing {...} | | main.rs:174:5:177:5 | MyThing | +| main.rs:206:13:206:13 | y | | main.rs:174:5:177:5 | MyThing | +| main.rs:206:17:206:33 | MyThing {...} | | main.rs:174:5:177:5 | MyThing | +| main.rs:209:18:209:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:209:18:209:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:209:18:209:28 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:209:18:209:28 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:209:26:209:26 | x | | main.rs:174:5:177:5 | MyThing | +| main.rs:210:18:210:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:210:18:210:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:210:18:210:28 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:210:18:210:28 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:210:26:210:26 | y | | main.rs:174:5:177:5 | MyThing | +| main.rs:212:18:212:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:212:18:212:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:212:18:212:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:212:18:212:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:212:26:212:26 | x | | main.rs:174:5:177:5 | MyThing | +| main.rs:213:18:213:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:213:18:213:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:213:18:213:33 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:213:18:213:33 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:213:26:213:26 | y | | main.rs:174:5:177:5 | MyThing | +| main.rs:215:13:215:13 | x | | main.rs:174:5:177:5 | MyThing | +| main.rs:215:17:215:33 | MyThing {...} | | main.rs:174:5:177:5 | MyThing | +| main.rs:216:13:216:13 | y | | main.rs:174:5:177:5 | MyThing | +| main.rs:216:17:216:33 | MyThing {...} | | main.rs:174:5:177:5 | MyThing | +| main.rs:218:18:218:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:218:18:218:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:218:18:218:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:218:18:218:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:218:26:218:26 | x | | main.rs:174:5:177:5 | MyThing | +| main.rs:219:18:219:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:219:18:219:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:219:18:219:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:219:18:219:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:219:26:219:26 | y | | main.rs:174:5:177:5 | MyThing | +| main.rs:243:15:243:18 | SelfParam | | main.rs:242:5:251:5 | Self [trait MyTrait] | +| main.rs:245:15:245:18 | SelfParam | | main.rs:242:5:251:5 | Self [trait MyTrait] | +| main.rs:248:9:250:9 | { ... } | | main.rs:242:5:251:5 | Self [trait MyTrait] | +| main.rs:249:13:249:16 | self | | main.rs:242:5:251:5 | Self [trait MyTrait] | +| main.rs:255:16:255:19 | SelfParam | | main.rs:253:5:258:5 | Self [trait MyProduct] | +| main.rs:257:16:257:19 | SelfParam | | main.rs:253:5:258:5 | Self [trait MyProduct] | +| main.rs:260:43:260:43 | x | | main.rs:260:26:260:40 | T2 | +| main.rs:260:56:262:5 | { ... } | | main.rs:260:22:260:23 | T1 | +| main.rs:261:9:261:9 | x | | main.rs:260:26:260:40 | T2 | +| main.rs:266:15:266:18 | SelfParam | | main.rs:224:5:227:5 | MyThing | +| main.rs:266:15:266:18 | SelfParam | A | main.rs:235:5:236:14 | S1 | +| main.rs:266:27:268:9 | { ... } | | main.rs:235:5:236:14 | S1 | +| main.rs:267:13:267:16 | self | | main.rs:224:5:227:5 | MyThing | +| main.rs:267:13:267:16 | self | A | main.rs:235:5:236:14 | S1 | +| main.rs:273:15:273:18 | SelfParam | | main.rs:224:5:227:5 | MyThing | +| main.rs:273:15:273:18 | SelfParam | A | main.rs:237:5:238:14 | S2 | +| main.rs:273:29:275:9 | { ... } | | main.rs:224:5:227:5 | MyThing | +| main.rs:273:29:275:9 | { ... } | A | main.rs:237:5:238:14 | S2 | +| main.rs:274:13:274:30 | Self {...} | | main.rs:224:5:227:5 | MyThing | +| main.rs:274:13:274:30 | Self {...} | A | main.rs:237:5:238:14 | S2 | +| main.rs:274:23:274:26 | self | | main.rs:224:5:227:5 | MyThing | +| main.rs:274:23:274:26 | self | A | main.rs:237:5:238:14 | S2 | +| main.rs:285:15:285:18 | SelfParam | | main.rs:224:5:227:5 | MyThing | +| main.rs:285:15:285:18 | SelfParam | A | main.rs:239:5:240:14 | S3 | +| main.rs:285:27:287:9 | { ... } | | main.rs:280:10:280:11 | TD | +| main.rs:292:15:292:18 | SelfParam | | main.rs:229:5:233:5 | MyPair | +| main.rs:292:15:292:18 | SelfParam | P1 | main.rs:290:10:290:10 | I | +| main.rs:292:15:292:18 | SelfParam | P2 | main.rs:235:5:236:14 | S1 | +| main.rs:292:26:294:9 | { ... } | | main.rs:290:10:290:10 | I | +| main.rs:293:13:293:16 | self | | main.rs:229:5:233:5 | MyPair | +| main.rs:293:13:293:16 | self | P1 | main.rs:290:10:290:10 | I | +| main.rs:293:13:293:16 | self | P2 | main.rs:235:5:236:14 | S1 | +| main.rs:299:15:299:18 | SelfParam | | main.rs:229:5:233:5 | MyPair | +| main.rs:299:15:299:18 | SelfParam | P1 | main.rs:235:5:236:14 | S1 | +| main.rs:299:15:299:18 | SelfParam | P2 | main.rs:237:5:238:14 | S2 | +| main.rs:299:27:301:9 | { ... } | | main.rs:239:5:240:14 | S3 | +| main.rs:306:15:306:18 | SelfParam | | main.rs:229:5:233:5 | MyPair | +| main.rs:306:15:306:18 | SelfParam | P1 | main.rs:224:5:227:5 | MyThing | +| main.rs:306:15:306:18 | SelfParam | P1.A | main.rs:304:10:304:11 | TT | +| main.rs:306:15:306:18 | SelfParam | P2 | main.rs:239:5:240:14 | S3 | +| main.rs:306:27:309:9 | { ... } | | main.rs:304:10:304:11 | TT | +| main.rs:307:25:307:28 | self | | main.rs:229:5:233:5 | MyPair | +| main.rs:307:25:307:28 | self | P1 | main.rs:224:5:227:5 | MyThing | +| main.rs:307:25:307:28 | self | P1.A | main.rs:304:10:304:11 | TT | +| main.rs:307:25:307:28 | self | P2 | main.rs:239:5:240:14 | S3 | +| main.rs:315:16:315:19 | SelfParam | | main.rs:229:5:233:5 | MyPair | +| main.rs:315:16:315:19 | SelfParam | P1 | main.rs:313:10:313:10 | A | +| main.rs:315:16:315:19 | SelfParam | P2 | main.rs:313:10:313:10 | A | +| main.rs:315:27:317:9 | { ... } | | main.rs:313:10:313:10 | A | +| main.rs:316:13:316:16 | self | | main.rs:229:5:233:5 | MyPair | +| main.rs:316:13:316:16 | self | P1 | main.rs:313:10:313:10 | A | +| main.rs:316:13:316:16 | self | P2 | main.rs:313:10:313:10 | A | +| main.rs:320:16:320:19 | SelfParam | | main.rs:229:5:233:5 | MyPair | +| main.rs:320:16:320:19 | SelfParam | P1 | main.rs:313:10:313:10 | A | +| main.rs:320:16:320:19 | SelfParam | P2 | main.rs:313:10:313:10 | A | +| main.rs:320:27:322:9 | { ... } | | main.rs:313:10:313:10 | A | +| main.rs:321:13:321:16 | self | | main.rs:229:5:233:5 | MyPair | +| main.rs:321:13:321:16 | self | P1 | main.rs:313:10:313:10 | A | +| main.rs:321:13:321:16 | self | P2 | main.rs:313:10:313:10 | A | +| main.rs:328:16:328:19 | SelfParam | | main.rs:229:5:233:5 | MyPair | +| main.rs:328:16:328:19 | SelfParam | P1 | main.rs:237:5:238:14 | S2 | +| main.rs:328:16:328:19 | SelfParam | P2 | main.rs:235:5:236:14 | S1 | +| main.rs:328:28:330:9 | { ... } | | main.rs:235:5:236:14 | S1 | +| main.rs:329:13:329:16 | self | | main.rs:229:5:233:5 | MyPair | +| main.rs:329:13:329:16 | self | P1 | main.rs:237:5:238:14 | S2 | +| main.rs:329:13:329:16 | self | P2 | main.rs:235:5:236:14 | S1 | +| main.rs:333:16:333:19 | SelfParam | | main.rs:229:5:233:5 | MyPair | +| main.rs:333:16:333:19 | SelfParam | P1 | main.rs:237:5:238:14 | S2 | +| main.rs:333:16:333:19 | SelfParam | P2 | main.rs:235:5:236:14 | S1 | +| main.rs:333:28:335:9 | { ... } | | main.rs:237:5:238:14 | S2 | +| main.rs:334:13:334:16 | self | | main.rs:229:5:233:5 | MyPair | +| main.rs:334:13:334:16 | self | P1 | main.rs:237:5:238:14 | S2 | +| main.rs:334:13:334:16 | self | P2 | main.rs:235:5:236:14 | S1 | +| main.rs:338:46:338:46 | p | | main.rs:338:24:338:43 | P | +| main.rs:338:58:340:5 | { ... } | | main.rs:338:16:338:17 | V1 | +| main.rs:339:9:339:9 | p | | main.rs:338:24:338:43 | P | +| main.rs:342:46:342:46 | p | | main.rs:342:24:342:43 | P | +| main.rs:342:58:344:5 | { ... } | | main.rs:342:20:342:21 | V2 | +| main.rs:343:9:343:9 | p | | main.rs:342:24:342:43 | P | +| main.rs:346:54:346:54 | p | | main.rs:229:5:233:5 | MyPair | +| main.rs:346:54:346:54 | p | P1 | main.rs:346:20:346:21 | V0 | +| main.rs:346:54:346:54 | p | P2 | main.rs:346:32:346:51 | P | +| main.rs:346:78:348:5 | { ... } | | main.rs:346:24:346:25 | V1 | +| main.rs:347:9:347:9 | p | | main.rs:229:5:233:5 | MyPair | +| main.rs:347:9:347:9 | p | P1 | main.rs:346:20:346:21 | V0 | +| main.rs:347:9:347:9 | p | P2 | main.rs:346:32:346:51 | P | +| main.rs:352:23:352:26 | SelfParam | | main.rs:350:5:353:5 | Self [trait ConvertTo] | +| main.rs:357:23:357:26 | SelfParam | | main.rs:355:10:355:23 | T | +| main.rs:357:35:359:9 | { ... } | | main.rs:235:5:236:14 | S1 | +| main.rs:358:13:358:16 | self | | main.rs:355:10:355:23 | T | +| main.rs:362:41:362:45 | thing | | main.rs:362:23:362:38 | T | +| main.rs:362:57:364:5 | { ... } | | main.rs:362:19:362:20 | TS | +| main.rs:363:9:363:13 | thing | | main.rs:362:23:362:38 | T | +| main.rs:366:56:366:60 | thing | | main.rs:366:39:366:53 | TP | +| main.rs:366:73:369:5 | { ... } | | main.rs:235:5:236:14 | S1 | +| main.rs:368:9:368:13 | thing | | main.rs:366:39:366:53 | TP | +| main.rs:371:16:442:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:372:13:372:20 | thing_s1 | | main.rs:224:5:227:5 | MyThing | +| main.rs:372:24:372:40 | MyThing {...} | | main.rs:224:5:227:5 | MyThing | +| main.rs:373:13:373:20 | thing_s2 | | main.rs:224:5:227:5 | MyThing | +| main.rs:373:24:373:40 | MyThing {...} | | main.rs:224:5:227:5 | MyThing | +| main.rs:374:13:374:20 | thing_s3 | | main.rs:224:5:227:5 | MyThing | +| main.rs:374:24:374:40 | MyThing {...} | | main.rs:224:5:227:5 | MyThing | +| main.rs:378:18:378:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:378:18:378:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:378:18:378:38 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:378:18:378:38 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:378:26:378:33 | thing_s1 | | main.rs:224:5:227:5 | MyThing | +| main.rs:379:18:379:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:379:18:379:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:379:18:379:40 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:379:18:379:40 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:379:26:379:33 | thing_s2 | | main.rs:224:5:227:5 | MyThing | +| main.rs:380:13:380:14 | s3 | | main.rs:239:5:240:14 | S3 | +| main.rs:380:22:380:29 | thing_s3 | | main.rs:224:5:227:5 | MyThing | +| main.rs:381:18:381:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:381:18:381:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:381:18:381:27 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:381:18:381:27 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:381:26:381:27 | s3 | | main.rs:239:5:240:14 | S3 | +| main.rs:383:13:383:14 | p1 | | main.rs:229:5:233:5 | MyPair | +| main.rs:383:18:383:42 | MyPair {...} | | main.rs:229:5:233:5 | MyPair | +| main.rs:384:18:384:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:384:18:384:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:384:18:384:32 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:384:18:384:32 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:384:26:384:27 | p1 | | main.rs:229:5:233:5 | MyPair | +| main.rs:386:13:386:14 | p2 | | main.rs:229:5:233:5 | MyPair | +| main.rs:386:18:386:42 | MyPair {...} | | main.rs:229:5:233:5 | MyPair | +| main.rs:387:18:387:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:387:18:387:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:387:18:387:32 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:387:18:387:32 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:387:26:387:27 | p2 | | main.rs:229:5:233:5 | MyPair | +| main.rs:389:13:389:14 | p3 | | main.rs:229:5:233:5 | MyPair | +| main.rs:389:18:392:9 | MyPair {...} | | main.rs:229:5:233:5 | MyPair | +| main.rs:390:17:390:33 | MyThing {...} | | main.rs:224:5:227:5 | MyThing | +| main.rs:393:18:393:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:393:18:393:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:393:18:393:32 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:393:18:393:32 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:393:26:393:27 | p3 | | main.rs:229:5:233:5 | MyPair | +| main.rs:396:13:396:13 | a | | main.rs:229:5:233:5 | MyPair | +| main.rs:396:17:396:41 | MyPair {...} | | main.rs:229:5:233:5 | MyPair | +| main.rs:397:17:397:17 | a | | main.rs:229:5:233:5 | MyPair | +| main.rs:398:18:398:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:398:18:398:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:398:18:398:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:398:18:398:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:399:17:399:17 | a | | main.rs:229:5:233:5 | MyPair | +| main.rs:400:18:400:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:400:18:400:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:400:18:400:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:400:18:400:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:406:13:406:13 | b | | main.rs:229:5:233:5 | MyPair | +| main.rs:406:17:406:41 | MyPair {...} | | main.rs:229:5:233:5 | MyPair | +| main.rs:407:17:407:17 | b | | main.rs:229:5:233:5 | MyPair | +| main.rs:408:18:408:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:408:18:408:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:408:18:408:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:408:18:408:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:409:17:409:17 | b | | main.rs:229:5:233:5 | MyPair | +| main.rs:410:18:410:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:410:18:410:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:410:18:410:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:410:18:410:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:414:31:414:38 | thing_s1 | | main.rs:224:5:227:5 | MyThing | +| main.rs:415:18:415:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:415:18:415:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:415:18:415:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:415:18:415:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:416:31:416:38 | thing_s2 | | main.rs:224:5:227:5 | MyThing | +| main.rs:417:18:417:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:417:18:417:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:417:18:417:28 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:417:18:417:28 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:420:13:420:13 | a | | main.rs:229:5:233:5 | MyPair | +| main.rs:420:17:420:41 | MyPair {...} | | main.rs:229:5:233:5 | MyPair | +| main.rs:421:25:421:25 | a | | main.rs:229:5:233:5 | MyPair | +| main.rs:422:18:422:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:422:18:422:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:422:18:422:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:422:18:422:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:423:25:423:25 | a | | main.rs:229:5:233:5 | MyPair | +| main.rs:424:18:424:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:424:18:424:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:424:18:424:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:424:18:424:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:427:13:427:13 | b | | main.rs:229:5:233:5 | MyPair | +| main.rs:427:17:427:41 | MyPair {...} | | main.rs:229:5:233:5 | MyPair | +| main.rs:428:25:428:25 | b | | main.rs:229:5:233:5 | MyPair | +| main.rs:429:18:429:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:429:18:429:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:429:18:429:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:429:18:429:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:430:25:430:25 | b | | main.rs:229:5:233:5 | MyPair | +| main.rs:431:18:431:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:431:18:431:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:431:18:431:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:431:18:431:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:433:13:433:13 | c | | main.rs:229:5:233:5 | MyPair | +| main.rs:433:17:436:9 | MyPair {...} | | main.rs:229:5:233:5 | MyPair | +| main.rs:435:17:435:41 | MyPair {...} | | main.rs:229:5:233:5 | MyPair | +| main.rs:437:29:437:29 | c | | main.rs:229:5:233:5 | MyPair | +| main.rs:439:13:439:17 | thing | | main.rs:224:5:227:5 | MyThing | +| main.rs:439:21:439:37 | MyThing {...} | | main.rs:224:5:227:5 | MyThing | +| main.rs:440:17:440:21 | thing | | main.rs:224:5:227:5 | MyThing | +| main.rs:441:28:441:32 | thing | | main.rs:224:5:227:5 | MyThing | +| main.rs:450:26:450:29 | SelfParam | | main.rs:449:5:453:5 | Self [trait OverlappingTrait] | +| main.rs:452:28:452:31 | SelfParam | | main.rs:449:5:453:5 | Self [trait OverlappingTrait] | +| main.rs:452:34:452:35 | s1 | | main.rs:446:5:447:14 | S1 | +| main.rs:457:26:457:29 | SelfParam | | main.rs:446:5:447:14 | S1 | +| main.rs:457:38:459:9 | { ... } | | main.rs:446:5:447:14 | S1 | +| main.rs:462:28:462:31 | SelfParam | | main.rs:446:5:447:14 | S1 | +| main.rs:462:34:462:35 | s1 | | main.rs:446:5:447:14 | S1 | +| main.rs:462:48:464:9 | { ... } | | main.rs:446:5:447:14 | S1 | +| main.rs:469:26:469:29 | SelfParam | | main.rs:446:5:447:14 | S1 | +| main.rs:469:38:471:9 | { ... } | | main.rs:446:5:447:14 | S1 | +| main.rs:470:13:470:16 | self | | main.rs:446:5:447:14 | S1 | +| main.rs:474:28:474:31 | SelfParam | | main.rs:446:5:447:14 | S1 | +| main.rs:474:40:476:9 | { ... } | | main.rs:446:5:447:14 | S1 | +| main.rs:475:13:475:16 | self | | main.rs:446:5:447:14 | S1 | +| main.rs:483:26:483:29 | SelfParam | | main.rs:479:5:479:22 | S2 | +| main.rs:483:26:483:29 | SelfParam | T2 | {EXTERNAL LOCATION} | i32 | +| main.rs:483:38:485:9 | { ... } | | main.rs:446:5:447:14 | S1 | +| main.rs:488:28:488:31 | SelfParam | | main.rs:479:5:479:22 | S2 | +| main.rs:488:28:488:31 | SelfParam | T2 | {EXTERNAL LOCATION} | i32 | +| main.rs:488:40:490:9 | { ... } | | main.rs:446:5:447:14 | S1 | +| main.rs:495:26:495:29 | SelfParam | | main.rs:479:5:479:22 | S2 | +| main.rs:495:26:495:29 | SelfParam | T2 | {EXTERNAL LOCATION} | i32 | +| main.rs:495:38:497:9 | { ... } | | main.rs:446:5:447:14 | S1 | +| main.rs:500:28:500:31 | SelfParam | | main.rs:479:5:479:22 | S2 | +| main.rs:500:28:500:31 | SelfParam | T2 | {EXTERNAL LOCATION} | i32 | +| main.rs:500:34:500:35 | s1 | | main.rs:446:5:447:14 | S1 | +| main.rs:500:48:502:9 | { ... } | | main.rs:446:5:447:14 | S1 | +| main.rs:507:26:507:29 | SelfParam | | main.rs:479:5:479:22 | S2 | +| main.rs:507:26:507:29 | SelfParam | T2 | main.rs:446:5:447:14 | S1 | +| main.rs:507:38:509:9 | { ... } | | main.rs:446:5:447:14 | S1 | +| main.rs:512:28:512:31 | SelfParam | | main.rs:479:5:479:22 | S2 | +| main.rs:512:28:512:31 | SelfParam | T2 | main.rs:446:5:447:14 | S1 | +| main.rs:512:34:512:35 | s1 | | main.rs:446:5:447:14 | S1 | +| main.rs:512:48:514:9 | { ... } | | main.rs:446:5:447:14 | S1 | +| main.rs:521:14:521:18 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:521:14:521:18 | SelfParam | TRef | main.rs:520:5:522:5 | Self [trait OverlappingTrait2] | +| main.rs:521:21:521:21 | x | | {EXTERNAL LOCATION} | & | +| main.rs:521:21:521:21 | x | TRef | main.rs:520:29:520:29 | T | +| main.rs:526:14:526:18 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:526:14:526:18 | SelfParam | TRef | main.rs:517:5:518:22 | S3 | +| main.rs:526:14:526:18 | SelfParam | TRef.T3 | main.rs:524:10:524:10 | T | +| main.rs:526:21:526:21 | x | | {EXTERNAL LOCATION} | & | +| main.rs:526:21:526:21 | x | TRef | main.rs:524:10:524:10 | T | +| main.rs:526:37:528:9 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:526:37:528:9 | { ... } | TRef | main.rs:517:5:518:22 | S3 | +| main.rs:526:37:528:9 | { ... } | TRef.T3 | main.rs:524:10:524:10 | T | +| main.rs:527:13:527:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:527:13:527:16 | self | TRef | main.rs:517:5:518:22 | S3 | +| main.rs:527:13:527:16 | self | TRef.T3 | main.rs:524:10:524:10 | T | +| main.rs:533:14:533:18 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:533:14:533:18 | SelfParam | TRef | main.rs:517:5:518:22 | S3 | +| main.rs:533:14:533:18 | SelfParam | TRef.T3 | main.rs:531:10:531:10 | T | +| main.rs:533:21:533:21 | x | | main.rs:531:10:531:10 | T | +| main.rs:533:36:535:9 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:533:36:535:9 | { ... } | TRef | main.rs:517:5:518:22 | S3 | +| main.rs:533:36:535:9 | { ... } | TRef.T3 | main.rs:531:10:531:10 | T | +| main.rs:534:13:534:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:534:13:534:16 | self | TRef | main.rs:517:5:518:22 | S3 | +| main.rs:534:13:534:16 | self | TRef.T3 | main.rs:531:10:531:10 | T | +| main.rs:540:14:540:18 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:540:14:540:18 | SelfParam | TRef | main.rs:538:5:541:5 | Self [trait MyTrait1] | +| main.rs:540:21:540:22 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:550:14:550:18 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:550:14:550:18 | SelfParam | TRef | main.rs:545:5:546:14 | S4 | +| main.rs:550:21:550:22 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:560:14:560:18 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:560:14:560:18 | SelfParam | TRef | main.rs:555:5:556:22 | S5 | +| main.rs:560:14:560:18 | SelfParam | TRef.T5 | {EXTERNAL LOCATION} | i32 | +| main.rs:560:21:560:22 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:569:16:595:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:571:18:571:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:571:18:571:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:571:18:571:42 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:571:18:571:42 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:572:18:572:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:572:18:572:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:572:18:572:45 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:572:18:572:45 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:572:26:572:45 | ...::common_method(...) | | main.rs:446:5:447:14 | S1 | +| main.rs:573:18:573:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:573:18:573:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:573:18:573:44 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:573:18:573:44 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:574:18:574:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:574:18:574:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:574:18:574:47 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:574:18:574:47 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:574:26:574:47 | ...::common_method_2(...) | | main.rs:446:5:447:14 | S1 | +| main.rs:577:18:577:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:577:18:577:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:577:18:577:42 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:577:18:577:42 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:578:18:578:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:578:18:578:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:578:18:578:56 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:578:18:578:56 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:578:26:578:56 | ...::common_method(...) | | main.rs:446:5:447:14 | S1 | +| main.rs:581:18:581:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:581:18:581:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:581:18:581:42 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:581:18:581:42 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:582:18:582:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:582:18:582:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:582:18:582:49 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:582:18:582:49 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:582:26:582:49 | ...::common_method(...) | | main.rs:446:5:447:14 | S1 | +| main.rs:583:18:583:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:583:18:583:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:583:18:583:56 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:583:18:583:56 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:583:26:583:56 | ...::common_method(...) | | main.rs:446:5:447:14 | S1 | +| main.rs:586:18:586:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:586:18:586:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:586:18:586:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:586:18:586:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:587:18:587:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:587:18:587:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:587:18:587:37 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:587:18:587:37 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:587:26:587:37 | ...::m(...) | | {EXTERNAL LOCATION} | & | +| main.rs:587:26:587:37 | ...::m(...) | TRef | main.rs:517:5:518:22 | S3 | +| main.rs:587:32:587:33 | &w | | {EXTERNAL LOCATION} | & | +| main.rs:590:9:590:18 | ...::m(...) | | {EXTERNAL LOCATION} | () | +| main.rs:590:15:590:17 | &S4 | | {EXTERNAL LOCATION} | & | +| main.rs:591:12:591:15 | 0i32 | | {EXTERNAL LOCATION} | i32 | +| main.rs:592:9:592:24 | ...::m(...) | | {EXTERNAL LOCATION} | () | +| main.rs:592:15:592:23 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:592:19:592:22 | 0i32 | | {EXTERNAL LOCATION} | i32 | +| main.rs:593:12:593:15 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:594:9:594:24 | ...::m(...) | | {EXTERNAL LOCATION} | () | +| main.rs:594:15:594:23 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:594:19:594:22 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:611:19:611:22 | SelfParam | | main.rs:609:5:612:5 | Self [trait FirstTrait] | +| main.rs:616:19:616:22 | SelfParam | | main.rs:614:5:617:5 | Self [trait SecondTrait] | +| main.rs:619:64:619:64 | x | | main.rs:619:45:619:61 | T | +| main.rs:619:70:623:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:621:18:621:18 | x | | main.rs:619:45:619:61 | T | +| main.rs:622:18:622:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:622:18:622:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:622:18:622:27 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:622:18:622:27 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:625:65:625:65 | x | | main.rs:625:46:625:62 | T | +| main.rs:625:71:629:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:627:18:627:18 | x | | main.rs:625:46:625:62 | T | +| main.rs:628:18:628:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:628:18:628:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:628:18:628:27 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:628:18:628:27 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:631:49:631:49 | x | | main.rs:631:30:631:46 | T | +| main.rs:631:55:634:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:632:17:632:17 | x | | main.rs:631:30:631:46 | T | +| main.rs:633:18:633:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:633:18:633:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:633:18:633:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:633:18:633:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:636:53:636:53 | x | | main.rs:636:34:636:50 | T | +| main.rs:636:59:639:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:637:17:637:17 | x | | main.rs:636:34:636:50 | T | +| main.rs:638:18:638:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:638:18:638:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:638:18:638:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:638:18:638:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:641:43:641:43 | x | | main.rs:641:40:641:40 | T | +| main.rs:644:5:647:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:645:17:645:17 | x | | main.rs:641:40:641:40 | T | +| main.rs:646:18:646:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:646:18:646:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:646:18:646:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:646:18:646:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:650:16:650:19 | SelfParam | | main.rs:649:5:653:5 | Self [trait Pair] | +| main.rs:652:16:652:19 | SelfParam | | main.rs:649:5:653:5 | Self [trait Pair] | +| main.rs:655:53:655:53 | x | | main.rs:655:50:655:50 | T | +| main.rs:655:59:655:59 | y | | main.rs:655:50:655:50 | T | +| main.rs:659:5:662:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:660:17:660:17 | x | | main.rs:655:50:655:50 | T | +| main.rs:661:17:661:17 | y | | main.rs:655:50:655:50 | T | +| main.rs:664:58:664:58 | x | | main.rs:664:41:664:55 | T | +| main.rs:664:64:664:64 | y | | main.rs:664:41:664:55 | T | +| main.rs:664:70:669:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:666:18:666:18 | x | | main.rs:664:41:664:55 | T | +| main.rs:667:18:667:18 | y | | main.rs:664:41:664:55 | T | +| main.rs:668:18:668:29 | "{:?}, {:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:668:18:668:29 | "{:?}, {:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:668:18:668:37 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:668:18:668:37 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:671:69:671:69 | x | | main.rs:671:52:671:66 | T | +| main.rs:671:75:671:75 | y | | main.rs:671:52:671:66 | T | +| main.rs:671:81:676:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:673:18:673:18 | x | | main.rs:671:52:671:66 | T | +| main.rs:674:18:674:18 | y | | main.rs:671:52:671:66 | T | +| main.rs:675:18:675:29 | "{:?}, {:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:675:18:675:29 | "{:?}, {:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:675:18:675:37 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:675:18:675:37 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:678:50:678:50 | x | | main.rs:678:41:678:47 | T | +| main.rs:678:56:678:56 | y | | main.rs:678:41:678:47 | T | +| main.rs:678:62:683:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:680:18:680:18 | x | | main.rs:678:41:678:47 | T | +| main.rs:681:18:681:18 | y | | main.rs:678:41:678:47 | T | +| main.rs:682:18:682:29 | "{:?}, {:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:682:18:682:29 | "{:?}, {:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:682:18:682:37 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:682:18:682:37 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:685:54:685:54 | x | | main.rs:685:41:685:51 | T | +| main.rs:685:60:685:60 | y | | main.rs:685:41:685:51 | T | +| main.rs:685:66:690:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:687:18:687:18 | x | | main.rs:685:41:685:51 | T | +| main.rs:688:18:688:18 | y | | main.rs:685:41:685:51 | T | +| main.rs:689:18:689:29 | "{:?}, {:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:689:18:689:29 | "{:?}, {:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:689:18:689:37 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:689:18:689:37 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:697:18:697:22 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:697:18:697:22 | SelfParam | TRef | main.rs:694:5:698:5 | Self [trait TraitWithSelfTp] | +| main.rs:700:40:700:44 | thing | | {EXTERNAL LOCATION} | & | +| main.rs:700:40:700:44 | thing | TRef | main.rs:700:17:700:37 | T | +| main.rs:700:56:702:5 | { ... } | | main.rs:700:14:700:14 | A | +| main.rs:701:9:701:13 | thing | | {EXTERNAL LOCATION} | & | +| main.rs:701:9:701:13 | thing | TRef | main.rs:700:17:700:37 | T | +| main.rs:705:44:705:48 | thing | | main.rs:705:24:705:41 | S | +| main.rs:705:61:708:5 | { ... } | | {EXTERNAL LOCATION} | i64 | +| main.rs:706:19:706:23 | thing | | main.rs:705:24:705:41 | S | +| main.rs:713:55:713:59 | thing | | {EXTERNAL LOCATION} | & | +| main.rs:713:55:713:59 | thing | TRef | main.rs:713:25:713:52 | S | +| main.rs:713:66:716:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:715:25:715:29 | thing | | {EXTERNAL LOCATION} | & | +| main.rs:715:25:715:29 | thing | TRef | main.rs:713:25:713:52 | S | +| main.rs:724:18:724:22 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:724:18:724:22 | SelfParam | TRef | main.rs:718:5:720:5 | MyStruct | +| main.rs:724:41:726:9 | { ... } | | {EXTERNAL LOCATION} | Option | +| main.rs:724:41:726:9 | { ... } | T | main.rs:718:5:720:5 | MyStruct | +| main.rs:725:18:725:47 | MyStruct {...} | | main.rs:718:5:720:5 | MyStruct | +| main.rs:725:36:725:39 | self | | {EXTERNAL LOCATION} | & | +| main.rs:725:36:725:39 | self | TRef | main.rs:718:5:720:5 | MyStruct | +| main.rs:731:19:734:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:732:13:732:13 | s | | main.rs:718:5:720:5 | MyStruct | +| main.rs:732:17:732:37 | MyStruct {...} | | main.rs:718:5:720:5 | MyStruct | +| main.rs:733:25:733:26 | &s | | {EXTERNAL LOCATION} | & | +| main.rs:733:26:733:26 | s | | main.rs:718:5:720:5 | MyStruct | +| main.rs:749:15:749:18 | SelfParam | | main.rs:748:5:759:5 | Self [trait MyTrait] | +| main.rs:751:15:751:18 | SelfParam | | main.rs:748:5:759:5 | Self [trait MyTrait] | +| main.rs:754:9:756:9 | { ... } | | main.rs:748:19:748:19 | A | +| main.rs:755:13:755:16 | self | | main.rs:748:5:759:5 | Self [trait MyTrait] | +| main.rs:758:18:758:18 | x | | main.rs:748:5:759:5 | Self [trait MyTrait] | +| main.rs:762:15:762:18 | SelfParam | | main.rs:745:5:746:14 | S2 | +| main.rs:762:26:764:9 | { ... } | | main.rs:761:10:761:19 | T | +| main.rs:766:18:766:18 | x | | main.rs:745:5:746:14 | S2 | +| main.rs:766:32:768:9 | { ... } | | main.rs:761:10:761:19 | T | +| main.rs:772:15:772:18 | SelfParam | | main.rs:743:5:744:14 | S1 | +| main.rs:772:28:774:9 | { ... } | | {EXTERNAL LOCATION} | i32 | +| main.rs:776:18:776:18 | x | | main.rs:743:5:744:14 | S1 | +| main.rs:776:34:778:9 | { ... } | | {EXTERNAL LOCATION} | i32 | +| main.rs:783:50:783:50 | x | | main.rs:783:26:783:47 | T2 | +| main.rs:783:63:786:5 | { ... } | | main.rs:783:22:783:23 | T1 | +| main.rs:784:9:784:9 | x | | main.rs:783:26:783:47 | T2 | +| main.rs:785:9:785:9 | x | | main.rs:783:26:783:47 | T2 | +| main.rs:787:52:787:52 | x | | main.rs:787:28:787:49 | T2 | +| main.rs:787:65:791:5 | { ... } | | main.rs:787:24:787:25 | T1 | +| main.rs:788:24:788:24 | x | | main.rs:787:28:787:49 | T2 | +| main.rs:790:16:790:16 | x | | main.rs:787:28:787:49 | T2 | +| main.rs:792:52:792:52 | x | | main.rs:792:28:792:49 | T2 | +| main.rs:792:65:796:5 | { ... } | | main.rs:792:24:792:25 | T1 | +| main.rs:793:29:793:29 | x | | main.rs:792:28:792:49 | T2 | +| main.rs:795:21:795:21 | x | | main.rs:792:28:792:49 | T2 | +| main.rs:797:55:797:55 | x | | main.rs:797:31:797:52 | T2 | +| main.rs:797:68:801:5 | { ... } | | main.rs:797:27:797:28 | T1 | +| main.rs:798:27:798:27 | x | | main.rs:797:31:797:52 | T2 | +| main.rs:800:19:800:19 | x | | main.rs:797:31:797:52 | T2 | +| main.rs:802:55:802:55 | x | | main.rs:802:31:802:52 | T2 | +| main.rs:802:68:806:5 | { ... } | | main.rs:802:27:802:28 | T1 | +| main.rs:803:32:803:32 | x | | main.rs:802:31:802:52 | T2 | +| main.rs:805:24:805:24 | x | | main.rs:802:31:802:52 | T2 | +| main.rs:810:49:810:49 | x | | main.rs:738:5:741:5 | MyThing | +| main.rs:810:49:810:49 | x | T | main.rs:810:32:810:46 | T2 | +| main.rs:810:71:812:5 | { ... } | | main.rs:810:28:810:29 | T1 | +| main.rs:811:9:811:9 | x | | main.rs:738:5:741:5 | MyThing | +| main.rs:811:9:811:9 | x | T | main.rs:810:32:810:46 | T2 | +| main.rs:813:51:813:51 | x | | main.rs:738:5:741:5 | MyThing | +| main.rs:813:51:813:51 | x | T | main.rs:813:34:813:48 | T2 | +| main.rs:813:73:815:5 | { ... } | | main.rs:813:30:813:31 | T1 | +| main.rs:814:16:814:16 | x | | main.rs:738:5:741:5 | MyThing | +| main.rs:814:16:814:16 | x | T | main.rs:813:34:813:48 | T2 | +| main.rs:816:51:816:51 | x | | main.rs:738:5:741:5 | MyThing | +| main.rs:816:51:816:51 | x | T | main.rs:816:34:816:48 | T2 | +| main.rs:816:73:818:5 | { ... } | | main.rs:816:30:816:31 | T1 | +| main.rs:817:21:817:21 | x | | main.rs:738:5:741:5 | MyThing | +| main.rs:817:21:817:21 | x | T | main.rs:816:34:816:48 | T2 | +| main.rs:821:15:821:18 | SelfParam | | main.rs:738:5:741:5 | MyThing | +| main.rs:821:15:821:18 | SelfParam | T | main.rs:820:10:820:10 | T | +| main.rs:821:26:823:9 | { ... } | | main.rs:820:10:820:10 | T | +| main.rs:822:13:822:16 | self | | main.rs:738:5:741:5 | MyThing | +| main.rs:822:13:822:16 | self | T | main.rs:820:10:820:10 | T | +| main.rs:825:18:825:18 | x | | main.rs:738:5:741:5 | MyThing | +| main.rs:825:18:825:18 | x | T | main.rs:820:10:820:10 | T | +| main.rs:825:32:827:9 | { ... } | | main.rs:820:10:820:10 | T | +| main.rs:826:13:826:13 | x | | main.rs:738:5:741:5 | MyThing | +| main.rs:826:13:826:13 | x | T | main.rs:820:10:820:10 | T | +| main.rs:830:16:888:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:831:13:831:13 | x | | main.rs:738:5:741:5 | MyThing | +| main.rs:831:17:831:33 | MyThing {...} | | main.rs:738:5:741:5 | MyThing | +| main.rs:832:13:832:13 | y | | main.rs:738:5:741:5 | MyThing | +| main.rs:832:17:832:33 | MyThing {...} | | main.rs:738:5:741:5 | MyThing | +| main.rs:834:18:834:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:834:18:834:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:834:18:834:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:834:18:834:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:834:26:834:26 | x | | main.rs:738:5:741:5 | MyThing | +| main.rs:835:18:835:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:835:18:835:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:835:18:835:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:835:18:835:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:835:26:835:26 | y | | main.rs:738:5:741:5 | MyThing | +| main.rs:837:13:837:13 | x | | main.rs:738:5:741:5 | MyThing | +| main.rs:837:17:837:33 | MyThing {...} | | main.rs:738:5:741:5 | MyThing | +| main.rs:838:13:838:13 | y | | main.rs:738:5:741:5 | MyThing | +| main.rs:838:17:838:33 | MyThing {...} | | main.rs:738:5:741:5 | MyThing | +| main.rs:840:18:840:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:840:18:840:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:840:18:840:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:840:18:840:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:840:26:840:26 | x | | main.rs:738:5:741:5 | MyThing | +| main.rs:841:18:841:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:841:18:841:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:841:18:841:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:841:18:841:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:841:26:841:26 | y | | main.rs:738:5:741:5 | MyThing | +| main.rs:843:13:843:14 | x2 | | main.rs:738:5:741:5 | MyThing | +| main.rs:843:18:843:34 | MyThing {...} | | main.rs:738:5:741:5 | MyThing | +| main.rs:844:13:844:14 | y2 | | main.rs:738:5:741:5 | MyThing | +| main.rs:844:18:844:34 | MyThing {...} | | main.rs:738:5:741:5 | MyThing | +| main.rs:846:31:846:32 | x2 | | main.rs:738:5:741:5 | MyThing | +| main.rs:847:18:847:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:847:18:847:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:847:18:847:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:847:18:847:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:848:33:848:34 | x2 | | main.rs:738:5:741:5 | MyThing | +| main.rs:849:18:849:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:849:18:849:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:849:18:849:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:849:18:849:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:850:33:850:34 | x2 | | main.rs:738:5:741:5 | MyThing | +| main.rs:851:18:851:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:851:18:851:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:851:18:851:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:851:18:851:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:852:31:852:32 | y2 | | main.rs:738:5:741:5 | MyThing | +| main.rs:853:18:853:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:853:18:853:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:853:18:853:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:853:18:853:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:854:33:854:34 | y2 | | main.rs:738:5:741:5 | MyThing | +| main.rs:855:18:855:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:855:18:855:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:855:18:855:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:855:18:855:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:856:33:856:34 | y2 | | main.rs:738:5:741:5 | MyThing | +| main.rs:857:18:857:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:857:18:857:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:857:18:857:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:857:18:857:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:858:36:858:37 | x2 | | main.rs:738:5:741:5 | MyThing | +| main.rs:859:18:859:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:859:18:859:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:859:18:859:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:859:18:859:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:860:36:860:37 | x2 | | main.rs:738:5:741:5 | MyThing | +| main.rs:861:18:861:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:861:18:861:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:861:18:861:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:861:18:861:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:862:36:862:37 | y2 | | main.rs:738:5:741:5 | MyThing | +| main.rs:863:18:863:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:863:18:863:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:863:18:863:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:863:18:863:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:864:36:864:37 | y2 | | main.rs:738:5:741:5 | MyThing | +| main.rs:865:18:865:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:865:18:865:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:865:18:865:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:865:18:865:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:867:13:867:14 | x3 | | main.rs:738:5:741:5 | MyThing | +| main.rs:867:18:869:9 | MyThing {...} | | main.rs:738:5:741:5 | MyThing | +| main.rs:868:16:868:32 | MyThing {...} | | main.rs:738:5:741:5 | MyThing | +| main.rs:870:13:870:14 | y3 | | main.rs:738:5:741:5 | MyThing | +| main.rs:870:18:872:9 | MyThing {...} | | main.rs:738:5:741:5 | MyThing | +| main.rs:871:16:871:32 | MyThing {...} | | main.rs:738:5:741:5 | MyThing | +| main.rs:874:37:874:38 | x3 | | main.rs:738:5:741:5 | MyThing | +| main.rs:875:18:875:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:875:18:875:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:875:18:875:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:875:18:875:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:876:39:876:40 | x3 | | main.rs:738:5:741:5 | MyThing | +| main.rs:877:18:877:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:877:18:877:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:877:18:877:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:877:18:877:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:878:39:878:40 | x3 | | main.rs:738:5:741:5 | MyThing | +| main.rs:879:18:879:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:879:18:879:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:879:18:879:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:879:18:879:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:880:37:880:38 | y3 | | main.rs:738:5:741:5 | MyThing | +| main.rs:881:18:881:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:881:18:881:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:881:18:881:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:881:18:881:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:882:39:882:40 | y3 | | main.rs:738:5:741:5 | MyThing | +| main.rs:883:18:883:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:883:18:883:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:883:18:883:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:883:18:883:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:884:39:884:40 | y3 | | main.rs:738:5:741:5 | MyThing | +| main.rs:885:18:885:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:885:18:885:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:885:18:885:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:885:18:885:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:887:13:887:13 | y | | {EXTERNAL LOCATION} | i32 | +| main.rs:898:19:898:22 | SelfParam | | main.rs:892:5:895:5 | Wrapper | +| main.rs:898:19:898:22 | SelfParam | A | main.rs:897:10:897:10 | A | +| main.rs:898:30:900:9 | { ... } | | main.rs:897:10:897:10 | A | +| main.rs:899:13:899:16 | self | | main.rs:892:5:895:5 | Wrapper | +| main.rs:899:13:899:16 | self | A | main.rs:897:10:897:10 | A | +| main.rs:907:15:907:18 | SelfParam | | main.rs:903:5:917:5 | Self [trait MyTrait] | +| main.rs:909:15:909:18 | SelfParam | | main.rs:903:5:917:5 | Self [trait MyTrait] | +| main.rs:913:9:916:9 | { ... } | | main.rs:904:9:904:28 | AssociatedType | +| main.rs:914:13:914:16 | self | | main.rs:903:5:917:5 | Self [trait MyTrait] | +| main.rs:923:19:923:23 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:923:19:923:23 | SelfParam | TRef | main.rs:919:5:929:5 | Self [trait MyTraitAssoc2] | +| main.rs:923:26:923:26 | a | | main.rs:923:16:923:16 | A | +| main.rs:925:22:925:26 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:925:22:925:26 | SelfParam | TRef | main.rs:919:5:929:5 | Self [trait MyTraitAssoc2] | +| main.rs:925:29:925:29 | a | | main.rs:925:19:925:19 | A | +| main.rs:925:35:925:35 | b | | main.rs:925:19:925:19 | A | +| main.rs:925:75:928:9 | { ... } | | main.rs:920:9:920:52 | GenericAssociatedType | +| main.rs:926:13:926:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:926:13:926:16 | self | TRef | main.rs:919:5:929:5 | Self [trait MyTraitAssoc2] | +| main.rs:926:22:926:22 | a | | main.rs:925:19:925:19 | A | +| main.rs:927:13:927:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:927:13:927:16 | self | TRef | main.rs:919:5:929:5 | Self [trait MyTraitAssoc2] | +| main.rs:927:22:927:22 | b | | main.rs:925:19:925:19 | A | +| main.rs:936:21:936:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:936:21:936:25 | SelfParam | TRef | main.rs:931:5:941:5 | Self [trait TraitMultipleAssoc] | +| main.rs:938:20:938:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:938:20:938:24 | SelfParam | TRef | main.rs:931:5:941:5 | Self [trait TraitMultipleAssoc] | +| main.rs:940:20:940:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:940:20:940:24 | SelfParam | TRef | main.rs:931:5:941:5 | Self [trait TraitMultipleAssoc] | +| main.rs:956:15:956:18 | SelfParam | | main.rs:943:5:944:13 | S | +| main.rs:956:45:958:9 | { ... } | | main.rs:949:5:950:14 | AT | +| main.rs:966:19:966:23 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:966:19:966:23 | SelfParam | TRef | main.rs:943:5:944:13 | S | +| main.rs:966:26:966:26 | a | | main.rs:966:16:966:16 | A | +| main.rs:966:46:968:9 | { ... } | | main.rs:892:5:895:5 | Wrapper | +| main.rs:966:46:968:9 | { ... } | A | main.rs:966:16:966:16 | A | +| main.rs:967:13:967:32 | Wrapper {...} | | main.rs:892:5:895:5 | Wrapper | +| main.rs:967:30:967:30 | a | | main.rs:966:16:966:16 | A | +| main.rs:975:15:975:18 | SelfParam | | main.rs:946:5:947:14 | S2 | +| main.rs:975:45:977:9 | { ... } | | main.rs:892:5:895:5 | Wrapper | +| main.rs:975:45:977:9 | { ... } | A | main.rs:946:5:947:14 | S2 | +| main.rs:976:13:976:35 | Wrapper {...} | | main.rs:892:5:895:5 | Wrapper | +| main.rs:976:30:976:33 | self | | main.rs:946:5:947:14 | S2 | +| main.rs:982:30:984:9 | { ... } | | main.rs:892:5:895:5 | Wrapper | +| main.rs:982:30:984:9 | { ... } | A | main.rs:946:5:947:14 | S2 | +| main.rs:983:13:983:33 | Wrapper {...} | | main.rs:892:5:895:5 | Wrapper | +| main.rs:989:22:989:26 | thing | | main.rs:989:10:989:19 | T | +| main.rs:990:9:990:13 | thing | | main.rs:989:10:989:19 | T | +| main.rs:997:21:997:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:997:21:997:25 | SelfParam | TRef | main.rs:949:5:950:14 | AT | +| main.rs:997:34:999:9 | { ... } | | main.rs:949:5:950:14 | AT | +| main.rs:1001:20:1001:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1001:20:1001:24 | SelfParam | TRef | main.rs:949:5:950:14 | AT | +| main.rs:1001:43:1003:9 | { ... } | | main.rs:943:5:944:13 | S | +| main.rs:1005:20:1005:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1005:20:1005:24 | SelfParam | TRef | main.rs:949:5:950:14 | AT | +| main.rs:1005:43:1007:9 | { ... } | | main.rs:946:5:947:14 | S2 | +| main.rs:1010:16:1038:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1013:18:1013:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1013:18:1013:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1013:18:1013:32 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1013:18:1013:32 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1018:18:1018:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1018:18:1018:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1018:18:1018:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1018:18:1018:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1022:18:1022:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1022:18:1022:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1022:18:1022:43 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1022:18:1022:43 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1025:18:1025:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1025:18:1025:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1025:18:1025:49 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1025:18:1025:49 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1028:18:1028:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1028:18:1028:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1028:18:1028:27 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1028:18:1028:27 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1031:18:1031:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1031:18:1031:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1031:18:1031:32 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1031:18:1031:32 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1033:18:1033:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1033:18:1033:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1033:18:1033:32 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1033:18:1033:32 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1045:19:1045:23 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1045:19:1045:23 | SelfParam | TRef | main.rs:1042:5:1046:5 | Self [trait Supertrait] | +| main.rs:1045:26:1045:32 | content | | main.rs:1043:9:1043:21 | Content | +| main.rs:1050:24:1050:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1050:24:1050:28 | SelfParam | TRef | main.rs:1048:5:1051:5 | Self [trait Subtrait] | +| main.rs:1059:23:1059:27 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1059:23:1059:27 | SelfParam | TRef | main.rs:1053:5:1063:5 | Self [trait Subtrait2] | +| main.rs:1059:68:1062:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1060:13:1060:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1060:13:1060:16 | self | TRef | main.rs:1053:5:1063:5 | Self [trait Subtrait2] | +| main.rs:1061:13:1061:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1061:13:1061:16 | self | TRef | main.rs:1053:5:1063:5 | Self [trait Subtrait2] | +| main.rs:1069:19:1069:23 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1069:19:1069:23 | SelfParam | TRef | main.rs:1065:5:1065:24 | MyType | +| main.rs:1069:19:1069:23 | SelfParam | TRef.T | main.rs:1067:10:1067:10 | T | +| main.rs:1069:26:1069:33 | _content | | main.rs:1067:10:1067:10 | T | +| main.rs:1069:51:1071:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1070:22:1070:42 | "Inserting content: \\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1070:22:1070:42 | "Inserting content: \\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1070:22:1070:42 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1070:22:1070:42 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1076:24:1076:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1076:24:1076:28 | SelfParam | TRef | main.rs:1065:5:1065:24 | MyType | +| main.rs:1076:24:1076:28 | SelfParam | TRef.T | main.rs:1074:10:1074:17 | T | +| main.rs:1077:15:1077:18 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1077:15:1077:18 | self | TRef | main.rs:1065:5:1065:24 | MyType | +| main.rs:1077:15:1077:18 | self | TRef.T | main.rs:1074:10:1074:17 | T | +| main.rs:1081:33:1081:36 | item | | {EXTERNAL LOCATION} | & | +| main.rs:1081:33:1081:36 | item | TRef | main.rs:1081:20:1081:30 | T | +| main.rs:1082:9:1082:12 | item | | {EXTERNAL LOCATION} | & | +| main.rs:1082:9:1082:12 | item | TRef | main.rs:1081:20:1081:30 | T | +| main.rs:1085:35:1085:38 | item | | {EXTERNAL LOCATION} | & | +| main.rs:1085:35:1085:38 | item | TRef | main.rs:1085:21:1085:32 | T | +| main.rs:1085:93:1088:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1086:9:1086:12 | item | | {EXTERNAL LOCATION} | & | +| main.rs:1086:9:1086:12 | item | TRef | main.rs:1085:21:1085:32 | T | +| main.rs:1087:9:1087:12 | item | | {EXTERNAL LOCATION} | & | +| main.rs:1087:9:1087:12 | item | TRef | main.rs:1085:21:1085:32 | T | +| main.rs:1090:15:1096:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1091:28:1091:32 | 42i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:1094:28:1094:31 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:1095:37:1095:42 | &item2 | | {EXTERNAL LOCATION} | & | +| main.rs:1112:15:1112:18 | SelfParam | | main.rs:1100:5:1104:5 | MyEnum | +| main.rs:1112:15:1112:18 | SelfParam | A | main.rs:1111:10:1111:10 | T | +| main.rs:1112:26:1117:9 | { ... } | | main.rs:1111:10:1111:10 | T | +| main.rs:1113:19:1113:22 | self | | main.rs:1100:5:1104:5 | MyEnum | +| main.rs:1113:19:1113:22 | self | A | main.rs:1111:10:1111:10 | T | +| main.rs:1115:17:1115:32 | ...::C2 {...} | | main.rs:1100:5:1104:5 | MyEnum | +| main.rs:1120:16:1126:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1122:13:1122:13 | y | | main.rs:1100:5:1104:5 | MyEnum | +| main.rs:1122:17:1122:36 | ...::C2 {...} | | main.rs:1100:5:1104:5 | MyEnum | +| main.rs:1124:18:1124:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1124:18:1124:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1124:18:1124:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1124:18:1124:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1125:18:1125:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1125:18:1125:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1125:18:1125:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1125:18:1125:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1125:26:1125:26 | y | | main.rs:1100:5:1104:5 | MyEnum | +| main.rs:1147:15:1147:18 | SelfParam | | main.rs:1145:5:1148:5 | Self [trait MyTrait1] | +| main.rs:1152:15:1152:19 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1152:15:1152:19 | SelfParam | TRef | main.rs:1150:5:1162:5 | Self [trait MyTrait2] | +| main.rs:1155:9:1161:9 | { ... } | | main.rs:1150:20:1150:22 | Tr2 | +| main.rs:1157:17:1157:20 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1157:17:1157:20 | self | TRef | main.rs:1150:5:1162:5 | Self [trait MyTrait2] | +| main.rs:1159:27:1159:30 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1159:27:1159:30 | self | TRef | main.rs:1150:5:1162:5 | Self [trait MyTrait2] | +| main.rs:1166:15:1166:18 | SelfParam | | main.rs:1164:5:1176:5 | Self [trait MyTrait3] | +| main.rs:1169:9:1175:9 | { ... } | | main.rs:1164:20:1164:22 | Tr3 | +| main.rs:1171:17:1171:20 | self | | main.rs:1164:5:1176:5 | Self [trait MyTrait3] | +| main.rs:1173:26:1173:30 | &self | | {EXTERNAL LOCATION} | & | +| main.rs:1173:27:1173:30 | self | | main.rs:1164:5:1176:5 | Self [trait MyTrait3] | +| main.rs:1180:15:1180:18 | SelfParam | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1180:15:1180:18 | SelfParam | A | main.rs:1178:10:1178:10 | T | +| main.rs:1180:26:1182:9 | { ... } | | main.rs:1178:10:1178:10 | T | +| main.rs:1181:13:1181:16 | self | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1181:13:1181:16 | self | A | main.rs:1178:10:1178:10 | T | +| main.rs:1189:15:1189:18 | SelfParam | | main.rs:1135:5:1138:5 | MyThing2 | +| main.rs:1189:15:1189:18 | SelfParam | A | main.rs:1187:10:1187:10 | T | +| main.rs:1189:35:1191:9 | { ... } | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1189:35:1191:9 | { ... } | A | main.rs:1187:10:1187:10 | T | +| main.rs:1190:13:1190:33 | MyThing {...} | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1190:26:1190:29 | self | | main.rs:1135:5:1138:5 | MyThing2 | +| main.rs:1190:26:1190:29 | self | A | main.rs:1187:10:1187:10 | T | +| main.rs:1198:44:1198:44 | x | | main.rs:1198:26:1198:41 | T2 | +| main.rs:1198:57:1200:5 | { ... } | | main.rs:1198:22:1198:23 | T1 | +| main.rs:1199:9:1199:9 | x | | main.rs:1198:26:1198:41 | T2 | +| main.rs:1202:56:1202:56 | x | | main.rs:1202:39:1202:53 | T | +| main.rs:1202:62:1206:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1204:17:1204:17 | x | | main.rs:1202:39:1202:53 | T | +| main.rs:1205:18:1205:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1205:18:1205:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1205:18:1205:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1205:18:1205:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1208:16:1232:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1209:13:1209:13 | x | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1209:17:1209:33 | MyThing {...} | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1210:13:1210:13 | y | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1210:17:1210:33 | MyThing {...} | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1212:18:1212:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1212:18:1212:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1212:18:1212:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1212:18:1212:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1212:26:1212:26 | x | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1213:18:1213:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1213:18:1213:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1213:18:1213:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1213:18:1213:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1213:26:1213:26 | y | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1215:13:1215:13 | x | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1215:17:1215:33 | MyThing {...} | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1216:13:1216:13 | y | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1216:17:1216:33 | MyThing {...} | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1218:18:1218:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1218:18:1218:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1218:18:1218:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1218:18:1218:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1218:26:1218:26 | x | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1219:18:1219:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1219:18:1219:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1219:18:1219:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1219:18:1219:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1219:26:1219:26 | y | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1221:13:1221:13 | x | | main.rs:1135:5:1138:5 | MyThing2 | +| main.rs:1221:17:1221:34 | MyThing2 {...} | | main.rs:1135:5:1138:5 | MyThing2 | +| main.rs:1222:13:1222:13 | y | | main.rs:1135:5:1138:5 | MyThing2 | +| main.rs:1222:17:1222:34 | MyThing2 {...} | | main.rs:1135:5:1138:5 | MyThing2 | +| main.rs:1224:18:1224:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1224:18:1224:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1224:18:1224:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1224:18:1224:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1224:26:1224:26 | x | | main.rs:1135:5:1138:5 | MyThing2 | +| main.rs:1225:18:1225:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1225:18:1225:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1225:18:1225:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1225:18:1225:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1225:26:1225:26 | y | | main.rs:1135:5:1138:5 | MyThing2 | +| main.rs:1227:13:1227:13 | x | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1227:17:1227:33 | MyThing {...} | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1228:31:1228:31 | x | | main.rs:1130:5:1133:5 | MyThing | +| main.rs:1230:13:1230:13 | x | | main.rs:1135:5:1138:5 | MyThing2 | +| main.rs:1230:17:1230:34 | MyThing2 {...} | | main.rs:1135:5:1138:5 | MyThing2 | +| main.rs:1231:31:1231:31 | x | | main.rs:1135:5:1138:5 | MyThing2 | +| main.rs:1248:22:1248:22 | x | | {EXTERNAL LOCATION} | & | +| main.rs:1248:22:1248:22 | x | TRef | main.rs:1248:11:1248:19 | T | +| main.rs:1248:35:1250:5 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:1248:35:1250:5 | { ... } | TRef | main.rs:1248:11:1248:19 | T | +| main.rs:1249:9:1249:9 | x | | {EXTERNAL LOCATION} | & | +| main.rs:1249:9:1249:9 | x | TRef | main.rs:1248:11:1248:19 | T | +| main.rs:1253:17:1253:20 | SelfParam | | main.rs:1238:5:1239:14 | S1 | +| main.rs:1253:29:1255:9 | { ... } | | main.rs:1241:5:1242:14 | S2 | +| main.rs:1258:21:1258:21 | x | | main.rs:1258:13:1258:14 | T1 | +| main.rs:1261:5:1263:5 | { ... } | | main.rs:1258:17:1258:18 | T2 | +| main.rs:1262:9:1262:9 | x | | main.rs:1258:13:1258:14 | T1 | +| main.rs:1265:16:1281:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1267:18:1267:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1267:18:1267:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1267:18:1267:31 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1267:18:1267:31 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1267:26:1267:31 | id(...) | | {EXTERNAL LOCATION} | & | +| main.rs:1267:29:1267:30 | &x | | {EXTERNAL LOCATION} | & | +| main.rs:1270:18:1270:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1270:18:1270:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1270:18:1270:37 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1270:18:1270:37 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1270:26:1270:37 | id::<...>(...) | | {EXTERNAL LOCATION} | & | +| main.rs:1270:26:1270:37 | id::<...>(...) | TRef | main.rs:1238:5:1239:14 | S1 | +| main.rs:1270:35:1270:36 | &x | | {EXTERNAL LOCATION} | & | +| main.rs:1274:18:1274:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1274:18:1274:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1274:18:1274:44 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1274:18:1274:44 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1274:26:1274:44 | id::<...>(...) | | {EXTERNAL LOCATION} | & | +| main.rs:1274:26:1274:44 | id::<...>(...) | TRef | main.rs:1244:5:1244:25 | dyn Trait | +| main.rs:1274:42:1274:43 | &x | | {EXTERNAL LOCATION} | & | +| main.rs:1277:9:1277:25 | into::<...>(...) | | main.rs:1241:5:1242:14 | S2 | +| main.rs:1280:13:1280:13 | y | | main.rs:1241:5:1242:14 | S2 | +| main.rs:1294:22:1294:25 | SelfParam | | main.rs:1285:5:1291:5 | PairOption | +| main.rs:1294:22:1294:25 | SelfParam | Fst | main.rs:1293:10:1293:12 | Fst | +| main.rs:1294:22:1294:25 | SelfParam | Snd | main.rs:1293:15:1293:17 | Snd | +| main.rs:1294:35:1301:9 | { ... } | | main.rs:1293:15:1293:17 | Snd | +| main.rs:1295:19:1295:22 | self | | main.rs:1285:5:1291:5 | PairOption | +| main.rs:1295:19:1295:22 | self | Fst | main.rs:1293:10:1293:12 | Fst | +| main.rs:1295:19:1295:22 | self | Snd | main.rs:1293:15:1293:17 | Snd | +| main.rs:1296:43:1296:82 | MacroExpr | | file://:0:0:0:0 | ! | +| main.rs:1296:50:1296:81 | "PairNone has no second elemen... | | {EXTERNAL LOCATION} | & | +| main.rs:1296:50:1296:81 | "PairNone has no second elemen... | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1296:50:1296:81 | ...::panic_fmt(...) | | file://:0:0:0:0 | ! | +| main.rs:1296:50:1296:81 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1297:43:1297:81 | MacroExpr | | file://:0:0:0:0 | ! | +| main.rs:1297:50:1297:80 | "PairFst has no second element... | | {EXTERNAL LOCATION} | & | +| main.rs:1297:50:1297:80 | "PairFst has no second element... | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1297:50:1297:80 | ...::panic_fmt(...) | | file://:0:0:0:0 | ! | +| main.rs:1297:50:1297:80 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1325:10:1325:10 | t | | main.rs:1285:5:1291:5 | PairOption | +| main.rs:1325:10:1325:10 | t | Fst | main.rs:1307:5:1308:14 | S2 | +| main.rs:1325:10:1325:10 | t | Snd | main.rs:1285:5:1291:5 | PairOption | +| main.rs:1325:10:1325:10 | t | Snd.Fst | main.rs:1307:5:1308:14 | S2 | +| main.rs:1325:10:1325:10 | t | Snd.Snd | main.rs:1310:5:1311:14 | S3 | +| main.rs:1325:30:1328:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1326:17:1326:17 | t | | main.rs:1285:5:1291:5 | PairOption | +| main.rs:1326:17:1326:17 | t | Fst | main.rs:1307:5:1308:14 | S2 | +| main.rs:1326:17:1326:17 | t | Snd | main.rs:1285:5:1291:5 | PairOption | +| main.rs:1326:17:1326:17 | t | Snd.Fst | main.rs:1307:5:1308:14 | S2 | +| main.rs:1326:17:1326:17 | t | Snd.Snd | main.rs:1310:5:1311:14 | S3 | +| main.rs:1327:18:1327:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1327:18:1327:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1327:18:1327:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1327:18:1327:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1342:22:1342:25 | SelfParam | | main.rs:1340:5:1343:5 | Self [trait TraitWithAssocType] | +| main.rs:1350:22:1350:25 | SelfParam | | main.rs:1338:5:1338:28 | GenS | +| main.rs:1350:22:1350:25 | SelfParam | GenT | main.rs:1345:10:1345:15 | Output | +| main.rs:1350:44:1352:9 | { ... } | | {EXTERNAL LOCATION} | Result | +| main.rs:1350:44:1352:9 | { ... } | E | main.rs:1345:10:1345:15 | Output | +| main.rs:1350:44:1352:9 | { ... } | T | main.rs:1345:10:1345:15 | Output | +| main.rs:1351:16:1351:19 | self | | main.rs:1338:5:1338:28 | GenS | +| main.rs:1351:16:1351:19 | self | GenT | main.rs:1345:10:1345:15 | Output | +| main.rs:1355:16:1377:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1357:13:1357:14 | p1 | | main.rs:1285:5:1291:5 | PairOption | +| main.rs:1357:13:1357:14 | p1 | Fst | main.rs:1304:5:1305:14 | S1 | +| main.rs:1357:13:1357:14 | p1 | Snd | main.rs:1307:5:1308:14 | S2 | +| main.rs:1358:18:1358:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1358:18:1358:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1358:18:1358:27 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1358:18:1358:27 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1358:26:1358:27 | p1 | | main.rs:1285:5:1291:5 | PairOption | +| main.rs:1358:26:1358:27 | p1 | Fst | main.rs:1304:5:1305:14 | S1 | +| main.rs:1358:26:1358:27 | p1 | Snd | main.rs:1307:5:1308:14 | S2 | +| main.rs:1361:13:1361:14 | p2 | | main.rs:1285:5:1291:5 | PairOption | +| main.rs:1361:13:1361:14 | p2 | Fst | main.rs:1304:5:1305:14 | S1 | +| main.rs:1361:13:1361:14 | p2 | Snd | main.rs:1307:5:1308:14 | S2 | +| main.rs:1362:18:1362:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1362:18:1362:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1362:18:1362:27 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1362:18:1362:27 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1362:26:1362:27 | p2 | | main.rs:1285:5:1291:5 | PairOption | +| main.rs:1362:26:1362:27 | p2 | Fst | main.rs:1304:5:1305:14 | S1 | +| main.rs:1362:26:1362:27 | p2 | Snd | main.rs:1307:5:1308:14 | S2 | +| main.rs:1365:13:1365:14 | p3 | | main.rs:1285:5:1291:5 | PairOption | +| main.rs:1365:13:1365:14 | p3 | Fst | main.rs:1307:5:1308:14 | S2 | +| main.rs:1366:18:1366:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1366:18:1366:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1366:18:1366:27 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1366:18:1366:27 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1366:26:1366:27 | p3 | | main.rs:1285:5:1291:5 | PairOption | +| main.rs:1366:26:1366:27 | p3 | Fst | main.rs:1307:5:1308:14 | S2 | +| main.rs:1369:13:1369:14 | p3 | | main.rs:1285:5:1291:5 | PairOption | +| main.rs:1369:13:1369:14 | p3 | Fst | main.rs:1307:5:1308:14 | S2 | +| main.rs:1369:13:1369:14 | p3 | Snd | main.rs:1310:5:1311:14 | S3 | +| main.rs:1370:18:1370:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1370:18:1370:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1370:18:1370:27 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1370:18:1370:27 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1370:26:1370:27 | p3 | | main.rs:1285:5:1291:5 | PairOption | +| main.rs:1370:26:1370:27 | p3 | Fst | main.rs:1307:5:1308:14 | S2 | +| main.rs:1370:26:1370:27 | p3 | Snd | main.rs:1310:5:1311:14 | S3 | +| main.rs:1372:9:1372:55 | g(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1374:13:1374:13 | x | | {EXTERNAL LOCATION} | Result | +| main.rs:1374:13:1374:13 | x | E | main.rs:1304:5:1305:14 | S1 | +| main.rs:1374:13:1374:13 | x | T | main.rs:1330:5:1330:34 | S4 | +| main.rs:1374:13:1374:13 | x | T.T41 | main.rs:1307:5:1308:14 | S2 | +| main.rs:1374:13:1374:13 | x | T.T42 | main.rs:1332:5:1332:22 | S5 | +| main.rs:1374:13:1374:13 | x | T.T42.T5 | main.rs:1307:5:1308:14 | S2 | +| main.rs:1376:22:1376:25 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:1389:16:1389:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1389:16:1389:24 | SelfParam | TRef | main.rs:1387:5:1394:5 | Self [trait MyTrait] | +| main.rs:1389:27:1389:31 | value | | main.rs:1387:19:1387:19 | S | +| main.rs:1391:21:1391:29 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1391:21:1391:29 | SelfParam | TRef | main.rs:1387:5:1394:5 | Self [trait MyTrait] | +| main.rs:1391:32:1391:36 | value | | main.rs:1387:19:1387:19 | S | +| main.rs:1391:42:1393:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1392:13:1392:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1392:13:1392:16 | self | TRef | main.rs:1387:5:1394:5 | Self [trait MyTrait] | +| main.rs:1392:22:1392:26 | value | | main.rs:1387:19:1387:19 | S | +| main.rs:1398:16:1398:24 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1398:16:1398:24 | SelfParam | TRef | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1398:16:1398:24 | SelfParam | TRef.T | main.rs:1396:10:1396:10 | T | +| main.rs:1398:27:1398:31 | value | | main.rs:1396:10:1396:10 | T | +| main.rs:1398:37:1398:38 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1402:26:1404:9 | { ... } | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1402:26:1404:9 | { ... } | T | main.rs:1401:10:1401:10 | T | +| main.rs:1408:20:1408:23 | SelfParam | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1408:20:1408:23 | SelfParam | T | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1408:20:1408:23 | SelfParam | T.T | main.rs:1407:10:1407:10 | T | +| main.rs:1408:41:1413:9 | { ... } | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1408:41:1413:9 | { ... } | T | main.rs:1407:10:1407:10 | T | +| main.rs:1409:19:1409:22 | self | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1409:19:1409:22 | self | T | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1409:19:1409:22 | self | T.T | main.rs:1407:10:1407:10 | T | +| main.rs:1419:16:1465:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1420:13:1420:14 | x1 | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1420:13:1420:14 | x1 | T | main.rs:1416:5:1417:13 | S | +| main.rs:1420:18:1420:37 | ...::new(...) | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1420:18:1420:37 | ...::new(...) | T | main.rs:1416:5:1417:13 | S | +| main.rs:1421:18:1421:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1421:18:1421:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1421:18:1421:27 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1421:18:1421:27 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1421:26:1421:27 | x1 | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1421:26:1421:27 | x1 | T | main.rs:1416:5:1417:13 | S | +| main.rs:1423:17:1423:18 | x2 | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1423:22:1423:36 | ...::new(...) | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1424:9:1424:10 | x2 | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1425:18:1425:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1425:18:1425:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1425:18:1425:27 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1425:18:1425:27 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1425:26:1425:27 | x2 | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1428:17:1428:18 | x3 | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1428:22:1428:36 | ...::new(...) | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1429:9:1429:10 | x3 | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1430:18:1430:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1430:18:1430:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1430:18:1430:27 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1430:18:1430:27 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1430:26:1430:27 | x3 | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1432:17:1432:18 | x4 | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1432:22:1432:36 | ...::new(...) | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1433:9:1433:33 | ...::set(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1433:23:1433:29 | &mut x4 | | {EXTERNAL LOCATION} | & | +| main.rs:1433:28:1433:29 | x4 | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1434:18:1434:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1434:18:1434:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1434:18:1434:27 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1434:18:1434:27 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1434:26:1434:27 | x4 | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1437:18:1437:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1437:18:1437:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1437:18:1437:37 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1437:18:1437:37 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1440:18:1440:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1440:18:1440:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1440:18:1440:61 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1440:18:1440:61 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1440:26:1440:61 | ...::flatten(...) | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1440:26:1440:61 | ...::flatten(...) | T | main.rs:1416:5:1417:13 | S | +| main.rs:1448:18:1448:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1448:18:1448:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1448:18:1448:32 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1448:18:1448:32 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1452:13:1452:16 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:1453:13:1453:17 | false | | {EXTERNAL LOCATION} | bool | +| main.rs:1455:18:1455:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1455:18:1455:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1455:18:1455:35 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1455:18:1455:35 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1458:30:1463:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1459:13:1461:13 | if ... {...} | | {EXTERNAL LOCATION} | () | +| main.rs:1459:22:1461:13 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1464:18:1464:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1464:18:1464:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1464:18:1464:34 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1464:18:1464:34 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1482:15:1482:18 | SelfParam | | main.rs:1470:5:1471:19 | S | +| main.rs:1482:15:1482:18 | SelfParam | T | main.rs:1481:10:1481:10 | T | +| main.rs:1482:26:1484:9 | { ... } | | main.rs:1481:10:1481:10 | T | +| main.rs:1483:13:1483:16 | self | | main.rs:1470:5:1471:19 | S | +| main.rs:1483:13:1483:16 | self | T | main.rs:1481:10:1481:10 | T | +| main.rs:1486:15:1486:19 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1486:15:1486:19 | SelfParam | TRef | main.rs:1470:5:1471:19 | S | +| main.rs:1486:15:1486:19 | SelfParam | TRef.T | main.rs:1481:10:1481:10 | T | +| main.rs:1486:28:1488:9 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:1486:28:1488:9 | { ... } | TRef | main.rs:1481:10:1481:10 | T | +| main.rs:1487:13:1487:19 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1487:14:1487:17 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1487:14:1487:17 | self | TRef | main.rs:1470:5:1471:19 | S | +| main.rs:1487:14:1487:17 | self | TRef.T | main.rs:1481:10:1481:10 | T | +| main.rs:1490:15:1490:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1490:15:1490:25 | SelfParam | TRef | main.rs:1470:5:1471:19 | S | +| main.rs:1490:15:1490:25 | SelfParam | TRef.T | main.rs:1481:10:1481:10 | T | +| main.rs:1490:34:1492:9 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:1490:34:1492:9 | { ... } | TRef | main.rs:1481:10:1481:10 | T | +| main.rs:1491:13:1491:19 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1491:14:1491:17 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1491:14:1491:17 | self | TRef | main.rs:1470:5:1471:19 | S | +| main.rs:1491:14:1491:17 | self | TRef.T | main.rs:1481:10:1481:10 | T | +| main.rs:1496:29:1496:33 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1496:29:1496:33 | SelfParam | TRef | main.rs:1495:5:1498:5 | Self [trait ATrait] | +| main.rs:1497:33:1497:36 | SelfParam | | main.rs:1495:5:1498:5 | Self [trait ATrait] | +| main.rs:1503:29:1503:33 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1503:29:1503:33 | SelfParam | TRef | {EXTERNAL LOCATION} | & | +| main.rs:1503:29:1503:33 | SelfParam | TRef.TRef | main.rs:1476:5:1479:5 | MyInt | +| main.rs:1503:43:1505:9 | { ... } | | {EXTERNAL LOCATION} | i64 | +| main.rs:1504:17:1504:20 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1504:17:1504:20 | self | TRef | {EXTERNAL LOCATION} | & | +| main.rs:1504:17:1504:20 | self | TRef.TRef | main.rs:1476:5:1479:5 | MyInt | +| main.rs:1508:33:1508:36 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1508:33:1508:36 | SelfParam | TRef | main.rs:1476:5:1479:5 | MyInt | +| main.rs:1508:46:1510:9 | { ... } | | {EXTERNAL LOCATION} | i64 | +| main.rs:1509:15:1509:18 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1509:15:1509:18 | self | TRef | main.rs:1476:5:1479:5 | MyInt | +| main.rs:1513:16:1563:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1515:18:1515:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1515:18:1515:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1515:18:1515:32 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1515:18:1515:32 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1519:18:1519:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1519:18:1519:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1519:18:1519:32 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1519:18:1519:32 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1520:18:1520:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1520:18:1520:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1520:18:1520:32 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1520:18:1520:32 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1524:18:1524:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1524:18:1524:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1524:18:1524:41 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1524:18:1524:41 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1524:26:1524:41 | ...::m2(...) | | {EXTERNAL LOCATION} | & | +| main.rs:1524:26:1524:41 | ...::m2(...) | TRef | main.rs:1473:5:1474:14 | S2 | +| main.rs:1524:38:1524:40 | &x3 | | {EXTERNAL LOCATION} | & | +| main.rs:1525:18:1525:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1525:18:1525:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1525:18:1525:41 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1525:18:1525:41 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1525:26:1525:41 | ...::m3(...) | | {EXTERNAL LOCATION} | & | +| main.rs:1525:26:1525:41 | ...::m3(...) | TRef | main.rs:1473:5:1474:14 | S2 | +| main.rs:1525:38:1525:40 | &x3 | | {EXTERNAL LOCATION} | & | +| main.rs:1527:13:1527:14 | x4 | | {EXTERNAL LOCATION} | & | +| main.rs:1527:18:1527:23 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1529:18:1529:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1529:18:1529:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1529:18:1529:32 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1529:18:1529:32 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1529:26:1529:27 | x4 | | {EXTERNAL LOCATION} | & | +| main.rs:1530:18:1530:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1530:18:1530:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1530:18:1530:32 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1530:18:1530:32 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1530:26:1530:27 | x4 | | {EXTERNAL LOCATION} | & | +| main.rs:1532:13:1532:14 | x5 | | {EXTERNAL LOCATION} | & | +| main.rs:1532:18:1532:23 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1534:18:1534:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1534:18:1534:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1534:18:1534:32 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1534:18:1534:32 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1534:26:1534:27 | x5 | | {EXTERNAL LOCATION} | & | +| main.rs:1535:18:1535:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1535:18:1535:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1535:18:1535:29 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1535:18:1535:29 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1535:26:1535:27 | x5 | | {EXTERNAL LOCATION} | & | +| main.rs:1537:13:1537:14 | x6 | | {EXTERNAL LOCATION} | & | +| main.rs:1537:18:1537:23 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1540:18:1540:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1540:18:1540:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1540:18:1540:35 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1540:18:1540:35 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1540:28:1540:29 | x6 | | {EXTERNAL LOCATION} | & | +| main.rs:1542:20:1542:22 | &S2 | | {EXTERNAL LOCATION} | & | +| main.rs:1546:18:1546:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1546:18:1546:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1546:18:1546:27 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1546:18:1546:27 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1548:13:1548:14 | x9 | | {EXTERNAL LOCATION} | String | +| main.rs:1548:26:1548:32 | "Hello" | | {EXTERNAL LOCATION} | & | +| main.rs:1548:26:1548:32 | "Hello" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1552:17:1552:18 | x9 | | {EXTERNAL LOCATION} | String | +| main.rs:1554:13:1554:20 | my_thing | | {EXTERNAL LOCATION} | & | +| main.rs:1554:24:1554:39 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1554:25:1554:39 | MyInt {...} | | main.rs:1476:5:1479:5 | MyInt | +| main.rs:1556:17:1556:24 | my_thing | | {EXTERNAL LOCATION} | & | +| main.rs:1557:18:1557:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1557:18:1557:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1557:18:1557:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1557:18:1557:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1560:13:1560:20 | my_thing | | {EXTERNAL LOCATION} | & | +| main.rs:1560:24:1560:39 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1560:25:1560:39 | MyInt {...} | | main.rs:1476:5:1479:5 | MyInt | +| main.rs:1561:17:1561:24 | my_thing | | {EXTERNAL LOCATION} | & | +| main.rs:1562:18:1562:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1562:18:1562:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1562:18:1562:26 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1562:18:1562:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1569:16:1569:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1569:16:1569:20 | SelfParam | TRef | main.rs:1567:5:1575:5 | Self [trait MyTrait] | +| main.rs:1572:16:1572:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1572:16:1572:20 | SelfParam | TRef | main.rs:1567:5:1575:5 | Self [trait MyTrait] | +| main.rs:1572:32:1574:9 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:1572:32:1574:9 | { ... } | TRef | main.rs:1567:5:1575:5 | Self [trait MyTrait] | +| main.rs:1573:13:1573:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1573:13:1573:16 | self | TRef | main.rs:1567:5:1575:5 | Self [trait MyTrait] | +| main.rs:1581:16:1581:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1581:16:1581:20 | SelfParam | TRef | main.rs:1577:5:1577:20 | MyStruct | +| main.rs:1581:36:1583:9 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:1581:36:1583:9 | { ... } | TRef | main.rs:1577:5:1577:20 | MyStruct | +| main.rs:1582:13:1582:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1582:13:1582:16 | self | TRef | main.rs:1577:5:1577:20 | MyStruct | +| main.rs:1586:16:1589:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1598:16:1598:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1598:16:1598:20 | SelfParam | TRef | main.rs:1595:5:1595:26 | MyStruct | +| main.rs:1598:16:1598:20 | SelfParam | TRef.T | main.rs:1597:10:1597:10 | T | +| main.rs:1598:32:1600:9 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:1598:32:1600:9 | { ... } | TRef | main.rs:1595:5:1595:26 | MyStruct | +| main.rs:1598:32:1600:9 | { ... } | TRef.T | main.rs:1597:10:1597:10 | T | +| main.rs:1599:13:1599:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1599:13:1599:16 | self | TRef | main.rs:1595:5:1595:26 | MyStruct | +| main.rs:1599:13:1599:16 | self | TRef.T | main.rs:1597:10:1597:10 | T | +| main.rs:1602:16:1602:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1602:16:1602:20 | SelfParam | TRef | main.rs:1595:5:1595:26 | MyStruct | +| main.rs:1602:16:1602:20 | SelfParam | TRef.T | main.rs:1597:10:1597:10 | T | +| main.rs:1602:23:1602:23 | x | | {EXTERNAL LOCATION} | & | +| main.rs:1602:23:1602:23 | x | TRef | main.rs:1595:5:1595:26 | MyStruct | +| main.rs:1602:23:1602:23 | x | TRef.T | main.rs:1597:10:1597:10 | T | +| main.rs:1602:42:1604:9 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:1602:42:1604:9 | { ... } | TRef | main.rs:1595:5:1595:26 | MyStruct | +| main.rs:1602:42:1604:9 | { ... } | TRef.T | main.rs:1597:10:1597:10 | T | +| main.rs:1603:13:1603:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1603:13:1603:16 | self | TRef | main.rs:1595:5:1595:26 | MyStruct | +| main.rs:1603:13:1603:16 | self | TRef.T | main.rs:1597:10:1597:10 | T | +| main.rs:1607:16:1613:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1612:15:1612:17 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1612:16:1612:17 | &x | | {EXTERNAL LOCATION} | & | +| main.rs:1623:17:1623:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1623:17:1623:25 | SelfParam | TRef | main.rs:1617:5:1620:5 | MyFlag | +| main.rs:1623:28:1625:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1624:13:1624:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1624:13:1624:16 | self | TRef | main.rs:1617:5:1620:5 | MyFlag | +| main.rs:1624:26:1624:29 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1624:26:1624:29 | self | TRef | main.rs:1617:5:1620:5 | MyFlag | +| main.rs:1631:15:1631:19 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1631:15:1631:19 | SelfParam | TRef | main.rs:1628:5:1628:13 | S | +| main.rs:1631:31:1633:9 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:1631:31:1633:9 | { ... } | TRef | main.rs:1628:5:1628:13 | S | +| main.rs:1632:13:1632:19 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1632:14:1632:19 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1632:15:1632:19 | &self | | {EXTERNAL LOCATION} | & | +| main.rs:1632:16:1632:19 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1632:16:1632:19 | self | TRef | main.rs:1628:5:1628:13 | S | +| main.rs:1635:15:1635:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1635:15:1635:25 | SelfParam | TRef | main.rs:1628:5:1628:13 | S | +| main.rs:1635:37:1637:9 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:1635:37:1637:9 | { ... } | TRef | main.rs:1628:5:1628:13 | S | +| main.rs:1636:13:1636:19 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1636:14:1636:19 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1636:15:1636:19 | &self | | {EXTERNAL LOCATION} | & | +| main.rs:1636:16:1636:19 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1636:16:1636:19 | self | TRef | main.rs:1628:5:1628:13 | S | +| main.rs:1639:15:1639:15 | x | | {EXTERNAL LOCATION} | & | +| main.rs:1639:15:1639:15 | x | TRef | main.rs:1628:5:1628:13 | S | +| main.rs:1639:34:1641:9 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:1639:34:1641:9 | { ... } | TRef | main.rs:1628:5:1628:13 | S | +| main.rs:1640:13:1640:13 | x | | {EXTERNAL LOCATION} | & | +| main.rs:1640:13:1640:13 | x | TRef | main.rs:1628:5:1628:13 | S | +| main.rs:1643:15:1643:15 | x | | {EXTERNAL LOCATION} | & | +| main.rs:1643:15:1643:15 | x | TRef | main.rs:1628:5:1628:13 | S | +| main.rs:1643:34:1645:9 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:1643:34:1645:9 | { ... } | TRef | main.rs:1628:5:1628:13 | S | +| main.rs:1644:13:1644:16 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1644:14:1644:16 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1644:15:1644:16 | &x | | {EXTERNAL LOCATION} | & | +| main.rs:1644:16:1644:16 | x | | {EXTERNAL LOCATION} | & | +| main.rs:1644:16:1644:16 | x | TRef | main.rs:1628:5:1628:13 | S | +| main.rs:1648:16:1661:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1649:13:1649:13 | x | | main.rs:1628:5:1628:13 | S | +| main.rs:1649:17:1649:20 | S {...} | | main.rs:1628:5:1628:13 | S | +| main.rs:1650:9:1650:9 | x | | main.rs:1628:5:1628:13 | S | +| main.rs:1651:9:1651:9 | x | | main.rs:1628:5:1628:13 | S | +| main.rs:1652:9:1652:17 | ...::f3(...) | | {EXTERNAL LOCATION} | & | +| main.rs:1652:9:1652:17 | ...::f3(...) | TRef | main.rs:1628:5:1628:13 | S | +| main.rs:1652:15:1652:16 | &x | | {EXTERNAL LOCATION} | & | +| main.rs:1652:16:1652:16 | x | | main.rs:1628:5:1628:13 | S | +| main.rs:1654:19:1654:24 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1654:20:1654:24 | &true | | {EXTERNAL LOCATION} | & | +| main.rs:1654:21:1654:24 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:1659:9:1659:31 | ...::flip(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1659:22:1659:30 | &mut flag | | {EXTERNAL LOCATION} | & | +| main.rs:1660:18:1660:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1660:18:1660:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1660:18:1660:29 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1660:18:1660:29 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1675:43:1678:5 | { ... } | | {EXTERNAL LOCATION} | Result | +| main.rs:1675:43:1678:5 | { ... } | E | main.rs:1667:5:1668:14 | S1 | +| main.rs:1675:43:1678:5 | { ... } | T | main.rs:1667:5:1668:14 | S1 | +| main.rs:1682:46:1686:5 | { ... } | | {EXTERNAL LOCATION} | Result | +| main.rs:1682:46:1686:5 | { ... } | E | main.rs:1670:5:1671:14 | S2 | +| main.rs:1682:46:1686:5 | { ... } | T | main.rs:1667:5:1668:14 | S1 | +| main.rs:1690:40:1695:5 | { ... } | | {EXTERNAL LOCATION} | Result | +| main.rs:1690:40:1695:5 | { ... } | E | main.rs:1670:5:1671:14 | S2 | +| main.rs:1690:40:1695:5 | { ... } | T | main.rs:1667:5:1668:14 | S1 | +| main.rs:1699:30:1699:34 | input | | {EXTERNAL LOCATION} | Result | +| main.rs:1699:30:1699:34 | input | E | main.rs:1667:5:1668:14 | S1 | +| main.rs:1699:30:1699:34 | input | T | main.rs:1699:20:1699:27 | T | +| main.rs:1699:69:1706:5 | { ... } | | {EXTERNAL LOCATION} | Result | +| main.rs:1699:69:1706:5 | { ... } | E | main.rs:1667:5:1668:14 | S1 | +| main.rs:1699:69:1706:5 | { ... } | T | main.rs:1699:20:1699:27 | T | +| main.rs:1700:21:1700:25 | input | | {EXTERNAL LOCATION} | Result | +| main.rs:1700:21:1700:25 | input | E | main.rs:1667:5:1668:14 | S1 | +| main.rs:1700:21:1700:25 | input | T | main.rs:1699:20:1699:27 | T | +| main.rs:1702:22:1702:27 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1702:22:1702:27 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1702:22:1702:30 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1702:22:1702:30 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1709:16:1725:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1710:9:1712:9 | if ... {...} | | {EXTERNAL LOCATION} | () | +| main.rs:1710:37:1710:52 | try_same_error(...) | | {EXTERNAL LOCATION} | Result | +| main.rs:1710:37:1710:52 | try_same_error(...) | E | main.rs:1667:5:1668:14 | S1 | +| main.rs:1710:37:1710:52 | try_same_error(...) | T | main.rs:1667:5:1668:14 | S1 | +| main.rs:1710:54:1712:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1711:22:1711:27 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1711:22:1711:27 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1711:22:1711:35 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1711:22:1711:35 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1714:9:1716:9 | if ... {...} | | {EXTERNAL LOCATION} | () | +| main.rs:1714:37:1714:55 | try_convert_error(...) | | {EXTERNAL LOCATION} | Result | +| main.rs:1714:37:1714:55 | try_convert_error(...) | E | main.rs:1670:5:1671:14 | S2 | +| main.rs:1714:37:1714:55 | try_convert_error(...) | T | main.rs:1667:5:1668:14 | S1 | +| main.rs:1714:57:1716:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1715:22:1715:27 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1715:22:1715:27 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1715:22:1715:35 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1715:22:1715:35 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1718:9:1720:9 | if ... {...} | | {EXTERNAL LOCATION} | () | +| main.rs:1718:37:1718:49 | try_chained(...) | | {EXTERNAL LOCATION} | Result | +| main.rs:1718:37:1718:49 | try_chained(...) | E | main.rs:1670:5:1671:14 | S2 | +| main.rs:1718:37:1718:49 | try_chained(...) | T | main.rs:1667:5:1668:14 | S1 | +| main.rs:1718:51:1720:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1719:22:1719:27 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1719:22:1719:27 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1719:22:1719:35 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1719:22:1719:35 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1722:9:1724:9 | if ... {...} | | {EXTERNAL LOCATION} | () | +| main.rs:1722:37:1722:63 | try_complex(...) | | {EXTERNAL LOCATION} | Result | +| main.rs:1722:37:1722:63 | try_complex(...) | E | main.rs:1667:5:1668:14 | S1 | +| main.rs:1722:65:1724:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1723:22:1723:27 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:1723:22:1723:27 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1723:22:1723:35 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:1723:22:1723:35 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1729:16:1820:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1730:13:1730:13 | x | | {EXTERNAL LOCATION} | i32 | +| main.rs:1732:17:1732:17 | x | | {EXTERNAL LOCATION} | i32 | +| main.rs:1733:17:1733:17 | x | | {EXTERNAL LOCATION} | i32 | +| main.rs:1734:13:1734:13 | c | | {EXTERNAL LOCATION} | char | +| main.rs:1734:17:1734:19 | 'c' | | {EXTERNAL LOCATION} | char | +| main.rs:1735:13:1735:17 | hello | | {EXTERNAL LOCATION} | & | +| main.rs:1735:13:1735:17 | hello | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1735:21:1735:27 | "Hello" | | {EXTERNAL LOCATION} | & | +| main.rs:1735:21:1735:27 | "Hello" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:1736:13:1736:13 | f | | {EXTERNAL LOCATION} | f64 | +| main.rs:1736:17:1736:24 | 123.0f64 | | {EXTERNAL LOCATION} | f64 | +| main.rs:1737:13:1737:13 | t | | {EXTERNAL LOCATION} | bool | +| main.rs:1737:17:1737:20 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:1738:13:1738:13 | f | | {EXTERNAL LOCATION} | bool | +| main.rs:1738:17:1738:21 | false | | {EXTERNAL LOCATION} | bool | +| main.rs:1741:26:1741:30 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1741:26:1741:30 | SelfParam | TRef | main.rs:1740:9:1744:9 | Self [trait MyTrait] | +| main.rs:1747:26:1747:30 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1747:26:1747:30 | SelfParam | TRef | {EXTERNAL LOCATION} | [;] | +| main.rs:1747:26:1747:30 | SelfParam | TRef.TArray | main.rs:1746:14:1746:23 | T | +| main.rs:1747:39:1749:13 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:1747:39:1749:13 | { ... } | TRef | main.rs:1746:14:1746:23 | T | +| main.rs:1748:17:1748:20 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1748:17:1748:20 | self | TRef | {EXTERNAL LOCATION} | [;] | +| main.rs:1748:17:1748:20 | self | TRef.TArray | main.rs:1746:14:1746:23 | T | +| main.rs:1751:31:1753:13 | { ... } | | main.rs:1746:14:1746:23 | T | +| main.rs:1756:17:1756:25 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:1757:13:1757:13 | x | | {EXTERNAL LOCATION} | & | +| main.rs:1757:17:1757:47 | ...::my_method(...) | | {EXTERNAL LOCATION} | & | +| main.rs:1757:37:1757:46 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1757:38:1757:46 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:1758:13:1758:13 | x | | {EXTERNAL LOCATION} | i32 | +| main.rs:1758:17:1758:37 | ...::my_func(...) | | {EXTERNAL LOCATION} | i32 | +| main.rs:1761:26:1761:30 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1761:26:1761:30 | SelfParam | TRef | {EXTERNAL LOCATION} | [] | +| main.rs:1761:26:1761:30 | SelfParam | TRef.TSlice | main.rs:1760:14:1760:23 | T | +| main.rs:1761:39:1763:13 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:1761:39:1763:13 | { ... } | TRef | main.rs:1760:14:1760:23 | T | +| main.rs:1762:17:1762:20 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1762:17:1762:20 | self | TRef | {EXTERNAL LOCATION} | [] | +| main.rs:1762:17:1762:20 | self | TRef.TSlice | main.rs:1760:14:1760:23 | T | +| main.rs:1765:31:1767:13 | { ... } | | main.rs:1760:14:1760:23 | T | +| main.rs:1770:13:1770:13 | s | | {EXTERNAL LOCATION} | & | +| main.rs:1770:13:1770:13 | s | TRef | {EXTERNAL LOCATION} | [] | +| main.rs:1770:13:1770:13 | s | TRef.TSlice | {EXTERNAL LOCATION} | i32 | +| main.rs:1770:25:1770:34 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1770:26:1770:34 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:1771:17:1771:17 | s | | {EXTERNAL LOCATION} | & | +| main.rs:1771:17:1771:17 | s | TRef | {EXTERNAL LOCATION} | [] | +| main.rs:1771:17:1771:17 | s | TRef.TSlice | {EXTERNAL LOCATION} | i32 | +| main.rs:1772:13:1772:13 | x | | {EXTERNAL LOCATION} | & | +| main.rs:1772:17:1772:35 | ...::my_method(...) | | {EXTERNAL LOCATION} | & | +| main.rs:1772:34:1772:34 | s | | {EXTERNAL LOCATION} | & | +| main.rs:1772:34:1772:34 | s | TRef | {EXTERNAL LOCATION} | [] | +| main.rs:1772:34:1772:34 | s | TRef.TSlice | {EXTERNAL LOCATION} | i32 | +| main.rs:1773:13:1773:13 | x | | {EXTERNAL LOCATION} | i32 | +| main.rs:1773:17:1773:34 | ...::my_func(...) | | {EXTERNAL LOCATION} | i32 | +| main.rs:1776:26:1776:30 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1776:26:1776:30 | SelfParam | TRef | {EXTERNAL LOCATION} | (T_2) | +| main.rs:1776:26:1776:30 | SelfParam | TRef.T0 | main.rs:1775:14:1775:23 | T | +| main.rs:1776:26:1776:30 | SelfParam | TRef.T1 | {EXTERNAL LOCATION} | i32 | +| main.rs:1776:39:1778:13 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:1776:39:1778:13 | { ... } | TRef | main.rs:1775:14:1775:23 | T | +| main.rs:1777:17:1777:23 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1777:18:1777:21 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1777:18:1777:21 | self | TRef | {EXTERNAL LOCATION} | (T_2) | +| main.rs:1777:18:1777:21 | self | TRef.T0 | main.rs:1775:14:1775:23 | T | +| main.rs:1777:18:1777:21 | self | TRef.T1 | {EXTERNAL LOCATION} | i32 | +| main.rs:1780:31:1782:13 | { ... } | | main.rs:1775:14:1775:23 | T | +| main.rs:1785:13:1785:13 | p | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:1785:17:1785:23 | TupleExpr | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:1786:17:1786:17 | p | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:1787:13:1787:13 | x | | {EXTERNAL LOCATION} | & | +| main.rs:1787:17:1787:39 | ...::my_method(...) | | {EXTERNAL LOCATION} | & | +| main.rs:1787:37:1787:38 | &p | | {EXTERNAL LOCATION} | & | +| main.rs:1787:38:1787:38 | p | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:1788:13:1788:13 | x | | {EXTERNAL LOCATION} | i32 | +| main.rs:1788:17:1788:39 | ...::my_func(...) | | {EXTERNAL LOCATION} | i32 | +| main.rs:1791:26:1791:30 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1791:26:1791:30 | SelfParam | TRef | {EXTERNAL LOCATION} | & | +| main.rs:1791:26:1791:30 | SelfParam | TRef.TRef | main.rs:1790:14:1790:23 | T | +| main.rs:1791:39:1793:13 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:1791:39:1793:13 | { ... } | TRef | main.rs:1790:14:1790:23 | T | +| main.rs:1792:18:1792:21 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1792:18:1792:21 | self | TRef | {EXTERNAL LOCATION} | & | +| main.rs:1792:18:1792:21 | self | TRef.TRef | main.rs:1790:14:1790:23 | T | +| main.rs:1795:31:1797:13 | { ... } | | main.rs:1790:14:1790:23 | T | +| main.rs:1800:13:1800:13 | r | | {EXTERNAL LOCATION} | & | +| main.rs:1800:17:1800:19 | &42 | | {EXTERNAL LOCATION} | & | +| main.rs:1801:17:1801:17 | r | | {EXTERNAL LOCATION} | & | +| main.rs:1802:13:1802:13 | x | | {EXTERNAL LOCATION} | & | +| main.rs:1802:17:1802:35 | ...::my_method(...) | | {EXTERNAL LOCATION} | & | +| main.rs:1802:33:1802:34 | &r | | {EXTERNAL LOCATION} | & | +| main.rs:1802:34:1802:34 | r | | {EXTERNAL LOCATION} | & | +| main.rs:1803:13:1803:13 | x | | {EXTERNAL LOCATION} | i32 | +| main.rs:1803:17:1803:33 | ...::my_func(...) | | {EXTERNAL LOCATION} | i32 | +| main.rs:1806:26:1806:30 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1806:26:1806:30 | SelfParam | TRef | {EXTERNAL LOCATION} | *mut | +| main.rs:1806:26:1806:30 | SelfParam | TRef.TPtrMut | main.rs:1805:14:1805:23 | T | +| main.rs:1806:39:1808:13 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:1806:39:1808:13 | { ... } | TRef | main.rs:1805:14:1805:23 | T | +| main.rs:1807:26:1807:32 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:1807:29:1807:32 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1807:29:1807:32 | self | TRef | {EXTERNAL LOCATION} | *mut | +| main.rs:1807:29:1807:32 | self | TRef.TPtrMut | main.rs:1805:14:1805:23 | T | +| main.rs:1810:31:1812:13 | { ... } | | main.rs:1805:14:1805:23 | T | +| main.rs:1816:13:1816:13 | p | | {EXTERNAL LOCATION} | *mut | +| main.rs:1816:13:1816:13 | p | TPtrMut | {EXTERNAL LOCATION} | i32 | +| main.rs:1816:27:1816:32 | &mut v | | {EXTERNAL LOCATION} | & | +| main.rs:1817:26:1817:26 | p | | {EXTERNAL LOCATION} | *mut | +| main.rs:1817:26:1817:26 | p | TPtrMut | {EXTERNAL LOCATION} | i32 | +| main.rs:1818:26:1818:48 | ...::my_method(...) | | {EXTERNAL LOCATION} | & | +| main.rs:1818:46:1818:47 | &p | | {EXTERNAL LOCATION} | & | +| main.rs:1818:47:1818:47 | p | | {EXTERNAL LOCATION} | *mut | +| main.rs:1818:47:1818:47 | p | TPtrMut | {EXTERNAL LOCATION} | i32 | +| main.rs:1819:13:1819:13 | x | | {EXTERNAL LOCATION} | i32 | +| main.rs:1819:17:1819:37 | ...::my_func(...) | | {EXTERNAL LOCATION} | i32 | +| main.rs:1825:16:1837:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1826:13:1826:13 | x | | {EXTERNAL LOCATION} | bool | +| main.rs:1826:17:1826:20 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:1826:17:1826:29 | ... && ... | | {EXTERNAL LOCATION} | bool | +| main.rs:1826:25:1826:29 | false | | {EXTERNAL LOCATION} | bool | +| main.rs:1827:13:1827:13 | y | | {EXTERNAL LOCATION} | bool | +| main.rs:1827:17:1827:20 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:1827:17:1827:29 | ... \|\| ... | | {EXTERNAL LOCATION} | bool | +| main.rs:1827:25:1827:29 | false | | {EXTERNAL LOCATION} | bool | +| main.rs:1831:17:1833:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1833:16:1835:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1850:30:1852:9 | { ... } | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1851:13:1851:31 | Vec2 {...} | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1858:16:1858:19 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1858:22:1858:24 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1858:41:1863:9 | { ... } | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1859:13:1862:13 | Vec2 {...} | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1860:20:1860:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1860:29:1860:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1861:20:1861:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1861:29:1861:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1868:23:1868:31 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1868:23:1868:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1868:34:1868:36 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1868:45:1871:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1869:13:1869:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1869:13:1869:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1869:23:1869:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1870:13:1870:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1870:13:1870:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1870:23:1870:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1876:16:1876:19 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1876:22:1876:24 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1876:41:1881:9 | { ... } | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1877:13:1880:13 | Vec2 {...} | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1878:20:1878:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1878:29:1878:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1879:20:1879:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1879:29:1879:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1886:23:1886:31 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1886:23:1886:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1886:34:1886:36 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1886:45:1889:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1887:13:1887:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1887:13:1887:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1887:23:1887:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1888:13:1888:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1888:13:1888:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1888:23:1888:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1894:16:1894:19 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1894:22:1894:24 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1894:41:1899:9 | { ... } | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1895:13:1898:13 | Vec2 {...} | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1896:20:1896:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1896:29:1896:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1897:20:1897:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1897:29:1897:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1903:23:1903:31 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1903:23:1903:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1903:34:1903:36 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1903:45:1906:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1904:13:1904:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1904:13:1904:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1904:23:1904:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1905:13:1905:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1905:13:1905:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1905:23:1905:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1911:16:1911:19 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1911:22:1911:24 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1911:41:1916:9 | { ... } | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1912:13:1915:13 | Vec2 {...} | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1913:20:1913:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1913:29:1913:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1914:20:1914:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1914:29:1914:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1920:23:1920:31 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1920:23:1920:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1920:34:1920:36 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1920:45:1923:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1921:13:1921:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1921:13:1921:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1921:23:1921:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1922:13:1922:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1922:13:1922:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1922:23:1922:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1928:16:1928:19 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1928:22:1928:24 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1928:41:1933:9 | { ... } | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1929:13:1932:13 | Vec2 {...} | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1930:20:1930:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1930:29:1930:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1931:20:1931:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1931:29:1931:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1937:23:1937:31 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1937:23:1937:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1937:34:1937:36 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1937:45:1940:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1938:13:1938:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1938:13:1938:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1938:23:1938:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1939:13:1939:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1939:13:1939:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1939:23:1939:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1945:19:1945:22 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1945:25:1945:27 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1945:44:1950:9 | { ... } | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1946:13:1949:13 | Vec2 {...} | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1947:20:1947:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1947:29:1947:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1948:20:1948:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1948:29:1948:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1954:26:1954:34 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1954:26:1954:34 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1954:37:1954:39 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1954:48:1957:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1955:13:1955:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1955:13:1955:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1955:23:1955:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1956:13:1956:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1956:13:1956:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1956:23:1956:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1962:18:1962:21 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1962:24:1962:26 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1962:43:1967:9 | { ... } | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1963:13:1966:13 | Vec2 {...} | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1964:20:1964:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1964:29:1964:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1965:20:1965:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1965:29:1965:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1971:25:1971:33 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1971:25:1971:33 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1971:36:1971:38 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1971:47:1974:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1972:13:1972:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1972:13:1972:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1972:23:1972:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1973:13:1973:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1973:13:1973:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1973:23:1973:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1979:19:1979:22 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1979:25:1979:27 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1979:44:1984:9 | { ... } | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1980:13:1983:13 | Vec2 {...} | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1981:20:1981:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1981:29:1981:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1982:20:1982:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1982:29:1982:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1988:26:1988:34 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:1988:26:1988:34 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1988:37:1988:39 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1988:48:1991:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:1989:13:1989:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1989:13:1989:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1989:23:1989:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1990:13:1990:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:1990:13:1990:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1990:23:1990:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1996:16:1996:19 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1996:22:1996:24 | rhs | | {EXTERNAL LOCATION} | u32 | +| main.rs:1996:40:2001:9 | { ... } | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1997:13:2000:13 | Vec2 {...} | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1998:20:1998:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1998:30:1998:32 | rhs | | {EXTERNAL LOCATION} | u32 | +| main.rs:1999:20:1999:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1999:30:1999:32 | rhs | | {EXTERNAL LOCATION} | u32 | +| main.rs:2005:23:2005:31 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2005:23:2005:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2005:34:2005:36 | rhs | | {EXTERNAL LOCATION} | u32 | +| main.rs:2005:44:2008:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2006:13:2006:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2006:13:2006:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2006:24:2006:26 | rhs | | {EXTERNAL LOCATION} | u32 | +| main.rs:2007:13:2007:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2007:13:2007:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2007:24:2007:26 | rhs | | {EXTERNAL LOCATION} | u32 | +| main.rs:2013:16:2013:19 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2013:22:2013:24 | rhs | | {EXTERNAL LOCATION} | u32 | +| main.rs:2013:40:2018:9 | { ... } | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2014:13:2017:13 | Vec2 {...} | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2015:20:2015:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2015:30:2015:32 | rhs | | {EXTERNAL LOCATION} | u32 | +| main.rs:2016:20:2016:23 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2016:30:2016:32 | rhs | | {EXTERNAL LOCATION} | u32 | +| main.rs:2022:23:2022:31 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2022:23:2022:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2022:34:2022:36 | rhs | | {EXTERNAL LOCATION} | u32 | +| main.rs:2022:44:2025:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2023:13:2023:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2023:13:2023:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2023:24:2023:26 | rhs | | {EXTERNAL LOCATION} | u32 | +| main.rs:2024:13:2024:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2024:13:2024:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2024:24:2024:26 | rhs | | {EXTERNAL LOCATION} | u32 | +| main.rs:2030:16:2030:19 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2030:30:2035:9 | { ... } | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2031:13:2034:13 | Vec2 {...} | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2032:21:2032:24 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2033:21:2033:24 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2040:16:2040:19 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2040:30:2045:9 | { ... } | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2041:13:2044:13 | Vec2 {...} | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2042:21:2042:24 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2043:21:2043:24 | self | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2049:15:2049:19 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2049:15:2049:19 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2049:22:2049:26 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2049:22:2049:26 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2049:44:2051:9 | { ... } | | {EXTERNAL LOCATION} | bool | +| main.rs:2050:13:2050:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2050:13:2050:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2050:13:2050:29 | ... == ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2050:13:2050:50 | ... && ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2050:23:2050:27 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2050:23:2050:27 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2050:34:2050:37 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2050:34:2050:37 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2050:34:2050:50 | ... == ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2050:44:2050:48 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2050:44:2050:48 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2053:15:2053:19 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2053:15:2053:19 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2053:22:2053:26 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2053:22:2053:26 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2053:44:2055:9 | { ... } | | {EXTERNAL LOCATION} | bool | +| main.rs:2054:13:2054:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2054:13:2054:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2054:13:2054:29 | ... != ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2054:13:2054:50 | ... \|\| ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2054:23:2054:27 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2054:23:2054:27 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2054:34:2054:37 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2054:34:2054:37 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2054:34:2054:50 | ... != ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2054:44:2054:48 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2054:44:2054:48 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2059:24:2059:28 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2059:24:2059:28 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2059:31:2059:35 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2059:31:2059:35 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2059:75:2061:9 | { ... } | | {EXTERNAL LOCATION} | Option | +| main.rs:2059:75:2061:9 | { ... } | T | {EXTERNAL LOCATION} | Ordering | +| main.rs:2060:14:2060:17 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2060:14:2060:17 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2060:23:2060:26 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2060:23:2060:26 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2060:43:2060:62 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:2060:45:2060:49 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2060:45:2060:49 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2060:55:2060:59 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2060:55:2060:59 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2063:15:2063:19 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2063:15:2063:19 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2063:22:2063:26 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2063:22:2063:26 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2063:44:2065:9 | { ... } | | {EXTERNAL LOCATION} | bool | +| main.rs:2064:13:2064:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2064:13:2064:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2064:13:2064:28 | ... < ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2064:13:2064:48 | ... && ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2064:22:2064:26 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2064:22:2064:26 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2064:33:2064:36 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2064:33:2064:36 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2064:33:2064:48 | ... < ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2064:42:2064:46 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2064:42:2064:46 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2067:15:2067:19 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2067:15:2067:19 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2067:22:2067:26 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2067:22:2067:26 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2067:44:2069:9 | { ... } | | {EXTERNAL LOCATION} | bool | +| main.rs:2068:13:2068:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2068:13:2068:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2068:13:2068:29 | ... <= ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2068:13:2068:50 | ... && ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2068:23:2068:27 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2068:23:2068:27 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2068:34:2068:37 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2068:34:2068:37 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2068:34:2068:50 | ... <= ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2068:44:2068:48 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2068:44:2068:48 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2071:15:2071:19 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2071:15:2071:19 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2071:22:2071:26 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2071:22:2071:26 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2071:44:2073:9 | { ... } | | {EXTERNAL LOCATION} | bool | +| main.rs:2072:13:2072:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2072:13:2072:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2072:13:2072:28 | ... > ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2072:13:2072:48 | ... && ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2072:22:2072:26 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2072:22:2072:26 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2072:33:2072:36 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2072:33:2072:36 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2072:33:2072:48 | ... > ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2072:42:2072:46 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2072:42:2072:46 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2075:15:2075:19 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2075:15:2075:19 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2075:22:2075:26 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2075:22:2075:26 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2075:44:2077:9 | { ... } | | {EXTERNAL LOCATION} | bool | +| main.rs:2076:13:2076:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2076:13:2076:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2076:13:2076:29 | ... >= ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2076:13:2076:50 | ... && ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2076:23:2076:27 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2076:23:2076:27 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2076:34:2076:37 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2076:34:2076:37 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2076:34:2076:50 | ... >= ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2076:44:2076:48 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2076:44:2076:48 | other | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2080:26:2080:26 | a | | main.rs:2080:18:2080:23 | T | +| main.rs:2080:32:2080:32 | b | | main.rs:2080:18:2080:23 | T | +| main.rs:2081:9:2081:9 | a | | main.rs:2080:18:2080:23 | T | +| main.rs:2081:13:2081:13 | b | | main.rs:2080:18:2080:23 | T | +| main.rs:2084:16:2215:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2088:23:2088:26 | 1i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2088:31:2088:34 | 2i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2089:23:2089:26 | 3i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2089:31:2089:34 | 4i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2090:23:2090:26 | 5i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2090:30:2090:33 | 6i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2091:23:2091:26 | 7i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2091:31:2091:34 | 8i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2092:23:2092:26 | 9i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2092:30:2092:34 | 10i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2093:23:2093:27 | 11i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2093:32:2093:36 | 12i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2096:23:2096:27 | 13i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2096:31:2096:35 | 14i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2097:23:2097:27 | 15i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2097:31:2097:35 | 16i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2098:23:2098:27 | 17i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2098:31:2098:35 | 18i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2099:23:2099:27 | 19i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2099:31:2099:35 | 20i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2100:23:2100:27 | 21i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2100:31:2100:35 | 22i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2101:39:2101:42 | 1i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2101:45:2101:48 | 2i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2104:17:2104:30 | i64_add_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2104:34:2104:38 | 23i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2105:9:2105:22 | i64_add_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2105:27:2105:31 | 24i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2107:17:2107:30 | i64_sub_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2107:34:2107:38 | 25i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2108:9:2108:22 | i64_sub_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2108:27:2108:31 | 26i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2110:17:2110:30 | i64_mul_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2110:34:2110:38 | 27i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2111:9:2111:22 | i64_mul_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2111:27:2111:31 | 28i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2113:17:2113:30 | i64_div_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2113:34:2113:38 | 29i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2114:9:2114:22 | i64_div_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2114:27:2114:31 | 30i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2116:17:2116:30 | i64_rem_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2116:34:2116:38 | 31i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2117:9:2117:22 | i64_rem_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2117:27:2117:31 | 32i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2120:26:2120:30 | 33i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2120:34:2120:38 | 34i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2121:25:2121:29 | 35i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2121:33:2121:37 | 36i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2122:26:2122:30 | 37i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2122:34:2122:38 | 38i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2123:23:2123:27 | 39i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2123:32:2123:36 | 40i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2124:23:2124:27 | 41i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2124:32:2124:36 | 42i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2127:17:2127:33 | i64_bitand_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2127:37:2127:41 | 43i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2128:9:2128:25 | i64_bitand_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2128:30:2128:34 | 44i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2130:17:2130:32 | i64_bitor_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2130:36:2130:40 | 45i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2131:9:2131:24 | i64_bitor_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2131:29:2131:33 | 46i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2133:17:2133:33 | i64_bitxor_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2133:37:2133:41 | 47i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2134:9:2134:25 | i64_bitxor_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2134:30:2134:34 | 48i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2136:17:2136:30 | i64_shl_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2136:34:2136:38 | 49i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2137:9:2137:22 | i64_shl_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2137:28:2137:32 | 50i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2139:17:2139:30 | i64_shr_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2139:34:2139:38 | 51i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2140:9:2140:22 | i64_shr_assign | | {EXTERNAL LOCATION} | i64 | +| main.rs:2140:28:2140:32 | 52i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2142:24:2142:28 | 53i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2143:24:2143:28 | 54i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2146:13:2146:14 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2146:18:2146:36 | Vec2 {...} | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2147:13:2147:14 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2147:18:2147:36 | Vec2 {...} | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2150:23:2150:24 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2150:29:2150:30 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2151:23:2151:24 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2151:29:2151:30 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2152:23:2152:24 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2152:28:2152:29 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2153:23:2153:24 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2153:29:2153:30 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2154:23:2154:24 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2154:28:2154:29 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2155:23:2155:24 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2155:29:2155:30 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2158:24:2158:25 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2158:29:2158:30 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2159:24:2159:25 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2159:29:2159:30 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2160:24:2160:25 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2160:29:2160:30 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2161:24:2161:25 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2161:29:2161:30 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2162:24:2162:25 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2162:29:2162:30 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2165:17:2165:31 | vec2_add_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2165:35:2165:36 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2166:9:2166:23 | vec2_add_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2166:28:2166:29 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2168:17:2168:31 | vec2_sub_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2168:35:2168:36 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2169:9:2169:23 | vec2_sub_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2169:28:2169:29 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2171:17:2171:31 | vec2_mul_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2171:35:2171:36 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2172:9:2172:23 | vec2_mul_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2172:28:2172:29 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2174:17:2174:31 | vec2_div_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2174:35:2174:36 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2175:9:2175:23 | vec2_div_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2175:28:2175:29 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2177:17:2177:31 | vec2_rem_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2177:35:2177:36 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2178:9:2178:23 | vec2_rem_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2178:28:2178:29 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2181:27:2181:28 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2181:32:2181:33 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2182:26:2182:27 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2182:31:2182:32 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2183:27:2183:28 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2183:32:2183:33 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2184:24:2184:25 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2184:30:2184:33 | 1u32 | | {EXTERNAL LOCATION} | u32 | +| main.rs:2185:24:2185:25 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2185:30:2185:33 | 1u32 | | {EXTERNAL LOCATION} | u32 | +| main.rs:2188:17:2188:34 | vec2_bitand_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2188:38:2188:39 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2189:9:2189:26 | vec2_bitand_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2189:31:2189:32 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2191:17:2191:33 | vec2_bitor_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2191:37:2191:38 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2192:9:2192:25 | vec2_bitor_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2192:30:2192:31 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2194:17:2194:34 | vec2_bitxor_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2194:38:2194:39 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2195:9:2195:26 | vec2_bitxor_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2195:31:2195:32 | v2 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2197:17:2197:31 | vec2_shl_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2197:35:2197:36 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2198:9:2198:23 | vec2_shl_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2198:29:2198:32 | 1u32 | | {EXTERNAL LOCATION} | u32 | +| main.rs:2200:17:2200:31 | vec2_shr_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2200:35:2200:36 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2201:9:2201:23 | vec2_shr_assign | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2201:29:2201:32 | 1u32 | | {EXTERNAL LOCATION} | u32 | +| main.rs:2204:25:2204:26 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2205:25:2205:26 | v1 | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2209:30:2209:48 | Vec2 {...} | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2214:30:2214:48 | Vec2 {...} | | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2224:18:2224:21 | SelfParam | | main.rs:2221:5:2221:14 | S1 | +| main.rs:2224:24:2224:25 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2227:25:2229:5 | { ... } | | main.rs:2221:5:2221:14 | S1 | +| main.rs:2231:41:2233:5 | { ... } | | main.rs:2231:16:2231:39 | impl ... | +| main.rs:2232:9:2232:20 | { ... } | | {EXTERNAL LOCATION} | dyn Future | +| main.rs:2235:41:2237:5 | { ... } | | main.rs:2235:16:2235:39 | impl ... | +| main.rs:2236:9:2236:16 | { ... } | | {EXTERNAL LOCATION} | dyn Future | +| main.rs:2236:9:2236:16 | { ... } | dyn(Output) | {EXTERNAL LOCATION} | () | +| main.rs:2245:13:2245:42 | SelfParam | | {EXTERNAL LOCATION} | Pin | +| main.rs:2245:13:2245:42 | SelfParam | Ptr | {EXTERNAL LOCATION} | & | +| main.rs:2245:13:2245:42 | SelfParam | Ptr.TRef | main.rs:2239:5:2239:14 | S2 | +| main.rs:2246:13:2246:15 | _cx | | {EXTERNAL LOCATION} | & | +| main.rs:2246:13:2246:15 | _cx | TRef | {EXTERNAL LOCATION} | Context | +| main.rs:2247:44:2249:9 | { ... } | | {EXTERNAL LOCATION} | Poll | +| main.rs:2247:44:2249:9 | { ... } | T | main.rs:2221:5:2221:14 | S1 | +| main.rs:2252:41:2254:5 | { ... } | | main.rs:2252:16:2252:39 | impl ... | +| main.rs:2256:22:2264:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2257:9:2257:12 | f1(...) | | {EXTERNAL LOCATION} | dyn Future | +| main.rs:2257:9:2257:12 | f1(...) | dyn(Output) | main.rs:2221:5:2221:14 | S1 | +| main.rs:2258:9:2258:12 | f2(...) | | main.rs:2231:16:2231:39 | impl ... | +| main.rs:2259:9:2259:12 | f3(...) | | main.rs:2235:16:2235:39 | impl ... | +| main.rs:2260:9:2260:12 | f4(...) | | main.rs:2252:16:2252:39 | impl ... | +| main.rs:2262:13:2262:13 | b | | {EXTERNAL LOCATION} | dyn Future | +| main.rs:2262:17:2262:28 | { ... } | | {EXTERNAL LOCATION} | dyn Future | +| main.rs:2263:9:2263:9 | b | | {EXTERNAL LOCATION} | dyn Future | +| main.rs:2274:15:2274:19 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2274:15:2274:19 | SelfParam | TRef | main.rs:2273:5:2275:5 | Self [trait Trait1] | +| main.rs:2274:22:2274:23 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2278:15:2278:19 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2278:15:2278:19 | SelfParam | TRef | main.rs:2277:5:2279:5 | Self [trait Trait2] | +| main.rs:2278:22:2278:23 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2282:15:2282:19 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2282:15:2282:19 | SelfParam | TRef | main.rs:2268:5:2269:14 | S1 | +| main.rs:2282:22:2282:23 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2286:15:2286:19 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2286:15:2286:19 | SelfParam | TRef | main.rs:2268:5:2269:14 | S1 | +| main.rs:2286:22:2286:23 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2289:37:2291:5 | { ... } | | main.rs:2289:16:2289:35 | impl ... + ... | +| main.rs:2294:18:2294:22 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2294:18:2294:22 | SelfParam | TRef | main.rs:2293:5:2295:5 | Self [trait MyTrait] | +| main.rs:2298:18:2298:22 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2298:18:2298:22 | SelfParam | TRef | main.rs:2268:5:2269:14 | S1 | +| main.rs:2298:31:2300:9 | { ... } | | main.rs:2270:5:2270:14 | S2 | +| main.rs:2304:18:2304:22 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2304:18:2304:22 | SelfParam | TRef | main.rs:2271:5:2271:22 | S3 | +| main.rs:2304:18:2304:22 | SelfParam | TRef.T3 | main.rs:2303:10:2303:17 | T | +| main.rs:2304:30:2307:9 | { ... } | | main.rs:2303:10:2303:17 | T | +| main.rs:2305:25:2305:28 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2305:25:2305:28 | self | TRef | main.rs:2271:5:2271:22 | S3 | +| main.rs:2305:25:2305:28 | self | TRef.T3 | main.rs:2303:10:2303:17 | T | +| main.rs:2310:45:2312:5 | { ... } | | main.rs:2310:28:2310:43 | impl ... | +| main.rs:2314:41:2314:41 | t | | main.rs:2314:26:2314:38 | B | +| main.rs:2314:52:2316:5 | { ... } | | main.rs:2314:23:2314:23 | A | +| main.rs:2315:9:2315:9 | t | | main.rs:2314:26:2314:38 | B | +| main.rs:2318:34:2318:34 | x | | main.rs:2318:24:2318:31 | T | +| main.rs:2318:59:2320:5 | { ... } | | main.rs:2318:43:2318:57 | impl ... | +| main.rs:2318:59:2320:5 | { ... } | impl(T) | main.rs:2318:24:2318:31 | T | +| main.rs:2319:12:2319:12 | x | | main.rs:2318:24:2318:31 | T | +| main.rs:2322:34:2322:34 | x | | main.rs:2322:24:2322:31 | T | +| main.rs:2322:67:2324:5 | { ... } | | {EXTERNAL LOCATION} | Option | +| main.rs:2322:67:2324:5 | { ... } | T | main.rs:2322:50:2322:64 | impl ... | +| main.rs:2322:67:2324:5 | { ... } | T.impl(T) | main.rs:2322:24:2322:31 | T | +| main.rs:2323:17:2323:17 | x | | main.rs:2322:24:2322:31 | T | +| main.rs:2326:34:2326:34 | x | | main.rs:2326:24:2326:31 | T | +| main.rs:2326:78:2328:5 | { ... } | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2326:78:2328:5 | { ... } | T0 | main.rs:2326:44:2326:58 | impl ... | +| main.rs:2326:78:2328:5 | { ... } | T0.impl(T) | main.rs:2326:24:2326:31 | T | +| main.rs:2326:78:2328:5 | { ... } | T1 | main.rs:2326:61:2326:75 | impl ... | +| main.rs:2326:78:2328:5 | { ... } | T1.impl(T) | main.rs:2326:24:2326:31 | T | +| main.rs:2327:9:2327:30 | TupleExpr | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2327:13:2327:13 | x | | main.rs:2326:24:2326:31 | T | +| main.rs:2327:28:2327:28 | x | | main.rs:2326:24:2326:31 | T | +| main.rs:2330:26:2330:26 | t | | main.rs:2330:29:2330:43 | impl ... | +| main.rs:2330:51:2332:5 | { ... } | | main.rs:2330:23:2330:23 | A | +| main.rs:2331:9:2331:9 | t | | main.rs:2330:29:2330:43 | impl ... | +| main.rs:2334:16:2348:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2335:13:2335:13 | x | | main.rs:2289:16:2289:35 | impl ... + ... | +| main.rs:2335:17:2335:20 | f1(...) | | main.rs:2289:16:2289:35 | impl ... + ... | +| main.rs:2336:9:2336:9 | x | | main.rs:2289:16:2289:35 | impl ... + ... | +| main.rs:2337:9:2337:9 | x | | main.rs:2289:16:2289:35 | impl ... + ... | +| main.rs:2338:13:2338:13 | a | | main.rs:2310:28:2310:43 | impl ... | +| main.rs:2338:17:2338:32 | get_a_my_trait(...) | | main.rs:2310:28:2310:43 | impl ... | +| main.rs:2339:32:2339:32 | a | | main.rs:2310:28:2310:43 | impl ... | +| main.rs:2340:13:2340:13 | a | | main.rs:2310:28:2310:43 | impl ... | +| main.rs:2340:17:2340:32 | get_a_my_trait(...) | | main.rs:2310:28:2310:43 | impl ... | +| main.rs:2341:32:2341:32 | a | | main.rs:2310:28:2310:43 | impl ... | +| main.rs:2343:17:2343:35 | get_a_my_trait2(...) | | main.rs:2318:43:2318:57 | impl ... | +| main.rs:2346:17:2346:35 | get_a_my_trait3(...) | | {EXTERNAL LOCATION} | Option | +| main.rs:2346:17:2346:35 | get_a_my_trait3(...) | T | main.rs:2322:50:2322:64 | impl ... | +| main.rs:2347:17:2347:35 | get_a_my_trait4(...) | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2347:17:2347:35 | get_a_my_trait4(...) | T0 | main.rs:2326:44:2326:58 | impl ... | +| main.rs:2347:17:2347:35 | get_a_my_trait4(...) | T1 | main.rs:2326:61:2326:75 | impl ... | +| main.rs:2358:16:2358:20 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2358:16:2358:20 | SelfParam | TRef | main.rs:2354:5:2355:13 | S | +| main.rs:2358:31:2360:9 | { ... } | | main.rs:2354:5:2355:13 | S | +| main.rs:2369:26:2371:9 | { ... } | | main.rs:2363:5:2366:5 | MyVec | +| main.rs:2369:26:2371:9 | { ... } | T | main.rs:2368:10:2368:10 | T | +| main.rs:2370:13:2370:38 | MyVec {...} | | main.rs:2363:5:2366:5 | MyVec | +| main.rs:2370:27:2370:36 | ...::new(...) | | {EXTERNAL LOCATION} | Vec | +| main.rs:2370:27:2370:36 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | +| main.rs:2373:17:2373:25 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2373:17:2373:25 | SelfParam | TRef | main.rs:2363:5:2366:5 | MyVec | +| main.rs:2373:17:2373:25 | SelfParam | TRef.T | main.rs:2368:10:2368:10 | T | +| main.rs:2373:28:2373:32 | value | | main.rs:2368:10:2368:10 | T | +| main.rs:2373:38:2375:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2374:13:2374:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2374:13:2374:16 | self | TRef | main.rs:2363:5:2366:5 | MyVec | +| main.rs:2374:13:2374:16 | self | TRef.T | main.rs:2368:10:2368:10 | T | +| main.rs:2374:28:2374:32 | value | | main.rs:2368:10:2368:10 | T | +| main.rs:2382:18:2382:22 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2382:18:2382:22 | SelfParam | TRef | main.rs:2363:5:2366:5 | MyVec | +| main.rs:2382:18:2382:22 | SelfParam | TRef.T | main.rs:2378:10:2378:10 | T | +| main.rs:2382:25:2382:29 | index | | {EXTERNAL LOCATION} | usize | +| main.rs:2382:56:2384:9 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:2382:56:2384:9 | { ... } | TRef | main.rs:2378:10:2378:10 | T | +| main.rs:2383:13:2383:29 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:2383:14:2383:17 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2383:14:2383:17 | self | TRef | main.rs:2363:5:2366:5 | MyVec | +| main.rs:2383:14:2383:17 | self | TRef.T | main.rs:2378:10:2378:10 | T | +| main.rs:2383:24:2383:28 | index | | {EXTERNAL LOCATION} | usize | +| main.rs:2387:22:2387:26 | slice | | {EXTERNAL LOCATION} | & | +| main.rs:2387:22:2387:26 | slice | TRef | {EXTERNAL LOCATION} | [] | +| main.rs:2387:22:2387:26 | slice | TRef.TSlice | main.rs:2354:5:2355:13 | S | +| main.rs:2387:35:2389:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2388:17:2388:21 | slice | | {EXTERNAL LOCATION} | & | +| main.rs:2388:17:2388:21 | slice | TRef | {EXTERNAL LOCATION} | [] | +| main.rs:2388:17:2388:21 | slice | TRef.TSlice | main.rs:2354:5:2355:13 | S | +| main.rs:2391:37:2391:37 | a | | main.rs:2391:20:2391:34 | T | +| main.rs:2391:43:2391:43 | b | | {EXTERNAL LOCATION} | usize | +| main.rs:2395:9:2395:9 | a | | main.rs:2391:20:2391:34 | T | +| main.rs:2395:11:2395:11 | b | | {EXTERNAL LOCATION} | usize | +| main.rs:2398:16:2409:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2399:17:2399:19 | vec | | main.rs:2363:5:2366:5 | MyVec | +| main.rs:2399:23:2399:34 | ...::new(...) | | main.rs:2363:5:2366:5 | MyVec | +| main.rs:2400:9:2400:11 | vec | | main.rs:2363:5:2366:5 | MyVec | +| main.rs:2401:9:2401:11 | vec | | main.rs:2363:5:2366:5 | MyVec | +| main.rs:2403:13:2403:14 | xs | | {EXTERNAL LOCATION} | [;] | +| main.rs:2403:13:2403:14 | xs | TArray | main.rs:2354:5:2355:13 | S | +| main.rs:2403:26:2403:28 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2404:17:2404:18 | xs | | {EXTERNAL LOCATION} | [;] | +| main.rs:2404:17:2404:18 | xs | TArray | main.rs:2354:5:2355:13 | S | +| main.rs:2406:29:2406:31 | vec | | main.rs:2363:5:2366:5 | MyVec | +| main.rs:2408:9:2408:26 | analyze_slice(...) | | {EXTERNAL LOCATION} | () | +| main.rs:2408:23:2408:25 | &xs | | {EXTERNAL LOCATION} | & | +| main.rs:2408:24:2408:25 | xs | | {EXTERNAL LOCATION} | [;] | +| main.rs:2408:24:2408:25 | xs | TArray | main.rs:2354:5:2355:13 | S | +| main.rs:2413:16:2415:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2414:25:2414:35 | "Hello, {}" | | {EXTERNAL LOCATION} | & | +| main.rs:2414:25:2414:35 | "Hello, {}" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2414:25:2414:45 | ...::format(...) | | {EXTERNAL LOCATION} | String | +| main.rs:2414:38:2414:45 | "World!" | | {EXTERNAL LOCATION} | & | +| main.rs:2414:38:2414:45 | "World!" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2423:19:2423:22 | SelfParam | | main.rs:2419:5:2424:5 | Self [trait MyAdd] | +| main.rs:2423:25:2423:27 | rhs | | main.rs:2419:17:2419:26 | Rhs | +| main.rs:2430:19:2430:22 | SelfParam | | {EXTERNAL LOCATION} | i64 | +| main.rs:2430:25:2430:29 | value | | {EXTERNAL LOCATION} | i64 | +| main.rs:2430:45:2432:9 | { ... } | | {EXTERNAL LOCATION} | i64 | +| main.rs:2431:13:2431:17 | value | | {EXTERNAL LOCATION} | i64 | +| main.rs:2439:19:2439:22 | SelfParam | | {EXTERNAL LOCATION} | i64 | +| main.rs:2439:25:2439:29 | value | | {EXTERNAL LOCATION} | & | +| main.rs:2439:25:2439:29 | value | TRef | {EXTERNAL LOCATION} | i64 | +| main.rs:2439:46:2441:9 | { ... } | | {EXTERNAL LOCATION} | i64 | +| main.rs:2440:14:2440:18 | value | | {EXTERNAL LOCATION} | & | +| main.rs:2440:14:2440:18 | value | TRef | {EXTERNAL LOCATION} | i64 | +| main.rs:2448:19:2448:22 | SelfParam | | {EXTERNAL LOCATION} | i64 | +| main.rs:2448:25:2448:29 | value | | {EXTERNAL LOCATION} | bool | +| main.rs:2448:46:2454:9 | { ... } | | {EXTERNAL LOCATION} | i64 | +| main.rs:2449:16:2449:20 | value | | {EXTERNAL LOCATION} | bool | +| main.rs:2463:19:2463:22 | SelfParam | | main.rs:2457:5:2457:19 | S | +| main.rs:2463:19:2463:22 | SelfParam | T | main.rs:2459:10:2459:17 | T | +| main.rs:2463:25:2463:29 | other | | main.rs:2457:5:2457:19 | S | +| main.rs:2463:25:2463:29 | other | T | main.rs:2459:10:2459:17 | T | +| main.rs:2463:54:2465:9 | { ... } | | main.rs:2457:5:2457:19 | S | +| main.rs:2464:16:2464:19 | self | | main.rs:2457:5:2457:19 | S | +| main.rs:2464:16:2464:19 | self | T | main.rs:2459:10:2459:17 | T | +| main.rs:2464:31:2464:35 | other | | main.rs:2457:5:2457:19 | S | +| main.rs:2464:31:2464:35 | other | T | main.rs:2459:10:2459:17 | T | +| main.rs:2472:19:2472:22 | SelfParam | | main.rs:2457:5:2457:19 | S | +| main.rs:2472:19:2472:22 | SelfParam | T | main.rs:2468:10:2468:17 | T | +| main.rs:2472:25:2472:29 | other | | main.rs:2468:10:2468:17 | T | +| main.rs:2472:51:2474:9 | { ... } | | main.rs:2457:5:2457:19 | S | +| main.rs:2473:16:2473:19 | self | | main.rs:2457:5:2457:19 | S | +| main.rs:2473:16:2473:19 | self | T | main.rs:2468:10:2468:17 | T | +| main.rs:2473:31:2473:35 | other | | main.rs:2468:10:2468:17 | T | +| main.rs:2484:19:2484:22 | SelfParam | | main.rs:2457:5:2457:19 | S | +| main.rs:2484:19:2484:22 | SelfParam | T | main.rs:2477:14:2477:14 | T | +| main.rs:2484:25:2484:29 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2484:25:2484:29 | other | TRef | main.rs:2477:14:2477:14 | T | +| main.rs:2484:55:2486:9 | { ... } | | main.rs:2457:5:2457:19 | S | +| main.rs:2485:16:2485:19 | self | | main.rs:2457:5:2457:19 | S | +| main.rs:2485:16:2485:19 | self | T | main.rs:2477:14:2477:14 | T | +| main.rs:2485:31:2485:35 | other | | {EXTERNAL LOCATION} | & | +| main.rs:2485:31:2485:35 | other | TRef | main.rs:2477:14:2477:14 | T | +| main.rs:2491:20:2491:24 | value | | main.rs:2489:18:2489:18 | T | +| main.rs:2496:20:2496:24 | value | | {EXTERNAL LOCATION} | i64 | +| main.rs:2496:40:2498:9 | { ... } | | {EXTERNAL LOCATION} | i64 | +| main.rs:2497:13:2497:17 | value | | {EXTERNAL LOCATION} | i64 | +| main.rs:2503:20:2503:24 | value | | {EXTERNAL LOCATION} | bool | +| main.rs:2503:41:2509:9 | { ... } | | {EXTERNAL LOCATION} | i64 | +| main.rs:2504:16:2504:20 | value | | {EXTERNAL LOCATION} | bool | +| main.rs:2514:21:2514:25 | value | | main.rs:2512:19:2512:19 | T | +| main.rs:2514:31:2514:31 | x | | main.rs:2512:5:2515:5 | Self [trait MyFrom2] | +| main.rs:2519:21:2519:25 | value | | {EXTERNAL LOCATION} | i64 | +| main.rs:2519:33:2519:33 | _ | | {EXTERNAL LOCATION} | i64 | +| main.rs:2519:48:2521:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2520:13:2520:17 | value | | {EXTERNAL LOCATION} | i64 | +| main.rs:2526:21:2526:25 | value | | {EXTERNAL LOCATION} | bool | +| main.rs:2526:34:2526:34 | _ | | {EXTERNAL LOCATION} | i64 | +| main.rs:2526:49:2532:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2527:16:2527:20 | value | | {EXTERNAL LOCATION} | bool | +| main.rs:2537:15:2537:15 | x | | main.rs:2535:5:2541:5 | Self [trait MySelfTrait] | +| main.rs:2540:15:2540:15 | x | | main.rs:2535:5:2541:5 | Self [trait MySelfTrait] | +| main.rs:2545:15:2545:15 | x | | {EXTERNAL LOCATION} | i64 | +| main.rs:2545:31:2547:9 | { ... } | | {EXTERNAL LOCATION} | i64 | +| main.rs:2546:13:2546:13 | x | | {EXTERNAL LOCATION} | i64 | +| main.rs:2550:15:2550:15 | x | | {EXTERNAL LOCATION} | i64 | +| main.rs:2550:32:2552:9 | { ... } | | {EXTERNAL LOCATION} | i64 | +| main.rs:2551:13:2551:13 | x | | {EXTERNAL LOCATION} | i64 | +| main.rs:2557:15:2557:15 | x | | {EXTERNAL LOCATION} | bool | +| main.rs:2557:31:2559:9 | { ... } | | {EXTERNAL LOCATION} | i64 | +| main.rs:2562:15:2562:15 | x | | {EXTERNAL LOCATION} | bool | +| main.rs:2562:32:2564:9 | { ... } | | {EXTERNAL LOCATION} | bool | +| main.rs:2563:13:2563:13 | x | | {EXTERNAL LOCATION} | bool | +| main.rs:2567:16:2592:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2568:13:2568:13 | x | | {EXTERNAL LOCATION} | i64 | +| main.rs:2569:9:2569:9 | x | | {EXTERNAL LOCATION} | i64 | +| main.rs:2569:18:2569:21 | 5i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2570:9:2570:9 | x | | {EXTERNAL LOCATION} | i64 | +| main.rs:2570:18:2570:22 | &5i64 | | {EXTERNAL LOCATION} | & | +| main.rs:2570:19:2570:22 | 5i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2571:9:2571:9 | x | | {EXTERNAL LOCATION} | i64 | +| main.rs:2571:18:2571:21 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:2573:11:2573:14 | 1i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2573:26:2573:29 | 2i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2574:11:2574:14 | 1i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2574:24:2574:27 | 3i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2575:11:2575:14 | 1i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2575:24:2575:28 | &3i64 | | {EXTERNAL LOCATION} | & | +| main.rs:2575:25:2575:28 | 3i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2577:13:2577:13 | x | | {EXTERNAL LOCATION} | i64 | +| main.rs:2577:17:2577:35 | ...::my_from(...) | | {EXTERNAL LOCATION} | i64 | +| main.rs:2577:30:2577:34 | 73i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2578:13:2578:13 | y | | {EXTERNAL LOCATION} | i64 | +| main.rs:2578:17:2578:34 | ...::my_from(...) | | {EXTERNAL LOCATION} | i64 | +| main.rs:2578:30:2578:33 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:2579:13:2579:13 | z | | {EXTERNAL LOCATION} | i64 | +| main.rs:2579:38:2579:42 | 73i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2580:9:2580:34 | ...::my_from2(...) | | {EXTERNAL LOCATION} | () | +| main.rs:2580:23:2580:27 | 73i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2580:30:2580:33 | 0i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2581:9:2581:33 | ...::my_from2(...) | | {EXTERNAL LOCATION} | () | +| main.rs:2581:23:2581:26 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:2581:29:2581:32 | 0i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2582:9:2582:38 | ...::my_from2(...) | | {EXTERNAL LOCATION} | () | +| main.rs:2582:27:2582:31 | 73i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2582:34:2582:37 | 0i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2584:9:2584:22 | ...::f1(...) | | {EXTERNAL LOCATION} | i64 | +| main.rs:2584:17:2584:21 | 73i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2585:9:2585:22 | ...::f2(...) | | {EXTERNAL LOCATION} | i64 | +| main.rs:2585:17:2585:21 | 73i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2586:9:2586:22 | ...::f1(...) | | {EXTERNAL LOCATION} | i64 | +| main.rs:2586:18:2586:21 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:2587:9:2587:22 | ...::f2(...) | | {EXTERNAL LOCATION} | bool | +| main.rs:2587:18:2587:21 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:2588:9:2588:30 | ...::f1(...) | | {EXTERNAL LOCATION} | i64 | +| main.rs:2588:25:2588:29 | 73i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2589:25:2589:29 | 73i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2590:9:2590:29 | ...::f1(...) | | {EXTERNAL LOCATION} | i64 | +| main.rs:2590:25:2590:28 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:2591:25:2591:28 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:2599:26:2601:9 | { ... } | | main.rs:2596:5:2596:24 | MyCallable | +| main.rs:2600:13:2600:25 | MyCallable {...} | | main.rs:2596:5:2596:24 | MyCallable | +| main.rs:2603:17:2603:21 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2603:17:2603:21 | SelfParam | TRef | main.rs:2596:5:2596:24 | MyCallable | +| main.rs:2603:31:2605:9 | { ... } | | {EXTERNAL LOCATION} | i64 | +| main.rs:2608:16:2715:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2611:9:2611:29 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2611:18:2611:26 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2611:28:2611:29 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2612:9:2612:44 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2612:18:2612:26 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2612:43:2612:44 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2613:9:2613:41 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2613:18:2613:26 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2613:40:2613:41 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2615:13:2615:17 | vals1 | | {EXTERNAL LOCATION} | [;] | +| main.rs:2615:21:2615:31 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2615:22:2615:24 | 1u8 | | {EXTERNAL LOCATION} | u8 | +| main.rs:2616:9:2616:25 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2616:18:2616:22 | vals1 | | {EXTERNAL LOCATION} | [;] | +| main.rs:2616:24:2616:25 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2618:13:2618:17 | vals2 | | {EXTERNAL LOCATION} | [;] | +| main.rs:2618:21:2618:29 | [1u16; 3] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2618:22:2618:25 | 1u16 | | {EXTERNAL LOCATION} | u16 | +| main.rs:2619:9:2619:25 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2619:18:2619:22 | vals2 | | {EXTERNAL LOCATION} | [;] | +| main.rs:2619:24:2619:25 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2621:13:2621:17 | vals3 | | {EXTERNAL LOCATION} | [;] | +| main.rs:2621:13:2621:17 | vals3 | TArray | {EXTERNAL LOCATION} | u32 | +| main.rs:2621:31:2621:39 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2622:9:2622:25 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2622:18:2622:22 | vals3 | | {EXTERNAL LOCATION} | [;] | +| main.rs:2622:18:2622:22 | vals3 | TArray | {EXTERNAL LOCATION} | u32 | +| main.rs:2622:24:2622:25 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2624:13:2624:17 | vals4 | | {EXTERNAL LOCATION} | [;] | +| main.rs:2624:13:2624:17 | vals4 | TArray | {EXTERNAL LOCATION} | u64 | +| main.rs:2624:31:2624:36 | [1; 3] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2625:9:2625:25 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2625:18:2625:22 | vals4 | | {EXTERNAL LOCATION} | [;] | +| main.rs:2625:18:2625:22 | vals4 | TArray | {EXTERNAL LOCATION} | u64 | +| main.rs:2625:24:2625:25 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2627:17:2627:24 | strings1 | | {EXTERNAL LOCATION} | [;] | +| main.rs:2627:28:2627:48 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2627:29:2627:33 | "foo" | | {EXTERNAL LOCATION} | & | +| main.rs:2627:29:2627:33 | "foo" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2627:36:2627:40 | "bar" | | {EXTERNAL LOCATION} | & | +| main.rs:2627:36:2627:40 | "bar" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2627:43:2627:47 | "baz" | | {EXTERNAL LOCATION} | & | +| main.rs:2627:43:2627:47 | "baz" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2628:9:2628:29 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2628:18:2628:26 | &strings1 | | {EXTERNAL LOCATION} | & | +| main.rs:2628:19:2628:26 | strings1 | | {EXTERNAL LOCATION} | [;] | +| main.rs:2628:28:2628:29 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2629:9:2629:33 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2629:18:2629:30 | &mut strings1 | | {EXTERNAL LOCATION} | & | +| main.rs:2629:23:2629:30 | strings1 | | {EXTERNAL LOCATION} | [;] | +| main.rs:2629:32:2629:33 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2630:9:2630:28 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2630:18:2630:25 | strings1 | | {EXTERNAL LOCATION} | [;] | +| main.rs:2630:27:2630:28 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2632:13:2632:20 | strings2 | | {EXTERNAL LOCATION} | [;] | +| main.rs:2633:9:2637:9 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2634:13:2634:31 | ...::from(...) | | {EXTERNAL LOCATION} | String | +| main.rs:2634:26:2634:30 | "foo" | | {EXTERNAL LOCATION} | & | +| main.rs:2634:26:2634:30 | "foo" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2635:13:2635:31 | ...::from(...) | | {EXTERNAL LOCATION} | String | +| main.rs:2635:26:2635:30 | "bar" | | {EXTERNAL LOCATION} | & | +| main.rs:2635:26:2635:30 | "bar" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2636:13:2636:31 | ...::from(...) | | {EXTERNAL LOCATION} | String | +| main.rs:2636:26:2636:30 | "baz" | | {EXTERNAL LOCATION} | & | +| main.rs:2636:26:2636:30 | "baz" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2638:9:2638:28 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2638:18:2638:25 | strings2 | | {EXTERNAL LOCATION} | [;] | +| main.rs:2638:27:2638:28 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2640:13:2640:20 | strings3 | | {EXTERNAL LOCATION} | & | +| main.rs:2641:9:2645:9 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:2641:10:2645:9 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2642:13:2642:31 | ...::from(...) | | {EXTERNAL LOCATION} | String | +| main.rs:2642:26:2642:30 | "foo" | | {EXTERNAL LOCATION} | & | +| main.rs:2642:26:2642:30 | "foo" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2643:13:2643:31 | ...::from(...) | | {EXTERNAL LOCATION} | String | +| main.rs:2643:26:2643:30 | "bar" | | {EXTERNAL LOCATION} | & | +| main.rs:2643:26:2643:30 | "bar" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2644:13:2644:31 | ...::from(...) | | {EXTERNAL LOCATION} | String | +| main.rs:2644:26:2644:30 | "baz" | | {EXTERNAL LOCATION} | & | +| main.rs:2644:26:2644:30 | "baz" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2646:9:2646:28 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2646:18:2646:25 | strings3 | | {EXTERNAL LOCATION} | & | +| main.rs:2646:27:2646:28 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2648:13:2648:21 | callables | | {EXTERNAL LOCATION} | [;] | +| main.rs:2648:25:2648:81 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2648:26:2648:42 | ...::new(...) | | main.rs:2596:5:2596:24 | MyCallable | +| main.rs:2648:45:2648:61 | ...::new(...) | | main.rs:2596:5:2596:24 | MyCallable | +| main.rs:2648:64:2648:80 | ...::new(...) | | main.rs:2596:5:2596:24 | MyCallable | +| main.rs:2649:9:2653:9 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2650:12:2650:20 | callables | | {EXTERNAL LOCATION} | [;] | +| main.rs:2651:9:2653:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2657:9:2657:25 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2657:18:2657:22 | 0..10 | | {EXTERNAL LOCATION} | Range | +| main.rs:2657:24:2657:25 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2658:9:2658:29 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2658:18:2658:26 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2658:19:2658:21 | 0u8 | | {EXTERNAL LOCATION} | u8 | +| main.rs:2658:19:2658:25 | 0u8..10 | | {EXTERNAL LOCATION} | Range | +| main.rs:2658:28:2658:29 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2659:13:2659:17 | range | | {EXTERNAL LOCATION} | Range | +| main.rs:2659:21:2659:25 | 0..10 | | {EXTERNAL LOCATION} | Range | +| main.rs:2660:9:2660:25 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2660:18:2660:22 | range | | {EXTERNAL LOCATION} | Range | +| main.rs:2660:24:2660:25 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2661:13:2661:22 | range_full | | {EXTERNAL LOCATION} | RangeFull | +| main.rs:2661:26:2661:27 | .. | | {EXTERNAL LOCATION} | RangeFull | +| main.rs:2662:9:2662:51 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2662:18:2662:48 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:2662:19:2662:36 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2662:20:2662:23 | 1i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2662:26:2662:29 | 2i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2662:32:2662:35 | 3i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2662:38:2662:47 | range_full | | {EXTERNAL LOCATION} | RangeFull | +| main.rs:2662:50:2662:51 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2664:13:2664:18 | range1 | | {EXTERNAL LOCATION} | Range | +| main.rs:2665:9:2668:9 | ...::Range {...} | | {EXTERNAL LOCATION} | Range | +| main.rs:2666:20:2666:23 | 0u16 | | {EXTERNAL LOCATION} | u16 | +| main.rs:2667:18:2667:22 | 10u16 | | {EXTERNAL LOCATION} | u16 | +| main.rs:2669:9:2669:26 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2669:18:2669:23 | range1 | | {EXTERNAL LOCATION} | Range | +| main.rs:2669:25:2669:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2674:9:2674:25 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2674:24:2674:25 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2676:13:2676:18 | vals4a | | {EXTERNAL LOCATION} | Vec | +| main.rs:2676:13:2676:18 | vals4a | A | {EXTERNAL LOCATION} | Global | +| main.rs:2676:13:2676:18 | vals4a | T | {EXTERNAL LOCATION} | u16 | +| main.rs:2676:32:2676:43 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2676:33:2676:36 | 1u16 | | {EXTERNAL LOCATION} | u16 | +| main.rs:2677:9:2677:26 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2677:18:2677:23 | vals4a | | {EXTERNAL LOCATION} | Vec | +| main.rs:2677:18:2677:23 | vals4a | A | {EXTERNAL LOCATION} | Global | +| main.rs:2677:18:2677:23 | vals4a | T | {EXTERNAL LOCATION} | u16 | +| main.rs:2677:25:2677:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2679:22:2679:33 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2679:23:2679:26 | 1u16 | | {EXTERNAL LOCATION} | u16 | +| main.rs:2680:9:2680:26 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2680:25:2680:26 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2682:13:2682:17 | vals5 | | {EXTERNAL LOCATION} | Vec | +| main.rs:2682:21:2682:43 | ...::from(...) | | {EXTERNAL LOCATION} | Vec | +| main.rs:2682:31:2682:42 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2682:32:2682:35 | 1u32 | | {EXTERNAL LOCATION} | u32 | +| main.rs:2683:9:2683:25 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2683:18:2683:22 | vals5 | | {EXTERNAL LOCATION} | Vec | +| main.rs:2683:24:2683:25 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2685:13:2685:17 | vals6 | | {EXTERNAL LOCATION} | Vec | +| main.rs:2685:13:2685:17 | vals6 | A | {EXTERNAL LOCATION} | Global | +| main.rs:2685:13:2685:17 | vals6 | T | {EXTERNAL LOCATION} | & | +| main.rs:2685:13:2685:17 | vals6 | T.TRef | {EXTERNAL LOCATION} | u64 | +| main.rs:2685:32:2685:43 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2685:33:2685:36 | 1u64 | | {EXTERNAL LOCATION} | u64 | +| main.rs:2686:9:2686:25 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2686:18:2686:22 | vals6 | | {EXTERNAL LOCATION} | Vec | +| main.rs:2686:18:2686:22 | vals6 | A | {EXTERNAL LOCATION} | Global | +| main.rs:2686:18:2686:22 | vals6 | T | {EXTERNAL LOCATION} | & | +| main.rs:2686:18:2686:22 | vals6 | T.TRef | {EXTERNAL LOCATION} | u64 | +| main.rs:2686:24:2686:25 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2688:17:2688:21 | vals7 | | {EXTERNAL LOCATION} | Vec | +| main.rs:2688:17:2688:21 | vals7 | A | {EXTERNAL LOCATION} | Global | +| main.rs:2688:25:2688:34 | ...::new(...) | | {EXTERNAL LOCATION} | Vec | +| main.rs:2688:25:2688:34 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | +| main.rs:2689:9:2689:13 | vals7 | | {EXTERNAL LOCATION} | Vec | +| main.rs:2689:9:2689:13 | vals7 | A | {EXTERNAL LOCATION} | Global | +| main.rs:2689:20:2689:22 | 1u8 | | {EXTERNAL LOCATION} | u8 | +| main.rs:2690:9:2690:25 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2690:18:2690:22 | vals7 | | {EXTERNAL LOCATION} | Vec | +| main.rs:2690:18:2690:22 | vals7 | A | {EXTERNAL LOCATION} | Global | +| main.rs:2690:24:2690:25 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2694:17:2697:9 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2695:13:2696:13 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2695:29:2696:13 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2699:17:2699:20 | map1 | | {EXTERNAL LOCATION} | HashMap | +| main.rs:2699:17:2699:20 | map1 | S | {EXTERNAL LOCATION} | RandomState | +| main.rs:2699:24:2699:55 | ...::new(...) | | {EXTERNAL LOCATION} | HashMap | +| main.rs:2699:24:2699:55 | ...::new(...) | S | {EXTERNAL LOCATION} | RandomState | +| main.rs:2700:9:2700:12 | map1 | | {EXTERNAL LOCATION} | HashMap | +| main.rs:2700:9:2700:12 | map1 | S | {EXTERNAL LOCATION} | RandomState | +| main.rs:2700:24:2700:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box | +| main.rs:2700:24:2700:38 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | +| main.rs:2700:33:2700:37 | "one" | | {EXTERNAL LOCATION} | & | +| main.rs:2700:33:2700:37 | "one" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2701:9:2701:12 | map1 | | {EXTERNAL LOCATION} | HashMap | +| main.rs:2701:9:2701:12 | map1 | S | {EXTERNAL LOCATION} | RandomState | +| main.rs:2701:24:2701:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box | +| main.rs:2701:24:2701:38 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | +| main.rs:2701:33:2701:37 | "two" | | {EXTERNAL LOCATION} | & | +| main.rs:2701:33:2701:37 | "two" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2702:9:2702:33 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2702:20:2702:23 | map1 | | {EXTERNAL LOCATION} | HashMap | +| main.rs:2702:20:2702:23 | map1 | S | {EXTERNAL LOCATION} | RandomState | +| main.rs:2702:32:2702:33 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2703:9:2703:37 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2703:22:2703:25 | map1 | | {EXTERNAL LOCATION} | HashMap | +| main.rs:2703:22:2703:25 | map1 | S | {EXTERNAL LOCATION} | RandomState | +| main.rs:2703:36:2703:37 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2704:9:2704:42 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2704:13:2704:24 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2704:29:2704:32 | map1 | | {EXTERNAL LOCATION} | HashMap | +| main.rs:2704:29:2704:32 | map1 | S | {EXTERNAL LOCATION} | RandomState | +| main.rs:2704:41:2704:42 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2705:9:2705:36 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2705:13:2705:24 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2705:29:2705:33 | &map1 | | {EXTERNAL LOCATION} | & | +| main.rs:2705:30:2705:33 | map1 | | {EXTERNAL LOCATION} | HashMap | +| main.rs:2705:30:2705:33 | map1 | S | {EXTERNAL LOCATION} | RandomState | +| main.rs:2705:35:2705:36 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2709:17:2709:17 | a | | {EXTERNAL LOCATION} | i64 | +| main.rs:2711:17:2714:9 | while ... { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2711:23:2711:23 | a | | {EXTERNAL LOCATION} | i64 | +| main.rs:2712:9:2714:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2713:13:2713:13 | a | | {EXTERNAL LOCATION} | i64 | +| main.rs:2725:40:2727:9 | { ... } | | {EXTERNAL LOCATION} | Option | +| main.rs:2725:40:2727:9 | { ... } | T | main.rs:2719:5:2719:20 | S1 | +| main.rs:2725:40:2727:9 | { ... } | T.T | main.rs:2724:10:2724:19 | T | +| main.rs:2729:30:2731:9 | { ... } | | main.rs:2719:5:2719:20 | S1 | +| main.rs:2729:30:2731:9 | { ... } | T | main.rs:2724:10:2724:19 | T | +| main.rs:2733:19:2733:22 | SelfParam | | main.rs:2719:5:2719:20 | S1 | +| main.rs:2733:19:2733:22 | SelfParam | T | main.rs:2724:10:2724:19 | T | +| main.rs:2733:33:2735:9 | { ... } | | main.rs:2719:5:2719:20 | S1 | +| main.rs:2733:33:2735:9 | { ... } | T | main.rs:2724:10:2724:19 | T | +| main.rs:2734:13:2734:16 | self | | main.rs:2719:5:2719:20 | S1 | +| main.rs:2734:13:2734:16 | self | T | main.rs:2724:10:2724:19 | T | +| main.rs:2746:15:2746:15 | x | | main.rs:2746:12:2746:12 | T | +| main.rs:2746:26:2748:5 | { ... } | | main.rs:2746:12:2746:12 | T | +| main.rs:2747:9:2747:9 | x | | main.rs:2746:12:2746:12 | T | +| main.rs:2750:16:2772:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2751:13:2751:14 | x1 | | {EXTERNAL LOCATION} | Option | +| main.rs:2751:13:2751:14 | x1 | T | main.rs:2719:5:2719:20 | S1 | +| main.rs:2751:13:2751:14 | x1 | T.T | main.rs:2721:5:2722:14 | S2 | +| main.rs:2751:34:2751:48 | ...::assoc_fun(...) | | {EXTERNAL LOCATION} | Option | +| main.rs:2751:34:2751:48 | ...::assoc_fun(...) | T | main.rs:2719:5:2719:20 | S1 | +| main.rs:2752:13:2752:14 | x2 | | {EXTERNAL LOCATION} | Option | +| main.rs:2752:13:2752:14 | x2 | T | main.rs:2719:5:2719:20 | S1 | +| main.rs:2752:13:2752:14 | x2 | T.T | main.rs:2721:5:2722:14 | S2 | +| main.rs:2752:18:2752:38 | ...::assoc_fun(...) | | {EXTERNAL LOCATION} | Option | +| main.rs:2752:18:2752:38 | ...::assoc_fun(...) | T | main.rs:2719:5:2719:20 | S1 | +| main.rs:2752:18:2752:38 | ...::assoc_fun(...) | T.T | main.rs:2721:5:2722:14 | S2 | +| main.rs:2753:13:2753:14 | x3 | | {EXTERNAL LOCATION} | Option | +| main.rs:2753:13:2753:14 | x3 | T | main.rs:2719:5:2719:20 | S1 | +| main.rs:2753:13:2753:14 | x3 | T.T | main.rs:2721:5:2722:14 | S2 | +| main.rs:2753:18:2753:32 | ...::assoc_fun(...) | | {EXTERNAL LOCATION} | Option | +| main.rs:2753:18:2753:32 | ...::assoc_fun(...) | T | main.rs:2719:5:2719:20 | S1 | +| main.rs:2753:18:2753:32 | ...::assoc_fun(...) | T.T | main.rs:2721:5:2722:14 | S2 | +| main.rs:2754:13:2754:14 | x4 | | main.rs:2719:5:2719:20 | S1 | +| main.rs:2754:13:2754:14 | x4 | T | main.rs:2721:5:2722:14 | S2 | +| main.rs:2754:18:2754:48 | ...::method(...) | | main.rs:2719:5:2719:20 | S1 | +| main.rs:2754:18:2754:48 | ...::method(...) | T | main.rs:2721:5:2722:14 | S2 | +| main.rs:2754:35:2754:47 | ...::default(...) | | main.rs:2719:5:2719:20 | S1 | +| main.rs:2755:13:2755:14 | x5 | | main.rs:2719:5:2719:20 | S1 | +| main.rs:2755:13:2755:14 | x5 | T | main.rs:2721:5:2722:14 | S2 | +| main.rs:2755:18:2755:42 | ...::method(...) | | main.rs:2719:5:2719:20 | S1 | +| main.rs:2755:18:2755:42 | ...::method(...) | T | main.rs:2721:5:2722:14 | S2 | +| main.rs:2755:29:2755:41 | ...::default(...) | | main.rs:2719:5:2719:20 | S1 | +| main.rs:2759:21:2759:33 | ...::default(...) | | main.rs:2721:5:2722:14 | S2 | +| main.rs:2760:13:2760:15 | x10 | | main.rs:2742:5:2744:5 | S5 | +| main.rs:2760:13:2760:15 | x10 | T5 | main.rs:2721:5:2722:14 | S2 | +| main.rs:2760:19:2763:9 | S5::<...> {...} | | main.rs:2742:5:2744:5 | S5 | +| main.rs:2760:19:2763:9 | S5::<...> {...} | T5 | main.rs:2721:5:2722:14 | S2 | +| main.rs:2764:13:2764:15 | x11 | | main.rs:2742:5:2744:5 | S5 | +| main.rs:2764:19:2764:34 | S5 {...} | | main.rs:2742:5:2744:5 | S5 | +| main.rs:2765:13:2765:15 | x12 | | main.rs:2742:5:2744:5 | S5 | +| main.rs:2765:19:2765:33 | S5 {...} | | main.rs:2742:5:2744:5 | S5 | +| main.rs:2766:13:2766:15 | x13 | | main.rs:2742:5:2744:5 | S5 | +| main.rs:2766:19:2769:9 | S5 {...} | | main.rs:2742:5:2744:5 | S5 | +| main.rs:2768:20:2768:32 | ...::default(...) | | main.rs:2721:5:2722:14 | S2 | +| main.rs:2770:13:2770:15 | x14 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2770:19:2770:48 | foo::<...>(...) | | {EXTERNAL LOCATION} | i32 | +| main.rs:2771:13:2771:15 | x15 | | main.rs:2719:5:2719:20 | S1 | +| main.rs:2771:13:2771:15 | x15 | T | main.rs:2721:5:2722:14 | S2 | +| main.rs:2771:19:2771:37 | ...::default(...) | | main.rs:2719:5:2719:20 | S1 | +| main.rs:2771:19:2771:37 | ...::default(...) | T | main.rs:2721:5:2722:14 | S2 | +| main.rs:2780:35:2782:9 | { ... } | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2780:35:2782:9 | { ... } | T0 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2780:35:2782:9 | { ... } | T1 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2781:13:2781:26 | TupleExpr | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2781:14:2781:18 | S1 {...} | | main.rs:2776:5:2777:16 | S1 | +| main.rs:2781:21:2781:25 | S1 {...} | | main.rs:2776:5:2777:16 | S1 | +| main.rs:2783:16:2783:19 | SelfParam | | main.rs:2776:5:2777:16 | S1 | +| main.rs:2783:22:2783:23 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2786:16:2820:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2787:13:2787:13 | a | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2787:13:2787:13 | a | T0 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2787:13:2787:13 | a | T1 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2787:17:2787:30 | ...::get_pair(...) | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2787:17:2787:30 | ...::get_pair(...) | T0 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2787:17:2787:30 | ...::get_pair(...) | T1 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2788:17:2788:17 | b | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2788:17:2788:17 | b | T0 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2788:17:2788:17 | b | T1 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2788:21:2788:34 | ...::get_pair(...) | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2788:21:2788:34 | ...::get_pair(...) | T0 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2788:21:2788:34 | ...::get_pair(...) | T1 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2789:13:2789:18 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2789:22:2789:35 | ...::get_pair(...) | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2789:22:2789:35 | ...::get_pair(...) | T0 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2789:22:2789:35 | ...::get_pair(...) | T1 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2790:13:2790:22 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2790:26:2790:39 | ...::get_pair(...) | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2790:26:2790:39 | ...::get_pair(...) | T0 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2790:26:2790:39 | ...::get_pair(...) | T1 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2791:13:2791:26 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2791:30:2791:43 | ...::get_pair(...) | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2791:30:2791:43 | ...::get_pair(...) | T0 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2791:30:2791:43 | ...::get_pair(...) | T1 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2793:9:2793:9 | a | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2793:9:2793:9 | a | T0 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2793:9:2793:9 | a | T1 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2794:9:2794:9 | b | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2794:9:2794:9 | b | T0 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2794:9:2794:9 | b | T1 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2807:13:2807:16 | pair | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2807:20:2807:25 | TupleExpr | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2808:13:2808:13 | i | | {EXTERNAL LOCATION} | i64 | +| main.rs:2808:22:2808:25 | pair | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2809:13:2809:13 | j | | {EXTERNAL LOCATION} | bool | +| main.rs:2809:23:2809:26 | pair | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2811:20:2811:25 | [...] | | {EXTERNAL LOCATION} | [;] | +| main.rs:2813:13:2813:18 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2813:30:2813:41 | "unexpected" | | {EXTERNAL LOCATION} | & | +| main.rs:2813:30:2813:41 | "unexpected" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2813:30:2813:41 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:2813:30:2813:41 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2814:25:2814:34 | "expected" | | {EXTERNAL LOCATION} | & | +| main.rs:2814:25:2814:34 | "expected" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2814:25:2814:34 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:2814:25:2814:34 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2818:13:2818:13 | y | | {EXTERNAL LOCATION} | & | +| main.rs:2818:17:2818:31 | &... | | {EXTERNAL LOCATION} | & | +| main.rs:2818:18:2818:31 | ...::get_pair(...) | | {EXTERNAL LOCATION} | (T_2) | +| main.rs:2818:18:2818:31 | ...::get_pair(...) | T0 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2818:18:2818:31 | ...::get_pair(...) | T1 | main.rs:2776:5:2777:16 | S1 | +| main.rs:2819:9:2819:9 | y | | {EXTERNAL LOCATION} | & | +| main.rs:2825:27:2847:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2826:13:2826:23 | boxed_value | | {EXTERNAL LOCATION} | Box | +| main.rs:2826:13:2826:23 | boxed_value | A | {EXTERNAL LOCATION} | Global | +| main.rs:2826:27:2826:42 | ...::new(...) | | {EXTERNAL LOCATION} | Box | +| main.rs:2826:27:2826:42 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | +| main.rs:2826:36:2826:41 | 100i32 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2829:15:2829:25 | boxed_value | | {EXTERNAL LOCATION} | Box | +| main.rs:2829:15:2829:25 | boxed_value | A | {EXTERNAL LOCATION} | Global | +| main.rs:2830:24:2832:13 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2831:26:2831:36 | "Boxed 100\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:2831:26:2831:36 | "Boxed 100\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2831:26:2831:36 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:2831:26:2831:36 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2833:22:2836:13 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2835:26:2835:42 | "Boxed value: {}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:2835:26:2835:42 | "Boxed value: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2835:26:2835:51 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:2835:26:2835:51 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2840:13:2840:22 | nested_box | | {EXTERNAL LOCATION} | Box | +| main.rs:2840:13:2840:22 | nested_box | A | {EXTERNAL LOCATION} | Global | +| main.rs:2840:26:2840:50 | ...::new(...) | | {EXTERNAL LOCATION} | Box | +| main.rs:2840:26:2840:50 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | +| main.rs:2840:35:2840:49 | ...::new(...) | | {EXTERNAL LOCATION} | Box | +| main.rs:2840:35:2840:49 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | +| main.rs:2840:44:2840:48 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2841:15:2841:24 | nested_box | | {EXTERNAL LOCATION} | Box | +| main.rs:2841:15:2841:24 | nested_box | A | {EXTERNAL LOCATION} | Global | +| main.rs:2842:26:2845:13 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2844:26:2844:43 | "Nested boxed: {}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:2844:26:2844:43 | "Nested boxed: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2844:26:2844:59 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:2844:26:2844:59 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2856:36:2858:9 | { ... } | | main.rs:2853:5:2853:22 | Path | +| main.rs:2857:13:2857:19 | Path {...} | | main.rs:2853:5:2853:22 | Path | +| main.rs:2860:29:2860:33 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2860:29:2860:33 | SelfParam | TRef | main.rs:2853:5:2853:22 | Path | +| main.rs:2860:59:2862:9 | { ... } | | {EXTERNAL LOCATION} | Result | +| main.rs:2860:59:2862:9 | { ... } | E | {EXTERNAL LOCATION} | () | +| main.rs:2860:59:2862:9 | { ... } | T | main.rs:2865:5:2865:25 | PathBuf | +| main.rs:2861:16:2861:29 | ...::new(...) | | main.rs:2865:5:2865:25 | PathBuf | +| main.rs:2868:39:2870:9 | { ... } | | main.rs:2865:5:2865:25 | PathBuf | +| main.rs:2869:13:2869:22 | PathBuf {...} | | main.rs:2865:5:2865:25 | PathBuf | +| main.rs:2878:18:2878:22 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2878:18:2878:22 | SelfParam | TRef | main.rs:2865:5:2865:25 | PathBuf | +| main.rs:2878:34:2882:9 | { ... } | | {EXTERNAL LOCATION} | & | +| main.rs:2878:34:2882:9 | { ... } | TRef | main.rs:2853:5:2853:22 | Path | +| main.rs:2880:33:2880:43 | ...::new(...) | | main.rs:2853:5:2853:22 | Path | +| main.rs:2881:13:2881:17 | &path | | {EXTERNAL LOCATION} | & | +| main.rs:2885:16:2893:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2886:13:2886:17 | path1 | | main.rs:2853:5:2853:22 | Path | +| main.rs:2886:21:2886:31 | ...::new(...) | | main.rs:2853:5:2853:22 | Path | +| main.rs:2887:21:2887:25 | path1 | | main.rs:2853:5:2853:22 | Path | +| main.rs:2890:13:2890:20 | pathbuf1 | | main.rs:2865:5:2865:25 | PathBuf | +| main.rs:2890:24:2890:37 | ...::new(...) | | main.rs:2865:5:2865:25 | PathBuf | +| main.rs:2891:24:2891:31 | pathbuf1 | | main.rs:2865:5:2865:25 | PathBuf | +| main.rs:2898:14:2898:18 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2898:14:2898:18 | SelfParam | TRef | main.rs:2897:5:2899:5 | Self [trait MyTrait] | +| main.rs:2905:14:2905:18 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2905:14:2905:18 | SelfParam | TRef | main.rs:2901:5:2902:19 | S | +| main.rs:2905:14:2905:18 | SelfParam | TRef.T | {EXTERNAL LOCATION} | i32 | +| main.rs:2905:28:2907:9 | { ... } | | {EXTERNAL LOCATION} | i32 | +| main.rs:2906:13:2906:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2906:13:2906:16 | self | TRef | main.rs:2901:5:2902:19 | S | +| main.rs:2906:13:2906:16 | self | TRef.T | {EXTERNAL LOCATION} | i32 | +| main.rs:2911:14:2911:18 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2911:14:2911:18 | SelfParam | TRef | main.rs:2901:5:2902:19 | S | +| main.rs:2911:14:2911:18 | SelfParam | TRef.T | main.rs:2901:5:2902:19 | S | +| main.rs:2911:14:2911:18 | SelfParam | TRef.T.T | {EXTERNAL LOCATION} | i32 | +| main.rs:2911:28:2913:9 | { ... } | | {EXTERNAL LOCATION} | i32 | +| main.rs:2912:13:2912:16 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2912:13:2912:16 | self | TRef | main.rs:2901:5:2902:19 | S | +| main.rs:2912:13:2912:16 | self | TRef.T | main.rs:2901:5:2902:19 | S | +| main.rs:2912:13:2912:16 | self | TRef.T.T | {EXTERNAL LOCATION} | i32 | +| main.rs:2917:15:2917:19 | SelfParam | | {EXTERNAL LOCATION} | & | +| main.rs:2917:15:2917:19 | SelfParam | TRef | main.rs:2901:5:2902:19 | S | +| main.rs:2917:15:2917:19 | SelfParam | TRef.T | main.rs:2916:10:2916:16 | T | +| main.rs:2917:33:2919:9 | { ... } | | main.rs:2901:5:2902:19 | S | +| main.rs:2917:33:2919:9 | { ... } | T | main.rs:2901:5:2902:19 | S | +| main.rs:2917:33:2919:9 | { ... } | T.T | main.rs:2916:10:2916:16 | T | +| main.rs:2918:17:2918:20 | self | | {EXTERNAL LOCATION} | & | +| main.rs:2918:17:2918:20 | self | TRef | main.rs:2901:5:2902:19 | S | +| main.rs:2918:17:2918:20 | self | TRef.T | main.rs:2916:10:2916:16 | T | +| main.rs:2922:14:2922:14 | b | | {EXTERNAL LOCATION} | bool | +| main.rs:2922:48:2939:5 | { ... } | | {EXTERNAL LOCATION} | Box | +| main.rs:2922:48:2939:5 | { ... } | A | {EXTERNAL LOCATION} | Global | +| main.rs:2922:48:2939:5 | { ... } | T | main.rs:2897:5:2899:5 | dyn MyTrait | +| main.rs:2922:48:2939:5 | { ... } | T.dyn(T) | {EXTERNAL LOCATION} | i32 | +| main.rs:2923:20:2923:20 | b | | {EXTERNAL LOCATION} | bool | +| main.rs:2933:12:2933:12 | b | | {EXTERNAL LOCATION} | bool | +| main.rs:2935:13:2935:23 | ...::new(...) | | {EXTERNAL LOCATION} | Box | +| main.rs:2935:13:2935:23 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | +| main.rs:2937:13:2937:23 | ...::new(...) | | {EXTERNAL LOCATION} | Box | +| main.rs:2937:13:2937:23 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | +| main.rs:2943:22:2947:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2944:18:2944:18 | x | | {EXTERNAL LOCATION} | i32 | +| main.rs:2944:33:2946:9 | { ... } | | {EXTERNAL LOCATION} | i32 | +| main.rs:2945:13:2945:13 | x | | {EXTERNAL LOCATION} | i32 | +| main.rs:2952:11:2952:14 | cond | | {EXTERNAL LOCATION} | bool | +| main.rs:2952:30:2960:5 | { ... } | | {EXTERNAL LOCATION} | i32 | +| main.rs:2955:13:2957:13 | if cond {...} | | {EXTERNAL LOCATION} | () | +| main.rs:2955:16:2955:19 | cond | | {EXTERNAL LOCATION} | bool | +| main.rs:2955:21:2957:13 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2963:20:2970:5 | { ... } | | {EXTERNAL LOCATION} | i32 | +| main.rs:2968:18:2968:26 | "b: {:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:2968:18:2968:26 | "b: {:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2968:18:2968:29 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:2968:18:2968:29 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2972:20:2974:5 | { ... } | | {EXTERNAL LOCATION} | i32 | +| main.rs:2977:11:2977:14 | cond | | {EXTERNAL LOCATION} | bool | +| main.rs:2977:30:2985:5 | { ... } | | {EXTERNAL LOCATION} | i32 | +| main.rs:2978:13:2978:13 | a | | {EXTERNAL LOCATION} | () | +| main.rs:2978:17:2982:9 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2979:13:2981:13 | if cond {...} | | {EXTERNAL LOCATION} | () | +| main.rs:2979:16:2979:19 | cond | | {EXTERNAL LOCATION} | bool | +| main.rs:2979:21:2981:13 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2983:18:2983:26 | "a: {:?}\\n" | | {EXTERNAL LOCATION} | & | +| main.rs:2983:18:2983:26 | "a: {:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| main.rs:2983:18:2983:29 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| main.rs:2983:18:2983:29 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2983:29:2983:29 | a | | {EXTERNAL LOCATION} | () | +| main.rs:2989:16:3036:5 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2991:13:2991:13 | x | | {EXTERNAL LOCATION} | Option | +| main.rs:2991:13:2991:13 | x | T | {EXTERNAL LOCATION} | i32 | +| main.rs:2995:26:2995:28 | opt | | {EXTERNAL LOCATION} | Option | +| main.rs:2995:26:2995:28 | opt | T | main.rs:2995:23:2995:23 | T | +| main.rs:2995:42:2995:42 | x | | main.rs:2995:23:2995:23 | T | +| main.rs:2995:48:2995:49 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:2998:9:2998:24 | pin_option(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3005:13:3005:13 | x | | main.rs:3000:9:3003:9 | MyEither | +| main.rs:3005:17:3005:39 | ...::A {...} | | main.rs:3000:9:3003:9 | MyEither | +| main.rs:3006:13:3006:13 | x | | main.rs:3000:9:3003:9 | MyEither | +| main.rs:3006:13:3006:13 | x | T1 | {EXTERNAL LOCATION} | i32 | +| main.rs:3006:13:3006:13 | x | T2 | {EXTERNAL LOCATION} | String | +| main.rs:3006:40:3006:40 | x | | main.rs:3000:9:3003:9 | MyEither | +| main.rs:3007:13:3007:13 | x | | main.rs:3000:9:3003:9 | MyEither | +| main.rs:3007:13:3007:13 | x | T2 | {EXTERNAL LOCATION} | String | +| main.rs:3007:17:3007:52 | ...::A {...} | | main.rs:3000:9:3003:9 | MyEither | +| main.rs:3007:17:3007:52 | ...::A {...} | T2 | {EXTERNAL LOCATION} | String | +| main.rs:3009:13:3009:13 | x | | main.rs:3000:9:3003:9 | MyEither | +| main.rs:3009:13:3009:13 | x | T1 | {EXTERNAL LOCATION} | i32 | +| main.rs:3009:17:3011:9 | ...::B::<...> {...} | | main.rs:3000:9:3003:9 | MyEither | +| main.rs:3009:17:3011:9 | ...::B::<...> {...} | T1 | {EXTERNAL LOCATION} | i32 | +| main.rs:3010:20:3010:32 | ...::new(...) | | {EXTERNAL LOCATION} | String | +| main.rs:3013:29:3013:29 | e | | main.rs:3000:9:3003:9 | MyEither | +| main.rs:3013:29:3013:29 | e | T1 | main.rs:3013:26:3013:26 | T | +| main.rs:3013:29:3013:29 | e | T2 | {EXTERNAL LOCATION} | String | +| main.rs:3013:53:3013:53 | x | | main.rs:3013:26:3013:26 | T | +| main.rs:3013:59:3013:60 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:3016:13:3016:13 | x | | main.rs:3000:9:3003:9 | MyEither | +| main.rs:3016:17:3018:9 | ...::B {...} | | main.rs:3000:9:3003:9 | MyEither | +| main.rs:3017:20:3017:32 | ...::new(...) | | {EXTERNAL LOCATION} | String | +| main.rs:3019:9:3019:27 | pin_my_either(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3019:23:3019:23 | x | | main.rs:3000:9:3003:9 | MyEither | +| main.rs:3022:13:3022:13 | x | | {EXTERNAL LOCATION} | Result | +| main.rs:3022:13:3022:13 | x | E | {EXTERNAL LOCATION} | String | +| main.rs:3022:13:3022:13 | x | T | {EXTERNAL LOCATION} | i32 | +| main.rs:3026:29:3026:31 | res | | {EXTERNAL LOCATION} | Result | +| main.rs:3026:29:3026:31 | res | E | main.rs:3026:26:3026:26 | E | +| main.rs:3026:29:3026:31 | res | T | main.rs:3026:23:3026:23 | T | +| main.rs:3026:48:3026:48 | x | | main.rs:3026:26:3026:26 | E | +| main.rs:3026:54:3026:55 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:3029:9:3029:28 | pin_result(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3029:23:3029:27 | false | | {EXTERNAL LOCATION} | bool | +| main.rs:3031:17:3031:17 | x | | {EXTERNAL LOCATION} | Vec | +| main.rs:3031:17:3031:17 | x | A | {EXTERNAL LOCATION} | Global | +| main.rs:3031:21:3031:30 | ...::new(...) | | {EXTERNAL LOCATION} | Vec | +| main.rs:3031:21:3031:30 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | +| main.rs:3032:9:3032:9 | x | | {EXTERNAL LOCATION} | Vec | +| main.rs:3032:9:3032:9 | x | A | {EXTERNAL LOCATION} | Global | +| main.rs:3035:9:3035:9 | x | | {EXTERNAL LOCATION} | Vec | +| main.rs:3035:9:3035:9 | x | A | {EXTERNAL LOCATION} | Global | +| main.rs:3044:11:3079:1 | { ... } | | {EXTERNAL LOCATION} | () | +| main.rs:3045:5:3045:21 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3046:5:3046:20 | ...::f(...) | | main.rs:72:5:72:21 | Foo | +| main.rs:3047:5:3047:60 | ...::g(...) | | main.rs:72:5:72:21 | Foo | +| main.rs:3047:20:3047:38 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo | +| main.rs:3047:41:3047:59 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo | +| main.rs:3048:5:3048:35 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3049:5:3049:41 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3050:5:3050:45 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3051:5:3051:30 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3052:5:3052:33 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3053:5:3053:21 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3054:5:3054:27 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3055:5:3055:32 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3056:5:3056:23 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3057:5:3057:36 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3058:5:3058:35 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3059:5:3059:29 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3060:5:3060:23 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3061:5:3061:24 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3062:5:3062:17 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3063:5:3063:18 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3064:5:3064:15 | ...::f(...) | | {EXTERNAL LOCATION} | dyn Future | +| main.rs:3064:5:3064:15 | ...::f(...) | dyn(Output) | {EXTERNAL LOCATION} | () | +| main.rs:3065:5:3065:19 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3066:5:3066:17 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3067:5:3067:14 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3068:5:3068:27 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3069:5:3069:15 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3070:5:3070:43 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3071:5:3071:15 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3072:5:3072:17 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3073:5:3073:23 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3074:5:3074:41 | ...::test_all_patterns(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3075:5:3075:49 | ...::box_patterns(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3076:5:3076:20 | ...::test(...) | | {EXTERNAL LOCATION} | () | +| main.rs:3077:5:3077:20 | ...::f(...) | | {EXTERNAL LOCATION} | Box | +| main.rs:3077:5:3077:20 | ...::f(...) | A | {EXTERNAL LOCATION} | Global | +| main.rs:3077:5:3077:20 | ...::f(...) | T | main.rs:2897:5:2899:5 | dyn MyTrait | +| main.rs:3077:5:3077:20 | ...::f(...) | T.dyn(T) | {EXTERNAL LOCATION} | i32 | +| main.rs:3077:16:3077:19 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:3078:5:3078:23 | ...::f(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:13:26:133:1 | { ... } | | {EXTERNAL LOCATION} | Option | +| pattern_matching.rs:13:26:133:1 | { ... } | T | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:15:5:18:5 | if ... {...} | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:15:31:18:5 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:17:18:17:25 | "{mesg}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:17:18:17:25 | "{mesg}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:17:18:17:25 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:17:18:17:25 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:20:23:23:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:22:22:22:29 | "{mesg}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:22:22:22:29 | "{mesg}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:22:22:22:29 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:22:22:22:29 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:24:17:24:18 | TupleExpr | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:28:14:28:21 | "{mesg}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:28:14:28:21 | "{mesg}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:28:14:28:21 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:28:14:28:21 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:30:14:30:21 | "{mesg}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:30:14:30:21 | "{mesg}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:30:14:30:21 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:30:14:30:21 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:32:9:32:14 | value2 | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:32:18:32:26 | &... | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:33:5:36:5 | if ... {...} | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:33:12:33:22 | &... | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:33:26:33:31 | value2 | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:33:33:36:5 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:35:18:35:25 | "{mesg}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:35:18:35:25 | "{mesg}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:35:18:35:25 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:35:18:35:25 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:39:5:42:5 | if ... {...} | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:39:16:39:19 | mesg | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:39:30:42:5 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:40:13:40:16 | mesg | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:40:20:40:23 | mesg | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:41:18:41:25 | "{mesg}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:41:18:41:25 | "{mesg}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:41:18:41:25 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:41:18:41:25 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:41:20:41:23 | mesg | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:45:5:48:5 | if ... {...} | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:45:21:45:24 | mesg | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:45:36:48:5 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:46:13:46:16 | mesg | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:46:20:46:23 | mesg | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:47:18:47:25 | "{mesg}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:47:18:47:25 | "{mesg}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:47:18:47:25 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:47:18:47:25 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:47:20:47:23 | mesg | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:50:13:50:18 | value5 | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:51:9:51:9 | x | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:51:13:51:18 | value5 | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:53:9:53:24 | my_record_struct | | pattern_matching.rs:1:1:4:1 | MyRecordStruct | +| pattern_matching.rs:53:28:56:5 | MyRecordStruct {...} | | pattern_matching.rs:1:1:4:1 | MyRecordStruct | +| pattern_matching.rs:55:17:55:21 | false | | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:57:5:61:5 | if ... {...} | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:57:12:57:44 | MyRecordStruct {...} | | pattern_matching.rs:1:1:4:1 | MyRecordStruct | +| pattern_matching.rs:57:48:57:63 | my_record_struct | | pattern_matching.rs:1:1:4:1 | MyRecordStruct | +| pattern_matching.rs:57:65:61:5 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:60:9:60:10 | TupleExpr | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:63:45:63:49 | false | | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:64:5:68:5 | if ... {...} | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:64:60:68:5 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:67:9:67:10 | TupleExpr | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:70:9:70:16 | my_enum1 | | pattern_matching.rs:8:1:11:1 | MyEnum | +| pattern_matching.rs:70:20:73:5 | ...::Variant1 {...} | | pattern_matching.rs:8:1:11:1 | MyEnum | +| pattern_matching.rs:72:17:72:21 | false | | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:74:11:74:18 | my_enum1 | | pattern_matching.rs:8:1:11:1 | MyEnum | +| pattern_matching.rs:75:9:75:43 | ...::Variant1 {...} | | pattern_matching.rs:8:1:11:1 | MyEnum | +| pattern_matching.rs:75:48:79:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:78:13:78:14 | TupleExpr | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:80:45:84:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:83:13:83:14 | TupleExpr | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:88:9:88:13 | false | | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:89:9:92:9 | MyRecordStruct {...} | | pattern_matching.rs:1:1:4:1 | MyRecordStruct | +| pattern_matching.rs:91:21:91:28 | "string" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:91:21:91:28 | "string" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:98:13:101:13 | MyRecordStruct {...} | | pattern_matching.rs:1:1:4:1 | MyRecordStruct | +| pattern_matching.rs:102:14:107:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:106:13:106:14 | TupleExpr | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:108:14:108:15 | TupleExpr | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:113:13:116:5 | if ... {...} | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:114:5:116:5 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:120:13:123:5 | if ... {...} | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:121:5:123:5 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:127:13:130:5 | if ... {...} | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:128:5:130:5 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:168:27:217:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:169:9:169:13 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:169:17:169:21 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:171:11:171:15 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:173:15:176:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:174:17:174:29 | literal_match | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:174:33:174:37 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:175:22:175:42 | "Literal pattern: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:175:22:175:42 | "Literal pattern: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:175:22:175:57 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:175:22:175:57 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:175:45:175:57 | literal_match | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:177:15:180:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:178:17:178:32 | negative_literal | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:178:36:178:40 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:179:22:179:43 | "Negative literal: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:179:22:179:43 | "Negative literal: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:179:22:179:61 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:179:22:179:61 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:179:46:179:61 | negative_literal | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:181:14:184:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:182:17:182:28 | zero_literal | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:182:32:182:36 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:183:22:183:39 | "Zero literal: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:183:22:183:39 | "Zero literal: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:183:22:183:53 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:183:22:183:53 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:183:42:183:53 | zero_literal | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:185:14:185:15 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:188:9:188:17 | float_val | | {EXTERNAL LOCATION} | f64 | +| pattern_matching.rs:188:21:188:27 | 3.14f64 | | {EXTERNAL LOCATION} | f64 | +| pattern_matching.rs:189:11:189:19 | float_val | | {EXTERNAL LOCATION} | f64 | +| pattern_matching.rs:190:17:193:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:191:17:191:24 | pi_match | | {EXTERNAL LOCATION} | f64 | +| pattern_matching.rs:191:28:191:36 | float_val | | {EXTERNAL LOCATION} | f64 | +| pattern_matching.rs:192:22:192:37 | "Pi matched: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:192:22:192:37 | "Pi matched: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:192:22:192:47 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:192:22:192:47 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:192:40:192:47 | pi_match | | {EXTERNAL LOCATION} | f64 | +| pattern_matching.rs:194:14:194:15 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:197:9:197:18 | string_val | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:197:9:197:18 | string_val | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:197:22:197:28 | "hello" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:197:22:197:28 | "hello" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:198:11:198:20 | string_val | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:198:11:198:20 | string_val | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:199:9:199:15 | "hello" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:199:9:199:15 | "hello" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:199:20:202:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:200:17:200:27 | hello_match | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:200:17:200:27 | hello_match | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:200:31:200:40 | string_val | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:200:31:200:40 | string_val | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:201:22:201:41 | "String literal: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:201:22:201:41 | "String literal: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:201:22:201:54 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:201:22:201:54 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:201:44:201:54 | hello_match | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:201:44:201:54 | hello_match | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:203:14:203:15 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:206:9:206:16 | bool_val | | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:206:20:206:23 | true | | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:207:11:207:18 | bool_val | | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:208:9:208:12 | true | | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:208:17:211:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:209:17:209:26 | true_match | | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:209:30:209:37 | bool_val | | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:210:22:210:39 | "True literal: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:210:22:210:39 | "True literal: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:210:22:210:51 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:210:22:210:51 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:210:42:210:51 | true_match | | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:212:9:212:13 | false | | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:212:18:215:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:213:17:213:27 | false_match | | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:213:31:213:38 | bool_val | | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:214:22:214:40 | "False literal: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:214:22:214:40 | "False literal: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:214:22:214:53 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:214:22:214:53 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:214:43:214:53 | false_match | | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:219:30:277:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:220:9:220:13 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:220:17:220:21 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:223:11:223:15 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:224:14:227:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:226:22:226:45 | "Identifier pattern: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:226:22:226:45 | "Identifier pattern: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:226:22:226:58 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:226:22:226:58 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:231:11:231:16 | &value | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:231:12:231:16 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:232:13:232:13 | x | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:232:18:235:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:233:17:233:25 | ref_bound | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:233:29:233:29 | x | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:234:22:234:49 | "Reference identifier: {:?}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:234:22:234:49 | "Reference identifier: {:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:234:22:234:60 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:234:22:234:60 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:234:52:234:60 | ref_bound | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:239:13:239:25 | mutable_value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:239:29:239:33 | 10i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:240:11:240:23 | mutable_value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:241:18:245:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:244:22:244:45 | "Mutable identifier: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:244:22:244:45 | "Mutable identifier: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:244:22:244:56 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:244:22:244:56 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:249:39:249:43 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:251:35:254:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:253:22:253:49 | "@ pattern with literal: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:253:22:253:49 | "@ pattern with literal: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:253:22:253:59 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:253:22:253:59 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:255:40:258:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:257:22:257:47 | "@ pattern with range: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:257:22:257:47 | "@ pattern with range: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:257:22:257:63 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:257:22:257:63 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:259:30:262:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:261:22:261:37 | "Some value: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:261:22:261:37 | "Some value: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:261:22:261:49 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:261:22:261:49 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:263:27:265:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:264:22:264:33 | "None value\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:264:22:264:33 | "None value\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:264:22:264:33 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:264:22:264:33 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:269:13:269:23 | ref_mut_val | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:269:27:269:30 | 5i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:270:11:270:26 | &mut ref_mut_val | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:270:16:270:26 | ref_mut_val | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:271:17:271:17 | x | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:271:22:275:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:272:17:272:29 | ref_mut_bound | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:272:33:272:33 | x | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:273:15:273:27 | ref_mut_bound | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:274:22:274:38 | "Ref mut pattern\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:274:22:274:38 | "Ref mut pattern\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:274:22:274:38 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:274:22:274:38 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:279:28:290:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:280:9:280:13 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:280:17:280:21 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:282:11:282:15 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:283:24:283:39 | "Specific match\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:283:24:283:39 | "Specific match\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:283:24:283:39 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:283:24:283:39 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:285:14:288:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:286:17:286:32 | wildcard_context | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:286:36:286:40 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:287:22:287:47 | "Wildcard pattern for: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:287:22:287:47 | "Wildcard pattern for: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:287:22:287:65 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:287:22:287:65 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:287:50:287:65 | wildcard_context | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:292:25:324:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:293:9:293:13 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:293:17:293:21 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:295:11:295:15 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:297:19:300:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:298:17:298:31 | range_inclusive | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:298:35:298:39 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:299:22:299:42 | "Range inclusive: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:299:22:299:42 | "Range inclusive: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:299:22:299:59 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:299:22:299:59 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:299:45:299:59 | range_inclusive | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:301:17:304:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:302:17:302:26 | range_from | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:302:30:302:34 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:303:22:303:40 | "Range from 11: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:303:22:303:40 | "Range from 11: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:303:22:303:52 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:303:22:303:52 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:303:43:303:52 | range_from | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:305:17:308:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:306:17:306:34 | range_to_inclusive | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:306:38:306:42 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:307:22:307:47 | "Range to 0 inclusive: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:307:22:307:47 | "Range to 0 inclusive: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:307:22:307:67 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:307:22:307:67 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:307:50:307:67 | range_to_inclusive | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:309:14:309:15 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:312:9:312:16 | char_val | | {EXTERNAL LOCATION} | char | +| pattern_matching.rs:312:20:312:22 | 'c' | | {EXTERNAL LOCATION} | char | +| pattern_matching.rs:313:11:313:18 | char_val | | {EXTERNAL LOCATION} | char | +| pattern_matching.rs:314:9:314:11 | 'a' | | {EXTERNAL LOCATION} | char | +| pattern_matching.rs:314:15:314:17 | 'z' | | {EXTERNAL LOCATION} | char | +| pattern_matching.rs:314:22:317:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:315:17:315:30 | lowercase_char | | {EXTERNAL LOCATION} | char | +| pattern_matching.rs:315:34:315:41 | char_val | | {EXTERNAL LOCATION} | char | +| pattern_matching.rs:316:22:316:41 | "Lowercase char: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:316:22:316:41 | "Lowercase char: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:316:22:316:57 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:316:22:316:57 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:316:44:316:57 | lowercase_char | | {EXTERNAL LOCATION} | char | +| pattern_matching.rs:318:9:318:11 | 'A' | | {EXTERNAL LOCATION} | char | +| pattern_matching.rs:318:15:318:17 | 'Z' | | {EXTERNAL LOCATION} | char | +| pattern_matching.rs:318:22:321:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:319:17:319:30 | uppercase_char | | {EXTERNAL LOCATION} | char | +| pattern_matching.rs:319:34:319:41 | char_val | | {EXTERNAL LOCATION} | char | +| pattern_matching.rs:320:22:320:41 | "Uppercase char: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:320:22:320:41 | "Uppercase char: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:320:22:320:57 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:320:22:320:57 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:320:44:320:57 | uppercase_char | | {EXTERNAL LOCATION} | char | +| pattern_matching.rs:322:14:322:15 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:326:29:355:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:327:9:327:13 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:327:17:327:21 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:328:13:328:25 | mutable_value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:328:29:328:33 | 10i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:331:11:331:16 | &value | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:331:12:331:16 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:332:9:332:11 | &42 | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:332:16:335:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:333:17:333:27 | deref_match | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:333:31:333:35 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:334:22:334:45 | "Dereferenced match: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:334:22:334:45 | "Dereferenced match: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:334:22:334:58 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:334:22:334:58 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:334:48:334:58 | deref_match | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:336:9:336:10 | &... | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:336:15:339:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:338:22:338:47 | "Dereferenced binding: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:338:22:338:47 | "Dereferenced binding: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:338:22:338:60 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:338:22:338:60 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:342:11:342:28 | &mut mutable_value | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:342:16:342:28 | mutable_value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:343:9:343:18 | &mut ... | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:343:18:343:18 | x | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:343:23:346:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:344:17:344:29 | mut_ref_bound | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:344:33:344:33 | x | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:345:22:345:46 | "Mutable ref pattern: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:345:22:345:46 | "Mutable ref pattern: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:345:22:345:61 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:345:22:345:61 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:345:49:345:61 | mut_ref_bound | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:349:11:349:16 | &value | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:349:12:349:16 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:350:13:350:13 | x | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:350:18:353:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:351:17:351:27 | ref_pattern | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:351:31:351:31 | x | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:352:22:352:44 | "Reference pattern: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:352:22:352:44 | "Reference pattern: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:352:22:352:57 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:352:22:352:57 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:352:47:352:57 | ref_pattern | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:357:26:398:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:358:9:358:13 | point | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:358:17:358:38 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:361:11:361:15 | point | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:362:9:362:28 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:362:33:365:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:363:17:363:22 | origin | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:363:26:363:30 | point | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:364:22:364:41 | "Origin point: {:?}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:364:22:364:41 | "Origin point: {:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:364:22:364:49 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:364:22:364:49 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:364:44:364:49 | origin | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:366:9:366:25 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:366:30:370:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:368:17:368:28 | x_axis_point | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:368:32:368:36 | point | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:369:22:369:56 | "Point on x-axis: x={}, point=... | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:369:22:369:56 | "Point on x-axis: x={}, point=... | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:369:22:369:80 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:369:22:369:80 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:369:69:369:80 | x_axis_point | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:371:9:371:27 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:371:32:374:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:372:17:372:27 | ten_x_point | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:372:31:372:35 | point | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:373:22:373:44 | "Point with x=10: {:?}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:373:22:373:44 | "Point with x=10: {:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:373:22:373:57 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:373:22:373:57 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:373:47:373:57 | ten_x_point | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:375:9:375:22 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:375:27:379:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:378:22:378:46 | "General point: ({}, {})\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:378:22:378:46 | "General point: ({}, {})\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:378:22:378:68 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:378:22:378:68 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:383:9:383:13 | shape | | pattern_matching.rs:145:1:150:1 | Shape | +| pattern_matching.rs:383:17:386:5 | ...::Rectangle {...} | | pattern_matching.rs:145:1:150:1 | Shape | +| pattern_matching.rs:387:11:387:15 | shape | | pattern_matching.rs:145:1:150:1 | Shape | +| pattern_matching.rs:388:9:391:9 | ...::Rectangle {...} | | pattern_matching.rs:145:1:150:1 | Shape | +| pattern_matching.rs:391:14:395:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:394:22:394:39 | "Rectangle: {}x{}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:394:22:394:39 | "Rectangle: {}x{}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:394:22:394:64 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:394:22:394:64 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:396:14:396:15 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:400:32:441:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:405:29:408:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:407:22:407:37 | "Pure red: {:?}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:407:22:407:37 | "Pure red: {:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:407:22:407:48 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:407:22:407:48 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:409:27:417:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:414:17:414:37 | "Color: ({}, {}, {})\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:414:17:414:37 | "Color: ({}, {}, {})\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:414:17:415:62 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:414:17:415:62 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:422:27:425:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:424:22:424:42 | "Reddish color: {:?}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:424:22:424:42 | "Reddish color: {:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:424:22:424:57 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:424:22:424:57 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:426:25:429:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:428:22:428:45 | "Any color with red: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:428:22:428:45 | "Any color with red: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:428:22:428:54 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:428:22:428:54 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:436:23:439:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:438:22:438:34 | "Wrapped: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:438:22:438:34 | "Wrapped: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:438:22:438:49 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:438:22:438:49 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:443:25:498:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:444:9:444:13 | tuple | | {EXTERNAL LOCATION} | (T_3) | +| pattern_matching.rs:444:17:444:36 | TupleExpr | | {EXTERNAL LOCATION} | (T_3) | +| pattern_matching.rs:444:18:444:21 | 1i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:444:24:444:27 | 2i64 | | {EXTERNAL LOCATION} | i64 | +| pattern_matching.rs:444:30:444:35 | 3.0f32 | | {EXTERNAL LOCATION} | f32 | +| pattern_matching.rs:447:11:447:15 | tuple | | {EXTERNAL LOCATION} | (T_3) | +| pattern_matching.rs:448:9:448:19 | TuplePat | | {EXTERNAL LOCATION} | (T_3) | +| pattern_matching.rs:448:24:451:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:449:17:449:27 | exact_tuple | | {EXTERNAL LOCATION} | (T_3) | +| pattern_matching.rs:449:31:449:35 | tuple | | {EXTERNAL LOCATION} | (T_3) | +| pattern_matching.rs:450:22:450:40 | "Exact tuple: {:?}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:450:22:450:40 | "Exact tuple: {:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:450:22:450:53 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:450:22:450:53 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:450:43:450:53 | exact_tuple | | {EXTERNAL LOCATION} | (T_3) | +| pattern_matching.rs:452:9:452:17 | TuplePat | | {EXTERNAL LOCATION} | (T_3) | +| pattern_matching.rs:452:22:457:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:456:22:456:42 | "Tuple: ({}, {}, {})\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:456:22:456:42 | "Tuple: ({}, {}, {})\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:456:22:456:79 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:456:22:456:79 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:461:11:461:15 | tuple | | {EXTERNAL LOCATION} | (T_3) | +| pattern_matching.rs:462:24:465:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:464:22:464:40 | "First element: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:464:22:464:40 | "First element: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:464:22:464:53 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:464:22:464:53 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:469:9:469:12 | unit | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:469:16:469:17 | TupleExpr | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:470:11:470:14 | unit | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:471:9:471:10 | TuplePat | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:471:15:474:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:472:17:472:26 | unit_value | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:472:30:472:33 | unit | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:473:22:473:39 | "Unit value: {:?}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:473:22:473:39 | "Unit value: {:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:473:22:473:51 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:473:22:473:51 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:473:42:473:51 | unit_value | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:478:9:478:14 | single | | {EXTERNAL LOCATION} | (T_1) | +| pattern_matching.rs:478:18:478:25 | TupleExpr | | {EXTERNAL LOCATION} | (T_1) | +| pattern_matching.rs:478:19:478:23 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:479:11:479:16 | single | | {EXTERNAL LOCATION} | (T_1) | +| pattern_matching.rs:480:9:480:12 | TuplePat | | {EXTERNAL LOCATION} | (T_1) | +| pattern_matching.rs:480:17:483:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:482:22:482:47 | "Single element tuple: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:482:22:482:47 | "Single element tuple: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:482:22:482:60 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:482:22:482:60 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:487:9:487:18 | ref_tuple1 | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:487:9:487:18 | ref_tuple1 | TRef | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:487:9:487:18 | ref_tuple1 | TRef.T0 | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:487:9:487:18 | ref_tuple1 | TRef.T1 | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:487:35:487:41 | &... | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:487:36:487:41 | TupleExpr | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:488:5:491:5 | if ... {...} | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:488:12:488:17 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:488:21:488:30 | ref_tuple1 | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:488:21:488:30 | ref_tuple1 | TRef | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:488:21:488:30 | ref_tuple1 | TRef.T0 | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:488:21:488:30 | ref_tuple1 | TRef.T1 | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:488:32:491:5 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:489:18:489:24 | "n: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:489:18:489:24 | "n: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:489:18:489:27 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:489:18:489:27 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:490:18:490:24 | "m: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:490:18:490:24 | "m: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:490:18:490:27 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:490:18:490:27 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:494:9:494:18 | ref_tuple2 | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:494:9:494:18 | ref_tuple2 | TRef | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:494:9:494:18 | ref_tuple2 | TRef.T0 | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:494:9:494:18 | ref_tuple2 | TRef.T1 | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:494:35:494:41 | &... | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:494:36:494:41 | TupleExpr | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:495:9:495:14 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:495:18:495:27 | ref_tuple2 | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:495:18:495:27 | ref_tuple2 | TRef | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:495:18:495:27 | ref_tuple2 | TRef.T0 | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:495:18:495:27 | ref_tuple2 | TRef.T1 | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:496:14:496:20 | "n: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:496:14:496:20 | "n: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:496:14:496:23 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:496:14:496:23 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:497:14:497:20 | "m: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:497:14:497:20 | "m: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:497:14:497:23 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:497:14:497:23 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:500:33:520:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:501:9:501:13 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:501:17:501:21 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:504:11:504:15 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:505:16:508:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:507:22:507:48 | "Parenthesized pattern: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:507:22:507:48 | "Parenthesized pattern: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:507:22:507:61 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:507:22:507:61 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:512:9:512:13 | tuple | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:512:17:512:28 | TupleExpr | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:512:18:512:21 | 1i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:512:24:512:27 | 2i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:513:11:513:15 | tuple | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:514:9:514:16 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:514:21:518:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:517:22:517:53 | "Parenthesized in tuple: {}, {... | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:517:22:517:53 | "Parenthesized in tuple: {}, {... | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:517:22:517:71 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:517:22:517:71 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:522:25:563:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:523:9:523:13 | slice | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:523:9:523:13 | slice | TRef | {EXTERNAL LOCATION} | [] | +| pattern_matching.rs:523:9:523:13 | slice | TRef.TSlice | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:523:25:523:40 | &... | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:523:26:523:40 | [...] | | {EXTERNAL LOCATION} | [;] | +| pattern_matching.rs:526:11:526:15 | slice | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:526:11:526:15 | slice | TRef | {EXTERNAL LOCATION} | [] | +| pattern_matching.rs:526:11:526:15 | slice | TRef.TSlice | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:527:15:530:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:528:17:528:27 | empty_slice | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:528:17:528:27 | empty_slice | TRef | {EXTERNAL LOCATION} | [] | +| pattern_matching.rs:528:17:528:27 | empty_slice | TRef.TSlice | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:528:31:528:35 | slice | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:528:31:528:35 | slice | TRef | {EXTERNAL LOCATION} | [] | +| pattern_matching.rs:528:31:528:35 | slice | TRef.TSlice | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:529:22:529:40 | "Empty slice: {:?}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:529:22:529:40 | "Empty slice: {:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:529:22:529:53 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:529:22:529:53 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:529:43:529:53 | empty_slice | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:529:43:529:53 | empty_slice | TRef | {EXTERNAL LOCATION} | [] | +| pattern_matching.rs:529:43:529:53 | empty_slice | TRef.TSlice | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:531:16:534:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:533:22:533:41 | "Single element: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:533:22:533:41 | "Single element: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:533:22:533:54 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:533:22:533:54 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:535:28:539:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:538:22:538:43 | "Two elements: {}, {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:538:22:538:43 | "Two elements: {}, {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:538:22:538:70 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:538:22:538:70 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:540:39:550:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:545:17:545:53 | "First: {}, last: {}, middle l... | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:545:17:545:53 | "First: {}, last: {}, middle l... | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:545:17:548:34 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:545:17:548:34 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:554:9:554:13 | array | | {EXTERNAL LOCATION} | [;] | +| pattern_matching.rs:554:17:554:28 | [...] | | {EXTERNAL LOCATION} | [;] | +| pattern_matching.rs:554:18:554:21 | 1i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:555:11:555:15 | array | | {EXTERNAL LOCATION} | [;] | +| pattern_matching.rs:556:22:561:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:560:22:560:49 | "Array elements: {}, {}, {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:560:22:560:49 | "Array elements: {}, {}, {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:560:22:560:70 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:560:22:560:70 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:565:24:601:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:568:9:568:13 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:568:17:568:21 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:570:11:570:15 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:571:21:574:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:572:17:572:27 | const_match | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:572:31:572:35 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:573:22:573:43 | "Matches constant: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:573:22:573:43 | "Matches constant: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:573:22:573:56 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:573:22:573:56 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:573:46:573:56 | const_match | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:575:14:575:15 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:579:33:579:37 | 10i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:581:27:583:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:582:22:582:35 | "None variant\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:582:22:582:35 | "None variant\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:582:22:582:35 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:582:22:582:35 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:584:30:587:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:586:22:586:37 | "Some value: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:586:22:586:37 | "Some value: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:586:22:586:49 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:586:22:586:49 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:592:39:595:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:594:22:594:35 | "Ok value: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:594:22:594:35 | "Ok value: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:594:22:594:45 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:594:22:594:45 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:596:40:599:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:598:22:598:32 | "Error: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:598:22:598:32 | "Error: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:598:22:598:43 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:598:22:598:43 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:603:22:638:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:604:9:604:13 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:604:17:604:21 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:607:11:607:15 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:608:22:611:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:609:17:609:25 | small_num | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:609:29:609:33 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:610:22:610:39 | "Small number: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:610:22:610:39 | "Small number: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:610:22:610:50 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:610:22:610:50 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:610:42:610:50 | small_num | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:612:20:615:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:613:17:613:25 | round_num | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:613:29:613:33 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:614:22:614:39 | "Round number: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:614:22:614:39 | "Round number: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:614:22:614:50 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:614:22:614:50 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:614:42:614:50 | round_num | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:616:14:616:15 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:620:9:620:13 | point | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:620:17:620:36 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:621:11:621:15 | point | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:622:9:622:29 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:622:33:622:53 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:622:58:626:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:625:22:625:46 | "Point on axis: ({}, {})\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:625:22:625:46 | "Point on axis: ({}, {})\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:625:22:625:62 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:625:22:625:62 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:627:14:627:15 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:631:11:631:15 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:632:30:635:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:633:17:633:30 | range_or_value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:633:34:633:38 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:634:22:634:35 | "In range: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:634:22:634:35 | "In range: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:634:22:634:51 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:634:22:634:51 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:634:38:634:51 | range_or_value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:636:14:636:15 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:640:24:674:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:641:9:641:13 | tuple | | {EXTERNAL LOCATION} | (T_4) | +| pattern_matching.rs:641:17:641:41 | TupleExpr | | {EXTERNAL LOCATION} | (T_4) | +| pattern_matching.rs:641:18:641:21 | 1i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:641:24:641:27 | 2i64 | | {EXTERNAL LOCATION} | i64 | +| pattern_matching.rs:641:30:641:35 | 3.0f32 | | {EXTERNAL LOCATION} | f32 | +| pattern_matching.rs:641:38:641:40 | 4u8 | | {EXTERNAL LOCATION} | u8 | +| pattern_matching.rs:644:11:644:15 | tuple | | {EXTERNAL LOCATION} | (T_4) | +| pattern_matching.rs:645:24:648:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:647:22:647:42 | "First with rest: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:647:22:647:42 | "First with rest: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:647:22:647:54 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:647:22:647:54 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:651:11:651:15 | tuple | | {EXTERNAL LOCATION} | (T_4) | +| pattern_matching.rs:652:23:655:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:654:22:654:41 | "Last with rest: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:654:22:654:41 | "Last with rest: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:654:22:654:52 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:654:22:654:52 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:658:11:658:15 | tuple | | {EXTERNAL LOCATION} | (T_4) | +| pattern_matching.rs:659:30:663:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:662:22:662:45 | "First and last: {}, {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:662:22:662:45 | "First and last: {}, {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:662:22:662:67 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:662:22:662:67 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:667:9:667:13 | point | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:667:17:667:38 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:668:11:668:15 | point | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:669:9:669:23 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:669:28:672:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:671:22:671:39 | "X coordinate: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:671:22:671:39 | "X coordinate: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:671:22:671:47 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:671:22:671:47 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:676:25:696:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:694:21:694:25 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:694:21:694:25 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:694:21:694:25 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:695:21:695:25 | 10i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:695:21:695:25 | 10i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:695:21:695:25 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:698:34:724:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:700:9:700:20 | complex_data | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:700:24:700:79 | TupleExpr | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:700:25:700:44 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:702:11:702:22 | complex_data | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:704:9:704:61 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:704:10:704:26 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:704:66:712:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:709:17:709:57 | "Complex nested: y={}, green={... | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:709:17:709:57 | "Complex nested: y={}, green={... | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:709:17:710:44 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:709:17:710:44 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:714:9:714:41 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:714:10:714:24 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:714:45:714:71 | TuplePat | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:714:46:714:67 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:714:76:717:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:716:22:716:50 | "Alternative complex: x={:?}\\n... | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:716:22:716:50 | "Alternative complex: x={:?}\\n... | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:716:22:716:65 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:716:22:716:65 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:719:18:722:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:721:22:721:47 | "Other complex data: {:?}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:721:22:721:47 | "Other complex data: {:?}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:721:22:721:62 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:721:22:721:62 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:726:37:758:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:728:9:728:13 | point | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:728:17:728:38 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:729:9:729:22 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:729:26:729:30 | point | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:733:9:733:13 | tuple | | {EXTERNAL LOCATION} | (T_3) | +| pattern_matching.rs:733:17:733:36 | TupleExpr | | {EXTERNAL LOCATION} | (T_3) | +| pattern_matching.rs:733:18:733:21 | 1i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:733:24:733:27 | 2i64 | | {EXTERNAL LOCATION} | i64 | +| pattern_matching.rs:733:30:733:35 | 3.0f32 | | {EXTERNAL LOCATION} | f32 | +| pattern_matching.rs:734:9:734:17 | TuplePat | | {EXTERNAL LOCATION} | (T_3) | +| pattern_matching.rs:734:21:734:25 | tuple | | {EXTERNAL LOCATION} | (T_3) | +| pattern_matching.rs:739:9:739:13 | array | | {EXTERNAL LOCATION} | [;] | +| pattern_matching.rs:739:17:739:34 | [...] | | {EXTERNAL LOCATION} | [;] | +| pattern_matching.rs:739:18:739:21 | 1i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:740:29:740:33 | array | | {EXTERNAL LOCATION} | [;] | +| pattern_matching.rs:751:9:751:13 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:751:17:751:21 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:752:13:752:19 | ref_val | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:752:13:752:19 | ref_val | TRef | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:752:23:752:27 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:753:9:753:15 | let_ref | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:753:9:753:15 | let_ref | TRef | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:753:19:753:25 | ref_val | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:753:19:753:25 | ref_val | TRef | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:756:13:756:19 | mut_val | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:756:23:756:27 | 10i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:757:9:757:15 | let_mut | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:757:19:757:25 | mut_val | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:760:42:789:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:763:22:763:35 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:763:59:767:5 | { ... } | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:763:59:767:5 | { ... } | T0 | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:763:59:767:5 | { ... } | T1 | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:766:9:766:26 | TupleExpr | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:769:22:769:35 | Color(...) | | pattern_matching.rs:142:1:143:25 | Color | +| pattern_matching.rs:769:51:772:5 | { ... } | | {EXTERNAL LOCATION} | u8 | +| pattern_matching.rs:774:22:774:38 | TuplePat | | {EXTERNAL LOCATION} | (T_3) | +| pattern_matching.rs:774:22:774:38 | TuplePat | T0 | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:774:22:774:38 | TuplePat | T1 | {EXTERNAL LOCATION} | f64 | +| pattern_matching.rs:774:22:774:38 | TuplePat | T2 | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:774:74:778:5 | { ... } | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:774:74:778:5 | { ... } | T0 | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:774:74:778:5 | { ... } | T1 | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:777:9:777:34 | TupleExpr | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:781:9:781:13 | point | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:781:17:781:37 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:782:9:782:17 | extracted | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:782:9:782:17 | extracted | T0 | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:782:9:782:17 | extracted | T1 | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:782:21:782:40 | extract_point(...) | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:782:21:782:40 | extract_point(...) | T0 | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:782:21:782:40 | extract_point(...) | T1 | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:782:35:782:39 | point | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:785:9:785:11 | red | | {EXTERNAL LOCATION} | u8 | +| pattern_matching.rs:785:15:785:34 | extract_color(...) | | {EXTERNAL LOCATION} | u8 | +| pattern_matching.rs:787:9:787:13 | tuple | | {EXTERNAL LOCATION} | (T_3) | +| pattern_matching.rs:787:17:787:38 | TupleExpr | | {EXTERNAL LOCATION} | (T_3) | +| pattern_matching.rs:787:18:787:22 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:787:25:787:31 | 3.14f64 | | {EXTERNAL LOCATION} | f64 | +| pattern_matching.rs:787:34:787:37 | true | | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:788:9:788:23 | tuple_extracted | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:788:9:788:23 | tuple_extracted | T0 | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:788:9:788:23 | tuple_extracted | T1 | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:788:27:788:46 | extract_tuple(...) | | {EXTERNAL LOCATION} | (T_2) | +| pattern_matching.rs:788:27:788:46 | extract_tuple(...) | T0 | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:788:27:788:46 | extract_tuple(...) | T1 | {EXTERNAL LOCATION} | bool | +| pattern_matching.rs:788:41:788:45 | tuple | | {EXTERNAL LOCATION} | (T_3) | +| pattern_matching.rs:792:35:824:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:794:23:794:42 | (...) | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:794:23:794:42 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:794:45:794:64 | (...) | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:794:45:794:64 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:795:5:799:5 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:795:9:795:22 | Point {...} | | pattern_matching.rs:135:1:140:1 | Point | +| pattern_matching.rs:795:34:799:5 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:798:18:798:42 | "Point in loop: ({}, {})\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:798:18:798:42 | "Point in loop: ({}, {})\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:798:18:798:58 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:798:18:798:58 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:802:39:802:43 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:803:5:806:5 | if ... {...} | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:803:50:806:5 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:805:18:805:44 | "If let with @ pattern: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:805:18:805:44 | "If let with @ pattern: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:805:18:805:54 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:805:18:805:54 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:809:13:809:17 | stack | | {EXTERNAL LOCATION} | Vec | +| pattern_matching.rs:809:13:809:17 | stack | A | {EXTERNAL LOCATION} | Global | +| pattern_matching.rs:809:13:809:17 | stack | T | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:809:36:809:39 | 1i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:810:5:813:5 | while ... { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:810:25:810:29 | stack | | {EXTERNAL LOCATION} | Vec | +| pattern_matching.rs:810:25:810:29 | stack | A | {EXTERNAL LOCATION} | Global | +| pattern_matching.rs:810:25:810:29 | stack | T | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:810:37:813:5 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:812:18:812:29 | "Popped: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:812:18:812:29 | "Popped: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:812:18:812:42 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:812:18:812:42 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:816:9:816:13 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:816:17:816:21 | 42i32 | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:817:11:817:15 | value | | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:818:23:821:9 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:820:22:820:35 | "Positive: {}\\n" | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:820:22:820:35 | "Positive: {}\\n" | TRef | {EXTERNAL LOCATION} | str | +| pattern_matching.rs:820:22:820:44 | ...::_print(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:820:22:820:44 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:822:14:822:15 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:826:28:846:1 | { ... } | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:827:5:827:7 | f(...) | | {EXTERNAL LOCATION} | Option | +| pattern_matching.rs:827:5:827:7 | f(...) | T | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:828:5:828:22 | literal_patterns(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:829:5:829:25 | identifier_patterns(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:830:5:830:23 | wildcard_patterns(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:831:5:831:20 | range_patterns(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:832:5:832:24 | reference_patterns(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:833:5:833:21 | record_patterns(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:834:5:834:27 | tuple_struct_patterns(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:835:5:835:20 | tuple_patterns(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:836:5:836:28 | parenthesized_patterns(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:837:5:837:20 | slice_patterns(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:838:5:838:19 | path_patterns(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:839:5:839:17 | or_patterns(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:840:5:840:19 | rest_patterns(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:841:5:841:20 | macro_patterns(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:842:5:842:29 | complex_nested_patterns(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:843:5:843:32 | patterns_in_let_statements(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:844:5:844:37 | patterns_in_function_parameters(...) | | {EXTERNAL LOCATION} | () | +| pattern_matching.rs:845:5:845:30 | patterns_in_control_flow(...) | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:3:28:3:28 | x | | {EXTERNAL LOCATION} | *const | +| raw_pointer.rs:3:28:3:28 | x | TPtrConst | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:3:50:6:1 | { ... } | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:4:24:4:24 | x | | {EXTERNAL LOCATION} | *const | +| raw_pointer.rs:4:24:4:24 | x | TPtrConst | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:8:26:8:26 | x | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:8:26:8:26 | x | TPtrMut | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:8:47:11:1 | { ... } | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:9:24:9:24 | x | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:9:24:9:24 | x | TPtrMut | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:13:23:19:1 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:14:9:14:9 | a | | {EXTERNAL LOCATION} | i64 | +| raw_pointer.rs:15:9:15:9 | x | | {EXTERNAL LOCATION} | *const | +| raw_pointer.rs:15:13:15:24 | &raw const a | | {EXTERNAL LOCATION} | *const | +| raw_pointer.rs:15:24:15:24 | a | | {EXTERNAL LOCATION} | i64 | +| raw_pointer.rs:16:5:18:5 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:17:19:17:19 | x | | {EXTERNAL LOCATION} | *const | +| raw_pointer.rs:21:21:27:1 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:22:13:22:13 | a | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:22:17:22:21 | 10i32 | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:23:9:23:9 | x | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:23:13:23:22 | &raw mut a | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:23:22:23:22 | a | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:24:5:26:5 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:25:19:25:19 | x | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:29:18:29:21 | cond | | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:29:30:40:1 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:30:9:30:9 | a | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:30:13:30:17 | 10i32 | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:32:9:32:19 | ptr_written | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:32:23:32:32 | null_mut(...) | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:33:5:39:5 | if cond {...} | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:33:8:33:11 | cond | | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:34:9:38:9 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:36:14:36:24 | ptr_written | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:36:28:36:28 | a | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:37:23:37:33 | ptr_written | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:42:24:42:27 | cond | | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:42:36:51:1 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:44:9:44:16 | ptr_read | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:44:20:44:29 | null_mut(...) | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:45:5:50:5 | if cond {...} | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:45:8:45:11 | cond | | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:46:9:49:9 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:48:17:48:18 | _y | | {EXTERNAL LOCATION} | i64 | +| raw_pointer.rs:48:28:48:35 | ptr_read | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:53:15:60:1 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:54:5:54:32 | raw_pointer_const_deref(...) | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:54:29:54:31 | &10 | | {EXTERNAL LOCATION} | & | +| raw_pointer.rs:55:5:55:36 | raw_pointer_mut_deref(...) | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:55:27:55:35 | &mut true | | {EXTERNAL LOCATION} | & | +| raw_pointer.rs:55:32:55:35 | true | | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:56:5:56:22 | raw_const_borrow(...) | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:57:5:57:20 | raw_mut_borrow(...) | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:58:5:58:24 | raw_mut_write(...) | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:58:19:58:23 | false | | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:59:5:59:30 | raw_type_from_deref(...) | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:59:25:59:29 | false | | {EXTERNAL LOCATION} | bool | inferType | blanket_impl.rs:15:18:15:22 | SelfParam | | {EXTERNAL LOCATION} | & | | blanket_impl.rs:15:18:15:22 | SelfParam | TRef | blanket_impl.rs:9:5:10:14 | S2 | @@ -2615,8 +7097,6 @@ inferType | main.rs:1025:18:1025:49 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:1025:26:1025:27 | x3 | | main.rs:943:5:944:13 | S | | main.rs:1025:26:1025:40 | x3.putTwo(...) | | main.rs:892:5:895:5 | Wrapper | -| main.rs:1025:26:1025:40 | x3.putTwo(...) | A | main.rs:963:36:963:50 | AssociatedParam | -| main.rs:1025:26:1025:49 | ... .unwrap() | | main.rs:963:36:963:50 | AssociatedParam | | main.rs:1025:36:1025:36 | 2 | | {EXTERNAL LOCATION} | i32 | | main.rs:1025:39:1025:39 | 3 | | {EXTERNAL LOCATION} | i32 | | main.rs:1027:20:1027:20 | S | | main.rs:943:5:944:13 | S | @@ -2658,17 +7138,13 @@ inferType | main.rs:1050:24:1050:28 | SelfParam | TRef | main.rs:1048:5:1051:5 | Self [trait Subtrait] | | main.rs:1059:23:1059:27 | SelfParam | | {EXTERNAL LOCATION} | & | | main.rs:1059:23:1059:27 | SelfParam | TRef | main.rs:1053:5:1063:5 | Self [trait Subtrait2] | -| main.rs:1059:30:1059:31 | c1 | | main.rs:1043:9:1043:21 | Content | -| main.rs:1059:49:1059:50 | c2 | | main.rs:1043:9:1043:21 | Content | | main.rs:1059:68:1062:9 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:1060:13:1060:16 | self | | {EXTERNAL LOCATION} | & | | main.rs:1060:13:1060:16 | self | TRef | main.rs:1053:5:1063:5 | Self [trait Subtrait2] | | main.rs:1060:13:1060:27 | self.insert(...) | | {EXTERNAL LOCATION} | () | -| main.rs:1060:25:1060:26 | c1 | | main.rs:1043:9:1043:21 | Content | | main.rs:1061:13:1061:16 | self | | {EXTERNAL LOCATION} | & | | main.rs:1061:13:1061:16 | self | TRef | main.rs:1053:5:1063:5 | Self [trait Subtrait2] | | main.rs:1061:13:1061:27 | self.insert(...) | | {EXTERNAL LOCATION} | () | -| main.rs:1061:25:1061:26 | c2 | | main.rs:1043:9:1043:21 | Content | | main.rs:1069:19:1069:23 | SelfParam | | {EXTERNAL LOCATION} | & | | main.rs:1069:19:1069:23 | SelfParam | TRef | main.rs:1065:5:1065:24 | MyType | | main.rs:1069:19:1069:23 | SelfParam | TRef.T | main.rs:1067:10:1067:10 | T | @@ -2693,25 +7169,17 @@ inferType | main.rs:1077:15:1077:18 | self | TRef.T | main.rs:1074:10:1074:17 | T | | main.rs:1081:33:1081:36 | item | | {EXTERNAL LOCATION} | & | | main.rs:1081:33:1081:36 | item | TRef | main.rs:1081:20:1081:30 | T | -| main.rs:1081:57:1083:5 | { ... } | | main.rs:1043:9:1043:21 | Content | | main.rs:1082:9:1082:12 | item | | {EXTERNAL LOCATION} | & | | main.rs:1082:9:1082:12 | item | TRef | main.rs:1081:20:1081:30 | T | -| main.rs:1082:9:1082:26 | item.get_content() | | main.rs:1043:9:1043:21 | Content | | main.rs:1085:35:1085:38 | item | | {EXTERNAL LOCATION} | & | | main.rs:1085:35:1085:38 | item | TRef | main.rs:1085:21:1085:32 | T | -| main.rs:1085:45:1085:46 | c1 | | main.rs:1043:9:1043:21 | Content | -| main.rs:1085:61:1085:62 | c2 | | main.rs:1043:9:1043:21 | Content | -| main.rs:1085:77:1085:78 | c3 | | main.rs:1043:9:1043:21 | Content | | main.rs:1085:93:1088:5 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:1086:9:1086:12 | item | | {EXTERNAL LOCATION} | & | | main.rs:1086:9:1086:12 | item | TRef | main.rs:1085:21:1085:32 | T | | main.rs:1086:9:1086:23 | item.insert(...) | | {EXTERNAL LOCATION} | () | -| main.rs:1086:21:1086:22 | c1 | | main.rs:1043:9:1043:21 | Content | | main.rs:1087:9:1087:12 | item | | {EXTERNAL LOCATION} | & | | main.rs:1087:9:1087:12 | item | TRef | main.rs:1085:21:1085:32 | T | | main.rs:1087:9:1087:31 | item.insert_two(...) | | {EXTERNAL LOCATION} | () | -| main.rs:1087:25:1087:26 | c2 | | main.rs:1043:9:1043:21 | Content | -| main.rs:1087:29:1087:30 | c3 | | main.rs:1043:9:1043:21 | Content | | main.rs:1090:15:1096:5 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:1091:13:1091:17 | item1 | | main.rs:1065:5:1065:24 | MyType | | main.rs:1091:13:1091:17 | item1 | T | {EXTERNAL LOCATION} | i64 | @@ -3980,7 +8448,6 @@ inferType | main.rs:1762:17:1762:20 | self | TRef.TSlice | main.rs:1760:14:1760:23 | T | | main.rs:1762:17:1762:27 | self.get(...) | | {EXTERNAL LOCATION} | Option | | main.rs:1762:17:1762:27 | self.get(...) | T | {EXTERNAL LOCATION} | & | -| main.rs:1762:17:1762:27 | self.get(...) | T.TRef | main.rs:1760:14:1760:23 | T | | main.rs:1762:17:1762:36 | ... .unwrap() | | {EXTERNAL LOCATION} | & | | main.rs:1762:17:1762:36 | ... .unwrap() | TRef | main.rs:1760:14:1760:23 | T | | main.rs:1762:26:1762:26 | 0 | | {EXTERNAL LOCATION} | i32 | @@ -4093,8 +8560,8 @@ inferType | main.rs:1803:13:1803:13 | x | | {EXTERNAL LOCATION} | i32 | | main.rs:1803:17:1803:33 | ...::my_func(...) | | {EXTERNAL LOCATION} | i32 | | main.rs:1806:26:1806:30 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1806:26:1806:30 | SelfParam | TRef | file://:0:0:0:0 | * | -| main.rs:1806:26:1806:30 | SelfParam | TRef.TPtr | main.rs:1805:14:1805:23 | T | +| main.rs:1806:26:1806:30 | SelfParam | TRef | {EXTERNAL LOCATION} | *mut | +| main.rs:1806:26:1806:30 | SelfParam | TRef.TPtrMut | main.rs:1805:14:1805:23 | T | | main.rs:1806:39:1808:13 | { ... } | | {EXTERNAL LOCATION} | & | | main.rs:1806:39:1808:13 | { ... } | TRef | main.rs:1805:14:1805:23 | T | | main.rs:1807:17:1807:34 | { ... } | | {EXTERNAL LOCATION} | & | @@ -4102,17 +8569,17 @@ inferType | main.rs:1807:26:1807:32 | &... | | {EXTERNAL LOCATION} | & | | main.rs:1807:26:1807:32 | &... | TRef | main.rs:1805:14:1805:23 | T | | main.rs:1807:27:1807:32 | * ... | | main.rs:1805:14:1805:23 | T | -| main.rs:1807:28:1807:32 | * ... | | file://:0:0:0:0 | * | -| main.rs:1807:28:1807:32 | * ... | TPtr | main.rs:1805:14:1805:23 | T | +| main.rs:1807:28:1807:32 | * ... | | {EXTERNAL LOCATION} | *mut | +| main.rs:1807:28:1807:32 | * ... | TPtrMut | main.rs:1805:14:1805:23 | T | | main.rs:1807:29:1807:32 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1807:29:1807:32 | self | TRef | file://:0:0:0:0 | * | -| main.rs:1807:29:1807:32 | self | TRef.TPtr | main.rs:1805:14:1805:23 | T | +| main.rs:1807:29:1807:32 | self | TRef | {EXTERNAL LOCATION} | *mut | +| main.rs:1807:29:1807:32 | self | TRef.TPtrMut | main.rs:1805:14:1805:23 | T | | main.rs:1810:31:1812:13 | { ... } | | main.rs:1805:14:1805:23 | T | | main.rs:1811:17:1811:28 | ...::default(...) | | main.rs:1805:14:1805:23 | T | | main.rs:1815:17:1815:17 | v | | {EXTERNAL LOCATION} | i32 | | main.rs:1815:21:1815:22 | 42 | | {EXTERNAL LOCATION} | i32 | -| main.rs:1816:13:1816:13 | p | | file://:0:0:0:0 | * | -| main.rs:1816:13:1816:13 | p | TPtr | {EXTERNAL LOCATION} | i32 | +| main.rs:1816:13:1816:13 | p | | {EXTERNAL LOCATION} | *mut | +| main.rs:1816:13:1816:13 | p | TPtrMut | {EXTERNAL LOCATION} | i32 | | main.rs:1816:27:1816:32 | &mut v | | {EXTERNAL LOCATION} | & | | main.rs:1816:27:1816:32 | &mut v | TRef | {EXTERNAL LOCATION} | i32 | | main.rs:1816:32:1816:32 | v | | {EXTERNAL LOCATION} | i32 | @@ -4120,8 +8587,8 @@ inferType | main.rs:1817:13:1817:13 | x | TRef | {EXTERNAL LOCATION} | i32 | | main.rs:1817:17:1817:40 | { ... } | | {EXTERNAL LOCATION} | & | | main.rs:1817:17:1817:40 | { ... } | TRef | {EXTERNAL LOCATION} | i32 | -| main.rs:1817:26:1817:26 | p | | file://:0:0:0:0 | * | -| main.rs:1817:26:1817:26 | p | TPtr | {EXTERNAL LOCATION} | i32 | +| main.rs:1817:26:1817:26 | p | | {EXTERNAL LOCATION} | *mut | +| main.rs:1817:26:1817:26 | p | TPtrMut | {EXTERNAL LOCATION} | i32 | | main.rs:1817:26:1817:38 | p.my_method() | | {EXTERNAL LOCATION} | & | | main.rs:1817:26:1817:38 | p.my_method() | TRef | {EXTERNAL LOCATION} | i32 | | main.rs:1818:13:1818:13 | x | | {EXTERNAL LOCATION} | & | @@ -4131,10 +8598,10 @@ inferType | main.rs:1818:26:1818:48 | ...::my_method(...) | | {EXTERNAL LOCATION} | & | | main.rs:1818:26:1818:48 | ...::my_method(...) | TRef | {EXTERNAL LOCATION} | i32 | | main.rs:1818:46:1818:47 | &p | | {EXTERNAL LOCATION} | & | -| main.rs:1818:46:1818:47 | &p | TRef | file://:0:0:0:0 | * | -| main.rs:1818:46:1818:47 | &p | TRef.TPtr | {EXTERNAL LOCATION} | i32 | -| main.rs:1818:47:1818:47 | p | | file://:0:0:0:0 | * | -| main.rs:1818:47:1818:47 | p | TPtr | {EXTERNAL LOCATION} | i32 | +| main.rs:1818:46:1818:47 | &p | TRef | {EXTERNAL LOCATION} | *mut | +| main.rs:1818:46:1818:47 | &p | TRef.TPtrMut | {EXTERNAL LOCATION} | i32 | +| main.rs:1818:47:1818:47 | p | | {EXTERNAL LOCATION} | *mut | +| main.rs:1818:47:1818:47 | p | TPtrMut | {EXTERNAL LOCATION} | i32 | | main.rs:1819:13:1819:13 | x | | {EXTERNAL LOCATION} | i32 | | main.rs:1819:17:1819:37 | ...::my_func(...) | | {EXTERNAL LOCATION} | i32 | | main.rs:1825:16:1837:5 | { ... } | | {EXTERNAL LOCATION} | () | @@ -4626,9 +9093,7 @@ inferType | main.rs:2076:44:2076:50 | other.y | | {EXTERNAL LOCATION} | i64 | | main.rs:2080:26:2080:26 | a | | main.rs:2080:18:2080:23 | T | | main.rs:2080:32:2080:32 | b | | main.rs:2080:18:2080:23 | T | -| main.rs:2080:51:2082:5 | { ... } | | {EXTERNAL LOCATION} | Output | | main.rs:2081:9:2081:9 | a | | main.rs:2080:18:2080:23 | T | -| main.rs:2081:9:2081:13 | ... + ... | | {EXTERNAL LOCATION} | Output | | main.rs:2081:13:2081:13 | b | | main.rs:2080:18:2080:23 | T | | main.rs:2084:16:2215:5 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:2088:13:2088:18 | i64_eq | | {EXTERNAL LOCATION} | bool | @@ -4908,12 +9373,12 @@ inferType | main.rs:2227:25:2229:5 | { ... } | | main.rs:2221:5:2221:14 | S1 | | main.rs:2228:9:2228:10 | S1 | | main.rs:2221:5:2221:14 | S1 | | main.rs:2231:41:2233:5 | { ... } | | main.rs:2231:16:2231:39 | impl ... | -| main.rs:2232:9:2232:20 | { ... } | | {EXTERNAL LOCATION} | trait Future | -| main.rs:2232:9:2232:20 | { ... } | Output | main.rs:2221:5:2221:14 | S1 | +| main.rs:2232:9:2232:20 | { ... } | | {EXTERNAL LOCATION} | dyn Future | +| main.rs:2232:9:2232:20 | { ... } | dyn(Output) | main.rs:2221:5:2221:14 | S1 | | main.rs:2232:17:2232:18 | S1 | | main.rs:2221:5:2221:14 | S1 | | main.rs:2235:41:2237:5 | { ... } | | main.rs:2235:16:2235:39 | impl ... | -| main.rs:2236:9:2236:16 | { ... } | | {EXTERNAL LOCATION} | trait Future | -| main.rs:2236:9:2236:16 | { ... } | Output | {EXTERNAL LOCATION} | () | +| main.rs:2236:9:2236:16 | { ... } | | {EXTERNAL LOCATION} | dyn Future | +| main.rs:2236:9:2236:16 | { ... } | dyn(Output) | {EXTERNAL LOCATION} | () | | main.rs:2245:13:2245:42 | SelfParam | | {EXTERNAL LOCATION} | Pin | | main.rs:2245:13:2245:42 | SelfParam | Ptr | {EXTERNAL LOCATION} | & | | main.rs:2245:13:2245:42 | SelfParam | Ptr.TRef | main.rs:2239:5:2239:14 | S2 | @@ -4928,8 +9393,8 @@ inferType | main.rs:2253:9:2253:10 | S2 | | main.rs:2239:5:2239:14 | S2 | | main.rs:2253:9:2253:10 | S2 | | main.rs:2252:16:2252:39 | impl ... | | main.rs:2256:22:2264:5 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2257:9:2257:12 | f1(...) | | {EXTERNAL LOCATION} | trait Future | -| main.rs:2257:9:2257:12 | f1(...) | Output | main.rs:2221:5:2221:14 | S1 | +| main.rs:2257:9:2257:12 | f1(...) | | {EXTERNAL LOCATION} | dyn Future | +| main.rs:2257:9:2257:12 | f1(...) | dyn(Output) | main.rs:2221:5:2221:14 | S1 | | main.rs:2257:9:2257:18 | await ... | | main.rs:2221:5:2221:14 | S1 | | main.rs:2257:9:2257:22 | ... .f() | | {EXTERNAL LOCATION} | () | | main.rs:2258:9:2258:12 | f2(...) | | main.rs:2231:16:2231:39 | impl ... | @@ -4943,13 +9408,13 @@ inferType | main.rs:2261:9:2261:10 | S2 | | main.rs:2239:5:2239:14 | S2 | | main.rs:2261:9:2261:16 | await S2 | | main.rs:2221:5:2221:14 | S1 | | main.rs:2261:9:2261:20 | ... .f() | | {EXTERNAL LOCATION} | () | -| main.rs:2262:13:2262:13 | b | | {EXTERNAL LOCATION} | trait Future | -| main.rs:2262:13:2262:13 | b | Output | main.rs:2221:5:2221:14 | S1 | -| main.rs:2262:17:2262:28 | { ... } | | {EXTERNAL LOCATION} | trait Future | -| main.rs:2262:17:2262:28 | { ... } | Output | main.rs:2221:5:2221:14 | S1 | +| main.rs:2262:13:2262:13 | b | | {EXTERNAL LOCATION} | dyn Future | +| main.rs:2262:13:2262:13 | b | dyn(Output) | main.rs:2221:5:2221:14 | S1 | +| main.rs:2262:17:2262:28 | { ... } | | {EXTERNAL LOCATION} | dyn Future | +| main.rs:2262:17:2262:28 | { ... } | dyn(Output) | main.rs:2221:5:2221:14 | S1 | | main.rs:2262:25:2262:26 | S1 | | main.rs:2221:5:2221:14 | S1 | -| main.rs:2263:9:2263:9 | b | | {EXTERNAL LOCATION} | trait Future | -| main.rs:2263:9:2263:9 | b | Output | main.rs:2221:5:2221:14 | S1 | +| main.rs:2263:9:2263:9 | b | | {EXTERNAL LOCATION} | dyn Future | +| main.rs:2263:9:2263:9 | b | dyn(Output) | main.rs:2221:5:2221:14 | S1 | | main.rs:2263:9:2263:15 | await b | | main.rs:2221:5:2221:14 | S1 | | main.rs:2263:9:2263:19 | ... .f() | | {EXTERNAL LOCATION} | () | | main.rs:2274:15:2274:19 | SelfParam | | {EXTERNAL LOCATION} | & | @@ -5138,9 +9603,7 @@ inferType | main.rs:2388:23:2388:23 | 0 | | {EXTERNAL LOCATION} | i32 | | main.rs:2391:37:2391:37 | a | | main.rs:2391:20:2391:34 | T | | main.rs:2391:43:2391:43 | b | | {EXTERNAL LOCATION} | usize | -| main.rs:2394:5:2396:5 | { ... } | | {EXTERNAL LOCATION} | Output | | main.rs:2395:9:2395:9 | a | | main.rs:2391:20:2391:34 | T | -| main.rs:2395:9:2395:12 | a[b] | | {EXTERNAL LOCATION} | Output | | main.rs:2395:11:2395:11 | b | | {EXTERNAL LOCATION} | usize | | main.rs:2398:16:2409:5 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:2399:17:2399:19 | vec | | main.rs:2363:5:2366:5 | MyVec | @@ -5219,9 +9682,7 @@ inferType | main.rs:2463:25:2463:29 | other | | main.rs:2457:5:2457:19 | S | | main.rs:2463:25:2463:29 | other | T | main.rs:2459:10:2459:17 | T | | main.rs:2463:54:2465:9 | { ... } | | main.rs:2457:5:2457:19 | S | -| main.rs:2463:54:2465:9 | { ... } | T | main.rs:2420:9:2420:20 | Output | | main.rs:2464:13:2464:39 | S(...) | | main.rs:2457:5:2457:19 | S | -| main.rs:2464:13:2464:39 | S(...) | T | main.rs:2420:9:2420:20 | Output | | main.rs:2464:15:2464:22 | (...) | | main.rs:2459:10:2459:17 | T | | main.rs:2464:16:2464:19 | self | | main.rs:2457:5:2457:19 | S | | main.rs:2464:16:2464:19 | self | T | main.rs:2459:10:2459:17 | T | @@ -5233,9 +9694,7 @@ inferType | main.rs:2472:19:2472:22 | SelfParam | T | main.rs:2468:10:2468:17 | T | | main.rs:2472:25:2472:29 | other | | main.rs:2468:10:2468:17 | T | | main.rs:2472:51:2474:9 | { ... } | | main.rs:2457:5:2457:19 | S | -| main.rs:2472:51:2474:9 | { ... } | T | main.rs:2420:9:2420:20 | Output | | main.rs:2473:13:2473:37 | S(...) | | main.rs:2457:5:2457:19 | S | -| main.rs:2473:13:2473:37 | S(...) | T | main.rs:2420:9:2420:20 | Output | | main.rs:2473:15:2473:22 | (...) | | main.rs:2468:10:2468:17 | T | | main.rs:2473:16:2473:19 | self | | main.rs:2457:5:2457:19 | S | | main.rs:2473:16:2473:19 | self | T | main.rs:2468:10:2468:17 | T | @@ -5481,7 +9940,6 @@ inferType | main.rs:2627:43:2627:47 | "baz" | | {EXTERNAL LOCATION} | & | | main.rs:2627:43:2627:47 | "baz" | TRef | {EXTERNAL LOCATION} | str | | main.rs:2628:9:2628:29 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2628:13:2628:13 | s | | {EXTERNAL LOCATION} | Item | | main.rs:2628:13:2628:13 | s | | {EXTERNAL LOCATION} | & | | main.rs:2628:13:2628:13 | s | TRef | {EXTERNAL LOCATION} | & | | main.rs:2628:13:2628:13 | s | TRef.TRef | {EXTERNAL LOCATION} | str | @@ -5494,7 +9952,6 @@ inferType | main.rs:2628:19:2628:26 | strings1 | TArray.TRef | {EXTERNAL LOCATION} | str | | main.rs:2628:28:2628:29 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:2629:9:2629:33 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2629:13:2629:13 | s | | {EXTERNAL LOCATION} | Item | | main.rs:2629:13:2629:13 | s | | {EXTERNAL LOCATION} | & | | main.rs:2629:13:2629:13 | s | TRef | {EXTERNAL LOCATION} | & | | main.rs:2629:13:2629:13 | s | TRef.TRef | {EXTERNAL LOCATION} | str | @@ -5549,7 +10006,6 @@ inferType | main.rs:2644:26:2644:30 | "baz" | | {EXTERNAL LOCATION} | & | | main.rs:2644:26:2644:30 | "baz" | TRef | {EXTERNAL LOCATION} | str | | main.rs:2646:9:2646:28 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2646:13:2646:13 | s | | {EXTERNAL LOCATION} | Item | | main.rs:2646:13:2646:13 | s | | {EXTERNAL LOCATION} | & | | main.rs:2646:13:2646:13 | s | TRef | {EXTERNAL LOCATION} | String | | main.rs:2646:18:2646:25 | strings3 | | {EXTERNAL LOCATION} | & | @@ -5607,7 +10063,6 @@ inferType | main.rs:2661:13:2661:22 | range_full | | {EXTERNAL LOCATION} | RangeFull | | main.rs:2661:26:2661:27 | .. | | {EXTERNAL LOCATION} | RangeFull | | main.rs:2662:9:2662:51 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2662:13:2662:13 | i | | {EXTERNAL LOCATION} | Item | | main.rs:2662:18:2662:48 | &... | | {EXTERNAL LOCATION} | & | | main.rs:2662:19:2662:36 | [...] | | {EXTERNAL LOCATION} | [;] | | main.rs:2662:19:2662:36 | [...] | TArray | {EXTERNAL LOCATION} | i64 | @@ -6550,8 +11005,8 @@ inferType | main.rs:3061:5:3061:24 | ...::f(...) | | {EXTERNAL LOCATION} | () | | main.rs:3062:5:3062:17 | ...::f(...) | | {EXTERNAL LOCATION} | () | | main.rs:3063:5:3063:18 | ...::f(...) | | {EXTERNAL LOCATION} | () | -| main.rs:3064:5:3064:15 | ...::f(...) | | {EXTERNAL LOCATION} | trait Future | -| main.rs:3064:5:3064:15 | ...::f(...) | Output | {EXTERNAL LOCATION} | () | +| main.rs:3064:5:3064:15 | ...::f(...) | | {EXTERNAL LOCATION} | dyn Future | +| main.rs:3064:5:3064:15 | ...::f(...) | dyn(Output) | {EXTERNAL LOCATION} | () | | main.rs:3065:5:3065:19 | ...::f(...) | | {EXTERNAL LOCATION} | () | | main.rs:3066:5:3066:17 | ...::f(...) | | {EXTERNAL LOCATION} | () | | main.rs:3067:5:3067:14 | ...::f(...) | | {EXTERNAL LOCATION} | () | @@ -8360,4 +12815,99 @@ inferType | pattern_matching.rs:843:5:843:32 | patterns_in_let_statements(...) | | {EXTERNAL LOCATION} | () | | pattern_matching.rs:844:5:844:37 | patterns_in_function_parameters(...) | | {EXTERNAL LOCATION} | () | | pattern_matching.rs:845:5:845:30 | patterns_in_control_flow(...) | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:3:28:3:28 | x | | {EXTERNAL LOCATION} | *const | +| raw_pointer.rs:3:28:3:28 | x | TPtrConst | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:3:50:6:1 | { ... } | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:4:9:4:10 | _y | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:4:14:4:26 | { ... } | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:4:23:4:24 | * ... | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:4:24:4:24 | x | | {EXTERNAL LOCATION} | *const | +| raw_pointer.rs:4:24:4:24 | x | TPtrConst | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:5:5:5:5 | 0 | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:8:26:8:26 | x | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:8:26:8:26 | x | TPtrMut | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:8:47:11:1 | { ... } | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:9:9:9:10 | _y | | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:9:14:9:26 | { ... } | | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:9:23:9:24 | * ... | | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:9:24:9:24 | x | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:9:24:9:24 | x | TPtrMut | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:10:5:10:5 | 0 | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:13:23:19:1 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:14:9:14:9 | a | | {EXTERNAL LOCATION} | i64 | +| raw_pointer.rs:14:18:14:19 | 10 | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:14:18:14:19 | 10 | | {EXTERNAL LOCATION} | i64 | +| raw_pointer.rs:15:9:15:9 | x | | {EXTERNAL LOCATION} | *const | +| raw_pointer.rs:15:9:15:9 | x | TPtrConst | {EXTERNAL LOCATION} | i64 | +| raw_pointer.rs:15:13:15:24 | &raw const a | | {EXTERNAL LOCATION} | *const | +| raw_pointer.rs:15:13:15:24 | &raw const a | TPtrConst | {EXTERNAL LOCATION} | i64 | +| raw_pointer.rs:15:24:15:24 | a | | {EXTERNAL LOCATION} | i64 | +| raw_pointer.rs:16:5:18:5 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:17:13:17:14 | _y | | {EXTERNAL LOCATION} | i64 | +| raw_pointer.rs:17:18:17:19 | * ... | | {EXTERNAL LOCATION} | i64 | +| raw_pointer.rs:17:19:17:19 | x | | {EXTERNAL LOCATION} | *const | +| raw_pointer.rs:17:19:17:19 | x | TPtrConst | {EXTERNAL LOCATION} | i64 | +| raw_pointer.rs:21:21:27:1 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:22:13:22:13 | a | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:22:17:22:21 | 10i32 | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:23:9:23:9 | x | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:23:9:23:9 | x | TPtrMut | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:23:13:23:22 | &raw mut a | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:23:13:23:22 | &raw mut a | TPtrMut | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:23:22:23:22 | a | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:24:5:26:5 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:25:13:25:14 | _y | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:25:18:25:19 | * ... | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:25:19:25:19 | x | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:25:19:25:19 | x | TPtrMut | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:29:18:29:21 | cond | | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:29:30:40:1 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:30:9:30:9 | a | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:30:13:30:17 | 10i32 | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:32:9:32:19 | ptr_written | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:32:9:32:19 | ptr_written | TPtrMut | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:32:23:32:32 | null_mut(...) | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:32:23:32:32 | null_mut(...) | TPtrMut | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:33:5:39:5 | if cond {...} | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:33:8:33:11 | cond | | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:33:13:39:5 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:34:9:38:9 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:36:13:36:24 | * ... | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:36:13:36:28 | ... = ... | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:36:14:36:24 | ptr_written | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:36:14:36:24 | ptr_written | TPtrMut | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:36:28:36:28 | a | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:37:17:37:18 | _y | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:37:22:37:33 | * ... | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:37:23:37:33 | ptr_written | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:37:23:37:33 | ptr_written | TPtrMut | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:42:24:42:27 | cond | | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:42:36:51:1 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:44:9:44:16 | ptr_read | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:44:9:44:16 | ptr_read | TPtrMut | {EXTERNAL LOCATION} | i64 | +| raw_pointer.rs:44:20:44:29 | null_mut(...) | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:44:20:44:29 | null_mut(...) | TPtrMut | {EXTERNAL LOCATION} | i64 | +| raw_pointer.rs:45:5:50:5 | if cond {...} | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:45:8:45:11 | cond | | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:45:13:50:5 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:46:9:49:9 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:48:17:48:18 | _y | | {EXTERNAL LOCATION} | i64 | +| raw_pointer.rs:48:27:48:35 | * ... | | {EXTERNAL LOCATION} | i64 | +| raw_pointer.rs:48:28:48:35 | ptr_read | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:48:28:48:35 | ptr_read | TPtrMut | {EXTERNAL LOCATION} | i64 | +| raw_pointer.rs:53:15:60:1 | { ... } | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:54:5:54:32 | raw_pointer_const_deref(...) | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:54:29:54:31 | &10 | | {EXTERNAL LOCATION} | & | +| raw_pointer.rs:54:29:54:31 | &10 | TRef | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:54:30:54:31 | 10 | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:55:5:55:36 | raw_pointer_mut_deref(...) | | {EXTERNAL LOCATION} | i32 | +| raw_pointer.rs:55:27:55:35 | &mut true | | {EXTERNAL LOCATION} | & | +| raw_pointer.rs:55:27:55:35 | &mut true | TRef | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:55:32:55:35 | true | | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:56:5:56:22 | raw_const_borrow(...) | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:57:5:57:20 | raw_mut_borrow(...) | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:58:5:58:24 | raw_mut_write(...) | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:58:19:58:23 | false | | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:59:5:59:30 | raw_type_from_deref(...) | | {EXTERNAL LOCATION} | () | +| raw_pointer.rs:59:25:59:29 | false | | {EXTERNAL LOCATION} | bool | testFailures diff --git a/rust/ql/test/library-tests/type-inference/type-inference.ql b/rust/ql/test/library-tests/type-inference/type-inference.ql index 01af646007d..81cad0f975e 100644 --- a/rust/ql/test/library-tests/type-inference/type-inference.ql +++ b/rust/ql/test/library-tests/type-inference/type-inference.ql @@ -4,15 +4,25 @@ import codeql.rust.internal.Type import codeql.rust.internal.TypeInference as TypeInference import TypeInference -query predicate inferType(AstNode n, TypePath path, Type t) { - t = TypeInference::inferType(n, path) and - t != TUnknownType() and +private predicate relevantNode(AstNode n) { n.fromSource() and not n.isFromMacroExpansion() and not n instanceof IdentPat and // avoid overlap in the output with the underlying `Name` node not n instanceof LiteralPat // avoid overlap in the output with the underlying `Literal` node } +query predicate inferCertainType(AstNode n, TypePath path, Type t) { + t = TypeInference::CertainTypeInference::inferCertainType(n, path) and + t != TUnknownType() and + relevantNode(n) +} + +query predicate inferType(AstNode n, TypePath path, Type t) { + t = TypeInference::inferType(n, path) and + t != TUnknownType() and + relevantNode(n) +} + module ResolveTest implements TestSig { string getARelevantTag() { result = ["target", "fieldof"] } @@ -38,11 +48,11 @@ module ResolveTest implements TestSig { not target.(Function).getName().getText() = ["panic_fmt", "_print", "format", "must_use"] and tag = "target" or - target = resolveStructFieldExpr(source) and + target = resolveStructFieldExpr(source, _) and any(Struct s | s.getStructField(_) = target).getName().getText() = value and tag = "fieldof" or - target = resolveTupleFieldExpr(source) and + target = resolveTupleFieldExpr(source, _) and any(Struct s | s.getTupleField(_) = target).getName().getText() = value and tag = "fieldof" ) diff --git a/rust/ql/test/library-tests/variables/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/variables/CONSISTENCY/PathResolutionConsistency.expected index 6b4022b86e5..8dfdad04adf 100644 --- a/rust/ql/test/library-tests/variables/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/library-tests/variables/CONSISTENCY/PathResolutionConsistency.expected @@ -1,3 +1,17 @@ -multipleCallTargets +multipleResolvedTargets +| main.rs:16:15:16:16 | * ... | | main.rs:91:19:91:40 | ...::from(...) | | main.rs:113:19:113:40 | ...::from(...) | +| main.rs:507:5:507:10 | * ... | +| main.rs:512:5:512:6 | * ... | +| main.rs:513:9:513:10 | * ... | +| main.rs:514:9:514:10 | * ... | +| main.rs:519:5:519:6 | * ... | +| main.rs:520:9:520:10 | * ... | +| main.rs:521:9:521:10 | * ... | +| main.rs:522:5:522:6 | * ... | +| main.rs:530:5:530:6 | * ... | +| main.rs:542:5:542:7 | * ... | +| main.rs:542:6:542:7 | * ... | +| main.rs:552:5:552:6 | * ... | +| main.rs:699:9:699:13 | * ... | diff --git a/rust/ql/test/library-tests/variables/Cfg.expected b/rust/ql/test/library-tests/variables/Cfg.expected index 7d8da915bfb..f93586d373b 100644 --- a/rust/ql/test/library-tests/variables/Cfg.expected +++ b/rust/ql/test/library-tests/variables/Cfg.expected @@ -1798,145 +1798,216 @@ edges | main.rs:753:5:753:16 | print_i64(...) | main.rs:744:18:754:1 | { ... } | | | main.rs:753:5:753:17 | ExprStmt | main.rs:753:5:753:13 | print_i64 | | | main.rs:753:15:753:15 | x | main.rs:753:5:753:16 | print_i64(...) | | -| main.rs:756:1:800:1 | enter fn main | main.rs:757:5:757:25 | ExprStmt | | -| main.rs:756:1:800:1 | exit fn main (normal) | main.rs:756:1:800:1 | exit fn main | | -| main.rs:756:11:800:1 | { ... } | main.rs:756:1:800:1 | exit fn main (normal) | | -| main.rs:757:5:757:22 | immutable_variable | main.rs:757:5:757:24 | immutable_variable(...) | | -| main.rs:757:5:757:24 | immutable_variable(...) | main.rs:758:5:758:23 | ExprStmt | | -| main.rs:757:5:757:25 | ExprStmt | main.rs:757:5:757:22 | immutable_variable | | -| main.rs:758:5:758:20 | mutable_variable | main.rs:758:5:758:22 | mutable_variable(...) | | -| main.rs:758:5:758:22 | mutable_variable(...) | main.rs:759:5:759:40 | ExprStmt | | -| main.rs:758:5:758:23 | ExprStmt | main.rs:758:5:758:20 | mutable_variable | | -| main.rs:759:5:759:37 | mutable_variable_immutable_borrow | main.rs:759:5:759:39 | mutable_variable_immutable_borrow(...) | | -| main.rs:759:5:759:39 | mutable_variable_immutable_borrow(...) | main.rs:760:5:760:23 | ExprStmt | | -| main.rs:759:5:759:40 | ExprStmt | main.rs:759:5:759:37 | mutable_variable_immutable_borrow | | -| main.rs:760:5:760:20 | variable_shadow1 | main.rs:760:5:760:22 | variable_shadow1(...) | | -| main.rs:760:5:760:22 | variable_shadow1(...) | main.rs:761:5:761:23 | ExprStmt | | -| main.rs:760:5:760:23 | ExprStmt | main.rs:760:5:760:20 | variable_shadow1 | | -| main.rs:761:5:761:20 | variable_shadow2 | main.rs:761:5:761:22 | variable_shadow2(...) | | -| main.rs:761:5:761:22 | variable_shadow2(...) | main.rs:762:5:762:19 | ExprStmt | | -| main.rs:761:5:761:23 | ExprStmt | main.rs:761:5:761:20 | variable_shadow2 | | -| main.rs:762:5:762:16 | let_pattern1 | main.rs:762:5:762:18 | let_pattern1(...) | | -| main.rs:762:5:762:18 | let_pattern1(...) | main.rs:763:5:763:19 | ExprStmt | | -| main.rs:762:5:762:19 | ExprStmt | main.rs:762:5:762:16 | let_pattern1 | | -| main.rs:763:5:763:16 | let_pattern2 | main.rs:763:5:763:18 | let_pattern2(...) | | -| main.rs:763:5:763:18 | let_pattern2(...) | main.rs:764:5:764:19 | ExprStmt | | -| main.rs:763:5:763:19 | ExprStmt | main.rs:763:5:763:16 | let_pattern2 | | -| main.rs:764:5:764:16 | let_pattern3 | main.rs:764:5:764:18 | let_pattern3(...) | | -| main.rs:764:5:764:18 | let_pattern3(...) | main.rs:765:5:765:19 | ExprStmt | | -| main.rs:764:5:764:19 | ExprStmt | main.rs:764:5:764:16 | let_pattern3 | | -| main.rs:765:5:765:16 | let_pattern4 | main.rs:765:5:765:18 | let_pattern4(...) | | -| main.rs:765:5:765:18 | let_pattern4(...) | main.rs:766:5:766:21 | ExprStmt | | -| main.rs:765:5:765:19 | ExprStmt | main.rs:765:5:765:16 | let_pattern4 | | -| main.rs:766:5:766:18 | match_pattern1 | main.rs:766:5:766:20 | match_pattern1(...) | | -| main.rs:766:5:766:20 | match_pattern1(...) | main.rs:767:5:767:21 | ExprStmt | | -| main.rs:766:5:766:21 | ExprStmt | main.rs:766:5:766:18 | match_pattern1 | | -| main.rs:767:5:767:18 | match_pattern2 | main.rs:767:5:767:20 | match_pattern2(...) | | -| main.rs:767:5:767:20 | match_pattern2(...) | main.rs:768:5:768:21 | ExprStmt | | -| main.rs:767:5:767:21 | ExprStmt | main.rs:767:5:767:18 | match_pattern2 | | -| main.rs:768:5:768:18 | match_pattern3 | main.rs:768:5:768:20 | match_pattern3(...) | | -| main.rs:768:5:768:20 | match_pattern3(...) | main.rs:769:5:769:21 | ExprStmt | | -| main.rs:768:5:768:21 | ExprStmt | main.rs:768:5:768:18 | match_pattern3 | | -| main.rs:769:5:769:18 | match_pattern4 | main.rs:769:5:769:20 | match_pattern4(...) | | -| main.rs:769:5:769:20 | match_pattern4(...) | main.rs:770:5:770:21 | ExprStmt | | -| main.rs:769:5:769:21 | ExprStmt | main.rs:769:5:769:18 | match_pattern4 | | -| main.rs:770:5:770:18 | match_pattern5 | main.rs:770:5:770:20 | match_pattern5(...) | | -| main.rs:770:5:770:20 | match_pattern5(...) | main.rs:771:5:771:21 | ExprStmt | | -| main.rs:770:5:770:21 | ExprStmt | main.rs:770:5:770:18 | match_pattern5 | | -| main.rs:771:5:771:18 | match_pattern6 | main.rs:771:5:771:20 | match_pattern6(...) | | -| main.rs:771:5:771:20 | match_pattern6(...) | main.rs:772:5:772:21 | ExprStmt | | -| main.rs:771:5:771:21 | ExprStmt | main.rs:771:5:771:18 | match_pattern6 | | -| main.rs:772:5:772:18 | match_pattern7 | main.rs:772:5:772:20 | match_pattern7(...) | | -| main.rs:772:5:772:20 | match_pattern7(...) | main.rs:773:5:773:21 | ExprStmt | | -| main.rs:772:5:772:21 | ExprStmt | main.rs:772:5:772:18 | match_pattern7 | | -| main.rs:773:5:773:18 | match_pattern8 | main.rs:773:5:773:20 | match_pattern8(...) | | -| main.rs:773:5:773:20 | match_pattern8(...) | main.rs:774:5:774:21 | ExprStmt | | -| main.rs:773:5:773:21 | ExprStmt | main.rs:773:5:773:18 | match_pattern8 | | -| main.rs:774:5:774:18 | match_pattern9 | main.rs:774:5:774:20 | match_pattern9(...) | | -| main.rs:774:5:774:20 | match_pattern9(...) | main.rs:775:5:775:22 | ExprStmt | | -| main.rs:774:5:774:21 | ExprStmt | main.rs:774:5:774:18 | match_pattern9 | | -| main.rs:775:5:775:19 | match_pattern10 | main.rs:775:5:775:21 | match_pattern10(...) | | -| main.rs:775:5:775:21 | match_pattern10(...) | main.rs:776:5:776:22 | ExprStmt | | -| main.rs:775:5:775:22 | ExprStmt | main.rs:775:5:775:19 | match_pattern10 | | -| main.rs:776:5:776:19 | match_pattern11 | main.rs:776:5:776:21 | match_pattern11(...) | | -| main.rs:776:5:776:21 | match_pattern11(...) | main.rs:777:5:777:22 | ExprStmt | | -| main.rs:776:5:776:22 | ExprStmt | main.rs:776:5:776:19 | match_pattern11 | | -| main.rs:777:5:777:19 | match_pattern12 | main.rs:777:5:777:21 | match_pattern12(...) | | -| main.rs:777:5:777:21 | match_pattern12(...) | main.rs:778:5:778:22 | ExprStmt | | -| main.rs:777:5:777:22 | ExprStmt | main.rs:777:5:777:19 | match_pattern12 | | -| main.rs:778:5:778:19 | match_pattern13 | main.rs:778:5:778:21 | match_pattern13(...) | | -| main.rs:778:5:778:21 | match_pattern13(...) | main.rs:779:5:779:22 | ExprStmt | | -| main.rs:778:5:778:22 | ExprStmt | main.rs:778:5:778:19 | match_pattern13 | | -| main.rs:779:5:779:19 | match_pattern14 | main.rs:779:5:779:21 | match_pattern14(...) | | -| main.rs:779:5:779:21 | match_pattern14(...) | main.rs:780:5:780:22 | ExprStmt | | -| main.rs:779:5:779:22 | ExprStmt | main.rs:779:5:779:19 | match_pattern14 | | -| main.rs:780:5:780:19 | match_pattern15 | main.rs:780:5:780:21 | match_pattern15(...) | | -| main.rs:780:5:780:21 | match_pattern15(...) | main.rs:781:5:781:22 | ExprStmt | | -| main.rs:780:5:780:22 | ExprStmt | main.rs:780:5:780:19 | match_pattern15 | | -| main.rs:781:5:781:19 | match_pattern16 | main.rs:781:5:781:21 | match_pattern16(...) | | -| main.rs:781:5:781:21 | match_pattern16(...) | main.rs:782:5:782:36 | ExprStmt | | -| main.rs:781:5:781:22 | ExprStmt | main.rs:781:5:781:19 | match_pattern16 | | -| main.rs:782:5:782:18 | param_pattern1 | main.rs:782:20:782:22 | "a" | | -| main.rs:782:5:782:35 | param_pattern1(...) | main.rs:783:5:783:37 | ExprStmt | | -| main.rs:782:5:782:36 | ExprStmt | main.rs:782:5:782:18 | param_pattern1 | | -| main.rs:782:20:782:22 | "a" | main.rs:782:26:782:28 | "b" | | -| main.rs:782:25:782:34 | TupleExpr | main.rs:782:5:782:35 | param_pattern1(...) | | -| main.rs:782:26:782:28 | "b" | main.rs:782:31:782:33 | "c" | | -| main.rs:782:31:782:33 | "c" | main.rs:782:25:782:34 | TupleExpr | | -| main.rs:783:5:783:18 | param_pattern2 | main.rs:783:20:783:31 | ...::Left | | -| main.rs:783:5:783:36 | param_pattern2(...) | main.rs:784:5:784:26 | ExprStmt | | -| main.rs:783:5:783:37 | ExprStmt | main.rs:783:5:783:18 | param_pattern2 | | -| main.rs:783:20:783:31 | ...::Left | main.rs:783:33:783:34 | 45 | | -| main.rs:783:20:783:35 | ...::Left(...) | main.rs:783:5:783:36 | param_pattern2(...) | | -| main.rs:783:33:783:34 | 45 | main.rs:783:20:783:35 | ...::Left(...) | | -| main.rs:784:5:784:23 | destruct_assignment | main.rs:784:5:784:25 | destruct_assignment(...) | | -| main.rs:784:5:784:25 | destruct_assignment(...) | main.rs:785:5:785:23 | ExprStmt | | -| main.rs:784:5:784:26 | ExprStmt | main.rs:784:5:784:23 | destruct_assignment | | -| main.rs:785:5:785:20 | closure_variable | main.rs:785:5:785:22 | closure_variable(...) | | -| main.rs:785:5:785:22 | closure_variable(...) | main.rs:786:5:786:22 | ExprStmt | | -| main.rs:785:5:785:23 | ExprStmt | main.rs:785:5:785:20 | closure_variable | | -| main.rs:786:5:786:19 | nested_function | main.rs:786:5:786:21 | nested_function(...) | | -| main.rs:786:5:786:21 | nested_function(...) | main.rs:787:5:787:19 | ExprStmt | | -| main.rs:786:5:786:22 | ExprStmt | main.rs:786:5:786:19 | nested_function | | -| main.rs:787:5:787:16 | for_variable | main.rs:787:5:787:18 | for_variable(...) | | -| main.rs:787:5:787:18 | for_variable(...) | main.rs:788:5:788:17 | ExprStmt | | -| main.rs:787:5:787:19 | ExprStmt | main.rs:787:5:787:16 | for_variable | | -| main.rs:788:5:788:14 | add_assign | main.rs:788:5:788:16 | add_assign(...) | | -| main.rs:788:5:788:16 | add_assign(...) | main.rs:789:5:789:13 | ExprStmt | | -| main.rs:788:5:788:17 | ExprStmt | main.rs:788:5:788:14 | add_assign | | -| main.rs:789:5:789:10 | mutate | main.rs:789:5:789:12 | mutate(...) | | -| main.rs:789:5:789:12 | mutate(...) | main.rs:790:5:790:17 | ExprStmt | | -| main.rs:789:5:789:13 | ExprStmt | main.rs:789:5:789:10 | mutate | | -| main.rs:790:5:790:14 | mutate_arg | main.rs:790:5:790:16 | mutate_arg(...) | | -| main.rs:790:5:790:16 | mutate_arg(...) | main.rs:791:5:791:12 | ExprStmt | | -| main.rs:790:5:790:17 | ExprStmt | main.rs:790:5:790:14 | mutate_arg | | -| main.rs:791:5:791:9 | alias | main.rs:791:5:791:11 | alias(...) | | -| main.rs:791:5:791:11 | alias(...) | main.rs:792:5:792:18 | ExprStmt | | -| main.rs:791:5:791:12 | ExprStmt | main.rs:791:5:791:9 | alias | | -| main.rs:792:5:792:15 | capture_mut | main.rs:792:5:792:17 | capture_mut(...) | | -| main.rs:792:5:792:17 | capture_mut(...) | main.rs:793:5:793:20 | ExprStmt | | -| main.rs:792:5:792:18 | ExprStmt | main.rs:792:5:792:15 | capture_mut | | -| main.rs:793:5:793:17 | capture_immut | main.rs:793:5:793:19 | capture_immut(...) | | -| main.rs:793:5:793:19 | capture_immut(...) | main.rs:794:5:794:26 | ExprStmt | | -| main.rs:793:5:793:20 | ExprStmt | main.rs:793:5:793:17 | capture_immut | | -| main.rs:794:5:794:23 | async_block_capture | main.rs:794:5:794:25 | async_block_capture(...) | | -| main.rs:794:5:794:25 | async_block_capture(...) | main.rs:795:5:795:14 | ExprStmt | | -| main.rs:794:5:794:26 | ExprStmt | main.rs:794:5:794:23 | async_block_capture | | -| main.rs:795:5:795:11 | structs | main.rs:795:5:795:13 | structs(...) | | -| main.rs:795:5:795:13 | structs(...) | main.rs:796:5:796:14 | ExprStmt | | -| main.rs:795:5:795:14 | ExprStmt | main.rs:795:5:795:11 | structs | | -| main.rs:796:5:796:11 | ref_arg | main.rs:796:5:796:13 | ref_arg(...) | | -| main.rs:796:5:796:13 | ref_arg(...) | main.rs:797:5:797:30 | ExprStmt | | -| main.rs:796:5:796:14 | ExprStmt | main.rs:796:5:796:11 | ref_arg | | -| main.rs:797:5:797:27 | ref_methodcall_receiver | main.rs:797:5:797:29 | ref_methodcall_receiver(...) | | -| main.rs:797:5:797:29 | ref_methodcall_receiver(...) | main.rs:798:5:798:23 | ExprStmt | | -| main.rs:797:5:797:30 | ExprStmt | main.rs:797:5:797:27 | ref_methodcall_receiver | | -| main.rs:798:5:798:20 | macro_invocation | main.rs:798:5:798:22 | macro_invocation(...) | | -| main.rs:798:5:798:22 | macro_invocation(...) | main.rs:799:5:799:18 | ExprStmt | | -| main.rs:798:5:798:23 | ExprStmt | main.rs:798:5:798:20 | macro_invocation | | -| main.rs:799:5:799:15 | capture_phi | main.rs:799:5:799:17 | capture_phi(...) | | -| main.rs:799:5:799:17 | capture_phi(...) | main.rs:756:11:800:1 | { ... } | | -| main.rs:799:5:799:18 | ExprStmt | main.rs:799:5:799:15 | capture_phi | | +| main.rs:757:5:772:5 | enter fn test | main.rs:759:9:759:25 | let ... = ... | | +| main.rs:757:5:772:5 | exit fn test (normal) | main.rs:757:5:772:5 | exit fn test | | +| main.rs:758:34:772:5 | { ... } | main.rs:757:5:772:5 | exit fn test (normal) | | +| main.rs:759:9:759:25 | let ... = ... | main.rs:759:17:759:20 | Some | | +| main.rs:759:13:759:13 | x | main.rs:759:13:759:13 | x | | +| main.rs:759:13:759:13 | x | main.rs:760:9:767:10 | let ... = ... | match | +| main.rs:759:17:759:20 | Some | main.rs:759:22:759:23 | 42 | | +| main.rs:759:17:759:24 | Some(...) | main.rs:759:13:759:13 | x | | +| main.rs:759:22:759:23 | 42 | main.rs:759:17:759:24 | Some(...) | | +| main.rs:760:9:767:10 | let ... = ... | main.rs:761:19:761:19 | x | | +| main.rs:760:13:760:13 | y | main.rs:760:13:760:13 | y | | +| main.rs:760:13:760:13 | y | main.rs:768:15:768:15 | y | match | +| main.rs:761:13:767:9 | match x { ... } | main.rs:760:13:760:13 | y | | +| main.rs:761:19:761:19 | x | main.rs:762:13:762:19 | Some(...) | | +| main.rs:762:13:762:19 | Some(...) | main.rs:762:18:762:18 | y | match | +| main.rs:762:13:762:19 | Some(...) | main.rs:765:13:765:16 | None | no-match | +| main.rs:762:18:762:18 | y | main.rs:762:18:762:18 | y | | +| main.rs:762:18:762:18 | y | main.rs:763:17:763:20 | None | match | +| main.rs:762:24:764:13 | { ... } | main.rs:761:13:767:9 | match x { ... } | | +| main.rs:763:17:763:20 | None | main.rs:762:24:764:13 | { ... } | | +| main.rs:765:13:765:16 | None | main.rs:765:13:765:16 | None | | +| main.rs:765:13:765:16 | None | main.rs:766:17:766:20 | None | match | +| main.rs:766:17:766:20 | None | main.rs:761:13:767:9 | match x { ... } | | +| main.rs:768:9:771:9 | match y { ... } | main.rs:758:34:772:5 | { ... } | | +| main.rs:768:15:768:15 | y | main.rs:769:13:769:16 | N0ne | | +| main.rs:769:13:769:16 | N0ne | main.rs:769:13:769:16 | N0ne | | +| main.rs:769:13:769:16 | N0ne | main.rs:770:17:770:20 | N0ne | match | +| main.rs:770:17:770:20 | N0ne | main.rs:768:9:771:9 | match y { ... } | | +| main.rs:774:5:781:5 | enter fn test2 | main.rs:776:9:777:17 | let ... = test | | +| main.rs:774:5:781:5 | exit fn test2 (normal) | main.rs:774:5:781:5 | exit fn test2 | | +| main.rs:775:31:781:5 | { ... } | main.rs:774:5:781:5 | exit fn test2 (normal) | | +| main.rs:776:9:777:17 | let ... = test | main.rs:777:13:777:16 | test | | +| main.rs:776:13:776:22 | test_alias | main.rs:776:13:776:22 | test_alias | | +| main.rs:776:13:776:22 | test_alias | main.rs:778:9:779:25 | let ... = ... | match | +| main.rs:777:13:777:16 | test | main.rs:776:13:776:22 | test_alias | | +| main.rs:778:9:779:25 | let ... = ... | main.rs:779:13:779:22 | test_alias | | +| main.rs:778:13:778:16 | test | main.rs:778:13:778:16 | test | | +| main.rs:778:13:778:16 | test | main.rs:780:9:780:12 | test | match | +| main.rs:779:13:779:22 | test_alias | main.rs:779:13:779:24 | test_alias(...) | | +| main.rs:779:13:779:24 | test_alias(...) | main.rs:778:13:778:16 | test | | +| main.rs:780:9:780:12 | test | main.rs:775:31:781:5 | { ... } | | +| main.rs:785:5:798:5 | enter fn test3 | main.rs:787:9:787:24 | let ... = ... | | +| main.rs:785:5:798:5 | exit fn test3 (normal) | main.rs:785:5:798:5 | exit fn test3 | | +| main.rs:786:16:798:5 | { ... } | main.rs:785:5:798:5 | exit fn test3 (normal) | | +| main.rs:787:9:787:24 | let ... = ... | main.rs:787:17:787:20 | Some | | +| main.rs:787:13:787:13 | x | main.rs:787:13:787:13 | x | | +| main.rs:787:13:787:13 | x | main.rs:788:9:792:10 | ExprStmt | match | +| main.rs:787:17:787:20 | Some | main.rs:787:22:787:22 | 0 | | +| main.rs:787:17:787:23 | Some(...) | main.rs:787:13:787:13 | x | | +| main.rs:787:22:787:22 | 0 | main.rs:787:17:787:23 | Some(...) | | +| main.rs:788:9:792:9 | match x { ... } | main.rs:793:9:797:10 | ExprStmt | | +| main.rs:788:9:792:10 | ExprStmt | main.rs:788:15:788:15 | x | | +| main.rs:788:15:788:15 | x | main.rs:789:13:789:19 | Some(...) | | +| main.rs:789:13:789:19 | Some(...) | main.rs:789:18:789:18 | x | match | +| main.rs:789:13:789:19 | Some(...) | main.rs:791:13:791:13 | _ | no-match | +| main.rs:789:18:789:18 | x | main.rs:789:18:789:18 | x | | +| main.rs:789:18:789:18 | x | main.rs:790:20:790:20 | x | match | +| main.rs:790:20:790:20 | x | main.rs:788:9:792:9 | match x { ... } | | +| main.rs:791:13:791:13 | _ | main.rs:791:18:791:18 | 0 | match | +| main.rs:791:18:791:18 | 0 | main.rs:788:9:792:9 | match x { ... } | | +| main.rs:793:9:797:9 | match x { ... } | main.rs:786:16:798:5 | { ... } | | +| main.rs:793:9:797:10 | ExprStmt | main.rs:793:15:793:15 | x | | +| main.rs:793:15:793:15 | x | main.rs:794:13:794:19 | Some(...) | | +| main.rs:794:13:794:19 | Some(...) | main.rs:794:18:794:18 | z | match | +| main.rs:794:13:794:19 | Some(...) | main.rs:796:13:796:13 | _ | no-match | +| main.rs:794:18:794:18 | z | main.rs:794:18:794:18 | z | | +| main.rs:794:18:794:18 | z | main.rs:795:17:795:17 | z | match | +| main.rs:794:18:794:18 | z | main.rs:796:13:796:13 | _ | no-match | +| main.rs:795:17:795:17 | z | main.rs:793:9:797:9 | match x { ... } | | +| main.rs:796:13:796:13 | _ | main.rs:796:18:796:18 | 0 | match | +| main.rs:796:18:796:18 | 0 | main.rs:793:9:797:9 | match x { ... } | | +| main.rs:801:1:845:1 | enter fn main | main.rs:802:5:802:25 | ExprStmt | | +| main.rs:801:1:845:1 | exit fn main (normal) | main.rs:801:1:845:1 | exit fn main | | +| main.rs:801:11:845:1 | { ... } | main.rs:801:1:845:1 | exit fn main (normal) | | +| main.rs:802:5:802:22 | immutable_variable | main.rs:802:5:802:24 | immutable_variable(...) | | +| main.rs:802:5:802:24 | immutable_variable(...) | main.rs:803:5:803:23 | ExprStmt | | +| main.rs:802:5:802:25 | ExprStmt | main.rs:802:5:802:22 | immutable_variable | | +| main.rs:803:5:803:20 | mutable_variable | main.rs:803:5:803:22 | mutable_variable(...) | | +| main.rs:803:5:803:22 | mutable_variable(...) | main.rs:804:5:804:40 | ExprStmt | | +| main.rs:803:5:803:23 | ExprStmt | main.rs:803:5:803:20 | mutable_variable | | +| main.rs:804:5:804:37 | mutable_variable_immutable_borrow | main.rs:804:5:804:39 | mutable_variable_immutable_borrow(...) | | +| main.rs:804:5:804:39 | mutable_variable_immutable_borrow(...) | main.rs:805:5:805:23 | ExprStmt | | +| main.rs:804:5:804:40 | ExprStmt | main.rs:804:5:804:37 | mutable_variable_immutable_borrow | | +| main.rs:805:5:805:20 | variable_shadow1 | main.rs:805:5:805:22 | variable_shadow1(...) | | +| main.rs:805:5:805:22 | variable_shadow1(...) | main.rs:806:5:806:23 | ExprStmt | | +| main.rs:805:5:805:23 | ExprStmt | main.rs:805:5:805:20 | variable_shadow1 | | +| main.rs:806:5:806:20 | variable_shadow2 | main.rs:806:5:806:22 | variable_shadow2(...) | | +| main.rs:806:5:806:22 | variable_shadow2(...) | main.rs:807:5:807:19 | ExprStmt | | +| main.rs:806:5:806:23 | ExprStmt | main.rs:806:5:806:20 | variable_shadow2 | | +| main.rs:807:5:807:16 | let_pattern1 | main.rs:807:5:807:18 | let_pattern1(...) | | +| main.rs:807:5:807:18 | let_pattern1(...) | main.rs:808:5:808:19 | ExprStmt | | +| main.rs:807:5:807:19 | ExprStmt | main.rs:807:5:807:16 | let_pattern1 | | +| main.rs:808:5:808:16 | let_pattern2 | main.rs:808:5:808:18 | let_pattern2(...) | | +| main.rs:808:5:808:18 | let_pattern2(...) | main.rs:809:5:809:19 | ExprStmt | | +| main.rs:808:5:808:19 | ExprStmt | main.rs:808:5:808:16 | let_pattern2 | | +| main.rs:809:5:809:16 | let_pattern3 | main.rs:809:5:809:18 | let_pattern3(...) | | +| main.rs:809:5:809:18 | let_pattern3(...) | main.rs:810:5:810:19 | ExprStmt | | +| main.rs:809:5:809:19 | ExprStmt | main.rs:809:5:809:16 | let_pattern3 | | +| main.rs:810:5:810:16 | let_pattern4 | main.rs:810:5:810:18 | let_pattern4(...) | | +| main.rs:810:5:810:18 | let_pattern4(...) | main.rs:811:5:811:21 | ExprStmt | | +| main.rs:810:5:810:19 | ExprStmt | main.rs:810:5:810:16 | let_pattern4 | | +| main.rs:811:5:811:18 | match_pattern1 | main.rs:811:5:811:20 | match_pattern1(...) | | +| main.rs:811:5:811:20 | match_pattern1(...) | main.rs:812:5:812:21 | ExprStmt | | +| main.rs:811:5:811:21 | ExprStmt | main.rs:811:5:811:18 | match_pattern1 | | +| main.rs:812:5:812:18 | match_pattern2 | main.rs:812:5:812:20 | match_pattern2(...) | | +| main.rs:812:5:812:20 | match_pattern2(...) | main.rs:813:5:813:21 | ExprStmt | | +| main.rs:812:5:812:21 | ExprStmt | main.rs:812:5:812:18 | match_pattern2 | | +| main.rs:813:5:813:18 | match_pattern3 | main.rs:813:5:813:20 | match_pattern3(...) | | +| main.rs:813:5:813:20 | match_pattern3(...) | main.rs:814:5:814:21 | ExprStmt | | +| main.rs:813:5:813:21 | ExprStmt | main.rs:813:5:813:18 | match_pattern3 | | +| main.rs:814:5:814:18 | match_pattern4 | main.rs:814:5:814:20 | match_pattern4(...) | | +| main.rs:814:5:814:20 | match_pattern4(...) | main.rs:815:5:815:21 | ExprStmt | | +| main.rs:814:5:814:21 | ExprStmt | main.rs:814:5:814:18 | match_pattern4 | | +| main.rs:815:5:815:18 | match_pattern5 | main.rs:815:5:815:20 | match_pattern5(...) | | +| main.rs:815:5:815:20 | match_pattern5(...) | main.rs:816:5:816:21 | ExprStmt | | +| main.rs:815:5:815:21 | ExprStmt | main.rs:815:5:815:18 | match_pattern5 | | +| main.rs:816:5:816:18 | match_pattern6 | main.rs:816:5:816:20 | match_pattern6(...) | | +| main.rs:816:5:816:20 | match_pattern6(...) | main.rs:817:5:817:21 | ExprStmt | | +| main.rs:816:5:816:21 | ExprStmt | main.rs:816:5:816:18 | match_pattern6 | | +| main.rs:817:5:817:18 | match_pattern7 | main.rs:817:5:817:20 | match_pattern7(...) | | +| main.rs:817:5:817:20 | match_pattern7(...) | main.rs:818:5:818:21 | ExprStmt | | +| main.rs:817:5:817:21 | ExprStmt | main.rs:817:5:817:18 | match_pattern7 | | +| main.rs:818:5:818:18 | match_pattern8 | main.rs:818:5:818:20 | match_pattern8(...) | | +| main.rs:818:5:818:20 | match_pattern8(...) | main.rs:819:5:819:21 | ExprStmt | | +| main.rs:818:5:818:21 | ExprStmt | main.rs:818:5:818:18 | match_pattern8 | | +| main.rs:819:5:819:18 | match_pattern9 | main.rs:819:5:819:20 | match_pattern9(...) | | +| main.rs:819:5:819:20 | match_pattern9(...) | main.rs:820:5:820:22 | ExprStmt | | +| main.rs:819:5:819:21 | ExprStmt | main.rs:819:5:819:18 | match_pattern9 | | +| main.rs:820:5:820:19 | match_pattern10 | main.rs:820:5:820:21 | match_pattern10(...) | | +| main.rs:820:5:820:21 | match_pattern10(...) | main.rs:821:5:821:22 | ExprStmt | | +| main.rs:820:5:820:22 | ExprStmt | main.rs:820:5:820:19 | match_pattern10 | | +| main.rs:821:5:821:19 | match_pattern11 | main.rs:821:5:821:21 | match_pattern11(...) | | +| main.rs:821:5:821:21 | match_pattern11(...) | main.rs:822:5:822:22 | ExprStmt | | +| main.rs:821:5:821:22 | ExprStmt | main.rs:821:5:821:19 | match_pattern11 | | +| main.rs:822:5:822:19 | match_pattern12 | main.rs:822:5:822:21 | match_pattern12(...) | | +| main.rs:822:5:822:21 | match_pattern12(...) | main.rs:823:5:823:22 | ExprStmt | | +| main.rs:822:5:822:22 | ExprStmt | main.rs:822:5:822:19 | match_pattern12 | | +| main.rs:823:5:823:19 | match_pattern13 | main.rs:823:5:823:21 | match_pattern13(...) | | +| main.rs:823:5:823:21 | match_pattern13(...) | main.rs:824:5:824:22 | ExprStmt | | +| main.rs:823:5:823:22 | ExprStmt | main.rs:823:5:823:19 | match_pattern13 | | +| main.rs:824:5:824:19 | match_pattern14 | main.rs:824:5:824:21 | match_pattern14(...) | | +| main.rs:824:5:824:21 | match_pattern14(...) | main.rs:825:5:825:22 | ExprStmt | | +| main.rs:824:5:824:22 | ExprStmt | main.rs:824:5:824:19 | match_pattern14 | | +| main.rs:825:5:825:19 | match_pattern15 | main.rs:825:5:825:21 | match_pattern15(...) | | +| main.rs:825:5:825:21 | match_pattern15(...) | main.rs:826:5:826:22 | ExprStmt | | +| main.rs:825:5:825:22 | ExprStmt | main.rs:825:5:825:19 | match_pattern15 | | +| main.rs:826:5:826:19 | match_pattern16 | main.rs:826:5:826:21 | match_pattern16(...) | | +| main.rs:826:5:826:21 | match_pattern16(...) | main.rs:827:5:827:36 | ExprStmt | | +| main.rs:826:5:826:22 | ExprStmt | main.rs:826:5:826:19 | match_pattern16 | | +| main.rs:827:5:827:18 | param_pattern1 | main.rs:827:20:827:22 | "a" | | +| main.rs:827:5:827:35 | param_pattern1(...) | main.rs:828:5:828:37 | ExprStmt | | +| main.rs:827:5:827:36 | ExprStmt | main.rs:827:5:827:18 | param_pattern1 | | +| main.rs:827:20:827:22 | "a" | main.rs:827:26:827:28 | "b" | | +| main.rs:827:25:827:34 | TupleExpr | main.rs:827:5:827:35 | param_pattern1(...) | | +| main.rs:827:26:827:28 | "b" | main.rs:827:31:827:33 | "c" | | +| main.rs:827:31:827:33 | "c" | main.rs:827:25:827:34 | TupleExpr | | +| main.rs:828:5:828:18 | param_pattern2 | main.rs:828:20:828:31 | ...::Left | | +| main.rs:828:5:828:36 | param_pattern2(...) | main.rs:829:5:829:26 | ExprStmt | | +| main.rs:828:5:828:37 | ExprStmt | main.rs:828:5:828:18 | param_pattern2 | | +| main.rs:828:20:828:31 | ...::Left | main.rs:828:33:828:34 | 45 | | +| main.rs:828:20:828:35 | ...::Left(...) | main.rs:828:5:828:36 | param_pattern2(...) | | +| main.rs:828:33:828:34 | 45 | main.rs:828:20:828:35 | ...::Left(...) | | +| main.rs:829:5:829:23 | destruct_assignment | main.rs:829:5:829:25 | destruct_assignment(...) | | +| main.rs:829:5:829:25 | destruct_assignment(...) | main.rs:830:5:830:23 | ExprStmt | | +| main.rs:829:5:829:26 | ExprStmt | main.rs:829:5:829:23 | destruct_assignment | | +| main.rs:830:5:830:20 | closure_variable | main.rs:830:5:830:22 | closure_variable(...) | | +| main.rs:830:5:830:22 | closure_variable(...) | main.rs:831:5:831:22 | ExprStmt | | +| main.rs:830:5:830:23 | ExprStmt | main.rs:830:5:830:20 | closure_variable | | +| main.rs:831:5:831:19 | nested_function | main.rs:831:5:831:21 | nested_function(...) | | +| main.rs:831:5:831:21 | nested_function(...) | main.rs:832:5:832:19 | ExprStmt | | +| main.rs:831:5:831:22 | ExprStmt | main.rs:831:5:831:19 | nested_function | | +| main.rs:832:5:832:16 | for_variable | main.rs:832:5:832:18 | for_variable(...) | | +| main.rs:832:5:832:18 | for_variable(...) | main.rs:833:5:833:17 | ExprStmt | | +| main.rs:832:5:832:19 | ExprStmt | main.rs:832:5:832:16 | for_variable | | +| main.rs:833:5:833:14 | add_assign | main.rs:833:5:833:16 | add_assign(...) | | +| main.rs:833:5:833:16 | add_assign(...) | main.rs:834:5:834:13 | ExprStmt | | +| main.rs:833:5:833:17 | ExprStmt | main.rs:833:5:833:14 | add_assign | | +| main.rs:834:5:834:10 | mutate | main.rs:834:5:834:12 | mutate(...) | | +| main.rs:834:5:834:12 | mutate(...) | main.rs:835:5:835:17 | ExprStmt | | +| main.rs:834:5:834:13 | ExprStmt | main.rs:834:5:834:10 | mutate | | +| main.rs:835:5:835:14 | mutate_arg | main.rs:835:5:835:16 | mutate_arg(...) | | +| main.rs:835:5:835:16 | mutate_arg(...) | main.rs:836:5:836:12 | ExprStmt | | +| main.rs:835:5:835:17 | ExprStmt | main.rs:835:5:835:14 | mutate_arg | | +| main.rs:836:5:836:9 | alias | main.rs:836:5:836:11 | alias(...) | | +| main.rs:836:5:836:11 | alias(...) | main.rs:837:5:837:18 | ExprStmt | | +| main.rs:836:5:836:12 | ExprStmt | main.rs:836:5:836:9 | alias | | +| main.rs:837:5:837:15 | capture_mut | main.rs:837:5:837:17 | capture_mut(...) | | +| main.rs:837:5:837:17 | capture_mut(...) | main.rs:838:5:838:20 | ExprStmt | | +| main.rs:837:5:837:18 | ExprStmt | main.rs:837:5:837:15 | capture_mut | | +| main.rs:838:5:838:17 | capture_immut | main.rs:838:5:838:19 | capture_immut(...) | | +| main.rs:838:5:838:19 | capture_immut(...) | main.rs:839:5:839:26 | ExprStmt | | +| main.rs:838:5:838:20 | ExprStmt | main.rs:838:5:838:17 | capture_immut | | +| main.rs:839:5:839:23 | async_block_capture | main.rs:839:5:839:25 | async_block_capture(...) | | +| main.rs:839:5:839:25 | async_block_capture(...) | main.rs:840:5:840:14 | ExprStmt | | +| main.rs:839:5:839:26 | ExprStmt | main.rs:839:5:839:23 | async_block_capture | | +| main.rs:840:5:840:11 | structs | main.rs:840:5:840:13 | structs(...) | | +| main.rs:840:5:840:13 | structs(...) | main.rs:841:5:841:14 | ExprStmt | | +| main.rs:840:5:840:14 | ExprStmt | main.rs:840:5:840:11 | structs | | +| main.rs:841:5:841:11 | ref_arg | main.rs:841:5:841:13 | ref_arg(...) | | +| main.rs:841:5:841:13 | ref_arg(...) | main.rs:842:5:842:30 | ExprStmt | | +| main.rs:841:5:841:14 | ExprStmt | main.rs:841:5:841:11 | ref_arg | | +| main.rs:842:5:842:27 | ref_methodcall_receiver | main.rs:842:5:842:29 | ref_methodcall_receiver(...) | | +| main.rs:842:5:842:29 | ref_methodcall_receiver(...) | main.rs:843:5:843:23 | ExprStmt | | +| main.rs:842:5:842:30 | ExprStmt | main.rs:842:5:842:27 | ref_methodcall_receiver | | +| main.rs:843:5:843:20 | macro_invocation | main.rs:843:5:843:22 | macro_invocation(...) | | +| main.rs:843:5:843:22 | macro_invocation(...) | main.rs:844:5:844:18 | ExprStmt | | +| main.rs:843:5:843:23 | ExprStmt | main.rs:843:5:843:20 | macro_invocation | | +| main.rs:844:5:844:15 | capture_phi | main.rs:844:5:844:17 | capture_phi(...) | | +| main.rs:844:5:844:17 | capture_phi(...) | main.rs:801:11:845:1 | { ... } | | +| main.rs:844:5:844:18 | ExprStmt | main.rs:844:5:844:15 | capture_phi | | breakTarget | main.rs:326:9:326:13 | break | main.rs:317:5:327:5 | while ... { ... } | continueTarget diff --git a/rust/ql/test/library-tests/variables/Ssa.expected b/rust/ql/test/library-tests/variables/Ssa.expected index 35adac47802..0acf3e94c5b 100644 --- a/rust/ql/test/library-tests/variables/Ssa.expected +++ b/rust/ql/test/library-tests/variables/Ssa.expected @@ -196,6 +196,13 @@ definition | main.rs:748:17:750:9 | SSA phi(x) | main.rs:745:13:745:13 | x | | main.rs:749:13:749:13 | x | main.rs:745:13:745:13 | x | | main.rs:752:5:752:13 | x | main.rs:745:13:745:13 | x | +| main.rs:759:13:759:13 | x | main.rs:759:13:759:13 | x | +| main.rs:760:13:760:13 | y | main.rs:760:13:760:13 | y | +| main.rs:769:13:769:16 | N0ne | main.rs:769:13:769:16 | N0ne | +| main.rs:776:13:776:22 | test_alias | main.rs:776:13:776:22 | test_alias | +| main.rs:778:13:778:16 | test | main.rs:778:13:778:16 | test | +| main.rs:787:13:787:13 | x | main.rs:787:13:787:13 | x | +| main.rs:789:18:789:18 | x | main.rs:789:18:789:18 | x | read | main.rs:5:14:5:14 | s | main.rs:5:14:5:14 | s | main.rs:7:20:7:20 | s | | main.rs:10:14:10:14 | i | main.rs:10:14:10:14 | i | main.rs:12:20:12:20 | i | @@ -404,6 +411,14 @@ read | main.rs:746:13:746:15 | cap | main.rs:746:13:746:15 | cap | main.rs:752:5:752:7 | cap | | main.rs:746:20:746:20 | b | main.rs:746:20:746:20 | b | main.rs:748:20:748:20 | b | | main.rs:752:5:752:13 | x | main.rs:745:13:745:13 | x | main.rs:753:15:753:15 | x | +| main.rs:759:13:759:13 | x | main.rs:759:13:759:13 | x | main.rs:761:19:761:19 | x | +| main.rs:760:13:760:13 | y | main.rs:760:13:760:13 | y | main.rs:768:15:768:15 | y | +| main.rs:769:13:769:16 | N0ne | main.rs:769:13:769:16 | N0ne | main.rs:770:17:770:20 | N0ne | +| main.rs:776:13:776:22 | test_alias | main.rs:776:13:776:22 | test_alias | main.rs:779:13:779:22 | test_alias | +| main.rs:778:13:778:16 | test | main.rs:778:13:778:16 | test | main.rs:780:9:780:12 | test | +| main.rs:787:13:787:13 | x | main.rs:787:13:787:13 | x | main.rs:788:15:788:15 | x | +| main.rs:787:13:787:13 | x | main.rs:787:13:787:13 | x | main.rs:793:15:793:15 | x | +| main.rs:789:18:789:18 | x | main.rs:789:18:789:18 | x | main.rs:790:20:790:20 | x | firstRead | main.rs:5:14:5:14 | s | main.rs:5:14:5:14 | s | main.rs:7:20:7:20 | s | | main.rs:10:14:10:14 | i | main.rs:10:14:10:14 | i | main.rs:12:20:12:20 | i | @@ -570,6 +585,13 @@ firstRead | main.rs:746:13:746:15 | cap | main.rs:746:13:746:15 | cap | main.rs:752:5:752:7 | cap | | main.rs:746:20:746:20 | b | main.rs:746:20:746:20 | b | main.rs:748:20:748:20 | b | | main.rs:752:5:752:13 | x | main.rs:745:13:745:13 | x | main.rs:753:15:753:15 | x | +| main.rs:759:13:759:13 | x | main.rs:759:13:759:13 | x | main.rs:761:19:761:19 | x | +| main.rs:760:13:760:13 | y | main.rs:760:13:760:13 | y | main.rs:768:15:768:15 | y | +| main.rs:769:13:769:16 | N0ne | main.rs:769:13:769:16 | N0ne | main.rs:770:17:770:20 | N0ne | +| main.rs:776:13:776:22 | test_alias | main.rs:776:13:776:22 | test_alias | main.rs:779:13:779:22 | test_alias | +| main.rs:778:13:778:16 | test | main.rs:778:13:778:16 | test | main.rs:780:9:780:12 | test | +| main.rs:787:13:787:13 | x | main.rs:787:13:787:13 | x | main.rs:788:15:788:15 | x | +| main.rs:789:18:789:18 | x | main.rs:789:18:789:18 | x | main.rs:790:20:790:20 | x | adjacentReads | main.rs:27:5:27:6 | x2 | main.rs:25:13:25:14 | x2 | main.rs:28:15:28:16 | x2 | main.rs:29:10:29:11 | x2 | | main.rs:41:9:41:10 | x3 | main.rs:41:9:41:10 | x3 | main.rs:42:15:42:16 | x3 | main.rs:44:9:44:10 | x3 | @@ -616,6 +638,7 @@ adjacentReads | main.rs:676:13:676:13 | a | main.rs:676:13:676:13 | a | main.rs:677:15:677:15 | a | main.rs:678:5:678:5 | a | | main.rs:676:13:676:13 | a | main.rs:676:13:676:13 | a | main.rs:678:5:678:5 | a | main.rs:679:15:679:15 | a | | main.rs:685:9:685:9 | x | main.rs:685:9:685:9 | x | main.rs:686:20:686:20 | x | main.rs:687:15:687:15 | x | +| main.rs:787:13:787:13 | x | main.rs:787:13:787:13 | x | main.rs:788:15:788:15 | x | main.rs:793:15:793:15 | x | phi | main.rs:210:9:210:44 | SSA phi(a3) | main.rs:210:9:210:44 | a3 | main.rs:210:22:210:23 | a3 | | main.rs:210:9:210:44 | SSA phi(a3) | main.rs:210:9:210:44 | a3 | main.rs:210:42:210:43 | a3 | @@ -773,3 +796,8 @@ assigns | main.rs:745:13:745:13 | x | main.rs:745:17:745:19 | 100 | | main.rs:746:13:746:15 | cap | main.rs:746:19:751:5 | \|...\| ... | | main.rs:749:13:749:13 | x | main.rs:749:17:749:19 | 200 | +| main.rs:759:13:759:13 | x | main.rs:759:17:759:24 | Some(...) | +| main.rs:760:13:760:13 | y | main.rs:761:13:767:9 | match x { ... } | +| main.rs:776:13:776:22 | test_alias | main.rs:777:13:777:16 | test | +| main.rs:778:13:778:16 | test | main.rs:779:13:779:24 | test_alias(...) | +| main.rs:787:13:787:13 | x | main.rs:787:17:787:23 | Some(...) | diff --git a/rust/ql/test/library-tests/variables/main.rs b/rust/ql/test/library-tests/variables/main.rs index cdfe1091ee3..fe13f89b177 100644 --- a/rust/ql/test/library-tests/variables/main.rs +++ b/rust/ql/test/library-tests/variables/main.rs @@ -753,6 +753,51 @@ fn capture_phi() { print_i64(x); // $ read_access=x } +mod patterns { + #[rustfmt::skip] + pub fn test() -> Option { + let x = Some(42); // x + let y : Option = // y1 + match x { // $ read_access=x + Some(y) => { // y2 + None + } + None => + None + }; + match y { // $ read_access=y1 + N0ne => // n0ne + N0ne // $ read_access=n0ne + } + } + + #[rustfmt::skip] + fn test2() -> Option { + let test_alias = // test_alias + test; + let test = // test + test_alias(); // $ read_access=test_alias + test // $ read_access=test + } + + const z: i32 = 0; + + #[rustfmt::skip] + fn test3() { + let x = Some(0); // x1 + match x { // $ read_access=x1 + Some(x) // x2 + => x, // $ read_access=x2 + _ => 0 + }; + match x { // $ read_access=x1 + Some(z) => + z, + _ => 0 + }; + } +} + fn main() { immutable_variable(); mutable_variable(); diff --git a/rust/ql/test/library-tests/variables/variables.expected b/rust/ql/test/library-tests/variables/variables.expected index 64431803e6d..ea360357d97 100644 --- a/rust/ql/test/library-tests/variables/variables.expected +++ b/rust/ql/test/library-tests/variables/variables.expected @@ -142,6 +142,14 @@ variable | main.rs:745:13:745:13 | x | | main.rs:746:13:746:15 | cap | | main.rs:746:20:746:20 | b | +| main.rs:759:13:759:13 | x | +| main.rs:760:13:760:13 | y | +| main.rs:762:18:762:18 | y | +| main.rs:769:13:769:16 | N0ne | +| main.rs:776:13:776:22 | test_alias | +| main.rs:778:13:778:16 | test | +| main.rs:787:13:787:13 | x | +| main.rs:789:18:789:18 | x | variableAccess | main.rs:7:20:7:20 | s | main.rs:5:14:5:14 | s | | main.rs:12:20:12:20 | i | main.rs:10:14:10:14 | i | @@ -364,6 +372,14 @@ variableAccess | main.rs:749:13:749:13 | x | main.rs:745:13:745:13 | x | | main.rs:752:5:752:7 | cap | main.rs:746:13:746:15 | cap | | main.rs:753:15:753:15 | x | main.rs:745:13:745:13 | x | +| main.rs:761:19:761:19 | x | main.rs:759:13:759:13 | x | +| main.rs:768:15:768:15 | y | main.rs:760:13:760:13 | y | +| main.rs:770:17:770:20 | N0ne | main.rs:769:13:769:16 | N0ne | +| main.rs:779:13:779:22 | test_alias | main.rs:776:13:776:22 | test_alias | +| main.rs:780:9:780:12 | test | main.rs:778:13:778:16 | test | +| main.rs:788:15:788:15 | x | main.rs:787:13:787:13 | x | +| main.rs:790:20:790:20 | x | main.rs:789:18:789:18 | x | +| main.rs:793:15:793:15 | x | main.rs:787:13:787:13 | x | variableWriteAccess | main.rs:27:5:27:6 | x2 | main.rs:25:13:25:14 | x2 | | main.rs:29:5:29:6 | x2 | main.rs:25:13:25:14 | x2 | @@ -576,6 +592,14 @@ variableReadAccess | main.rs:748:20:748:20 | b | main.rs:746:20:746:20 | b | | main.rs:752:5:752:7 | cap | main.rs:746:13:746:15 | cap | | main.rs:753:15:753:15 | x | main.rs:745:13:745:13 | x | +| main.rs:761:19:761:19 | x | main.rs:759:13:759:13 | x | +| main.rs:768:15:768:15 | y | main.rs:760:13:760:13 | y | +| main.rs:770:17:770:20 | N0ne | main.rs:769:13:769:16 | N0ne | +| main.rs:779:13:779:22 | test_alias | main.rs:776:13:776:22 | test_alias | +| main.rs:780:9:780:12 | test | main.rs:778:13:778:16 | test | +| main.rs:788:15:788:15 | x | main.rs:787:13:787:13 | x | +| main.rs:790:20:790:20 | x | main.rs:789:18:789:18 | x | +| main.rs:793:15:793:15 | x | main.rs:787:13:787:13 | x | variableInitializer | main.rs:20:9:20:10 | x1 | main.rs:20:14:20:16 | "a" | | main.rs:25:13:25:14 | x2 | main.rs:25:18:25:18 | 4 | @@ -649,6 +673,11 @@ variableInitializer | main.rs:734:15:734:28 | var_in_macro | main.rs:734:15:734:28 | 0 | | main.rs:745:13:745:13 | x | main.rs:745:17:745:19 | 100 | | main.rs:746:13:746:15 | cap | main.rs:746:19:751:5 | \|...\| ... | +| main.rs:759:13:759:13 | x | main.rs:759:17:759:24 | Some(...) | +| main.rs:760:13:760:13 | y | main.rs:761:13:767:9 | match x { ... } | +| main.rs:776:13:776:22 | test_alias | main.rs:777:13:777:16 | test | +| main.rs:778:13:778:16 | test | main.rs:779:13:779:24 | test_alias(...) | +| main.rs:787:13:787:13 | x | main.rs:787:17:787:23 | Some(...) | capturedVariable | main.rs:557:9:557:9 | x | | main.rs:568:13:568:13 | x | diff --git a/rust/ql/test/query-tests/diagnostics/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/diagnostics/CONSISTENCY/PathResolutionConsistency.expected index bb60014263b..fbf9238f366 100644 --- a/rust/ql/test/query-tests/diagnostics/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/diagnostics/CONSISTENCY/PathResolutionConsistency.expected @@ -1,2 +1,2 @@ -multipleCallTargets +multipleResolvedTargets | my_struct.rs:25:19:25:37 | ...::from(...) | diff --git a/rust/ql/test/query-tests/security/CWE-022/TaintedPath.expected b/rust/ql/test/query-tests/security/CWE-022/TaintedPath.expected index a1f9b448ac7..df7070c966a 100644 --- a/rust/ql/test/query-tests/security/CWE-022/TaintedPath.expected +++ b/rust/ql/test/query-tests/security/CWE-022/TaintedPath.expected @@ -22,11 +22,12 @@ edges | src/main.rs:9:35:9:43 | file_name | src/main.rs:9:21:9:44 | ...::from(...) | provenance | MaD:14 | | src/main.rs:11:24:11:32 | file_path | src/main.rs:11:5:11:22 | ...::read_to_string | provenance | MaD:6 Sink:MaD:6 | | src/main.rs:50:51:50:59 | file_path | src/main.rs:52:32:52:40 | file_path | provenance | | -| src/main.rs:52:9:52:17 | file_path [&ref] | src/main.rs:53:21:53:44 | file_path.canonicalize() [Ok] | provenance | Config | +| src/main.rs:52:9:52:17 | file_path [&ref] | src/main.rs:53:21:53:29 | file_path [&ref] | provenance | | | src/main.rs:52:21:52:41 | ...::new(...) [&ref] | src/main.rs:52:9:52:17 | file_path [&ref] | provenance | | | src/main.rs:52:31:52:40 | &file_path [&ref] | src/main.rs:52:21:52:41 | ...::new(...) [&ref] | provenance | MaD:13 | | src/main.rs:52:32:52:40 | file_path | src/main.rs:52:31:52:40 | &file_path [&ref] | provenance | | | src/main.rs:53:9:53:17 | file_path | src/main.rs:58:24:58:32 | file_path | provenance | | +| src/main.rs:53:21:53:29 | file_path [&ref] | src/main.rs:53:21:53:44 | file_path.canonicalize() [Ok] | provenance | Config | | src/main.rs:53:21:53:44 | file_path.canonicalize() [Ok] | src/main.rs:53:21:53:53 | ... .unwrap() | provenance | MaD:12 | | src/main.rs:53:21:53:53 | ... .unwrap() | src/main.rs:53:9:53:17 | file_path | provenance | | | src/main.rs:58:24:58:32 | file_path | src/main.rs:58:5:58:22 | ...::read_to_string | provenance | MaD:6 Sink:MaD:6 | @@ -37,27 +38,22 @@ edges | src/main.rs:66:32:66:40 | file_path | src/main.rs:66:31:66:40 | &file_path [&ref] | provenance | | | src/main.rs:71:24:71:32 | file_path [&ref] | src/main.rs:71:5:71:22 | ...::read_to_string | provenance | MaD:6 Sink:MaD:6 | | src/main.rs:90:11:90:19 | file_path | src/main.rs:93:32:93:40 | file_path | provenance | | -| src/main.rs:93:9:93:17 | file_path [&ref] | src/main.rs:98:21:98:44 | file_path.canonicalize() [Ok] | provenance | Config | +| src/main.rs:93:9:93:17 | file_path [&ref] | src/main.rs:98:21:98:29 | file_path [&ref] | provenance | | | src/main.rs:93:21:93:41 | ...::new(...) [&ref] | src/main.rs:93:9:93:17 | file_path [&ref] | provenance | | | src/main.rs:93:31:93:40 | &file_path [&ref] | src/main.rs:93:21:93:41 | ...::new(...) [&ref] | provenance | MaD:13 | | src/main.rs:93:32:93:40 | file_path | src/main.rs:93:31:93:40 | &file_path [&ref] | provenance | | | src/main.rs:98:9:98:17 | file_path | src/main.rs:99:24:99:32 | file_path | provenance | | +| src/main.rs:98:21:98:29 | file_path [&ref] | src/main.rs:98:21:98:44 | file_path.canonicalize() [Ok] | provenance | Config | | src/main.rs:98:21:98:44 | file_path.canonicalize() [Ok] | src/main.rs:98:21:98:53 | ... .unwrap() | provenance | MaD:12 | | src/main.rs:98:21:98:53 | ... .unwrap() | src/main.rs:98:9:98:17 | file_path | provenance | | | src/main.rs:99:24:99:32 | file_path | src/main.rs:99:5:99:22 | ...::read_to_string | provenance | MaD:6 Sink:MaD:6 | | src/main.rs:103:9:103:13 | path1 | src/main.rs:104:33:104:37 | path1 | provenance | | -| src/main.rs:103:9:103:13 | path1 | src/main.rs:104:33:104:45 | path1.clone() | provenance | MaD:8 | | src/main.rs:103:9:103:13 | path1 | src/main.rs:106:39:106:43 | path1 | provenance | | -| src/main.rs:103:9:103:13 | path1 | src/main.rs:106:39:106:51 | path1.clone() | provenance | MaD:8 | | src/main.rs:103:9:103:13 | path1 | src/main.rs:109:41:109:45 | path1 | provenance | | -| src/main.rs:103:9:103:13 | path1 | src/main.rs:109:41:109:53 | path1.clone() | provenance | MaD:8 | | src/main.rs:103:9:103:13 | path1 | src/main.rs:112:45:112:49 | path1 | provenance | | -| src/main.rs:103:9:103:13 | path1 | src/main.rs:112:45:112:57 | path1.clone() | provenance | MaD:8 | | src/main.rs:103:9:103:13 | path1 | src/main.rs:115:39:115:43 | path1 | provenance | | | src/main.rs:103:9:103:13 | path1 | src/main.rs:122:27:122:31 | path1 | provenance | | -| src/main.rs:103:9:103:13 | path1 | src/main.rs:122:27:122:39 | path1.clone() | provenance | MaD:8 | | src/main.rs:103:9:103:13 | path1 | src/main.rs:123:37:123:41 | path1 | provenance | | -| src/main.rs:103:9:103:13 | path1 | src/main.rs:123:37:123:49 | path1.clone() | provenance | MaD:8 | | src/main.rs:103:17:103:30 | ...::args | src/main.rs:103:17:103:32 | ...::args(...) [element] | provenance | Src:MaD:7 | | src/main.rs:103:17:103:32 | ...::args(...) [element] | src/main.rs:103:17:103:39 | ... .nth(...) [Some] | provenance | MaD:10 | | src/main.rs:103:17:103:39 | ... .nth(...) [Some] | src/main.rs:103:17:103:48 | ... .unwrap() | provenance | MaD:11 | @@ -89,8 +85,9 @@ edges | src/main.rs:115:38:115:43 | &path1 [&ref] | src/main.rs:115:17:115:44 | ...::new(...) [&ref] | provenance | MaD:13 | | src/main.rs:115:39:115:43 | path1 | src/main.rs:115:38:115:43 | &path1 [&ref] | provenance | | | src/main.rs:116:33:116:37 | path5 [&ref] | src/main.rs:116:13:116:31 | ...::open | provenance | MaD:2 Sink:MaD:2 | -| src/main.rs:116:33:116:37 | path5 [&ref] | src/main.rs:118:17:118:36 | path5.canonicalize() [Ok] | provenance | Config | +| src/main.rs:116:33:116:37 | path5 [&ref] | src/main.rs:118:17:118:21 | path5 [&ref] | provenance | | | src/main.rs:118:9:118:13 | path6 | src/main.rs:119:33:119:37 | path6 | provenance | | +| src/main.rs:118:17:118:21 | path5 [&ref] | src/main.rs:118:17:118:36 | path5.canonicalize() [Ok] | provenance | Config | | src/main.rs:118:17:118:36 | path5.canonicalize() [Ok] | src/main.rs:118:17:118:45 | ... .unwrap() | provenance | MaD:12 | | src/main.rs:118:17:118:45 | ... .unwrap() | src/main.rs:118:9:118:13 | path6 | provenance | | | src/main.rs:119:33:119:37 | path6 | src/main.rs:119:13:119:31 | ...::open | provenance | MaD:2 Sink:MaD:2 | @@ -124,7 +121,7 @@ models | 7 | Source: std::env::args; ReturnValue.Element; commandargs | | 8 | Summary: <_ as core::clone::Clone>::clone; Argument[self].Reference; ReturnValue; value | | 9 | Summary: <_ as core::convert::From>::from; Argument[0]; ReturnValue; taint | -| 10 | Summary: <_ as core::iter::traits::iterator::Iterator>::nth; Argument[self].Element; ReturnValue.Field[core::option::Option::Some(0)]; value | +| 10 | Summary: <_ as core::iter::traits::iterator::Iterator>::nth; Argument[self].Reference.Element; ReturnValue.Field[core::option::Option::Some(0)]; value | | 11 | Summary: ::unwrap; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | | 12 | Summary: ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | | 13 | Summary: ::new; Argument[0].Reference; ReturnValue.Reference; value | @@ -142,6 +139,7 @@ nodes | src/main.rs:52:31:52:40 | &file_path [&ref] | semmle.label | &file_path [&ref] | | src/main.rs:52:32:52:40 | file_path | semmle.label | file_path | | src/main.rs:53:9:53:17 | file_path | semmle.label | file_path | +| src/main.rs:53:21:53:29 | file_path [&ref] | semmle.label | file_path [&ref] | | src/main.rs:53:21:53:44 | file_path.canonicalize() [Ok] | semmle.label | file_path.canonicalize() [Ok] | | src/main.rs:53:21:53:53 | ... .unwrap() | semmle.label | ... .unwrap() | | src/main.rs:58:5:58:22 | ...::read_to_string | semmle.label | ...::read_to_string | @@ -159,6 +157,7 @@ nodes | src/main.rs:93:31:93:40 | &file_path [&ref] | semmle.label | &file_path [&ref] | | src/main.rs:93:32:93:40 | file_path | semmle.label | file_path | | src/main.rs:98:9:98:17 | file_path | semmle.label | file_path | +| src/main.rs:98:21:98:29 | file_path [&ref] | semmle.label | file_path [&ref] | | src/main.rs:98:21:98:44 | file_path.canonicalize() [Ok] | semmle.label | file_path.canonicalize() [Ok] | | src/main.rs:98:21:98:53 | ... .unwrap() | semmle.label | ... .unwrap() | | src/main.rs:99:5:99:22 | ...::read_to_string | semmle.label | ...::read_to_string | @@ -201,6 +200,7 @@ nodes | src/main.rs:116:13:116:31 | ...::open | semmle.label | ...::open | | src/main.rs:116:33:116:37 | path5 [&ref] | semmle.label | path5 [&ref] | | src/main.rs:118:9:118:13 | path6 | semmle.label | path6 | +| src/main.rs:118:17:118:21 | path5 [&ref] | semmle.label | path5 [&ref] | | src/main.rs:118:17:118:36 | path5.canonicalize() [Ok] | semmle.label | path5.canonicalize() [Ok] | | src/main.rs:118:17:118:45 | ... .unwrap() | semmle.label | ... .unwrap() | | src/main.rs:119:13:119:31 | ...::open | semmle.label | ...::open | diff --git a/rust/ql/test/query-tests/security/CWE-079/Cargo.lock b/rust/ql/test/query-tests/security/CWE-079/Cargo.lock new file mode 100644 index 00000000000..b8c877bc755 --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-079/Cargo.lock @@ -0,0 +1,1876 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "actix-codec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" +dependencies = [ + "bitflags", + "bytes", + "futures-core", + "futures-sink", + "memchr", + "pin-project-lite", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "actix-http" +version = "3.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7926860314cbe2fb5d1f13731e387ab43bd32bca224e82e6e2db85de0a3dba49" +dependencies = [ + "actix-codec", + "actix-rt", + "actix-service", + "actix-utils", + "base64", + "bitflags", + "brotli", + "bytes", + "bytestring", + "derive_more", + "encoding_rs", + "flate2", + "foldhash", + "futures-core", + "h2 0.3.27", + "http 0.2.12", + "httparse", + "httpdate", + "itoa", + "language-tags", + "local-channel", + "mime", + "percent-encoding", + "pin-project-lite", + "rand", + "sha1", + "smallvec", + "tokio", + "tokio-util", + "tracing", + "zstd", +] + +[[package]] +name = "actix-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "actix-router" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" +dependencies = [ + "bytestring", + "cfg-if", + "http 0.2.12", + "regex", + "regex-lite", + "serde", + "tracing", +] + +[[package]] +name = "actix-rt" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92589714878ca59a7626ea19734f0e07a6a875197eec751bb5d3f99e64998c63" +dependencies = [ + "futures-core", + "tokio", +] + +[[package]] +name = "actix-server" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a65064ea4a457eaf07f2fba30b4c695bf43b721790e9530d26cb6f9019ff7502" +dependencies = [ + "actix-rt", + "actix-service", + "actix-utils", + "futures-core", + "futures-util", + "mio", + "socket2 0.5.10", + "tokio", + "tracing", +] + +[[package]] +name = "actix-service" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e46f36bf0e5af44bdc4bdb36fbbd421aa98c79a9bce724e1edeb3894e10dc7f" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "actix-utils" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" +dependencies = [ + "local-waker", + "pin-project-lite", +] + +[[package]] +name = "actix-web" +version = "4.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2233f53f6cb18ae038ce1f0713ca0c72ca0c4b71fe9aaeb59924ce2c89c6dd85" +dependencies = [ + "actix-codec", + "actix-http", + "actix-macros", + "actix-router", + "actix-rt", + "actix-server", + "actix-service", + "actix-utils", + "actix-web-codegen", + "bytes", + "bytestring", + "cfg-if", + "cookie", + "derive_more", + "encoding_rs", + "foldhash", + "futures-core", + "futures-util", + "impl-more", + "itoa", + "language-tags", + "log", + "mime", + "once_cell", + "pin-project-lite", + "regex", + "regex-lite", + "serde", + "serde_json", + "serde_urlencoded", + "smallvec", + "socket2 0.6.1", + "time", + "tracing", + "url", +] + +[[package]] +name = "actix-web-codegen" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f591380e2e68490b5dfaf1dd1aa0ebe78d84ba7067078512b4ea6e4492d622b8" +dependencies = [ + "actix-router", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "axum" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b098575ebe77cb6d14fc7f32749631a6e44edbef6b796f89b020e99ba20d425" +dependencies = [ + "axum-core", + "bytes", + "form_urlencoded", + "futures-util", + "http 1.3.1", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "serde_core", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59446ce19cd142f8833f856eb31f3eb097812d1479ab224f54d72428ca21ea22" +dependencies = [ + "bytes", + "futures-core", + "http 1.3.1", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "sync_wrapper", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "brotli" +version = "8.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bytes" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" + +[[package]] +name = "bytestring" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "113b4343b5f6617e7ad401ced8de3cc8b012e73a594347c307b90db3e9271289" +dependencies = [ + "bytes", +] + +[[package]] +name = "cc" +version = "1.2.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97463e1064cb1b1c1384ad0a0b9c8abd0988e2a91f52606c80ef14aadb63e36" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cookie" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" +dependencies = [ + "percent-encoding", + "time", + "version_check", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "deranged" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derive_more" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "find-msvc-tools" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" + +[[package]] +name = "flate2" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-core", + "futures-sink", + "futures-task", + "pin-project-lite", + "pin-utils", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] + +[[package]] +name = "h2" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.3.1", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" + +[[package]] +name = "headers" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3314d5adb5d94bcdf56771f2e50dbbc80bb4bdf88967526706205ac9eff24eb" +dependencies = [ + "base64", + "bytes", + "headers-core", + "http 1.3.1", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" +dependencies = [ + "http 1.3.1", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.3.1", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http 1.3.1", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2 0.4.12", + "http 1.3.1", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", +] + +[[package]] +name = "hyper-util" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e9a2a24dc5c6821e71a7030e1e14b7b632acac55c40e9d2e082c621261bb56" +dependencies = [ + "bytes", + "futures-core", + "http 1.3.1", + "http-body", + "hyper", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e93fcd3157766c0c8da2f8cff6ce651a31f0810eaa1c51ec363ef790bbb5fb99" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02845b3647bb045f1100ecd6480ff52f34c35f82d9880e029d329c21d1054899" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "impl-more" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a5a9a0ff0086c7a148acb942baaabeadf9504d10400b5a05645853729b9cd2" + +[[package]] +name = "indexmap" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom", + "libc", +] + +[[package]] +name = "language-tags" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" + +[[package]] +name = "libc" +version = "0.2.177" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "local-channel" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6cbc85e69b8df4b8bb8b89ec634e7189099cea8927a276b7384ce5488e53ec8" +dependencies = [ + "futures-core", + "futures-sink", + "local-waker", +] + +[[package]] +name = "local-waker" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" + +[[package]] +name = "matchit" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro2" +version = "1.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-lite" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d942b98df5e658f56f20d592c7f868833fe38115e65c33003d8cd224b0155da" + +[[package]] +name = "regex-syntax" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.145" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", + "serde_core", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" +dependencies = [ + "itoa", + "serde", + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" +dependencies = [ + "libc", +] + +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + +[[package]] +name = "slab" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "socket2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "syn" +version = "2.0.110" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "test" +version = "0.0.1" +dependencies = [ + "actix-web", + "axum", + "serde", + "tokio", + "warp", +] + +[[package]] +name = "time" +version = "0.3.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" + +[[package]] +name = "time-macros" +version = "0.2.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2 0.6.1", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-util" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", +] + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "unicase" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" + +[[package]] +name = "unicode-ident" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "url" +version = "2.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "warp" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d06d9202adc1f15d709c4f4a2069be5428aa912cc025d6f268ac441ab066b0" +dependencies = [ + "bytes", + "futures-util", + "headers", + "http 1.3.1", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "log", + "mime", + "mime_guess", + "percent-encoding", + "pin-project", + "scoped-tls", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-util", + "tower-service", + "tracing", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "wit-bindgen" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.16+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/rust/ql/test/query-tests/security/CWE-079/actix/Cargo.lock b/rust/ql/test/query-tests/security/CWE-079/actix/Cargo.lock new file mode 100644 index 00000000000..daf7370f6b5 --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-079/actix/Cargo.lock @@ -0,0 +1,1571 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "actix-codec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" +dependencies = [ + "bitflags", + "bytes", + "futures-core", + "futures-sink", + "memchr", + "pin-project-lite", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "actix-http" +version = "3.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7926860314cbe2fb5d1f13731e387ab43bd32bca224e82e6e2db85de0a3dba49" +dependencies = [ + "actix-codec", + "actix-rt", + "actix-service", + "actix-utils", + "base64", + "bitflags", + "brotli", + "bytes", + "bytestring", + "derive_more", + "encoding_rs", + "flate2", + "foldhash", + "futures-core", + "h2", + "http", + "httparse", + "httpdate", + "itoa", + "language-tags", + "local-channel", + "mime", + "percent-encoding", + "pin-project-lite", + "rand", + "sha1", + "smallvec", + "tokio", + "tokio-util", + "tracing", + "zstd", +] + +[[package]] +name = "actix-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "actix-router" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" +dependencies = [ + "bytestring", + "cfg-if", + "http", + "regex", + "regex-lite", + "serde", + "tracing", +] + +[[package]] +name = "actix-rt" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92589714878ca59a7626ea19734f0e07a6a875197eec751bb5d3f99e64998c63" +dependencies = [ + "futures-core", + "tokio", +] + +[[package]] +name = "actix-server" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a65064ea4a457eaf07f2fba30b4c695bf43b721790e9530d26cb6f9019ff7502" +dependencies = [ + "actix-rt", + "actix-service", + "actix-utils", + "futures-core", + "futures-util", + "mio", + "socket2 0.5.10", + "tokio", + "tracing", +] + +[[package]] +name = "actix-service" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e46f36bf0e5af44bdc4bdb36fbbd421aa98c79a9bce724e1edeb3894e10dc7f" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "actix-utils" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" +dependencies = [ + "local-waker", + "pin-project-lite", +] + +[[package]] +name = "actix-web" +version = "4.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2233f53f6cb18ae038ce1f0713ca0c72ca0c4b71fe9aaeb59924ce2c89c6dd85" +dependencies = [ + "actix-codec", + "actix-http", + "actix-macros", + "actix-router", + "actix-rt", + "actix-server", + "actix-service", + "actix-utils", + "actix-web-codegen", + "bytes", + "bytestring", + "cfg-if", + "cookie", + "derive_more", + "encoding_rs", + "foldhash", + "futures-core", + "futures-util", + "impl-more", + "itoa", + "language-tags", + "log", + "mime", + "once_cell", + "pin-project-lite", + "regex", + "regex-lite", + "serde", + "serde_json", + "serde_urlencoded", + "smallvec", + "socket2 0.6.1", + "time", + "tracing", + "url", +] + +[[package]] +name = "actix-web-codegen" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f591380e2e68490b5dfaf1dd1aa0ebe78d84ba7067078512b4ea6e4492d622b8" +dependencies = [ + "actix-router", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "brotli" +version = "8.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bytes" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" + +[[package]] +name = "bytestring" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "113b4343b5f6617e7ad401ced8de3cc8b012e73a594347c307b90db3e9271289" +dependencies = [ + "bytes", +] + +[[package]] +name = "cc" +version = "1.2.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd405d82c84ff7f35739f175f67d8b9fb7687a0e84ccdc78bd3568839827cf07" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cookie" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" +dependencies = [ + "percent-encoding", + "time", + "version_check", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "deranged" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derive_more" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "find-msvc-tools" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" + +[[package]] +name = "flate2" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "pin-utils", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] + +[[package]] +name = "h2" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "html-escape" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d1ad449764d627e22bfd7cd5e8868264fc9236e07c752972b4080cd351cb476" +dependencies = [ + "utf8-width", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e93fcd3157766c0c8da2f8cff6ce651a31f0810eaa1c51ec363ef790bbb5fb99" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02845b3647bb045f1100ecd6480ff52f34c35f82d9880e029d329c21d1054899" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "impl-more" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a5a9a0ff0086c7a148acb942baaabeadf9504d10400b5a05645853729b9cd2" + +[[package]] +name = "indexmap" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom", + "libc", +] + +[[package]] +name = "language-tags" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" + +[[package]] +name = "libc" +version = "0.2.177" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "local-channel" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6cbc85e69b8df4b8bb8b89ec634e7189099cea8927a276b7384ce5488e53ec8" +dependencies = [ + "futures-core", + "futures-sink", + "local-waker", +] + +[[package]] +name = "local-waker" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro2" +version = "1.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-lite" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d942b98df5e658f56f20d592c7f868833fe38115e65c33003d8cd224b0155da" + +[[package]] +name = "regex-syntax" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.145" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" +dependencies = [ + "libc", +] + +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + +[[package]] +name = "slab" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "socket2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "syn" +version = "2.0.111" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "test" +version = "0.0.1" +dependencies = [ + "actix-web", + "html-escape", +] + +[[package]] +name = "time" +version = "0.3.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" + +[[package]] +name = "time-macros" +version = "0.2.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2 0.6.1", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-util" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", +] + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "unicode-ident" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "url" +version = "2.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8-width" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1292c0d970b54115d14f2492fe0170adf21d68a1de108eebc51c1df4f346a091" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "wit-bindgen" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43fa6694ed34d6e57407afbccdeecfa268c470a7d2a5b0cf49ce9fcc345afb90" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c640b22cd9817fae95be82f0d2f90b11f7605f6c319d16705c459b27ac2cbc26" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.16+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/rust/ql/test/query-tests/security/CWE-079/actix/XSS.expected b/rust/ql/test/query-tests/security/CWE-079/actix/XSS.expected new file mode 100644 index 00000000000..9667a9216e6 --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-079/actix/XSS.expected @@ -0,0 +1,34 @@ +#select +| main.rs:25:5:25:13 | ...::new | main.rs:8:1:8:18 | to | main.rs:25:5:25:13 | ...::new | Cross-site scripting vulnerability due to a $@. | main.rs:8:1:8:18 | to | user-provided value | +edges +| main.rs:8:1:8:18 | to | main.rs:9:29:9:51 | ...: ...::Path::<...> | provenance | Src:MaD:2 | +| main.rs:9:29:9:51 | ...: ...::Path::<...> | main.rs:10:22:10:25 | path | provenance | | +| main.rs:10:9:10:18 | user_input | main.rs:13:9:22:18 | MacroExpr | provenance | | +| main.rs:10:22:10:25 | path | main.rs:10:22:10:38 | path.into_inner() | provenance | MaD:3 | +| main.rs:10:22:10:38 | path.into_inner() | main.rs:10:9:10:18 | user_input | provenance | | +| main.rs:12:9:12:12 | html | main.rs:25:15:25:18 | html | provenance | | +| main.rs:13:9:22:18 | ...::format(...) | main.rs:13:9:22:18 | { ... } | provenance | | +| main.rs:13:9:22:18 | ...::must_use(...) | main.rs:12:9:12:12 | html | provenance | | +| main.rs:13:9:22:18 | MacroExpr | main.rs:13:9:22:18 | ...::format(...) | provenance | MaD:4 | +| main.rs:13:9:22:18 | { ... } | main.rs:13:9:22:18 | ...::must_use(...) | provenance | MaD:5 | +| main.rs:25:15:25:18 | html | main.rs:25:5:25:13 | ...::new | provenance | MaD:1 Sink:MaD:1 | +models +| 1 | Sink: ::new; Argument[0]; html-injection | +| 2 | Source: ::to; Argument[0].Parameter[0..7]; remote | +| 3 | Summary: ::into_inner; Argument[self]; ReturnValue; taint | +| 4 | Summary: alloc::fmt::format; Argument[0]; ReturnValue; taint | +| 5 | Summary: core::hint::must_use; Argument[0]; ReturnValue; value | +nodes +| main.rs:8:1:8:18 | to | semmle.label | to | +| main.rs:9:29:9:51 | ...: ...::Path::<...> | semmle.label | ...: ...::Path::<...> | +| main.rs:10:9:10:18 | user_input | semmle.label | user_input | +| main.rs:10:22:10:25 | path | semmle.label | path | +| main.rs:10:22:10:38 | path.into_inner() | semmle.label | path.into_inner() | +| main.rs:12:9:12:12 | html | semmle.label | html | +| main.rs:13:9:22:18 | ...::format(...) | semmle.label | ...::format(...) | +| main.rs:13:9:22:18 | ...::must_use(...) | semmle.label | ...::must_use(...) | +| main.rs:13:9:22:18 | MacroExpr | semmle.label | MacroExpr | +| main.rs:13:9:22:18 | { ... } | semmle.label | { ... } | +| main.rs:25:5:25:13 | ...::new | semmle.label | ...::new | +| main.rs:25:15:25:18 | html | semmle.label | html | +subpaths diff --git a/rust/ql/test/query-tests/security/CWE-079/actix/XSS.qlref b/rust/ql/test/query-tests/security/CWE-079/actix/XSS.qlref new file mode 100644 index 00000000000..52e78e53811 --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-079/actix/XSS.qlref @@ -0,0 +1,4 @@ +query: queries/security/CWE-079/XSS.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/rust/ql/test/query-tests/security/CWE-079/actix/main.rs b/rust/ql/test/query-tests/security/CWE-079/actix/main.rs new file mode 100644 index 00000000000..42cd760ca6c --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-079/actix/main.rs @@ -0,0 +1,60 @@ +use actix_web::{ + get, + web::{self, Html}, + App, HttpServer, Responder, +}; + +// The "bad" example from the qldoc +#[get("/bad/{a}")] // $ Source=a +async fn vulnerable_handler(path: web::Path) -> impl Responder { + let user_input = path.into_inner(); + + let html = format!( + r#" + + + Welcome + +

    Hello, {}!

    + + + "#, + user_input + ); + + Html::new(html) // $ Alert[rust/xss]=a +} + +#[get("/good/{a}")] +// The "good" example from the qldoc +async fn safe_handler_with_encoding(path: web::Path) -> impl Responder { + let user_input = path.into_inner(); + let escaped_input = html_escape::encode_text(&user_input); + + let html = format!( + r#" + + + Welcome + +

    Hello, {}!

    + + + "#, + escaped_input + ); + + Html::new(html) // Safe: user input is HTML-encoded +} + +#[actix_web::main] +pub async fn main() -> std::io::Result<()> { + HttpServer::new(|| { + App::new() + .service(vulnerable_handler) + .service(safe_handler_with_encoding) + }) + .bind(("127.0.0.1", 3000))? + .run() + .await +} diff --git a/rust/ql/test/query-tests/security/CWE-079/actix/options.yml b/rust/ql/test/query-tests/security/CWE-079/actix/options.yml new file mode 100644 index 00000000000..f104c0008c4 --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-079/actix/options.yml @@ -0,0 +1,4 @@ +qltest_use_nightly: true +qltest_dependencies: + - actix-web = { version = "4.12.0" } + - html-escape = { version = "0.2.13" } \ No newline at end of file diff --git a/rust/ql/test/query-tests/security/CWE-079/axum/Cargo.lock b/rust/ql/test/query-tests/security/CWE-079/axum/Cargo.lock new file mode 100644 index 00000000000..a28fb29c506 --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-079/axum/Cargo.lock @@ -0,0 +1,646 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "axum" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b098575ebe77cb6d14fc7f32749631a6e44edbef6b796f89b020e99ba20d425" +dependencies = [ + "axum-core", + "bytes", + "form_urlencoded", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "serde_core", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59446ce19cd142f8833f856eb31f3eb097812d1479ab224f54d72428ca21ea22" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "sync_wrapper", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "bitflags" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" + +[[package]] +name = "bytes" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "pin-utils", +] + +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", +] + +[[package]] +name = "hyper-util" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e9a2a24dc5c6821e71a7030e1e14b7b632acac55c40e9d2e082c621261bb56" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "hyper", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "libc" +version = "0.2.177" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" + +[[package]] +name = "matchit" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mio" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "proc-macro2" +version = "1.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.145" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", + "serde_core", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" +dependencies = [ + "itoa", + "serde", + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" +dependencies = [ + "libc", +] + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "syn" +version = "2.0.111" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" + +[[package]] +name = "test" +version = "0.0.1" +dependencies = [ + "axum", + "serde", + "tokio", +] + +[[package]] +name = "tokio" +version = "1.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "log", + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", +] + +[[package]] +name = "unicode-ident" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" diff --git a/rust/ql/test/query-tests/security/CWE-079/axum/XSS.expected b/rust/ql/test/query-tests/security/CWE-079/axum/XSS.expected new file mode 100644 index 00000000000..58f42bec0c8 --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-079/axum/XSS.expected @@ -0,0 +1,4 @@ +#select +edges +nodes +subpaths diff --git a/rust/ql/test/query-tests/security/CWE-079/axum/XSS.qlref b/rust/ql/test/query-tests/security/CWE-079/axum/XSS.qlref new file mode 100644 index 00000000000..52e78e53811 --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-079/axum/XSS.qlref @@ -0,0 +1,4 @@ +query: queries/security/CWE-079/XSS.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/rust/ql/test/query-tests/security/CWE-079/axum/main.rs b/rust/ql/test/query-tests/security/CWE-079/axum/main.rs new file mode 100644 index 00000000000..9379302a318 --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-079/axum/main.rs @@ -0,0 +1,20 @@ +use axum::{extract::Query, response::Html, routing::get, Router}; + +#[derive(serde::Deserialize)] +struct GreetingParams { + name: String, +} + +async fn greet_handler(Query(params): Query) -> Html { + let html_content = format!("

    Hello, {}!

    ", params.name); + Html(html_content) // $ MISSING: Alert[rust/xss] +} + +#[tokio::main] +pub async fn main() { + let app = Router::<()>::new().route("/greet", get(greet_handler)); + let listener = tokio::net::TcpListener::bind("127.0.0.1:3000") + .await + .unwrap(); + axum::serve(listener, app).await.unwrap(); +} \ No newline at end of file diff --git a/rust/ql/test/query-tests/security/CWE-079/axum/options.yml b/rust/ql/test/query-tests/security/CWE-079/axum/options.yml new file mode 100644 index 00000000000..5a7345bb237 --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-079/axum/options.yml @@ -0,0 +1,5 @@ +qltest_use_nightly: true +qltest_dependencies: + - axum = { version = "0.8.7" } + - serde = { version = "1.0.228", features = ["derive"] } + - tokio = { version = "1", features = ["full"] } \ No newline at end of file diff --git a/rust/ql/test/query-tests/security/CWE-079/warp/Cargo.lock b/rust/ql/test/query-tests/security/CWE-079/warp/Cargo.lock new file mode 100644 index 00000000000..35c058bd45e --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-079/warp/Cargo.lock @@ -0,0 +1,723 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bytes" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-core", + "futures-sink", + "futures-task", + "pin-project-lite", + "pin-utils", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "h2" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "headers" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3314d5adb5d94bcdf56771f2e50dbbc80bb4bdf88967526706205ac9eff24eb" +dependencies = [ + "base64", + "bytes", + "headers-core", + "http", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" +dependencies = [ + "http", +] + +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", +] + +[[package]] +name = "hyper-util" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e9a2a24dc5c6821e71a7030e1e14b7b632acac55c40e9d2e082c621261bb56" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "hyper", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] +name = "indexmap" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "libc" +version = "0.2.177" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" + +[[package]] +name = "log" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "mio" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "proc-macro2" +version = "1.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.145" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "slab" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "syn" +version = "2.0.111" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "test" +version = "0.0.1" +dependencies = [ + "tokio", + "warp", +] + +[[package]] +name = "tokio" +version = "1.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-util" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "log", + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", +] + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "unicase" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" + +[[package]] +name = "unicode-ident" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "warp" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d06d9202adc1f15d709c4f4a2069be5428aa912cc025d6f268ac441ab066b0" +dependencies = [ + "bytes", + "futures-util", + "headers", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "log", + "mime", + "mime_guess", + "percent-encoding", + "pin-project", + "scoped-tls", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-util", + "tower-service", + "tracing", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" diff --git a/rust/ql/test/query-tests/security/CWE-079/warp/XSS.expected b/rust/ql/test/query-tests/security/CWE-079/warp/XSS.expected new file mode 100644 index 00000000000..8a366d3b0d5 --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-079/warp/XSS.expected @@ -0,0 +1,27 @@ +#select +| main.rs:10:13:10:29 | ...::html | main.rs:7:10:7:12 | map | main.rs:10:13:10:29 | ...::html | Cross-site scripting vulnerability due to a $@. | main.rs:7:10:7:12 | map | user-provided value | +edges +| main.rs:7:10:7:12 | map | main.rs:7:15:7:26 | ...: String | provenance | Src:MaD:2 | +| main.rs:7:15:7:26 | ...: String | main.rs:9:32:9:56 | MacroExpr | provenance | | +| main.rs:9:17:9:20 | body | main.rs:10:31:10:34 | body | provenance | | +| main.rs:9:32:9:56 | ...::format(...) | main.rs:9:32:9:56 | { ... } | provenance | | +| main.rs:9:32:9:56 | ...::must_use(...) | main.rs:9:17:9:20 | body | provenance | | +| main.rs:9:32:9:56 | MacroExpr | main.rs:9:32:9:56 | ...::format(...) | provenance | MaD:3 | +| main.rs:9:32:9:56 | { ... } | main.rs:9:32:9:56 | ...::must_use(...) | provenance | MaD:4 | +| main.rs:10:31:10:34 | body | main.rs:10:13:10:29 | ...::html | provenance | MaD:1 Sink:MaD:1 | +models +| 1 | Sink: warp::reply::html; Argument[0]; html-injection | +| 2 | Source: <_ as warp::filter::Filter>::map; Argument[0].Parameter[0..7]; remote | +| 3 | Summary: alloc::fmt::format; Argument[0]; ReturnValue; taint | +| 4 | Summary: core::hint::must_use; Argument[0]; ReturnValue; value | +nodes +| main.rs:7:10:7:12 | map | semmle.label | map | +| main.rs:7:15:7:26 | ...: String | semmle.label | ...: String | +| main.rs:9:17:9:20 | body | semmle.label | body | +| main.rs:9:32:9:56 | ...::format(...) | semmle.label | ...::format(...) | +| main.rs:9:32:9:56 | ...::must_use(...) | semmle.label | ...::must_use(...) | +| main.rs:9:32:9:56 | MacroExpr | semmle.label | MacroExpr | +| main.rs:9:32:9:56 | { ... } | semmle.label | { ... } | +| main.rs:10:13:10:29 | ...::html | semmle.label | ...::html | +| main.rs:10:31:10:34 | body | semmle.label | body | +subpaths diff --git a/rust/ql/test/query-tests/security/CWE-079/warp/XSS.qlref b/rust/ql/test/query-tests/security/CWE-079/warp/XSS.qlref new file mode 100644 index 00000000000..52e78e53811 --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-079/warp/XSS.qlref @@ -0,0 +1,4 @@ +query: queries/security/CWE-079/XSS.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/rust/ql/test/query-tests/security/CWE-079/warp/main.rs b/rust/ql/test/query-tests/security/CWE-079/warp/main.rs new file mode 100644 index 00000000000..fb300f4cdd4 --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-079/warp/main.rs @@ -0,0 +1,15 @@ +use warp::Filter; + +#[tokio::main] +pub async fn main() { + let hello = warp::path("greet") + .and(warp::path::param()) + .map(|name: String| { // $ Source=name + // Vulnerable to XSS because it directly includes user input in the response + let body = format!("

    Hello, {name}!

    "); + warp::reply::html(body) // $ Alert[rust/xss]=name + }); + + // Start the web server on port 3000 + warp::serve(hello).run(([127, 0, 0, 1], 3000)).await; +} diff --git a/rust/ql/test/query-tests/security/CWE-079/warp/options.yml b/rust/ql/test/query-tests/security/CWE-079/warp/options.yml new file mode 100644 index 00000000000..cae7e414d5e --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-079/warp/options.yml @@ -0,0 +1,4 @@ +qltest_use_nightly: true +qltest_dependencies: + - warp = { version = "0.4.2", features = ["server"]} + - tokio = { version = "1", features = ["rt-multi-thread", "macros"] } \ No newline at end of file diff --git a/rust/ql/test/query-tests/security/CWE-089/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-089/CONSISTENCY/PathResolutionConsistency.expected index 34a867e0917..3187982b20e 100644 --- a/rust/ql/test/query-tests/security/CWE-089/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/security/CWE-089/CONSISTENCY/PathResolutionConsistency.expected @@ -1,4 +1,4 @@ -multipleCallTargets +multipleResolvedTargets | mysql.rs:15:24:15:39 | ...::from(...) | | mysql.rs:16:26:16:85 | ...::from(...) | | mysql.rs:18:13:18:66 | ...::from(...) | diff --git a/rust/ql/test/query-tests/security/CWE-089/SqlInjection.expected b/rust/ql/test/query-tests/security/CWE-089/SqlInjection.expected index d699ca4a389..17f03c0fc92 100644 --- a/rust/ql/test/query-tests/security/CWE-089/SqlInjection.expected +++ b/rust/ql/test/query-tests/security/CWE-089/SqlInjection.expected @@ -40,75 +40,48 @@ edges | mysql.rs:12:33:14:19 | ... .text() [Ok] | mysql.rs:12:33:15:40 | ... .unwrap_or(...) | provenance | MaD:32 | | mysql.rs:12:33:15:40 | ... .unwrap_or(...) | mysql.rs:12:13:12:29 | mut remote_string | provenance | | | mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:25:38:25:49 | unsafe_query | provenance | | -| mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:25:38:25:58 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:26:64:26:75 | unsafe_query | provenance | | -| mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:26:64:26:84 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:27:25:27:36 | unsafe_query | provenance | | -| mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:27:25:27:45 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:28:39:28:50 | unsafe_query | provenance | | -| mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:28:39:28:59 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:29:65:29:76 | unsafe_query | provenance | | -| mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:29:65:29:85 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:30:33:30:44 | unsafe_query | provenance | | -| mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:30:33:30:53 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:32:13:32:24 | unsafe_query | provenance | | -| mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:32:13:32:33 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:36:33:36:44 | unsafe_query | provenance | | -| mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:36:33:36:53 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:37:32:37:43 | unsafe_query | provenance | | -| mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:37:32:37:52 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:39:13:39:24 | unsafe_query | provenance | | -| mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:39:13:39:33 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:42:39:42:50 | unsafe_query | provenance | | -| mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:42:39:42:59 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:75:31:75:42 | unsafe_query | provenance | | -| mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:75:31:75:51 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:80:26:80:37 | unsafe_query | provenance | | -| mysql.rs:17:13:17:24 | unsafe_query | mysql.rs:80:26:80:46 | unsafe_query.as_str() | provenance | MaD:29 | -| mysql.rs:18:13:18:83 | ... + ... | mysql.rs:17:13:17:24 | unsafe_query | provenance | | | mysql.rs:18:13:18:83 | ... + ... | mysql.rs:18:13:18:89 | ... + ... | provenance | MaD:27 | | mysql.rs:18:13:18:83 | ... + ... | mysql.rs:18:13:18:89 | ... + ... | provenance | MaD:28 | | mysql.rs:18:13:18:89 | ... + ... | mysql.rs:17:13:17:24 | unsafe_query | provenance | | | mysql.rs:18:70:18:83 | &remote_string [&ref] | mysql.rs:18:13:18:83 | ... + ... | provenance | MaD:26 | | mysql.rs:18:71:18:83 | remote_string | mysql.rs:18:70:18:83 | &remote_string [&ref] | provenance | | | mysql.rs:25:38:25:49 | unsafe_query | mysql.rs:25:38:25:58 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:25:38:25:58 | unsafe_query.as_str() | mysql.rs:25:32:25:36 | query | provenance | MaD:1 Sink:MaD:1 | | mysql.rs:25:38:25:58 | unsafe_query.as_str() [&ref] | mysql.rs:25:32:25:36 | query | provenance | MaD:1 Sink:MaD:1 | | mysql.rs:26:64:26:75 | unsafe_query | mysql.rs:26:64:26:84 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:26:64:26:84 | unsafe_query.as_str() | mysql.rs:26:54:26:62 | query_opt | provenance | MaD:9 Sink:MaD:9 | | mysql.rs:26:64:26:84 | unsafe_query.as_str() [&ref] | mysql.rs:26:54:26:62 | query_opt | provenance | MaD:9 Sink:MaD:9 | | mysql.rs:27:25:27:36 | unsafe_query | mysql.rs:27:25:27:45 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:27:25:27:45 | unsafe_query.as_str() | mysql.rs:27:14:27:23 | query_drop | provenance | MaD:2 Sink:MaD:2 | | mysql.rs:27:25:27:45 | unsafe_query.as_str() [&ref] | mysql.rs:27:14:27:23 | query_drop | provenance | MaD:2 Sink:MaD:2 | | mysql.rs:28:39:28:50 | unsafe_query | mysql.rs:28:39:28:59 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:28:39:28:59 | unsafe_query.as_str() | mysql.rs:28:27:28:37 | query_first | provenance | MaD:3 Sink:MaD:3 | | mysql.rs:28:39:28:59 | unsafe_query.as_str() [&ref] | mysql.rs:28:27:28:37 | query_first | provenance | MaD:3 Sink:MaD:3 | | mysql.rs:29:65:29:76 | unsafe_query | mysql.rs:29:65:29:85 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:29:65:29:85 | unsafe_query.as_str() | mysql.rs:29:49:29:63 | query_first_opt | provenance | MaD:4 Sink:MaD:4 | | mysql.rs:29:65:29:85 | unsafe_query.as_str() [&ref] | mysql.rs:29:49:29:63 | query_first_opt | provenance | MaD:4 Sink:MaD:4 | | mysql.rs:30:33:30:44 | unsafe_query | mysql.rs:30:33:30:53 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:30:33:30:53 | unsafe_query.as_str() | mysql.rs:30:22:30:31 | query_fold | provenance | MaD:5 Sink:MaD:5 | | mysql.rs:30:33:30:53 | unsafe_query.as_str() [&ref] | mysql.rs:30:22:30:31 | query_fold | provenance | MaD:5 Sink:MaD:5 | | mysql.rs:32:13:32:24 | unsafe_query | mysql.rs:32:13:32:33 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:32:13:32:33 | unsafe_query.as_str() | mysql.rs:31:22:31:35 | query_fold_opt | provenance | MaD:6 Sink:MaD:6 | | mysql.rs:32:13:32:33 | unsafe_query.as_str() [&ref] | mysql.rs:31:22:31:35 | query_fold_opt | provenance | MaD:6 Sink:MaD:6 | | mysql.rs:36:33:36:44 | unsafe_query | mysql.rs:36:33:36:53 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:36:33:36:53 | unsafe_query.as_str() | mysql.rs:36:22:36:31 | query_iter | provenance | MaD:17 Sink:MaD:17 | | mysql.rs:36:33:36:53 | unsafe_query.as_str() [&ref] | mysql.rs:36:22:36:31 | query_iter | provenance | MaD:17 Sink:MaD:17 | | mysql.rs:37:32:37:43 | unsafe_query | mysql.rs:37:32:37:52 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:37:32:37:52 | unsafe_query.as_str() | mysql.rs:37:22:37:30 | query_map | provenance | MaD:7 Sink:MaD:7 | | mysql.rs:37:32:37:52 | unsafe_query.as_str() [&ref] | mysql.rs:37:22:37:30 | query_map | provenance | MaD:7 Sink:MaD:7 | | mysql.rs:39:13:39:24 | unsafe_query | mysql.rs:39:13:39:33 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:39:13:39:33 | unsafe_query.as_str() | mysql.rs:38:22:38:34 | query_map_opt | provenance | MaD:8 Sink:MaD:8 | | mysql.rs:39:13:39:33 | unsafe_query.as_str() [&ref] | mysql.rs:38:22:38:34 | query_map_opt | provenance | MaD:8 Sink:MaD:8 | | mysql.rs:42:39:42:50 | unsafe_query | mysql.rs:42:39:42:59 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:42:39:42:59 | unsafe_query.as_str() | mysql.rs:42:33:42:37 | query | provenance | MaD:1 Sink:MaD:1 | | mysql.rs:42:39:42:59 | unsafe_query.as_str() [&ref] | mysql.rs:42:33:42:37 | query | provenance | MaD:1 Sink:MaD:1 | | mysql.rs:75:31:75:42 | unsafe_query | mysql.rs:75:31:75:51 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:75:31:75:51 | unsafe_query.as_str() | mysql.rs:75:26:75:29 | prep | provenance | MaD:16 Sink:MaD:16 | | mysql.rs:75:31:75:51 | unsafe_query.as_str() [&ref] | mysql.rs:75:26:75:29 | prep | provenance | MaD:16 Sink:MaD:16 | | mysql.rs:80:26:80:37 | unsafe_query | mysql.rs:80:26:80:46 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:80:26:80:46 | unsafe_query.as_str() | mysql.rs:80:15:80:24 | query_drop | provenance | MaD:2 Sink:MaD:2 | | mysql.rs:80:26:80:46 | unsafe_query.as_str() [&ref] | mysql.rs:80:15:80:24 | query_drop | provenance | MaD:2 Sink:MaD:2 | | mysql.rs:97:13:97:29 | mut remote_string | mysql.rs:103:71:103:83 | remote_string | provenance | | | mysql.rs:97:33:97:54 | ...::get | mysql.rs:97:33:97:77 | ...::get(...) [Ok] | provenance | Src:MaD:23 | @@ -117,55 +90,36 @@ edges | mysql.rs:97:33:99:19 | ... .text() [Ok] | mysql.rs:97:33:100:40 | ... .unwrap_or(...) | provenance | MaD:32 | | mysql.rs:97:33:100:40 | ... .unwrap_or(...) | mysql.rs:97:13:97:29 | mut remote_string | provenance | | | mysql.rs:102:13:102:24 | unsafe_query | mysql.rs:110:38:110:49 | unsafe_query | provenance | | -| mysql.rs:102:13:102:24 | unsafe_query | mysql.rs:110:38:110:58 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:102:13:102:24 | unsafe_query | mysql.rs:111:25:111:36 | unsafe_query | provenance | | -| mysql.rs:102:13:102:24 | unsafe_query | mysql.rs:111:25:111:45 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:102:13:102:24 | unsafe_query | mysql.rs:112:47:112:58 | unsafe_query | provenance | | -| mysql.rs:102:13:102:24 | unsafe_query | mysql.rs:112:47:112:67 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:102:13:102:24 | unsafe_query | mysql.rs:114:25:114:36 | unsafe_query | provenance | | -| mysql.rs:102:13:102:24 | unsafe_query | mysql.rs:114:25:114:45 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:102:13:102:24 | unsafe_query | mysql.rs:116:33:116:44 | unsafe_query | provenance | | -| mysql.rs:102:13:102:24 | unsafe_query | mysql.rs:116:33:116:53 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:102:13:102:24 | unsafe_query | mysql.rs:118:40:118:51 | unsafe_query | provenance | | -| mysql.rs:102:13:102:24 | unsafe_query | mysql.rs:118:40:118:60 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:102:13:102:24 | unsafe_query | mysql.rs:121:24:121:35 | unsafe_query | provenance | | -| mysql.rs:102:13:102:24 | unsafe_query | mysql.rs:121:24:121:44 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:102:13:102:24 | unsafe_query | mysql.rs:149:31:149:42 | unsafe_query | provenance | | -| mysql.rs:102:13:102:24 | unsafe_query | mysql.rs:149:31:149:51 | unsafe_query.as_str() | provenance | MaD:29 | | mysql.rs:102:13:102:24 | unsafe_query | mysql.rs:154:26:154:37 | unsafe_query | provenance | | -| mysql.rs:102:13:102:24 | unsafe_query | mysql.rs:154:26:154:46 | unsafe_query.as_str() | provenance | MaD:29 | -| mysql.rs:103:13:103:83 | ... + ... | mysql.rs:102:13:102:24 | unsafe_query | provenance | | | mysql.rs:103:13:103:83 | ... + ... | mysql.rs:103:13:103:89 | ... + ... | provenance | MaD:27 | | mysql.rs:103:13:103:83 | ... + ... | mysql.rs:103:13:103:89 | ... + ... | provenance | MaD:28 | | mysql.rs:103:13:103:89 | ... + ... | mysql.rs:102:13:102:24 | unsafe_query | provenance | | | mysql.rs:103:70:103:83 | &remote_string [&ref] | mysql.rs:103:13:103:83 | ... + ... | provenance | MaD:26 | | mysql.rs:103:71:103:83 | remote_string | mysql.rs:103:70:103:83 | &remote_string [&ref] | provenance | | | mysql.rs:110:38:110:49 | unsafe_query | mysql.rs:110:38:110:58 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:110:38:110:58 | unsafe_query.as_str() | mysql.rs:110:32:110:36 | query | provenance | MaD:10 Sink:MaD:10 | | mysql.rs:110:38:110:58 | unsafe_query.as_str() [&ref] | mysql.rs:110:32:110:36 | query | provenance | MaD:10 Sink:MaD:10 | | mysql.rs:111:25:111:36 | unsafe_query | mysql.rs:111:25:111:45 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:111:25:111:45 | unsafe_query.as_str() | mysql.rs:111:14:111:23 | query_drop | provenance | MaD:11 Sink:MaD:11 | | mysql.rs:111:25:111:45 | unsafe_query.as_str() [&ref] | mysql.rs:111:14:111:23 | query_drop | provenance | MaD:11 Sink:MaD:11 | | mysql.rs:112:47:112:58 | unsafe_query | mysql.rs:112:47:112:67 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:112:47:112:67 | unsafe_query.as_str() | mysql.rs:112:35:112:45 | query_first | provenance | MaD:12 Sink:MaD:12 | | mysql.rs:112:47:112:67 | unsafe_query.as_str() [&ref] | mysql.rs:112:35:112:45 | query_first | provenance | MaD:12 Sink:MaD:12 | | mysql.rs:114:25:114:36 | unsafe_query | mysql.rs:114:25:114:45 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:114:25:114:45 | unsafe_query.as_str() | mysql.rs:114:14:114:23 | query_fold | provenance | MaD:13 Sink:MaD:13 | | mysql.rs:114:25:114:45 | unsafe_query.as_str() [&ref] | mysql.rs:114:14:114:23 | query_fold | provenance | MaD:13 Sink:MaD:13 | | mysql.rs:116:33:116:44 | unsafe_query | mysql.rs:116:33:116:53 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:116:33:116:53 | unsafe_query.as_str() | mysql.rs:116:22:116:31 | query_iter | provenance | MaD:19 Sink:MaD:19 | | mysql.rs:116:33:116:53 | unsafe_query.as_str() [&ref] | mysql.rs:116:22:116:31 | query_iter | provenance | MaD:19 Sink:MaD:19 | | mysql.rs:118:40:118:51 | unsafe_query | mysql.rs:118:40:118:60 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:118:40:118:60 | unsafe_query.as_str() | mysql.rs:118:14:118:25 | query_stream | provenance | MaD:15 Sink:MaD:15 | | mysql.rs:118:40:118:60 | unsafe_query.as_str() [&ref] | mysql.rs:118:14:118:25 | query_stream | provenance | MaD:15 Sink:MaD:15 | | mysql.rs:121:24:121:35 | unsafe_query | mysql.rs:121:24:121:44 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:121:24:121:44 | unsafe_query.as_str() | mysql.rs:121:14:121:22 | query_map | provenance | MaD:14 Sink:MaD:14 | | mysql.rs:121:24:121:44 | unsafe_query.as_str() [&ref] | mysql.rs:121:14:121:22 | query_map | provenance | MaD:14 Sink:MaD:14 | | mysql.rs:149:31:149:42 | unsafe_query | mysql.rs:149:31:149:51 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:149:31:149:51 | unsafe_query.as_str() | mysql.rs:149:26:149:29 | prep | provenance | MaD:18 Sink:MaD:18 | | mysql.rs:149:31:149:51 | unsafe_query.as_str() [&ref] | mysql.rs:149:26:149:29 | prep | provenance | MaD:18 Sink:MaD:18 | | mysql.rs:154:26:154:37 | unsafe_query | mysql.rs:154:26:154:46 | unsafe_query.as_str() [&ref] | provenance | MaD:29 | -| mysql.rs:154:26:154:46 | unsafe_query.as_str() | mysql.rs:154:15:154:24 | query_drop | provenance | MaD:11 Sink:MaD:11 | | mysql.rs:154:26:154:46 | unsafe_query.as_str() [&ref] | mysql.rs:154:15:154:24 | query_drop | provenance | MaD:11 Sink:MaD:11 | | sqlx.rs:47:9:47:18 | arg_string | sqlx.rs:53:27:53:36 | arg_string | provenance | | | sqlx.rs:47:22:47:35 | ...::args | sqlx.rs:47:22:47:37 | ...::args(...) [element] | provenance | Src:MaD:24 | @@ -180,33 +134,30 @@ edges | sqlx.rs:48:25:48:78 | ... .unwrap() | sqlx.rs:48:25:48:85 | ... .text() [Ok] | provenance | MaD:33 | | sqlx.rs:48:25:48:85 | ... .text() [Ok] | sqlx.rs:48:25:48:118 | ... .unwrap_or(...) | provenance | MaD:32 | | sqlx.rs:48:25:48:118 | ... .unwrap_or(...) | sqlx.rs:48:9:48:21 | remote_string | provenance | | -| sqlx.rs:53:9:53:22 | unsafe_query_1 [&ref] | sqlx.rs:78:25:78:47 | unsafe_query_1.as_str() [&ref] | provenance | MaD:29 | +| sqlx.rs:53:9:53:22 | unsafe_query_1 [&ref] | sqlx.rs:78:25:78:38 | unsafe_query_1 [&ref] | provenance | | | sqlx.rs:53:26:53:36 | &arg_string [&ref] | sqlx.rs:53:9:53:22 | unsafe_query_1 [&ref] | provenance | | | sqlx.rs:53:27:53:36 | arg_string | sqlx.rs:53:26:53:36 | &arg_string [&ref] | provenance | | -| sqlx.rs:54:9:54:22 | unsafe_query_2 [&ref] | sqlx.rs:80:29:80:51 | unsafe_query_2.as_str() [&ref] | provenance | MaD:29 | +| sqlx.rs:54:9:54:22 | unsafe_query_2 [&ref] | sqlx.rs:80:29:80:42 | unsafe_query_2 [&ref] | provenance | | | sqlx.rs:54:26:54:39 | &remote_string [&ref] | sqlx.rs:54:9:54:22 | unsafe_query_2 [&ref] | provenance | | | sqlx.rs:54:27:54:39 | remote_string | sqlx.rs:54:26:54:39 | &remote_string [&ref] | provenance | | | sqlx.rs:55:9:55:22 | unsafe_query_3 | sqlx.rs:81:29:81:42 | unsafe_query_3 | provenance | | -| sqlx.rs:55:9:55:22 | unsafe_query_3 | sqlx.rs:81:29:81:51 | unsafe_query_3.as_str() | provenance | MaD:29 | -| sqlx.rs:55:26:55:96 | ... + ... | sqlx.rs:55:9:55:22 | unsafe_query_3 | provenance | | | sqlx.rs:55:26:55:96 | ... + ... | sqlx.rs:55:26:55:102 | ... + ... | provenance | MaD:27 | | sqlx.rs:55:26:55:96 | ... + ... | sqlx.rs:55:26:55:102 | ... + ... | provenance | MaD:28 | | sqlx.rs:55:26:55:102 | ... + ... | sqlx.rs:55:9:55:22 | unsafe_query_3 | provenance | | | sqlx.rs:55:83:55:96 | &remote_string [&ref] | sqlx.rs:55:26:55:96 | ... + ... | provenance | MaD:26 | | sqlx.rs:55:84:55:96 | remote_string | sqlx.rs:55:83:55:96 | &remote_string [&ref] | provenance | | | sqlx.rs:56:9:56:22 | unsafe_query_4 | sqlx.rs:82:29:82:42 | unsafe_query_4 | provenance | | -| sqlx.rs:56:9:56:22 | unsafe_query_4 | sqlx.rs:82:29:82:51 | unsafe_query_4.as_str() | provenance | MaD:29 | | sqlx.rs:59:17:59:72 | ...::format(...) | sqlx.rs:59:17:59:72 | { ... } | provenance | | | sqlx.rs:59:17:59:72 | ...::must_use(...) | sqlx.rs:56:9:56:22 | unsafe_query_4 | provenance | | | sqlx.rs:59:17:59:72 | MacroExpr | sqlx.rs:59:17:59:72 | ...::format(...) | provenance | MaD:34 | | sqlx.rs:59:17:59:72 | { ... } | sqlx.rs:59:17:59:72 | ...::must_use(...) | provenance | MaD:35 | +| sqlx.rs:78:25:78:38 | unsafe_query_1 [&ref] | sqlx.rs:78:25:78:47 | unsafe_query_1.as_str() [&ref] | provenance | MaD:29 | | sqlx.rs:78:25:78:47 | unsafe_query_1.as_str() [&ref] | sqlx.rs:78:13:78:23 | ...::query | provenance | MaD:20 Sink:MaD:20 | +| sqlx.rs:80:29:80:42 | unsafe_query_2 [&ref] | sqlx.rs:80:29:80:51 | unsafe_query_2.as_str() [&ref] | provenance | MaD:29 | | sqlx.rs:80:29:80:51 | unsafe_query_2.as_str() [&ref] | sqlx.rs:80:17:80:27 | ...::query | provenance | MaD:20 Sink:MaD:20 | | sqlx.rs:81:29:81:42 | unsafe_query_3 | sqlx.rs:81:29:81:51 | unsafe_query_3.as_str() [&ref] | provenance | MaD:29 | -| sqlx.rs:81:29:81:51 | unsafe_query_3.as_str() | sqlx.rs:81:17:81:27 | ...::query | provenance | MaD:20 Sink:MaD:20 | | sqlx.rs:81:29:81:51 | unsafe_query_3.as_str() [&ref] | sqlx.rs:81:17:81:27 | ...::query | provenance | MaD:20 Sink:MaD:20 | | sqlx.rs:82:29:82:42 | unsafe_query_4 | sqlx.rs:82:29:82:51 | unsafe_query_4.as_str() [&ref] | provenance | MaD:29 | -| sqlx.rs:82:29:82:51 | unsafe_query_4.as_str() | sqlx.rs:82:17:82:27 | ...::query | provenance | MaD:20 Sink:MaD:20 | | sqlx.rs:82:29:82:51 | unsafe_query_4.as_str() [&ref] | sqlx.rs:82:17:82:27 | ...::query | provenance | MaD:20 Sink:MaD:20 | | sqlx.rs:100:9:100:21 | remote_string | sqlx.rs:102:84:102:96 | remote_string | provenance | | | sqlx.rs:100:25:100:46 | ...::get | sqlx.rs:100:25:100:69 | ...::get(...) [Ok] | provenance | Src:MaD:23 | @@ -215,40 +166,27 @@ edges | sqlx.rs:100:25:100:85 | ... .text() [Ok] | sqlx.rs:100:25:100:118 | ... .unwrap_or(...) | provenance | MaD:32 | | sqlx.rs:100:25:100:118 | ... .unwrap_or(...) | sqlx.rs:100:9:100:21 | remote_string | provenance | | | sqlx.rs:102:9:102:22 | unsafe_query_1 | sqlx.rs:113:31:113:44 | unsafe_query_1 | provenance | | -| sqlx.rs:102:9:102:22 | unsafe_query_1 | sqlx.rs:113:31:113:53 | unsafe_query_1.as_str() | provenance | MaD:29 | | sqlx.rs:102:9:102:22 | unsafe_query_1 | sqlx.rs:120:29:120:42 | unsafe_query_1 | provenance | | -| sqlx.rs:102:9:102:22 | unsafe_query_1 | sqlx.rs:120:29:120:51 | unsafe_query_1.as_str() | provenance | MaD:29 | | sqlx.rs:102:9:102:22 | unsafe_query_1 | sqlx.rs:127:29:127:42 | unsafe_query_1 | provenance | | -| sqlx.rs:102:9:102:22 | unsafe_query_1 | sqlx.rs:127:29:127:51 | unsafe_query_1.as_str() | provenance | MaD:29 | | sqlx.rs:102:9:102:22 | unsafe_query_1 | sqlx.rs:136:55:136:68 | unsafe_query_1 | provenance | | -| sqlx.rs:102:9:102:22 | unsafe_query_1 | sqlx.rs:136:55:136:77 | unsafe_query_1.as_str() | provenance | MaD:29 | | sqlx.rs:102:9:102:22 | unsafe_query_1 | sqlx.rs:145:55:145:68 | unsafe_query_1 | provenance | | -| sqlx.rs:102:9:102:22 | unsafe_query_1 | sqlx.rs:145:55:145:77 | unsafe_query_1.as_str() | provenance | MaD:29 | | sqlx.rs:102:9:102:22 | unsafe_query_1 | sqlx.rs:153:29:153:42 | unsafe_query_1 | provenance | | -| sqlx.rs:102:9:102:22 | unsafe_query_1 | sqlx.rs:153:29:153:51 | unsafe_query_1.as_str() | provenance | MaD:29 | -| sqlx.rs:102:26:102:96 | ... + ... | sqlx.rs:102:9:102:22 | unsafe_query_1 | provenance | | | sqlx.rs:102:26:102:96 | ... + ... | sqlx.rs:102:26:102:102 | ... + ... | provenance | MaD:27 | | sqlx.rs:102:26:102:96 | ... + ... | sqlx.rs:102:26:102:102 | ... + ... | provenance | MaD:28 | | sqlx.rs:102:26:102:102 | ... + ... | sqlx.rs:102:9:102:22 | unsafe_query_1 | provenance | | | sqlx.rs:102:83:102:96 | &remote_string [&ref] | sqlx.rs:102:26:102:96 | ... + ... | provenance | MaD:26 | | sqlx.rs:102:84:102:96 | remote_string | sqlx.rs:102:83:102:96 | &remote_string [&ref] | provenance | | | sqlx.rs:113:31:113:44 | unsafe_query_1 | sqlx.rs:113:31:113:53 | unsafe_query_1.as_str() [&ref] | provenance | MaD:29 | -| sqlx.rs:113:31:113:53 | unsafe_query_1.as_str() | sqlx.rs:113:17:113:29 | ...::raw_sql | provenance | MaD:22 Sink:MaD:22 | | sqlx.rs:113:31:113:53 | unsafe_query_1.as_str() [&ref] | sqlx.rs:113:17:113:29 | ...::raw_sql | provenance | MaD:22 Sink:MaD:22 | | sqlx.rs:120:29:120:42 | unsafe_query_1 | sqlx.rs:120:29:120:51 | unsafe_query_1.as_str() [&ref] | provenance | MaD:29 | -| sqlx.rs:120:29:120:51 | unsafe_query_1.as_str() | sqlx.rs:120:17:120:27 | ...::query | provenance | MaD:20 Sink:MaD:20 | | sqlx.rs:120:29:120:51 | unsafe_query_1.as_str() [&ref] | sqlx.rs:120:17:120:27 | ...::query | provenance | MaD:20 Sink:MaD:20 | | sqlx.rs:127:29:127:42 | unsafe_query_1 | sqlx.rs:127:29:127:51 | unsafe_query_1.as_str() [&ref] | provenance | MaD:29 | -| sqlx.rs:127:29:127:51 | unsafe_query_1.as_str() | sqlx.rs:127:17:127:27 | ...::query | provenance | MaD:20 Sink:MaD:20 | | sqlx.rs:127:29:127:51 | unsafe_query_1.as_str() [&ref] | sqlx.rs:127:17:127:27 | ...::query | provenance | MaD:20 Sink:MaD:20 | | sqlx.rs:136:55:136:68 | unsafe_query_1 | sqlx.rs:136:55:136:77 | unsafe_query_1.as_str() [&ref] | provenance | MaD:29 | -| sqlx.rs:136:55:136:77 | unsafe_query_1.as_str() | sqlx.rs:136:40:136:53 | ...::query_as | provenance | MaD:21 Sink:MaD:21 | | sqlx.rs:136:55:136:77 | unsafe_query_1.as_str() [&ref] | sqlx.rs:136:40:136:53 | ...::query_as | provenance | MaD:21 Sink:MaD:21 | | sqlx.rs:145:55:145:68 | unsafe_query_1 | sqlx.rs:145:55:145:77 | unsafe_query_1.as_str() [&ref] | provenance | MaD:29 | -| sqlx.rs:145:55:145:77 | unsafe_query_1.as_str() | sqlx.rs:145:40:145:53 | ...::query_as | provenance | MaD:21 Sink:MaD:21 | | sqlx.rs:145:55:145:77 | unsafe_query_1.as_str() [&ref] | sqlx.rs:145:40:145:53 | ...::query_as | provenance | MaD:21 Sink:MaD:21 | | sqlx.rs:153:29:153:42 | unsafe_query_1 | sqlx.rs:153:29:153:51 | unsafe_query_1.as_str() [&ref] | provenance | MaD:29 | -| sqlx.rs:153:29:153:51 | unsafe_query_1.as_str() | sqlx.rs:153:17:153:27 | ...::query | provenance | MaD:20 Sink:MaD:20 | | sqlx.rs:153:29:153:51 | unsafe_query_1.as_str() [&ref] | sqlx.rs:153:17:153:27 | ...::query | provenance | MaD:20 Sink:MaD:20 | | sqlx.rs:173:9:173:21 | remote_string | sqlx.rs:175:84:175:96 | remote_string | provenance | | | sqlx.rs:173:25:173:46 | ...::get | sqlx.rs:173:25:173:69 | ...::get(...) [Ok] | provenance | Src:MaD:23 | @@ -257,15 +195,12 @@ edges | sqlx.rs:173:25:173:85 | ... .text() [Ok] | sqlx.rs:173:25:173:118 | ... .unwrap_or(...) | provenance | MaD:32 | | sqlx.rs:173:25:173:118 | ... .unwrap_or(...) | sqlx.rs:173:9:173:21 | remote_string | provenance | | | sqlx.rs:175:9:175:22 | unsafe_query_1 | sqlx.rs:188:29:188:42 | unsafe_query_1 | provenance | | -| sqlx.rs:175:9:175:22 | unsafe_query_1 | sqlx.rs:188:29:188:51 | unsafe_query_1.as_str() | provenance | MaD:29 | -| sqlx.rs:175:26:175:96 | ... + ... | sqlx.rs:175:9:175:22 | unsafe_query_1 | provenance | | | sqlx.rs:175:26:175:96 | ... + ... | sqlx.rs:175:26:175:102 | ... + ... | provenance | MaD:27 | | sqlx.rs:175:26:175:96 | ... + ... | sqlx.rs:175:26:175:102 | ... + ... | provenance | MaD:28 | | sqlx.rs:175:26:175:102 | ... + ... | sqlx.rs:175:9:175:22 | unsafe_query_1 | provenance | | | sqlx.rs:175:83:175:96 | &remote_string [&ref] | sqlx.rs:175:26:175:96 | ... + ... | provenance | MaD:26 | | sqlx.rs:175:84:175:96 | remote_string | sqlx.rs:175:83:175:96 | &remote_string [&ref] | provenance | | | sqlx.rs:188:29:188:42 | unsafe_query_1 | sqlx.rs:188:29:188:51 | unsafe_query_1.as_str() [&ref] | provenance | MaD:29 | -| sqlx.rs:188:29:188:51 | unsafe_query_1.as_str() | sqlx.rs:188:17:188:27 | ...::query | provenance | MaD:20 Sink:MaD:20 | | sqlx.rs:188:29:188:51 | unsafe_query_1.as_str() [&ref] | sqlx.rs:188:17:188:27 | ...::query | provenance | MaD:20 Sink:MaD:20 | models | 1 | Sink: <_ as mysql::conn::queryable::Queryable>::query; Argument[0]; sql-injection | @@ -292,7 +227,7 @@ models | 22 | Sink: sqlx_core::raw_sql::raw_sql; Argument[0]; sql-injection | | 23 | Source: reqwest::blocking::get; ReturnValue.Field[core::result::Result::Ok(0)]; remote | | 24 | Source: std::env::args; ReturnValue.Element; commandargs | -| 25 | Summary: <_ as core::iter::traits::iterator::Iterator>::nth; Argument[self].Element; ReturnValue.Field[core::option::Option::Some(0)]; value | +| 25 | Summary: <_ as core::iter::traits::iterator::Iterator>::nth; Argument[self].Reference.Element; ReturnValue.Field[core::option::Option::Some(0)]; value | | 26 | Summary: <_ as core::ops::arith::Add>::add; Argument[0].Reference; ReturnValue; taint | | 27 | Summary: <_ as core::ops::arith::Add>::add; Argument[self]; ReturnValue; taint | | 28 | Summary: ::add; Argument[self]; ReturnValue; value | @@ -317,55 +252,42 @@ nodes | mysql.rs:18:71:18:83 | remote_string | semmle.label | remote_string | | mysql.rs:25:32:25:36 | query | semmle.label | query | | mysql.rs:25:38:25:49 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:25:38:25:58 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:25:38:25:58 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:26:54:26:62 | query_opt | semmle.label | query_opt | | mysql.rs:26:64:26:75 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:26:64:26:84 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:26:64:26:84 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:27:14:27:23 | query_drop | semmle.label | query_drop | | mysql.rs:27:25:27:36 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:27:25:27:45 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:27:25:27:45 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:28:27:28:37 | query_first | semmle.label | query_first | | mysql.rs:28:39:28:50 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:28:39:28:59 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:28:39:28:59 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:29:49:29:63 | query_first_opt | semmle.label | query_first_opt | | mysql.rs:29:65:29:76 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:29:65:29:85 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:29:65:29:85 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:30:22:30:31 | query_fold | semmle.label | query_fold | | mysql.rs:30:33:30:44 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:30:33:30:53 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:30:33:30:53 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:31:22:31:35 | query_fold_opt | semmle.label | query_fold_opt | | mysql.rs:32:13:32:24 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:32:13:32:33 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:32:13:32:33 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:36:22:36:31 | query_iter | semmle.label | query_iter | | mysql.rs:36:33:36:44 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:36:33:36:53 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:36:33:36:53 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:37:22:37:30 | query_map | semmle.label | query_map | | mysql.rs:37:32:37:43 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:37:32:37:52 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:37:32:37:52 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:38:22:38:34 | query_map_opt | semmle.label | query_map_opt | | mysql.rs:39:13:39:24 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:39:13:39:33 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:39:13:39:33 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:42:33:42:37 | query | semmle.label | query | | mysql.rs:42:39:42:50 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:42:39:42:59 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:42:39:42:59 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:75:26:75:29 | prep | semmle.label | prep | | mysql.rs:75:31:75:42 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:75:31:75:51 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:75:31:75:51 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:80:15:80:24 | query_drop | semmle.label | query_drop | | mysql.rs:80:26:80:37 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:80:26:80:46 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:80:26:80:46 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:97:13:97:29 | mut remote_string | semmle.label | mut remote_string | | mysql.rs:97:33:97:54 | ...::get | semmle.label | ...::get | @@ -380,39 +302,30 @@ nodes | mysql.rs:103:71:103:83 | remote_string | semmle.label | remote_string | | mysql.rs:110:32:110:36 | query | semmle.label | query | | mysql.rs:110:38:110:49 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:110:38:110:58 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:110:38:110:58 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:111:14:111:23 | query_drop | semmle.label | query_drop | | mysql.rs:111:25:111:36 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:111:25:111:45 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:111:25:111:45 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:112:35:112:45 | query_first | semmle.label | query_first | | mysql.rs:112:47:112:58 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:112:47:112:67 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:112:47:112:67 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:114:14:114:23 | query_fold | semmle.label | query_fold | | mysql.rs:114:25:114:36 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:114:25:114:45 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:114:25:114:45 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:116:22:116:31 | query_iter | semmle.label | query_iter | | mysql.rs:116:33:116:44 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:116:33:116:53 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:116:33:116:53 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:118:14:118:25 | query_stream | semmle.label | query_stream | | mysql.rs:118:40:118:51 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:118:40:118:60 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:118:40:118:60 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:121:14:121:22 | query_map | semmle.label | query_map | | mysql.rs:121:24:121:35 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:121:24:121:44 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:121:24:121:44 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:149:26:149:29 | prep | semmle.label | prep | | mysql.rs:149:31:149:42 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:149:31:149:51 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:149:31:149:51 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | mysql.rs:154:15:154:24 | query_drop | semmle.label | query_drop | | mysql.rs:154:26:154:37 | unsafe_query | semmle.label | unsafe_query | -| mysql.rs:154:26:154:46 | unsafe_query.as_str() | semmle.label | unsafe_query.as_str() | | mysql.rs:154:26:154:46 | unsafe_query.as_str() [&ref] | semmle.label | unsafe_query.as_str() [&ref] | | sqlx.rs:47:9:47:18 | arg_string | semmle.label | arg_string | | sqlx.rs:47:22:47:35 | ...::args | semmle.label | ...::args | @@ -442,16 +355,16 @@ nodes | sqlx.rs:59:17:59:72 | MacroExpr | semmle.label | MacroExpr | | sqlx.rs:59:17:59:72 | { ... } | semmle.label | { ... } | | sqlx.rs:78:13:78:23 | ...::query | semmle.label | ...::query | +| sqlx.rs:78:25:78:38 | unsafe_query_1 [&ref] | semmle.label | unsafe_query_1 [&ref] | | sqlx.rs:78:25:78:47 | unsafe_query_1.as_str() [&ref] | semmle.label | unsafe_query_1.as_str() [&ref] | | sqlx.rs:80:17:80:27 | ...::query | semmle.label | ...::query | +| sqlx.rs:80:29:80:42 | unsafe_query_2 [&ref] | semmle.label | unsafe_query_2 [&ref] | | sqlx.rs:80:29:80:51 | unsafe_query_2.as_str() [&ref] | semmle.label | unsafe_query_2.as_str() [&ref] | | sqlx.rs:81:17:81:27 | ...::query | semmle.label | ...::query | | sqlx.rs:81:29:81:42 | unsafe_query_3 | semmle.label | unsafe_query_3 | -| sqlx.rs:81:29:81:51 | unsafe_query_3.as_str() | semmle.label | unsafe_query_3.as_str() | | sqlx.rs:81:29:81:51 | unsafe_query_3.as_str() [&ref] | semmle.label | unsafe_query_3.as_str() [&ref] | | sqlx.rs:82:17:82:27 | ...::query | semmle.label | ...::query | | sqlx.rs:82:29:82:42 | unsafe_query_4 | semmle.label | unsafe_query_4 | -| sqlx.rs:82:29:82:51 | unsafe_query_4.as_str() | semmle.label | unsafe_query_4.as_str() | | sqlx.rs:82:29:82:51 | unsafe_query_4.as_str() [&ref] | semmle.label | unsafe_query_4.as_str() [&ref] | | sqlx.rs:100:9:100:21 | remote_string | semmle.label | remote_string | | sqlx.rs:100:25:100:46 | ...::get | semmle.label | ...::get | @@ -466,27 +379,21 @@ nodes | sqlx.rs:102:84:102:96 | remote_string | semmle.label | remote_string | | sqlx.rs:113:17:113:29 | ...::raw_sql | semmle.label | ...::raw_sql | | sqlx.rs:113:31:113:44 | unsafe_query_1 | semmle.label | unsafe_query_1 | -| sqlx.rs:113:31:113:53 | unsafe_query_1.as_str() | semmle.label | unsafe_query_1.as_str() | | sqlx.rs:113:31:113:53 | unsafe_query_1.as_str() [&ref] | semmle.label | unsafe_query_1.as_str() [&ref] | | sqlx.rs:120:17:120:27 | ...::query | semmle.label | ...::query | | sqlx.rs:120:29:120:42 | unsafe_query_1 | semmle.label | unsafe_query_1 | -| sqlx.rs:120:29:120:51 | unsafe_query_1.as_str() | semmle.label | unsafe_query_1.as_str() | | sqlx.rs:120:29:120:51 | unsafe_query_1.as_str() [&ref] | semmle.label | unsafe_query_1.as_str() [&ref] | | sqlx.rs:127:17:127:27 | ...::query | semmle.label | ...::query | | sqlx.rs:127:29:127:42 | unsafe_query_1 | semmle.label | unsafe_query_1 | -| sqlx.rs:127:29:127:51 | unsafe_query_1.as_str() | semmle.label | unsafe_query_1.as_str() | | sqlx.rs:127:29:127:51 | unsafe_query_1.as_str() [&ref] | semmle.label | unsafe_query_1.as_str() [&ref] | | sqlx.rs:136:40:136:53 | ...::query_as | semmle.label | ...::query_as | | sqlx.rs:136:55:136:68 | unsafe_query_1 | semmle.label | unsafe_query_1 | -| sqlx.rs:136:55:136:77 | unsafe_query_1.as_str() | semmle.label | unsafe_query_1.as_str() | | sqlx.rs:136:55:136:77 | unsafe_query_1.as_str() [&ref] | semmle.label | unsafe_query_1.as_str() [&ref] | | sqlx.rs:145:40:145:53 | ...::query_as | semmle.label | ...::query_as | | sqlx.rs:145:55:145:68 | unsafe_query_1 | semmle.label | unsafe_query_1 | -| sqlx.rs:145:55:145:77 | unsafe_query_1.as_str() | semmle.label | unsafe_query_1.as_str() | | sqlx.rs:145:55:145:77 | unsafe_query_1.as_str() [&ref] | semmle.label | unsafe_query_1.as_str() [&ref] | | sqlx.rs:153:17:153:27 | ...::query | semmle.label | ...::query | | sqlx.rs:153:29:153:42 | unsafe_query_1 | semmle.label | unsafe_query_1 | -| sqlx.rs:153:29:153:51 | unsafe_query_1.as_str() | semmle.label | unsafe_query_1.as_str() | | sqlx.rs:153:29:153:51 | unsafe_query_1.as_str() [&ref] | semmle.label | unsafe_query_1.as_str() [&ref] | | sqlx.rs:173:9:173:21 | remote_string | semmle.label | remote_string | | sqlx.rs:173:25:173:46 | ...::get | semmle.label | ...::get | @@ -501,6 +408,5 @@ nodes | sqlx.rs:175:84:175:96 | remote_string | semmle.label | remote_string | | sqlx.rs:188:17:188:27 | ...::query | semmle.label | ...::query | | sqlx.rs:188:29:188:42 | unsafe_query_1 | semmle.label | unsafe_query_1 | -| sqlx.rs:188:29:188:51 | unsafe_query_1.as_str() | semmle.label | unsafe_query_1.as_str() | | sqlx.rs:188:29:188:51 | unsafe_query_1.as_str() [&ref] | semmle.label | unsafe_query_1.as_str() [&ref] | subpaths diff --git a/rust/ql/test/query-tests/security/CWE-117/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-117/CONSISTENCY/PathResolutionConsistency.expected index c25043e0ef6..698af5a0279 100644 --- a/rust/ql/test/query-tests/security/CWE-117/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/security/CWE-117/CONSISTENCY/PathResolutionConsistency.expected @@ -1,2 +1,2 @@ -multipleCallTargets +multipleResolvedTargets | main.rs:9:43:9:63 | ...::from(...) | diff --git a/rust/ql/test/query-tests/security/CWE-117/LogInjection.expected b/rust/ql/test/query-tests/security/CWE-117/LogInjection.expected index 2e00f941c24..d812380d9c7 100644 --- a/rust/ql/test/query-tests/security/CWE-117/LogInjection.expected +++ b/rust/ql/test/query-tests/security/CWE-117/LogInjection.expected @@ -58,7 +58,7 @@ models | 4 | Source: reqwest::blocking::get; ReturnValue.Field[core::result::Result::Ok(0)]; remote | | 5 | Source: std::env::args; ReturnValue.Element; commandargs | | 6 | Source: std::env::var; ReturnValue.Field[core::result::Result::Ok(0)]; environment | -| 7 | Summary: <_ as core::iter::traits::iterator::Iterator>::nth; Argument[self].Element; ReturnValue.Field[core::option::Option::Some(0)]; value | +| 7 | Summary: <_ as core::iter::traits::iterator::Iterator>::nth; Argument[self].Reference.Element; ReturnValue.Field[core::option::Option::Some(0)]; value | | 8 | Summary: ::unwrap_or_default; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | | 9 | Summary: ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | | 10 | Summary: ::unwrap_or; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | diff --git a/rust/ql/test/query-tests/security/CWE-295/Cargo.lock b/rust/ql/test/query-tests/security/CWE-295/Cargo.lock new file mode 100644 index 00000000000..43943439edd --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-295/Cargo.lock @@ -0,0 +1,1596 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" + +[[package]] +name = "bumpalo" +version = "3.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" + +[[package]] +name = "cc" +version = "1.2.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35900b6c8d709fb1d854671ae27aeaa9eec2f8b01b364e1619a40da3e6fe2afe" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "find-msvc-tools" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] + +[[package]] +name = "h2" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" + +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hyper" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1744436df46f0bde35af3eda22aeaba453aada65d8f1c171cd8a5f59030bd69f" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "system-configuration", + "tokio", + "tower-service", + "tracing", + "windows-registry", +] + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e93fcd3157766c0c8da2f8cff6ce651a31f0810eaa1c51ec363ef790bbb5fb99" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02845b3647bb045f1100ecd6480ff52f34c35f82d9880e029d329c21d1054899" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f867b9d1d896b67beb18518eda36fdb77a32ea590de864f1325b294a6d14397" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "js-sys" +version = "0.3.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "libc" +version = "0.2.177" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" + +[[package]] +name = "linux-raw-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "log" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mio" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "native-tls" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "openssl" +version = "0.10.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-sys" +version = "0.9.111" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro2" +version = "1.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "reqwest" +version = "0.12.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d0946410b9f7b082a427e4ef5c8ff541a88b357bc6c637c40db3a68ac70a36f" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", + "js-sys", + "log", + "mime", + "native-tls", + "percent-encoding", + "pin-project-lite", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.16", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustix" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94182ad936a0c91c324cd46c6511b9510ed16af436d7b5bab34beab0afd55f7a" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "schannel" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.145" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "slab" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.110" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tempfile" +version = "3.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" +dependencies = [ + "fastrand", + "getrandom 0.3.4", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "test" +version = "0.0.1" +dependencies = [ + "native-tls", + "rand", + "reqwest", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "unicode-ident" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "551f88106c6d5e7ccc7cd9a16f312dd3b5d36ea8b4954304657d5dfba115d4a0" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-sys" +version = "0.3.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a1f95c0d03a47f4ae1f7a64643a6bb97465d9b740f0fa8f90ea33915c99a9a1" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-registry" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" +dependencies = [ + "windows-link 0.1.3", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link 0.2.1", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "wit-bindgen" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/rust/ql/test/query-tests/security/CWE-295/DisabledCertificateCheck.expected b/rust/ql/test/query-tests/security/CWE-295/DisabledCertificateCheck.expected new file mode 100644 index 00000000000..bbc67f6fd18 --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-295/DisabledCertificateCheck.expected @@ -0,0 +1,129 @@ +#select +| main.rs:4:4:4:30 | danger_accept_invalid_certs | main.rs:4:32:4:35 | true | main.rs:4:4:4:30 | danger_accept_invalid_certs | Disabling TLS certificate validation can expose the application to man-in-the-middle attacks. | +| main.rs:9:4:9:34 | danger_accept_invalid_hostnames | main.rs:9:36:9:39 | true | main.rs:9:4:9:34 | danger_accept_invalid_hostnames | Disabling TLS certificate validation can expose the application to man-in-the-middle attacks. | +| main.rs:16:4:16:30 | danger_accept_invalid_certs | main.rs:16:32:16:35 | true | main.rs:16:4:16:30 | danger_accept_invalid_certs | Disabling TLS certificate validation can expose the application to man-in-the-middle attacks. | +| main.rs:17:4:17:34 | danger_accept_invalid_hostnames | main.rs:17:36:17:39 | true | main.rs:17:4:17:34 | danger_accept_invalid_hostnames | Disabling TLS certificate validation can expose the application to man-in-the-middle attacks. | +| main.rs:37:4:37:30 | danger_accept_invalid_certs | main.rs:37:32:37:35 | true | main.rs:37:4:37:30 | danger_accept_invalid_certs | Disabling TLS certificate validation can expose the application to man-in-the-middle attacks. | +| main.rs:42:4:42:34 | danger_accept_invalid_hostnames | main.rs:42:36:42:39 | true | main.rs:42:4:42:34 | danger_accept_invalid_hostnames | Disabling TLS certificate validation can expose the application to man-in-the-middle attacks. | +| main.rs:47:4:47:30 | danger_accept_invalid_certs | main.rs:47:32:47:35 | true | main.rs:47:4:47:30 | danger_accept_invalid_certs | Disabling TLS certificate validation can expose the application to man-in-the-middle attacks. | +| main.rs:48:4:48:34 | danger_accept_invalid_hostnames | main.rs:48:36:48:39 | true | main.rs:48:4:48:34 | danger_accept_invalid_hostnames | Disabling TLS certificate validation can expose the application to man-in-the-middle attacks. | +| main.rs:55:4:55:30 | danger_accept_invalid_certs | main.rs:55:32:55:35 | true | main.rs:55:4:55:30 | danger_accept_invalid_certs | Disabling TLS certificate validation can expose the application to man-in-the-middle attacks. | +| main.rs:56:4:56:34 | danger_accept_invalid_hostnames | main.rs:56:36:56:39 | true | main.rs:56:4:56:34 | danger_accept_invalid_hostnames | Disabling TLS certificate validation can expose the application to man-in-the-middle attacks. | +| main.rs:83:4:83:30 | danger_accept_invalid_certs | main.rs:74:15:74:18 | true | main.rs:83:4:83:30 | danger_accept_invalid_certs | Disabling TLS certificate validation can expose the application to man-in-the-middle attacks. | +| main.rs:88:4:88:30 | danger_accept_invalid_certs | main.rs:75:22:75:25 | true | main.rs:88:4:88:30 | danger_accept_invalid_certs | Disabling TLS certificate validation can expose the application to man-in-the-middle attacks. | +| main.rs:93:4:93:30 | danger_accept_invalid_certs | main.rs:154:17:154:20 | true | main.rs:93:4:93:30 | danger_accept_invalid_certs | Disabling TLS certificate validation can expose the application to man-in-the-middle attacks. | +| main.rs:109:4:109:34 | danger_accept_invalid_hostnames | main.rs:107:17:107:31 | ...::exists | main.rs:109:4:109:34 | danger_accept_invalid_hostnames | Disabling TLS certificate validation can expose the application to man-in-the-middle attacks. | +| main.rs:115:4:115:34 | danger_accept_invalid_hostnames | main.rs:113:43:113:50 | metadata | main.rs:115:4:115:34 | danger_accept_invalid_hostnames | Disabling TLS certificate validation can expose the application to man-in-the-middle attacks. | +| main.rs:121:4:121:34 | danger_accept_invalid_hostnames | main.rs:119:11:119:27 | ...::metadata | main.rs:121:4:121:34 | danger_accept_invalid_hostnames | Disabling TLS certificate validation can expose the application to man-in-the-middle attacks. | +| main.rs:146:4:146:34 | danger_accept_invalid_hostnames | main.rs:144:39:144:42 | true | main.rs:146:4:146:34 | danger_accept_invalid_hostnames | Disabling TLS certificate validation can expose the application to man-in-the-middle attacks. | +edges +| main.rs:4:32:4:35 | true | main.rs:4:4:4:30 | danger_accept_invalid_certs | provenance | MaD:1 Sink:MaD:1 | +| main.rs:9:36:9:39 | true | main.rs:9:4:9:34 | danger_accept_invalid_hostnames | provenance | MaD:2 Sink:MaD:2 | +| main.rs:16:32:16:35 | true | main.rs:16:4:16:30 | danger_accept_invalid_certs | provenance | MaD:1 Sink:MaD:1 | +| main.rs:17:36:17:39 | true | main.rs:17:4:17:34 | danger_accept_invalid_hostnames | provenance | MaD:2 Sink:MaD:2 | +| main.rs:37:32:37:35 | true | main.rs:37:4:37:30 | danger_accept_invalid_certs | provenance | MaD:3 Sink:MaD:3 | +| main.rs:42:36:42:39 | true | main.rs:42:4:42:34 | danger_accept_invalid_hostnames | provenance | MaD:6 Sink:MaD:6 | +| main.rs:47:32:47:35 | true | main.rs:47:4:47:30 | danger_accept_invalid_certs | provenance | MaD:3 Sink:MaD:3 | +| main.rs:48:36:48:39 | true | main.rs:48:4:48:34 | danger_accept_invalid_hostnames | provenance | MaD:4 Sink:MaD:4 | +| main.rs:55:32:55:35 | true | main.rs:55:4:55:30 | danger_accept_invalid_certs | provenance | MaD:5 Sink:MaD:5 | +| main.rs:56:36:56:39 | true | main.rs:56:4:56:34 | danger_accept_invalid_hostnames | provenance | MaD:6 Sink:MaD:6 | +| main.rs:73:19:73:40 | ...: bool | main.rs:93:32:93:47 | sometimes_global | provenance | | +| main.rs:74:6:74:11 | always | main.rs:83:32:83:37 | always | provenance | | +| main.rs:74:15:74:18 | true | main.rs:74:6:74:11 | always | provenance | | +| main.rs:75:6:75:18 | mut sometimes | main.rs:88:32:88:40 | sometimes | provenance | | +| main.rs:75:22:75:25 | true | main.rs:75:6:75:18 | mut sometimes | provenance | | +| main.rs:83:32:83:37 | always | main.rs:83:4:83:30 | danger_accept_invalid_certs | provenance | MaD:1 Sink:MaD:1 | +| main.rs:88:32:88:40 | sometimes | main.rs:88:4:88:30 | danger_accept_invalid_certs | provenance | MaD:1 Sink:MaD:1 | +| main.rs:93:32:93:47 | sometimes_global | main.rs:93:4:93:30 | danger_accept_invalid_certs | provenance | MaD:1 Sink:MaD:1 | +| main.rs:107:6:107:7 | b1 | main.rs:109:36:109:37 | b1 | provenance | | +| main.rs:107:17:107:31 | ...::exists | main.rs:107:17:107:42 | ...::exists(...) [Ok] | provenance | Src:MaD:8 | +| main.rs:107:17:107:42 | ...::exists(...) [Ok] | main.rs:107:17:107:51 | ... .unwrap() | provenance | MaD:10 | +| main.rs:107:17:107:51 | ... .unwrap() | main.rs:107:6:107:7 | b1 | provenance | | +| main.rs:109:36:109:37 | b1 | main.rs:109:4:109:34 | danger_accept_invalid_hostnames | provenance | MaD:2 Sink:MaD:2 | +| main.rs:113:6:113:7 | b2 | main.rs:115:36:115:37 | b2 | provenance | | +| main.rs:113:11:113:52 | ... .metadata() [Ok] | main.rs:113:11:113:61 | ... .unwrap() | provenance | MaD:10 | +| main.rs:113:11:113:61 | ... .unwrap() | main.rs:113:11:113:71 | ... .is_file() | provenance | MaD:12 | +| main.rs:113:11:113:71 | ... .is_file() | main.rs:113:6:113:7 | b2 | provenance | | +| main.rs:113:43:113:50 | metadata | main.rs:113:11:113:52 | ... .metadata() [Ok] | provenance | Src:MaD:7 | +| main.rs:115:36:115:37 | b2 | main.rs:115:4:115:34 | danger_accept_invalid_hostnames | provenance | MaD:2 Sink:MaD:2 | +| main.rs:119:6:119:7 | b3 | main.rs:121:36:121:37 | b3 | provenance | | +| main.rs:119:11:119:27 | ...::metadata | main.rs:119:11:119:38 | ...::metadata(...) [Ok] | provenance | Src:MaD:9 | +| main.rs:119:11:119:38 | ...::metadata(...) [Ok] | main.rs:119:11:119:47 | ... .unwrap() | provenance | MaD:10 | +| main.rs:119:11:119:47 | ... .unwrap() | main.rs:119:11:119:56 | ... .is_dir() | provenance | MaD:11 | +| main.rs:119:11:119:56 | ... .is_dir() | main.rs:119:6:119:7 | b3 | provenance | | +| main.rs:121:36:121:37 | b3 | main.rs:121:4:121:34 | danger_accept_invalid_hostnames | provenance | MaD:2 Sink:MaD:2 | +| main.rs:144:6:144:7 | b6 | main.rs:146:36:146:37 | b6 | provenance | | +| main.rs:144:39:144:42 | true | main.rs:144:6:144:7 | b6 | provenance | | +| main.rs:146:36:146:37 | b6 | main.rs:146:4:146:34 | danger_accept_invalid_hostnames | provenance | MaD:2 Sink:MaD:2 | +| main.rs:154:17:154:20 | true | main.rs:73:19:73:40 | ...: bool | provenance | | +models +| 1 | Sink: ::danger_accept_invalid_certs; Argument[0]; disable-certificate | +| 2 | Sink: ::danger_accept_invalid_hostnames; Argument[0]; disable-certificate | +| 3 | Sink: ::danger_accept_invalid_certs; Argument[0]; disable-certificate | +| 4 | Sink: ::danger_accept_invalid_hostnames; Argument[0]; disable-certificate | +| 5 | Sink: ::danger_accept_invalid_certs; Argument[0]; disable-certificate | +| 6 | Sink: ::danger_accept_invalid_hostnames; Argument[0]; disable-certificate | +| 7 | Source: ::metadata; ReturnValue.Field[core::result::Result::Ok(0)]; file | +| 8 | Source: std::fs::exists; ReturnValue.Field[core::result::Result::Ok(0)]; file | +| 9 | Source: std::fs::metadata; ReturnValue.Field[core::result::Result::Ok(0)]; file | +| 10 | Summary: ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | +| 11 | Summary: ::is_dir; Argument[self].Reference; ReturnValue; taint | +| 12 | Summary: ::is_file; Argument[self].Reference; ReturnValue; taint | +nodes +| main.rs:4:4:4:30 | danger_accept_invalid_certs | semmle.label | danger_accept_invalid_certs | +| main.rs:4:32:4:35 | true | semmle.label | true | +| main.rs:9:4:9:34 | danger_accept_invalid_hostnames | semmle.label | danger_accept_invalid_hostnames | +| main.rs:9:36:9:39 | true | semmle.label | true | +| main.rs:16:4:16:30 | danger_accept_invalid_certs | semmle.label | danger_accept_invalid_certs | +| main.rs:16:32:16:35 | true | semmle.label | true | +| main.rs:17:4:17:34 | danger_accept_invalid_hostnames | semmle.label | danger_accept_invalid_hostnames | +| main.rs:17:36:17:39 | true | semmle.label | true | +| main.rs:37:4:37:30 | danger_accept_invalid_certs | semmle.label | danger_accept_invalid_certs | +| main.rs:37:32:37:35 | true | semmle.label | true | +| main.rs:42:4:42:34 | danger_accept_invalid_hostnames | semmle.label | danger_accept_invalid_hostnames | +| main.rs:42:36:42:39 | true | semmle.label | true | +| main.rs:47:4:47:30 | danger_accept_invalid_certs | semmle.label | danger_accept_invalid_certs | +| main.rs:47:32:47:35 | true | semmle.label | true | +| main.rs:48:4:48:34 | danger_accept_invalid_hostnames | semmle.label | danger_accept_invalid_hostnames | +| main.rs:48:36:48:39 | true | semmle.label | true | +| main.rs:55:4:55:30 | danger_accept_invalid_certs | semmle.label | danger_accept_invalid_certs | +| main.rs:55:32:55:35 | true | semmle.label | true | +| main.rs:56:4:56:34 | danger_accept_invalid_hostnames | semmle.label | danger_accept_invalid_hostnames | +| main.rs:56:36:56:39 | true | semmle.label | true | +| main.rs:73:19:73:40 | ...: bool | semmle.label | ...: bool | +| main.rs:74:6:74:11 | always | semmle.label | always | +| main.rs:74:15:74:18 | true | semmle.label | true | +| main.rs:75:6:75:18 | mut sometimes | semmle.label | mut sometimes | +| main.rs:75:22:75:25 | true | semmle.label | true | +| main.rs:83:4:83:30 | danger_accept_invalid_certs | semmle.label | danger_accept_invalid_certs | +| main.rs:83:32:83:37 | always | semmle.label | always | +| main.rs:88:4:88:30 | danger_accept_invalid_certs | semmle.label | danger_accept_invalid_certs | +| main.rs:88:32:88:40 | sometimes | semmle.label | sometimes | +| main.rs:93:4:93:30 | danger_accept_invalid_certs | semmle.label | danger_accept_invalid_certs | +| main.rs:93:32:93:47 | sometimes_global | semmle.label | sometimes_global | +| main.rs:107:6:107:7 | b1 | semmle.label | b1 | +| main.rs:107:17:107:31 | ...::exists | semmle.label | ...::exists | +| main.rs:107:17:107:42 | ...::exists(...) [Ok] | semmle.label | ...::exists(...) [Ok] | +| main.rs:107:17:107:51 | ... .unwrap() | semmle.label | ... .unwrap() | +| main.rs:109:4:109:34 | danger_accept_invalid_hostnames | semmle.label | danger_accept_invalid_hostnames | +| main.rs:109:36:109:37 | b1 | semmle.label | b1 | +| main.rs:113:6:113:7 | b2 | semmle.label | b2 | +| main.rs:113:11:113:52 | ... .metadata() [Ok] | semmle.label | ... .metadata() [Ok] | +| main.rs:113:11:113:61 | ... .unwrap() | semmle.label | ... .unwrap() | +| main.rs:113:11:113:71 | ... .is_file() | semmle.label | ... .is_file() | +| main.rs:113:43:113:50 | metadata | semmle.label | metadata | +| main.rs:115:4:115:34 | danger_accept_invalid_hostnames | semmle.label | danger_accept_invalid_hostnames | +| main.rs:115:36:115:37 | b2 | semmle.label | b2 | +| main.rs:119:6:119:7 | b3 | semmle.label | b3 | +| main.rs:119:11:119:27 | ...::metadata | semmle.label | ...::metadata | +| main.rs:119:11:119:38 | ...::metadata(...) [Ok] | semmle.label | ...::metadata(...) [Ok] | +| main.rs:119:11:119:47 | ... .unwrap() | semmle.label | ... .unwrap() | +| main.rs:119:11:119:56 | ... .is_dir() | semmle.label | ... .is_dir() | +| main.rs:121:4:121:34 | danger_accept_invalid_hostnames | semmle.label | danger_accept_invalid_hostnames | +| main.rs:121:36:121:37 | b3 | semmle.label | b3 | +| main.rs:144:6:144:7 | b6 | semmle.label | b6 | +| main.rs:144:39:144:42 | true | semmle.label | true | +| main.rs:146:4:146:34 | danger_accept_invalid_hostnames | semmle.label | danger_accept_invalid_hostnames | +| main.rs:146:36:146:37 | b6 | semmle.label | b6 | +| main.rs:154:17:154:20 | true | semmle.label | true | +subpaths diff --git a/rust/ql/test/query-tests/security/CWE-295/DisabledCertificateCheck.qlref b/rust/ql/test/query-tests/security/CWE-295/DisabledCertificateCheck.qlref new file mode 100644 index 00000000000..cc99c2b151c --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-295/DisabledCertificateCheck.qlref @@ -0,0 +1,4 @@ +query: queries/security/CWE-295/DisabledCertificateCheck.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/rust/ql/test/query-tests/security/CWE-295/main.rs b/rust/ql/test/query-tests/security/CWE-295/main.rs new file mode 100644 index 00000000000..6088e6fc1be --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-295/main.rs @@ -0,0 +1,157 @@ +fn test_native_tls() { + // unsafe + let _client = native_tls::TlsConnector::builder() + .danger_accept_invalid_certs(true) // $ Alert[rust/disabled-certificate-check] + .build() + .unwrap(); + + let _client = native_tls::TlsConnector::builder() + .danger_accept_invalid_hostnames(true) // $ Alert[rust/disabled-certificate-check] + .build() + .unwrap(); + + let _client = native_tls::TlsConnector::builder() + .min_protocol_version(Some(native_tls::Protocol::Tlsv12)) + .use_sni(true) + .danger_accept_invalid_certs(true) // $ Alert[rust/disabled-certificate-check] + .danger_accept_invalid_hostnames(true) // $ Alert[rust/disabled-certificate-check] + .build() + .unwrap(); + + // safe + let _client = native_tls::TlsConnector::builder() + .danger_accept_invalid_certs(false) // good + .danger_accept_invalid_hostnames(false) // good + .build() + .unwrap(); + + // default (safe) + let _client = native_tls::TlsConnector::builder() + .build() + .unwrap(); +} + +fn test_reqwest() { + // unsafe + let _client = reqwest::Client::builder() + .danger_accept_invalid_certs(true) // $ Alert[rust/disabled-certificate-check] + .build() + .unwrap(); + + let _client = reqwest::blocking::ClientBuilder::new() + .danger_accept_invalid_hostnames(true) // $ Alert[rust/disabled-certificate-check] + .build() + .unwrap(); + + let _client = reqwest::ClientBuilder::new() + .danger_accept_invalid_certs(true) // $ Alert[rust/disabled-certificate-check] + .danger_accept_invalid_hostnames(true) // $ Alert[rust/disabled-certificate-check] + .build() + .unwrap(); + + let _client = reqwest::blocking::Client::builder() + .tcp_keepalive(std::time::Duration::from_secs(30)) + .https_only(true) + .danger_accept_invalid_certs(true) // $ Alert[rust/disabled-certificate-check] + .danger_accept_invalid_hostnames(true) // $ Alert[rust/disabled-certificate-check] + .build() + .unwrap(); + + // safe + let _client = reqwest::blocking::Client::builder() + .danger_accept_invalid_certs(false) // good + .danger_accept_invalid_hostnames(false) // good + .build() + .unwrap(); + + // default (safe) + let _client = reqwest::blocking::Client::builder() + .build() + .unwrap(); +} + +fn test_data_flow(sometimes_global: bool) { + let always = true; // $ Source=always + let mut sometimes = true; // $ Source=sometimes + let never = false; + + if rand::random_range(0 .. 2) == 0 { + sometimes = false; + } + + let _client = native_tls::TlsConnector::builder() + .danger_accept_invalid_certs(always) // $ Alert[rust/disabled-certificate-check]=always + .build() + .unwrap(); + + let _client = native_tls::TlsConnector::builder() + .danger_accept_invalid_certs(sometimes) // $ Alert[rust/disabled-certificate-check]=sometimes + .build() + .unwrap(); + + let _client = native_tls::TlsConnector::builder() + .danger_accept_invalid_certs(sometimes_global) // $ Alert[rust/disabled-certificate-check]=arg + .build() + .unwrap(); + + let _client = native_tls::TlsConnector::builder() + .danger_accept_invalid_certs(never) // good + .build() + .unwrap(); +} + +fn test_threat_model_source() { + // hostname setting from `fs` functions returning `bool` directly + // (these are highly unnatural but serve to create simple tests) + + let b1: bool = std::fs::exists("main.rs").unwrap(); // $ Source=exists + let _client = native_tls::TlsConnector::builder() + .danger_accept_invalid_hostnames(b1) // $ Alert[rust/disabled-certificate-check]=exists + .build() + .unwrap(); + + let b2 = std::path::Path::new("main.rs").metadata().unwrap().is_file(); // $ Source=is_file + let _client = native_tls::TlsConnector::builder() + .danger_accept_invalid_hostnames(b2) // $ Alert[rust/disabled-certificate-check]=is_file + .build() + .unwrap(); + + let b3 = std::fs::metadata("main.rs").unwrap().is_dir(); // $ Source=is_dir + let _client = native_tls::TlsConnector::builder() + .danger_accept_invalid_hostnames(b3) // $ Alert[rust/disabled-certificate-check]=is_dir + .build() + .unwrap(); + + // hostname setting from `stdin`, parsed to `bool` + // (these are a little closer to something real) + + let mut input_line = String::new(); + let input = std::io::stdin(); + input.read_line(&mut input_line).unwrap(); + + let b4: bool = input_line.parse::().unwrap_or(false); + let _client = native_tls::TlsConnector::builder() + .danger_accept_invalid_hostnames(b4) // $ MISSING: Alert[rust/disabled-certificate-check]=stdin + .build() + .unwrap(); + + let b5 = std::str::FromStr::from_str(&input_line).unwrap_or(false); + let _client = native_tls::TlsConnector::builder() + .danger_accept_invalid_hostnames(b5) // $ MISSING: Alert[rust/disabled-certificate-check]=stdin + .build() + .unwrap(); + + let b6 = if (input_line == "true") { true } else { false }; // $ Source=true + let _client = native_tls::TlsConnector::builder() + .danger_accept_invalid_hostnames(b6) // $ Alert[rust/disabled-certificate-check]=true + .build() + .unwrap(); +} + +fn main() { + test_native_tls(); + test_reqwest(); + test_data_flow(true); // $ Source=arg + test_data_flow(false); + test_threat_model_source(); +} diff --git a/rust/ql/test/query-tests/security/CWE-295/options.yml b/rust/ql/test/query-tests/security/CWE-295/options.yml new file mode 100644 index 00000000000..711dfe71f8b --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-295/options.yml @@ -0,0 +1,5 @@ +qltest_cargo_check: true +qltest_dependencies: + - reqwest = { version = "0.12.9", features = ["blocking"] } + - native-tls = { version = "0.2.14" } + - rand = { version = "0.9.2" } diff --git a/rust/ql/test/query-tests/security/CWE-312/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-312/CONSISTENCY/PathResolutionConsistency.expected index 078bce75133..260e09db470 100644 --- a/rust/ql/test/query-tests/security/CWE-312/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/security/CWE-312/CONSISTENCY/PathResolutionConsistency.expected @@ -1,4 +1,20 @@ -multipleCallTargets +multipleResolvedTargets +| test_logging.rs:214:13:214:22 | * ... | +| test_logging.rs:214:13:214:22 | * ... | +| test_logging.rs:214:13:214:22 | * ... | +| test_logging.rs:214:13:214:22 | * ... | +| test_logging.rs:217:13:217:22 | * ... | +| test_logging.rs:217:13:217:22 | * ... | +| test_logging.rs:217:13:217:22 | * ... | +| test_logging.rs:217:13:217:22 | * ... | +| test_logging.rs:223:13:223:28 | * ... | +| test_logging.rs:223:13:223:28 | * ... | +| test_logging.rs:223:13:223:28 | * ... | +| test_logging.rs:223:13:223:28 | * ... | +| test_logging.rs:226:13:226:28 | * ... | +| test_logging.rs:226:13:226:28 | * ... | +| test_logging.rs:226:13:226:28 | * ... | +| test_logging.rs:226:13:226:28 | * ... | | test_storage.rs:13:10:13:33 | ...::from(...) | | test_storage.rs:17:10:17:35 | ...::from(...) | | test_storage.rs:21:10:21:35 | ...::from(...) | diff --git a/rust/ql/test/query-tests/security/CWE-312/CleartextLogging.expected b/rust/ql/test/query-tests/security/CWE-312/CleartextLogging.expected index 5b1e89fb7aa..ba7a5c3e50b 100644 --- a/rust/ql/test/query-tests/security/CWE-312/CleartextLogging.expected +++ b/rust/ql/test/query-tests/security/CWE-312/CleartextLogging.expected @@ -137,7 +137,6 @@ edges | test_logging.rs:94:11:94:28 | MacroExpr | test_logging.rs:94:5:94:9 | ...::log | provenance | MaD:12 Sink:MaD:12 | | test_logging.rs:96:9:96:10 | m2 | test_logging.rs:97:11:97:18 | MacroExpr | provenance | | | test_logging.rs:96:14:96:49 | ... + ... | test_logging.rs:96:9:96:10 | m2 | provenance | | -| test_logging.rs:96:41:96:49 | &password | test_logging.rs:96:9:96:10 | m2 | provenance | | | test_logging.rs:96:41:96:49 | &password | test_logging.rs:96:14:96:49 | ... + ... | provenance | MaD:18 | | test_logging.rs:96:41:96:49 | &password | test_logging.rs:96:14:96:49 | ... + ... | provenance | MaD:17 | | test_logging.rs:96:41:96:49 | &password [&ref] | test_logging.rs:96:14:96:49 | ... + ... | provenance | MaD:17 | @@ -231,49 +230,38 @@ edges | test_logging.rs:226:36:226:59 | MacroExpr | test_logging.rs:226:36:226:59 | ...::Some(...) [Some] | provenance | | | test_logging.rs:226:52:226:59 | password | test_logging.rs:226:36:226:59 | MacroExpr | provenance | | | test_logging.rs:229:30:229:62 | MacroExpr | test_logging.rs:229:30:229:71 | ... .as_str() [&ref] | provenance | MaD:20 | -| test_logging.rs:229:30:229:71 | ... .as_str() | test_logging.rs:229:23:229:28 | expect | provenance | MaD:2 Sink:MaD:2 | -| test_logging.rs:229:30:229:71 | ... .as_str() | test_logging.rs:229:23:229:28 | expect | provenance | MaD:2 Sink:MaD:2 | | test_logging.rs:229:30:229:71 | ... .as_str() [&ref] | test_logging.rs:229:23:229:28 | expect | provenance | MaD:2 Sink:MaD:2 | | test_logging.rs:229:30:229:71 | ... .as_str() [&ref] | test_logging.rs:229:23:229:28 | expect | provenance | MaD:2 Sink:MaD:2 | | test_logging.rs:229:38:229:61 | ...::format(...) | test_logging.rs:229:38:229:61 | { ... } | provenance | | | test_logging.rs:229:38:229:61 | ...::must_use(...) | test_logging.rs:229:30:229:62 | MacroExpr | provenance | | -| test_logging.rs:229:38:229:61 | ...::must_use(...) | test_logging.rs:229:30:229:71 | ... .as_str() | provenance | MaD:20 | | test_logging.rs:229:38:229:61 | MacroExpr | test_logging.rs:229:38:229:61 | ...::format(...) | provenance | MaD:21 | | test_logging.rs:229:38:229:61 | { ... } | test_logging.rs:229:38:229:61 | ...::must_use(...) | provenance | MaD:22 | | test_logging.rs:229:54:229:61 | password | test_logging.rs:229:38:229:61 | MacroExpr | provenance | | | test_logging.rs:242:16:242:50 | MacroExpr | test_logging.rs:242:16:242:61 | ... .as_bytes() [&ref] | provenance | MaD:19 | -| test_logging.rs:242:16:242:61 | ... .as_bytes() | test_logging.rs:242:10:242:14 | write | provenance | MaD:7 Sink:MaD:7 | | test_logging.rs:242:16:242:61 | ... .as_bytes() [&ref] | test_logging.rs:242:10:242:14 | write | provenance | MaD:7 Sink:MaD:7 | | test_logging.rs:242:24:242:49 | ...::format(...) | test_logging.rs:242:24:242:49 | { ... } | provenance | | | test_logging.rs:242:24:242:49 | ...::must_use(...) | test_logging.rs:242:16:242:50 | MacroExpr | provenance | | -| test_logging.rs:242:24:242:49 | ...::must_use(...) | test_logging.rs:242:16:242:61 | ... .as_bytes() | provenance | MaD:19 | | test_logging.rs:242:24:242:49 | MacroExpr | test_logging.rs:242:24:242:49 | ...::format(...) | provenance | MaD:21 | | test_logging.rs:242:24:242:49 | { ... } | test_logging.rs:242:24:242:49 | ...::must_use(...) | provenance | MaD:22 | | test_logging.rs:242:42:242:49 | password | test_logging.rs:242:24:242:49 | MacroExpr | provenance | | | test_logging.rs:245:20:245:54 | MacroExpr | test_logging.rs:245:20:245:65 | ... .as_bytes() [&ref] | provenance | MaD:19 | -| test_logging.rs:245:20:245:65 | ... .as_bytes() | test_logging.rs:245:10:245:18 | write_all | provenance | MaD:8 Sink:MaD:8 | | test_logging.rs:245:20:245:65 | ... .as_bytes() [&ref] | test_logging.rs:245:10:245:18 | write_all | provenance | MaD:8 Sink:MaD:8 | | test_logging.rs:245:28:245:53 | ...::format(...) | test_logging.rs:245:28:245:53 | { ... } | provenance | | | test_logging.rs:245:28:245:53 | ...::must_use(...) | test_logging.rs:245:20:245:54 | MacroExpr | provenance | | -| test_logging.rs:245:28:245:53 | ...::must_use(...) | test_logging.rs:245:20:245:65 | ... .as_bytes() | provenance | MaD:19 | | test_logging.rs:245:28:245:53 | MacroExpr | test_logging.rs:245:28:245:53 | ...::format(...) | provenance | MaD:21 | | test_logging.rs:245:28:245:53 | { ... } | test_logging.rs:245:28:245:53 | ...::must_use(...) | provenance | MaD:22 | | test_logging.rs:245:46:245:53 | password | test_logging.rs:245:28:245:53 | MacroExpr | provenance | | | test_logging.rs:248:15:248:49 | MacroExpr | test_logging.rs:248:15:248:60 | ... .as_bytes() [&ref] | provenance | MaD:19 | -| test_logging.rs:248:15:248:60 | ... .as_bytes() | test_logging.rs:248:9:248:13 | write | provenance | MaD:7 Sink:MaD:7 | | test_logging.rs:248:15:248:60 | ... .as_bytes() [&ref] | test_logging.rs:248:9:248:13 | write | provenance | MaD:7 Sink:MaD:7 | | test_logging.rs:248:23:248:48 | ...::format(...) | test_logging.rs:248:23:248:48 | { ... } | provenance | | | test_logging.rs:248:23:248:48 | ...::must_use(...) | test_logging.rs:248:15:248:49 | MacroExpr | provenance | | -| test_logging.rs:248:23:248:48 | ...::must_use(...) | test_logging.rs:248:15:248:60 | ... .as_bytes() | provenance | MaD:19 | | test_logging.rs:248:23:248:48 | MacroExpr | test_logging.rs:248:23:248:48 | ...::format(...) | provenance | MaD:21 | | test_logging.rs:248:23:248:48 | { ... } | test_logging.rs:248:23:248:48 | ...::must_use(...) | provenance | MaD:22 | | test_logging.rs:248:41:248:48 | password | test_logging.rs:248:23:248:48 | MacroExpr | provenance | | | test_logging.rs:251:15:251:49 | MacroExpr | test_logging.rs:251:15:251:60 | ... .as_bytes() [&ref] | provenance | MaD:19 | -| test_logging.rs:251:15:251:60 | ... .as_bytes() | test_logging.rs:251:9:251:13 | write | provenance | MaD:6 Sink:MaD:6 | | test_logging.rs:251:15:251:60 | ... .as_bytes() [&ref] | test_logging.rs:251:9:251:13 | write | provenance | MaD:6 Sink:MaD:6 | | test_logging.rs:251:23:251:48 | ...::format(...) | test_logging.rs:251:23:251:48 | { ... } | provenance | | | test_logging.rs:251:23:251:48 | ...::must_use(...) | test_logging.rs:251:15:251:49 | MacroExpr | provenance | | -| test_logging.rs:251:23:251:48 | ...::must_use(...) | test_logging.rs:251:15:251:60 | ... .as_bytes() | provenance | MaD:19 | | test_logging.rs:251:23:251:48 | MacroExpr | test_logging.rs:251:23:251:48 | ...::format(...) | provenance | MaD:21 | | test_logging.rs:251:23:251:48 | { ... } | test_logging.rs:251:23:251:48 | ...::must_use(...) | provenance | MaD:22 | | test_logging.rs:251:41:251:48 | password | test_logging.rs:251:23:251:48 | MacroExpr | provenance | | @@ -511,7 +499,6 @@ nodes | test_logging.rs:229:23:229:28 | expect | semmle.label | expect | | test_logging.rs:229:23:229:28 | expect | semmle.label | expect | | test_logging.rs:229:30:229:62 | MacroExpr | semmle.label | MacroExpr | -| test_logging.rs:229:30:229:71 | ... .as_str() | semmle.label | ... .as_str() | | test_logging.rs:229:30:229:71 | ... .as_str() [&ref] | semmle.label | ... .as_str() [&ref] | | test_logging.rs:229:38:229:61 | ...::format(...) | semmle.label | ...::format(...) | | test_logging.rs:229:38:229:61 | ...::must_use(...) | semmle.label | ...::must_use(...) | @@ -520,7 +507,6 @@ nodes | test_logging.rs:229:54:229:61 | password | semmle.label | password | | test_logging.rs:242:10:242:14 | write | semmle.label | write | | test_logging.rs:242:16:242:50 | MacroExpr | semmle.label | MacroExpr | -| test_logging.rs:242:16:242:61 | ... .as_bytes() | semmle.label | ... .as_bytes() | | test_logging.rs:242:16:242:61 | ... .as_bytes() [&ref] | semmle.label | ... .as_bytes() [&ref] | | test_logging.rs:242:24:242:49 | ...::format(...) | semmle.label | ...::format(...) | | test_logging.rs:242:24:242:49 | ...::must_use(...) | semmle.label | ...::must_use(...) | @@ -529,7 +515,6 @@ nodes | test_logging.rs:242:42:242:49 | password | semmle.label | password | | test_logging.rs:245:10:245:18 | write_all | semmle.label | write_all | | test_logging.rs:245:20:245:54 | MacroExpr | semmle.label | MacroExpr | -| test_logging.rs:245:20:245:65 | ... .as_bytes() | semmle.label | ... .as_bytes() | | test_logging.rs:245:20:245:65 | ... .as_bytes() [&ref] | semmle.label | ... .as_bytes() [&ref] | | test_logging.rs:245:28:245:53 | ...::format(...) | semmle.label | ...::format(...) | | test_logging.rs:245:28:245:53 | ...::must_use(...) | semmle.label | ...::must_use(...) | @@ -538,7 +523,6 @@ nodes | test_logging.rs:245:46:245:53 | password | semmle.label | password | | test_logging.rs:248:9:248:13 | write | semmle.label | write | | test_logging.rs:248:15:248:49 | MacroExpr | semmle.label | MacroExpr | -| test_logging.rs:248:15:248:60 | ... .as_bytes() | semmle.label | ... .as_bytes() | | test_logging.rs:248:15:248:60 | ... .as_bytes() [&ref] | semmle.label | ... .as_bytes() [&ref] | | test_logging.rs:248:23:248:48 | ...::format(...) | semmle.label | ...::format(...) | | test_logging.rs:248:23:248:48 | ...::must_use(...) | semmle.label | ...::must_use(...) | @@ -547,7 +531,6 @@ nodes | test_logging.rs:248:41:248:48 | password | semmle.label | password | | test_logging.rs:251:9:251:13 | write | semmle.label | write | | test_logging.rs:251:15:251:49 | MacroExpr | semmle.label | MacroExpr | -| test_logging.rs:251:15:251:60 | ... .as_bytes() | semmle.label | ... .as_bytes() | | test_logging.rs:251:15:251:60 | ... .as_bytes() [&ref] | semmle.label | ... .as_bytes() [&ref] | | test_logging.rs:251:23:251:48 | ...::format(...) | semmle.label | ...::format(...) | | test_logging.rs:251:23:251:48 | ...::must_use(...) | semmle.label | ...::must_use(...) | diff --git a/rust/ql/test/query-tests/security/CWE-312/CleartextStorageDatabase.expected b/rust/ql/test/query-tests/security/CWE-312/CleartextStorageDatabase.expected index d5f5cbca002..ab94bd3efe8 100644 --- a/rust/ql/test/query-tests/security/CWE-312/CleartextStorageDatabase.expected +++ b/rust/ql/test/query-tests/security/CWE-312/CleartextStorageDatabase.expected @@ -9,60 +9,41 @@ | test_storage.rs:204:31:204:37 | prepare | test_storage.rs:190:86:190:103 | get_phone_number(...) | test_storage.rs:204:31:204:37 | prepare | This database operation may read or write unencrypted sensitive data from $@. | test_storage.rs:190:86:190:103 | get_phone_number(...) | get_phone_number(...) | edges | test_storage.rs:71:9:71:21 | insert_query2 | test_storage.rs:100:25:100:37 | insert_query2 | provenance | | -| test_storage.rs:71:9:71:21 | insert_query2 | test_storage.rs:100:25:100:46 | insert_query2.as_str() | provenance | MaD:10 | | test_storage.rs:71:9:71:21 | insert_query2 | test_storage.rs:115:27:115:39 | insert_query2 | provenance | | -| test_storage.rs:71:9:71:21 | insert_query2 | test_storage.rs:115:27:115:48 | insert_query2.as_str() | provenance | MaD:10 | | test_storage.rs:71:9:71:21 | insert_query2 | test_storage.rs:119:25:119:37 | insert_query2 | provenance | | -| test_storage.rs:71:9:71:21 | insert_query2 | test_storage.rs:119:25:119:46 | insert_query2.as_str() | provenance | MaD:10 | | test_storage.rs:71:9:71:21 | insert_query2 | test_storage.rs:125:25:125:37 | insert_query2 | provenance | | -| test_storage.rs:71:9:71:21 | insert_query2 | test_storage.rs:125:25:125:46 | insert_query2.as_str() | provenance | MaD:10 | | test_storage.rs:71:9:71:21 | insert_query2 | test_storage.rs:139:25:139:37 | insert_query2 | provenance | | -| test_storage.rs:71:9:71:21 | insert_query2 | test_storage.rs:139:25:139:46 | insert_query2.as_str() | provenance | MaD:10 | -| test_storage.rs:71:25:71:114 | ... + ... | test_storage.rs:71:9:71:21 | insert_query2 | provenance | | | test_storage.rs:71:25:71:114 | ... + ... | test_storage.rs:71:25:71:121 | ... + ... | provenance | MaD:8 | | test_storage.rs:71:25:71:114 | ... + ... | test_storage.rs:71:25:71:121 | ... + ... | provenance | MaD:9 | | test_storage.rs:71:25:71:121 | ... + ... | test_storage.rs:71:9:71:21 | insert_query2 | provenance | | -| test_storage.rs:71:96:71:114 | &... | test_storage.rs:71:9:71:21 | insert_query2 | provenance | | -| test_storage.rs:71:96:71:114 | &... | test_storage.rs:71:25:71:114 | ... + ... | provenance | | | test_storage.rs:71:96:71:114 | &... | test_storage.rs:71:25:71:114 | ... + ... | provenance | MaD:7 | | test_storage.rs:71:96:71:114 | &... | test_storage.rs:71:25:71:114 | ... + ... | provenance | MaD:6 | | test_storage.rs:71:96:71:114 | &... [&ref] | test_storage.rs:71:25:71:114 | ... + ... | provenance | MaD:6 | | test_storage.rs:71:97:71:114 | get_phone_number(...) | test_storage.rs:71:96:71:114 | &... | provenance | Config | | test_storage.rs:71:97:71:114 | get_phone_number(...) | test_storage.rs:71:96:71:114 | &... [&ref] | provenance | | | test_storage.rs:100:25:100:37 | insert_query2 | test_storage.rs:100:25:100:46 | insert_query2.as_str() [&ref] | provenance | MaD:10 | -| test_storage.rs:100:25:100:46 | insert_query2.as_str() | test_storage.rs:100:13:100:23 | ...::query | provenance | MaD:4 Sink:MaD:4 | | test_storage.rs:100:25:100:46 | insert_query2.as_str() [&ref] | test_storage.rs:100:13:100:23 | ...::query | provenance | MaD:4 Sink:MaD:4 | | test_storage.rs:115:27:115:39 | insert_query2 | test_storage.rs:115:27:115:48 | insert_query2.as_str() [&ref] | provenance | MaD:10 | -| test_storage.rs:115:27:115:48 | insert_query2.as_str() | test_storage.rs:115:13:115:25 | ...::raw_sql | provenance | MaD:5 Sink:MaD:5 | | test_storage.rs:115:27:115:48 | insert_query2.as_str() [&ref] | test_storage.rs:115:13:115:25 | ...::raw_sql | provenance | MaD:5 Sink:MaD:5 | | test_storage.rs:119:25:119:37 | insert_query2 | test_storage.rs:119:25:119:46 | insert_query2.as_str() [&ref] | provenance | MaD:10 | -| test_storage.rs:119:25:119:46 | insert_query2.as_str() | test_storage.rs:119:13:119:23 | ...::query | provenance | MaD:4 Sink:MaD:4 | | test_storage.rs:119:25:119:46 | insert_query2.as_str() [&ref] | test_storage.rs:119:13:119:23 | ...::query | provenance | MaD:4 Sink:MaD:4 | | test_storage.rs:125:25:125:37 | insert_query2 | test_storage.rs:125:25:125:46 | insert_query2.as_str() [&ref] | provenance | MaD:10 | -| test_storage.rs:125:25:125:46 | insert_query2.as_str() | test_storage.rs:125:13:125:23 | ...::query | provenance | MaD:4 Sink:MaD:4 | | test_storage.rs:125:25:125:46 | insert_query2.as_str() [&ref] | test_storage.rs:125:13:125:23 | ...::query | provenance | MaD:4 Sink:MaD:4 | | test_storage.rs:139:25:139:37 | insert_query2 | test_storage.rs:139:25:139:46 | insert_query2.as_str() [&ref] | provenance | MaD:10 | -| test_storage.rs:139:25:139:46 | insert_query2.as_str() | test_storage.rs:139:13:139:23 | ...::query | provenance | MaD:4 Sink:MaD:4 | | test_storage.rs:139:25:139:46 | insert_query2.as_str() [&ref] | test_storage.rs:139:13:139:23 | ...::query | provenance | MaD:4 Sink:MaD:4 | | test_storage.rs:189:9:189:24 | insert_query_bad | test_storage.rs:194:25:194:40 | insert_query_bad | provenance | | -| test_storage.rs:189:28:189:117 | ... + ... | test_storage.rs:189:9:189:24 | insert_query_bad | provenance | | | test_storage.rs:189:28:189:117 | ... + ... | test_storage.rs:189:28:189:124 | ... + ... | provenance | MaD:8 | | test_storage.rs:189:28:189:117 | ... + ... | test_storage.rs:189:28:189:124 | ... + ... | provenance | MaD:9 | | test_storage.rs:189:28:189:124 | ... + ... | test_storage.rs:189:9:189:24 | insert_query_bad | provenance | | -| test_storage.rs:189:99:189:117 | &... | test_storage.rs:189:9:189:24 | insert_query_bad | provenance | | -| test_storage.rs:189:99:189:117 | &... | test_storage.rs:189:28:189:117 | ... + ... | provenance | | | test_storage.rs:189:99:189:117 | &... | test_storage.rs:189:28:189:117 | ... + ... | provenance | MaD:7 | | test_storage.rs:189:99:189:117 | &... | test_storage.rs:189:28:189:117 | ... + ... | provenance | MaD:6 | | test_storage.rs:189:99:189:117 | &... [&ref] | test_storage.rs:189:28:189:117 | ... + ... | provenance | MaD:6 | | test_storage.rs:189:100:189:117 | get_phone_number(...) | test_storage.rs:189:99:189:117 | &... | provenance | Config | | test_storage.rs:189:100:189:117 | get_phone_number(...) | test_storage.rs:189:99:189:117 | &... [&ref] | provenance | | | test_storage.rs:190:9:190:24 | select_query_bad | test_storage.rs:196:35:196:50 | select_query_bad | provenance | | -| test_storage.rs:190:28:190:103 | ... + ... | test_storage.rs:190:9:190:24 | select_query_bad | provenance | | | test_storage.rs:190:28:190:103 | ... + ... | test_storage.rs:190:28:190:109 | ... + ... | provenance | MaD:8 | | test_storage.rs:190:28:190:103 | ... + ... | test_storage.rs:190:28:190:109 | ... + ... | provenance | MaD:9 | | test_storage.rs:190:28:190:109 | ... + ... | test_storage.rs:190:9:190:24 | select_query_bad | provenance | | -| test_storage.rs:190:85:190:103 | &... | test_storage.rs:190:9:190:24 | select_query_bad | provenance | | -| test_storage.rs:190:85:190:103 | &... | test_storage.rs:190:28:190:103 | ... + ... | provenance | | | test_storage.rs:190:85:190:103 | &... | test_storage.rs:190:28:190:103 | ... + ... | provenance | MaD:7 | | test_storage.rs:190:85:190:103 | &... | test_storage.rs:190:28:190:103 | ... + ... | provenance | MaD:6 | | test_storage.rs:190:85:190:103 | &... [&ref] | test_storage.rs:190:28:190:103 | ... + ... | provenance | MaD:6 | @@ -101,23 +82,18 @@ nodes | test_storage.rs:71:97:71:114 | get_phone_number(...) | semmle.label | get_phone_number(...) | | test_storage.rs:100:13:100:23 | ...::query | semmle.label | ...::query | | test_storage.rs:100:25:100:37 | insert_query2 | semmle.label | insert_query2 | -| test_storage.rs:100:25:100:46 | insert_query2.as_str() | semmle.label | insert_query2.as_str() | | test_storage.rs:100:25:100:46 | insert_query2.as_str() [&ref] | semmle.label | insert_query2.as_str() [&ref] | | test_storage.rs:115:13:115:25 | ...::raw_sql | semmle.label | ...::raw_sql | | test_storage.rs:115:27:115:39 | insert_query2 | semmle.label | insert_query2 | -| test_storage.rs:115:27:115:48 | insert_query2.as_str() | semmle.label | insert_query2.as_str() | | test_storage.rs:115:27:115:48 | insert_query2.as_str() [&ref] | semmle.label | insert_query2.as_str() [&ref] | | test_storage.rs:119:13:119:23 | ...::query | semmle.label | ...::query | | test_storage.rs:119:25:119:37 | insert_query2 | semmle.label | insert_query2 | -| test_storage.rs:119:25:119:46 | insert_query2.as_str() | semmle.label | insert_query2.as_str() | | test_storage.rs:119:25:119:46 | insert_query2.as_str() [&ref] | semmle.label | insert_query2.as_str() [&ref] | | test_storage.rs:125:13:125:23 | ...::query | semmle.label | ...::query | | test_storage.rs:125:25:125:37 | insert_query2 | semmle.label | insert_query2 | -| test_storage.rs:125:25:125:46 | insert_query2.as_str() | semmle.label | insert_query2.as_str() | | test_storage.rs:125:25:125:46 | insert_query2.as_str() [&ref] | semmle.label | insert_query2.as_str() [&ref] | | test_storage.rs:139:13:139:23 | ...::query | semmle.label | ...::query | | test_storage.rs:139:25:139:37 | insert_query2 | semmle.label | insert_query2 | -| test_storage.rs:139:25:139:46 | insert_query2.as_str() | semmle.label | insert_query2.as_str() | | test_storage.rs:139:25:139:46 | insert_query2.as_str() [&ref] | semmle.label | insert_query2.as_str() [&ref] | | test_storage.rs:189:9:189:24 | insert_query_bad | semmle.label | insert_query_bad | | test_storage.rs:189:28:189:117 | ... + ... | semmle.label | ... + ... | diff --git a/rust/ql/test/query-tests/security/CWE-327/BrokenCryptoAlgorithm/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-327/BrokenCryptoAlgorithm/CONSISTENCY/PathResolutionConsistency.expected index b9925a323cc..18400b7ab59 100644 --- a/rust/ql/test/query-tests/security/CWE-327/BrokenCryptoAlgorithm/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/security/CWE-327/BrokenCryptoAlgorithm/CONSISTENCY/PathResolutionConsistency.expected @@ -1,2 +1,2 @@ -multipleCallTargets +multipleResolvedTargets | test_cipher.rs:114:23:114:50 | ...::new(...) | diff --git a/rust/ql/test/query-tests/security/CWE-614/InsecureCookie.expected b/rust/ql/test/query-tests/security/CWE-614/InsecureCookie.expected index e3a4998b532..7decd880f59 100644 --- a/rust/ql/test/query-tests/security/CWE-614/InsecureCookie.expected +++ b/rust/ql/test/query-tests/security/CWE-614/InsecureCookie.expected @@ -125,9 +125,7 @@ edges | main.rs:53:5:53:49 | ... .secure(...) | main.rs:53:5:53:63 | ... .secure(...) | provenance | MaD:35 | | main.rs:53:5:53:63 | ... .secure(...) | main.rs:53:65:53:69 | build | provenance | MaD:2 Sink:MaD:2 | | main.rs:58:9:58:13 | mut a | main.rs:59:13:59:13 | a | provenance | | -| main.rs:58:9:58:13 | mut a | main.rs:59:13:59:21 | a.clone() | provenance | MaD:18 | | main.rs:58:9:58:13 | mut a | main.rs:60:22:60:22 | a | provenance | | -| main.rs:58:9:58:13 | mut a | main.rs:60:22:60:30 | a.clone() | provenance | MaD:18 | | main.rs:58:17:58:27 | ...::new | main.rs:58:17:58:44 | ...::new(...) | provenance | Src:MaD:17 MaD:17 | | main.rs:58:17:58:44 | ...::new(...) | main.rs:58:9:58:13 | mut a | provenance | | | main.rs:59:13:59:13 | a | main.rs:59:13:59:21 | a.clone() | provenance | MaD:18 | @@ -135,21 +133,14 @@ edges | main.rs:60:22:60:22 | a | main.rs:60:22:60:30 | a.clone() | provenance | MaD:18 | | main.rs:60:22:60:30 | a.clone() | main.rs:60:9:60:20 | add_original | provenance | MaD:5 Sink:MaD:5 | | main.rs:63:5:63:5 | [SSA] a | main.rs:64:13:64:13 | a | provenance | | -| main.rs:63:5:63:5 | [SSA] a | main.rs:64:13:64:21 | a.clone() | provenance | MaD:18 | | main.rs:63:5:63:5 | [SSA] a | main.rs:70:29:70:29 | a | provenance | | -| main.rs:63:5:63:5 | [SSA] a | main.rs:70:29:70:37 | a.clone() | provenance | MaD:18 | | main.rs:63:5:63:5 | [SSA] a | main.rs:79:30:79:30 | a | provenance | | -| main.rs:63:5:63:5 | [SSA] a | main.rs:79:30:79:38 | a.clone() | provenance | MaD:18 | | main.rs:63:5:63:5 | a | main.rs:64:13:64:13 | a | provenance | | -| main.rs:63:5:63:5 | a | main.rs:64:13:64:21 | a.clone() | provenance | MaD:18 | | main.rs:63:5:63:5 | a | main.rs:70:29:70:29 | a | provenance | | -| main.rs:63:5:63:5 | a | main.rs:70:29:70:37 | a.clone() | provenance | MaD:18 | | main.rs:63:5:63:5 | a | main.rs:79:30:79:30 | a | provenance | | -| main.rs:63:5:63:5 | a | main.rs:79:30:79:38 | a.clone() | provenance | MaD:18 | | main.rs:64:13:64:13 | a | main.rs:64:13:64:21 | a.clone() | provenance | MaD:18 | | main.rs:64:13:64:21 | a.clone() | main.rs:64:9:64:11 | add | provenance | MaD:4 Sink:MaD:4 | | main.rs:68:9:68:13 | mut b | main.rs:69:20:69:20 | b | provenance | | -| main.rs:68:9:68:13 | mut b | main.rs:69:20:69:28 | b.clone() | provenance | MaD:18 | | main.rs:68:17:68:29 | ...::named | main.rs:68:17:68:37 | ...::named(...) | provenance | Src:MaD:16 MaD:16 | | main.rs:68:17:68:37 | ...::named(...) | main.rs:68:9:68:13 | mut b | provenance | | | main.rs:69:20:69:20 | b | main.rs:69:20:69:28 | b.clone() | provenance | MaD:18 | @@ -157,15 +148,11 @@ edges | main.rs:70:29:70:29 | a | main.rs:70:29:70:37 | a.clone() | provenance | MaD:18 | | main.rs:70:29:70:37 | a.clone() | main.rs:70:16:70:27 | add_original | provenance | MaD:9 Sink:MaD:9 | | main.rs:71:5:71:5 | [SSA] b | main.rs:72:20:72:20 | b | provenance | | -| main.rs:71:5:71:5 | [SSA] b | main.rs:72:20:72:28 | b.clone() | provenance | MaD:18 | | main.rs:71:5:71:5 | b | main.rs:72:20:72:20 | b | provenance | | -| main.rs:71:5:71:5 | b | main.rs:72:20:72:28 | b.clone() | provenance | MaD:18 | | main.rs:72:20:72:20 | b | main.rs:72:20:72:28 | b.clone() | provenance | MaD:18 | | main.rs:72:20:72:28 | b.clone() | main.rs:72:16:72:18 | add | provenance | MaD:8 Sink:MaD:8 | | main.rs:77:9:77:13 | mut c | main.rs:78:21:78:21 | c | provenance | | -| main.rs:77:9:77:13 | mut c | main.rs:78:21:78:29 | c.clone() | provenance | MaD:18 | | main.rs:77:9:77:13 | mut c | main.rs:83:21:83:21 | c | provenance | | -| main.rs:77:9:77:13 | mut c | main.rs:83:21:83:29 | c.clone() | provenance | MaD:18 | | main.rs:77:17:77:28 | ...::from | main.rs:77:17:77:36 | ...::from(...) | provenance | Src:MaD:14 MaD:14 | | main.rs:77:17:77:36 | ...::from(...) | main.rs:77:9:77:13 | mut c | provenance | | | main.rs:78:21:78:21 | c | main.rs:78:21:78:29 | c.clone() | provenance | MaD:18 | @@ -175,9 +162,7 @@ edges | main.rs:83:21:83:21 | c | main.rs:83:21:83:29 | c.clone() | provenance | MaD:18 | | main.rs:83:21:83:29 | c.clone() | main.rs:83:17:83:19 | add | provenance | MaD:6 Sink:MaD:6 | | main.rs:87:9:87:13 | mut d | main.rs:88:13:88:13 | d | provenance | | -| main.rs:87:9:87:13 | mut d | main.rs:88:13:88:21 | d.clone() | provenance | MaD:18 | | main.rs:87:9:87:13 | mut d | main.rs:94:13:94:13 | d | provenance | | -| main.rs:87:9:87:13 | mut d | main.rs:94:13:94:21 | d.clone() | provenance | MaD:18 | | main.rs:87:17:87:28 | ...::from | main.rs:87:17:87:36 | ...::from(...) | provenance | Src:MaD:14 MaD:14 | | main.rs:87:17:87:36 | ...::from(...) | main.rs:87:9:87:13 | mut d | provenance | | | main.rs:88:13:88:13 | d | main.rs:88:13:88:21 | d.clone() | provenance | MaD:18 | @@ -188,25 +173,22 @@ edges | main.rs:114:5:114:36 | ...::build(...) | main.rs:114:5:114:54 | ... .partitioned(...) | provenance | MaD:33 | | main.rs:114:5:114:54 | ... .partitioned(...) | main.rs:114:56:114:60 | build | provenance | MaD:2 Sink:MaD:2 | | main.rs:122:9:122:9 | a | main.rs:123:20:123:20 | a | provenance | | -| main.rs:122:9:122:9 | a | main.rs:123:20:123:28 | a.clone() | provenance | MaD:18 | | main.rs:122:13:122:41 | ...::new | main.rs:122:13:122:58 | ...::new(...) | provenance | Src:MaD:13 MaD:13 | | main.rs:122:13:122:58 | ...::new(...) | main.rs:122:9:122:9 | a | provenance | | | main.rs:123:20:123:20 | a | main.rs:123:20:123:28 | a.clone() | provenance | MaD:18 | | main.rs:123:20:123:28 | a.clone() | main.rs:123:13:123:18 | insert | provenance | MaD:1 Sink:MaD:1 | | main.rs:130:9:130:9 | c | main.rs:131:20:131:20 | c | provenance | | -| main.rs:130:9:130:9 | c | main.rs:131:20:131:28 | c.clone() | provenance | MaD:18 | -| main.rs:130:9:130:9 | c | main.rs:134:13:134:35 | c.set_partitioned(...) | provenance | MaD:25 | +| main.rs:130:9:130:9 | c | main.rs:134:13:134:13 | c | provenance | | | main.rs:130:13:130:13 | b | main.rs:130:13:130:31 | b.set_secure(...) | provenance | MaD:28 | | main.rs:130:13:130:31 | b.set_secure(...) | main.rs:130:9:130:9 | c | provenance | | | main.rs:131:20:131:20 | c | main.rs:131:20:131:28 | c.clone() | provenance | MaD:18 | | main.rs:131:20:131:28 | c.clone() | main.rs:131:13:131:18 | insert | provenance | MaD:1 Sink:MaD:1 | | main.rs:134:9:134:9 | d | main.rs:135:20:135:20 | d | provenance | | -| main.rs:134:9:134:9 | d | main.rs:135:20:135:28 | d.clone() | provenance | MaD:18 | +| main.rs:134:13:134:13 | c | main.rs:134:13:134:35 | c.set_partitioned(...) | provenance | MaD:25 | | main.rs:134:13:134:35 | c.set_partitioned(...) | main.rs:134:9:134:9 | d | provenance | | | main.rs:135:20:135:20 | d | main.rs:135:20:135:28 | d.clone() | provenance | MaD:18 | | main.rs:135:20:135:28 | d.clone() | main.rs:135:13:135:18 | insert | provenance | MaD:1 Sink:MaD:1 | | main.rs:146:9:146:9 | g | main.rs:147:20:147:20 | g | provenance | | -| main.rs:146:9:146:9 | g | main.rs:147:20:147:28 | g.clone() | provenance | MaD:18 | | main.rs:146:13:146:13 | f | main.rs:146:13:146:31 | f.set_secure(...) | provenance | MaD:28 | | main.rs:146:13:146:31 | f.set_secure(...) | main.rs:146:9:146:9 | g | provenance | | | main.rs:147:20:147:20 | g | main.rs:147:20:147:28 | g.clone() | provenance | MaD:18 | @@ -216,29 +198,17 @@ edges | main.rs:151:13:151:61 | ...::from(...) | main.rs:151:9:151:9 | h | provenance | | | main.rs:152:20:152:20 | h | main.rs:152:13:152:18 | insert | provenance | MaD:1 Sink:MaD:1 | | main.rs:155:9:155:9 | i | main.rs:156:20:156:20 | i | provenance | | -| main.rs:155:9:155:9 | i | main.rs:156:20:156:28 | i.clone() | provenance | MaD:18 | | main.rs:155:9:155:9 | i | main.rs:157:20:157:20 | i | provenance | | -| main.rs:155:9:155:9 | i | main.rs:157:20:157:28 | i.clone() | provenance | MaD:18 | | main.rs:155:9:155:9 | i | main.rs:158:20:158:20 | i | provenance | | -| main.rs:155:9:155:9 | i | main.rs:158:20:158:28 | i.clone() | provenance | MaD:18 | | main.rs:155:9:155:9 | i | main.rs:159:20:159:20 | i | provenance | | -| main.rs:155:9:155:9 | i | main.rs:159:20:159:28 | i.clone() | provenance | MaD:18 | | main.rs:155:9:155:9 | i | main.rs:160:20:160:20 | i | provenance | | -| main.rs:155:9:155:9 | i | main.rs:160:20:160:28 | i.clone() | provenance | MaD:18 | | main.rs:155:9:155:9 | i | main.rs:161:20:161:20 | i | provenance | | -| main.rs:155:9:155:9 | i | main.rs:161:20:161:28 | i.clone() | provenance | MaD:18 | | main.rs:155:9:155:9 | i | main.rs:162:20:162:20 | i | provenance | | -| main.rs:155:9:155:9 | i | main.rs:162:20:162:28 | i.clone() | provenance | MaD:18 | | main.rs:155:9:155:9 | i | main.rs:163:20:163:20 | i | provenance | | -| main.rs:155:9:155:9 | i | main.rs:163:20:163:28 | i.clone() | provenance | MaD:18 | | main.rs:155:9:155:9 | i | main.rs:164:20:164:20 | i | provenance | | -| main.rs:155:9:155:9 | i | main.rs:164:20:164:28 | i.clone() | provenance | MaD:18 | | main.rs:155:9:155:9 | i | main.rs:165:20:165:20 | i | provenance | | -| main.rs:155:9:155:9 | i | main.rs:165:20:165:28 | i.clone() | provenance | MaD:18 | | main.rs:155:9:155:9 | i | main.rs:166:20:166:20 | i | provenance | | -| main.rs:155:9:155:9 | i | main.rs:166:20:166:28 | i.clone() | provenance | MaD:18 | | main.rs:155:9:155:9 | i | main.rs:167:20:167:20 | i | provenance | | -| main.rs:155:9:155:9 | i | main.rs:167:20:167:28 | i.clone() | provenance | MaD:18 | | main.rs:155:13:155:41 | ...::new | main.rs:155:13:155:58 | ...::new(...) | provenance | Src:MaD:13 MaD:13 | | main.rs:155:13:155:58 | ...::new(...) | main.rs:155:9:155:9 | i | provenance | | | main.rs:156:20:156:20 | i | main.rs:156:20:156:28 | i.clone() | provenance | MaD:18 | @@ -285,31 +255,22 @@ edges | main.rs:198:5:198:53 | ... .secure(...) | main.rs:198:5:198:63 | ... .path(...) | provenance | MaD:34 | | main.rs:198:5:198:63 | ... .path(...) | main.rs:198:65:198:70 | finish | provenance | MaD:3 Sink:MaD:3 | | main.rs:201:5:201:11 | [SSA] cookie1 | main.rs:202:13:202:19 | cookie1 | provenance | | -| main.rs:201:5:201:11 | [SSA] cookie1 | main.rs:202:13:202:27 | cookie1.clone() | provenance | MaD:18 | | main.rs:201:5:201:11 | cookie1 | main.rs:202:13:202:19 | cookie1 | provenance | | -| main.rs:201:5:201:11 | cookie1 | main.rs:202:13:202:27 | cookie1.clone() | provenance | MaD:18 | | main.rs:202:13:202:19 | cookie1 | main.rs:202:13:202:27 | cookie1.clone() | provenance | MaD:18 | | main.rs:202:13:202:27 | cookie1.clone() | main.rs:202:9:202:11 | add | provenance | MaD:4 Sink:MaD:4 | | main.rs:212:5:212:22 | ...::build | main.rs:212:5:212:39 | ...::build(...) | provenance | Src:MaD:15 MaD:15 | | main.rs:212:5:212:39 | ...::build(...) | main.rs:212:41:212:46 | finish | provenance | MaD:3 Sink:MaD:3 | | main.rs:214:9:214:15 | cookie3 | main.rs:215:13:215:19 | cookie3 | provenance | | -| main.rs:214:9:214:15 | cookie3 | main.rs:215:13:215:27 | cookie3.clone() | provenance | MaD:18 | | main.rs:214:19:214:34 | ...::new | main.rs:214:19:214:51 | ...::new(...) | provenance | Src:MaD:17 MaD:17 | | main.rs:214:19:214:51 | ...::new(...) | main.rs:214:9:214:15 | cookie3 | provenance | | | main.rs:215:13:215:19 | cookie3 | main.rs:215:13:215:27 | cookie3.clone() | provenance | MaD:18 | | main.rs:215:13:215:27 | cookie3.clone() | main.rs:215:9:215:11 | add | provenance | MaD:4 Sink:MaD:4 | | main.rs:218:5:218:11 | [SSA] cookie2 | main.rs:219:13:219:19 | cookie2 | provenance | | -| main.rs:218:5:218:11 | [SSA] cookie2 | main.rs:219:13:219:27 | cookie2.clone() | provenance | MaD:18 | | main.rs:218:5:218:11 | cookie2 | main.rs:219:13:219:19 | cookie2 | provenance | | -| main.rs:218:5:218:11 | cookie2 | main.rs:219:13:219:27 | cookie2.clone() | provenance | MaD:18 | | main.rs:219:13:219:19 | cookie2 | main.rs:219:13:219:27 | cookie2.clone() | provenance | MaD:18 | | main.rs:219:13:219:27 | cookie2.clone() | main.rs:219:9:219:11 | add | provenance | MaD:4 Sink:MaD:4 | | main.rs:228:5:228:11 | [SSA] cookie1 | main.rs:229:13:229:19 | cookie1 | provenance | | -| main.rs:228:5:228:11 | [SSA] cookie1 | main.rs:229:13:229:27 | cookie1.clone() | provenance | MaD:18 | | main.rs:228:5:228:11 | cookie1 | main.rs:229:13:229:19 | cookie1 | provenance | | -| main.rs:228:5:228:11 | cookie1 | main.rs:229:13:229:19 | cookie1 | provenance | MaD:39 | -| main.rs:228:5:228:11 | cookie1 | main.rs:229:13:229:27 | cookie1.clone() | provenance | MaD:39 | -| main.rs:228:5:228:11 | cookie1 | main.rs:229:13:229:27 | cookie1.clone() | provenance | MaD:18 | | main.rs:229:13:229:19 | cookie1 | main.rs:229:13:229:27 | cookie1.clone() | provenance | MaD:18 | | main.rs:229:13:229:27 | cookie1.clone() | main.rs:229:9:229:11 | add | provenance | MaD:11 Sink:MaD:11 | | main.rs:241:9:241:25 | cookie_config_bad | main.rs:242:43:242:59 | cookie_config_bad | provenance | | @@ -328,23 +289,18 @@ edges | main.rs:260:5:260:57 | ... .secure(...) | main.rs:260:5:260:67 | ... .path(...) | provenance | MaD:34 | | main.rs:260:5:260:67 | ... .path(...) | main.rs:260:69:260:74 | finish | provenance | MaD:3 Sink:MaD:3 | | main.rs:263:5:263:11 | [SSA] cookie1 | main.rs:264:13:264:19 | cookie1 | provenance | | -| main.rs:263:5:263:11 | [SSA] cookie1 | main.rs:264:13:264:27 | cookie1.clone() | provenance | MaD:18 | | main.rs:263:5:263:11 | cookie1 | main.rs:264:13:264:19 | cookie1 | provenance | | -| main.rs:263:5:263:11 | cookie1 | main.rs:264:13:264:27 | cookie1.clone() | provenance | MaD:18 | | main.rs:264:13:264:19 | cookie1 | main.rs:264:13:264:27 | cookie1.clone() | provenance | MaD:18 | | main.rs:264:13:264:27 | cookie1.clone() | main.rs:264:9:264:11 | add | provenance | MaD:4 Sink:MaD:4 | | main.rs:274:5:274:26 | ...::build | main.rs:274:5:274:43 | ...::build(...) | provenance | Src:MaD:15 MaD:15 | | main.rs:274:5:274:43 | ...::build(...) | main.rs:274:45:274:50 | finish | provenance | MaD:3 Sink:MaD:3 | | main.rs:276:9:276:15 | cookie3 | main.rs:277:13:277:19 | cookie3 | provenance | | -| main.rs:276:9:276:15 | cookie3 | main.rs:277:13:277:27 | cookie3.clone() | provenance | MaD:18 | | main.rs:276:19:276:38 | ...::new | main.rs:276:19:276:55 | ...::new(...) | provenance | Src:MaD:17 MaD:17 | | main.rs:276:19:276:55 | ...::new(...) | main.rs:276:9:276:15 | cookie3 | provenance | | | main.rs:277:13:277:19 | cookie3 | main.rs:277:13:277:27 | cookie3.clone() | provenance | MaD:18 | | main.rs:277:13:277:27 | cookie3.clone() | main.rs:277:9:277:11 | add | provenance | MaD:4 Sink:MaD:4 | | main.rs:280:5:280:11 | [SSA] cookie2 | main.rs:281:13:281:19 | cookie2 | provenance | | -| main.rs:280:5:280:11 | [SSA] cookie2 | main.rs:281:13:281:27 | cookie2.clone() | provenance | MaD:18 | | main.rs:280:5:280:11 | cookie2 | main.rs:281:13:281:19 | cookie2 | provenance | | -| main.rs:280:5:280:11 | cookie2 | main.rs:281:13:281:27 | cookie2.clone() | provenance | MaD:18 | | main.rs:281:13:281:19 | cookie2 | main.rs:281:13:281:27 | cookie2.clone() | provenance | MaD:18 | | main.rs:281:13:281:27 | cookie2.clone() | main.rs:281:9:281:11 | add | provenance | MaD:4 Sink:MaD:4 | models @@ -386,7 +342,6 @@ models | 36 | Summary: ::name; Argument[self]; ReturnValue; taint | | 37 | Summary: ::path; Argument[self]; ReturnValue; taint | | 38 | Summary: ::secure; Argument[self].OptionalBarrier[cookie-secure-arg0]; ReturnValue; taint | -| 39 | Summary: ::set_secure; Argument[self].OptionalBarrier[cookie-secure-arg0]; Argument[self]; taint | nodes | main.rs:8:19:8:50 | ...::build(...) | semmle.label | ...::build(...) | | main.rs:8:19:8:64 | ... .secure(...) | semmle.label | ... .secure(...) | @@ -526,6 +481,7 @@ nodes | main.rs:131:20:131:20 | c | semmle.label | c | | main.rs:131:20:131:28 | c.clone() | semmle.label | c.clone() | | main.rs:134:9:134:9 | d | semmle.label | d | +| main.rs:134:13:134:13 | c | semmle.label | c | | main.rs:134:13:134:35 | c.set_partitioned(...) | semmle.label | c.set_partitioned(...) | | main.rs:135:13:135:18 | insert | semmle.label | insert | | main.rs:135:20:135:20 | d | semmle.label | d | diff --git a/rust/ql/test/query-tests/security/CWE-696/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-696/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index 538ecf9c2e3..00000000000 --- a/rust/ql/test/query-tests/security/CWE-696/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -multipleCallTargets -| test.rs:117:9:117:21 | ptr.is_null() | diff --git a/rust/ql/test/query-tests/security/CWE-770/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-770/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index 1abeb1aeb87..00000000000 --- a/rust/ql/test/query-tests/security/CWE-770/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,7 +0,0 @@ -multipleCallTargets -| main.rs:242:44:242:78 | ... .cast() | -| main.rs:245:44:245:78 | ... .cast() | -| main.rs:248:44:248:78 | ... .cast() | -| main.rs:251:14:251:48 | ... .cast() | -| main.rs:254:14:254:48 | ... .cast() | -| main.rs:257:14:257:48 | ... .cast() | diff --git a/rust/ql/test/query-tests/security/CWE-770/UncontrolledAllocationSize.expected b/rust/ql/test/query-tests/security/CWE-770/UncontrolledAllocationSize.expected index 8fcbd27ac02..24edd2ff7f5 100644 --- a/rust/ql/test/query-tests/security/CWE-770/UncontrolledAllocationSize.expected +++ b/rust/ql/test/query-tests/security/CWE-770/UncontrolledAllocationSize.expected @@ -57,104 +57,109 @@ edges | main.rs:18:41:18:41 | v | main.rs:20:50:20:50 | v | provenance | | | main.rs:18:41:18:41 | v | main.rs:29:60:29:60 | v | provenance | | | main.rs:18:41:18:41 | v | main.rs:32:60:32:60 | v | provenance | | -| main.rs:18:41:18:41 | v | main.rs:32:60:32:89 | ... * ... | provenance | | -| main.rs:18:41:18:41 | v | main.rs:35:9:35:10 | s6 | provenance | | | main.rs:18:41:18:41 | v | main.rs:35:49:35:49 | v | provenance | | | main.rs:20:9:20:10 | l2 | main.rs:21:31:21:32 | l2 | provenance | | -| main.rs:20:14:20:54 | ...::from_size_align(...) [Ok] | main.rs:20:14:20:63 | ... .unwrap() | provenance | MaD:40 | +| main.rs:20:14:20:54 | ...::from_size_align(...) [Ok] | main.rs:20:14:20:63 | ... .unwrap() | provenance | MaD:42 | | main.rs:20:14:20:63 | ... .unwrap() | main.rs:20:9:20:10 | l2 | provenance | | -| main.rs:20:50:20:50 | v | main.rs:20:14:20:54 | ...::from_size_align(...) [Ok] | provenance | MaD:30 | +| main.rs:20:50:20:50 | v | main.rs:20:14:20:54 | ...::from_size_align(...) [Ok] | provenance | MaD:34 | | main.rs:21:31:21:32 | l2 | main.rs:21:13:21:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | -| main.rs:21:31:21:32 | l2 | main.rs:22:31:22:44 | l2.align_to(...) [Ok] | provenance | MaD:24 | -| main.rs:21:31:21:32 | l2 | main.rs:23:31:23:44 | l2.align_to(...) [Ok] | provenance | MaD:24 | +| main.rs:21:31:21:32 | l2 | main.rs:22:31:22:32 | l2 | provenance | | +| main.rs:21:31:21:32 | l2 | main.rs:23:31:23:32 | l2 | provenance | | | main.rs:21:31:21:32 | l2 | main.rs:24:38:24:39 | l2 | provenance | | -| main.rs:22:31:22:44 | l2.align_to(...) [Ok] | main.rs:22:31:22:53 | ... .unwrap() | provenance | MaD:40 | +| main.rs:22:31:22:32 | l2 | main.rs:22:31:22:44 | l2.align_to(...) [Ok] | provenance | MaD:28 | +| main.rs:22:31:22:44 | l2.align_to(...) [Ok] | main.rs:22:31:22:53 | ... .unwrap() | provenance | MaD:42 | | main.rs:22:31:22:53 | ... .unwrap() | main.rs:22:13:22:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | -| main.rs:23:31:23:44 | l2.align_to(...) [Ok] | main.rs:23:31:23:53 | ... .unwrap() | provenance | MaD:40 | -| main.rs:23:31:23:53 | ... .unwrap() | main.rs:23:31:23:68 | ... .pad_to_align() | provenance | MaD:33 | +| main.rs:23:31:23:32 | l2 | main.rs:23:31:23:44 | l2.align_to(...) [Ok] | provenance | MaD:28 | +| main.rs:23:31:23:44 | l2.align_to(...) [Ok] | main.rs:23:31:23:53 | ... .unwrap() | provenance | MaD:42 | +| main.rs:23:31:23:53 | ... .unwrap() | main.rs:23:31:23:68 | ... .pad_to_align() | provenance | MaD:36 | | main.rs:23:31:23:68 | ... .pad_to_align() | main.rs:23:13:23:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | | main.rs:24:38:24:39 | l2 | main.rs:24:13:24:36 | ...::alloc_zeroed | provenance | MaD:16 Sink:MaD:16 | | main.rs:29:9:29:10 | l4 | main.rs:30:31:30:32 | l4 | provenance | | | main.rs:29:14:29:64 | ...::from_size_align_unchecked(...) | main.rs:29:9:29:10 | l4 | provenance | | -| main.rs:29:60:29:60 | v | main.rs:29:14:29:64 | ...::from_size_align_unchecked(...) | provenance | MaD:32 | +| main.rs:29:60:29:60 | v | main.rs:29:14:29:64 | ...::from_size_align_unchecked(...) | provenance | MaD:35 | | main.rs:30:31:30:32 | l4 | main.rs:30:13:30:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | | main.rs:32:9:32:10 | l5 | main.rs:33:31:33:32 | l5 | provenance | | | main.rs:32:14:32:118 | ...::from_size_align_unchecked(...) | main.rs:32:9:32:10 | l5 | provenance | | -| main.rs:32:60:32:60 | v | main.rs:32:60:32:89 | ... * ... | provenance | MaD:43 | -| main.rs:32:60:32:89 | ... * ... | main.rs:32:14:32:118 | ...::from_size_align_unchecked(...) | provenance | MaD:32 | +| main.rs:32:60:32:60 | v | main.rs:32:60:32:89 | ... * ... | provenance | MaD:27 | +| main.rs:32:60:32:60 | v | main.rs:32:60:32:89 | ... * ... | provenance | MaD:45 | +| main.rs:32:60:32:89 | ... * ... | main.rs:32:14:32:118 | ...::from_size_align_unchecked(...) | provenance | MaD:35 | | main.rs:33:31:33:32 | l5 | main.rs:33:13:33:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | | main.rs:35:9:35:10 | s6 | main.rs:36:60:36:61 | s6 | provenance | | -| main.rs:35:15:35:49 | ... * ... | main.rs:35:9:35:10 | s6 | provenance | | -| main.rs:35:49:35:49 | v | main.rs:35:15:35:49 | ... * ... | provenance | MaD:42 | +| main.rs:35:14:35:54 | ... + ... | main.rs:35:9:35:10 | s6 | provenance | | +| main.rs:35:15:35:49 | ... * ... | main.rs:35:14:35:54 | ... + ... | provenance | MaD:24 | +| main.rs:35:49:35:49 | v | main.rs:35:15:35:49 | ... * ... | provenance | MaD:26 | +| main.rs:35:49:35:49 | v | main.rs:35:15:35:49 | ... * ... | provenance | MaD:25 | +| main.rs:35:49:35:49 | v | main.rs:35:15:35:49 | ... * ... | provenance | MaD:44 | | main.rs:36:9:36:10 | l6 | main.rs:37:31:37:32 | l6 | provenance | | -| main.rs:36:9:36:10 | l6 [Layout.size] | main.rs:37:31:37:32 | l6 [Layout.size] | provenance | | | main.rs:36:14:36:65 | ...::from_size_align_unchecked(...) | main.rs:36:9:36:10 | l6 | provenance | | -| main.rs:36:14:36:65 | ...::from_size_align_unchecked(...) [Layout.size] | main.rs:36:9:36:10 | l6 [Layout.size] | provenance | | -| main.rs:36:60:36:61 | s6 | main.rs:36:14:36:65 | ...::from_size_align_unchecked(...) | provenance | MaD:32 | -| main.rs:36:60:36:61 | s6 | main.rs:36:14:36:65 | ...::from_size_align_unchecked(...) [Layout.size] | provenance | MaD:31 | +| main.rs:36:60:36:61 | s6 | main.rs:36:14:36:65 | ...::from_size_align_unchecked(...) | provenance | MaD:35 | | main.rs:37:31:37:32 | l6 | main.rs:37:13:37:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | -| main.rs:37:31:37:32 | l6 | main.rs:39:60:39:68 | l6.size() | provenance | MaD:37 | -| main.rs:37:31:37:32 | l6 [Layout.size] | main.rs:39:60:39:68 | l6.size() | provenance | MaD:36 | +| main.rs:37:31:37:32 | l6 | main.rs:39:60:39:61 | l6 | provenance | | | main.rs:39:9:39:10 | l7 | main.rs:40:31:40:32 | l7 | provenance | | | main.rs:39:14:39:72 | ...::from_size_align_unchecked(...) | main.rs:39:9:39:10 | l7 | provenance | | -| main.rs:39:60:39:68 | l6.size() | main.rs:39:14:39:72 | ...::from_size_align_unchecked(...) | provenance | MaD:32 | +| main.rs:39:60:39:61 | l6 | main.rs:39:60:39:68 | l6.size() | provenance | MaD:39 | +| main.rs:39:60:39:68 | l6.size() | main.rs:39:14:39:72 | ...::from_size_align_unchecked(...) | provenance | MaD:35 | | main.rs:40:31:40:32 | l7 | main.rs:40:13:40:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | | main.rs:43:44:43:51 | ...: usize | main.rs:50:41:50:41 | v | provenance | | -| main.rs:43:44:43:51 | ...: usize | main.rs:51:41:51:45 | ... + ... | provenance | | +| main.rs:43:44:43:51 | ...: usize | main.rs:51:41:51:41 | v | provenance | | | main.rs:43:44:43:51 | ...: usize | main.rs:53:48:53:48 | v | provenance | | -| main.rs:43:44:43:51 | ...: usize | main.rs:54:48:54:53 | ... * ... | provenance | | +| main.rs:43:44:43:51 | ...: usize | main.rs:54:48:54:48 | v | provenance | | | main.rs:43:44:43:51 | ...: usize | main.rs:58:34:58:34 | v | provenance | | | main.rs:43:44:43:51 | ...: usize | main.rs:67:46:67:46 | v | provenance | | -| main.rs:50:31:50:42 | l2.repeat(...) [Ok, tuple.0] | main.rs:50:31:50:51 | ... .unwrap() [tuple.0] | provenance | MaD:40 | +| main.rs:50:31:50:42 | l2.repeat(...) [Ok, tuple.0] | main.rs:50:31:50:51 | ... .unwrap() [tuple.0] | provenance | MaD:42 | | main.rs:50:31:50:51 | ... .unwrap() [tuple.0] | main.rs:50:31:50:53 | ... .0 | provenance | | | main.rs:50:31:50:53 | ... .0 | main.rs:50:13:50:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | -| main.rs:50:41:50:41 | v | main.rs:50:31:50:42 | l2.repeat(...) [Ok, tuple.0] | provenance | MaD:34 | -| main.rs:51:31:51:46 | l2.repeat(...) [Ok, tuple.0] | main.rs:51:31:51:55 | ... .unwrap() [tuple.0] | provenance | MaD:40 | +| main.rs:50:41:50:41 | v | main.rs:50:31:50:42 | l2.repeat(...) [Ok, tuple.0] | provenance | MaD:37 | +| main.rs:51:31:51:46 | l2.repeat(...) [Ok, tuple.0] | main.rs:51:31:51:55 | ... .unwrap() [tuple.0] | provenance | MaD:42 | | main.rs:51:31:51:55 | ... .unwrap() [tuple.0] | main.rs:51:31:51:57 | ... .0 | provenance | | | main.rs:51:31:51:57 | ... .0 | main.rs:51:13:51:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | -| main.rs:51:41:51:45 | ... + ... | main.rs:51:31:51:46 | l2.repeat(...) [Ok, tuple.0] | provenance | MaD:34 | -| main.rs:53:31:53:49 | l2.repeat_packed(...) [Ok] | main.rs:53:31:53:58 | ... .unwrap() | provenance | MaD:40 | +| main.rs:51:41:51:41 | v | main.rs:51:41:51:45 | ... + ... | provenance | MaD:24 | +| main.rs:51:41:51:45 | ... + ... | main.rs:51:31:51:46 | l2.repeat(...) [Ok, tuple.0] | provenance | MaD:37 | +| main.rs:53:31:53:49 | l2.repeat_packed(...) [Ok] | main.rs:53:31:53:58 | ... .unwrap() | provenance | MaD:42 | | main.rs:53:31:53:58 | ... .unwrap() | main.rs:53:13:53:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | -| main.rs:53:48:53:48 | v | main.rs:53:31:53:49 | l2.repeat_packed(...) [Ok] | provenance | MaD:35 | -| main.rs:54:31:54:54 | l2.repeat_packed(...) [Ok] | main.rs:54:31:54:63 | ... .unwrap() | provenance | MaD:40 | +| main.rs:53:48:53:48 | v | main.rs:53:31:53:49 | l2.repeat_packed(...) [Ok] | provenance | MaD:38 | +| main.rs:54:31:54:54 | l2.repeat_packed(...) [Ok] | main.rs:54:31:54:63 | ... .unwrap() | provenance | MaD:42 | | main.rs:54:31:54:63 | ... .unwrap() | main.rs:54:13:54:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | -| main.rs:54:48:54:53 | ... * ... | main.rs:54:31:54:54 | l2.repeat_packed(...) [Ok] | provenance | MaD:35 | +| main.rs:54:48:54:48 | v | main.rs:54:48:54:53 | ... * ... | provenance | MaD:27 | +| main.rs:54:48:54:53 | ... * ... | main.rs:54:31:54:54 | l2.repeat_packed(...) [Ok] | provenance | MaD:38 | | main.rs:58:9:58:20 | TuplePat [tuple.0] | main.rs:58:10:58:11 | k1 | provenance | | | main.rs:58:10:58:11 | k1 | main.rs:59:31:59:32 | k1 | provenance | | -| main.rs:58:24:58:35 | l3.repeat(...) [Ok, tuple.0] | main.rs:58:24:58:66 | ... .expect(...) [tuple.0] | provenance | MaD:39 | +| main.rs:58:24:58:35 | l3.repeat(...) [Ok, tuple.0] | main.rs:58:24:58:66 | ... .expect(...) [tuple.0] | provenance | MaD:41 | | main.rs:58:24:58:66 | ... .expect(...) [tuple.0] | main.rs:58:9:58:20 | TuplePat [tuple.0] | provenance | | -| main.rs:58:34:58:34 | v | main.rs:58:24:58:35 | l3.repeat(...) [Ok, tuple.0] | provenance | MaD:34 | +| main.rs:58:34:58:34 | v | main.rs:58:24:58:35 | l3.repeat(...) [Ok, tuple.0] | provenance | MaD:37 | | main.rs:59:31:59:32 | k1 | main.rs:59:13:59:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | | main.rs:59:31:59:32 | k1 | main.rs:60:34:60:35 | k1 | provenance | | -| main.rs:59:31:59:32 | k1 | main.rs:62:24:62:36 | k1.extend(...) [Ok, tuple.0] | provenance | MaD:27 | +| main.rs:59:31:59:32 | k1 | main.rs:62:24:62:25 | k1 | provenance | | | main.rs:59:31:59:32 | k1 | main.rs:64:48:64:49 | k1 | provenance | | -| main.rs:59:31:59:32 | k1 | main.rs:65:31:65:50 | k1.extend_packed(...) [Ok] | provenance | MaD:29 | +| main.rs:59:31:59:32 | k1 | main.rs:65:31:65:32 | k1 | provenance | | | main.rs:60:9:60:20 | TuplePat [tuple.0] | main.rs:60:10:60:11 | k2 | provenance | | | main.rs:60:10:60:11 | k2 | main.rs:61:31:61:32 | k2 | provenance | | -| main.rs:60:24:60:36 | l3.extend(...) [Ok, tuple.0] | main.rs:60:24:60:45 | ... .unwrap() [tuple.0] | provenance | MaD:40 | +| main.rs:60:24:60:36 | l3.extend(...) [Ok, tuple.0] | main.rs:60:24:60:45 | ... .unwrap() [tuple.0] | provenance | MaD:42 | | main.rs:60:24:60:45 | ... .unwrap() [tuple.0] | main.rs:60:9:60:20 | TuplePat [tuple.0] | provenance | | -| main.rs:60:34:60:35 | k1 | main.rs:60:24:60:36 | l3.extend(...) [Ok, tuple.0] | provenance | MaD:26 | +| main.rs:60:34:60:35 | k1 | main.rs:60:24:60:36 | l3.extend(...) [Ok, tuple.0] | provenance | MaD:30 | | main.rs:61:31:61:32 | k2 | main.rs:61:13:61:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | | main.rs:62:9:62:20 | TuplePat [tuple.0] | main.rs:62:10:62:11 | k3 | provenance | | | main.rs:62:10:62:11 | k3 | main.rs:63:31:63:32 | k3 | provenance | | -| main.rs:62:24:62:36 | k1.extend(...) [Ok, tuple.0] | main.rs:62:24:62:45 | ... .unwrap() [tuple.0] | provenance | MaD:40 | +| main.rs:62:24:62:25 | k1 | main.rs:62:24:62:36 | k1.extend(...) [Ok, tuple.0] | provenance | MaD:31 | +| main.rs:62:24:62:36 | k1.extend(...) [Ok, tuple.0] | main.rs:62:24:62:45 | ... .unwrap() [tuple.0] | provenance | MaD:42 | | main.rs:62:24:62:45 | ... .unwrap() [tuple.0] | main.rs:62:9:62:20 | TuplePat [tuple.0] | provenance | | | main.rs:63:31:63:32 | k3 | main.rs:63:13:63:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | -| main.rs:64:31:64:50 | l3.extend_packed(...) [Ok] | main.rs:64:31:64:59 | ... .unwrap() | provenance | MaD:40 | +| main.rs:64:31:64:50 | l3.extend_packed(...) [Ok] | main.rs:64:31:64:59 | ... .unwrap() | provenance | MaD:42 | | main.rs:64:31:64:59 | ... .unwrap() | main.rs:64:13:64:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | -| main.rs:64:48:64:49 | k1 | main.rs:64:31:64:50 | l3.extend_packed(...) [Ok] | provenance | MaD:28 | -| main.rs:65:31:65:50 | k1.extend_packed(...) [Ok] | main.rs:65:31:65:59 | ... .unwrap() | provenance | MaD:40 | +| main.rs:64:48:64:49 | k1 | main.rs:64:31:64:50 | l3.extend_packed(...) [Ok] | provenance | MaD:32 | +| main.rs:65:31:65:32 | k1 | main.rs:65:31:65:50 | k1.extend_packed(...) [Ok] | provenance | MaD:33 | +| main.rs:65:31:65:50 | k1.extend_packed(...) [Ok] | main.rs:65:31:65:59 | ... .unwrap() | provenance | MaD:42 | | main.rs:65:31:65:59 | ... .unwrap() | main.rs:65:13:65:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | | main.rs:67:9:67:10 | l4 | main.rs:68:31:68:32 | l4 | provenance | | -| main.rs:67:14:67:47 | ...::array::<...>(...) [Ok] | main.rs:67:14:67:56 | ... .unwrap() | provenance | MaD:40 | +| main.rs:67:14:67:47 | ...::array::<...>(...) [Ok] | main.rs:67:14:67:56 | ... .unwrap() | provenance | MaD:42 | | main.rs:67:14:67:56 | ... .unwrap() | main.rs:67:9:67:10 | l4 | provenance | | -| main.rs:67:46:67:46 | v | main.rs:67:14:67:47 | ...::array::<...>(...) [Ok] | provenance | MaD:25 | +| main.rs:67:46:67:46 | v | main.rs:67:14:67:47 | ...::array::<...>(...) [Ok] | provenance | MaD:29 | | main.rs:68:31:68:32 | l4 | main.rs:68:13:68:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | | main.rs:86:35:86:42 | ...: usize | main.rs:87:54:87:54 | v | provenance | | | main.rs:87:9:87:14 | layout | main.rs:88:31:88:36 | layout | provenance | | -| main.rs:87:18:87:58 | ...::from_size_align(...) [Ok] | main.rs:87:18:87:67 | ... .unwrap() | provenance | MaD:40 | +| main.rs:87:18:87:58 | ...::from_size_align(...) [Ok] | main.rs:87:18:87:67 | ... .unwrap() | provenance | MaD:42 | | main.rs:87:18:87:67 | ... .unwrap() | main.rs:87:9:87:14 | layout | provenance | | -| main.rs:87:54:87:54 | v | main.rs:87:18:87:58 | ...::from_size_align(...) [Ok] | provenance | MaD:30 | +| main.rs:87:54:87:54 | v | main.rs:87:18:87:58 | ...::from_size_align(...) [Ok] | provenance | MaD:34 | | main.rs:88:31:88:36 | layout | main.rs:88:13:88:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | | main.rs:91:38:91:45 | ...: usize | main.rs:92:47:92:47 | v | provenance | | | main.rs:91:38:91:45 | ...: usize | main.rs:101:51:101:51 | v | provenance | | @@ -165,16 +170,16 @@ edges | main.rs:91:38:91:45 | ...: usize | main.rs:161:55:161:55 | v | provenance | | | main.rs:92:9:92:10 | l1 | main.rs:96:35:96:36 | l1 | provenance | | | main.rs:92:9:92:10 | l1 | main.rs:102:35:102:36 | l1 | provenance | | -| main.rs:92:14:92:48 | ...::array::<...>(...) [Ok] | main.rs:92:14:92:57 | ... .unwrap() | provenance | MaD:40 | +| main.rs:92:14:92:48 | ...::array::<...>(...) [Ok] | main.rs:92:14:92:57 | ... .unwrap() | provenance | MaD:42 | | main.rs:92:14:92:57 | ... .unwrap() | main.rs:92:9:92:10 | l1 | provenance | | -| main.rs:92:47:92:47 | v | main.rs:92:14:92:48 | ...::array::<...>(...) [Ok] | provenance | MaD:25 | +| main.rs:92:47:92:47 | v | main.rs:92:14:92:48 | ...::array::<...>(...) [Ok] | provenance | MaD:29 | | main.rs:96:35:96:36 | l1 | main.rs:96:17:96:33 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | | main.rs:96:35:96:36 | l1 | main.rs:109:35:109:36 | l1 | provenance | | | main.rs:96:35:96:36 | l1 | main.rs:111:35:111:36 | l1 | provenance | | | main.rs:101:13:101:14 | l3 | main.rs:103:35:103:36 | l3 | provenance | | -| main.rs:101:18:101:52 | ...::array::<...>(...) [Ok] | main.rs:101:18:101:61 | ... .unwrap() | provenance | MaD:40 | +| main.rs:101:18:101:52 | ...::array::<...>(...) [Ok] | main.rs:101:18:101:61 | ... .unwrap() | provenance | MaD:42 | | main.rs:101:18:101:61 | ... .unwrap() | main.rs:101:13:101:14 | l3 | provenance | | -| main.rs:101:51:101:51 | v | main.rs:101:18:101:52 | ...::array::<...>(...) [Ok] | provenance | MaD:25 | +| main.rs:101:51:101:51 | v | main.rs:101:18:101:52 | ...::array::<...>(...) [Ok] | provenance | MaD:29 | | main.rs:102:35:102:36 | l1 | main.rs:102:17:102:33 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | | main.rs:102:35:102:36 | l1 | main.rs:109:35:109:36 | l1 | provenance | | | main.rs:102:35:102:36 | l1 | main.rs:111:35:111:36 | l1 | provenance | | @@ -185,28 +190,28 @@ edges | main.rs:111:35:111:36 | l1 | main.rs:111:17:111:33 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | | main.rs:111:35:111:36 | l1 | main.rs:146:35:146:36 | l1 | provenance | | | main.rs:145:13:145:14 | l9 | main.rs:148:35:148:36 | l9 | provenance | | -| main.rs:145:18:145:52 | ...::array::<...>(...) [Ok] | main.rs:145:18:145:61 | ... .unwrap() | provenance | MaD:40 | +| main.rs:145:18:145:52 | ...::array::<...>(...) [Ok] | main.rs:145:18:145:61 | ... .unwrap() | provenance | MaD:42 | | main.rs:145:18:145:61 | ... .unwrap() | main.rs:145:13:145:14 | l9 | provenance | | -| main.rs:145:51:145:51 | v | main.rs:145:18:145:52 | ...::array::<...>(...) [Ok] | provenance | MaD:25 | +| main.rs:145:51:145:51 | v | main.rs:145:18:145:52 | ...::array::<...>(...) [Ok] | provenance | MaD:29 | | main.rs:146:35:146:36 | l1 | main.rs:146:17:146:33 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | | main.rs:146:35:146:36 | l1 | main.rs:177:31:177:32 | l1 | provenance | | | main.rs:148:35:148:36 | l9 | main.rs:148:17:148:33 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | | main.rs:151:9:151:11 | l10 | main.rs:152:31:152:33 | l10 | provenance | | -| main.rs:151:15:151:69 | ...::array::<...>(...) [Ok] | main.rs:151:15:151:78 | ... .unwrap() | provenance | MaD:40 | +| main.rs:151:15:151:69 | ...::array::<...>(...) [Ok] | main.rs:151:15:151:78 | ... .unwrap() | provenance | MaD:42 | | main.rs:151:15:151:78 | ... .unwrap() | main.rs:151:9:151:11 | l10 | provenance | | -| main.rs:151:48:151:68 | ...::min(...) | main.rs:151:15:151:69 | ...::array::<...>(...) [Ok] | provenance | MaD:25 | -| main.rs:151:62:151:62 | v | main.rs:151:48:151:68 | ...::min(...) | provenance | MaD:45 | +| main.rs:151:48:151:68 | ...::min(...) | main.rs:151:15:151:69 | ...::array::<...>(...) [Ok] | provenance | MaD:29 | +| main.rs:151:62:151:62 | v | main.rs:151:48:151:68 | ...::min(...) | provenance | MaD:47 | | main.rs:152:31:152:33 | l10 | main.rs:152:13:152:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | | main.rs:154:9:154:11 | l11 | main.rs:155:31:155:33 | l11 | provenance | | -| main.rs:154:15:154:69 | ...::array::<...>(...) [Ok] | main.rs:154:15:154:78 | ... .unwrap() | provenance | MaD:40 | +| main.rs:154:15:154:69 | ...::array::<...>(...) [Ok] | main.rs:154:15:154:78 | ... .unwrap() | provenance | MaD:42 | | main.rs:154:15:154:78 | ... .unwrap() | main.rs:154:9:154:11 | l11 | provenance | | -| main.rs:154:48:154:68 | ...::max(...) | main.rs:154:15:154:69 | ...::array::<...>(...) [Ok] | provenance | MaD:25 | -| main.rs:154:62:154:62 | v | main.rs:154:48:154:68 | ...::max(...) | provenance | MaD:44 | +| main.rs:154:48:154:68 | ...::max(...) | main.rs:154:15:154:69 | ...::array::<...>(...) [Ok] | provenance | MaD:29 | +| main.rs:154:62:154:62 | v | main.rs:154:48:154:68 | ...::max(...) | provenance | MaD:46 | | main.rs:155:31:155:33 | l11 | main.rs:155:13:155:29 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | | main.rs:161:13:161:15 | l13 | main.rs:162:35:162:37 | l13 | provenance | | -| main.rs:161:19:161:59 | ...::from_size_align(...) [Ok] | main.rs:161:19:161:68 | ... .unwrap() | provenance | MaD:40 | +| main.rs:161:19:161:59 | ...::from_size_align(...) [Ok] | main.rs:161:19:161:68 | ... .unwrap() | provenance | MaD:42 | | main.rs:161:19:161:68 | ... .unwrap() | main.rs:161:13:161:15 | l13 | provenance | | -| main.rs:161:55:161:55 | v | main.rs:161:19:161:59 | ...::from_size_align(...) [Ok] | provenance | MaD:30 | +| main.rs:161:55:161:55 | v | main.rs:161:19:161:59 | ...::from_size_align(...) [Ok] | provenance | MaD:34 | | main.rs:162:35:162:37 | l13 | main.rs:162:17:162:33 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | | main.rs:162:35:162:37 | l13 | main.rs:169:35:169:37 | l13 | provenance | | | main.rs:169:35:169:37 | l13 | main.rs:169:17:169:33 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | @@ -214,9 +219,9 @@ edges | main.rs:183:29:183:36 | ...: usize | main.rs:192:46:192:46 | v | provenance | | | main.rs:183:29:183:36 | ...: usize | main.rs:202:48:202:48 | v | provenance | | | main.rs:192:9:192:10 | l2 | main.rs:193:38:193:39 | l2 | provenance | | -| main.rs:192:14:192:47 | ...::array::<...>(...) [Ok] | main.rs:192:14:192:56 | ... .unwrap() | provenance | MaD:40 | +| main.rs:192:14:192:47 | ...::array::<...>(...) [Ok] | main.rs:192:14:192:56 | ... .unwrap() | provenance | MaD:42 | | main.rs:192:14:192:56 | ... .unwrap() | main.rs:192:9:192:10 | l2 | provenance | | -| main.rs:192:46:192:46 | v | main.rs:192:14:192:47 | ...::array::<...>(...) [Ok] | provenance | MaD:25 | +| main.rs:192:46:192:46 | v | main.rs:192:14:192:47 | ...::array::<...>(...) [Ok] | provenance | MaD:29 | | main.rs:193:38:193:39 | l2 | main.rs:193:32:193:36 | alloc | provenance | MaD:10 Sink:MaD:10 | | main.rs:193:38:193:39 | l2 | main.rs:194:45:194:46 | l2 | provenance | | | main.rs:194:45:194:46 | l2 | main.rs:194:32:194:43 | alloc_zeroed | provenance | MaD:11 Sink:MaD:11 | @@ -251,20 +256,21 @@ edges | main.rs:230:46:230:46 | v | main.rs:230:13:230:44 | ...::try_with_capacity_in | provenance | MaD:3 Sink:MaD:3 | | main.rs:230:46:230:46 | v | main.rs:231:42:231:42 | v | provenance | | | main.rs:231:42:231:42 | v | main.rs:231:13:231:40 | ...::with_capacity_in | provenance | MaD:4 Sink:MaD:4 | -| main.rs:279:24:279:41 | ...: String | main.rs:280:21:280:47 | user_input.parse() [Ok] | provenance | MaD:41 | +| main.rs:279:24:279:41 | ...: String | main.rs:280:21:280:30 | user_input | provenance | | | main.rs:280:9:280:17 | num_bytes | main.rs:282:54:282:62 | num_bytes | provenance | | +| main.rs:280:21:280:30 | user_input | main.rs:280:21:280:47 | user_input.parse() [Ok] | provenance | MaD:43 | | main.rs:280:21:280:47 | user_input.parse() [Ok] | main.rs:280:21:280:48 | TryExpr | provenance | | -| main.rs:280:21:280:48 | TryExpr | main.rs:280:9:280:17 | num_bytes | provenance | | -| main.rs:280:21:280:48 | TryExpr | main.rs:280:21:280:77 | ... * ... | provenance | MaD:43 | +| main.rs:280:21:280:48 | TryExpr | main.rs:280:21:280:77 | ... * ... | provenance | MaD:27 | +| main.rs:280:21:280:48 | TryExpr | main.rs:280:21:280:77 | ... * ... | provenance | MaD:45 | | main.rs:280:21:280:77 | ... * ... | main.rs:280:9:280:17 | num_bytes | provenance | | | main.rs:282:9:282:14 | layout | main.rs:284:40:284:45 | layout | provenance | | -| main.rs:282:18:282:66 | ...::from_size_align(...) [Ok] | main.rs:282:18:282:75 | ... .unwrap() | provenance | MaD:40 | +| main.rs:282:18:282:66 | ...::from_size_align(...) [Ok] | main.rs:282:18:282:75 | ... .unwrap() | provenance | MaD:42 | | main.rs:282:18:282:75 | ... .unwrap() | main.rs:282:9:282:14 | layout | provenance | | -| main.rs:282:54:282:62 | num_bytes | main.rs:282:18:282:66 | ...::from_size_align(...) [Ok] | provenance | MaD:30 | +| main.rs:282:54:282:62 | num_bytes | main.rs:282:18:282:66 | ...::from_size_align(...) [Ok] | provenance | MaD:34 | | main.rs:284:40:284:45 | layout | main.rs:284:22:284:38 | ...::alloc | provenance | MaD:15 Sink:MaD:15 | | main.rs:308:25:308:38 | ...::args | main.rs:308:25:308:40 | ...::args(...) [element] | provenance | Src:MaD:22 | | main.rs:308:25:308:40 | ...::args(...) [element] | main.rs:308:25:308:47 | ... .nth(...) [Some] | provenance | MaD:23 | -| main.rs:308:25:308:47 | ... .nth(...) [Some] | main.rs:308:25:308:74 | ... .unwrap_or(...) | provenance | MaD:38 | +| main.rs:308:25:308:47 | ... .nth(...) [Some] | main.rs:308:25:308:74 | ... .unwrap_or(...) | provenance | MaD:40 | | main.rs:308:25:308:74 | ... .unwrap_or(...) | main.rs:279:24:279:41 | ...: String | provenance | | | main.rs:317:9:317:9 | v | main.rs:320:34:320:34 | v | provenance | | | main.rs:317:9:317:9 | v | main.rs:321:42:321:42 | v | provenance | | @@ -274,9 +280,9 @@ edges | main.rs:317:9:317:9 | v | main.rs:325:22:325:22 | v | provenance | | | main.rs:317:13:317:26 | ...::args | main.rs:317:13:317:28 | ...::args(...) [element] | provenance | Src:MaD:22 | | main.rs:317:13:317:28 | ...::args(...) [element] | main.rs:317:13:317:35 | ... .nth(...) [Some] | provenance | MaD:23 | -| main.rs:317:13:317:35 | ... .nth(...) [Some] | main.rs:317:13:317:65 | ... .unwrap_or(...) | provenance | MaD:38 | -| main.rs:317:13:317:65 | ... .unwrap_or(...) | main.rs:317:13:317:82 | ... .parse() [Ok] | provenance | MaD:41 | -| main.rs:317:13:317:82 | ... .parse() [Ok] | main.rs:317:13:317:91 | ... .unwrap() | provenance | MaD:40 | +| main.rs:317:13:317:35 | ... .nth(...) [Some] | main.rs:317:13:317:65 | ... .unwrap_or(...) | provenance | MaD:40 | +| main.rs:317:13:317:65 | ... .unwrap_or(...) | main.rs:317:13:317:82 | ... .parse() [Ok] | provenance | MaD:43 | +| main.rs:317:13:317:82 | ... .parse() [Ok] | main.rs:317:13:317:91 | ... .unwrap() | provenance | MaD:42 | | main.rs:317:13:317:91 | ... .unwrap() | main.rs:317:9:317:9 | v | provenance | | | main.rs:320:34:320:34 | v | main.rs:12:36:12:43 | ...: usize | provenance | | | main.rs:321:42:321:42 | v | main.rs:43:44:43:51 | ...: usize | provenance | | @@ -307,29 +313,31 @@ models | 20 | Sink: libc::unix::malloc; Argument[0]; alloc-size | | 21 | Sink: libc::unix::realloc; Argument[1]; alloc-size | | 22 | Source: std::env::args; ReturnValue.Element; commandargs | -| 23 | Summary: <_ as core::iter::traits::iterator::Iterator>::nth; Argument[self].Element; ReturnValue.Field[core::option::Option::Some(0)]; value | -| 24 | Summary: ::align_to; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | -| 25 | Summary: ::array; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | -| 26 | Summary: ::extend; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)].Field[0]; taint | -| 27 | Summary: ::extend; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)].Field[0]; taint | -| 28 | Summary: ::extend_packed; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | -| 29 | Summary: ::extend_packed; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | -| 30 | Summary: ::from_size_align; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | -| 31 | Summary: ::from_size_align_unchecked; Argument[0]; ReturnValue.Field[core::alloc::layout::Layout::size]; value | -| 32 | Summary: ::from_size_align_unchecked; Argument[0]; ReturnValue; taint | -| 33 | Summary: ::pad_to_align; Argument[self]; ReturnValue; taint | -| 34 | Summary: ::repeat; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)].Field[0]; taint | -| 35 | Summary: ::repeat_packed; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | -| 36 | Summary: ::size; Argument[self].Field[core::alloc::layout::Layout::size]; ReturnValue; value | -| 37 | Summary: ::size; Argument[self]; ReturnValue; taint | -| 38 | Summary: ::unwrap_or; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | -| 39 | Summary: ::expect; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | -| 40 | Summary: ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | -| 41 | Summary: ::parse; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | -| 42 | Summary: ::mul; Argument[0]; ReturnValue; taint | -| 43 | Summary: ::mul; Argument[self]; ReturnValue; taint | -| 44 | Summary: core::cmp::max; Argument[0]; ReturnValue; value | -| 45 | Summary: core::cmp::min; Argument[0]; ReturnValue; value | +| 23 | Summary: <_ as core::iter::traits::iterator::Iterator>::nth; Argument[self].Reference.Element; ReturnValue.Field[core::option::Option::Some(0)]; value | +| 24 | Summary: <_ as core::ops::arith::Add>::add; Argument[self]; ReturnValue; taint | +| 25 | Summary: <_ as core::ops::arith::Mul>::mul; Argument[0].Reference; ReturnValue; taint | +| 26 | Summary: <_ as core::ops::arith::Mul>::mul; Argument[0]; ReturnValue; taint | +| 27 | Summary: <_ as core::ops::arith::Mul>::mul; Argument[self]; ReturnValue; taint | +| 28 | Summary: ::align_to; Argument[self].Reference; ReturnValue.Field[core::result::Result::Ok(0)]; taint | +| 29 | Summary: ::array; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | +| 30 | Summary: ::extend; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)].Field[0]; taint | +| 31 | Summary: ::extend; Argument[self].Reference; ReturnValue.Field[core::result::Result::Ok(0)].Field[0]; taint | +| 32 | Summary: ::extend_packed; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | +| 33 | Summary: ::extend_packed; Argument[self].Reference; ReturnValue.Field[core::result::Result::Ok(0)]; taint | +| 34 | Summary: ::from_size_align; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | +| 35 | Summary: ::from_size_align_unchecked; Argument[0]; ReturnValue; taint | +| 36 | Summary: ::pad_to_align; Argument[self].Reference; ReturnValue; taint | +| 37 | Summary: ::repeat; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)].Field[0]; taint | +| 38 | Summary: ::repeat_packed; Argument[0]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | +| 39 | Summary: ::size; Argument[self].Reference; ReturnValue; taint | +| 40 | Summary: ::unwrap_or; Argument[self].Field[core::option::Option::Some(0)]; ReturnValue; value | +| 41 | Summary: ::expect; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | +| 42 | Summary: ::unwrap; Argument[self].Field[core::result::Result::Ok(0)]; ReturnValue; value | +| 43 | Summary: ::parse; Argument[self]; ReturnValue.Field[core::result::Result::Ok(0)]; taint | +| 44 | Summary: ::mul; Argument[0]; ReturnValue; taint | +| 45 | Summary: ::mul; Argument[self]; ReturnValue; taint | +| 46 | Summary: core::cmp::max; Argument[0]; ReturnValue; value | +| 47 | Summary: core::cmp::min; Argument[0]; ReturnValue; value | nodes | main.rs:12:36:12:43 | ...: usize | semmle.label | ...: usize | | main.rs:18:13:18:31 | ...::realloc | semmle.label | ...::realloc | @@ -341,9 +349,11 @@ nodes | main.rs:21:13:21:29 | ...::alloc | semmle.label | ...::alloc | | main.rs:21:31:21:32 | l2 | semmle.label | l2 | | main.rs:22:13:22:29 | ...::alloc | semmle.label | ...::alloc | +| main.rs:22:31:22:32 | l2 | semmle.label | l2 | | main.rs:22:31:22:44 | l2.align_to(...) [Ok] | semmle.label | l2.align_to(...) [Ok] | | main.rs:22:31:22:53 | ... .unwrap() | semmle.label | ... .unwrap() | | main.rs:23:13:23:29 | ...::alloc | semmle.label | ...::alloc | +| main.rs:23:31:23:32 | l2 | semmle.label | l2 | | main.rs:23:31:23:44 | l2.align_to(...) [Ok] | semmle.label | l2.align_to(...) [Ok] | | main.rs:23:31:23:53 | ... .unwrap() | semmle.label | ... .unwrap() | | main.rs:23:31:23:68 | ... .pad_to_align() | semmle.label | ... .pad_to_align() | @@ -361,18 +371,17 @@ nodes | main.rs:33:13:33:29 | ...::alloc | semmle.label | ...::alloc | | main.rs:33:31:33:32 | l5 | semmle.label | l5 | | main.rs:35:9:35:10 | s6 | semmle.label | s6 | +| main.rs:35:14:35:54 | ... + ... | semmle.label | ... + ... | | main.rs:35:15:35:49 | ... * ... | semmle.label | ... * ... | | main.rs:35:49:35:49 | v | semmle.label | v | | main.rs:36:9:36:10 | l6 | semmle.label | l6 | -| main.rs:36:9:36:10 | l6 [Layout.size] | semmle.label | l6 [Layout.size] | | main.rs:36:14:36:65 | ...::from_size_align_unchecked(...) | semmle.label | ...::from_size_align_unchecked(...) | -| main.rs:36:14:36:65 | ...::from_size_align_unchecked(...) [Layout.size] | semmle.label | ...::from_size_align_unchecked(...) [Layout.size] | | main.rs:36:60:36:61 | s6 | semmle.label | s6 | | main.rs:37:13:37:29 | ...::alloc | semmle.label | ...::alloc | | main.rs:37:31:37:32 | l6 | semmle.label | l6 | -| main.rs:37:31:37:32 | l6 [Layout.size] | semmle.label | l6 [Layout.size] | | main.rs:39:9:39:10 | l7 | semmle.label | l7 | | main.rs:39:14:39:72 | ...::from_size_align_unchecked(...) | semmle.label | ...::from_size_align_unchecked(...) | +| main.rs:39:60:39:61 | l6 | semmle.label | l6 | | main.rs:39:60:39:68 | l6.size() | semmle.label | l6.size() | | main.rs:40:13:40:29 | ...::alloc | semmle.label | ...::alloc | | main.rs:40:31:40:32 | l7 | semmle.label | l7 | @@ -386,6 +395,7 @@ nodes | main.rs:51:31:51:46 | l2.repeat(...) [Ok, tuple.0] | semmle.label | l2.repeat(...) [Ok, tuple.0] | | main.rs:51:31:51:55 | ... .unwrap() [tuple.0] | semmle.label | ... .unwrap() [tuple.0] | | main.rs:51:31:51:57 | ... .0 | semmle.label | ... .0 | +| main.rs:51:41:51:41 | v | semmle.label | v | | main.rs:51:41:51:45 | ... + ... | semmle.label | ... + ... | | main.rs:53:13:53:29 | ...::alloc | semmle.label | ...::alloc | | main.rs:53:31:53:49 | l2.repeat_packed(...) [Ok] | semmle.label | l2.repeat_packed(...) [Ok] | @@ -394,6 +404,7 @@ nodes | main.rs:54:13:54:29 | ...::alloc | semmle.label | ...::alloc | | main.rs:54:31:54:54 | l2.repeat_packed(...) [Ok] | semmle.label | l2.repeat_packed(...) [Ok] | | main.rs:54:31:54:63 | ... .unwrap() | semmle.label | ... .unwrap() | +| main.rs:54:48:54:48 | v | semmle.label | v | | main.rs:54:48:54:53 | ... * ... | semmle.label | ... * ... | | main.rs:58:9:58:20 | TuplePat [tuple.0] | semmle.label | TuplePat [tuple.0] | | main.rs:58:10:58:11 | k1 | semmle.label | k1 | @@ -411,6 +422,7 @@ nodes | main.rs:61:31:61:32 | k2 | semmle.label | k2 | | main.rs:62:9:62:20 | TuplePat [tuple.0] | semmle.label | TuplePat [tuple.0] | | main.rs:62:10:62:11 | k3 | semmle.label | k3 | +| main.rs:62:24:62:25 | k1 | semmle.label | k1 | | main.rs:62:24:62:36 | k1.extend(...) [Ok, tuple.0] | semmle.label | k1.extend(...) [Ok, tuple.0] | | main.rs:62:24:62:45 | ... .unwrap() [tuple.0] | semmle.label | ... .unwrap() [tuple.0] | | main.rs:63:13:63:29 | ...::alloc | semmle.label | ...::alloc | @@ -420,6 +432,7 @@ nodes | main.rs:64:31:64:59 | ... .unwrap() | semmle.label | ... .unwrap() | | main.rs:64:48:64:49 | k1 | semmle.label | k1 | | main.rs:65:13:65:29 | ...::alloc | semmle.label | ...::alloc | +| main.rs:65:31:65:32 | k1 | semmle.label | k1 | | main.rs:65:31:65:50 | k1.extend_packed(...) [Ok] | semmle.label | k1.extend_packed(...) [Ok] | | main.rs:65:31:65:59 | ... .unwrap() | semmle.label | ... .unwrap() | | main.rs:67:9:67:10 | l4 | semmle.label | l4 | @@ -532,6 +545,7 @@ nodes | main.rs:231:42:231:42 | v | semmle.label | v | | main.rs:279:24:279:41 | ...: String | semmle.label | ...: String | | main.rs:280:9:280:17 | num_bytes | semmle.label | num_bytes | +| main.rs:280:21:280:30 | user_input | semmle.label | user_input | | main.rs:280:21:280:47 | user_input.parse() [Ok] | semmle.label | user_input.parse() [Ok] | | main.rs:280:21:280:48 | TryExpr | semmle.label | TryExpr | | main.rs:280:21:280:77 | ... * ... | semmle.label | ... * ... | diff --git a/rust/ql/test/query-tests/security/CWE-798/HardcodedCryptographicValue.expected b/rust/ql/test/query-tests/security/CWE-798/HardcodedCryptographicValue.expected index e4657a426ea..081ec36f4ed 100644 --- a/rust/ql/test/query-tests/security/CWE-798/HardcodedCryptographicValue.expected +++ b/rust/ql/test/query-tests/security/CWE-798/HardcodedCryptographicValue.expected @@ -10,37 +10,45 @@ | test_cookie.rs:21:28:21:34 | [0; 64] | test_cookie.rs:21:28:21:34 | [0; 64] | test_cookie.rs:22:16:22:24 | ...::from | This hard-coded value is used as $@. | test_cookie.rs:22:16:22:24 | ...::from | a key | | test_cookie.rs:38:28:38:36 | [0u8; 64] | test_cookie.rs:38:28:38:36 | [0u8; 64] | test_cookie.rs:42:14:42:32 | ...::from | This hard-coded value is used as $@. | test_cookie.rs:42:14:42:32 | ...::from | a key | | test_cookie.rs:49:23:49:25 | 0u8 | test_cookie.rs:49:23:49:25 | 0u8 | test_cookie.rs:53:14:53:32 | ...::from | This hard-coded value is used as $@. | test_cookie.rs:53:14:53:32 | ...::from | a key | +| test_heuristic.rs:44:31:44:38 | [0u8; 16] | test_heuristic.rs:44:31:44:38 | [0u8; 16] | test_heuristic.rs:45:41:45:48 | const_iv | This hard-coded value is used as $@. | test_heuristic.rs:45:41:45:48 | const_iv | an initialization vector | +| test_heuristic.rs:63:30:63:37 | "secret" | test_heuristic.rs:63:30:63:37 | "secret" | test_heuristic.rs:63:30:63:37 | "secret" | This hard-coded value is used as $@. | test_heuristic.rs:63:30:63:37 | "secret" | a password | +| test_heuristic.rs:64:20:64:27 | [0u8; 16] | test_heuristic.rs:64:20:64:27 | [0u8; 16] | test_heuristic.rs:64:19:64:27 | &... | This hard-coded value is used as $@. | test_heuristic.rs:64:19:64:27 | &... | a nonce | +| test_heuristic.rs:65:31:65:38 | [0u8; 16] | test_heuristic.rs:65:31:65:38 | [0u8; 16] | test_heuristic.rs:65:30:65:38 | &... | This hard-coded value is used as $@. | test_heuristic.rs:65:30:65:38 | &... | a salt | +| test_heuristic.rs:67:22:67:22 | 0 | test_heuristic.rs:67:22:67:22 | 0 | test_heuristic.rs:67:22:67:22 | 0 | This hard-coded value is used as $@. | test_heuristic.rs:67:22:67:22 | 0 | a salt | +| test_heuristic.rs:69:32:69:32 | 1 | test_heuristic.rs:69:32:69:32 | 1 | test_heuristic.rs:69:22:69:32 | ... + ... | This hard-coded value is used as $@. | test_heuristic.rs:69:22:69:32 | ... + ... | a salt | +| test_heuristic.rs:70:34:70:35 | 32 | test_heuristic.rs:70:34:70:35 | 32 | test_heuristic.rs:70:22:70:62 | ... ^ ... | This hard-coded value is used as $@. | test_heuristic.rs:70:22:70:62 | ... ^ ... | a salt | +| test_heuristic.rs:70:52:70:61 | 0xFFFFFFFF | test_heuristic.rs:70:52:70:61 | 0xFFFFFFFF | test_heuristic.rs:70:22:70:62 | ... ^ ... | This hard-coded value is used as $@. | test_heuristic.rs:70:22:70:62 | ... ^ ... | a salt | edges | test_cipher.rs:18:9:18:14 | const1 [&ref] | test_cipher.rs:19:73:19:78 | const1 [&ref] | provenance | | | test_cipher.rs:18:28:18:36 | &... [&ref] | test_cipher.rs:18:9:18:14 | const1 [&ref] | provenance | | | test_cipher.rs:18:29:18:36 | [0u8; 16] | test_cipher.rs:18:28:18:36 | &... [&ref] | provenance | | | test_cipher.rs:19:49:19:79 | ...::from_slice(...) [&ref] | test_cipher.rs:19:30:19:47 | ...::new | provenance | MaD:3 Sink:MaD:3 | -| test_cipher.rs:19:73:19:78 | const1 [&ref] | test_cipher.rs:19:49:19:79 | ...::from_slice(...) [&ref] | provenance | MaD:9 | +| test_cipher.rs:19:73:19:78 | const1 [&ref] | test_cipher.rs:19:49:19:79 | ...::from_slice(...) [&ref] | provenance | MaD:19 | | test_cipher.rs:25:9:25:14 | const4 [&ref] | test_cipher.rs:26:66:26:71 | const4 [&ref] | provenance | | | test_cipher.rs:25:28:25:36 | &... [&ref] | test_cipher.rs:25:9:25:14 | const4 [&ref] | provenance | | | test_cipher.rs:25:29:25:36 | [0u8; 16] | test_cipher.rs:25:28:25:36 | &... [&ref] | provenance | | | test_cipher.rs:26:42:26:72 | ...::from_slice(...) [&ref] | test_cipher.rs:26:30:26:40 | ...::new | provenance | MaD:4 Sink:MaD:4 | -| test_cipher.rs:26:66:26:71 | const4 [&ref] | test_cipher.rs:26:42:26:72 | ...::from_slice(...) [&ref] | provenance | MaD:9 | +| test_cipher.rs:26:66:26:71 | const4 [&ref] | test_cipher.rs:26:42:26:72 | ...::from_slice(...) [&ref] | provenance | MaD:19 | | test_cipher.rs:29:9:29:14 | const5 [&ref] | test_cipher.rs:30:95:30:100 | const5 [&ref] | provenance | | | test_cipher.rs:29:28:29:36 | &... [&ref] | test_cipher.rs:29:9:29:14 | const5 [&ref] | provenance | | | test_cipher.rs:29:29:29:36 | [0u8; 16] | test_cipher.rs:29:28:29:36 | &... [&ref] | provenance | | | test_cipher.rs:30:72:30:101 | ...::from_slice(...) [&ref] | test_cipher.rs:30:30:30:40 | ...::new | provenance | MaD:5 Sink:MaD:5 | -| test_cipher.rs:30:95:30:100 | const5 [&ref] | test_cipher.rs:30:72:30:101 | ...::from_slice(...) [&ref] | provenance | MaD:9 | +| test_cipher.rs:30:95:30:100 | const5 [&ref] | test_cipher.rs:30:72:30:101 | ...::from_slice(...) [&ref] | provenance | MaD:19 | | test_cipher.rs:37:9:37:14 | const7 | test_cipher.rs:38:74:38:79 | const7 | provenance | | | test_cipher.rs:37:27:37:74 | [...] | test_cipher.rs:37:9:37:14 | const7 | provenance | | | test_cipher.rs:38:49:38:80 | ...::from_slice(...) [&ref] | test_cipher.rs:38:30:38:47 | ...::new | provenance | MaD:3 Sink:MaD:3 | -| test_cipher.rs:38:73:38:79 | &const7 [&ref] | test_cipher.rs:38:49:38:80 | ...::from_slice(...) [&ref] | provenance | MaD:9 | +| test_cipher.rs:38:73:38:79 | &const7 [&ref] | test_cipher.rs:38:49:38:80 | ...::from_slice(...) [&ref] | provenance | MaD:19 | | test_cipher.rs:38:74:38:79 | const7 | test_cipher.rs:38:73:38:79 | &const7 [&ref] | provenance | | | test_cipher.rs:41:9:41:14 | const8 [&ref] | test_cipher.rs:42:73:42:78 | const8 [&ref] | provenance | | | test_cipher.rs:41:28:41:76 | &... [&ref] | test_cipher.rs:41:9:41:14 | const8 [&ref] | provenance | | | test_cipher.rs:41:29:41:76 | [...] | test_cipher.rs:41:28:41:76 | &... [&ref] | provenance | | | test_cipher.rs:42:49:42:79 | ...::from_slice(...) [&ref] | test_cipher.rs:42:30:42:47 | ...::new | provenance | MaD:3 Sink:MaD:3 | -| test_cipher.rs:42:73:42:78 | const8 [&ref] | test_cipher.rs:42:49:42:79 | ...::from_slice(...) [&ref] | provenance | MaD:9 | +| test_cipher.rs:42:73:42:78 | const8 [&ref] | test_cipher.rs:42:49:42:79 | ...::from_slice(...) [&ref] | provenance | MaD:19 | | test_cipher.rs:50:9:50:15 | const10 [element] | test_cipher.rs:51:75:51:81 | const10 [element] | provenance | | | test_cipher.rs:50:37:50:52 | ...::zeroed | test_cipher.rs:50:37:50:54 | ...::zeroed(...) [element] | provenance | Src:MaD:7 | | test_cipher.rs:50:37:50:54 | ...::zeroed(...) [element] | test_cipher.rs:50:9:50:15 | const10 [element] | provenance | | | test_cipher.rs:51:50:51:82 | ...::from_slice(...) [&ref, element] | test_cipher.rs:51:31:51:48 | ...::new | provenance | MaD:3 Sink:MaD:3 Sink:MaD:3 | -| test_cipher.rs:51:74:51:81 | &const10 [&ref, element] | test_cipher.rs:51:50:51:82 | ...::from_slice(...) [&ref, element] | provenance | MaD:9 | +| test_cipher.rs:51:74:51:81 | &const10 [&ref, element] | test_cipher.rs:51:50:51:82 | ...::from_slice(...) [&ref, element] | provenance | MaD:19 | | test_cipher.rs:51:75:51:81 | const10 [element] | test_cipher.rs:51:74:51:81 | &const10 [&ref, element] | provenance | | | test_cipher.rs:73:9:73:14 | const2 [&ref] | test_cipher.rs:74:46:74:51 | const2 [&ref] | provenance | | | test_cipher.rs:73:18:73:26 | &... [&ref] | test_cipher.rs:73:9:73:14 | const2 [&ref] | provenance | | @@ -59,9 +67,24 @@ edges | test_cookie.rs:38:28:38:36 | [0u8; 64] | test_cookie.rs:38:18:38:37 | ...::from(...) | provenance | MaD:8 | | test_cookie.rs:42:34:42:39 | array2 | test_cookie.rs:42:14:42:32 | ...::from | provenance | MaD:2 Sink:MaD:2 | | test_cookie.rs:49:9:49:14 | array3 [element] | test_cookie.rs:53:34:53:39 | array3 [element] | provenance | | -| test_cookie.rs:49:23:49:25 | 0u8 | test_cookie.rs:49:23:49:29 | ...::from_elem(...) [element] | provenance | MaD:10 | +| test_cookie.rs:49:23:49:25 | 0u8 | test_cookie.rs:49:23:49:29 | ...::from_elem(...) [element] | provenance | MaD:20 | | test_cookie.rs:49:23:49:29 | ...::from_elem(...) [element] | test_cookie.rs:49:9:49:14 | array3 [element] | provenance | | | test_cookie.rs:53:34:53:39 | array3 [element] | test_cookie.rs:53:14:53:32 | ...::from | provenance | MaD:2 Sink:MaD:2 | +| test_heuristic.rs:44:9:44:16 | const_iv [&ref] | test_heuristic.rs:45:41:45:48 | const_iv | provenance | | +| test_heuristic.rs:44:30:44:38 | &... [&ref] | test_heuristic.rs:44:9:44:16 | const_iv [&ref] | provenance | | +| test_heuristic.rs:44:31:44:38 | [0u8; 16] | test_heuristic.rs:44:30:44:38 | &... [&ref] | provenance | | +| test_heuristic.rs:64:20:64:27 | [0u8; 16] | test_heuristic.rs:64:19:64:27 | &... | provenance | | +| test_heuristic.rs:65:31:65:38 | [0u8; 16] | test_heuristic.rs:65:30:65:38 | &... | provenance | | +| test_heuristic.rs:69:32:69:32 | 1 | test_heuristic.rs:69:22:69:32 | ... + ... | provenance | MaD:10 | +| test_heuristic.rs:69:32:69:32 | 1 | test_heuristic.rs:69:22:69:32 | ... + ... | provenance | MaD:9 | +| test_heuristic.rs:70:23:70:35 | ... << ... | test_heuristic.rs:70:22:70:62 | ... ^ ... | provenance | MaD:15 | +| test_heuristic.rs:70:34:70:35 | 32 | test_heuristic.rs:70:23:70:35 | ... << ... | provenance | MaD:17 | +| test_heuristic.rs:70:34:70:35 | 32 | test_heuristic.rs:70:23:70:35 | ... << ... | provenance | MaD:16 | +| test_heuristic.rs:70:34:70:35 | 32 | test_heuristic.rs:70:23:70:35 | ... << ... | provenance | MaD:18 | +| test_heuristic.rs:70:41:70:61 | ... & ... | test_heuristic.rs:70:22:70:62 | ... ^ ... | provenance | MaD:14 | +| test_heuristic.rs:70:41:70:61 | ... & ... | test_heuristic.rs:70:22:70:62 | ... ^ ... | provenance | MaD:13 | +| test_heuristic.rs:70:52:70:61 | 0xFFFFFFFF | test_heuristic.rs:70:41:70:61 | ... & ... | provenance | MaD:12 | +| test_heuristic.rs:70:52:70:61 | 0xFFFFFFFF | test_heuristic.rs:70:41:70:61 | ... & ... | provenance | MaD:11 | models | 1 | Sink: <_ as crypto_common::KeyInit>::new_from_slice; Argument[0]; credentials-key | | 2 | Sink: ::from; Argument[0]; credentials-key | @@ -71,8 +94,18 @@ models | 6 | Sink: ::from; Argument[0].Reference; credentials-key | | 7 | Source: core::mem::zeroed; ReturnValue.Element; constant-source | | 8 | Summary: <_ as core::convert::From>::from; Argument[0]; ReturnValue; taint | -| 9 | Summary: ::from_slice; Argument[0].Reference; ReturnValue.Reference; value | -| 10 | Summary: alloc::vec::from_elem; Argument[0]; ReturnValue.Element; value | +| 9 | Summary: <_ as core::ops::arith::Add>::add; Argument[0].Reference; ReturnValue; taint | +| 10 | Summary: <_ as core::ops::arith::Add>::add; Argument[0]; ReturnValue; taint | +| 11 | Summary: <_ as core::ops::bit::BitAnd>::bitand; Argument[0].Reference; ReturnValue; taint | +| 12 | Summary: <_ as core::ops::bit::BitAnd>::bitand; Argument[0]; ReturnValue; taint | +| 13 | Summary: <_ as core::ops::bit::BitXor>::bitxor; Argument[0].Reference; ReturnValue; taint | +| 14 | Summary: <_ as core::ops::bit::BitXor>::bitxor; Argument[0]; ReturnValue; taint | +| 15 | Summary: <_ as core::ops::bit::BitXor>::bitxor; Argument[self]; ReturnValue; taint | +| 16 | Summary: <_ as core::ops::bit::Shl>::shl; Argument[0].Reference; ReturnValue; taint | +| 17 | Summary: <_ as core::ops::bit::Shl>::shl; Argument[0]; ReturnValue; taint | +| 18 | Summary: ::shl; Argument[0]; ReturnValue; taint | +| 19 | Summary: ::from_slice; Argument[0].Reference; ReturnValue.Reference; value | +| 20 | Summary: alloc::vec::from_elem; Argument[0]; ReturnValue.Element; value | nodes | test_cipher.rs:18:9:18:14 | const1 [&ref] | semmle.label | const1 [&ref] | | test_cipher.rs:18:28:18:36 | &... [&ref] | semmle.label | &... [&ref] | @@ -136,4 +169,21 @@ nodes | test_cookie.rs:49:23:49:29 | ...::from_elem(...) [element] | semmle.label | ...::from_elem(...) [element] | | test_cookie.rs:53:14:53:32 | ...::from | semmle.label | ...::from | | test_cookie.rs:53:34:53:39 | array3 [element] | semmle.label | array3 [element] | +| test_heuristic.rs:44:9:44:16 | const_iv [&ref] | semmle.label | const_iv [&ref] | +| test_heuristic.rs:44:30:44:38 | &... [&ref] | semmle.label | &... [&ref] | +| test_heuristic.rs:44:31:44:38 | [0u8; 16] | semmle.label | [0u8; 16] | +| test_heuristic.rs:45:41:45:48 | const_iv | semmle.label | const_iv | +| test_heuristic.rs:63:30:63:37 | "secret" | semmle.label | "secret" | +| test_heuristic.rs:64:19:64:27 | &... | semmle.label | &... | +| test_heuristic.rs:64:20:64:27 | [0u8; 16] | semmle.label | [0u8; 16] | +| test_heuristic.rs:65:30:65:38 | &... | semmle.label | &... | +| test_heuristic.rs:65:31:65:38 | [0u8; 16] | semmle.label | [0u8; 16] | +| test_heuristic.rs:67:22:67:22 | 0 | semmle.label | 0 | +| test_heuristic.rs:69:22:69:32 | ... + ... | semmle.label | ... + ... | +| test_heuristic.rs:69:32:69:32 | 1 | semmle.label | 1 | +| test_heuristic.rs:70:22:70:62 | ... ^ ... | semmle.label | ... ^ ... | +| test_heuristic.rs:70:23:70:35 | ... << ... | semmle.label | ... << ... | +| test_heuristic.rs:70:34:70:35 | 32 | semmle.label | 32 | +| test_heuristic.rs:70:41:70:61 | ... & ... | semmle.label | ... & ... | +| test_heuristic.rs:70:52:70:61 | 0xFFFFFFFF | semmle.label | 0xFFFFFFFF | subpaths diff --git a/rust/ql/test/query-tests/security/CWE-798/test_heuristic.rs b/rust/ql/test/query-tests/security/CWE-798/test_heuristic.rs new file mode 100644 index 00000000000..f8f16a16d12 --- /dev/null +++ b/rust/ql/test/query-tests/security/CWE-798/test_heuristic.rs @@ -0,0 +1,71 @@ + +// --- tests --- + +fn encrypt_with(plaintext: &str, key: &[u8;16], iv: &[u8;16]) { + // ... +} + +fn encrypt2(plaintext: &str, crypto_key: &[u8;16], iv_bytes: &[u8;16]) { + // ... +} + +fn database_op(text: &str, primary_key: &str, pivot: &str) { + // note: this one has nothing to do with encryption, but has + // `key` and `iv` contained within the parameter names. +} + +struct MyCryptor { +} + +impl MyCryptor { + fn new(password: &str) -> MyCryptor { + MyCryptor { } + } + + fn set_nonce(&self, nonce: &[u8;16]) { + // ... + } + + fn encrypt(&self, plaintext: &str, salt: &[u8;16]) { + // ... + } + + fn set_salt_u64(&self, salt: u64) { + // ... + } +} + +fn test(var_string: &str, var_data: &[u8;16], var_u64: u64) { + encrypt_with("plaintext", var_data, var_data); + + let const_key: &[u8;16] = &[0u8;16]; // $ MISSING: Alert[rust/hard-coded-cryptographic-value] + encrypt_with("plaintext", const_key, var_data); // $ MISSING: Sink + + let const_iv: &[u8;16] = &[0u8;16]; // $ Alert[rust/hard-coded-cryptographic-value] + encrypt_with("plaintext", var_data, const_iv); // $ Sink + + encrypt2("plaintext", var_data, var_data); + + let const_key2: &[u8;16] = &[1u8;16]; // $ MISSING: Alert[rust/hard-coded-cryptographic-value] + encrypt2("plaintext", const_key2, var_data); // $ MISSING: Sink + + let const_iv: &[u8;16] = &[1u8;16]; // $ MISSING: Alert[rust/hard-coded-cryptographic-value] + encrypt2("plaintext", var_data, const_iv); // $ MISSING: Sink + + let const_key_str = "primary_key"; + let const_pivot_str = "pivot"; + database_op("text", const_key_str, const_pivot_str); + + let mc1 = MyCryptor::new(var_string); + mc1.set_nonce(var_data); + mc1.encrypt("plaintext", var_data); + + let mc2 = MyCryptor::new("secret"); // $ Alert[rust/hard-coded-cryptographic-value] + mc2.set_nonce(&[0u8;16]); // $ Alert[rust/hard-coded-cryptographic-value] + mc2.encrypt("plaintext", &[0u8;16]); // $ Alert[rust/hard-coded-cryptographic-value] + + mc2.set_salt_u64(0); // $ Alert[rust/hard-coded-cryptographic-value] + mc2.set_salt_u64(var_u64); + mc2.set_salt_u64(var_u64 + 1); // $ SPURIOUS: Alert[rust/hard-coded-cryptographic-value] + mc2.set_salt_u64((var_u64 << 32) ^ (var_u64 & 0xFFFFFFFF)); // $ SPURIOUS: Alert[rust/hard-coded-cryptographic-value] +} diff --git a/rust/ql/test/query-tests/security/CWE-825/AccessAfterLifetime.expected b/rust/ql/test/query-tests/security/CWE-825/AccessAfterLifetime.expected index 10fa2c751a1..f768a95011c 100644 --- a/rust/ql/test/query-tests/security/CWE-825/AccessAfterLifetime.expected +++ b/rust/ql/test/query-tests/security/CWE-825/AccessAfterLifetime.expected @@ -24,27 +24,27 @@ | lifetime.rs:808:23:808:25 | ptr | lifetime.rs:798:9:798:12 | &val | lifetime.rs:808:23:808:25 | ptr | Access of a pointer to $@ after its lifetime has ended. | lifetime.rs:796:6:796:8 | val | val | | main.rs:64:23:64:24 | p2 | main.rs:44:26:44:28 | &b2 | main.rs:64:23:64:24 | p2 | Access of a pointer to $@ after its lifetime has ended. | main.rs:43:13:43:14 | b2 | b2 | edges -| deallocation.rs:148:6:148:7 | p1 | deallocation.rs:151:14:151:15 | p1 | provenance | | -| deallocation.rs:148:6:148:7 | p1 | deallocation.rs:158:14:158:15 | p1 | provenance | | -| deallocation.rs:148:30:148:38 | &raw const my_buffer | deallocation.rs:148:6:148:7 | p1 | provenance | | -| deallocation.rs:228:28:228:43 | ...: ... | deallocation.rs:230:18:230:20 | ptr | provenance | | -| deallocation.rs:240:27:240:42 | ...: ... | deallocation.rs:248:18:248:20 | ptr | provenance | | -| deallocation.rs:257:7:257:10 | ptr1 | deallocation.rs:260:4:260:7 | ptr1 | provenance | | -| deallocation.rs:257:7:257:10 | ptr1 | deallocation.rs:260:4:260:7 | ptr1 | provenance | | -| deallocation.rs:257:14:257:33 | &raw mut ... | deallocation.rs:257:7:257:10 | ptr1 | provenance | | -| deallocation.rs:258:7:258:10 | ptr2 | deallocation.rs:261:4:261:7 | ptr2 | provenance | | -| deallocation.rs:258:7:258:10 | ptr2 | deallocation.rs:261:4:261:7 | ptr2 | provenance | | -| deallocation.rs:258:14:258:33 | &raw mut ... | deallocation.rs:258:7:258:10 | ptr2 | provenance | | -| deallocation.rs:260:4:260:7 | ptr1 | deallocation.rs:263:27:263:30 | ptr1 | provenance | | -| deallocation.rs:261:4:261:7 | ptr2 | deallocation.rs:265:26:265:29 | ptr2 | provenance | | -| deallocation.rs:263:27:263:30 | ptr1 | deallocation.rs:228:28:228:43 | ...: ... | provenance | | -| deallocation.rs:265:26:265:29 | ptr2 | deallocation.rs:240:27:240:42 | ...: ... | provenance | | -| deallocation.rs:276:6:276:9 | ptr1 | deallocation.rs:279:13:279:16 | ptr1 | provenance | | -| deallocation.rs:276:6:276:9 | ptr1 | deallocation.rs:287:13:287:16 | ptr1 | provenance | | -| deallocation.rs:276:13:276:28 | &raw mut ... | deallocation.rs:276:6:276:9 | ptr1 | provenance | | -| deallocation.rs:295:6:295:9 | ptr2 | deallocation.rs:298:13:298:16 | ptr2 | provenance | | -| deallocation.rs:295:6:295:9 | ptr2 | deallocation.rs:308:13:308:16 | ptr2 | provenance | | -| deallocation.rs:295:13:295:28 | &raw mut ... | deallocation.rs:295:6:295:9 | ptr2 | provenance | | +| deallocation.rs:242:6:242:7 | p1 | deallocation.rs:245:14:245:15 | p1 | provenance | | +| deallocation.rs:242:6:242:7 | p1 | deallocation.rs:252:14:252:15 | p1 | provenance | | +| deallocation.rs:242:30:242:38 | &raw const my_buffer | deallocation.rs:242:6:242:7 | p1 | provenance | | +| deallocation.rs:322:28:322:43 | ...: ... | deallocation.rs:324:18:324:20 | ptr | provenance | | +| deallocation.rs:334:27:334:42 | ...: ... | deallocation.rs:342:18:342:20 | ptr | provenance | | +| deallocation.rs:351:7:351:10 | ptr1 | deallocation.rs:354:4:354:7 | ptr1 | provenance | | +| deallocation.rs:351:7:351:10 | ptr1 | deallocation.rs:354:4:354:7 | ptr1 | provenance | | +| deallocation.rs:351:14:351:33 | &raw mut ... | deallocation.rs:351:7:351:10 | ptr1 | provenance | | +| deallocation.rs:352:7:352:10 | ptr2 | deallocation.rs:355:4:355:7 | ptr2 | provenance | | +| deallocation.rs:352:7:352:10 | ptr2 | deallocation.rs:355:4:355:7 | ptr2 | provenance | | +| deallocation.rs:352:14:352:33 | &raw mut ... | deallocation.rs:352:7:352:10 | ptr2 | provenance | | +| deallocation.rs:354:4:354:7 | ptr1 | deallocation.rs:357:27:357:30 | ptr1 | provenance | | +| deallocation.rs:355:4:355:7 | ptr2 | deallocation.rs:359:26:359:29 | ptr2 | provenance | | +| deallocation.rs:357:27:357:30 | ptr1 | deallocation.rs:322:28:322:43 | ...: ... | provenance | | +| deallocation.rs:359:26:359:29 | ptr2 | deallocation.rs:334:27:334:42 | ...: ... | provenance | | +| deallocation.rs:370:6:370:9 | ptr1 | deallocation.rs:373:13:373:16 | ptr1 | provenance | | +| deallocation.rs:370:6:370:9 | ptr1 | deallocation.rs:381:13:381:16 | ptr1 | provenance | | +| deallocation.rs:370:13:370:28 | &raw mut ... | deallocation.rs:370:6:370:9 | ptr1 | provenance | | +| deallocation.rs:389:6:389:9 | ptr2 | deallocation.rs:392:13:392:16 | ptr2 | provenance | | +| deallocation.rs:389:6:389:9 | ptr2 | deallocation.rs:402:13:402:16 | ptr2 | provenance | | +| deallocation.rs:389:13:389:28 | &raw mut ... | deallocation.rs:389:6:389:9 | ptr2 | provenance | | | lifetime.rs:21:2:21:18 | return ... | lifetime.rs:54:11:54:30 | get_local_dangling(...) | provenance | | | lifetime.rs:21:9:21:18 | &my_local1 | lifetime.rs:21:2:21:18 | return ... | provenance | | | lifetime.rs:27:2:27:22 | return ... | lifetime.rs:55:11:55:34 | get_local_dangling_mut(...) | provenance | | @@ -176,7 +176,6 @@ edges | lifetime.rs:630:10:630:25 | &... | lifetime.rs:630:3:630:6 | str2 | provenance | | | lifetime.rs:654:4:654:7 | str2 | lifetime.rs:655:22:655:25 | str2 | provenance | | | lifetime.rs:654:11:654:35 | ... + ... | lifetime.rs:654:4:654:7 | str2 | provenance | | -| lifetime.rs:654:31:654:35 | &str1 | lifetime.rs:654:4:654:7 | str2 | provenance | | | lifetime.rs:654:31:654:35 | &str1 | lifetime.rs:654:11:654:35 | ... + ... | provenance | MaD:2 | | lifetime.rs:654:31:654:35 | &str1 | lifetime.rs:654:11:654:35 | ... + ... | provenance | MaD:1 | | lifetime.rs:655:4:655:7 | ref1 | lifetime.rs:659:15:659:18 | ref1 | provenance | | @@ -212,32 +211,32 @@ models | 4 | Summary: ::as_ptr; Argument[0].Reference.Reference; ReturnValue.Reference; value | | 5 | Summary: core::ptr::from_ref; Argument[0]; ReturnValue; value | nodes -| deallocation.rs:148:6:148:7 | p1 | semmle.label | p1 | -| deallocation.rs:148:30:148:38 | &raw const my_buffer | semmle.label | &raw const my_buffer | -| deallocation.rs:151:14:151:15 | p1 | semmle.label | p1 | -| deallocation.rs:158:14:158:15 | p1 | semmle.label | p1 | -| deallocation.rs:228:28:228:43 | ...: ... | semmle.label | ...: ... | -| deallocation.rs:230:18:230:20 | ptr | semmle.label | ptr | -| deallocation.rs:240:27:240:42 | ...: ... | semmle.label | ...: ... | -| deallocation.rs:248:18:248:20 | ptr | semmle.label | ptr | -| deallocation.rs:257:7:257:10 | ptr1 | semmle.label | ptr1 | -| deallocation.rs:257:14:257:33 | &raw mut ... | semmle.label | &raw mut ... | -| deallocation.rs:258:7:258:10 | ptr2 | semmle.label | ptr2 | -| deallocation.rs:258:14:258:33 | &raw mut ... | semmle.label | &raw mut ... | -| deallocation.rs:260:4:260:7 | ptr1 | semmle.label | ptr1 | -| deallocation.rs:260:4:260:7 | ptr1 | semmle.label | ptr1 | -| deallocation.rs:261:4:261:7 | ptr2 | semmle.label | ptr2 | -| deallocation.rs:261:4:261:7 | ptr2 | semmle.label | ptr2 | -| deallocation.rs:263:27:263:30 | ptr1 | semmle.label | ptr1 | -| deallocation.rs:265:26:265:29 | ptr2 | semmle.label | ptr2 | -| deallocation.rs:276:6:276:9 | ptr1 | semmle.label | ptr1 | -| deallocation.rs:276:13:276:28 | &raw mut ... | semmle.label | &raw mut ... | -| deallocation.rs:279:13:279:16 | ptr1 | semmle.label | ptr1 | -| deallocation.rs:287:13:287:16 | ptr1 | semmle.label | ptr1 | -| deallocation.rs:295:6:295:9 | ptr2 | semmle.label | ptr2 | -| deallocation.rs:295:13:295:28 | &raw mut ... | semmle.label | &raw mut ... | -| deallocation.rs:298:13:298:16 | ptr2 | semmle.label | ptr2 | -| deallocation.rs:308:13:308:16 | ptr2 | semmle.label | ptr2 | +| deallocation.rs:242:6:242:7 | p1 | semmle.label | p1 | +| deallocation.rs:242:30:242:38 | &raw const my_buffer | semmle.label | &raw const my_buffer | +| deallocation.rs:245:14:245:15 | p1 | semmle.label | p1 | +| deallocation.rs:252:14:252:15 | p1 | semmle.label | p1 | +| deallocation.rs:322:28:322:43 | ...: ... | semmle.label | ...: ... | +| deallocation.rs:324:18:324:20 | ptr | semmle.label | ptr | +| deallocation.rs:334:27:334:42 | ...: ... | semmle.label | ...: ... | +| deallocation.rs:342:18:342:20 | ptr | semmle.label | ptr | +| deallocation.rs:351:7:351:10 | ptr1 | semmle.label | ptr1 | +| deallocation.rs:351:14:351:33 | &raw mut ... | semmle.label | &raw mut ... | +| deallocation.rs:352:7:352:10 | ptr2 | semmle.label | ptr2 | +| deallocation.rs:352:14:352:33 | &raw mut ... | semmle.label | &raw mut ... | +| deallocation.rs:354:4:354:7 | ptr1 | semmle.label | ptr1 | +| deallocation.rs:354:4:354:7 | ptr1 | semmle.label | ptr1 | +| deallocation.rs:355:4:355:7 | ptr2 | semmle.label | ptr2 | +| deallocation.rs:355:4:355:7 | ptr2 | semmle.label | ptr2 | +| deallocation.rs:357:27:357:30 | ptr1 | semmle.label | ptr1 | +| deallocation.rs:359:26:359:29 | ptr2 | semmle.label | ptr2 | +| deallocation.rs:370:6:370:9 | ptr1 | semmle.label | ptr1 | +| deallocation.rs:370:13:370:28 | &raw mut ... | semmle.label | &raw mut ... | +| deallocation.rs:373:13:373:16 | ptr1 | semmle.label | ptr1 | +| deallocation.rs:381:13:381:16 | ptr1 | semmle.label | ptr1 | +| deallocation.rs:389:6:389:9 | ptr2 | semmle.label | ptr2 | +| deallocation.rs:389:13:389:28 | &raw mut ... | semmle.label | &raw mut ... | +| deallocation.rs:392:13:392:16 | ptr2 | semmle.label | ptr2 | +| deallocation.rs:402:13:402:16 | ptr2 | semmle.label | ptr2 | | lifetime.rs:21:2:21:18 | return ... | semmle.label | return ... | | lifetime.rs:21:9:21:18 | &my_local1 | semmle.label | &my_local1 | | lifetime.rs:27:2:27:22 | return ... | semmle.label | return ... | diff --git a/rust/ql/test/query-tests/security/CWE-825/AccessInvalidPointer.expected b/rust/ql/test/query-tests/security/CWE-825/AccessInvalidPointer.expected index 1e9bdb3c8bb..6afe11ad012 100644 --- a/rust/ql/test/query-tests/security/CWE-825/AccessInvalidPointer.expected +++ b/rust/ql/test/query-tests/security/CWE-825/AccessInvalidPointer.expected @@ -13,10 +13,23 @@ | deallocation.rs:130:14:130:15 | p1 | deallocation.rs:123:23:123:40 | ...::dangling | deallocation.rs:130:14:130:15 | p1 | This operation dereferences a pointer that may be $@. | deallocation.rs:123:23:123:40 | ...::dangling | invalid | | deallocation.rs:131:14:131:15 | p2 | deallocation.rs:124:21:124:42 | ...::dangling_mut | deallocation.rs:131:14:131:15 | p2 | This operation dereferences a pointer that may be $@. | deallocation.rs:124:21:124:42 | ...::dangling_mut | invalid | | deallocation.rs:132:14:132:15 | p3 | deallocation.rs:125:23:125:36 | ...::null | deallocation.rs:132:14:132:15 | p3 | This operation dereferences a pointer that may be $@. | deallocation.rs:125:23:125:36 | ...::null | invalid | -| deallocation.rs:180:15:180:16 | p1 | deallocation.rs:176:3:176:25 | ...::drop_in_place | deallocation.rs:180:15:180:16 | p1 | This operation dereferences a pointer that may be $@. | deallocation.rs:176:3:176:25 | ...::drop_in_place | invalid | -| deallocation.rs:180:15:180:16 | p1 | deallocation.rs:176:3:176:25 | ...::drop_in_place | deallocation.rs:180:15:180:16 | p1 | This operation dereferences a pointer that may be $@. | deallocation.rs:176:3:176:25 | ...::drop_in_place | invalid | -| deallocation.rs:248:18:248:20 | ptr | deallocation.rs:242:3:242:25 | ...::drop_in_place | deallocation.rs:248:18:248:20 | ptr | This operation dereferences a pointer that may be $@. | deallocation.rs:242:3:242:25 | ...::drop_in_place | invalid | -| deallocation.rs:248:18:248:20 | ptr | deallocation.rs:242:3:242:25 | ...::drop_in_place | deallocation.rs:248:18:248:20 | ptr | This operation dereferences a pointer that may be $@. | deallocation.rs:242:3:242:25 | ...::drop_in_place | invalid | +| deallocation.rs:163:13:163:15 | ptr | deallocation.rs:159:9:159:26 | ...::null_mut | deallocation.rs:163:13:163:15 | ptr | This operation dereferences a pointer that may be $@. | deallocation.rs:159:9:159:26 | ...::null_mut | invalid | +| deallocation.rs:166:13:166:15 | ptr | deallocation.rs:159:9:159:26 | ...::null_mut | deallocation.rs:166:13:166:15 | ptr | This operation dereferences a pointer that may be $@. | deallocation.rs:159:9:159:26 | ...::null_mut | invalid | +| deallocation.rs:175:13:175:15 | ptr | deallocation.rs:171:9:171:26 | ...::null_mut | deallocation.rs:175:13:175:15 | ptr | This operation dereferences a pointer that may be $@. | deallocation.rs:171:9:171:26 | ...::null_mut | invalid | +| deallocation.rs:178:13:178:15 | ptr | deallocation.rs:171:9:171:26 | ...::null_mut | deallocation.rs:178:13:178:15 | ptr | This operation dereferences a pointer that may be $@. | deallocation.rs:171:9:171:26 | ...::null_mut | invalid | +| deallocation.rs:186:24:186:26 | ptr | deallocation.rs:183:9:183:26 | ...::null_mut | deallocation.rs:186:24:186:26 | ptr | This operation dereferences a pointer that may be $@. | deallocation.rs:183:9:183:26 | ...::null_mut | invalid | +| deallocation.rs:190:24:190:26 | ptr | deallocation.rs:183:9:183:26 | ...::null_mut | deallocation.rs:190:24:190:26 | ptr | This operation dereferences a pointer that may be $@. | deallocation.rs:183:9:183:26 | ...::null_mut | invalid | +| deallocation.rs:194:25:194:27 | ptr | deallocation.rs:183:9:183:26 | ...::null_mut | deallocation.rs:194:25:194:27 | ptr | This operation dereferences a pointer that may be $@. | deallocation.rs:183:9:183:26 | ...::null_mut | invalid | +| deallocation.rs:202:24:202:26 | ptr | deallocation.rs:183:9:183:26 | ...::null_mut | deallocation.rs:202:24:202:26 | ptr | This operation dereferences a pointer that may be $@. | deallocation.rs:183:9:183:26 | ...::null_mut | invalid | +| deallocation.rs:202:24:202:26 | ptr | deallocation.rs:199:9:199:26 | ...::null_mut | deallocation.rs:202:24:202:26 | ptr | This operation dereferences a pointer that may be $@. | deallocation.rs:199:9:199:26 | ...::null_mut | invalid | +| deallocation.rs:210:7:210:9 | ptr | deallocation.rs:183:9:183:26 | ...::null_mut | deallocation.rs:210:7:210:9 | ptr | This operation dereferences a pointer that may be $@. | deallocation.rs:183:9:183:26 | ...::null_mut | invalid | +| deallocation.rs:210:7:210:9 | ptr | deallocation.rs:199:9:199:26 | ...::null_mut | deallocation.rs:210:7:210:9 | ptr | This operation dereferences a pointer that may be $@. | deallocation.rs:199:9:199:26 | ...::null_mut | invalid | +| deallocation.rs:210:7:210:9 | ptr | deallocation.rs:207:9:207:26 | ...::null_mut | deallocation.rs:210:7:210:9 | ptr | This operation dereferences a pointer that may be $@. | deallocation.rs:207:9:207:26 | ...::null_mut | invalid | +| deallocation.rs:226:13:226:21 | const_ptr | deallocation.rs:219:15:219:32 | ...::null_mut | deallocation.rs:226:13:226:21 | const_ptr | This operation dereferences a pointer that may be $@. | deallocation.rs:219:15:219:32 | ...::null_mut | invalid | +| deallocation.rs:274:15:274:16 | p1 | deallocation.rs:270:3:270:25 | ...::drop_in_place | deallocation.rs:274:15:274:16 | p1 | This operation dereferences a pointer that may be $@. | deallocation.rs:270:3:270:25 | ...::drop_in_place | invalid | +| deallocation.rs:274:15:274:16 | p1 | deallocation.rs:270:3:270:25 | ...::drop_in_place | deallocation.rs:274:15:274:16 | p1 | This operation dereferences a pointer that may be $@. | deallocation.rs:270:3:270:25 | ...::drop_in_place | invalid | +| deallocation.rs:342:18:342:20 | ptr | deallocation.rs:336:3:336:25 | ...::drop_in_place | deallocation.rs:342:18:342:20 | ptr | This operation dereferences a pointer that may be $@. | deallocation.rs:336:3:336:25 | ...::drop_in_place | invalid | +| deallocation.rs:342:18:342:20 | ptr | deallocation.rs:336:3:336:25 | ...::drop_in_place | deallocation.rs:342:18:342:20 | ptr | This operation dereferences a pointer that may be $@. | deallocation.rs:336:3:336:25 | ...::drop_in_place | invalid | edges | deallocation.rs:20:3:20:21 | ...::dealloc | deallocation.rs:20:23:20:24 | [post] m1 | provenance | Src:MaD:3 MaD:3 | | deallocation.rs:20:23:20:24 | [post] m1 | deallocation.rs:26:15:26:16 | m1 | provenance | | @@ -32,7 +45,7 @@ edges | deallocation.rs:70:23:70:35 | [post] m2 as ... | deallocation.rs:90:7:90:8 | m2 | provenance | | | deallocation.rs:70:23:70:35 | [post] m2 as ... | deallocation.rs:95:33:95:34 | m2 | provenance | | | deallocation.rs:95:33:95:34 | m2 | deallocation.rs:95:5:95:31 | ...::write::<...> | provenance | MaD:2 Sink:MaD:2 | -| deallocation.rs:112:3:112:12 | ...::free | deallocation.rs:112:14:112:40 | [post] my_ptr as ... | provenance | Src:MaD:8 MaD:8 | +| deallocation.rs:112:3:112:12 | ...::free | deallocation.rs:112:14:112:40 | [post] my_ptr as ... | provenance | Src:MaD:9 MaD:9 | | deallocation.rs:112:14:112:40 | [post] my_ptr as ... | deallocation.rs:115:13:115:18 | my_ptr | provenance | | | deallocation.rs:123:6:123:7 | p1 | deallocation.rs:130:14:130:15 | p1 | provenance | | | deallocation.rs:123:23:123:40 | ...::dangling | deallocation.rs:123:23:123:42 | ...::dangling(...) | provenance | Src:MaD:4 MaD:4 | @@ -44,12 +57,37 @@ edges | deallocation.rs:125:6:125:7 | p3 | deallocation.rs:132:14:132:15 | p3 | provenance | | | deallocation.rs:125:23:125:36 | ...::null | deallocation.rs:125:23:125:38 | ...::null(...) | provenance | Src:MaD:7 MaD:7 | | deallocation.rs:125:23:125:38 | ...::null(...) | deallocation.rs:125:6:125:7 | p3 | provenance | | -| deallocation.rs:176:3:176:25 | ...::drop_in_place | deallocation.rs:176:27:176:28 | [post] p1 | provenance | Src:MaD:6 MaD:6 | -| deallocation.rs:176:3:176:25 | ...::drop_in_place | deallocation.rs:176:27:176:28 | [post] p1 | provenance | Src:MaD:6 MaD:6 | -| deallocation.rs:176:27:176:28 | [post] p1 | deallocation.rs:180:15:180:16 | p1 | provenance | | -| deallocation.rs:242:3:242:25 | ...::drop_in_place | deallocation.rs:242:27:242:29 | [post] ptr | provenance | Src:MaD:6 MaD:6 | -| deallocation.rs:242:3:242:25 | ...::drop_in_place | deallocation.rs:242:27:242:29 | [post] ptr | provenance | Src:MaD:6 MaD:6 | -| deallocation.rs:242:27:242:29 | [post] ptr | deallocation.rs:248:18:248:20 | ptr | provenance | | +| deallocation.rs:159:3:159:5 | ptr | deallocation.rs:163:13:163:15 | ptr | provenance | | +| deallocation.rs:159:3:159:5 | ptr | deallocation.rs:166:13:166:15 | ptr | provenance | | +| deallocation.rs:159:9:159:26 | ...::null_mut | deallocation.rs:159:9:159:28 | ...::null_mut(...) | provenance | Src:MaD:8 MaD:8 | +| deallocation.rs:159:9:159:28 | ...::null_mut(...) | deallocation.rs:159:3:159:5 | ptr | provenance | | +| deallocation.rs:171:3:171:5 | ptr | deallocation.rs:175:13:175:15 | ptr | provenance | | +| deallocation.rs:171:3:171:5 | ptr | deallocation.rs:178:13:178:15 | ptr | provenance | | +| deallocation.rs:171:9:171:26 | ...::null_mut | deallocation.rs:171:9:171:28 | ...::null_mut(...) | provenance | Src:MaD:8 MaD:8 | +| deallocation.rs:171:9:171:28 | ...::null_mut(...) | deallocation.rs:171:3:171:5 | ptr | provenance | | +| deallocation.rs:183:3:183:5 | ptr | deallocation.rs:186:24:186:26 | ptr | provenance | | +| deallocation.rs:183:3:183:5 | ptr | deallocation.rs:190:24:190:26 | ptr | provenance | | +| deallocation.rs:183:3:183:5 | ptr | deallocation.rs:194:25:194:27 | ptr | provenance | | +| deallocation.rs:183:3:183:5 | ptr | deallocation.rs:202:24:202:26 | ptr | provenance | | +| deallocation.rs:183:3:183:5 | ptr | deallocation.rs:210:7:210:9 | ptr | provenance | | +| deallocation.rs:183:9:183:26 | ...::null_mut | deallocation.rs:183:9:183:28 | ...::null_mut(...) | provenance | Src:MaD:8 MaD:8 | +| deallocation.rs:183:9:183:28 | ...::null_mut(...) | deallocation.rs:183:3:183:5 | ptr | provenance | | +| deallocation.rs:199:3:199:5 | ptr | deallocation.rs:202:24:202:26 | ptr | provenance | | +| deallocation.rs:199:3:199:5 | ptr | deallocation.rs:210:7:210:9 | ptr | provenance | | +| deallocation.rs:199:9:199:26 | ...::null_mut | deallocation.rs:199:9:199:28 | ...::null_mut(...) | provenance | Src:MaD:8 MaD:8 | +| deallocation.rs:199:9:199:28 | ...::null_mut(...) | deallocation.rs:199:3:199:5 | ptr | provenance | | +| deallocation.rs:207:3:207:5 | ptr | deallocation.rs:210:7:210:9 | ptr | provenance | | +| deallocation.rs:207:9:207:26 | ...::null_mut | deallocation.rs:207:9:207:28 | ...::null_mut(...) | provenance | Src:MaD:8 MaD:8 | +| deallocation.rs:207:9:207:28 | ...::null_mut(...) | deallocation.rs:207:3:207:5 | ptr | provenance | | +| deallocation.rs:219:3:219:11 | const_ptr | deallocation.rs:226:13:226:21 | const_ptr | provenance | | +| deallocation.rs:219:15:219:32 | ...::null_mut | deallocation.rs:219:15:219:34 | ...::null_mut(...) | provenance | Src:MaD:8 MaD:8 | +| deallocation.rs:219:15:219:34 | ...::null_mut(...) | deallocation.rs:219:3:219:11 | const_ptr | provenance | | +| deallocation.rs:270:3:270:25 | ...::drop_in_place | deallocation.rs:270:27:270:28 | [post] p1 | provenance | Src:MaD:6 MaD:6 | +| deallocation.rs:270:3:270:25 | ...::drop_in_place | deallocation.rs:270:27:270:28 | [post] p1 | provenance | Src:MaD:6 MaD:6 | +| deallocation.rs:270:27:270:28 | [post] p1 | deallocation.rs:274:15:274:16 | p1 | provenance | | +| deallocation.rs:336:3:336:25 | ...::drop_in_place | deallocation.rs:336:27:336:29 | [post] ptr | provenance | Src:MaD:6 MaD:6 | +| deallocation.rs:336:3:336:25 | ...::drop_in_place | deallocation.rs:336:27:336:29 | [post] ptr | provenance | Src:MaD:6 MaD:6 | +| deallocation.rs:336:27:336:29 | [post] ptr | deallocation.rs:342:18:342:20 | ptr | provenance | | models | 1 | Sink: core::ptr::read; Argument[0]; pointer-access | | 2 | Sink: core::ptr::write; Argument[0]; pointer-access | @@ -58,7 +96,8 @@ models | 5 | Source: core::ptr::dangling_mut; ReturnValue; pointer-invalidate | | 6 | Source: core::ptr::drop_in_place; Argument[0]; pointer-invalidate | | 7 | Source: core::ptr::null; ReturnValue; pointer-invalidate | -| 8 | Source: libc::unix::free; Argument[0]; pointer-invalidate | +| 8 | Source: core::ptr::null_mut; ReturnValue; pointer-invalidate | +| 9 | Source: libc::unix::free; Argument[0]; pointer-invalidate | nodes | deallocation.rs:20:3:20:21 | ...::dealloc | semmle.label | ...::dealloc | | deallocation.rs:20:23:20:24 | [post] m1 | semmle.label | [post] m1 | @@ -92,12 +131,40 @@ nodes | deallocation.rs:130:14:130:15 | p1 | semmle.label | p1 | | deallocation.rs:131:14:131:15 | p2 | semmle.label | p2 | | deallocation.rs:132:14:132:15 | p3 | semmle.label | p3 | -| deallocation.rs:176:3:176:25 | ...::drop_in_place | semmle.label | ...::drop_in_place | -| deallocation.rs:176:3:176:25 | ...::drop_in_place | semmle.label | ...::drop_in_place | -| deallocation.rs:176:27:176:28 | [post] p1 | semmle.label | [post] p1 | -| deallocation.rs:180:15:180:16 | p1 | semmle.label | p1 | -| deallocation.rs:242:3:242:25 | ...::drop_in_place | semmle.label | ...::drop_in_place | -| deallocation.rs:242:3:242:25 | ...::drop_in_place | semmle.label | ...::drop_in_place | -| deallocation.rs:242:27:242:29 | [post] ptr | semmle.label | [post] ptr | -| deallocation.rs:248:18:248:20 | ptr | semmle.label | ptr | +| deallocation.rs:159:3:159:5 | ptr | semmle.label | ptr | +| deallocation.rs:159:9:159:26 | ...::null_mut | semmle.label | ...::null_mut | +| deallocation.rs:159:9:159:28 | ...::null_mut(...) | semmle.label | ...::null_mut(...) | +| deallocation.rs:163:13:163:15 | ptr | semmle.label | ptr | +| deallocation.rs:166:13:166:15 | ptr | semmle.label | ptr | +| deallocation.rs:171:3:171:5 | ptr | semmle.label | ptr | +| deallocation.rs:171:9:171:26 | ...::null_mut | semmle.label | ...::null_mut | +| deallocation.rs:171:9:171:28 | ...::null_mut(...) | semmle.label | ...::null_mut(...) | +| deallocation.rs:175:13:175:15 | ptr | semmle.label | ptr | +| deallocation.rs:178:13:178:15 | ptr | semmle.label | ptr | +| deallocation.rs:183:3:183:5 | ptr | semmle.label | ptr | +| deallocation.rs:183:9:183:26 | ...::null_mut | semmle.label | ...::null_mut | +| deallocation.rs:183:9:183:28 | ...::null_mut(...) | semmle.label | ...::null_mut(...) | +| deallocation.rs:186:24:186:26 | ptr | semmle.label | ptr | +| deallocation.rs:190:24:190:26 | ptr | semmle.label | ptr | +| deallocation.rs:194:25:194:27 | ptr | semmle.label | ptr | +| deallocation.rs:199:3:199:5 | ptr | semmle.label | ptr | +| deallocation.rs:199:9:199:26 | ...::null_mut | semmle.label | ...::null_mut | +| deallocation.rs:199:9:199:28 | ...::null_mut(...) | semmle.label | ...::null_mut(...) | +| deallocation.rs:202:24:202:26 | ptr | semmle.label | ptr | +| deallocation.rs:207:3:207:5 | ptr | semmle.label | ptr | +| deallocation.rs:207:9:207:26 | ...::null_mut | semmle.label | ...::null_mut | +| deallocation.rs:207:9:207:28 | ...::null_mut(...) | semmle.label | ...::null_mut(...) | +| deallocation.rs:210:7:210:9 | ptr | semmle.label | ptr | +| deallocation.rs:219:3:219:11 | const_ptr | semmle.label | const_ptr | +| deallocation.rs:219:15:219:32 | ...::null_mut | semmle.label | ...::null_mut | +| deallocation.rs:219:15:219:34 | ...::null_mut(...) | semmle.label | ...::null_mut(...) | +| deallocation.rs:226:13:226:21 | const_ptr | semmle.label | const_ptr | +| deallocation.rs:270:3:270:25 | ...::drop_in_place | semmle.label | ...::drop_in_place | +| deallocation.rs:270:3:270:25 | ...::drop_in_place | semmle.label | ...::drop_in_place | +| deallocation.rs:270:27:270:28 | [post] p1 | semmle.label | [post] p1 | +| deallocation.rs:274:15:274:16 | p1 | semmle.label | p1 | +| deallocation.rs:336:3:336:25 | ...::drop_in_place | semmle.label | ...::drop_in_place | +| deallocation.rs:336:3:336:25 | ...::drop_in_place | semmle.label | ...::drop_in_place | +| deallocation.rs:336:27:336:29 | [post] ptr | semmle.label | [post] ptr | +| deallocation.rs:342:18:342:20 | ptr | semmle.label | ptr | subpaths diff --git a/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected index 81f06adcde3..c581cd273e6 100644 --- a/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected @@ -1,6 +1,12 @@ -multipleCallTargets -| deallocation.rs:260:11:260:29 | ...::from(...) | -| deallocation.rs:261:11:261:29 | ...::from(...) | +multipleResolvedTargets +| deallocation.rs:354:11:354:29 | ...::from(...) | +| deallocation.rs:355:11:355:29 | ...::from(...) | +| lifetime.rs:217:17:217:25 | * ... | | lifetime.rs:610:13:610:31 | ...::from(...) | | lifetime.rs:611:13:611:31 | ...::from(...) | | lifetime.rs:628:13:628:31 | ...::from(...) | +| lifetime.rs:630:11:630:25 | * ... | +| lifetime.rs:692:12:692:14 | * ... | +| lifetime.rs:693:12:693:14 | * ... | +| lifetime.rs:694:12:694:14 | * ... | +| lifetime.rs:734:11:734:13 | * ... | diff --git a/rust/ql/test/query-tests/security/CWE-825/deallocation.rs b/rust/ql/test/query-tests/security/CWE-825/deallocation.rs index 89ef0470e99..073d03260b3 100644 --- a/rust/ql/test/query-tests/security/CWE-825/deallocation.rs +++ b/rust/ql/test/query-tests/security/CWE-825/deallocation.rs @@ -137,6 +137,100 @@ pub fn test_ptr_invalid(mode: i32) { } } +struct MyObject { + value: i64 +} + +impl MyObject { + fn is_zero(&self) -> bool { + self.value == 0 + } +} + +pub unsafe fn test_ptr_invalid_conditions(mode: i32) { + let layout = std::alloc::Layout::new::(); + + // --- mutable pointer --- + + let mut ptr = std::alloc::alloc(layout) as *mut MyObject; + (*ptr).value = 0; // good + + if mode == 121 { // (causes a panic below) + ptr = std::ptr::null_mut(); // $ Source[rust/access-invalid-pointer] + } + + if ptr.is_null() { + let v = (*ptr).value; // $ Alert[rust/access-invalid-pointer] + println!(" cond1 v = {v}"); + } else { + let v = (*ptr).value; // $ SPURIOUS: Alert[rust/access-invalid-pointer] good - unreachable with null pointer + println!(" cond2 v = {v}"); + } + + if mode == 122 { // (causes a panic below) + ptr = std::ptr::null_mut(); // $ Source[rust/access-invalid-pointer] + } + + if !(ptr.is_null()) { + let v = (*ptr).value; // $ SPURIOUS: Alert[rust/access-invalid-pointer] good - unreachable with null pointer + println!(" cond3 v = {v}"); + } else { + let v = (*ptr).value; // $ Alert[rust/access-invalid-pointer] + println!(" cond4 v = {v}"); + } + + if mode == 123 { // (causes a panic below) + ptr = std::ptr::null_mut(); // $ Source[rust/access-invalid-pointer] + } + + if ptr.is_null() || (*ptr).value == 0 { // $ SPURIOUS: Alert[rust/access-invalid-pointer] good - deref is protected by short-circuiting + println!(" cond5"); + } + + if ptr.is_null() || (*ptr).is_zero() { // $ SPURIOUS: Alert[rust/access-invalid-pointer] good - deref is protected by short-circuiting + println!(" cond6"); + } + + if !ptr.is_null() || (*ptr).value == 0 { // $ Alert[rust/access-invalid-pointer] + println!(" cond7"); + } + + if mode == 124 { // (causes a panic below) + ptr = std::ptr::null_mut(); // $ Source[rust/access-invalid-pointer] + } + + if ptr.is_null() && (*ptr).is_zero() { // $ Alert[rust/access-invalid-pointer] + println!(" cond8"); + } + + if mode == 125 { // (causes a panic below) + ptr = std::ptr::null_mut(); // $ Source[rust/access-invalid-pointer] + } + + if (*ptr).is_zero() || ptr.is_null() { // $ Alert[rust/access-invalid-pointer] + println!(" cond9"); + } + + // --- immutable pointer --- + + let const_ptr; + + if mode == 126 { // (causes a panic below) + const_ptr = std::ptr::null_mut(); // $ Source[rust/access-invalid-pointer] + } else { + const_ptr = std::alloc::alloc(layout) as *mut MyObject; + (*const_ptr).value = 0; // good + } + + if const_ptr.is_null() { + let v = (*const_ptr).value; // $ Alert[rust/access-invalid-pointer] + println!(" cond10 v = {v}"); + } else { + let v = (*const_ptr).value; // $ good - unreachable with null pointer + println!(" cond11 v = {v}"); + } +} + // --- drop --- struct MyBuffer { diff --git a/rust/ql/test/query-tests/security/CWE-825/lifetime.rs b/rust/ql/test/query-tests/security/CWE-825/lifetime.rs index 83317aa13d1..05a099e903f 100644 --- a/rust/ql/test/query-tests/security/CWE-825/lifetime.rs +++ b/rust/ql/test/query-tests/security/CWE-825/lifetime.rs @@ -827,3 +827,33 @@ pub fn test_lifetimes_example_good() { println!(" val = {dereferenced_ptr}"); } + +// --- generic calls --- + +trait Processor { + fn process(ptr: *const i64) -> i64; +} + +struct MyProcessor { +} + +impl Processor for MyProcessor { + fn process(ptr: *const i64) -> i64 { + unsafe { + return *ptr; // good + } + } +} + +fn generic_caller() -> i64 +{ + let local_value: i64 = 10; + let ptr = &local_value as *const i64; + + return T::process(ptr); +} + +pub fn test_generic() { + let result = generic_caller::(); + println!(" result = {result}"); +} diff --git a/rust/ql/test/query-tests/security/CWE-825/main.rs b/rust/ql/test/query-tests/security/CWE-825/main.rs index 8d1f2a42146..09a3d279c21 100644 --- a/rust/ql/test/query-tests/security/CWE-825/main.rs +++ b/rust/ql/test/query-tests/security/CWE-825/main.rs @@ -126,6 +126,11 @@ fn main() { println!("test_ptr_invalid:"); test_ptr_invalid(mode); + println!("test_ptr_invalid_conditions:"); + unsafe { + test_ptr_invalid_conditions(mode); + } + println!("test_drop:"); test_drop(); @@ -204,4 +209,7 @@ fn main() { println!("test_lifetimes_example_good:"); test_lifetimes_example_good(); + + println!("test_generic:"); + test_generic(); } diff --git a/rust/ql/test/query-tests/unusedentities/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/unusedentities/CONSISTENCY/PathResolutionConsistency.expected index 4d2cdee53ce..be3b445209d 100644 --- a/rust/ql/test/query-tests/unusedentities/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/unusedentities/CONSISTENCY/PathResolutionConsistency.expected @@ -1,6 +1,31 @@ -multipleCallTargets +multipleResolvedTargets | main.rs:14:13:14:29 | ...::from(...) | | main.rs:15:13:15:29 | ...::from(...) | +| main.rs:223:9:223:18 | * ... | +| main.rs:223:9:223:18 | * ... | +| main.rs:223:9:223:18 | * ... | +| main.rs:223:9:223:18 | * ... | +| main.rs:228:9:228:18 | * ... | +| main.rs:228:9:228:18 | * ... | +| main.rs:228:9:228:18 | * ... | +| main.rs:228:9:228:18 | * ... | +| main.rs:353:5:353:14 | * ... | +| main.rs:353:5:353:14 | * ... | +| main.rs:353:5:353:14 | * ... | +| main.rs:353:5:353:14 | * ... | +| main.rs:539:13:539:14 | * ... | +| main.rs:544:19:544:20 | * ... | +| more.rs:34:11:34:19 | * ... | +| more.rs:45:20:45:26 | * ... | +| more.rs:56:20:56:30 | * ... | +| more.rs:56:21:56:30 | * ... | +| more.rs:61:20:61:30 | * ... | +| more.rs:61:21:61:30 | * ... | +| more.rs:67:20:67:25 | * ... | +| more.rs:71:5:71:10 | * ... | +| more.rs:75:5:75:10 | * ... | +| more.rs:80:5:80:10 | * ... | +| more.rs:82:20:82:26 | * ... | | unreachable.rs:165:20:165:42 | ...::from(...) | | unreachable.rs:171:9:171:15 | ...::from(...) | | unreachable.rs:177:17:177:25 | ...::from(...) | diff --git a/rust/ql/test/utils-tests/modelgenerator/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/utils-tests/modelgenerator/CONSISTENCY/PathResolutionConsistency.expected new file mode 100644 index 00000000000..b9195fc15f0 --- /dev/null +++ b/rust/ql/test/utils-tests/modelgenerator/CONSISTENCY/PathResolutionConsistency.expected @@ -0,0 +1,9 @@ +multipleResolvedTargets +| option.rs:34:18:34:22 | * ... | +| option.rs:61:15:61:19 | * ... | +| option.rs:69:15:69:19 | * ... | +| option.rs:306:9:306:13 | * ... | +| option.rs:335:13:335:17 | * ... | +| option.rs:483:27:483:29 | * ... | +| summaries.rs:87:5:87:6 | * ... | +| summaries.rs:92:5:92:6 | * ... | diff --git a/rust/ql/test/utils-tests/modelgenerator/option.rs b/rust/ql/test/utils-tests/modelgenerator/option.rs index 9af02979135..fd5cd649c2c 100644 --- a/rust/ql/test/utils-tests/modelgenerator/option.rs +++ b/rust/ql/test/utils-tests/modelgenerator/option.rs @@ -325,7 +325,8 @@ impl MyOption { } // summary=::get_or_insert_with;Argument[self].Reference.Field[test::option::MyOption::MySome(0)];ReturnValue.Reference;value;dfc-generated - // MISSING: Mutating `self` parameter. + // summary=::get_or_insert_with;Argument[0].ReturnValue;Argument[self].Reference.Field[test::option::MyOption::MySome(0)];value;dfc-generated + // summary=::get_or_insert_with;Argument[0].ReturnValue;ReturnValue.Reference;value;dfc-generated pub fn get_or_insert_with(&mut self, f: F) -> &mut T where F: FnOnce() -> T, diff --git a/rust/schema/annotations.py b/rust/schema/annotations.py index 5861ede759b..96173957278 100644 --- a/rust/schema/annotations.py +++ b/rust/schema/annotations.py @@ -228,41 +228,35 @@ class _: loop_body: drop -class CallExprBase(Expr): - """ - A function or method call expression. See `CallExpr` and `MethodCallExpr` for further details. - """ - arg_list: optional["ArgList"] | child - attrs: list["Attr"] | child - args: list["Expr"] | synth - - -@annotate(CallExpr, replace_bases={Expr: CallExprBase}, cfg=True) +@annotate(CallExpr, cfg=True) class _: """ - A function call expression. For example: + NOTE: Consider using `Call` instead, as that excludes call expressions that are + instantiations of tuple structs and tuple variants. + + A call expression. For example: ```rust foo(42); foo::(42); foo[0](42); - foo(1) = 4; + Option::Some(42); // tuple variant instantiation ``` """ - arg_list: drop - attrs: drop -@annotate(MethodCallExpr, replace_bases={Expr: CallExprBase}, cfg=True) +@annotate(MethodCallExpr, cfg=True) class _: """ + NOTE: Consider using `MethodCall` instead, as that also includes calls to methods using + call syntax (such as `Foo::method(x)`), operation syntax (such as `x + y`), and + indexing syntax (such as `x[y]`). + A method call expression. For example: ```rust x.foo(42); x.foo::(42); ``` """ - arg_list: drop - attrs: drop @annotate(MatchArm) @@ -1926,7 +1920,7 @@ class _: @annotate(TupleField) class _: """ - A field in a tuple struct or tuple enum variant. + A field in a tuple struct or tuple variant. For example: ```rust @@ -1939,7 +1933,7 @@ class _: @annotate(TupleFieldList) class _: """ - A list of fields in a tuple struct or tuple enum variant. + A list of fields in a tuple struct or tuple variant. For example: ```rust diff --git a/rust/tools/builtins/mentions.rs b/rust/tools/builtins/mentions.rs new file mode 100644 index 00000000000..a3731164893 --- /dev/null +++ b/rust/tools/builtins/mentions.rs @@ -0,0 +1,6 @@ +// Type mentions required by type inference + +use std::future::Future; +fn mention_dyn_future(f: &dyn Future) {} + +fn mention_dyn_fn_once(f: &dyn FnOnce() -> F) {} diff --git a/rust/tools/builtins/types.rs b/rust/tools/builtins/types.rs index 0c6025b4d37..d3fd06b2168 100644 --- a/rust/tools/builtins/types.rs +++ b/rust/tools/builtins/types.rs @@ -26,8 +26,10 @@ pub struct f64; struct Slice; struct Array; -struct Ref; // todo: add mut variant -struct Ptr; // todo: add mut variant +struct Ref; +struct RefMut; +struct PtrConst; +struct PtrMut; // tuples struct Tuple0; diff --git a/shared/concepts/CHANGELOG.md b/shared/concepts/CHANGELOG.md index ab7c158c25b..062bb537ba2 100644 --- a/shared/concepts/CHANGELOG.md +++ b/shared/concepts/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.0.11 + +No user-facing changes. + +## 0.0.10 + +No user-facing changes. + ## 0.0.9 No user-facing changes. diff --git a/shared/concepts/change-notes/released/0.0.10.md b/shared/concepts/change-notes/released/0.0.10.md new file mode 100644 index 00000000000..22391080fd4 --- /dev/null +++ b/shared/concepts/change-notes/released/0.0.10.md @@ -0,0 +1,3 @@ +## 0.0.10 + +No user-facing changes. diff --git a/shared/concepts/change-notes/released/0.0.11.md b/shared/concepts/change-notes/released/0.0.11.md new file mode 100644 index 00000000000..19a2a55bd68 --- /dev/null +++ b/shared/concepts/change-notes/released/0.0.11.md @@ -0,0 +1,3 @@ +## 0.0.11 + +No user-facing changes. diff --git a/shared/concepts/codeql-pack.release.yml b/shared/concepts/codeql-pack.release.yml index ecdd64fbab8..e679dc42092 100644 --- a/shared/concepts/codeql-pack.release.yml +++ b/shared/concepts/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.9 +lastReleaseVersion: 0.0.11 diff --git a/shared/concepts/qlpack.yml b/shared/concepts/qlpack.yml index a6f2253b712..fa25c3b42fc 100644 --- a/shared/concepts/qlpack.yml +++ b/shared/concepts/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/concepts -version: 0.0.10-dev +version: 0.0.12-dev groups: shared library: true dependencies: diff --git a/shared/controlflow/CHANGELOG.md b/shared/controlflow/CHANGELOG.md index d2961b51483..c35db78c988 100644 --- a/shared/controlflow/CHANGELOG.md +++ b/shared/controlflow/CHANGELOG.md @@ -1,3 +1,11 @@ +## 2.0.21 + +No user-facing changes. + +## 2.0.20 + +No user-facing changes. + ## 2.0.19 No user-facing changes. diff --git a/shared/controlflow/change-notes/released/2.0.20.md b/shared/controlflow/change-notes/released/2.0.20.md new file mode 100644 index 00000000000..6756bd5f6c1 --- /dev/null +++ b/shared/controlflow/change-notes/released/2.0.20.md @@ -0,0 +1,3 @@ +## 2.0.20 + +No user-facing changes. diff --git a/shared/controlflow/change-notes/released/2.0.21.md b/shared/controlflow/change-notes/released/2.0.21.md new file mode 100644 index 00000000000..bdc5029b70b --- /dev/null +++ b/shared/controlflow/change-notes/released/2.0.21.md @@ -0,0 +1,3 @@ +## 2.0.21 + +No user-facing changes. diff --git a/shared/controlflow/codeql-pack.release.yml b/shared/controlflow/codeql-pack.release.yml index 4aecf1e1f86..a572e88bffd 100644 --- a/shared/controlflow/codeql-pack.release.yml +++ b/shared/controlflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.19 +lastReleaseVersion: 2.0.21 diff --git a/shared/controlflow/qlpack.yml b/shared/controlflow/qlpack.yml index aa9beb00dc7..ac8be746d3f 100644 --- a/shared/controlflow/qlpack.yml +++ b/shared/controlflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/controlflow -version: 2.0.20-dev +version: 2.0.22-dev groups: shared library: true dependencies: diff --git a/shared/dataflow/CHANGELOG.md b/shared/dataflow/CHANGELOG.md index ff6b9243d64..a447303727c 100644 --- a/shared/dataflow/CHANGELOG.md +++ b/shared/dataflow/CHANGELOG.md @@ -1,3 +1,11 @@ +## 2.0.21 + +No user-facing changes. + +## 2.0.20 + +No user-facing changes. + ## 2.0.19 No user-facing changes. diff --git a/shared/dataflow/change-notes/released/2.0.20.md b/shared/dataflow/change-notes/released/2.0.20.md new file mode 100644 index 00000000000..6756bd5f6c1 --- /dev/null +++ b/shared/dataflow/change-notes/released/2.0.20.md @@ -0,0 +1,3 @@ +## 2.0.20 + +No user-facing changes. diff --git a/shared/dataflow/change-notes/released/2.0.21.md b/shared/dataflow/change-notes/released/2.0.21.md new file mode 100644 index 00000000000..bdc5029b70b --- /dev/null +++ b/shared/dataflow/change-notes/released/2.0.21.md @@ -0,0 +1,3 @@ +## 2.0.21 + +No user-facing changes. diff --git a/shared/dataflow/codeql-pack.release.yml b/shared/dataflow/codeql-pack.release.yml index 4aecf1e1f86..a572e88bffd 100644 --- a/shared/dataflow/codeql-pack.release.yml +++ b/shared/dataflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.19 +lastReleaseVersion: 2.0.21 diff --git a/shared/dataflow/codeql/dataflow/internal/ContentDataFlowImpl.qll b/shared/dataflow/codeql/dataflow/internal/ContentDataFlowImpl.qll index baf473efff1..0c84d33244c 100644 --- a/shared/dataflow/codeql/dataflow/internal/ContentDataFlowImpl.qll +++ b/shared/dataflow/codeql/dataflow/internal/ContentDataFlowImpl.qll @@ -75,6 +75,9 @@ module MakeImplContentDataFlow Lang> { /** Gets a limit on the number of reads out of sources and number of stores into sinks. */ default int accessPathLimit() { result = Lang::accessPathLimit() } + /** Gets the access path limit used in the internal invocation of the standard data flow library. */ + default int accessPathLimitInternal() { result = Lang::accessPathLimit() } + /** Holds if `c` is relevant for reads out of sources or stores into sinks. */ default predicate isRelevantContent(ContentSet c) { any() } } @@ -110,7 +113,7 @@ module MakeImplContentDataFlow Lang> { FlowFeature getAFeature() { result = ContentConfig::getAFeature() } - predicate accessPathLimit = ContentConfig::accessPathLimit/0; + predicate accessPathLimit = ContentConfig::accessPathLimitInternal/0; // needed to record reads/stores inside summarized callables predicate includeHiddenNodes() { any() } @@ -274,6 +277,16 @@ module MakeImplContentDataFlow Lang> { ) } + /** + * Gets the length of this access path. + */ + int length() { + this = TAccessPathNil() and + result = 0 + or + result = this.getTail().length() + 1 + } + /** * Gets the content set at index `i` in this access path, if any. */ diff --git a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll index ddcd052e8fd..aa74e44a8e8 100644 --- a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll +++ b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll @@ -207,6 +207,28 @@ module MakeImpl Lang> { flowLocal(source, sink) and Config::observeOverlayInformedIncrementalMode() } + /** + * Holds if data can flow from `source` to some sink. + * This is a local predicate that only has results local to the overlay/base database. + */ + predicate flowFromLocal(Node source) = forceLocal(Flow::flowFrom/1)(source) + + /** + * Holds if data can flow from `source` to some sink. + */ + predicate flowFrom(Node source) { + Flow::flowFrom(source) + or + // If we are overlay informed (i.e. we are not diff-informed), we + // merge in the local results which includes the base database results. + flowFromLocal(source) and Config::observeOverlayInformedIncrementalMode() + } + + /** + * Holds if data can flow from `source` to some sink. + */ + predicate flowFromExpr(Lang::DataFlowExpr source) { flowFrom(exprNode(source)) } + /** * Holds if data can flow from some source to `sink`. * This is a local predicate that only has results local to the overlay/base database. @@ -3501,6 +3523,16 @@ module MakeImpl Lang> { ) } + /** + * Holds if data can flow from `source` to some sink. + */ + predicate flowFrom(Node source) { exists(PathNode n | n.isSource() and n.getNode() = source) } + + /** + * Holds if data can flow from `source` to some sink. + */ + predicate flowFromExpr(Expr source) { flowFrom(exprNode(source)) } + /** * Holds if data can flow from some source to `sink`. */ diff --git a/shared/dataflow/codeql/dataflow/internal/DataFlowImplConsistency.qll b/shared/dataflow/codeql/dataflow/internal/DataFlowImplConsistency.qll index 8f0d2cbdb77..c892cfe1034 100644 --- a/shared/dataflow/codeql/dataflow/internal/DataFlowImplConsistency.qll +++ b/shared/dataflow/codeql/dataflow/internal/DataFlowImplConsistency.qll @@ -74,6 +74,9 @@ signature module InputSig DataFlowL ) { none() } + + /** Holds if `(n1, n2)` should be excluded from the consistency test `localFlowIsLocal`. */ + default predicate localFlowIsLocalExclude(DataFlowLang::Node n1, DataFlowLang::Node n2) { none() } } module MakeConsistency< @@ -169,6 +172,7 @@ module MakeConsistency< query predicate localFlowIsLocal(Node n1, Node n2, string msg) { simpleLocalFlowStep(n1, n2, _) and nodeGetEnclosingCallable(n1) != nodeGetEnclosingCallable(n2) and + not Input::localFlowIsLocalExclude(n1, n2) and msg = "Local flow step does not preserve enclosing callable." } @@ -240,6 +244,13 @@ module MakeConsistency< private predicate hasPost(Node n) { exists(PostUpdateNode post | post.getPreUpdateNode() = n) } + /** + * Consider code like `a.b.f = source()`. There is flow from `source()` to + * `[post] a.b` (with an appropriate access path), but we also want there to + * be flow to `[post] a` (with an appropriate access path). The data flow + * library is able to infer this step because there is a read step from `a` + * to `a.b`, as long as the post-update node for `a` exists. + */ query predicate reverseRead(Node n, string msg) { exists(Node n2 | readStep(n, _, n2) and hasPost(n2) and not hasPost(n)) and not Input::reverseReadExclude(n) and diff --git a/shared/dataflow/qlpack.yml b/shared/dataflow/qlpack.yml index ba23cda97ca..523275d527a 100644 --- a/shared/dataflow/qlpack.yml +++ b/shared/dataflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/dataflow -version: 2.0.20-dev +version: 2.0.22-dev groups: shared library: true dependencies: diff --git a/shared/mad/CHANGELOG.md b/shared/mad/CHANGELOG.md index b5ca37028e4..f57268a5033 100644 --- a/shared/mad/CHANGELOG.md +++ b/shared/mad/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.0.37 + +No user-facing changes. + +## 1.0.36 + +No user-facing changes. + ## 1.0.35 No user-facing changes. diff --git a/shared/mad/change-notes/released/1.0.36.md b/shared/mad/change-notes/released/1.0.36.md new file mode 100644 index 00000000000..6cefe97d8b8 --- /dev/null +++ b/shared/mad/change-notes/released/1.0.36.md @@ -0,0 +1,3 @@ +## 1.0.36 + +No user-facing changes. diff --git a/shared/mad/change-notes/released/1.0.37.md b/shared/mad/change-notes/released/1.0.37.md new file mode 100644 index 00000000000..505bacf104d --- /dev/null +++ b/shared/mad/change-notes/released/1.0.37.md @@ -0,0 +1,3 @@ +## 1.0.37 + +No user-facing changes. diff --git a/shared/mad/codeql-pack.release.yml b/shared/mad/codeql-pack.release.yml index 9493cf42a28..9ad62b33247 100644 --- a/shared/mad/codeql-pack.release.yml +++ b/shared/mad/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.35 +lastReleaseVersion: 1.0.37 diff --git a/shared/mad/codeql/mad/modelgenerator/internal/ModelGeneratorImpl.qll b/shared/mad/codeql/mad/modelgenerator/internal/ModelGeneratorImpl.qll index 51dafc2cc96..8abe4563580 100644 --- a/shared/mad/codeql/mad/modelgenerator/internal/ModelGeneratorImpl.qll +++ b/shared/mad/codeql/mad/modelgenerator/internal/ModelGeneratorImpl.qll @@ -277,6 +277,16 @@ module MakeModelGeneratorFactory< */ predicate isAdditionalContentFlowStep(Lang::Node nodeFrom, Lang::Node nodeTo); + /** + * Gets the access path limit for content flow analysis. + */ + default int contentAccessPathLimit() { result = 2 } + + /** + * Gets the internal access path limit for content flow analysis. + */ + default int contentAccessPathLimitInternal() { result = Lang::accessPathLimit() } + /** * Holds if the content set `c` is field like. */ @@ -650,7 +660,10 @@ module MakeModelGeneratorFactory< exists(Type t | t = n.(NodeExtended).getType() and not isRelevantType(t)) } - int accessPathLimit() { result = 2 } + predicate accessPathLimit = SummaryModelGeneratorInput::contentAccessPathLimit/0; + + predicate accessPathLimitInternal = + SummaryModelGeneratorInput::contentAccessPathLimitInternal/0; predicate isRelevantContent(DataFlow::ContentSet s) { isRelevantContent0(s) } @@ -703,14 +716,17 @@ module MakeModelGeneratorFactory< } /** - * Holds if the access path `ap` is not a parameter or returnvalue of a callback - * stored in a field. + * Holds if `ap` is valid for generating summary models. * - * That is, we currently don't include summaries that rely on parameters or return values - * of callbacks stored in fields. + * We currently don't include summaries that rely on parameters or return values + * of callbacks stored in fields, as those are not supported by the data flow + * library. + * + * We also exclude access paths with contents not supported by `printContent`. */ private predicate validateAccessPath(PropagateContentFlow::AccessPath ap) { - not (mentionsField(ap) and mentionsCallback(ap)) + not (mentionsField(ap) and mentionsCallback(ap)) and + forall(int i | i in [0 .. ap.length() - 1] | exists(getContent(ap, i))) } private predicate apiFlow( @@ -720,7 +736,9 @@ module MakeModelGeneratorFactory< ) { PropagateContentFlow::flow(p, reads, returnNodeExt, stores, preservesValue) and getEnclosingCallable(returnNodeExt) = api and - getEnclosingCallable(p) = api + getEnclosingCallable(p) = api and + validateAccessPath(reads) and + validateAccessPath(stores) } /** @@ -763,9 +781,7 @@ module MakeModelGeneratorFactory< PropagateContentFlow::AccessPath reads, ReturnNodeExt returnNodeExt, PropagateContentFlow::AccessPath stores, boolean preservesValue ) { - PropagateContentFlow::flow(p, reads, returnNodeExt, stores, preservesValue) and - getEnclosingCallable(returnNodeExt) = api and - getEnclosingCallable(p) = api and + apiFlow(api, p, reads, returnNodeExt, stores, preservesValue) and p = api.getARelevantParameterNode() } @@ -956,8 +972,6 @@ module MakeModelGeneratorFactory< input = parameterNodeAsExactInput(p) + printReadAccessPath(reads) and output = getExactOutput(returnNodeExt) + printStoreAccessPath(stores) and input != output and - validateAccessPath(reads) and - validateAccessPath(stores) and ( if mentionsField(reads) or mentionsField(stores) then lift = false and api.isRelevant() diff --git a/shared/mad/qlpack.yml b/shared/mad/qlpack.yml index 579802e08f3..a0429dd8ea0 100644 --- a/shared/mad/qlpack.yml +++ b/shared/mad/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/mad -version: 1.0.36-dev +version: 1.0.38-dev groups: shared library: true dependencies: diff --git a/shared/quantum/CHANGELOG.md b/shared/quantum/CHANGELOG.md index 29ece641a7e..4f4b3189bb4 100644 --- a/shared/quantum/CHANGELOG.md +++ b/shared/quantum/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.0.15 + +No user-facing changes. + +## 0.0.14 + +No user-facing changes. + ## 0.0.13 No user-facing changes. diff --git a/shared/quantum/change-notes/released/0.0.14.md b/shared/quantum/change-notes/released/0.0.14.md new file mode 100644 index 00000000000..63b4d50ca45 --- /dev/null +++ b/shared/quantum/change-notes/released/0.0.14.md @@ -0,0 +1,3 @@ +## 0.0.14 + +No user-facing changes. diff --git a/shared/quantum/change-notes/released/0.0.15.md b/shared/quantum/change-notes/released/0.0.15.md new file mode 100644 index 00000000000..7af9c05f23f --- /dev/null +++ b/shared/quantum/change-notes/released/0.0.15.md @@ -0,0 +1,3 @@ +## 0.0.15 + +No user-facing changes. diff --git a/shared/quantum/codeql-pack.release.yml b/shared/quantum/codeql-pack.release.yml index 044e54e4f7e..dff35216fc6 100644 --- a/shared/quantum/codeql-pack.release.yml +++ b/shared/quantum/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.13 +lastReleaseVersion: 0.0.15 diff --git a/shared/quantum/qlpack.yml b/shared/quantum/qlpack.yml index bd398ce4e03..aabdb5f63ea 100644 --- a/shared/quantum/qlpack.yml +++ b/shared/quantum/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/quantum -version: 0.0.14-dev +version: 0.0.16-dev groups: shared library: true dependencies: diff --git a/shared/rangeanalysis/CHANGELOG.md b/shared/rangeanalysis/CHANGELOG.md index f433c424cfe..99a7f790327 100644 --- a/shared/rangeanalysis/CHANGELOG.md +++ b/shared/rangeanalysis/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.0.37 + +No user-facing changes. + +## 1.0.36 + +No user-facing changes. + ## 1.0.35 No user-facing changes. diff --git a/shared/rangeanalysis/change-notes/released/1.0.36.md b/shared/rangeanalysis/change-notes/released/1.0.36.md new file mode 100644 index 00000000000..6cefe97d8b8 --- /dev/null +++ b/shared/rangeanalysis/change-notes/released/1.0.36.md @@ -0,0 +1,3 @@ +## 1.0.36 + +No user-facing changes. diff --git a/shared/rangeanalysis/change-notes/released/1.0.37.md b/shared/rangeanalysis/change-notes/released/1.0.37.md new file mode 100644 index 00000000000..505bacf104d --- /dev/null +++ b/shared/rangeanalysis/change-notes/released/1.0.37.md @@ -0,0 +1,3 @@ +## 1.0.37 + +No user-facing changes. diff --git a/shared/rangeanalysis/codeql-pack.release.yml b/shared/rangeanalysis/codeql-pack.release.yml index 9493cf42a28..9ad62b33247 100644 --- a/shared/rangeanalysis/codeql-pack.release.yml +++ b/shared/rangeanalysis/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.35 +lastReleaseVersion: 1.0.37 diff --git a/shared/rangeanalysis/qlpack.yml b/shared/rangeanalysis/qlpack.yml index 1483733e8e3..66c25d137f0 100644 --- a/shared/rangeanalysis/qlpack.yml +++ b/shared/rangeanalysis/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rangeanalysis -version: 1.0.36-dev +version: 1.0.38-dev groups: shared library: true dependencies: diff --git a/shared/regex/CHANGELOG.md b/shared/regex/CHANGELOG.md index 69cf5cdad0e..bfca1c264b2 100644 --- a/shared/regex/CHANGELOG.md +++ b/shared/regex/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.0.37 + +No user-facing changes. + +## 1.0.36 + +No user-facing changes. + ## 1.0.35 No user-facing changes. diff --git a/shared/regex/change-notes/released/1.0.36.md b/shared/regex/change-notes/released/1.0.36.md new file mode 100644 index 00000000000..6cefe97d8b8 --- /dev/null +++ b/shared/regex/change-notes/released/1.0.36.md @@ -0,0 +1,3 @@ +## 1.0.36 + +No user-facing changes. diff --git a/shared/regex/change-notes/released/1.0.37.md b/shared/regex/change-notes/released/1.0.37.md new file mode 100644 index 00000000000..505bacf104d --- /dev/null +++ b/shared/regex/change-notes/released/1.0.37.md @@ -0,0 +1,3 @@ +## 1.0.37 + +No user-facing changes. diff --git a/shared/regex/codeql-pack.release.yml b/shared/regex/codeql-pack.release.yml index 9493cf42a28..9ad62b33247 100644 --- a/shared/regex/codeql-pack.release.yml +++ b/shared/regex/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.35 +lastReleaseVersion: 1.0.37 diff --git a/shared/regex/qlpack.yml b/shared/regex/qlpack.yml index 8d95fbccbda..addf0bb8af6 100644 --- a/shared/regex/qlpack.yml +++ b/shared/regex/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/regex -version: 1.0.36-dev +version: 1.0.38-dev groups: shared library: true dependencies: diff --git a/shared/ssa/CHANGELOG.md b/shared/ssa/CHANGELOG.md index 5cbc5a2ebca..46a9b5f6985 100644 --- a/shared/ssa/CHANGELOG.md +++ b/shared/ssa/CHANGELOG.md @@ -1,3 +1,11 @@ +## 2.0.13 + +No user-facing changes. + +## 2.0.12 + +No user-facing changes. + ## 2.0.11 No user-facing changes. diff --git a/shared/ssa/change-notes/released/2.0.12.md b/shared/ssa/change-notes/released/2.0.12.md new file mode 100644 index 00000000000..c93809466de --- /dev/null +++ b/shared/ssa/change-notes/released/2.0.12.md @@ -0,0 +1,3 @@ +## 2.0.12 + +No user-facing changes. diff --git a/shared/ssa/change-notes/released/2.0.13.md b/shared/ssa/change-notes/released/2.0.13.md new file mode 100644 index 00000000000..39a24682b50 --- /dev/null +++ b/shared/ssa/change-notes/released/2.0.13.md @@ -0,0 +1,3 @@ +## 2.0.13 + +No user-facing changes. diff --git a/shared/ssa/codeql-pack.release.yml b/shared/ssa/codeql-pack.release.yml index 3cbe73b4cad..30d169d6eb8 100644 --- a/shared/ssa/codeql-pack.release.yml +++ b/shared/ssa/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.11 +lastReleaseVersion: 2.0.13 diff --git a/shared/ssa/qlpack.yml b/shared/ssa/qlpack.yml index 4fa7f6e6422..5271eda059b 100644 --- a/shared/ssa/qlpack.yml +++ b/shared/ssa/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ssa -version: 2.0.12-dev +version: 2.0.14-dev groups: shared library: true dependencies: diff --git a/shared/threat-models/CHANGELOG.md b/shared/threat-models/CHANGELOG.md index c27711a0c4c..b4d2815a622 100644 --- a/shared/threat-models/CHANGELOG.md +++ b/shared/threat-models/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.0.37 + +No user-facing changes. + +## 1.0.36 + +No user-facing changes. + ## 1.0.35 No user-facing changes. diff --git a/shared/threat-models/change-notes/released/1.0.36.md b/shared/threat-models/change-notes/released/1.0.36.md new file mode 100644 index 00000000000..6cefe97d8b8 --- /dev/null +++ b/shared/threat-models/change-notes/released/1.0.36.md @@ -0,0 +1,3 @@ +## 1.0.36 + +No user-facing changes. diff --git a/shared/threat-models/change-notes/released/1.0.37.md b/shared/threat-models/change-notes/released/1.0.37.md new file mode 100644 index 00000000000..505bacf104d --- /dev/null +++ b/shared/threat-models/change-notes/released/1.0.37.md @@ -0,0 +1,3 @@ +## 1.0.37 + +No user-facing changes. diff --git a/shared/threat-models/codeql-pack.release.yml b/shared/threat-models/codeql-pack.release.yml index 9493cf42a28..9ad62b33247 100644 --- a/shared/threat-models/codeql-pack.release.yml +++ b/shared/threat-models/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.35 +lastReleaseVersion: 1.0.37 diff --git a/shared/threat-models/qlpack.yml b/shared/threat-models/qlpack.yml index 33680c17c7a..35beca0110a 100644 --- a/shared/threat-models/qlpack.yml +++ b/shared/threat-models/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/threat-models -version: 1.0.36-dev +version: 1.0.38-dev library: true groups: shared dataExtensions: diff --git a/shared/tutorial/CHANGELOG.md b/shared/tutorial/CHANGELOG.md index 33db936cccc..2760cd1f529 100644 --- a/shared/tutorial/CHANGELOG.md +++ b/shared/tutorial/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.0.37 + +No user-facing changes. + +## 1.0.36 + +No user-facing changes. + ## 1.0.35 No user-facing changes. diff --git a/shared/tutorial/change-notes/released/1.0.36.md b/shared/tutorial/change-notes/released/1.0.36.md new file mode 100644 index 00000000000..6cefe97d8b8 --- /dev/null +++ b/shared/tutorial/change-notes/released/1.0.36.md @@ -0,0 +1,3 @@ +## 1.0.36 + +No user-facing changes. diff --git a/shared/tutorial/change-notes/released/1.0.37.md b/shared/tutorial/change-notes/released/1.0.37.md new file mode 100644 index 00000000000..505bacf104d --- /dev/null +++ b/shared/tutorial/change-notes/released/1.0.37.md @@ -0,0 +1,3 @@ +## 1.0.37 + +No user-facing changes. diff --git a/shared/tutorial/codeql-pack.release.yml b/shared/tutorial/codeql-pack.release.yml index 9493cf42a28..9ad62b33247 100644 --- a/shared/tutorial/codeql-pack.release.yml +++ b/shared/tutorial/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.35 +lastReleaseVersion: 1.0.37 diff --git a/shared/tutorial/qlpack.yml b/shared/tutorial/qlpack.yml index 225922fa95a..c6ca9c2088e 100644 --- a/shared/tutorial/qlpack.yml +++ b/shared/tutorial/qlpack.yml @@ -1,7 +1,7 @@ name: codeql/tutorial description: Library for the CodeQL detective tutorials, helping new users learn to write CodeQL queries. -version: 1.0.36-dev +version: 1.0.38-dev groups: shared library: true warnOnImplicitThis: true diff --git a/shared/typeflow/CHANGELOG.md b/shared/typeflow/CHANGELOG.md index 04ce591c7d2..2fc9a954f23 100644 --- a/shared/typeflow/CHANGELOG.md +++ b/shared/typeflow/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.0.37 + +No user-facing changes. + +## 1.0.36 + +No user-facing changes. + ## 1.0.35 No user-facing changes. diff --git a/shared/typeflow/change-notes/released/1.0.36.md b/shared/typeflow/change-notes/released/1.0.36.md new file mode 100644 index 00000000000..6cefe97d8b8 --- /dev/null +++ b/shared/typeflow/change-notes/released/1.0.36.md @@ -0,0 +1,3 @@ +## 1.0.36 + +No user-facing changes. diff --git a/shared/typeflow/change-notes/released/1.0.37.md b/shared/typeflow/change-notes/released/1.0.37.md new file mode 100644 index 00000000000..505bacf104d --- /dev/null +++ b/shared/typeflow/change-notes/released/1.0.37.md @@ -0,0 +1,3 @@ +## 1.0.37 + +No user-facing changes. diff --git a/shared/typeflow/codeql-pack.release.yml b/shared/typeflow/codeql-pack.release.yml index 9493cf42a28..9ad62b33247 100644 --- a/shared/typeflow/codeql-pack.release.yml +++ b/shared/typeflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.35 +lastReleaseVersion: 1.0.37 diff --git a/shared/typeflow/qlpack.yml b/shared/typeflow/qlpack.yml index baec0554bd8..f474a085b54 100644 --- a/shared/typeflow/qlpack.yml +++ b/shared/typeflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typeflow -version: 1.0.36-dev +version: 1.0.38-dev groups: shared library: true dependencies: diff --git a/shared/typeinference/CHANGELOG.md b/shared/typeinference/CHANGELOG.md index 28235d47f61..172f2ee2b29 100644 --- a/shared/typeinference/CHANGELOG.md +++ b/shared/typeinference/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.0.18 + +No user-facing changes. + +## 0.0.17 + +No user-facing changes. + ## 0.0.16 No user-facing changes. diff --git a/shared/typeinference/change-notes/released/0.0.17.md b/shared/typeinference/change-notes/released/0.0.17.md new file mode 100644 index 00000000000..62cc89030a6 --- /dev/null +++ b/shared/typeinference/change-notes/released/0.0.17.md @@ -0,0 +1,3 @@ +## 0.0.17 + +No user-facing changes. diff --git a/shared/typeinference/change-notes/released/0.0.18.md b/shared/typeinference/change-notes/released/0.0.18.md new file mode 100644 index 00000000000..86c60b8abe7 --- /dev/null +++ b/shared/typeinference/change-notes/released/0.0.18.md @@ -0,0 +1,3 @@ +## 0.0.18 + +No user-facing changes. diff --git a/shared/typeinference/codeql-pack.release.yml b/shared/typeinference/codeql-pack.release.yml index a49f7be4cff..a0d2bc59d97 100644 --- a/shared/typeinference/codeql-pack.release.yml +++ b/shared/typeinference/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.16 +lastReleaseVersion: 0.0.18 diff --git a/shared/typeinference/codeql/typeinference/internal/TypeInference.qll b/shared/typeinference/codeql/typeinference/internal/TypeInference.qll index 7669c252c78..bf107c7d3f5 100644 --- a/shared/typeinference/codeql/typeinference/internal/TypeInference.qll +++ b/shared/typeinference/codeql/typeinference/internal/TypeInference.qll @@ -580,7 +580,7 @@ module Make1 Input1> { } pragma[nomagic] - private predicate satisfiesConcreteTypesFromIndex( + private predicate satisfiesConcreteTypesToIndex( App app, TypeAbstraction abs, Constraint constraint, int i ) { exists(Type t, TypePath path | @@ -588,13 +588,13 @@ module Make1 Input1> { if t = abs.getATypeParameter() then any() else app.getTypeAt(path) = t ) and // Recurse unless we are at the first path - if i = 0 then any() else satisfiesConcreteTypesFromIndex(app, abs, constraint, i - 1) + if i = 0 then any() else satisfiesConcreteTypesToIndex(app, abs, constraint, i - 1) } /** Holds if all the concrete types in `constraint` also occur in `app`. */ pragma[nomagic] private predicate satisfiesConcreteTypes(App app, TypeAbstraction abs, Constraint constraint) { - satisfiesConcreteTypesFromIndex(app, abs, constraint, + satisfiesConcreteTypesToIndex(app, abs, constraint, max(int i | exists(getNthPath(constraint, i)))) } @@ -622,7 +622,7 @@ module Make1 Input1> { } pragma[nomagic] - private predicate typeParametersEqualFromIndexBase( + private predicate typeParametersEqualToIndexBase( App app, TypeAbstraction abs, Constraint constraint, TypeParameter tp, TypePath path ) { path = getNthTypeParameterPath(constraint, tp, 0) and @@ -632,15 +632,15 @@ module Make1 Input1> { } pragma[nomagic] - private predicate typeParametersEqualFromIndex( + private predicate typeParametersEqualToIndex( App app, TypeAbstraction abs, Constraint constraint, TypeParameter tp, Type t, int i ) { exists(TypePath path | t = app.getTypeAt(path) and if i = 0 - then typeParametersEqualFromIndexBase(app, abs, constraint, tp, path) + then typeParametersEqualToIndexBase(app, abs, constraint, tp, path) else ( - typeParametersEqualFromIndex(app, abs, constraint, tp, t, i - 1) and + typeParametersEqualToIndex(app, abs, constraint, tp, t, i - 1) and path = getNthTypeParameterPath(constraint, tp, i) ) ) @@ -657,19 +657,19 @@ module Make1 Input1> { exists(int n | n = max(int i | exists(getNthTypeParameterPath(constraint, tp, i))) | // If the largest index is 0, then there are no equalities to check as // the type parameter only occurs once. - if n = 0 then any() else typeParametersEqualFromIndex(app, abs, constraint, tp, _, n) + if n = 0 then any() else typeParametersEqualToIndex(app, abs, constraint, tp, _, n) ) ) } - private predicate typeParametersHaveEqualInstantiationFromIndex( + private predicate typeParametersHaveEqualInstantiationToIndex( App app, TypeAbstraction abs, Constraint constraint, int i ) { exists(TypeParameter tp | tp = getNthTypeParameter(abs, i) | typeParametersEqual(app, abs, constraint, tp) and if i = 0 then any() - else typeParametersHaveEqualInstantiationFromIndex(app, abs, constraint, i - 1) + else typeParametersHaveEqualInstantiationToIndex(app, abs, constraint, i - 1) ) } @@ -699,7 +699,7 @@ module Make1 Input1> { not exists(getNthTypeParameter(abs, _)) or exists(int n | n = max(int i | exists(getNthTypeParameter(abs, i))) | - typeParametersHaveEqualInstantiationFromIndex(app, abs, constraint, n) + typeParametersHaveEqualInstantiationToIndex(app, abs, constraint, n) ) ) } diff --git a/shared/typeinference/qlpack.yml b/shared/typeinference/qlpack.yml index 4bd6beec446..fb32a3f11f2 100644 --- a/shared/typeinference/qlpack.yml +++ b/shared/typeinference/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typeinference -version: 0.0.17-dev +version: 0.0.19-dev groups: shared library: true dependencies: diff --git a/shared/typetracking/CHANGELOG.md b/shared/typetracking/CHANGELOG.md index 0d3ff4a1df1..52da09238e5 100644 --- a/shared/typetracking/CHANGELOG.md +++ b/shared/typetracking/CHANGELOG.md @@ -1,3 +1,11 @@ +## 2.0.21 + +No user-facing changes. + +## 2.0.20 + +No user-facing changes. + ## 2.0.19 No user-facing changes. diff --git a/shared/typetracking/change-notes/released/2.0.20.md b/shared/typetracking/change-notes/released/2.0.20.md new file mode 100644 index 00000000000..6756bd5f6c1 --- /dev/null +++ b/shared/typetracking/change-notes/released/2.0.20.md @@ -0,0 +1,3 @@ +## 2.0.20 + +No user-facing changes. diff --git a/shared/typetracking/change-notes/released/2.0.21.md b/shared/typetracking/change-notes/released/2.0.21.md new file mode 100644 index 00000000000..bdc5029b70b --- /dev/null +++ b/shared/typetracking/change-notes/released/2.0.21.md @@ -0,0 +1,3 @@ +## 2.0.21 + +No user-facing changes. diff --git a/shared/typetracking/codeql-pack.release.yml b/shared/typetracking/codeql-pack.release.yml index 4aecf1e1f86..a572e88bffd 100644 --- a/shared/typetracking/codeql-pack.release.yml +++ b/shared/typetracking/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.19 +lastReleaseVersion: 2.0.21 diff --git a/shared/typetracking/qlpack.yml b/shared/typetracking/qlpack.yml index bd32acdd76e..5b9eac9fed3 100644 --- a/shared/typetracking/qlpack.yml +++ b/shared/typetracking/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typetracking -version: 2.0.20-dev +version: 2.0.22-dev groups: shared library: true dependencies: diff --git a/shared/typos/CHANGELOG.md b/shared/typos/CHANGELOG.md index e38e1645eb5..bfc79532079 100644 --- a/shared/typos/CHANGELOG.md +++ b/shared/typos/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.0.37 + +No user-facing changes. + +## 1.0.36 + +No user-facing changes. + ## 1.0.35 No user-facing changes. diff --git a/shared/typos/change-notes/released/1.0.36.md b/shared/typos/change-notes/released/1.0.36.md new file mode 100644 index 00000000000..6cefe97d8b8 --- /dev/null +++ b/shared/typos/change-notes/released/1.0.36.md @@ -0,0 +1,3 @@ +## 1.0.36 + +No user-facing changes. diff --git a/shared/typos/change-notes/released/1.0.37.md b/shared/typos/change-notes/released/1.0.37.md new file mode 100644 index 00000000000..505bacf104d --- /dev/null +++ b/shared/typos/change-notes/released/1.0.37.md @@ -0,0 +1,3 @@ +## 1.0.37 + +No user-facing changes. diff --git a/shared/typos/codeql-pack.release.yml b/shared/typos/codeql-pack.release.yml index 9493cf42a28..9ad62b33247 100644 --- a/shared/typos/codeql-pack.release.yml +++ b/shared/typos/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.35 +lastReleaseVersion: 1.0.37 diff --git a/shared/typos/qlpack.yml b/shared/typos/qlpack.yml index 752d11a2bc8..074a90c7d5c 100644 --- a/shared/typos/qlpack.yml +++ b/shared/typos/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typos -version: 1.0.36-dev +version: 1.0.38-dev groups: shared library: true warnOnImplicitThis: true diff --git a/shared/util/CHANGELOG.md b/shared/util/CHANGELOG.md index 13de50b7321..e3ff0ae2f34 100644 --- a/shared/util/CHANGELOG.md +++ b/shared/util/CHANGELOG.md @@ -1,3 +1,11 @@ +## 2.0.24 + +No user-facing changes. + +## 2.0.23 + +No user-facing changes. + ## 2.0.22 No user-facing changes. diff --git a/shared/util/change-notes/released/2.0.23.md b/shared/util/change-notes/released/2.0.23.md new file mode 100644 index 00000000000..ab6f6f171ed --- /dev/null +++ b/shared/util/change-notes/released/2.0.23.md @@ -0,0 +1,3 @@ +## 2.0.23 + +No user-facing changes. diff --git a/shared/util/change-notes/released/2.0.24.md b/shared/util/change-notes/released/2.0.24.md new file mode 100644 index 00000000000..6547901c334 --- /dev/null +++ b/shared/util/change-notes/released/2.0.24.md @@ -0,0 +1,3 @@ +## 2.0.24 + +No user-facing changes. diff --git a/shared/util/codeql-pack.release.yml b/shared/util/codeql-pack.release.yml index 980bdfe195b..1460df314d5 100644 --- a/shared/util/codeql-pack.release.yml +++ b/shared/util/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.22 +lastReleaseVersion: 2.0.24 diff --git a/shared/util/qlpack.yml b/shared/util/qlpack.yml index 47b84b65ff2..56307bd090e 100644 --- a/shared/util/qlpack.yml +++ b/shared/util/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/util -version: 2.0.23-dev +version: 2.0.25-dev groups: shared library: true dependencies: null diff --git a/shared/xml/CHANGELOG.md b/shared/xml/CHANGELOG.md index 25cba5db417..a196b41e650 100644 --- a/shared/xml/CHANGELOG.md +++ b/shared/xml/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.0.37 + +No user-facing changes. + +## 1.0.36 + +No user-facing changes. + ## 1.0.35 No user-facing changes. diff --git a/shared/xml/change-notes/released/1.0.36.md b/shared/xml/change-notes/released/1.0.36.md new file mode 100644 index 00000000000..6cefe97d8b8 --- /dev/null +++ b/shared/xml/change-notes/released/1.0.36.md @@ -0,0 +1,3 @@ +## 1.0.36 + +No user-facing changes. diff --git a/shared/xml/change-notes/released/1.0.37.md b/shared/xml/change-notes/released/1.0.37.md new file mode 100644 index 00000000000..505bacf104d --- /dev/null +++ b/shared/xml/change-notes/released/1.0.37.md @@ -0,0 +1,3 @@ +## 1.0.37 + +No user-facing changes. diff --git a/shared/xml/codeql-pack.release.yml b/shared/xml/codeql-pack.release.yml index 9493cf42a28..9ad62b33247 100644 --- a/shared/xml/codeql-pack.release.yml +++ b/shared/xml/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.35 +lastReleaseVersion: 1.0.37 diff --git a/shared/xml/qlpack.yml b/shared/xml/qlpack.yml index 744b7a72909..129a49f7d4f 100644 --- a/shared/xml/qlpack.yml +++ b/shared/xml/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/xml -version: 1.0.36-dev +version: 1.0.38-dev groups: shared library: true dependencies: diff --git a/shared/yaml/CHANGELOG.md b/shared/yaml/CHANGELOG.md index daf8d92d00a..4a595f06ff9 100644 --- a/shared/yaml/CHANGELOG.md +++ b/shared/yaml/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.0.37 + +No user-facing changes. + +## 1.0.36 + +No user-facing changes. + ## 1.0.35 No user-facing changes. diff --git a/shared/yaml/change-notes/released/1.0.36.md b/shared/yaml/change-notes/released/1.0.36.md new file mode 100644 index 00000000000..6cefe97d8b8 --- /dev/null +++ b/shared/yaml/change-notes/released/1.0.36.md @@ -0,0 +1,3 @@ +## 1.0.36 + +No user-facing changes. diff --git a/shared/yaml/change-notes/released/1.0.37.md b/shared/yaml/change-notes/released/1.0.37.md new file mode 100644 index 00000000000..505bacf104d --- /dev/null +++ b/shared/yaml/change-notes/released/1.0.37.md @@ -0,0 +1,3 @@ +## 1.0.37 + +No user-facing changes. diff --git a/shared/yaml/codeql-pack.release.yml b/shared/yaml/codeql-pack.release.yml index 9493cf42a28..9ad62b33247 100644 --- a/shared/yaml/codeql-pack.release.yml +++ b/shared/yaml/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.35 +lastReleaseVersion: 1.0.37 diff --git a/shared/yaml/qlpack.yml b/shared/yaml/qlpack.yml index f905e7abee4..1785f83701c 100644 --- a/shared/yaml/qlpack.yml +++ b/shared/yaml/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/yaml -version: 1.0.36-dev +version: 1.0.38-dev groups: shared library: true warnOnImplicitThis: true diff --git a/swift/logging/Formatters.h b/swift/logging/Formatters.h deleted file mode 100644 index 9dc003b9ffe..00000000000 --- a/swift/logging/Formatters.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once - -// Provides formatters for standard library types to be used with fmtlib. -// TODO: Patch fmtlib to support using `fmt/std.h` without RTTI -// (https://github.com/fmtlib/fmt/issues/3170). - -#include -#include -#include - -namespace fmt { -FMT_FORMAT_AS(std::filesystem::path, std::string); -} - -template <> -struct fmt::formatter : fmt::formatter { - auto format(const std::error_code& e, format_context& ctx) const { - return fmt::formatter::format(e.message(), ctx); - } -}; diff --git a/swift/logging/SwiftLogging.h b/swift/logging/SwiftLogging.h index e94ceb0f6f8..16275858203 100644 --- a/swift/logging/SwiftLogging.h +++ b/swift/logging/SwiftLogging.h @@ -8,8 +8,7 @@ #include #include - -#include "swift/logging/Formatters.h" +#include #include #include diff --git a/swift/ql/lib/CHANGELOG.md b/swift/ql/lib/CHANGELOG.md index a1224ca4a8c..bcf798b73d4 100644 --- a/swift/ql/lib/CHANGELOG.md +++ b/swift/ql/lib/CHANGELOG.md @@ -1,3 +1,11 @@ +## 6.1.2 + +No user-facing changes. + +## 6.1.1 + +No user-facing changes. + ## 6.1.0 ### Major Analysis Improvements diff --git a/swift/ql/lib/change-notes/released/6.1.1.md b/swift/ql/lib/change-notes/released/6.1.1.md new file mode 100644 index 00000000000..c23a3b809a5 --- /dev/null +++ b/swift/ql/lib/change-notes/released/6.1.1.md @@ -0,0 +1,3 @@ +## 6.1.1 + +No user-facing changes. diff --git a/swift/ql/lib/change-notes/released/6.1.2.md b/swift/ql/lib/change-notes/released/6.1.2.md new file mode 100644 index 00000000000..8e41b366dab --- /dev/null +++ b/swift/ql/lib/change-notes/released/6.1.2.md @@ -0,0 +1,3 @@ +## 6.1.2 + +No user-facing changes. diff --git a/swift/ql/lib/codeql-pack.release.yml b/swift/ql/lib/codeql-pack.release.yml index 22247782f3e..8a2b5999dee 100644 --- a/swift/ql/lib/codeql-pack.release.yml +++ b/swift/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 6.1.0 +lastReleaseVersion: 6.1.2 diff --git a/swift/ql/lib/codeql/swift/security/CleartextTransmissionExtensions.qll b/swift/ql/lib/codeql/swift/security/CleartextTransmissionExtensions.qll index 4b31a7ab23f..03d8dff3148 100644 --- a/swift/ql/lib/codeql/swift/security/CleartextTransmissionExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/CleartextTransmissionExtensions.qll @@ -87,7 +87,7 @@ private class UrlTransmittedSink extends CleartextTransmissionSink { // exclude `tel:` and similar URLs. These URLs necessarily contain // sensitive data which you expect to transmit only by making the // phone call (or similar operation). - not ExcludeUrlFlow::flow(_, this) + not ExcludeUrlFlow::flowTo(this) } } diff --git a/swift/ql/lib/qlpack.yml b/swift/ql/lib/qlpack.yml index a35a1836ed1..a47b2056aea 100644 --- a/swift/ql/lib/qlpack.yml +++ b/swift/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/swift-all -version: 6.1.1-dev +version: 6.1.3-dev groups: swift extractor: swift dbscheme: swift.dbscheme diff --git a/swift/ql/src/CHANGELOG.md b/swift/ql/src/CHANGELOG.md index ac02b32dc56..b019c583059 100644 --- a/swift/ql/src/CHANGELOG.md +++ b/swift/ql/src/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.2.11 + +No user-facing changes. + +## 1.2.10 + +No user-facing changes. + ## 1.2.9 No user-facing changes. diff --git a/swift/ql/src/change-notes/released/1.2.10.md b/swift/ql/src/change-notes/released/1.2.10.md new file mode 100644 index 00000000000..d86ede66f5b --- /dev/null +++ b/swift/ql/src/change-notes/released/1.2.10.md @@ -0,0 +1,3 @@ +## 1.2.10 + +No user-facing changes. diff --git a/swift/ql/src/change-notes/released/1.2.11.md b/swift/ql/src/change-notes/released/1.2.11.md new file mode 100644 index 00000000000..f7a45eaa8d7 --- /dev/null +++ b/swift/ql/src/change-notes/released/1.2.11.md @@ -0,0 +1,3 @@ +## 1.2.11 + +No user-facing changes. diff --git a/swift/ql/src/codeql-pack.release.yml b/swift/ql/src/codeql-pack.release.yml index 96443e87f0d..4bbe68e3fc0 100644 --- a/swift/ql/src/codeql-pack.release.yml +++ b/swift/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.2.9 +lastReleaseVersion: 1.2.11 diff --git a/swift/ql/src/qlpack.yml b/swift/ql/src/qlpack.yml index d7584e3ed16..56ad421ffac 100644 --- a/swift/ql/src/qlpack.yml +++ b/swift/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/swift-queries -version: 1.2.10-dev +version: 1.2.12-dev groups: - swift - queries