diff --git a/.gitattributes b/.gitattributes index 215fe0b81e18..df5bed028be1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -86,4 +86,5 @@ /misc/ripunzip/ripunzip-* filter=lfs diff=lfs merge=lfs -text # swift prebuilt resources -/swift/third_party/resource-dir/*.zip filter=lfs diff=lfs merge=lfs -text +/swift/third_party/resources/*.zip filter=lfs diff=lfs merge=lfs -text +/swift/third_party/resources/*.tar.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 265fbbe27172..d40376149f7f 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -50,17 +50,10 @@ jobs: - uses: ./swift/actions/build-and-test build-and-test-linux: if: github.repository_owner == 'github' - runs-on: ubuntu-latest-xl + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - uses: ./swift/actions/build-and-test - qltests-linux: - if: github.repository_owner == 'github' - needs: build-and-test-linux - runs-on: ubuntu-latest-xl - steps: - - uses: actions/checkout@v4 - - uses: ./swift/actions/run-ql-tests qltests-macos: if: ${{ github.repository_owner == 'github' && github.event_name == 'pull_request' }} needs: build-and-test-macos @@ -109,3 +102,10 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/fetch-codeql - uses: ./swift/actions/database-upgrade-scripts + check-no-override: + if : github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - shell: bash + run: bazel test //swift/... --test_tag_filters=override --test_output=errors diff --git a/MODULE.bazel b/MODULE.bazel index d2ae279af602..ca0bbd37f735 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -29,6 +29,7 @@ bazel_dep(name = "gazelle", version = "0.40.0") bazel_dep(name = "rules_dotnet", version = "0.17.4") bazel_dep(name = "googletest", version = "1.14.0.bcr.1") bazel_dep(name = "rules_rust", version = "0.52.2") +bazel_dep(name = "zstd", version = "1.5.5.bcr.1") bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True) @@ -95,10 +96,12 @@ use_repo( swift_deps, "binlog", "picosha2", - "swift_prebuilt_darwin_x86_64", - "swift_prebuilt_linux", - "swift_toolchain_linux", - "swift_toolchain_macos", + "swift-prebuilt-linux", + "swift-prebuilt-linux-download-only", + "swift-prebuilt-macos", + "swift-prebuilt-macos-download-only", + "swift-resource-dir-linux", + "swift-resource-dir-macos", ) node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") @@ -190,16 +193,6 @@ lfs_files( executable = True, ) -lfs_files( - name = "swift-resource-dir-linux", - srcs = ["//swift/third_party/resource-dir:resource-dir-linux.zip"], -) - -lfs_files( - name = "swift-resource-dir-macos", - srcs = ["//swift/third_party/resource-dir:resource-dir-macos.zip"], -) - register_toolchains( "@nodejs_toolchains//:all", ) diff --git a/misc/bazel/lfs.bzl b/misc/bazel/lfs.bzl index 7c37c0a55236..daba8331dc36 100644 --- a/misc/bazel/lfs.bzl +++ b/misc/bazel/lfs.bzl @@ -77,6 +77,12 @@ def _download_lfs(repository_ctx): ) repository_ctx.file("BUILD.bazel", build) + # this is for drop-in compatibility with `http_file` + repository_ctx.file( + "file/BUILD.bazel", + 'alias(name = "file", actual = "//:%s", visibility = ["//visibility:public"])\n' % name, + ) + lfs_archive = repository_rule( doc = "Export the contents from an on-demand LFS archive. The corresponding path should be added to be ignored " + "in `.lfsconfig`.", diff --git a/swift/BUILD.bazel b/swift/BUILD.bazel index 444730950bef..dc85033f76fd 100644 --- a/swift/BUILD.bazel +++ b/swift/BUILD.bazel @@ -1,5 +1,4 @@ load("@rules_pkg//pkg:mappings.bzl", "pkg_filegroup") -load("//:defs.bzl", "codeql_platform") load( "//misc/bazel:pkg.bzl", "codeql_pack", @@ -81,7 +80,7 @@ codeql_pack( zips = select({ "@platforms//os:windows": {}, "//conditions:default": { - "//swift/third_party/resource-dir": "resource-dir/{CODEQL_PLATFORM}", + "//swift/third_party/resources:dir": "resource-dir/{CODEQL_PLATFORM}", }, }), ) @@ -90,29 +89,3 @@ alias( name = "create-extractor-pack", actual = ":swift-installer", ) - -# TODO: following rules are for internal repo backward compatibility only -alias( - name = "extractor-pack-generic", - actual = "swift-generic", - visibility = ["//visibility:public"], -) - -pkg_filegroup( - name = "resource-dir", - srcs = select({ - "@platforms//os:linux": ["@swift_toolchain_linux//:resource-dir-files"], - "@platforms//os:macos": ["@swift_toolchain_macos//:resource-dir-files"], - "@platforms//os:windows": [], - }), - prefix = "resource-dir/" + codeql_platform, -) - -pkg_filegroup( - name = "extractor-pack-arch", - srcs = [ - ":resource-dir", - ":swift-arch", - ], - visibility = ["//visibility:public"], -) diff --git a/swift/README.md b/swift/README.md index b5be374b5e70..db50108e2ca6 100644 --- a/swift/README.md +++ b/swift/README.md @@ -113,3 +113,8 @@ In particular for breakpoints to work you might need to setup the following remo ### Thread safety The extractor is single-threaded, and there was no effort to make anything in it thread-safe. + +### Updating the swift compiler version + +This can only be done with access to the internal repository at the moment. Some (incomplete) instructions are +found [here](third_party/resources/updating.md). diff --git a/swift/actions/build-and-test/action.yml b/swift/actions/build-and-test/action.yml index 4048560640b2..b1683680fcea 100644 --- a/swift/actions/build-and-test/action.yml +++ b/swift/actions/build-and-test/action.yml @@ -58,7 +58,7 @@ runs: if: ${{ github.event_name == 'pull_request' }} shell: bash run: | - bazel test //swift/... + bazel test //swift/... --test_tag_filters=-override --test_output=errors - name: Evict bazel cache if: ${{ github.event_name != 'pull_request' }} shell: bash diff --git a/swift/downgrades/33db81ad4b606ff9a476c8dabeb9fffbf61aa829/old.dbscheme b/swift/downgrades/33db81ad4b606ff9a476c8dabeb9fffbf61aa829/old.dbscheme new file mode 100644 index 000000000000..33db81ad4b60 --- /dev/null +++ b/swift/downgrades/33db81ad4b606ff9a476c8dabeb9fffbf61aa829/old.dbscheme @@ -0,0 +1,2793 @@ +// generated by codegen/codegen.py, do not edit + +// from prefix.dbscheme +/** + * The source location of the snapshot. + */ +sourceLocationPrefix( + string prefix: string ref +); + + +// from schema.py + +@element = + @file +| @generic_context +| @locatable +| @location +| @type +; + +#keyset[id] +element_is_unknown( + int id: @element ref +); + +@file = + @db_file +; + +#keyset[id] +files( + int id: @file ref, + string name: string ref +); + +#keyset[id] +file_is_successfully_extracted( + int id: @file ref +); + +@locatable = + @argument +| @ast_node +| @comment +| @diagnostics +| @error_element +; + +#keyset[id] +locatable_locations( + int id: @locatable ref, + int location: @location_or_none ref +); + +@location = + @db_location +; + +#keyset[id] +locations( + int id: @location ref, + int file: @file_or_none ref, + int start_line: int ref, + int start_column: int ref, + int end_line: int ref, + int end_column: int ref +); + +@ast_node = + @availability_info +| @availability_spec +| @callable +| @case_label_item +| @condition_element +| @decl +| @expr +| @key_path_component +| @macro_role +| @pattern +| @stmt +| @stmt_condition +| @type_repr +; + +comments( + unique int id: @comment, + string text: string ref +); + +db_files( + unique int id: @db_file +); + +db_locations( + unique int id: @db_location +); + +diagnostics( + unique int id: @diagnostics, + string text: string ref, + int kind: int ref +); + +@error_element = + @error_expr +| @error_type +| @overloaded_decl_ref_expr +| @unresolved_decl_ref_expr +| @unresolved_dot_expr +| @unresolved_member_chain_result_expr +| @unresolved_member_expr +| @unresolved_pattern_expr +| @unresolved_specialize_expr +| @unresolved_type +| @unresolved_type_conversion_expr +| @unspecified_element +; + +availability_infos( + unique int id: @availability_info +); + +#keyset[id] +availability_info_is_unavailable( + int id: @availability_info ref +); + +#keyset[id, index] +availability_info_specs( + int id: @availability_info ref, + int index: int ref, + int spec: @availability_spec_or_none ref +); + +@availability_spec = + @other_availability_spec +| @platform_version_availability_spec +; + +@callable = + @closure_expr +| @function +; + +#keyset[id] +callable_names( + int id: @callable ref, + string name: string ref +); + +#keyset[id] +callable_self_params( + int id: @callable ref, + int self_param: @param_decl_or_none ref +); + +#keyset[id, index] +callable_params( + int id: @callable ref, + int index: int ref, + int param: @param_decl_or_none ref +); + +#keyset[id] +callable_bodies( + int id: @callable ref, + int body: @brace_stmt_or_none ref +); + +#keyset[id, index] +callable_captures( + int id: @callable ref, + int index: int ref, + int capture: @captured_decl_or_none ref +); + +key_path_components( + unique int id: @key_path_component, + int kind: int ref, + int component_type: @type_or_none ref +); + +#keyset[id, index] +key_path_component_subscript_arguments( + int id: @key_path_component ref, + int index: int ref, + int subscript_argument: @argument_or_none ref +); + +#keyset[id] +key_path_component_tuple_indices( + int id: @key_path_component ref, + int tuple_index: int ref +); + +#keyset[id] +key_path_component_decl_refs( + int id: @key_path_component ref, + int decl_ref: @value_decl_or_none ref +); + +macro_roles( + unique int id: @macro_role, + int kind: int ref, + int macro_syntax: int ref +); + +#keyset[id, index] +macro_role_conformances( + int id: @macro_role ref, + int index: int ref, + int conformance: @type_expr_or_none ref +); + +#keyset[id, index] +macro_role_names( + int id: @macro_role ref, + int index: int ref, + string name: string ref +); + +unspecified_elements( + unique int id: @unspecified_element, + string property: string ref, + string error: string ref +); + +#keyset[id] +unspecified_element_parents( + int id: @unspecified_element ref, + int parent: @element ref +); + +#keyset[id] +unspecified_element_indices( + int id: @unspecified_element ref, + int index: int ref +); + +#keyset[id, index] +unspecified_element_children( + int id: @unspecified_element ref, + int index: int ref, + int child: @ast_node_or_none ref +); + +other_availability_specs( + unique int id: @other_availability_spec +); + +platform_version_availability_specs( + unique int id: @platform_version_availability_spec, + string platform: string ref, + string version: string ref +); + +@decl = + @captured_decl +| @enum_case_decl +| @extension_decl +| @if_config_decl +| @import_decl +| @missing_member_decl +| @operator_decl +| @pattern_binding_decl +| @pound_diagnostic_decl +| @precedence_group_decl +| @top_level_code_decl +| @value_decl +; + +#keyset[id] +decls( //dir=decl + int id: @decl ref, + int module: @module_decl_or_none ref +); + +#keyset[id, index] +decl_members( //dir=decl + int id: @decl ref, + int index: int ref, + int member: @decl_or_none ref +); + +@generic_context = + @extension_decl +| @function +| @generic_type_decl +| @macro_decl +| @subscript_decl +; + +#keyset[id, index] +generic_context_generic_type_params( //dir=decl + int id: @generic_context ref, + int index: int ref, + int generic_type_param: @generic_type_param_decl_or_none ref +); + +captured_decls( //dir=decl + unique int id: @captured_decl, + int decl: @value_decl_or_none ref +); + +#keyset[id] +captured_decl_is_direct( //dir=decl + int id: @captured_decl ref +); + +#keyset[id] +captured_decl_is_escaping( //dir=decl + int id: @captured_decl ref +); + +enum_case_decls( //dir=decl + unique int id: @enum_case_decl +); + +#keyset[id, index] +enum_case_decl_elements( //dir=decl + int id: @enum_case_decl ref, + int index: int ref, + int element: @enum_element_decl_or_none ref +); + +extension_decls( //dir=decl + unique int id: @extension_decl, + int extended_type_decl: @nominal_type_decl_or_none ref +); + +#keyset[id, index] +extension_decl_protocols( //dir=decl + int id: @extension_decl ref, + int index: int ref, + int protocol: @protocol_decl_or_none ref +); + +if_config_decls( //dir=decl + unique int id: @if_config_decl +); + +#keyset[id, index] +if_config_decl_active_elements( //dir=decl + int id: @if_config_decl ref, + int index: int ref, + int active_element: @ast_node_or_none ref +); + +import_decls( //dir=decl + unique int id: @import_decl +); + +#keyset[id] +import_decl_is_exported( //dir=decl + int id: @import_decl ref +); + +#keyset[id] +import_decl_imported_modules( //dir=decl + int id: @import_decl ref, + int imported_module: @module_decl_or_none ref +); + +#keyset[id, index] +import_decl_declarations( //dir=decl + int id: @import_decl ref, + int index: int ref, + int declaration: @value_decl_or_none ref +); + +missing_member_decls( //dir=decl + unique int id: @missing_member_decl, + string name: string ref +); + +@operator_decl = + @infix_operator_decl +| @postfix_operator_decl +| @prefix_operator_decl +; + +#keyset[id] +operator_decls( //dir=decl + int id: @operator_decl ref, + string name: string ref +); + +pattern_binding_decls( //dir=decl + unique int id: @pattern_binding_decl +); + +#keyset[id, index] +pattern_binding_decl_inits( //dir=decl + int id: @pattern_binding_decl ref, + int index: int ref, + int init: @expr_or_none ref +); + +#keyset[id, index] +pattern_binding_decl_patterns( //dir=decl + int id: @pattern_binding_decl ref, + int index: int ref, + int pattern: @pattern_or_none ref +); + +pound_diagnostic_decls( //dir=decl + unique int id: @pound_diagnostic_decl, + int kind: int ref, + int message: @string_literal_expr_or_none ref +); + +precedence_group_decls( //dir=decl + unique int id: @precedence_group_decl +); + +top_level_code_decls( //dir=decl + unique int id: @top_level_code_decl, + int body: @brace_stmt_or_none ref +); + +@value_decl = + @abstract_storage_decl +| @enum_element_decl +| @function +| @macro_decl +| @type_decl +; + +#keyset[id] +value_decls( //dir=decl + int id: @value_decl ref, + int interface_type: @type_or_none ref +); + +@abstract_storage_decl = + @subscript_decl +| @var_decl +; + +#keyset[id, index] +abstract_storage_decl_accessors( //dir=decl + int id: @abstract_storage_decl ref, + int index: int ref, + int accessor: @accessor_or_none ref +); + +enum_element_decls( //dir=decl + unique int id: @enum_element_decl, + string name: string ref +); + +#keyset[id, index] +enum_element_decl_params( //dir=decl + int id: @enum_element_decl ref, + int index: int ref, + int param: @param_decl_or_none ref +); + +@function = + @accessor_or_named_function +| @deinitializer +| @initializer +; + +infix_operator_decls( //dir=decl + unique int id: @infix_operator_decl +); + +#keyset[id] +infix_operator_decl_precedence_groups( //dir=decl + int id: @infix_operator_decl ref, + int precedence_group: @precedence_group_decl_or_none ref +); + +macro_decls( //dir=decl + unique int id: @macro_decl, + string name: string ref +); + +#keyset[id, index] +macro_decl_parameters( //dir=decl + int id: @macro_decl ref, + int index: int ref, + int parameter: @param_decl_or_none ref +); + +#keyset[id, index] +macro_decl_roles( //dir=decl + int id: @macro_decl ref, + int index: int ref, + int role: @macro_role_or_none ref +); + +postfix_operator_decls( //dir=decl + unique int id: @postfix_operator_decl +); + +prefix_operator_decls( //dir=decl + unique int id: @prefix_operator_decl +); + +@type_decl = + @abstract_type_param_decl +| @generic_type_decl +| @module_decl +; + +#keyset[id] +type_decls( //dir=decl + int id: @type_decl ref, + string name: string ref +); + +#keyset[id, index] +type_decl_inherited_types( //dir=decl + int id: @type_decl ref, + int index: int ref, + int inherited_type: @type_or_none ref +); + +@abstract_type_param_decl = + @associated_type_decl +| @generic_type_param_decl +; + +@accessor_or_named_function = + @accessor +| @named_function +; + +deinitializers( //dir=decl + unique int id: @deinitializer +); + +@generic_type_decl = + @nominal_type_decl +| @opaque_type_decl +| @type_alias_decl +; + +initializers( //dir=decl + unique int id: @initializer +); + +module_decls( //dir=decl + unique int id: @module_decl +); + +#keyset[id] +module_decl_is_builtin_module( //dir=decl + int id: @module_decl ref +); + +#keyset[id] +module_decl_is_system_module( //dir=decl + int id: @module_decl ref +); + +module_decl_imported_modules( //dir=decl + int id: @module_decl ref, + int imported_module: @module_decl_or_none ref +); + +module_decl_exported_modules( //dir=decl + int id: @module_decl ref, + int exported_module: @module_decl_or_none ref +); + +subscript_decls( //dir=decl + unique int id: @subscript_decl, + int element_type: @type_or_none ref +); + +#keyset[id, index] +subscript_decl_params( //dir=decl + int id: @subscript_decl ref, + int index: int ref, + int param: @param_decl_or_none ref +); + +@var_decl = + @concrete_var_decl +| @param_decl +; + +#keyset[id] +var_decls( //dir=decl + int id: @var_decl ref, + string name: string ref, + int type_: @type_or_none ref +); + +#keyset[id] +var_decl_attached_property_wrapper_types( //dir=decl + int id: @var_decl ref, + int attached_property_wrapper_type: @type_or_none ref +); + +#keyset[id] +var_decl_parent_patterns( //dir=decl + int id: @var_decl ref, + int parent_pattern: @pattern_or_none ref +); + +#keyset[id] +var_decl_parent_initializers( //dir=decl + int id: @var_decl ref, + int parent_initializer: @expr_or_none ref +); + +#keyset[id] +var_decl_property_wrapper_backing_var_bindings( //dir=decl + int id: @var_decl ref, + int property_wrapper_backing_var_binding: @pattern_binding_decl_or_none ref +); + +#keyset[id] +var_decl_property_wrapper_backing_vars( //dir=decl + int id: @var_decl ref, + int property_wrapper_backing_var: @var_decl_or_none ref +); + +#keyset[id] +var_decl_property_wrapper_projection_var_bindings( //dir=decl + int id: @var_decl ref, + int property_wrapper_projection_var_binding: @pattern_binding_decl_or_none ref +); + +#keyset[id] +var_decl_property_wrapper_projection_vars( //dir=decl + int id: @var_decl ref, + int property_wrapper_projection_var: @var_decl_or_none ref +); + +accessors( //dir=decl + unique int id: @accessor +); + +#keyset[id] +accessor_is_getter( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_setter( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_will_set( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_did_set( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_read( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_modify( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_unsafe_address( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_unsafe_mutable_address( //dir=decl + int id: @accessor ref +); + +associated_type_decls( //dir=decl + unique int id: @associated_type_decl +); + +concrete_var_decls( //dir=decl + unique int id: @concrete_var_decl, + int introducer_int: int ref +); + +generic_type_param_decls( //dir=decl + unique int id: @generic_type_param_decl +); + +named_functions( //dir=decl + unique int id: @named_function +); + +@nominal_type_decl = + @class_decl +| @enum_decl +| @protocol_decl +| @struct_decl +; + +#keyset[id] +nominal_type_decls( //dir=decl + int id: @nominal_type_decl ref, + int type_: @type_or_none ref +); + +opaque_type_decls( //dir=decl + unique int id: @opaque_type_decl, + int naming_declaration: @value_decl_or_none ref +); + +#keyset[id, index] +opaque_type_decl_opaque_generic_params( //dir=decl + int id: @opaque_type_decl ref, + int index: int ref, + int opaque_generic_param: @generic_type_param_type_or_none ref +); + +param_decls( //dir=decl + unique int id: @param_decl +); + +#keyset[id] +param_decl_is_inout( //dir=decl + int id: @param_decl ref +); + +#keyset[id] +param_decl_property_wrapper_local_wrapped_var_bindings( //dir=decl + int id: @param_decl ref, + int property_wrapper_local_wrapped_var_binding: @pattern_binding_decl_or_none ref +); + +#keyset[id] +param_decl_property_wrapper_local_wrapped_vars( //dir=decl + int id: @param_decl ref, + int property_wrapper_local_wrapped_var: @var_decl_or_none ref +); + +type_alias_decls( //dir=decl + unique int id: @type_alias_decl, + int aliased_type: @type_or_none ref +); + +class_decls( //dir=decl + unique int id: @class_decl +); + +enum_decls( //dir=decl + unique int id: @enum_decl +); + +protocol_decls( //dir=decl + unique int id: @protocol_decl +); + +struct_decls( //dir=decl + unique int id: @struct_decl +); + +arguments( //dir=expr + unique int id: @argument, + string label: string ref, + int expr: @expr_or_none ref +); + +@expr = + @any_try_expr +| @applied_property_wrapper_expr +| @apply_expr +| @assign_expr +| @bind_optional_expr +| @capture_list_expr +| @closure_expr +| @collection_expr +| @consume_expr +| @copy_expr +| @decl_ref_expr +| @default_argument_expr +| @discard_assignment_expr +| @dot_syntax_base_ignored_expr +| @dynamic_type_expr +| @enum_is_case_expr +| @error_expr +| @explicit_cast_expr +| @force_value_expr +| @identity_expr +| @if_expr +| @implicit_conversion_expr +| @in_out_expr +| @key_path_application_expr +| @key_path_dot_expr +| @key_path_expr +| @lazy_initialization_expr +| @literal_expr +| @lookup_expr +| @make_temporarily_escapable_expr +| @materialize_pack_expr +| @obj_c_selector_expr +| @one_way_expr +| @opaque_value_expr +| @open_existential_expr +| @optional_evaluation_expr +| @other_initializer_ref_expr +| @overloaded_decl_ref_expr +| @pack_element_expr +| @pack_expansion_expr +| @property_wrapper_value_placeholder_expr +| @rebind_self_in_initializer_expr +| @sequence_expr +| @single_value_stmt_expr +| @super_ref_expr +| @tap_expr +| @tuple_element_expr +| @tuple_expr +| @type_expr +| @unresolved_decl_ref_expr +| @unresolved_dot_expr +| @unresolved_member_expr +| @unresolved_pattern_expr +| @unresolved_specialize_expr +| @vararg_expansion_expr +; + +#keyset[id] +expr_types( //dir=expr + int id: @expr ref, + int type_: @type_or_none ref +); + +@any_try_expr = + @force_try_expr +| @optional_try_expr +| @try_expr +; + +#keyset[id] +any_try_exprs( //dir=expr + int id: @any_try_expr ref, + int sub_expr: @expr_or_none ref +); + +applied_property_wrapper_exprs( //dir=expr + unique int id: @applied_property_wrapper_expr, + int kind: int ref, + int value: @expr_or_none ref, + int param: @param_decl_or_none ref +); + +@apply_expr = + @binary_expr +| @call_expr +| @postfix_unary_expr +| @prefix_unary_expr +| @self_apply_expr +; + +#keyset[id] +apply_exprs( //dir=expr + int id: @apply_expr ref, + int function: @expr_or_none ref +); + +#keyset[id, index] +apply_expr_arguments( //dir=expr + int id: @apply_expr ref, + int index: int ref, + int argument: @argument_or_none ref +); + +assign_exprs( //dir=expr + unique int id: @assign_expr, + int dest: @expr_or_none ref, + int source: @expr_or_none ref +); + +bind_optional_exprs( //dir=expr + unique int id: @bind_optional_expr, + int sub_expr: @expr_or_none ref +); + +capture_list_exprs( //dir=expr + unique int id: @capture_list_expr, + int closure_body: @closure_expr_or_none ref +); + +#keyset[id, index] +capture_list_expr_binding_decls( //dir=expr + int id: @capture_list_expr ref, + int index: int ref, + int binding_decl: @pattern_binding_decl_or_none ref +); + +@closure_expr = + @auto_closure_expr +| @explicit_closure_expr +; + +@collection_expr = + @array_expr +| @dictionary_expr +; + +consume_exprs( //dir=expr + unique int id: @consume_expr, + int sub_expr: @expr_or_none ref +); + +copy_exprs( //dir=expr + unique int id: @copy_expr, + int sub_expr: @expr_or_none ref +); + +decl_ref_exprs( //dir=expr + unique int id: @decl_ref_expr, + int decl: @decl_or_none ref +); + +#keyset[id, index] +decl_ref_expr_replacement_types( //dir=expr + int id: @decl_ref_expr ref, + int index: int ref, + int replacement_type: @type_or_none ref +); + +#keyset[id] +decl_ref_expr_has_direct_to_storage_semantics( //dir=expr + int id: @decl_ref_expr ref +); + +#keyset[id] +decl_ref_expr_has_direct_to_implementation_semantics( //dir=expr + int id: @decl_ref_expr ref +); + +#keyset[id] +decl_ref_expr_has_ordinary_semantics( //dir=expr + int id: @decl_ref_expr ref +); + +#keyset[id] +decl_ref_expr_has_distributed_thunk_semantics( //dir=expr + int id: @decl_ref_expr ref +); + +default_argument_exprs( //dir=expr + unique int id: @default_argument_expr, + int param_decl: @param_decl_or_none ref, + int param_index: int ref +); + +#keyset[id] +default_argument_expr_caller_side_defaults( //dir=expr + int id: @default_argument_expr ref, + int caller_side_default: @expr_or_none ref +); + +discard_assignment_exprs( //dir=expr + unique int id: @discard_assignment_expr +); + +dot_syntax_base_ignored_exprs( //dir=expr + unique int id: @dot_syntax_base_ignored_expr, + int qualifier: @expr_or_none ref, + int sub_expr: @expr_or_none ref +); + +dynamic_type_exprs( //dir=expr + unique int id: @dynamic_type_expr, + int base: @expr_or_none ref +); + +enum_is_case_exprs( //dir=expr + unique int id: @enum_is_case_expr, + int sub_expr: @expr_or_none ref, + int element: @enum_element_decl_or_none ref +); + +error_exprs( //dir=expr + unique int id: @error_expr +); + +@explicit_cast_expr = + @checked_cast_expr +| @coerce_expr +; + +#keyset[id] +explicit_cast_exprs( //dir=expr + int id: @explicit_cast_expr ref, + int sub_expr: @expr_or_none ref +); + +force_value_exprs( //dir=expr + unique int id: @force_value_expr, + int sub_expr: @expr_or_none ref +); + +@identity_expr = + @await_expr +| @borrow_expr +| @dot_self_expr +| @paren_expr +| @unresolved_member_chain_result_expr +; + +#keyset[id] +identity_exprs( //dir=expr + int id: @identity_expr ref, + int sub_expr: @expr_or_none ref +); + +if_exprs( //dir=expr + unique int id: @if_expr, + int condition: @expr_or_none ref, + int then_expr: @expr_or_none ref, + int else_expr: @expr_or_none ref +); + +@implicit_conversion_expr = + @abi_safe_conversion_expr +| @any_hashable_erasure_expr +| @archetype_to_super_expr +| @array_to_pointer_expr +| @bridge_from_obj_c_expr +| @bridge_to_obj_c_expr +| @class_metatype_to_object_expr +| @collection_upcast_conversion_expr +| @conditional_bridge_from_obj_c_expr +| @covariant_function_conversion_expr +| @covariant_return_conversion_expr +| @derived_to_base_expr +| @destructure_tuple_expr +| @differentiable_function_expr +| @differentiable_function_extract_original_expr +| @erasure_expr +| @existential_metatype_to_object_expr +| @foreign_object_conversion_expr +| @function_conversion_expr +| @in_out_to_pointer_expr +| @inject_into_optional_expr +| @linear_function_expr +| @linear_function_extract_original_expr +| @linear_to_differentiable_function_expr +| @load_expr +| @metatype_conversion_expr +| @pointer_to_pointer_expr +| @protocol_metatype_to_object_expr +| @string_to_pointer_expr +| @underlying_to_opaque_expr +| @unevaluated_instance_expr +| @unresolved_type_conversion_expr +; + +#keyset[id] +implicit_conversion_exprs( //dir=expr + int id: @implicit_conversion_expr ref, + int sub_expr: @expr_or_none ref +); + +in_out_exprs( //dir=expr + unique int id: @in_out_expr, + int sub_expr: @expr_or_none ref +); + +key_path_application_exprs( //dir=expr + unique int id: @key_path_application_expr, + int base: @expr_or_none ref, + int key_path: @expr_or_none ref +); + +key_path_dot_exprs( //dir=expr + unique int id: @key_path_dot_expr +); + +key_path_exprs( //dir=expr + unique int id: @key_path_expr +); + +#keyset[id] +key_path_expr_roots( //dir=expr + int id: @key_path_expr ref, + int root: @type_repr_or_none ref +); + +#keyset[id, index] +key_path_expr_components( //dir=expr + int id: @key_path_expr ref, + int index: int ref, + int component: @key_path_component_or_none ref +); + +lazy_initialization_exprs( //dir=expr + unique int id: @lazy_initialization_expr, + int sub_expr: @expr_or_none ref +); + +@literal_expr = + @builtin_literal_expr +| @interpolated_string_literal_expr +| @nil_literal_expr +| @object_literal_expr +| @regex_literal_expr +; + +@lookup_expr = + @dynamic_lookup_expr +| @member_ref_expr +| @subscript_expr +; + +#keyset[id] +lookup_exprs( //dir=expr + int id: @lookup_expr ref, + int base: @expr_or_none ref +); + +#keyset[id] +lookup_expr_members( //dir=expr + int id: @lookup_expr ref, + int member: @decl_or_none ref +); + +make_temporarily_escapable_exprs( //dir=expr + unique int id: @make_temporarily_escapable_expr, + int escaping_closure: @opaque_value_expr_or_none ref, + int nonescaping_closure: @expr_or_none ref, + int sub_expr: @expr_or_none ref +); + +materialize_pack_exprs( //dir=expr + unique int id: @materialize_pack_expr, + int sub_expr: @expr_or_none ref +); + +obj_c_selector_exprs( //dir=expr + unique int id: @obj_c_selector_expr, + int sub_expr: @expr_or_none ref, + int method: @function_or_none ref +); + +one_way_exprs( //dir=expr + unique int id: @one_way_expr, + int sub_expr: @expr_or_none ref +); + +opaque_value_exprs( //dir=expr + unique int id: @opaque_value_expr +); + +open_existential_exprs( //dir=expr + unique int id: @open_existential_expr, + int sub_expr: @expr_or_none ref, + int existential: @expr_or_none ref, + int opaque_expr: @opaque_value_expr_or_none ref +); + +optional_evaluation_exprs( //dir=expr + unique int id: @optional_evaluation_expr, + int sub_expr: @expr_or_none ref +); + +other_initializer_ref_exprs( //dir=expr + unique int id: @other_initializer_ref_expr, + int initializer: @initializer_or_none ref +); + +overloaded_decl_ref_exprs( //dir=expr + unique int id: @overloaded_decl_ref_expr +); + +#keyset[id, index] +overloaded_decl_ref_expr_possible_declarations( //dir=expr + int id: @overloaded_decl_ref_expr ref, + int index: int ref, + int possible_declaration: @value_decl_or_none ref +); + +pack_element_exprs( //dir=expr + unique int id: @pack_element_expr, + int sub_expr: @expr_or_none ref +); + +pack_expansion_exprs( //dir=expr + unique int id: @pack_expansion_expr, + int pattern_expr: @expr_or_none ref +); + +property_wrapper_value_placeholder_exprs( //dir=expr + unique int id: @property_wrapper_value_placeholder_expr, + int placeholder: @opaque_value_expr_or_none ref +); + +#keyset[id] +property_wrapper_value_placeholder_expr_wrapped_values( //dir=expr + int id: @property_wrapper_value_placeholder_expr ref, + int wrapped_value: @expr_or_none ref +); + +rebind_self_in_initializer_exprs( //dir=expr + unique int id: @rebind_self_in_initializer_expr, + int sub_expr: @expr_or_none ref, + int self: @var_decl_or_none ref +); + +sequence_exprs( //dir=expr + unique int id: @sequence_expr +); + +#keyset[id, index] +sequence_expr_elements( //dir=expr + int id: @sequence_expr ref, + int index: int ref, + int element: @expr_or_none ref +); + +single_value_stmt_exprs( //dir=expr + unique int id: @single_value_stmt_expr, + int stmt: @stmt_or_none ref +); + +super_ref_exprs( //dir=expr + unique int id: @super_ref_expr, + int self: @var_decl_or_none ref +); + +tap_exprs( //dir=expr + unique int id: @tap_expr, + int body: @brace_stmt_or_none ref, + int var: @var_decl_or_none ref +); + +#keyset[id] +tap_expr_sub_exprs( //dir=expr + int id: @tap_expr ref, + int sub_expr: @expr_or_none ref +); + +tuple_element_exprs( //dir=expr + unique int id: @tuple_element_expr, + int sub_expr: @expr_or_none ref, + int index: int ref +); + +tuple_exprs( //dir=expr + unique int id: @tuple_expr +); + +#keyset[id, index] +tuple_expr_elements( //dir=expr + int id: @tuple_expr ref, + int index: int ref, + int element: @expr_or_none ref +); + +type_exprs( //dir=expr + unique int id: @type_expr +); + +#keyset[id] +type_expr_type_reprs( //dir=expr + int id: @type_expr ref, + int type_repr: @type_repr_or_none ref +); + +unresolved_decl_ref_exprs( //dir=expr + unique int id: @unresolved_decl_ref_expr +); + +#keyset[id] +unresolved_decl_ref_expr_names( //dir=expr + int id: @unresolved_decl_ref_expr ref, + string name: string ref +); + +unresolved_dot_exprs( //dir=expr + unique int id: @unresolved_dot_expr, + int base: @expr_or_none ref, + string name: string ref +); + +unresolved_member_exprs( //dir=expr + unique int id: @unresolved_member_expr, + string name: string ref +); + +unresolved_pattern_exprs( //dir=expr + unique int id: @unresolved_pattern_expr, + int sub_pattern: @pattern_or_none ref +); + +unresolved_specialize_exprs( //dir=expr + unique int id: @unresolved_specialize_expr, + int sub_expr: @expr_or_none ref +); + +vararg_expansion_exprs( //dir=expr + unique int id: @vararg_expansion_expr, + int sub_expr: @expr_or_none ref +); + +abi_safe_conversion_exprs( //dir=expr + unique int id: @abi_safe_conversion_expr +); + +any_hashable_erasure_exprs( //dir=expr + unique int id: @any_hashable_erasure_expr +); + +archetype_to_super_exprs( //dir=expr + unique int id: @archetype_to_super_expr +); + +array_exprs( //dir=expr + unique int id: @array_expr +); + +#keyset[id, index] +array_expr_elements( //dir=expr + int id: @array_expr ref, + int index: int ref, + int element: @expr_or_none ref +); + +array_to_pointer_exprs( //dir=expr + unique int id: @array_to_pointer_expr +); + +auto_closure_exprs( //dir=expr + unique int id: @auto_closure_expr +); + +await_exprs( //dir=expr + unique int id: @await_expr +); + +binary_exprs( //dir=expr + unique int id: @binary_expr +); + +borrow_exprs( //dir=expr + unique int id: @borrow_expr +); + +bridge_from_obj_c_exprs( //dir=expr + unique int id: @bridge_from_obj_c_expr +); + +bridge_to_obj_c_exprs( //dir=expr + unique int id: @bridge_to_obj_c_expr +); + +@builtin_literal_expr = + @boolean_literal_expr +| @magic_identifier_literal_expr +| @number_literal_expr +| @string_literal_expr +; + +call_exprs( //dir=expr + unique int id: @call_expr +); + +@checked_cast_expr = + @conditional_checked_cast_expr +| @forced_checked_cast_expr +| @is_expr +; + +class_metatype_to_object_exprs( //dir=expr + unique int id: @class_metatype_to_object_expr +); + +coerce_exprs( //dir=expr + unique int id: @coerce_expr +); + +collection_upcast_conversion_exprs( //dir=expr + unique int id: @collection_upcast_conversion_expr +); + +conditional_bridge_from_obj_c_exprs( //dir=expr + unique int id: @conditional_bridge_from_obj_c_expr +); + +covariant_function_conversion_exprs( //dir=expr + unique int id: @covariant_function_conversion_expr +); + +covariant_return_conversion_exprs( //dir=expr + unique int id: @covariant_return_conversion_expr +); + +derived_to_base_exprs( //dir=expr + unique int id: @derived_to_base_expr +); + +destructure_tuple_exprs( //dir=expr + unique int id: @destructure_tuple_expr +); + +dictionary_exprs( //dir=expr + unique int id: @dictionary_expr +); + +#keyset[id, index] +dictionary_expr_elements( //dir=expr + int id: @dictionary_expr ref, + int index: int ref, + int element: @expr_or_none ref +); + +differentiable_function_exprs( //dir=expr + unique int id: @differentiable_function_expr +); + +differentiable_function_extract_original_exprs( //dir=expr + unique int id: @differentiable_function_extract_original_expr +); + +dot_self_exprs( //dir=expr + unique int id: @dot_self_expr +); + +@dynamic_lookup_expr = + @dynamic_member_ref_expr +| @dynamic_subscript_expr +; + +erasure_exprs( //dir=expr + unique int id: @erasure_expr +); + +existential_metatype_to_object_exprs( //dir=expr + unique int id: @existential_metatype_to_object_expr +); + +explicit_closure_exprs( //dir=expr + unique int id: @explicit_closure_expr +); + +force_try_exprs( //dir=expr + unique int id: @force_try_expr +); + +foreign_object_conversion_exprs( //dir=expr + unique int id: @foreign_object_conversion_expr +); + +function_conversion_exprs( //dir=expr + unique int id: @function_conversion_expr +); + +in_out_to_pointer_exprs( //dir=expr + unique int id: @in_out_to_pointer_expr +); + +inject_into_optional_exprs( //dir=expr + unique int id: @inject_into_optional_expr +); + +interpolated_string_literal_exprs( //dir=expr + unique int id: @interpolated_string_literal_expr +); + +#keyset[id] +interpolated_string_literal_expr_interpolation_exprs( //dir=expr + int id: @interpolated_string_literal_expr ref, + int interpolation_expr: @opaque_value_expr_or_none ref +); + +#keyset[id] +interpolated_string_literal_expr_appending_exprs( //dir=expr + int id: @interpolated_string_literal_expr ref, + int appending_expr: @tap_expr_or_none ref +); + +linear_function_exprs( //dir=expr + unique int id: @linear_function_expr +); + +linear_function_extract_original_exprs( //dir=expr + unique int id: @linear_function_extract_original_expr +); + +linear_to_differentiable_function_exprs( //dir=expr + unique int id: @linear_to_differentiable_function_expr +); + +load_exprs( //dir=expr + unique int id: @load_expr +); + +member_ref_exprs( //dir=expr + unique int id: @member_ref_expr +); + +#keyset[id] +member_ref_expr_has_direct_to_storage_semantics( //dir=expr + int id: @member_ref_expr ref +); + +#keyset[id] +member_ref_expr_has_direct_to_implementation_semantics( //dir=expr + int id: @member_ref_expr ref +); + +#keyset[id] +member_ref_expr_has_ordinary_semantics( //dir=expr + int id: @member_ref_expr ref +); + +#keyset[id] +member_ref_expr_has_distributed_thunk_semantics( //dir=expr + int id: @member_ref_expr ref +); + +metatype_conversion_exprs( //dir=expr + unique int id: @metatype_conversion_expr +); + +nil_literal_exprs( //dir=expr + unique int id: @nil_literal_expr +); + +object_literal_exprs( //dir=expr + unique int id: @object_literal_expr, + int kind: int ref +); + +#keyset[id, index] +object_literal_expr_arguments( //dir=expr + int id: @object_literal_expr ref, + int index: int ref, + int argument: @argument_or_none ref +); + +optional_try_exprs( //dir=expr + unique int id: @optional_try_expr +); + +paren_exprs( //dir=expr + unique int id: @paren_expr +); + +pointer_to_pointer_exprs( //dir=expr + unique int id: @pointer_to_pointer_expr +); + +postfix_unary_exprs( //dir=expr + unique int id: @postfix_unary_expr +); + +prefix_unary_exprs( //dir=expr + unique int id: @prefix_unary_expr +); + +protocol_metatype_to_object_exprs( //dir=expr + unique int id: @protocol_metatype_to_object_expr +); + +regex_literal_exprs( //dir=expr + unique int id: @regex_literal_expr, + string pattern: string ref, + int version: int ref +); + +@self_apply_expr = + @dot_syntax_call_expr +| @initializer_ref_call_expr +; + +#keyset[id] +self_apply_exprs( //dir=expr + int id: @self_apply_expr ref, + int base: @expr_or_none ref +); + +string_to_pointer_exprs( //dir=expr + unique int id: @string_to_pointer_expr +); + +subscript_exprs( //dir=expr + unique int id: @subscript_expr +); + +#keyset[id, index] +subscript_expr_arguments( //dir=expr + int id: @subscript_expr ref, + int index: int ref, + int argument: @argument_or_none ref +); + +#keyset[id] +subscript_expr_has_direct_to_storage_semantics( //dir=expr + int id: @subscript_expr ref +); + +#keyset[id] +subscript_expr_has_direct_to_implementation_semantics( //dir=expr + int id: @subscript_expr ref +); + +#keyset[id] +subscript_expr_has_ordinary_semantics( //dir=expr + int id: @subscript_expr ref +); + +#keyset[id] +subscript_expr_has_distributed_thunk_semantics( //dir=expr + int id: @subscript_expr ref +); + +try_exprs( //dir=expr + unique int id: @try_expr +); + +underlying_to_opaque_exprs( //dir=expr + unique int id: @underlying_to_opaque_expr +); + +unevaluated_instance_exprs( //dir=expr + unique int id: @unevaluated_instance_expr +); + +unresolved_member_chain_result_exprs( //dir=expr + unique int id: @unresolved_member_chain_result_expr +); + +unresolved_type_conversion_exprs( //dir=expr + unique int id: @unresolved_type_conversion_expr +); + +boolean_literal_exprs( //dir=expr + unique int id: @boolean_literal_expr, + boolean value: boolean ref +); + +conditional_checked_cast_exprs( //dir=expr + unique int id: @conditional_checked_cast_expr +); + +dot_syntax_call_exprs( //dir=expr + unique int id: @dot_syntax_call_expr +); + +dynamic_member_ref_exprs( //dir=expr + unique int id: @dynamic_member_ref_expr +); + +dynamic_subscript_exprs( //dir=expr + unique int id: @dynamic_subscript_expr +); + +forced_checked_cast_exprs( //dir=expr + unique int id: @forced_checked_cast_expr +); + +initializer_ref_call_exprs( //dir=expr + unique int id: @initializer_ref_call_expr +); + +is_exprs( //dir=expr + unique int id: @is_expr +); + +magic_identifier_literal_exprs( //dir=expr + unique int id: @magic_identifier_literal_expr, + string kind: string ref +); + +@number_literal_expr = + @float_literal_expr +| @integer_literal_expr +; + +string_literal_exprs( //dir=expr + unique int id: @string_literal_expr, + string value: string ref +); + +float_literal_exprs( //dir=expr + unique int id: @float_literal_expr, + string string_value: string ref +); + +integer_literal_exprs( //dir=expr + unique int id: @integer_literal_expr, + string string_value: string ref +); + +@pattern = + @any_pattern +| @binding_pattern +| @bool_pattern +| @enum_element_pattern +| @expr_pattern +| @is_pattern +| @named_pattern +| @optional_some_pattern +| @paren_pattern +| @tuple_pattern +| @typed_pattern +; + +#keyset[id] +pattern_types( //dir=pattern + int id: @pattern ref, + int type_: @type_or_none ref +); + +any_patterns( //dir=pattern + unique int id: @any_pattern +); + +binding_patterns( //dir=pattern + unique int id: @binding_pattern, + int sub_pattern: @pattern_or_none ref +); + +bool_patterns( //dir=pattern + unique int id: @bool_pattern, + boolean value: boolean ref +); + +enum_element_patterns( //dir=pattern + unique int id: @enum_element_pattern, + int element: @enum_element_decl_or_none ref +); + +#keyset[id] +enum_element_pattern_sub_patterns( //dir=pattern + int id: @enum_element_pattern ref, + int sub_pattern: @pattern_or_none ref +); + +expr_patterns( //dir=pattern + unique int id: @expr_pattern, + int sub_expr: @expr_or_none ref +); + +is_patterns( //dir=pattern + unique int id: @is_pattern +); + +#keyset[id] +is_pattern_cast_type_reprs( //dir=pattern + int id: @is_pattern ref, + int cast_type_repr: @type_repr_or_none ref +); + +#keyset[id] +is_pattern_sub_patterns( //dir=pattern + int id: @is_pattern ref, + int sub_pattern: @pattern_or_none ref +); + +named_patterns( //dir=pattern + unique int id: @named_pattern, + int var_decl: @var_decl_or_none ref +); + +optional_some_patterns( //dir=pattern + unique int id: @optional_some_pattern, + int sub_pattern: @pattern_or_none ref +); + +paren_patterns( //dir=pattern + unique int id: @paren_pattern, + int sub_pattern: @pattern_or_none ref +); + +tuple_patterns( //dir=pattern + unique int id: @tuple_pattern +); + +#keyset[id, index] +tuple_pattern_elements( //dir=pattern + int id: @tuple_pattern ref, + int index: int ref, + int element: @pattern_or_none ref +); + +typed_patterns( //dir=pattern + unique int id: @typed_pattern, + int sub_pattern: @pattern_or_none ref +); + +#keyset[id] +typed_pattern_type_reprs( //dir=pattern + int id: @typed_pattern ref, + int type_repr: @type_repr_or_none ref +); + +case_label_items( //dir=stmt + unique int id: @case_label_item, + int pattern: @pattern_or_none ref +); + +#keyset[id] +case_label_item_guards( //dir=stmt + int id: @case_label_item ref, + int guard: @expr_or_none ref +); + +condition_elements( //dir=stmt + unique int id: @condition_element +); + +#keyset[id] +condition_element_booleans( //dir=stmt + int id: @condition_element ref, + int boolean_: @expr_or_none ref +); + +#keyset[id] +condition_element_patterns( //dir=stmt + int id: @condition_element ref, + int pattern: @pattern_or_none ref +); + +#keyset[id] +condition_element_initializers( //dir=stmt + int id: @condition_element ref, + int initializer: @expr_or_none ref +); + +#keyset[id] +condition_element_availabilities( //dir=stmt + int id: @condition_element ref, + int availability: @availability_info_or_none ref +); + +@stmt = + @brace_stmt +| @break_stmt +| @case_stmt +| @continue_stmt +| @defer_stmt +| @discard_stmt +| @fail_stmt +| @fallthrough_stmt +| @labeled_stmt +| @pound_assert_stmt +| @return_stmt +| @then_stmt +| @throw_stmt +| @yield_stmt +; + +stmt_conditions( //dir=stmt + unique int id: @stmt_condition +); + +#keyset[id, index] +stmt_condition_elements( //dir=stmt + int id: @stmt_condition ref, + int index: int ref, + int element: @condition_element_or_none ref +); + +brace_stmts( //dir=stmt + unique int id: @brace_stmt +); + +#keyset[id, index] +brace_stmt_elements( //dir=stmt + int id: @brace_stmt ref, + int index: int ref, + int element: @ast_node_or_none ref +); + +break_stmts( //dir=stmt + unique int id: @break_stmt +); + +#keyset[id] +break_stmt_target_names( //dir=stmt + int id: @break_stmt ref, + string target_name: string ref +); + +#keyset[id] +break_stmt_targets( //dir=stmt + int id: @break_stmt ref, + int target: @stmt_or_none ref +); + +case_stmts( //dir=stmt + unique int id: @case_stmt, + int body: @stmt_or_none ref +); + +#keyset[id, index] +case_stmt_labels( //dir=stmt + int id: @case_stmt ref, + int index: int ref, + int label: @case_label_item_or_none ref +); + +#keyset[id, index] +case_stmt_variables( //dir=stmt + int id: @case_stmt ref, + int index: int ref, + int variable: @var_decl_or_none ref +); + +continue_stmts( //dir=stmt + unique int id: @continue_stmt +); + +#keyset[id] +continue_stmt_target_names( //dir=stmt + int id: @continue_stmt ref, + string target_name: string ref +); + +#keyset[id] +continue_stmt_targets( //dir=stmt + int id: @continue_stmt ref, + int target: @stmt_or_none ref +); + +defer_stmts( //dir=stmt + unique int id: @defer_stmt, + int body: @brace_stmt_or_none ref +); + +discard_stmts( //dir=stmt + unique int id: @discard_stmt, + int sub_expr: @expr_or_none ref +); + +fail_stmts( //dir=stmt + unique int id: @fail_stmt +); + +fallthrough_stmts( //dir=stmt + unique int id: @fallthrough_stmt, + int fallthrough_source: @case_stmt_or_none ref, + int fallthrough_dest: @case_stmt_or_none ref +); + +@labeled_stmt = + @do_catch_stmt +| @do_stmt +| @for_each_stmt +| @labeled_conditional_stmt +| @repeat_while_stmt +| @switch_stmt +; + +#keyset[id] +labeled_stmt_labels( //dir=stmt + int id: @labeled_stmt ref, + string label: string ref +); + +pound_assert_stmts( //dir=stmt + unique int id: @pound_assert_stmt, + int condition: @expr_or_none ref, + string message: string ref +); + +return_stmts( //dir=stmt + unique int id: @return_stmt +); + +#keyset[id] +return_stmt_results( //dir=stmt + int id: @return_stmt ref, + int result: @expr_or_none ref +); + +then_stmts( //dir=stmt + unique int id: @then_stmt, + int result: @expr_or_none ref +); + +throw_stmts( //dir=stmt + unique int id: @throw_stmt, + int sub_expr: @expr_or_none ref +); + +yield_stmts( //dir=stmt + unique int id: @yield_stmt +); + +#keyset[id, index] +yield_stmt_results( //dir=stmt + int id: @yield_stmt ref, + int index: int ref, + int result: @expr_or_none ref +); + +do_catch_stmts( //dir=stmt + unique int id: @do_catch_stmt, + int body: @stmt_or_none ref +); + +#keyset[id, index] +do_catch_stmt_catches( //dir=stmt + int id: @do_catch_stmt ref, + int index: int ref, + int catch: @case_stmt_or_none ref +); + +do_stmts( //dir=stmt + unique int id: @do_stmt, + int body: @brace_stmt_or_none ref +); + +for_each_stmts( //dir=stmt + unique int id: @for_each_stmt, + int pattern: @pattern_or_none ref, + int body: @brace_stmt_or_none ref +); + +#keyset[id, index] +for_each_stmt_variables( //dir=stmt + int id: @for_each_stmt ref, + int index: int ref, + int variable: @var_decl_or_none ref +); + +#keyset[id] +for_each_stmt_wheres( //dir=stmt + int id: @for_each_stmt ref, + int where: @expr_or_none ref +); + +#keyset[id] +for_each_stmt_iterator_vars( //dir=stmt + int id: @for_each_stmt ref, + int iteratorVar: @pattern_binding_decl_or_none ref +); + +#keyset[id] +for_each_stmt_next_calls( //dir=stmt + int id: @for_each_stmt ref, + int nextCall: @expr_or_none ref +); + +@labeled_conditional_stmt = + @guard_stmt +| @if_stmt +| @while_stmt +; + +#keyset[id] +labeled_conditional_stmts( //dir=stmt + int id: @labeled_conditional_stmt ref, + int condition: @stmt_condition_or_none ref +); + +repeat_while_stmts( //dir=stmt + unique int id: @repeat_while_stmt, + int condition: @expr_or_none ref, + int body: @stmt_or_none ref +); + +switch_stmts( //dir=stmt + unique int id: @switch_stmt, + int expr: @expr_or_none ref +); + +#keyset[id, index] +switch_stmt_cases( //dir=stmt + int id: @switch_stmt ref, + int index: int ref, + int case_: @case_stmt_or_none ref +); + +guard_stmts( //dir=stmt + unique int id: @guard_stmt, + int body: @brace_stmt_or_none ref +); + +if_stmts( //dir=stmt + unique int id: @if_stmt, + int then: @stmt_or_none ref +); + +#keyset[id] +if_stmt_elses( //dir=stmt + int id: @if_stmt ref, + int else: @stmt_or_none ref +); + +while_stmts( //dir=stmt + unique int id: @while_stmt, + int body: @stmt_or_none ref +); + +@type = + @any_function_type +| @any_generic_type +| @any_metatype_type +| @builtin_type +| @dependent_member_type +| @dynamic_self_type +| @error_type +| @existential_type +| @in_out_type +| @l_value_type +| @module_type +| @pack_element_type +| @pack_expansion_type +| @pack_type +| @parameterized_protocol_type +| @protocol_composition_type +| @reference_storage_type +| @substitutable_type +| @sugar_type +| @tuple_type +| @unresolved_type +; + +#keyset[id] +types( //dir=type + int id: @type ref, + string name: string ref, + int canonical_type: @type_or_none ref +); + +type_reprs( //dir=type + unique int id: @type_repr, + int type_: @type_or_none ref +); + +@any_function_type = + @function_type +| @generic_function_type +; + +#keyset[id] +any_function_types( //dir=type + int id: @any_function_type ref, + int result: @type_or_none ref +); + +#keyset[id, index] +any_function_type_param_types( //dir=type + int id: @any_function_type ref, + int index: int ref, + int param_type: @type_or_none ref +); + +#keyset[id] +any_function_type_is_throwing( //dir=type + int id: @any_function_type ref +); + +#keyset[id] +any_function_type_is_async( //dir=type + int id: @any_function_type ref +); + +@any_generic_type = + @nominal_or_bound_generic_nominal_type +| @unbound_generic_type +; + +#keyset[id] +any_generic_types( //dir=type + int id: @any_generic_type ref, + int declaration: @generic_type_decl_or_none ref +); + +#keyset[id] +any_generic_type_parents( //dir=type + int id: @any_generic_type ref, + int parent: @type_or_none ref +); + +@any_metatype_type = + @existential_metatype_type +| @metatype_type +; + +@builtin_type = + @any_builtin_integer_type +| @builtin_bridge_object_type +| @builtin_default_actor_storage_type +| @builtin_executor_type +| @builtin_float_type +| @builtin_job_type +| @builtin_native_object_type +| @builtin_raw_pointer_type +| @builtin_raw_unsafe_continuation_type +| @builtin_unsafe_value_buffer_type +| @builtin_vector_type +; + +dependent_member_types( //dir=type + unique int id: @dependent_member_type, + int base_type: @type_or_none ref, + int associated_type_decl: @associated_type_decl_or_none ref +); + +dynamic_self_types( //dir=type + unique int id: @dynamic_self_type, + int static_self_type: @type_or_none ref +); + +error_types( //dir=type + unique int id: @error_type +); + +existential_types( //dir=type + unique int id: @existential_type, + int constraint: @type_or_none ref +); + +in_out_types( //dir=type + unique int id: @in_out_type, + int object_type: @type_or_none ref +); + +l_value_types( //dir=type + unique int id: @l_value_type, + int object_type: @type_or_none ref +); + +module_types( //dir=type + unique int id: @module_type, + int module: @module_decl_or_none ref +); + +pack_element_types( //dir=type + unique int id: @pack_element_type, + int pack_type: @type_or_none ref +); + +pack_expansion_types( //dir=type + unique int id: @pack_expansion_type, + int pattern_type: @type_or_none ref, + int count_type: @type_or_none ref +); + +pack_types( //dir=type + unique int id: @pack_type +); + +#keyset[id, index] +pack_type_elements( //dir=type + int id: @pack_type ref, + int index: int ref, + int element: @type_or_none ref +); + +parameterized_protocol_types( //dir=type + unique int id: @parameterized_protocol_type, + int base: @protocol_type_or_none ref +); + +#keyset[id, index] +parameterized_protocol_type_args( //dir=type + int id: @parameterized_protocol_type ref, + int index: int ref, + int arg: @type_or_none ref +); + +protocol_composition_types( //dir=type + unique int id: @protocol_composition_type +); + +#keyset[id, index] +protocol_composition_type_members( //dir=type + int id: @protocol_composition_type ref, + int index: int ref, + int member: @type_or_none ref +); + +@reference_storage_type = + @unmanaged_storage_type +| @unowned_storage_type +| @weak_storage_type +; + +#keyset[id] +reference_storage_types( //dir=type + int id: @reference_storage_type ref, + int referent_type: @type_or_none ref +); + +@substitutable_type = + @archetype_type +| @generic_type_param_type +; + +@sugar_type = + @paren_type +| @syntax_sugar_type +| @type_alias_type +; + +tuple_types( //dir=type + unique int id: @tuple_type +); + +#keyset[id, index] +tuple_type_types( //dir=type + int id: @tuple_type ref, + int index: int ref, + int type_: @type_or_none ref +); + +#keyset[id, index] +tuple_type_names( //dir=type + int id: @tuple_type ref, + int index: int ref, + string name: string ref +); + +unresolved_types( //dir=type + unique int id: @unresolved_type +); + +@any_builtin_integer_type = + @builtin_integer_literal_type +| @builtin_integer_type +; + +@archetype_type = + @local_archetype_type +| @opaque_type_archetype_type +| @pack_archetype_type +| @primary_archetype_type +; + +#keyset[id] +archetype_types( //dir=type + int id: @archetype_type ref, + int interface_type: @type_or_none ref +); + +#keyset[id] +archetype_type_superclasses( //dir=type + int id: @archetype_type ref, + int superclass: @type_or_none ref +); + +#keyset[id, index] +archetype_type_protocols( //dir=type + int id: @archetype_type ref, + int index: int ref, + int protocol: @protocol_decl_or_none ref +); + +builtin_bridge_object_types( //dir=type + unique int id: @builtin_bridge_object_type +); + +builtin_default_actor_storage_types( //dir=type + unique int id: @builtin_default_actor_storage_type +); + +builtin_executor_types( //dir=type + unique int id: @builtin_executor_type +); + +builtin_float_types( //dir=type + unique int id: @builtin_float_type +); + +builtin_job_types( //dir=type + unique int id: @builtin_job_type +); + +builtin_native_object_types( //dir=type + unique int id: @builtin_native_object_type +); + +builtin_raw_pointer_types( //dir=type + unique int id: @builtin_raw_pointer_type +); + +builtin_raw_unsafe_continuation_types( //dir=type + unique int id: @builtin_raw_unsafe_continuation_type +); + +builtin_unsafe_value_buffer_types( //dir=type + unique int id: @builtin_unsafe_value_buffer_type +); + +builtin_vector_types( //dir=type + unique int id: @builtin_vector_type +); + +existential_metatype_types( //dir=type + unique int id: @existential_metatype_type +); + +function_types( //dir=type + unique int id: @function_type +); + +generic_function_types( //dir=type + unique int id: @generic_function_type +); + +#keyset[id, index] +generic_function_type_generic_params( //dir=type + int id: @generic_function_type ref, + int index: int ref, + int generic_param: @generic_type_param_type_or_none ref +); + +generic_type_param_types( //dir=type + unique int id: @generic_type_param_type +); + +metatype_types( //dir=type + unique int id: @metatype_type +); + +@nominal_or_bound_generic_nominal_type = + @bound_generic_type +| @nominal_type +; + +paren_types( //dir=type + unique int id: @paren_type, + int type_: @type_or_none ref +); + +@syntax_sugar_type = + @dictionary_type +| @unary_syntax_sugar_type +; + +type_alias_types( //dir=type + unique int id: @type_alias_type, + int decl: @type_alias_decl_or_none ref +); + +unbound_generic_types( //dir=type + unique int id: @unbound_generic_type +); + +unmanaged_storage_types( //dir=type + unique int id: @unmanaged_storage_type +); + +unowned_storage_types( //dir=type + unique int id: @unowned_storage_type +); + +weak_storage_types( //dir=type + unique int id: @weak_storage_type +); + +@bound_generic_type = + @bound_generic_class_type +| @bound_generic_enum_type +| @bound_generic_struct_type +; + +#keyset[id, index] +bound_generic_type_arg_types( //dir=type + int id: @bound_generic_type ref, + int index: int ref, + int arg_type: @type_or_none ref +); + +builtin_integer_literal_types( //dir=type + unique int id: @builtin_integer_literal_type +); + +builtin_integer_types( //dir=type + unique int id: @builtin_integer_type +); + +#keyset[id] +builtin_integer_type_widths( //dir=type + int id: @builtin_integer_type ref, + int width: int ref +); + +dictionary_types( //dir=type + unique int id: @dictionary_type, + int key_type: @type_or_none ref, + int value_type: @type_or_none ref +); + +@local_archetype_type = + @element_archetype_type +| @opened_archetype_type +; + +@nominal_type = + @class_type +| @enum_type +| @protocol_type +| @struct_type +; + +opaque_type_archetype_types( //dir=type + unique int id: @opaque_type_archetype_type, + int declaration: @opaque_type_decl_or_none ref +); + +pack_archetype_types( //dir=type + unique int id: @pack_archetype_type +); + +primary_archetype_types( //dir=type + unique int id: @primary_archetype_type +); + +@unary_syntax_sugar_type = + @array_slice_type +| @optional_type +| @variadic_sequence_type +; + +#keyset[id] +unary_syntax_sugar_types( //dir=type + int id: @unary_syntax_sugar_type ref, + int base_type: @type_or_none ref +); + +array_slice_types( //dir=type + unique int id: @array_slice_type +); + +bound_generic_class_types( //dir=type + unique int id: @bound_generic_class_type +); + +bound_generic_enum_types( //dir=type + unique int id: @bound_generic_enum_type +); + +bound_generic_struct_types( //dir=type + unique int id: @bound_generic_struct_type +); + +class_types( //dir=type + unique int id: @class_type +); + +element_archetype_types( //dir=type + unique int id: @element_archetype_type +); + +enum_types( //dir=type + unique int id: @enum_type +); + +opened_archetype_types( //dir=type + unique int id: @opened_archetype_type +); + +optional_types( //dir=type + unique int id: @optional_type +); + +protocol_types( //dir=type + unique int id: @protocol_type +); + +struct_types( //dir=type + unique int id: @struct_type +); + +variadic_sequence_types( //dir=type + unique int id: @variadic_sequence_type +); + +@accessor_or_none = + @accessor +| @unspecified_element +; + +@argument_or_none = + @argument +| @unspecified_element +; + +@associated_type_decl_or_none = + @associated_type_decl +| @unspecified_element +; + +@ast_node_or_none = + @ast_node +| @unspecified_element +; + +@availability_info_or_none = + @availability_info +| @unspecified_element +; + +@availability_spec_or_none = + @availability_spec +| @unspecified_element +; + +@brace_stmt_or_none = + @brace_stmt +| @unspecified_element +; + +@captured_decl_or_none = + @captured_decl +| @unspecified_element +; + +@case_label_item_or_none = + @case_label_item +| @unspecified_element +; + +@case_stmt_or_none = + @case_stmt +| @unspecified_element +; + +@closure_expr_or_none = + @closure_expr +| @unspecified_element +; + +@condition_element_or_none = + @condition_element +| @unspecified_element +; + +@decl_or_none = + @decl +| @unspecified_element +; + +@enum_element_decl_or_none = + @enum_element_decl +| @unspecified_element +; + +@expr_or_none = + @expr +| @unspecified_element +; + +@file_or_none = + @file +| @unspecified_element +; + +@function_or_none = + @function +| @unspecified_element +; + +@generic_type_decl_or_none = + @generic_type_decl +| @unspecified_element +; + +@generic_type_param_decl_or_none = + @generic_type_param_decl +| @unspecified_element +; + +@generic_type_param_type_or_none = + @generic_type_param_type +| @unspecified_element +; + +@initializer_or_none = + @initializer +| @unspecified_element +; + +@key_path_component_or_none = + @key_path_component +| @unspecified_element +; + +@location_or_none = + @location +| @unspecified_element +; + +@macro_role_or_none = + @macro_role +| @unspecified_element +; + +@module_decl_or_none = + @module_decl +| @unspecified_element +; + +@nominal_type_decl_or_none = + @nominal_type_decl +| @unspecified_element +; + +@opaque_type_decl_or_none = + @opaque_type_decl +| @unspecified_element +; + +@opaque_value_expr_or_none = + @opaque_value_expr +| @unspecified_element +; + +@param_decl_or_none = + @param_decl +| @unspecified_element +; + +@pattern_or_none = + @pattern +| @unspecified_element +; + +@pattern_binding_decl_or_none = + @pattern_binding_decl +| @unspecified_element +; + +@precedence_group_decl_or_none = + @precedence_group_decl +| @unspecified_element +; + +@protocol_decl_or_none = + @protocol_decl +| @unspecified_element +; + +@protocol_type_or_none = + @protocol_type +| @unspecified_element +; + +@stmt_or_none = + @stmt +| @unspecified_element +; + +@stmt_condition_or_none = + @stmt_condition +| @unspecified_element +; + +@string_literal_expr_or_none = + @string_literal_expr +| @unspecified_element +; + +@tap_expr_or_none = + @tap_expr +| @unspecified_element +; + +@type_or_none = + @type +| @unspecified_element +; + +@type_alias_decl_or_none = + @type_alias_decl +| @unspecified_element +; + +@type_expr_or_none = + @type_expr +| @unspecified_element +; + +@type_repr_or_none = + @type_repr +| @unspecified_element +; + +@value_decl_or_none = + @unspecified_element +| @value_decl +; + +@var_decl_or_none = + @unspecified_element +| @var_decl +; diff --git a/swift/downgrades/33db81ad4b606ff9a476c8dabeb9fffbf61aa829/swift.dbscheme b/swift/downgrades/33db81ad4b606ff9a476c8dabeb9fffbf61aa829/swift.dbscheme new file mode 100644 index 000000000000..44c4818a8987 --- /dev/null +++ b/swift/downgrades/33db81ad4b606ff9a476c8dabeb9fffbf61aa829/swift.dbscheme @@ -0,0 +1,2786 @@ +// generated by codegen/codegen.py, do not edit + +// from prefix.dbscheme +/** + * The source location of the snapshot. + */ +sourceLocationPrefix( + string prefix: string ref +); + + +// from schema.py + +@element = + @file +| @generic_context +| @locatable +| @location +| @type +; + +#keyset[id] +element_is_unknown( + int id: @element ref +); + +@file = + @db_file +; + +#keyset[id] +files( + int id: @file ref, + string name: string ref +); + +#keyset[id] +file_is_successfully_extracted( + int id: @file ref +); + +@locatable = + @argument +| @ast_node +| @comment +| @diagnostics +| @error_element +; + +#keyset[id] +locatable_locations( + int id: @locatable ref, + int location: @location_or_none ref +); + +@location = + @db_location +; + +#keyset[id] +locations( + int id: @location ref, + int file: @file_or_none ref, + int start_line: int ref, + int start_column: int ref, + int end_line: int ref, + int end_column: int ref +); + +@ast_node = + @availability_info +| @availability_spec +| @callable +| @case_label_item +| @condition_element +| @decl +| @expr +| @key_path_component +| @macro_role +| @pattern +| @stmt +| @stmt_condition +| @type_repr +; + +comments( + unique int id: @comment, + string text: string ref +); + +db_files( + unique int id: @db_file +); + +db_locations( + unique int id: @db_location +); + +diagnostics( + unique int id: @diagnostics, + string text: string ref, + int kind: int ref +); + +@error_element = + @error_expr +| @error_type +| @overloaded_decl_ref_expr +| @unresolved_decl_ref_expr +| @unresolved_dot_expr +| @unresolved_member_chain_result_expr +| @unresolved_member_expr +| @unresolved_pattern_expr +| @unresolved_specialize_expr +| @unresolved_type +| @unresolved_type_conversion_expr +| @unspecified_element +; + +availability_infos( + unique int id: @availability_info +); + +#keyset[id] +availability_info_is_unavailable( + int id: @availability_info ref +); + +#keyset[id, index] +availability_info_specs( + int id: @availability_info ref, + int index: int ref, + int spec: @availability_spec_or_none ref +); + +@availability_spec = + @other_availability_spec +| @platform_version_availability_spec +; + +@callable = + @closure_expr +| @function +; + +#keyset[id] +callable_names( + int id: @callable ref, + string name: string ref +); + +#keyset[id] +callable_self_params( + int id: @callable ref, + int self_param: @param_decl_or_none ref +); + +#keyset[id, index] +callable_params( + int id: @callable ref, + int index: int ref, + int param: @param_decl_or_none ref +); + +#keyset[id] +callable_bodies( + int id: @callable ref, + int body: @brace_stmt_or_none ref +); + +#keyset[id, index] +callable_captures( + int id: @callable ref, + int index: int ref, + int capture: @captured_decl_or_none ref +); + +key_path_components( + unique int id: @key_path_component, + int kind: int ref, + int component_type: @type_or_none ref +); + +#keyset[id, index] +key_path_component_subscript_arguments( + int id: @key_path_component ref, + int index: int ref, + int subscript_argument: @argument_or_none ref +); + +#keyset[id] +key_path_component_tuple_indices( + int id: @key_path_component ref, + int tuple_index: int ref +); + +#keyset[id] +key_path_component_decl_refs( + int id: @key_path_component ref, + int decl_ref: @value_decl_or_none ref +); + +macro_roles( + unique int id: @macro_role, + int kind: int ref, + int macro_syntax: int ref +); + +#keyset[id, index] +macro_role_conformances( + int id: @macro_role ref, + int index: int ref, + int conformance: @type_expr_or_none ref +); + +#keyset[id, index] +macro_role_names( + int id: @macro_role ref, + int index: int ref, + string name: string ref +); + +unspecified_elements( + unique int id: @unspecified_element, + string property: string ref, + string error: string ref +); + +#keyset[id] +unspecified_element_parents( + int id: @unspecified_element ref, + int parent: @element ref +); + +#keyset[id] +unspecified_element_indices( + int id: @unspecified_element ref, + int index: int ref +); + +#keyset[id, index] +unspecified_element_children( + int id: @unspecified_element ref, + int index: int ref, + int child: @ast_node_or_none ref +); + +other_availability_specs( + unique int id: @other_availability_spec +); + +platform_version_availability_specs( + unique int id: @platform_version_availability_spec, + string platform: string ref, + string version: string ref +); + +@decl = + @captured_decl +| @enum_case_decl +| @extension_decl +| @if_config_decl +| @import_decl +| @missing_member_decl +| @operator_decl +| @pattern_binding_decl +| @pound_diagnostic_decl +| @precedence_group_decl +| @top_level_code_decl +| @value_decl +; + +#keyset[id] +decls( //dir=decl + int id: @decl ref, + int module: @module_decl_or_none ref +); + +#keyset[id, index] +decl_members( //dir=decl + int id: @decl ref, + int index: int ref, + int member: @decl_or_none ref +); + +@generic_context = + @extension_decl +| @function +| @generic_type_decl +| @macro_decl +| @subscript_decl +; + +#keyset[id, index] +generic_context_generic_type_params( //dir=decl + int id: @generic_context ref, + int index: int ref, + int generic_type_param: @generic_type_param_decl_or_none ref +); + +captured_decls( //dir=decl + unique int id: @captured_decl, + int decl: @value_decl_or_none ref +); + +#keyset[id] +captured_decl_is_direct( //dir=decl + int id: @captured_decl ref +); + +#keyset[id] +captured_decl_is_escaping( //dir=decl + int id: @captured_decl ref +); + +enum_case_decls( //dir=decl + unique int id: @enum_case_decl +); + +#keyset[id, index] +enum_case_decl_elements( //dir=decl + int id: @enum_case_decl ref, + int index: int ref, + int element: @enum_element_decl_or_none ref +); + +extension_decls( //dir=decl + unique int id: @extension_decl, + int extended_type_decl: @nominal_type_decl_or_none ref +); + +#keyset[id, index] +extension_decl_protocols( //dir=decl + int id: @extension_decl ref, + int index: int ref, + int protocol: @protocol_decl_or_none ref +); + +if_config_decls( //dir=decl + unique int id: @if_config_decl +); + +#keyset[id, index] +if_config_decl_active_elements( //dir=decl + int id: @if_config_decl ref, + int index: int ref, + int active_element: @ast_node_or_none ref +); + +import_decls( //dir=decl + unique int id: @import_decl +); + +#keyset[id] +import_decl_is_exported( //dir=decl + int id: @import_decl ref +); + +#keyset[id] +import_decl_imported_modules( //dir=decl + int id: @import_decl ref, + int imported_module: @module_decl_or_none ref +); + +#keyset[id, index] +import_decl_declarations( //dir=decl + int id: @import_decl ref, + int index: int ref, + int declaration: @value_decl_or_none ref +); + +missing_member_decls( //dir=decl + unique int id: @missing_member_decl, + string name: string ref +); + +@operator_decl = + @infix_operator_decl +| @postfix_operator_decl +| @prefix_operator_decl +; + +#keyset[id] +operator_decls( //dir=decl + int id: @operator_decl ref, + string name: string ref +); + +pattern_binding_decls( //dir=decl + unique int id: @pattern_binding_decl +); + +#keyset[id, index] +pattern_binding_decl_inits( //dir=decl + int id: @pattern_binding_decl ref, + int index: int ref, + int init: @expr_or_none ref +); + +#keyset[id, index] +pattern_binding_decl_patterns( //dir=decl + int id: @pattern_binding_decl ref, + int index: int ref, + int pattern: @pattern_or_none ref +); + +pound_diagnostic_decls( //dir=decl + unique int id: @pound_diagnostic_decl, + int kind: int ref, + int message: @string_literal_expr_or_none ref +); + +precedence_group_decls( //dir=decl + unique int id: @precedence_group_decl +); + +top_level_code_decls( //dir=decl + unique int id: @top_level_code_decl, + int body: @brace_stmt_or_none ref +); + +@value_decl = + @abstract_storage_decl +| @enum_element_decl +| @function +| @macro_decl +| @type_decl +; + +#keyset[id] +value_decls( //dir=decl + int id: @value_decl ref, + int interface_type: @type_or_none ref +); + +@abstract_storage_decl = + @subscript_decl +| @var_decl +; + +#keyset[id, index] +abstract_storage_decl_accessors( //dir=decl + int id: @abstract_storage_decl ref, + int index: int ref, + int accessor: @accessor_or_none ref +); + +enum_element_decls( //dir=decl + unique int id: @enum_element_decl, + string name: string ref +); + +#keyset[id, index] +enum_element_decl_params( //dir=decl + int id: @enum_element_decl ref, + int index: int ref, + int param: @param_decl_or_none ref +); + +@function = + @accessor_or_named_function +| @deinitializer +| @initializer +; + +infix_operator_decls( //dir=decl + unique int id: @infix_operator_decl +); + +#keyset[id] +infix_operator_decl_precedence_groups( //dir=decl + int id: @infix_operator_decl ref, + int precedence_group: @precedence_group_decl_or_none ref +); + +macro_decls( //dir=decl + unique int id: @macro_decl, + string name: string ref +); + +#keyset[id, index] +macro_decl_parameters( //dir=decl + int id: @macro_decl ref, + int index: int ref, + int parameter: @param_decl_or_none ref +); + +#keyset[id, index] +macro_decl_roles( //dir=decl + int id: @macro_decl ref, + int index: int ref, + int role: @macro_role_or_none ref +); + +postfix_operator_decls( //dir=decl + unique int id: @postfix_operator_decl +); + +prefix_operator_decls( //dir=decl + unique int id: @prefix_operator_decl +); + +@type_decl = + @abstract_type_param_decl +| @generic_type_decl +| @module_decl +; + +#keyset[id] +type_decls( //dir=decl + int id: @type_decl ref, + string name: string ref +); + +#keyset[id, index] +type_decl_inherited_types( //dir=decl + int id: @type_decl ref, + int index: int ref, + int inherited_type: @type_or_none ref +); + +@abstract_type_param_decl = + @associated_type_decl +| @generic_type_param_decl +; + +@accessor_or_named_function = + @accessor +| @named_function +; + +deinitializers( //dir=decl + unique int id: @deinitializer +); + +@generic_type_decl = + @nominal_type_decl +| @opaque_type_decl +| @type_alias_decl +; + +initializers( //dir=decl + unique int id: @initializer +); + +module_decls( //dir=decl + unique int id: @module_decl +); + +#keyset[id] +module_decl_is_builtin_module( //dir=decl + int id: @module_decl ref +); + +#keyset[id] +module_decl_is_system_module( //dir=decl + int id: @module_decl ref +); + +module_decl_imported_modules( //dir=decl + int id: @module_decl ref, + int imported_module: @module_decl_or_none ref +); + +module_decl_exported_modules( //dir=decl + int id: @module_decl ref, + int exported_module: @module_decl_or_none ref +); + +subscript_decls( //dir=decl + unique int id: @subscript_decl, + int element_type: @type_or_none ref +); + +#keyset[id, index] +subscript_decl_params( //dir=decl + int id: @subscript_decl ref, + int index: int ref, + int param: @param_decl_or_none ref +); + +@var_decl = + @concrete_var_decl +| @param_decl +; + +#keyset[id] +var_decls( //dir=decl + int id: @var_decl ref, + string name: string ref, + int type_: @type_or_none ref +); + +#keyset[id] +var_decl_attached_property_wrapper_types( //dir=decl + int id: @var_decl ref, + int attached_property_wrapper_type: @type_or_none ref +); + +#keyset[id] +var_decl_parent_patterns( //dir=decl + int id: @var_decl ref, + int parent_pattern: @pattern_or_none ref +); + +#keyset[id] +var_decl_parent_initializers( //dir=decl + int id: @var_decl ref, + int parent_initializer: @expr_or_none ref +); + +#keyset[id] +var_decl_property_wrapper_backing_var_bindings( //dir=decl + int id: @var_decl ref, + int property_wrapper_backing_var_binding: @pattern_binding_decl_or_none ref +); + +#keyset[id] +var_decl_property_wrapper_backing_vars( //dir=decl + int id: @var_decl ref, + int property_wrapper_backing_var: @var_decl_or_none ref +); + +#keyset[id] +var_decl_property_wrapper_projection_var_bindings( //dir=decl + int id: @var_decl ref, + int property_wrapper_projection_var_binding: @pattern_binding_decl_or_none ref +); + +#keyset[id] +var_decl_property_wrapper_projection_vars( //dir=decl + int id: @var_decl ref, + int property_wrapper_projection_var: @var_decl_or_none ref +); + +accessors( //dir=decl + unique int id: @accessor +); + +#keyset[id] +accessor_is_getter( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_setter( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_will_set( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_did_set( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_read( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_modify( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_unsafe_address( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_unsafe_mutable_address( //dir=decl + int id: @accessor ref +); + +associated_type_decls( //dir=decl + unique int id: @associated_type_decl +); + +concrete_var_decls( //dir=decl + unique int id: @concrete_var_decl, + int introducer_int: int ref +); + +generic_type_param_decls( //dir=decl + unique int id: @generic_type_param_decl +); + +named_functions( //dir=decl + unique int id: @named_function +); + +@nominal_type_decl = + @class_decl +| @enum_decl +| @protocol_decl +| @struct_decl +; + +#keyset[id] +nominal_type_decls( //dir=decl + int id: @nominal_type_decl ref, + int type_: @type_or_none ref +); + +opaque_type_decls( //dir=decl + unique int id: @opaque_type_decl, + int naming_declaration: @value_decl_or_none ref +); + +#keyset[id, index] +opaque_type_decl_opaque_generic_params( //dir=decl + int id: @opaque_type_decl ref, + int index: int ref, + int opaque_generic_param: @generic_type_param_type_or_none ref +); + +param_decls( //dir=decl + unique int id: @param_decl +); + +#keyset[id] +param_decl_is_inout( //dir=decl + int id: @param_decl ref +); + +#keyset[id] +param_decl_property_wrapper_local_wrapped_var_bindings( //dir=decl + int id: @param_decl ref, + int property_wrapper_local_wrapped_var_binding: @pattern_binding_decl_or_none ref +); + +#keyset[id] +param_decl_property_wrapper_local_wrapped_vars( //dir=decl + int id: @param_decl ref, + int property_wrapper_local_wrapped_var: @var_decl_or_none ref +); + +type_alias_decls( //dir=decl + unique int id: @type_alias_decl, + int aliased_type: @type_or_none ref +); + +class_decls( //dir=decl + unique int id: @class_decl +); + +enum_decls( //dir=decl + unique int id: @enum_decl +); + +protocol_decls( //dir=decl + unique int id: @protocol_decl +); + +struct_decls( //dir=decl + unique int id: @struct_decl +); + +arguments( //dir=expr + unique int id: @argument, + string label: string ref, + int expr: @expr_or_none ref +); + +@expr = + @any_try_expr +| @applied_property_wrapper_expr +| @apply_expr +| @assign_expr +| @bind_optional_expr +| @capture_list_expr +| @closure_expr +| @collection_expr +| @consume_expr +| @copy_expr +| @decl_ref_expr +| @default_argument_expr +| @discard_assignment_expr +| @dot_syntax_base_ignored_expr +| @dynamic_type_expr +| @enum_is_case_expr +| @error_expr +| @explicit_cast_expr +| @force_value_expr +| @identity_expr +| @if_expr +| @implicit_conversion_expr +| @in_out_expr +| @key_path_application_expr +| @key_path_dot_expr +| @key_path_expr +| @lazy_initialization_expr +| @literal_expr +| @lookup_expr +| @make_temporarily_escapable_expr +| @materialize_pack_expr +| @obj_c_selector_expr +| @one_way_expr +| @opaque_value_expr +| @open_existential_expr +| @optional_evaluation_expr +| @other_initializer_ref_expr +| @overloaded_decl_ref_expr +| @pack_element_expr +| @pack_expansion_expr +| @property_wrapper_value_placeholder_expr +| @rebind_self_in_initializer_expr +| @sequence_expr +| @single_value_stmt_expr +| @super_ref_expr +| @tap_expr +| @tuple_element_expr +| @tuple_expr +| @type_expr +| @unresolved_decl_ref_expr +| @unresolved_dot_expr +| @unresolved_member_expr +| @unresolved_pattern_expr +| @unresolved_specialize_expr +| @vararg_expansion_expr +; + +#keyset[id] +expr_types( //dir=expr + int id: @expr ref, + int type_: @type_or_none ref +); + +@any_try_expr = + @force_try_expr +| @optional_try_expr +| @try_expr +; + +#keyset[id] +any_try_exprs( //dir=expr + int id: @any_try_expr ref, + int sub_expr: @expr_or_none ref +); + +applied_property_wrapper_exprs( //dir=expr + unique int id: @applied_property_wrapper_expr, + int kind: int ref, + int value: @expr_or_none ref, + int param: @param_decl_or_none ref +); + +@apply_expr = + @binary_expr +| @call_expr +| @postfix_unary_expr +| @prefix_unary_expr +| @self_apply_expr +; + +#keyset[id] +apply_exprs( //dir=expr + int id: @apply_expr ref, + int function: @expr_or_none ref +); + +#keyset[id, index] +apply_expr_arguments( //dir=expr + int id: @apply_expr ref, + int index: int ref, + int argument: @argument_or_none ref +); + +assign_exprs( //dir=expr + unique int id: @assign_expr, + int dest: @expr_or_none ref, + int source: @expr_or_none ref +); + +bind_optional_exprs( //dir=expr + unique int id: @bind_optional_expr, + int sub_expr: @expr_or_none ref +); + +capture_list_exprs( //dir=expr + unique int id: @capture_list_expr, + int closure_body: @closure_expr_or_none ref +); + +#keyset[id, index] +capture_list_expr_binding_decls( //dir=expr + int id: @capture_list_expr ref, + int index: int ref, + int binding_decl: @pattern_binding_decl_or_none ref +); + +@closure_expr = + @auto_closure_expr +| @explicit_closure_expr +; + +@collection_expr = + @array_expr +| @dictionary_expr +; + +consume_exprs( //dir=expr + unique int id: @consume_expr, + int sub_expr: @expr_or_none ref +); + +copy_exprs( //dir=expr + unique int id: @copy_expr, + int sub_expr: @expr_or_none ref +); + +decl_ref_exprs( //dir=expr + unique int id: @decl_ref_expr, + int decl: @decl_or_none ref +); + +#keyset[id, index] +decl_ref_expr_replacement_types( //dir=expr + int id: @decl_ref_expr ref, + int index: int ref, + int replacement_type: @type_or_none ref +); + +#keyset[id] +decl_ref_expr_has_direct_to_storage_semantics( //dir=expr + int id: @decl_ref_expr ref +); + +#keyset[id] +decl_ref_expr_has_direct_to_implementation_semantics( //dir=expr + int id: @decl_ref_expr ref +); + +#keyset[id] +decl_ref_expr_has_ordinary_semantics( //dir=expr + int id: @decl_ref_expr ref +); + +#keyset[id] +decl_ref_expr_has_distributed_thunk_semantics( //dir=expr + int id: @decl_ref_expr ref +); + +default_argument_exprs( //dir=expr + unique int id: @default_argument_expr, + int param_decl: @param_decl_or_none ref, + int param_index: int ref +); + +#keyset[id] +default_argument_expr_caller_side_defaults( //dir=expr + int id: @default_argument_expr ref, + int caller_side_default: @expr_or_none ref +); + +discard_assignment_exprs( //dir=expr + unique int id: @discard_assignment_expr +); + +dot_syntax_base_ignored_exprs( //dir=expr + unique int id: @dot_syntax_base_ignored_expr, + int qualifier: @expr_or_none ref, + int sub_expr: @expr_or_none ref +); + +dynamic_type_exprs( //dir=expr + unique int id: @dynamic_type_expr, + int base: @expr_or_none ref +); + +enum_is_case_exprs( //dir=expr + unique int id: @enum_is_case_expr, + int sub_expr: @expr_or_none ref, + int element: @enum_element_decl_or_none ref +); + +error_exprs( //dir=expr + unique int id: @error_expr +); + +@explicit_cast_expr = + @checked_cast_expr +| @coerce_expr +; + +#keyset[id] +explicit_cast_exprs( //dir=expr + int id: @explicit_cast_expr ref, + int sub_expr: @expr_or_none ref +); + +force_value_exprs( //dir=expr + unique int id: @force_value_expr, + int sub_expr: @expr_or_none ref +); + +@identity_expr = + @await_expr +| @borrow_expr +| @dot_self_expr +| @paren_expr +| @unresolved_member_chain_result_expr +; + +#keyset[id] +identity_exprs( //dir=expr + int id: @identity_expr ref, + int sub_expr: @expr_or_none ref +); + +if_exprs( //dir=expr + unique int id: @if_expr, + int condition: @expr_or_none ref, + int then_expr: @expr_or_none ref, + int else_expr: @expr_or_none ref +); + +@implicit_conversion_expr = + @abi_safe_conversion_expr +| @any_hashable_erasure_expr +| @archetype_to_super_expr +| @array_to_pointer_expr +| @bridge_from_obj_c_expr +| @bridge_to_obj_c_expr +| @class_metatype_to_object_expr +| @collection_upcast_conversion_expr +| @conditional_bridge_from_obj_c_expr +| @covariant_function_conversion_expr +| @covariant_return_conversion_expr +| @derived_to_base_expr +| @destructure_tuple_expr +| @differentiable_function_expr +| @differentiable_function_extract_original_expr +| @erasure_expr +| @existential_metatype_to_object_expr +| @foreign_object_conversion_expr +| @function_conversion_expr +| @in_out_to_pointer_expr +| @inject_into_optional_expr +| @linear_function_expr +| @linear_function_extract_original_expr +| @linear_to_differentiable_function_expr +| @load_expr +| @metatype_conversion_expr +| @pointer_to_pointer_expr +| @protocol_metatype_to_object_expr +| @string_to_pointer_expr +| @underlying_to_opaque_expr +| @unevaluated_instance_expr +| @unresolved_type_conversion_expr +; + +#keyset[id] +implicit_conversion_exprs( //dir=expr + int id: @implicit_conversion_expr ref, + int sub_expr: @expr_or_none ref +); + +in_out_exprs( //dir=expr + unique int id: @in_out_expr, + int sub_expr: @expr_or_none ref +); + +key_path_application_exprs( //dir=expr + unique int id: @key_path_application_expr, + int base: @expr_or_none ref, + int key_path: @expr_or_none ref +); + +key_path_dot_exprs( //dir=expr + unique int id: @key_path_dot_expr +); + +key_path_exprs( //dir=expr + unique int id: @key_path_expr +); + +#keyset[id] +key_path_expr_roots( //dir=expr + int id: @key_path_expr ref, + int root: @type_repr_or_none ref +); + +#keyset[id, index] +key_path_expr_components( //dir=expr + int id: @key_path_expr ref, + int index: int ref, + int component: @key_path_component_or_none ref +); + +lazy_initialization_exprs( //dir=expr + unique int id: @lazy_initialization_expr, + int sub_expr: @expr_or_none ref +); + +@literal_expr = + @builtin_literal_expr +| @interpolated_string_literal_expr +| @nil_literal_expr +| @object_literal_expr +| @regex_literal_expr +; + +@lookup_expr = + @dynamic_lookup_expr +| @member_ref_expr +| @subscript_expr +; + +#keyset[id] +lookup_exprs( //dir=expr + int id: @lookup_expr ref, + int base: @expr_or_none ref +); + +#keyset[id] +lookup_expr_members( //dir=expr + int id: @lookup_expr ref, + int member: @decl_or_none ref +); + +make_temporarily_escapable_exprs( //dir=expr + unique int id: @make_temporarily_escapable_expr, + int escaping_closure: @opaque_value_expr_or_none ref, + int nonescaping_closure: @expr_or_none ref, + int sub_expr: @expr_or_none ref +); + +materialize_pack_exprs( //dir=expr + unique int id: @materialize_pack_expr, + int sub_expr: @expr_or_none ref +); + +obj_c_selector_exprs( //dir=expr + unique int id: @obj_c_selector_expr, + int sub_expr: @expr_or_none ref, + int method: @function_or_none ref +); + +one_way_exprs( //dir=expr + unique int id: @one_way_expr, + int sub_expr: @expr_or_none ref +); + +opaque_value_exprs( //dir=expr + unique int id: @opaque_value_expr +); + +open_existential_exprs( //dir=expr + unique int id: @open_existential_expr, + int sub_expr: @expr_or_none ref, + int existential: @expr_or_none ref, + int opaque_expr: @opaque_value_expr_or_none ref +); + +optional_evaluation_exprs( //dir=expr + unique int id: @optional_evaluation_expr, + int sub_expr: @expr_or_none ref +); + +other_initializer_ref_exprs( //dir=expr + unique int id: @other_initializer_ref_expr, + int initializer: @initializer_or_none ref +); + +overloaded_decl_ref_exprs( //dir=expr + unique int id: @overloaded_decl_ref_expr +); + +#keyset[id, index] +overloaded_decl_ref_expr_possible_declarations( //dir=expr + int id: @overloaded_decl_ref_expr ref, + int index: int ref, + int possible_declaration: @value_decl_or_none ref +); + +pack_element_exprs( //dir=expr + unique int id: @pack_element_expr, + int sub_expr: @expr_or_none ref +); + +pack_expansion_exprs( //dir=expr + unique int id: @pack_expansion_expr, + int pattern_expr: @expr_or_none ref +); + +property_wrapper_value_placeholder_exprs( //dir=expr + unique int id: @property_wrapper_value_placeholder_expr, + int placeholder: @opaque_value_expr_or_none ref +); + +#keyset[id] +property_wrapper_value_placeholder_expr_wrapped_values( //dir=expr + int id: @property_wrapper_value_placeholder_expr ref, + int wrapped_value: @expr_or_none ref +); + +rebind_self_in_initializer_exprs( //dir=expr + unique int id: @rebind_self_in_initializer_expr, + int sub_expr: @expr_or_none ref, + int self: @var_decl_or_none ref +); + +sequence_exprs( //dir=expr + unique int id: @sequence_expr +); + +#keyset[id, index] +sequence_expr_elements( //dir=expr + int id: @sequence_expr ref, + int index: int ref, + int element: @expr_or_none ref +); + +single_value_stmt_exprs( //dir=expr + unique int id: @single_value_stmt_expr, + int stmt: @stmt_or_none ref +); + +super_ref_exprs( //dir=expr + unique int id: @super_ref_expr, + int self: @var_decl_or_none ref +); + +tap_exprs( //dir=expr + unique int id: @tap_expr, + int body: @brace_stmt_or_none ref, + int var: @var_decl_or_none ref +); + +#keyset[id] +tap_expr_sub_exprs( //dir=expr + int id: @tap_expr ref, + int sub_expr: @expr_or_none ref +); + +tuple_element_exprs( //dir=expr + unique int id: @tuple_element_expr, + int sub_expr: @expr_or_none ref, + int index: int ref +); + +tuple_exprs( //dir=expr + unique int id: @tuple_expr +); + +#keyset[id, index] +tuple_expr_elements( //dir=expr + int id: @tuple_expr ref, + int index: int ref, + int element: @expr_or_none ref +); + +type_exprs( //dir=expr + unique int id: @type_expr +); + +#keyset[id] +type_expr_type_reprs( //dir=expr + int id: @type_expr ref, + int type_repr: @type_repr_or_none ref +); + +unresolved_decl_ref_exprs( //dir=expr + unique int id: @unresolved_decl_ref_expr +); + +#keyset[id] +unresolved_decl_ref_expr_names( //dir=expr + int id: @unresolved_decl_ref_expr ref, + string name: string ref +); + +unresolved_dot_exprs( //dir=expr + unique int id: @unresolved_dot_expr, + int base: @expr_or_none ref, + string name: string ref +); + +unresolved_member_exprs( //dir=expr + unique int id: @unresolved_member_expr, + string name: string ref +); + +unresolved_pattern_exprs( //dir=expr + unique int id: @unresolved_pattern_expr, + int sub_pattern: @pattern_or_none ref +); + +unresolved_specialize_exprs( //dir=expr + unique int id: @unresolved_specialize_expr, + int sub_expr: @expr_or_none ref +); + +vararg_expansion_exprs( //dir=expr + unique int id: @vararg_expansion_expr, + int sub_expr: @expr_or_none ref +); + +abi_safe_conversion_exprs( //dir=expr + unique int id: @abi_safe_conversion_expr +); + +any_hashable_erasure_exprs( //dir=expr + unique int id: @any_hashable_erasure_expr +); + +archetype_to_super_exprs( //dir=expr + unique int id: @archetype_to_super_expr +); + +array_exprs( //dir=expr + unique int id: @array_expr +); + +#keyset[id, index] +array_expr_elements( //dir=expr + int id: @array_expr ref, + int index: int ref, + int element: @expr_or_none ref +); + +array_to_pointer_exprs( //dir=expr + unique int id: @array_to_pointer_expr +); + +auto_closure_exprs( //dir=expr + unique int id: @auto_closure_expr +); + +await_exprs( //dir=expr + unique int id: @await_expr +); + +binary_exprs( //dir=expr + unique int id: @binary_expr +); + +borrow_exprs( //dir=expr + unique int id: @borrow_expr +); + +bridge_from_obj_c_exprs( //dir=expr + unique int id: @bridge_from_obj_c_expr +); + +bridge_to_obj_c_exprs( //dir=expr + unique int id: @bridge_to_obj_c_expr +); + +@builtin_literal_expr = + @boolean_literal_expr +| @magic_identifier_literal_expr +| @number_literal_expr +| @string_literal_expr +; + +call_exprs( //dir=expr + unique int id: @call_expr +); + +@checked_cast_expr = + @conditional_checked_cast_expr +| @forced_checked_cast_expr +| @is_expr +; + +class_metatype_to_object_exprs( //dir=expr + unique int id: @class_metatype_to_object_expr +); + +coerce_exprs( //dir=expr + unique int id: @coerce_expr +); + +collection_upcast_conversion_exprs( //dir=expr + unique int id: @collection_upcast_conversion_expr +); + +conditional_bridge_from_obj_c_exprs( //dir=expr + unique int id: @conditional_bridge_from_obj_c_expr +); + +covariant_function_conversion_exprs( //dir=expr + unique int id: @covariant_function_conversion_expr +); + +covariant_return_conversion_exprs( //dir=expr + unique int id: @covariant_return_conversion_expr +); + +derived_to_base_exprs( //dir=expr + unique int id: @derived_to_base_expr +); + +destructure_tuple_exprs( //dir=expr + unique int id: @destructure_tuple_expr +); + +dictionary_exprs( //dir=expr + unique int id: @dictionary_expr +); + +#keyset[id, index] +dictionary_expr_elements( //dir=expr + int id: @dictionary_expr ref, + int index: int ref, + int element: @expr_or_none ref +); + +differentiable_function_exprs( //dir=expr + unique int id: @differentiable_function_expr +); + +differentiable_function_extract_original_exprs( //dir=expr + unique int id: @differentiable_function_extract_original_expr +); + +dot_self_exprs( //dir=expr + unique int id: @dot_self_expr +); + +@dynamic_lookup_expr = + @dynamic_member_ref_expr +| @dynamic_subscript_expr +; + +erasure_exprs( //dir=expr + unique int id: @erasure_expr +); + +existential_metatype_to_object_exprs( //dir=expr + unique int id: @existential_metatype_to_object_expr +); + +explicit_closure_exprs( //dir=expr + unique int id: @explicit_closure_expr +); + +force_try_exprs( //dir=expr + unique int id: @force_try_expr +); + +foreign_object_conversion_exprs( //dir=expr + unique int id: @foreign_object_conversion_expr +); + +function_conversion_exprs( //dir=expr + unique int id: @function_conversion_expr +); + +in_out_to_pointer_exprs( //dir=expr + unique int id: @in_out_to_pointer_expr +); + +inject_into_optional_exprs( //dir=expr + unique int id: @inject_into_optional_expr +); + +interpolated_string_literal_exprs( //dir=expr + unique int id: @interpolated_string_literal_expr +); + +#keyset[id] +interpolated_string_literal_expr_interpolation_exprs( //dir=expr + int id: @interpolated_string_literal_expr ref, + int interpolation_expr: @opaque_value_expr_or_none ref +); + +#keyset[id] +interpolated_string_literal_expr_appending_exprs( //dir=expr + int id: @interpolated_string_literal_expr ref, + int appending_expr: @tap_expr_or_none ref +); + +linear_function_exprs( //dir=expr + unique int id: @linear_function_expr +); + +linear_function_extract_original_exprs( //dir=expr + unique int id: @linear_function_extract_original_expr +); + +linear_to_differentiable_function_exprs( //dir=expr + unique int id: @linear_to_differentiable_function_expr +); + +load_exprs( //dir=expr + unique int id: @load_expr +); + +member_ref_exprs( //dir=expr + unique int id: @member_ref_expr +); + +#keyset[id] +member_ref_expr_has_direct_to_storage_semantics( //dir=expr + int id: @member_ref_expr ref +); + +#keyset[id] +member_ref_expr_has_direct_to_implementation_semantics( //dir=expr + int id: @member_ref_expr ref +); + +#keyset[id] +member_ref_expr_has_ordinary_semantics( //dir=expr + int id: @member_ref_expr ref +); + +#keyset[id] +member_ref_expr_has_distributed_thunk_semantics( //dir=expr + int id: @member_ref_expr ref +); + +metatype_conversion_exprs( //dir=expr + unique int id: @metatype_conversion_expr +); + +nil_literal_exprs( //dir=expr + unique int id: @nil_literal_expr +); + +object_literal_exprs( //dir=expr + unique int id: @object_literal_expr, + int kind: int ref +); + +#keyset[id, index] +object_literal_expr_arguments( //dir=expr + int id: @object_literal_expr ref, + int index: int ref, + int argument: @argument_or_none ref +); + +optional_try_exprs( //dir=expr + unique int id: @optional_try_expr +); + +paren_exprs( //dir=expr + unique int id: @paren_expr +); + +pointer_to_pointer_exprs( //dir=expr + unique int id: @pointer_to_pointer_expr +); + +postfix_unary_exprs( //dir=expr + unique int id: @postfix_unary_expr +); + +prefix_unary_exprs( //dir=expr + unique int id: @prefix_unary_expr +); + +protocol_metatype_to_object_exprs( //dir=expr + unique int id: @protocol_metatype_to_object_expr +); + +regex_literal_exprs( //dir=expr + unique int id: @regex_literal_expr, + string pattern: string ref, + int version: int ref +); + +@self_apply_expr = + @dot_syntax_call_expr +| @initializer_ref_call_expr +; + +#keyset[id] +self_apply_exprs( //dir=expr + int id: @self_apply_expr ref, + int base: @expr_or_none ref +); + +string_to_pointer_exprs( //dir=expr + unique int id: @string_to_pointer_expr +); + +subscript_exprs( //dir=expr + unique int id: @subscript_expr +); + +#keyset[id, index] +subscript_expr_arguments( //dir=expr + int id: @subscript_expr ref, + int index: int ref, + int argument: @argument_or_none ref +); + +#keyset[id] +subscript_expr_has_direct_to_storage_semantics( //dir=expr + int id: @subscript_expr ref +); + +#keyset[id] +subscript_expr_has_direct_to_implementation_semantics( //dir=expr + int id: @subscript_expr ref +); + +#keyset[id] +subscript_expr_has_ordinary_semantics( //dir=expr + int id: @subscript_expr ref +); + +#keyset[id] +subscript_expr_has_distributed_thunk_semantics( //dir=expr + int id: @subscript_expr ref +); + +try_exprs( //dir=expr + unique int id: @try_expr +); + +underlying_to_opaque_exprs( //dir=expr + unique int id: @underlying_to_opaque_expr +); + +unevaluated_instance_exprs( //dir=expr + unique int id: @unevaluated_instance_expr +); + +unresolved_member_chain_result_exprs( //dir=expr + unique int id: @unresolved_member_chain_result_expr +); + +unresolved_type_conversion_exprs( //dir=expr + unique int id: @unresolved_type_conversion_expr +); + +boolean_literal_exprs( //dir=expr + unique int id: @boolean_literal_expr, + boolean value: boolean ref +); + +conditional_checked_cast_exprs( //dir=expr + unique int id: @conditional_checked_cast_expr +); + +dot_syntax_call_exprs( //dir=expr + unique int id: @dot_syntax_call_expr +); + +dynamic_member_ref_exprs( //dir=expr + unique int id: @dynamic_member_ref_expr +); + +dynamic_subscript_exprs( //dir=expr + unique int id: @dynamic_subscript_expr +); + +forced_checked_cast_exprs( //dir=expr + unique int id: @forced_checked_cast_expr +); + +initializer_ref_call_exprs( //dir=expr + unique int id: @initializer_ref_call_expr +); + +is_exprs( //dir=expr + unique int id: @is_expr +); + +magic_identifier_literal_exprs( //dir=expr + unique int id: @magic_identifier_literal_expr, + string kind: string ref +); + +@number_literal_expr = + @float_literal_expr +| @integer_literal_expr +; + +string_literal_exprs( //dir=expr + unique int id: @string_literal_expr, + string value: string ref +); + +float_literal_exprs( //dir=expr + unique int id: @float_literal_expr, + string string_value: string ref +); + +integer_literal_exprs( //dir=expr + unique int id: @integer_literal_expr, + string string_value: string ref +); + +@pattern = + @any_pattern +| @binding_pattern +| @bool_pattern +| @enum_element_pattern +| @expr_pattern +| @is_pattern +| @named_pattern +| @optional_some_pattern +| @paren_pattern +| @tuple_pattern +| @typed_pattern +; + +#keyset[id] +pattern_types( //dir=pattern + int id: @pattern ref, + int type_: @type_or_none ref +); + +any_patterns( //dir=pattern + unique int id: @any_pattern +); + +binding_patterns( //dir=pattern + unique int id: @binding_pattern, + int sub_pattern: @pattern_or_none ref +); + +bool_patterns( //dir=pattern + unique int id: @bool_pattern, + boolean value: boolean ref +); + +enum_element_patterns( //dir=pattern + unique int id: @enum_element_pattern, + int element: @enum_element_decl_or_none ref +); + +#keyset[id] +enum_element_pattern_sub_patterns( //dir=pattern + int id: @enum_element_pattern ref, + int sub_pattern: @pattern_or_none ref +); + +expr_patterns( //dir=pattern + unique int id: @expr_pattern, + int sub_expr: @expr_or_none ref +); + +is_patterns( //dir=pattern + unique int id: @is_pattern +); + +#keyset[id] +is_pattern_cast_type_reprs( //dir=pattern + int id: @is_pattern ref, + int cast_type_repr: @type_repr_or_none ref +); + +#keyset[id] +is_pattern_sub_patterns( //dir=pattern + int id: @is_pattern ref, + int sub_pattern: @pattern_or_none ref +); + +named_patterns( //dir=pattern + unique int id: @named_pattern, + int var_decl: @var_decl_or_none ref +); + +optional_some_patterns( //dir=pattern + unique int id: @optional_some_pattern, + int sub_pattern: @pattern_or_none ref +); + +paren_patterns( //dir=pattern + unique int id: @paren_pattern, + int sub_pattern: @pattern_or_none ref +); + +tuple_patterns( //dir=pattern + unique int id: @tuple_pattern +); + +#keyset[id, index] +tuple_pattern_elements( //dir=pattern + int id: @tuple_pattern ref, + int index: int ref, + int element: @pattern_or_none ref +); + +typed_patterns( //dir=pattern + unique int id: @typed_pattern, + int sub_pattern: @pattern_or_none ref +); + +#keyset[id] +typed_pattern_type_reprs( //dir=pattern + int id: @typed_pattern ref, + int type_repr: @type_repr_or_none ref +); + +case_label_items( //dir=stmt + unique int id: @case_label_item, + int pattern: @pattern_or_none ref +); + +#keyset[id] +case_label_item_guards( //dir=stmt + int id: @case_label_item ref, + int guard: @expr_or_none ref +); + +condition_elements( //dir=stmt + unique int id: @condition_element +); + +#keyset[id] +condition_element_booleans( //dir=stmt + int id: @condition_element ref, + int boolean_: @expr_or_none ref +); + +#keyset[id] +condition_element_patterns( //dir=stmt + int id: @condition_element ref, + int pattern: @pattern_or_none ref +); + +#keyset[id] +condition_element_initializers( //dir=stmt + int id: @condition_element ref, + int initializer: @expr_or_none ref +); + +#keyset[id] +condition_element_availabilities( //dir=stmt + int id: @condition_element ref, + int availability: @availability_info_or_none ref +); + +@stmt = + @brace_stmt +| @break_stmt +| @case_stmt +| @continue_stmt +| @defer_stmt +| @discard_stmt +| @fail_stmt +| @fallthrough_stmt +| @labeled_stmt +| @pound_assert_stmt +| @return_stmt +| @then_stmt +| @throw_stmt +| @yield_stmt +; + +stmt_conditions( //dir=stmt + unique int id: @stmt_condition +); + +#keyset[id, index] +stmt_condition_elements( //dir=stmt + int id: @stmt_condition ref, + int index: int ref, + int element: @condition_element_or_none ref +); + +brace_stmts( //dir=stmt + unique int id: @brace_stmt +); + +#keyset[id, index] +brace_stmt_elements( //dir=stmt + int id: @brace_stmt ref, + int index: int ref, + int element: @ast_node_or_none ref +); + +break_stmts( //dir=stmt + unique int id: @break_stmt +); + +#keyset[id] +break_stmt_target_names( //dir=stmt + int id: @break_stmt ref, + string target_name: string ref +); + +#keyset[id] +break_stmt_targets( //dir=stmt + int id: @break_stmt ref, + int target: @stmt_or_none ref +); + +case_stmts( //dir=stmt + unique int id: @case_stmt, + int body: @stmt_or_none ref +); + +#keyset[id, index] +case_stmt_labels( //dir=stmt + int id: @case_stmt ref, + int index: int ref, + int label: @case_label_item_or_none ref +); + +#keyset[id, index] +case_stmt_variables( //dir=stmt + int id: @case_stmt ref, + int index: int ref, + int variable: @var_decl_or_none ref +); + +continue_stmts( //dir=stmt + unique int id: @continue_stmt +); + +#keyset[id] +continue_stmt_target_names( //dir=stmt + int id: @continue_stmt ref, + string target_name: string ref +); + +#keyset[id] +continue_stmt_targets( //dir=stmt + int id: @continue_stmt ref, + int target: @stmt_or_none ref +); + +defer_stmts( //dir=stmt + unique int id: @defer_stmt, + int body: @brace_stmt_or_none ref +); + +discard_stmts( //dir=stmt + unique int id: @discard_stmt, + int sub_expr: @expr_or_none ref +); + +fail_stmts( //dir=stmt + unique int id: @fail_stmt +); + +fallthrough_stmts( //dir=stmt + unique int id: @fallthrough_stmt, + int fallthrough_source: @case_stmt_or_none ref, + int fallthrough_dest: @case_stmt_or_none ref +); + +@labeled_stmt = + @do_catch_stmt +| @do_stmt +| @for_each_stmt +| @labeled_conditional_stmt +| @repeat_while_stmt +| @switch_stmt +; + +#keyset[id] +labeled_stmt_labels( //dir=stmt + int id: @labeled_stmt ref, + string label: string ref +); + +pound_assert_stmts( //dir=stmt + unique int id: @pound_assert_stmt, + int condition: @expr_or_none ref, + string message: string ref +); + +return_stmts( //dir=stmt + unique int id: @return_stmt +); + +#keyset[id] +return_stmt_results( //dir=stmt + int id: @return_stmt ref, + int result: @expr_or_none ref +); + +then_stmts( //dir=stmt + unique int id: @then_stmt, + int result: @expr_or_none ref +); + +throw_stmts( //dir=stmt + unique int id: @throw_stmt, + int sub_expr: @expr_or_none ref +); + +yield_stmts( //dir=stmt + unique int id: @yield_stmt +); + +#keyset[id, index] +yield_stmt_results( //dir=stmt + int id: @yield_stmt ref, + int index: int ref, + int result: @expr_or_none ref +); + +do_catch_stmts( //dir=stmt + unique int id: @do_catch_stmt, + int body: @stmt_or_none ref +); + +#keyset[id, index] +do_catch_stmt_catches( //dir=stmt + int id: @do_catch_stmt ref, + int index: int ref, + int catch: @case_stmt_or_none ref +); + +do_stmts( //dir=stmt + unique int id: @do_stmt, + int body: @brace_stmt_or_none ref +); + +for_each_stmts( //dir=stmt + unique int id: @for_each_stmt, + int pattern: @pattern_or_none ref, + int body: @brace_stmt_or_none ref +); + +#keyset[id] +for_each_stmt_wheres( //dir=stmt + int id: @for_each_stmt ref, + int where: @expr_or_none ref +); + +#keyset[id] +for_each_stmt_iterator_vars( //dir=stmt + int id: @for_each_stmt ref, + int iteratorVar: @pattern_binding_decl_or_none ref +); + +#keyset[id] +for_each_stmt_next_calls( //dir=stmt + int id: @for_each_stmt ref, + int nextCall: @expr_or_none ref +); + +@labeled_conditional_stmt = + @guard_stmt +| @if_stmt +| @while_stmt +; + +#keyset[id] +labeled_conditional_stmts( //dir=stmt + int id: @labeled_conditional_stmt ref, + int condition: @stmt_condition_or_none ref +); + +repeat_while_stmts( //dir=stmt + unique int id: @repeat_while_stmt, + int condition: @expr_or_none ref, + int body: @stmt_or_none ref +); + +switch_stmts( //dir=stmt + unique int id: @switch_stmt, + int expr: @expr_or_none ref +); + +#keyset[id, index] +switch_stmt_cases( //dir=stmt + int id: @switch_stmt ref, + int index: int ref, + int case_: @case_stmt_or_none ref +); + +guard_stmts( //dir=stmt + unique int id: @guard_stmt, + int body: @brace_stmt_or_none ref +); + +if_stmts( //dir=stmt + unique int id: @if_stmt, + int then: @stmt_or_none ref +); + +#keyset[id] +if_stmt_elses( //dir=stmt + int id: @if_stmt ref, + int else: @stmt_or_none ref +); + +while_stmts( //dir=stmt + unique int id: @while_stmt, + int body: @stmt_or_none ref +); + +@type = + @any_function_type +| @any_generic_type +| @any_metatype_type +| @builtin_type +| @dependent_member_type +| @dynamic_self_type +| @error_type +| @existential_type +| @in_out_type +| @l_value_type +| @module_type +| @pack_element_type +| @pack_expansion_type +| @pack_type +| @parameterized_protocol_type +| @protocol_composition_type +| @reference_storage_type +| @substitutable_type +| @sugar_type +| @tuple_type +| @unresolved_type +; + +#keyset[id] +types( //dir=type + int id: @type ref, + string name: string ref, + int canonical_type: @type_or_none ref +); + +type_reprs( //dir=type + unique int id: @type_repr, + int type_: @type_or_none ref +); + +@any_function_type = + @function_type +| @generic_function_type +; + +#keyset[id] +any_function_types( //dir=type + int id: @any_function_type ref, + int result: @type_or_none ref +); + +#keyset[id, index] +any_function_type_param_types( //dir=type + int id: @any_function_type ref, + int index: int ref, + int param_type: @type_or_none ref +); + +#keyset[id] +any_function_type_is_throwing( //dir=type + int id: @any_function_type ref +); + +#keyset[id] +any_function_type_is_async( //dir=type + int id: @any_function_type ref +); + +@any_generic_type = + @nominal_or_bound_generic_nominal_type +| @unbound_generic_type +; + +#keyset[id] +any_generic_types( //dir=type + int id: @any_generic_type ref, + int declaration: @generic_type_decl_or_none ref +); + +#keyset[id] +any_generic_type_parents( //dir=type + int id: @any_generic_type ref, + int parent: @type_or_none ref +); + +@any_metatype_type = + @existential_metatype_type +| @metatype_type +; + +@builtin_type = + @any_builtin_integer_type +| @builtin_bridge_object_type +| @builtin_default_actor_storage_type +| @builtin_executor_type +| @builtin_float_type +| @builtin_job_type +| @builtin_native_object_type +| @builtin_raw_pointer_type +| @builtin_raw_unsafe_continuation_type +| @builtin_unsafe_value_buffer_type +| @builtin_vector_type +; + +dependent_member_types( //dir=type + unique int id: @dependent_member_type, + int base_type: @type_or_none ref, + int associated_type_decl: @associated_type_decl_or_none ref +); + +dynamic_self_types( //dir=type + unique int id: @dynamic_self_type, + int static_self_type: @type_or_none ref +); + +error_types( //dir=type + unique int id: @error_type +); + +existential_types( //dir=type + unique int id: @existential_type, + int constraint: @type_or_none ref +); + +in_out_types( //dir=type + unique int id: @in_out_type, + int object_type: @type_or_none ref +); + +l_value_types( //dir=type + unique int id: @l_value_type, + int object_type: @type_or_none ref +); + +module_types( //dir=type + unique int id: @module_type, + int module: @module_decl_or_none ref +); + +pack_element_types( //dir=type + unique int id: @pack_element_type, + int pack_type: @type_or_none ref +); + +pack_expansion_types( //dir=type + unique int id: @pack_expansion_type, + int pattern_type: @type_or_none ref, + int count_type: @type_or_none ref +); + +pack_types( //dir=type + unique int id: @pack_type +); + +#keyset[id, index] +pack_type_elements( //dir=type + int id: @pack_type ref, + int index: int ref, + int element: @type_or_none ref +); + +parameterized_protocol_types( //dir=type + unique int id: @parameterized_protocol_type, + int base: @protocol_type_or_none ref +); + +#keyset[id, index] +parameterized_protocol_type_args( //dir=type + int id: @parameterized_protocol_type ref, + int index: int ref, + int arg: @type_or_none ref +); + +protocol_composition_types( //dir=type + unique int id: @protocol_composition_type +); + +#keyset[id, index] +protocol_composition_type_members( //dir=type + int id: @protocol_composition_type ref, + int index: int ref, + int member: @type_or_none ref +); + +@reference_storage_type = + @unmanaged_storage_type +| @unowned_storage_type +| @weak_storage_type +; + +#keyset[id] +reference_storage_types( //dir=type + int id: @reference_storage_type ref, + int referent_type: @type_or_none ref +); + +@substitutable_type = + @archetype_type +| @generic_type_param_type +; + +@sugar_type = + @paren_type +| @syntax_sugar_type +| @type_alias_type +; + +tuple_types( //dir=type + unique int id: @tuple_type +); + +#keyset[id, index] +tuple_type_types( //dir=type + int id: @tuple_type ref, + int index: int ref, + int type_: @type_or_none ref +); + +#keyset[id, index] +tuple_type_names( //dir=type + int id: @tuple_type ref, + int index: int ref, + string name: string ref +); + +unresolved_types( //dir=type + unique int id: @unresolved_type +); + +@any_builtin_integer_type = + @builtin_integer_literal_type +| @builtin_integer_type +; + +@archetype_type = + @local_archetype_type +| @opaque_type_archetype_type +| @pack_archetype_type +| @primary_archetype_type +; + +#keyset[id] +archetype_types( //dir=type + int id: @archetype_type ref, + int interface_type: @type_or_none ref +); + +#keyset[id] +archetype_type_superclasses( //dir=type + int id: @archetype_type ref, + int superclass: @type_or_none ref +); + +#keyset[id, index] +archetype_type_protocols( //dir=type + int id: @archetype_type ref, + int index: int ref, + int protocol: @protocol_decl_or_none ref +); + +builtin_bridge_object_types( //dir=type + unique int id: @builtin_bridge_object_type +); + +builtin_default_actor_storage_types( //dir=type + unique int id: @builtin_default_actor_storage_type +); + +builtin_executor_types( //dir=type + unique int id: @builtin_executor_type +); + +builtin_float_types( //dir=type + unique int id: @builtin_float_type +); + +builtin_job_types( //dir=type + unique int id: @builtin_job_type +); + +builtin_native_object_types( //dir=type + unique int id: @builtin_native_object_type +); + +builtin_raw_pointer_types( //dir=type + unique int id: @builtin_raw_pointer_type +); + +builtin_raw_unsafe_continuation_types( //dir=type + unique int id: @builtin_raw_unsafe_continuation_type +); + +builtin_unsafe_value_buffer_types( //dir=type + unique int id: @builtin_unsafe_value_buffer_type +); + +builtin_vector_types( //dir=type + unique int id: @builtin_vector_type +); + +existential_metatype_types( //dir=type + unique int id: @existential_metatype_type +); + +function_types( //dir=type + unique int id: @function_type +); + +generic_function_types( //dir=type + unique int id: @generic_function_type +); + +#keyset[id, index] +generic_function_type_generic_params( //dir=type + int id: @generic_function_type ref, + int index: int ref, + int generic_param: @generic_type_param_type_or_none ref +); + +generic_type_param_types( //dir=type + unique int id: @generic_type_param_type +); + +metatype_types( //dir=type + unique int id: @metatype_type +); + +@nominal_or_bound_generic_nominal_type = + @bound_generic_type +| @nominal_type +; + +paren_types( //dir=type + unique int id: @paren_type, + int type_: @type_or_none ref +); + +@syntax_sugar_type = + @dictionary_type +| @unary_syntax_sugar_type +; + +type_alias_types( //dir=type + unique int id: @type_alias_type, + int decl: @type_alias_decl_or_none ref +); + +unbound_generic_types( //dir=type + unique int id: @unbound_generic_type +); + +unmanaged_storage_types( //dir=type + unique int id: @unmanaged_storage_type +); + +unowned_storage_types( //dir=type + unique int id: @unowned_storage_type +); + +weak_storage_types( //dir=type + unique int id: @weak_storage_type +); + +@bound_generic_type = + @bound_generic_class_type +| @bound_generic_enum_type +| @bound_generic_struct_type +; + +#keyset[id, index] +bound_generic_type_arg_types( //dir=type + int id: @bound_generic_type ref, + int index: int ref, + int arg_type: @type_or_none ref +); + +builtin_integer_literal_types( //dir=type + unique int id: @builtin_integer_literal_type +); + +builtin_integer_types( //dir=type + unique int id: @builtin_integer_type +); + +#keyset[id] +builtin_integer_type_widths( //dir=type + int id: @builtin_integer_type ref, + int width: int ref +); + +dictionary_types( //dir=type + unique int id: @dictionary_type, + int key_type: @type_or_none ref, + int value_type: @type_or_none ref +); + +@local_archetype_type = + @element_archetype_type +| @opened_archetype_type +; + +@nominal_type = + @class_type +| @enum_type +| @protocol_type +| @struct_type +; + +opaque_type_archetype_types( //dir=type + unique int id: @opaque_type_archetype_type, + int declaration: @opaque_type_decl_or_none ref +); + +pack_archetype_types( //dir=type + unique int id: @pack_archetype_type +); + +primary_archetype_types( //dir=type + unique int id: @primary_archetype_type +); + +@unary_syntax_sugar_type = + @array_slice_type +| @optional_type +| @variadic_sequence_type +; + +#keyset[id] +unary_syntax_sugar_types( //dir=type + int id: @unary_syntax_sugar_type ref, + int base_type: @type_or_none ref +); + +array_slice_types( //dir=type + unique int id: @array_slice_type +); + +bound_generic_class_types( //dir=type + unique int id: @bound_generic_class_type +); + +bound_generic_enum_types( //dir=type + unique int id: @bound_generic_enum_type +); + +bound_generic_struct_types( //dir=type + unique int id: @bound_generic_struct_type +); + +class_types( //dir=type + unique int id: @class_type +); + +element_archetype_types( //dir=type + unique int id: @element_archetype_type +); + +enum_types( //dir=type + unique int id: @enum_type +); + +opened_archetype_types( //dir=type + unique int id: @opened_archetype_type +); + +optional_types( //dir=type + unique int id: @optional_type +); + +protocol_types( //dir=type + unique int id: @protocol_type +); + +struct_types( //dir=type + unique int id: @struct_type +); + +variadic_sequence_types( //dir=type + unique int id: @variadic_sequence_type +); + +@accessor_or_none = + @accessor +| @unspecified_element +; + +@argument_or_none = + @argument +| @unspecified_element +; + +@associated_type_decl_or_none = + @associated_type_decl +| @unspecified_element +; + +@ast_node_or_none = + @ast_node +| @unspecified_element +; + +@availability_info_or_none = + @availability_info +| @unspecified_element +; + +@availability_spec_or_none = + @availability_spec +| @unspecified_element +; + +@brace_stmt_or_none = + @brace_stmt +| @unspecified_element +; + +@captured_decl_or_none = + @captured_decl +| @unspecified_element +; + +@case_label_item_or_none = + @case_label_item +| @unspecified_element +; + +@case_stmt_or_none = + @case_stmt +| @unspecified_element +; + +@closure_expr_or_none = + @closure_expr +| @unspecified_element +; + +@condition_element_or_none = + @condition_element +| @unspecified_element +; + +@decl_or_none = + @decl +| @unspecified_element +; + +@enum_element_decl_or_none = + @enum_element_decl +| @unspecified_element +; + +@expr_or_none = + @expr +| @unspecified_element +; + +@file_or_none = + @file +| @unspecified_element +; + +@function_or_none = + @function +| @unspecified_element +; + +@generic_type_decl_or_none = + @generic_type_decl +| @unspecified_element +; + +@generic_type_param_decl_or_none = + @generic_type_param_decl +| @unspecified_element +; + +@generic_type_param_type_or_none = + @generic_type_param_type +| @unspecified_element +; + +@initializer_or_none = + @initializer +| @unspecified_element +; + +@key_path_component_or_none = + @key_path_component +| @unspecified_element +; + +@location_or_none = + @location +| @unspecified_element +; + +@macro_role_or_none = + @macro_role +| @unspecified_element +; + +@module_decl_or_none = + @module_decl +| @unspecified_element +; + +@nominal_type_decl_or_none = + @nominal_type_decl +| @unspecified_element +; + +@opaque_type_decl_or_none = + @opaque_type_decl +| @unspecified_element +; + +@opaque_value_expr_or_none = + @opaque_value_expr +| @unspecified_element +; + +@param_decl_or_none = + @param_decl +| @unspecified_element +; + +@pattern_or_none = + @pattern +| @unspecified_element +; + +@pattern_binding_decl_or_none = + @pattern_binding_decl +| @unspecified_element +; + +@precedence_group_decl_or_none = + @precedence_group_decl +| @unspecified_element +; + +@protocol_decl_or_none = + @protocol_decl +| @unspecified_element +; + +@protocol_type_or_none = + @protocol_type +| @unspecified_element +; + +@stmt_or_none = + @stmt +| @unspecified_element +; + +@stmt_condition_or_none = + @stmt_condition +| @unspecified_element +; + +@string_literal_expr_or_none = + @string_literal_expr +| @unspecified_element +; + +@tap_expr_or_none = + @tap_expr +| @unspecified_element +; + +@type_or_none = + @type +| @unspecified_element +; + +@type_alias_decl_or_none = + @type_alias_decl +| @unspecified_element +; + +@type_expr_or_none = + @type_expr +| @unspecified_element +; + +@type_repr_or_none = + @type_repr +| @unspecified_element +; + +@value_decl_or_none = + @unspecified_element +| @value_decl +; + +@var_decl_or_none = + @unspecified_element +| @var_decl +; diff --git a/swift/downgrades/33db81ad4b606ff9a476c8dabeb9fffbf61aa829/upgrade.properties b/swift/downgrades/33db81ad4b606ff9a476c8dabeb9fffbf61aa829/upgrade.properties new file mode 100644 index 000000000000..cd7dbeeea006 --- /dev/null +++ b/swift/downgrades/33db81ad4b606ff9a476c8dabeb9fffbf61aa829/upgrade.properties @@ -0,0 +1,4 @@ +description: Remove variables from `ForEachStmt` +compatibility: partial + +for_each_stmt_variables.rel: delete diff --git a/swift/extractor/BUILD.bazel b/swift/extractor/BUILD.bazel index 342125c9d4fa..c96552728328 100644 --- a/swift/extractor/BUILD.bazel +++ b/swift/extractor/BUILD.bazel @@ -19,7 +19,7 @@ swift_cc_binary( "//swift/extractor/invocation", "//swift/extractor/remapping", "//swift/extractor/translators", - "//swift/third_party/swift-llvm-support", + "//swift/third_party/resources:prebuilt", "@absl//absl/strings", ], ) diff --git a/swift/extractor/SwiftExtractor.cpp b/swift/extractor/SwiftExtractor.cpp index dc9dcfcfa7da..b0de6a7a2a49 100644 --- a/swift/extractor/SwiftExtractor.cpp +++ b/swift/extractor/SwiftExtractor.cpp @@ -152,10 +152,10 @@ static std::unordered_set extractDeclarations( } std::vector comments; - if (primaryFile && primaryFile->getBufferID().hasValue()) { + if (primaryFile && primaryFile->getBufferID()) { auto& sourceManager = compiler.getSourceMgr(); auto tokens = swift::tokenize(compiler.getInvocation().getLangOptions(), sourceManager, - primaryFile->getBufferID().getValue()); + *primaryFile->getBufferID()); for (auto& token : tokens) { if (token.getKind() == swift::tok::comment) { comments.push_back(token); @@ -188,6 +188,7 @@ static std::unordered_set collectInputFilenames(swift::CompilerInst std::unordered_set sourceFiles; const auto& inOuts = compiler.getInvocation().getFrontendOptions().InputsAndOutputs; for (auto& input : inOuts.getAllInputs()) { + LOG_INFO("> {}", input.getFileName()); if (input.getType() == swift::file_types::TY_Swift && (!inOuts.hasPrimaryInputs() || input.isPrimary())) { sourceFiles.insert(input.getFileName()); diff --git a/swift/extractor/infra/BUILD.bazel b/swift/extractor/infra/BUILD.bazel index 6a624844c765..7f6af092ef43 100644 --- a/swift/extractor/infra/BUILD.bazel +++ b/swift/extractor/infra/BUILD.bazel @@ -10,7 +10,7 @@ swift_cc_library( "//swift/extractor/infra/file", "//swift/extractor/trap", "//swift/logging", - "//swift/third_party/swift-llvm-support", + "//swift/third_party/resources:prebuilt", "@picosha2", ], ) diff --git a/swift/extractor/infra/SwiftTagTraits.h b/swift/extractor/infra/SwiftTagTraits.h index fc3c6343ce5d..7d3a670be6a6 100644 --- a/swift/extractor/infra/SwiftTagTraits.h +++ b/swift/extractor/infra/SwiftTagTraits.h @@ -175,6 +175,8 @@ MAP(swift::Expr, ExprTag) MAP(swift::LinearFunctionExtractOriginalExpr, LinearFunctionExtractOriginalExprTag) MAP(swift::LinearToDifferentiableFunctionExpr, LinearToDifferentiableFunctionExprTag) MAP(swift::ABISafeConversionExpr, AbiSafeConversionExprTag) // different acronym convention + MAP(swift::ActorIsolationErasureExpr, void) // TODO swift 6.0 + MAP(swift::UnreachableExpr, void) // TODO swift 6.0 MAP(swift::ExplicitCastExpr, ExplicitCastExprTag) MAP(swift::CheckedCastExpr, CheckedCastExprTag) MAP(swift::ForcedCheckedCastExpr, ForcedCheckedCastExprTag) @@ -200,7 +202,8 @@ MAP(swift::Expr, ExprTag) MAP(swift::ConsumeExpr, ConsumeExprTag) MAP(swift::MaterializePackExpr, MaterializePackExprTag) MAP(swift::SingleValueStmtExpr, SingleValueStmtExprTag) - + MAP(swift::ExtractFunctionIsolationExpr, void) // TODO swift 6.0 + MAP(swift::CurrentContextIsolationExpr, void) // TODO swift 6.0 MAP(swift::Decl, DeclTag) MAP(swift::ValueDecl, ValueDeclTag) MAP(swift::TypeDecl, TypeDeclTag) @@ -332,6 +335,7 @@ MAP(swift::TypeBase, TypeTag) MAP(swift::PackExpansionType, PackExpansionTypeTag) MAP(swift::PackElementType, PackElementTypeTag) MAP(swift::TypeVariableType, void) // created during type checking and only used for constraint checking + MAP(swift::ErrorUnionType, void) // TODO swift 6.0 MAP(swift::SugarType, SugarTypeTag) MAP(swift::ParenType, ParenTypeTag) MAP(swift::TypeAliasType, TypeAliasTypeTag) diff --git a/swift/extractor/main.cpp b/swift/extractor/main.cpp index ad2939bb5e2a..0883b0717fc3 100644 --- a/swift/extractor/main.cpp +++ b/swift/extractor/main.cpp @@ -20,6 +20,7 @@ #include "swift/extractor/trap/TrapDomain.h" #include "swift/extractor/infra/file/Path.h" #include "swift/logging/SwiftAssert.h" +#include "swift/Threading/Errors.h" using namespace std::string_literals; using namespace codeql::main_logger; @@ -75,6 +76,13 @@ static void processFrontendOptions(codeql::SwiftExtractorState& state, } } +static void turnOffSilVerifications(swift::SILOptions& options) { + options.VerifyAll = false; + options.VerifyExclusivity = false; + options.VerifyNone = true; + options.VerifySILOwnership = false; +} + codeql::TrapDomain invocationTrapDomain(codeql::SwiftExtractorState& state); // This is part of the swiftFrontendTool interface, we hook into the @@ -89,6 +97,7 @@ class Observer : public swift::FrontendObserver { options.KeepASTContext = true; lockOutputSwiftModuleTraps(state, options); processFrontendOptions(state, options); + turnOffSilVerifications(invocation.getSILOptions()); } void configuredCompiler(swift::CompilerInstance& instance) override { diff --git a/swift/extractor/mangler/BUILD.bazel b/swift/extractor/mangler/BUILD.bazel index 71c9cbf900e8..658e750bdcc3 100644 --- a/swift/extractor/mangler/BUILD.bazel +++ b/swift/extractor/mangler/BUILD.bazel @@ -8,6 +8,6 @@ swift_cc_library( deps = [ "//swift/extractor/infra", "//swift/extractor/trap", - "//swift/third_party/swift-llvm-support", + "//swift/third_party/resources:prebuilt", ], ) diff --git a/swift/extractor/mangler/SwiftMangler.cpp b/swift/extractor/mangler/SwiftMangler.cpp index bb8f63c232ee..02465b1988a9 100644 --- a/swift/extractor/mangler/SwiftMangler.cpp +++ b/swift/extractor/mangler/SwiftMangler.cpp @@ -99,7 +99,8 @@ SwiftMangledName SwiftMangler::visitExtensionDecl(const swift::ExtensionDecl* de } auto parent = getParent(decl); - return initMangled(decl) << fetch(parent) << getExtensionIndex(decl, parent); + auto target = decl->getExtendedType(); + return initMangled(decl) << fetch(target) << getExtensionIndex(decl, parent); } unsigned SwiftMangler::getExtensionIndex(const swift::ExtensionDecl* decl, @@ -197,19 +198,30 @@ SwiftMangledName SwiftMangler::visitAnyFunctionType(const swift::AnyFunctionType auto ret = initMangled(type); for (const auto& param : type->getParams()) { ret << fetch(param.getPlainType()); - if (param.isInOut()) { - ret << "_inout"; + auto flags = param.getParameterFlags(); + ret << "_" << getNameForParamSpecifier(flags.getOwnershipSpecifier()); + if (flags.isIsolated()) { + ret << "_isolated"; } - if (param.isOwned()) { - ret << "_owned"; + if (flags.isAutoClosure()) { + ret << "_autoclosure"; } - if (param.isShared()) { - ret << "_shared"; + if (flags.isNonEphemeral()) { + ret << "_nonephermeral"; } - if (param.isIsolated()) { + if (flags.isIsolated()) { ret << "_isolated"; } - if (param.isVariadic()) { + if (flags.isSending()) { + ret << "_sending"; + } + if (flags.isCompileTimeConst()) { + ret << "_compiletimeconst"; + } + if (flags.isNoDerivative()) { + ret << "_noderivative"; + } + if (flags.isVariadic()) { ret << "..."; } } @@ -219,6 +231,9 @@ SwiftMangledName SwiftMangler::visitAnyFunctionType(const swift::AnyFunctionType } if (type->isThrowing()) { ret << "_throws"; + if (type->hasThrownError()) { + ret << "(" << fetch(type->getThrownError()) << ")"; + } } if (type->isSendable()) { ret << "_sendable"; @@ -229,6 +244,9 @@ SwiftMangledName SwiftMangler::visitAnyFunctionType(const swift::AnyFunctionType if (type->hasGlobalActor()) { ret << "_actor" << fetch(type->getGlobalActor()); } + if (type->getIsolation().isErased()) { + ret << "_isolated"; + } // TODO: see if this needs to be used in identifying types, if not it needs to be removed from // type printing in the Swift compiler code assert(type->hasExtInfo() && "type must have ext info"); diff --git a/swift/extractor/remapping/BUILD.bazel b/swift/extractor/remapping/BUILD.bazel index da5eee55dc1c..44a7d7445bb8 100644 --- a/swift/extractor/remapping/BUILD.bazel +++ b/swift/extractor/remapping/BUILD.bazel @@ -8,7 +8,7 @@ swift_cc_library( deps = [ "//swift/extractor/config", "//swift/extractor/infra/file", - "//swift/third_party/swift-llvm-support", + "//swift/third_party/resources:prebuilt", "@picosha2", ], ) diff --git a/swift/extractor/translators/BUILD.bazel b/swift/extractor/translators/BUILD.bazel index 0bfc59db9706..7b3356f69606 100644 --- a/swift/extractor/translators/BUILD.bazel +++ b/swift/extractor/translators/BUILD.bazel @@ -8,6 +8,6 @@ swift_cc_library( deps = [ "//swift/extractor/infra", "//swift/extractor/mangler", - "//swift/third_party/swift-llvm-support", + "//swift/third_party/resources:prebuilt", ], ) diff --git a/swift/extractor/translators/ExprTranslator.cpp b/swift/extractor/translators/ExprTranslator.cpp index ce8da08a12e8..cfdc7d8fae0b 100644 --- a/swift/extractor/translators/ExprTranslator.cpp +++ b/swift/extractor/translators/ExprTranslator.cpp @@ -378,7 +378,7 @@ codeql::KeyPathExpr ExprTranslator::translateKeyPathExpr(const swift::KeyPathExp for (const auto& component : expr.getComponents()) { entry.components.push_back(emitKeyPathComponent(component)); } - if (auto rootTypeRepr = expr.getRootType()) { + if (auto rootTypeRepr = expr.getExplicitRootType()) { auto keyPathType = expr.getType()->getAs(); CODEQL_EXPECT_OR(return entry, keyPathType, "KeyPathExpr must have BoundGenericClassType"); auto keyPathTypeArgs = keyPathType->getGenericArgs(); diff --git a/swift/extractor/translators/StmtTranslator.cpp b/swift/extractor/translators/StmtTranslator.cpp index a433c93f406e..00c4b94fa85d 100644 --- a/swift/extractor/translators/StmtTranslator.cpp +++ b/swift/extractor/translators/StmtTranslator.cpp @@ -74,9 +74,20 @@ codeql::ForEachStmt StmtTranslator::translateForEachStmt(const swift::ForEachStm fillLabeledStmt(stmt, entry); entry.body = dispatcher.fetchLabel(stmt.getBody()); entry.pattern = dispatcher.fetchLabel(stmt.getPattern()); - entry.iteratorVar = dispatcher.fetchLabel(stmt.getIteratorVar()); + entry.iteratorVar = dispatcher.fetchOptionalLabel(stmt.getIteratorVar()); entry.where = dispatcher.fetchOptionalLabel(stmt.getWhere()); entry.nextCall = dispatcher.fetchOptionalLabel(stmt.getNextCall()); + auto add_variable = [&](swift::VarDecl* var) { + entry.variables.push_back(dispatcher.fetchLabel(var)); + }; + if (auto pattern = stmt.getPattern()) { + pattern->forEachVariable(add_variable); + } + if (auto iteratorVar = stmt.getIteratorVar()) { + for (auto i = 0u; i < iteratorVar->getNumPatternEntries(); ++i) { + iteratorVar->getPattern(i)->forEachVariable(add_variable); + } + } return entry; } diff --git a/swift/ql/.generated.list b/swift/ql/.generated.list index 601205793210..96bd98a8b0a9 100644 --- a/swift/ql/.generated.list +++ b/swift/ql/.generated.list @@ -463,7 +463,7 @@ lib/codeql/swift/elements/stmt/DoCatchStmt.qll a4639b674880e85d15ef4077370eb2ff2 lib/codeql/swift/elements/stmt/DoStmt.qll 2117eb68a82bde082fc06b44d7bdabd6d773abda95555b81e92f6d409a93b462 c5ec1fba5ba562629863ac6d1a15f9bbd8dce9f59326f580997352b47f9f2a90 lib/codeql/swift/elements/stmt/FailStmt.qll 0dc6467b2e6b4852ad6054122601c445f31c5e9c9837ceac132849a37119f7b5 0fac97257b7b2e453c484ca0212e61e655e2b2fa456f030ce159806dee048909 lib/codeql/swift/elements/stmt/FallthroughStmt.qll f7bfad479ed2f3011a4e8ebe3e4a7f3e6b7f832518ac4d2401122b8be32bbc91 2daabb70b723d9f95d4b120ec2774df8c2ba315f9b17f944a65d306f71c0a70f -lib/codeql/swift/elements/stmt/ForEachStmt.qll 70fb1f12a95c14eebd9cb30c53898ca044843ed6b14569f54e52697af7b39f59 6483f1941b7a97f4cc919c578b25da69b783dc9b3ebe4a2839702553ff2f64fb +lib/codeql/swift/elements/stmt/ForEachStmt.qll 328f1036257affc8b4d0d34767d059a33eca599fe7fd69ce4ac9824d3985143c c9a79da4742b8dac82c2760e0c15809dcc237b09603798b9c8368f02e20c5138 lib/codeql/swift/elements/stmt/GuardStmt.qll 69d3a945ec1d7bad4d9157656c5a2388584afa013771e6657313e39b28284b4a 50812bd09f77d8aba1071f03f073bed8951b1b9bb940b424c91f7f10095333cd lib/codeql/swift/elements/stmt/IfStmt.qll f60fb6be6f900c9e7c1a7ae84f0886f6fd5e70cbcc6c77c78d70ed2a62de77a9 a97ae07ef314b199baafa47af4cdc302ebf2f72205a14a28fdfc7db5ce4cfd47 lib/codeql/swift/elements/stmt/LabeledConditionalStmt.qll 64e4b4bedfc1fe74a7685213b22cb43098f669ec2c2947d9096a73e1e90104f3 28459d17878789184c8833eb202cb736ea7f267d728790561b57f60b4b9a2ce9 @@ -709,10 +709,10 @@ lib/codeql/swift/generated/Locatable.qll 1d37fa20de71c0b9986bfd7a7c0cb82ab7bf3fd lib/codeql/swift/generated/Location.qll 5e20316c3e480ddfe632b7e88e016c19f10a67df1f6ae9c8f128755a6907d6f5 5a0af2d070bcb2ed53d6d0282bf9c60dc64c2dce89c21fdd485e9c7893c1c8fa lib/codeql/swift/generated/MacroRole.qll 0d8fa6b0b6e2045d9097a87d53888cae2ea5371b2fa7d140341cf206f575b556 ea3b8a7c0a88851809f9a5a5aa80b0d2da3c4779bb29044cdba2b60246a2722c lib/codeql/swift/generated/OtherAvailabilitySpec.qll d9feaa2a71acff3184ca389045b0a49d09156210df0e034923d715b432ad594b 046737621a8bcf69bf805afb0cff476bd15259f12f0d77fce3206dd01b31518f -lib/codeql/swift/generated/ParentChild.qll d1814f2bad4c2ba9242ce49fe6fb8564ac99fc1fd3a7d12aa55e5c6dd7bb529b 1a2075b731d07a5e3c6a69d001796c8de925069d839671a294c9cba6c3db724a +lib/codeql/swift/generated/ParentChild.qll b65c29ba8c3e13baac44a32d2521a11f07aeb7d33415aa9a91a7f6255a744415 0fe73d06c96194d5a0da19c9348a46d9f8fbf630fee5de3dc96e997c595c362e lib/codeql/swift/generated/PlatformVersionAvailabilitySpec.qll dc17b49a90a18a8f7607adf2433bc8f0c194fa3e803aa3822f809d4d4fbd6793 be48ea9f8ae17354c8508aaed24337a9e57ce01f288fece3dcecd99776cabcec lib/codeql/swift/generated/PureSynthConstructors.qll bc31a6c4d142fa3fbdcae69d5ba6f1cec00eb9ad92b46c8d7b91ebfa7ef6c1f4 bc31a6c4d142fa3fbdcae69d5ba6f1cec00eb9ad92b46c8d7b91ebfa7ef6c1f4 -lib/codeql/swift/generated/Raw.qll a47950495630c10c00afee734d779e5e3e7f8e3e65ae3f04b9a1254e3e73921e 075aec2c8b232f0361ebf63f07ae9b66163f3975e6023583fb0fa2e40b979a33 +lib/codeql/swift/generated/Raw.qll 4f2ddadd2ced9728aaf4595ccf85cd147468d7ad0a57a21a6cbfd04e3834b386 9653595693da55953d7743fbecce33d16910e3b6737c654311f1e34d27ad7f0b lib/codeql/swift/generated/Synth.qll 31e318c6e156848c85a2a2664695b48b5e93c57c9bb22fa29d027069907b3ab0 8655ffcf772f55284b93f1d7f8e1b3d497a9744d5f2e0c17bc322c1fdf8bdba8 lib/codeql/swift/generated/SynthConstructors.qll 3e53c7853096020219c01dae85681fe80b34938d198a0ff359a209dda41c5ed7 3e53c7853096020219c01dae85681fe80b34938d198a0ff359a209dda41c5ed7 lib/codeql/swift/generated/UnknownFile.qll 247ddf2ebb49ce5ed4bf7bf91a969ddff37de6c78d43d8affccaf7eb586e06f2 452b29f0465ef45e978ef8b647b75e5a2a1e53f2a568fc003bc8f52f73b3fa4d @@ -915,7 +915,7 @@ lib/codeql/swift/generated/stmt/DoCatchStmt.qll 93c2a47088a2849ccf1a5647eba39c1a lib/codeql/swift/generated/stmt/DoStmt.qll 27be70a901a20831fea3d3dcf45d5ba9048043b1894cb04c09dfb3d1c0241cef 48a258a27677170e1d5530eb0001b6c043d96a92e0d056e6fb428b4d7ac4cadd lib/codeql/swift/generated/stmt/FailStmt.qll 72bfd7dc0f3f8219f3cce1a34567fdd127823e2cf42274e171f7ac96eb18afcd cb1027b33e5b601317546acb8915a5985e04b5376ecaea012b3ecdffc22ae814 lib/codeql/swift/generated/stmt/FallthroughStmt.qll 7aa70d87443d03b0ba7ed7c7b57b501abb00a32c5943c99c40735d023cf7a9ef 6451f355980409d0d7d991b9e241324ee2b68be3838440f206f734470c7188fc -lib/codeql/swift/generated/stmt/ForEachStmt.qll b5cadd1b5daa3601d094e79143cf85a731966a3c1e1c6567bcd0d87f33f9196f 13a494dd3cbbc34c8d1caeda7f279c35d971b8fb49823c89cf71675f7d76e6a4 +lib/codeql/swift/generated/stmt/ForEachStmt.qll d2e4bd83e68a432515284273d682ee47dc61860ff1b0769b9c3775ceb8d46140 848ed0efec1a40df27259492c4df1603d6bfcd8622038beac8d9145fc6863de6 lib/codeql/swift/generated/stmt/GuardStmt.qll a957b2d83c92ac7ed18f76faa35cb71b10ce0dcbb88447b57dcdc034341b6fcc 518fad136831573112edf3836e852c82009a654ce256077d953ddc6b86231efb lib/codeql/swift/generated/stmt/IfStmt.qll a1d1af8679fb0881bace45c251f96f3bbb07e8a0312dd5ecab4fc2c07e491682 bad75ae703b23d1b8869be108f095ec242996cdde0dd90b8c1dabe643869da60 lib/codeql/swift/generated/stmt/LabeledConditionalStmt.qll c05bbbdba0ad8e33afdae3a8b201276d95c2b4d1e43b9b58aa4aa17765dc7ca4 c30a5a1350172459bf67760dc912460ecc4f581dd927a98a068d95cb0905f0d9 @@ -1232,7 +1232,12 @@ test/extractor-tests/generated/stmt/DoCatchStmt/MISSING_SOURCE.txt 35fb32ea53931 test/extractor-tests/generated/stmt/DoStmt/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/stmt/FailStmt/FailStmt.ql db2d21fe1b01949180ff11416f2dc0a6a561f9ac9e6a5654156f947c584971de 2cf787b54819077dd2b4da870b722396ebf953e05bf0b1c393affef2b1fe11ba test/extractor-tests/generated/stmt/FallthroughStmt/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/stmt/ForEachStmt/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d +test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.ql 093a6619940636974e2a59f085937f9fa8645a134199c130ee99babfd2c1f1a0 068daffb2da1be9135eb818190926af3958d503c3c61de2659c0c0e167b2d11c +test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getIteratorVar.ql 1b8689dda5defd45c8bb743b30d723ed7b0c80ca54b81fb0f5fcf76620ec4ef4 1e48e40cff37194e0ea2b69997177237145fa1070e84c8f701a03d71416652b5 +test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getLabel.ql 1cf0663cd16886d4361bedad93759ab84fcaf54d5fbf16d7d2f4108f74c38683 129778f5f36d10e8a10452f333304fef9b95919cfe367ce6ff7309e2d3f3ab3b +test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getNextCall.ql 503106f20025ec479ffe46daf13ff80f5d824b657c43da8185ae2d74af8740a3 551e33f70028268e3b3790c17907101be768c42811b62978ed10ffc0a65e25d0 +test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getVariable.ql 749149b5164f493bb49726e1d54cdd1c85607566c0ba7adfc3514ea953b1f40e 1695a631aeeb47e6a0d22ec18d713f1fe2f730684269fc6e50c70020a78fbf3c +test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getWhere.ql 536af56264054a7af626a5ca4bb5bcc5b8f13299d11c499a110e4f12e2c166b6 bfd8b355342b0a03ced022b31d39e9adc6d7820a28394315392a9e2fc7647555 test/extractor-tests/generated/stmt/GuardStmt/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/stmt/IfStmt/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/stmt/PoundAssertStmt/PoundAssertStmt.ql 46b702865ef1dc4d9d8332a3d68ba295a1f8ce9737dbcb07a5ef4c701c021789 07eaec1abc763a4f2339466fd0f06d12c4ca21d9eeb21ab1f7366916dafc4854 diff --git a/swift/ql/.gitattributes b/swift/ql/.gitattributes index 43efa50e93d1..ab478ec526b5 100644 --- a/swift/ql/.gitattributes +++ b/swift/ql/.gitattributes @@ -1234,7 +1234,12 @@ /test/extractor-tests/generated/stmt/DoStmt/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/stmt/FailStmt/FailStmt.ql linguist-generated /test/extractor-tests/generated/stmt/FallthroughStmt/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/stmt/ForEachStmt/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.ql linguist-generated +/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getIteratorVar.ql linguist-generated +/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getLabel.ql linguist-generated +/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getNextCall.ql linguist-generated +/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getVariable.ql linguist-generated +/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getWhere.ql linguist-generated /test/extractor-tests/generated/stmt/GuardStmt/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/stmt/IfStmt/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/stmt/PoundAssertStmt/PoundAssertStmt.ql linguist-generated diff --git a/swift/ql/consistency-queries/UnresolvedAstNodes.ql b/swift/ql/consistency-queries/UnresolvedAstNodes.ql index d2369ab94366..b77e526c5732 100644 --- a/swift/ql/consistency-queries/UnresolvedAstNodes.ql +++ b/swift/ql/consistency-queries/UnresolvedAstNodes.ql @@ -1,5 +1,8 @@ import swift -from AstNode n -where n.getAPrimaryQlClass().matches("Unresolved%") -select n +from AstNode n, string cls +where + cls = n.getAPrimaryQlClass() and + cls.matches("Unresolved%") and + not n.getLocation() instanceof UnknownLocation +select n, cls diff --git a/swift/ql/integration-tests/posix/deduplication/BuiltinTypes.expected b/swift/ql/integration-tests/posix/deduplication/BuiltinTypes.expected index b2a2f45a2b99..ab0d6f17ad5a 100644 --- a/swift/ql/integration-tests/posix/deduplication/BuiltinTypes.expected +++ b/swift/ql/integration-tests/posix/deduplication/BuiltinTypes.expected @@ -7,6 +7,7 @@ | Builtin.Int16 | BuiltinIntegerType | | Builtin.Int32 | BuiltinIntegerType | | Builtin.Int64 | BuiltinIntegerType | +| Builtin.Int128 | BuiltinIntegerType | | Builtin.IntLiteral | BuiltinIntegerLiteralType | | Builtin.Job | BuiltinJobType | | Builtin.NativeObject | BuiltinNativeObjectType | diff --git a/swift/ql/lib/change-notes/2024-12-09-swift-6.md b/swift/ql/lib/change-notes/2024-12-09-swift-6.md new file mode 100644 index 000000000000..e32344b28d83 --- /dev/null +++ b/swift/ql/lib/change-notes/2024-12-09-swift-6.md @@ -0,0 +1,4 @@ +--- +category: majorAnalysis +--- +* Upgraded to allow analysis of Swift 6.0.2. diff --git a/swift/ql/lib/codeql/swift/elements/stmt/ForEachStmt.qll b/swift/ql/lib/codeql/swift/elements/stmt/ForEachStmt.qll index 8777a189af18..84f08865dd0d 100644 --- a/swift/ql/lib/codeql/swift/elements/stmt/ForEachStmt.qll +++ b/swift/ql/lib/codeql/swift/elements/stmt/ForEachStmt.qll @@ -9,5 +9,6 @@ import codeql.swift.elements.expr.Expr import codeql.swift.elements.stmt.LabeledStmt import codeql.swift.elements.pattern.Pattern import codeql.swift.elements.decl.PatternBindingDecl +import codeql.swift.elements.decl.VarDecl final class ForEachStmt = Impl::ForEachStmt; diff --git a/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Array.qll b/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Array.qll index 48494a1ed3a6..f1d0677aa72a 100644 --- a/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Array.qll +++ b/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Array.qll @@ -36,6 +36,7 @@ private class ArraySummaries extends SummaryModelCsv { ";Array;true;withUnsafeMutableBytes(_:);;;Argument[-1].CollectionElement;Argument[0].Parameter[0].CollectionElement;taint", ";Array;true;withUnsafeMutableBytes(_:);;;Argument[0].Parameter[0].CollectionElement;Argument[-1].CollectionElement;taint", ";Array;true;withUnsafeMutableBytes(_:);;;Argument[0].ReturnValue;ReturnValue;value", + ";Array;true;makeIterator();;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", ";ContiguousArray;true;withUnsafeBufferPointer(_:);;;Argument[-1];Argument[0].Parameter[0].CollectionElement;taint", ";ContiguousArray;true;withUnsafeBufferPointer(_:);;;Argument[-1].CollectionElement;Argument[0].Parameter[0].CollectionElement;value", ";ContiguousArray;true;withUnsafeBufferPointer(_:);;;Argument[0].ReturnValue;ReturnValue;value", diff --git a/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Collection.qll b/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Collection.qll index a8cf7b1dcd1c..5222b587d1e8 100644 --- a/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Collection.qll +++ b/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Collection.qll @@ -15,18 +15,36 @@ private class CollectionSummaries extends SummaryModelCsv { row = [ ";Collection;true;prefix(_:);;;Argument[-1];ReturnValue;taint", + ";Collection;true;prefix(_:);;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", ";Collection;true;prefix(through:);;;Argument[-1];ReturnValue;taint", + ";Collection;true;prefix(through:);;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", ";Collection;true;prefix(upTo:);;;Argument[-1];ReturnValue;taint", + ";Collection;true;prefix(upTo:);;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", ";Collection;true;prefix(while:);;;Argument[-1];ReturnValue;taint", + ";Collection;true;prefix(while:);;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", ";Collection;true;suffix(_:);;;Argument[-1];ReturnValue;taint", + ";Collection;true;suffix(_:);;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", ";Collection;true;suffix(from:);;;Argument[-1];ReturnValue;taint", + ";Collection;true;suffix(_:);;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", ";Collection;true;dropFirst(_:);;;Argument[-1];ReturnValue;taint", + ";Collection;true;dropFirst(_:);;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", ";Collection;true;dropLast(_:);;;Argument[-1];ReturnValue;taint", + ";Collection;true;dropLast(_:);;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", + ";Collection;true;flatMap(_:);;;Argument[-1];ReturnValue;taint", + ";Collection;true;flatMap(_:);;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", + //";Collection;true;map(_:);;;Argument[-1];ReturnValue;taint", --- disabled due to dubious results in practice + //";Collection;true;map(_:);;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", --- disabled due to dubious results in practice ";Collection;true;split(maxSplits:omittingEmptySubsequences:whereSeparator:);;;Argument[-1];ReturnValue;taint", ";Collection;true;split(separator:maxSplits:omittingEmptySubsequences:);;;Argument[-1];ReturnValue;taint", ";Collection;true;removeFirst();;;Argument[-1];ReturnValue;taint", ";Collection;true;popFirst();;;Argument[-1];ReturnValue;taint", ";Collection;true;randomElement();;;Argument[-1].CollectionElement;ReturnValue.OptionalSome;value", + ";Collection;true;randomElement(using:);;;Argument[-1].CollectionElement;ReturnValue.OptionalSome;value", + ";Collection;true;trimmingPrefix(_:);;;Argument[-1];ReturnValue;taint", + ";Collection;true;trimmingPrefix(_:);;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", + ";Collection;true;trimmingPrefix(while:);;;Argument[-1];ReturnValue;taint", + ";Collection;true;trimmingPrefix(while:);;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", + ";Collection;true;makeIterator();;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", ";RangeReplaceableCollection;true;init(_:);;;Argument[0];ReturnValue.CollectionElement;taint", ";RangeReplaceableCollection;true;init(_:);;;Argument[0].CollectionElement;ReturnValue.CollectionElement;value", ";RangeReplaceableCollection;true;init(repeating:count:);;;Argument[0];ReturnValue.CollectionElement;value", @@ -38,9 +56,19 @@ private class CollectionSummaries extends SummaryModelCsv { ";RangeReplaceableCollection;true;insert(_:at:);;;Argument[0];Argument[-1];taint", ";RangeReplaceableCollection;true;replaceSubrange(_:with:);;;Argument[1];Argument[-1];taint", ";RangeReplaceableCollection;true;replaceSubrange(_:with:);;;Argument[1].CollectionElement;Argument[-1].CollectionElement;value", + ";BidirectionalCollection;true;dropLast(_:);;;Argument[-1];ReturnValue;taint", + ";BidirectionalCollection;true;dropLast(_:);;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", ";BidirectionalCollection;true;joined(separator:);;;Argument[-1..0];ReturnValue;taint", + ";BidirectionalCollection;true;joined(separator:);;;Argument[-1].CollectionElement;ReturnValue;taint", + ";BidirectionalCollection;true;joined(separator:);;;Argument[-1].CollectionElement.CollectionElement;ReturnValue.CollectionElement;value", ";BidirectionalCollection;true;last(where:);;;Argument[-1];ReturnValue;taint", ";BidirectionalCollection;true;popLast();;;Argument[-1];ReturnValue;taint", + ";BidirectionalCollection;true;reversed();;;Argument[-1];ReturnValue;taint", + ";BidirectionalCollection;true;reversed();;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", + ";BidirectionalCollection;true;suffix(_:);;;Argument[-1];ReturnValue;taint", + ";BidirectionalCollection;true;suffix(_:);;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", + ";BidirectionalCollection;true;suffix(from:);;;Argument[-1];ReturnValue;taint", + ";BidirectionalCollection;true;suffix(_:);;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", ";MutableCollection;true;withContiguousMutableStorageIfAvailable(_:);;;Argument[-1];Argument[0].Parameter[0].CollectionElement;taint", ";MutableCollection;true;withContiguousMutableStorageIfAvailable(_:);;;Argument[-1].CollectionElement;Argument[0].Parameter[0].CollectionElement;value", ";MutableCollection;true;withContiguousMutableStorageIfAvailable(_:);;;Argument[0].Parameter[0].CollectionElement;Argument[-1].CollectionElement;value", diff --git a/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Dictionary.qll b/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Dictionary.qll index 6ad2ba09e996..ca40beb19008 100644 --- a/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Dictionary.qll +++ b/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Dictionary.qll @@ -21,7 +21,8 @@ private class DictionarySummaries extends SummaryModelCsv { [ ";Dictionary;true;updateValue(_:forKey:);;;Argument[0];Argument[-1].CollectionElement.TupleElement[1];value", ";Dictionary;true;updateValue(_:forKey:);;;Argument[1];Argument[-1].CollectionElement.TupleElement[0];value", - ";Dictionary;true;updateValue(_:forKey:);;;Argument[-1].CollectionElement.TupleElement[1];ReturnValue.OptionalSome;value" + ";Dictionary;true;updateValue(_:forKey:);;;Argument[-1].CollectionElement.TupleElement[1];ReturnValue.OptionalSome;value", + ";Dictionary;true;makeIterator();;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value", ] } } diff --git a/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Numeric.qll b/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Numeric.qll index 093f51ad771d..f3635b8125ca 100644 --- a/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Numeric.qll +++ b/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Numeric.qll @@ -35,6 +35,17 @@ private class NumericSummaries extends SummaryModelCsv { ";BinaryInteger;true;formatted();;;Argument[-1];ReturnValue;taint", ";BinaryInteger;true;formatted(_:);;;Argument[-1];ReturnValue;taint", ";BinaryInteger;true;quotientAndRemainder(dividingBy:);;;Argument[-1..0];ReturnValue.TupleElement[0,1];taint", + ";BinaryInteger;true;advanced(by:);;;Argument[-1..0];ReturnValue;taint", + ";BinaryInteger;true;distance(to:);;;Argument[-1..0];ReturnValue;taint", + ";SignedInteger;true;init(_:);;;Argument[0];ReturnValue;taint", + ";SignedInteger;true;init(exactly:);;;Argument[0];ReturnValue.OptionalSome;value", + ";UnsignedInteger;true;init(_:);;;Argument[0];ReturnValue;taint", + ";UnsignedInteger;true;init(exactly:);;;Argument[0];ReturnValue.OptionalSome;value", + ";FixedWidthInteger;true;init(_:);;;Argument[0];ReturnValue;taint", + ";FixedWidthInteger;true;init(clamping:);;;Argument[0];ReturnValue;taint", + ";FixedWidthInteger;true;init(truncatingIfNeeded:);;;Argument[0];ReturnValue;taint", + ";FixedWidthInteger;true;init(bitPattern:);;;Argument[0];ReturnValue;taint", // actually implemented in Int, UInt, Double etc. + ";FixedWidthInteger;true;init(truncating:);;;Argument[0];ReturnValue;taint", // actually implemented in Int, UInt, Double etc. ";FixedWidthInteger;true;init(_:radix:);;;Argument[0];ReturnValue.OptionalSome;taint", ";FixedWidthInteger;true;init(littleEndian:);;;Argument[0];ReturnValue;taint", ";FixedWidthInteger;true;init(bigEndian:);;;Argument[0];ReturnValue;taint", @@ -92,7 +103,7 @@ private class NumericFieldsInheritTaint extends TaintInheritingContent, className = "BinaryInteger" and fieldName = "words" or - className = "Numeric" and + className = ["Numeric", "SignedInteger", "UnsignedInteger"] and fieldName = ["magnitude", "byteSwapped"] or className = "BinaryFloatingPoint" and diff --git a/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/RawRepresentable.qll b/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/RawRepresentable.qll index 8d56ffb4dfd8..bbd583a32a43 100644 --- a/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/RawRepresentable.qll +++ b/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/RawRepresentable.qll @@ -12,7 +12,11 @@ private import codeql.swift.dataflow.FlowSteps */ private class RawRepresentableSummaries extends SummaryModelCsv { override predicate row(string row) { - row = ";RawRepresentable;true;init(rawValue:);;;Argument[0];ReturnValue;taint" + row = + [ + ";RawRepresentable;true;init(rawValue:);;;Argument[0];ReturnValue;taint", + ";OptionSet;true;init(rawValue:);;;Argument[0];ReturnValue;taint" + ] } } diff --git a/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Sequence.qll b/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Sequence.qll index 1c7774bc2640..efe8d785222c 100644 --- a/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Sequence.qll +++ b/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Sequence.qll @@ -45,6 +45,7 @@ private class SequenceSummaries extends SummaryModelCsv { ";Sequence;true;joined();;;Argument[-1].CollectionElement.CollectionElement;ReturnValue.CollectionElement;value", ";Sequence;true;joined(separator:);;;Argument[0..-1];ReturnValue;taint", ";Sequence;true;joined(separator:);;;Argument[-1].CollectionElement;ReturnValue;taint", + ";Sequence;true;joined(separator:);;;Argument[-1].CollectionElement.CollectionElement;ReturnValue.CollectionElement;value", ";Sequence;true;first(where:);;;Argument[-1].CollectionElement;ReturnValue;value", ";Sequence;true;withContiguousStorageIfAvailable(_:);;;Argument[-1];Argument[0].Parameter[0].CollectionElement;taint", ";Sequence;true;withContiguousStorageIfAvailable(_:);;;Argument[-1].CollectionElement;Argument[0].Parameter[0].CollectionElement;value", diff --git a/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/String.qll b/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/String.qll index eae5f78bb7f5..0642003923b1 100644 --- a/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/String.qll +++ b/swift/ql/lib/codeql/swift/frameworks/StandardLibrary/String.qll @@ -167,12 +167,18 @@ private class StringFieldsInheritTaint extends TaintInheritingContent, "precomposedStringWithCompatibilityMapping", "removingPercentEncoding" ] or - namedTypeDecl.getFullName() = "CustomStringConvertible" and + namedTypeDecl.getFullName() = ["CustomStringConvertible", "BinaryInteger"] and fieldDecl.getName() = "description" or namedTypeDecl.getFullName() = "CustomDebugStringConvertible" and fieldDecl.getName() = "debugDescription" or + namedTypeDecl.getFullName() = "CustomTestStringConvertible" and + fieldDecl.getName() = "testDescription" + or + namedTypeDecl.getFullName() = "CustomURLRepresentationParameterConvertible" and + fieldDecl.getName() = "urlRepresentationParameter" + or namedTypeDecl.getFullName() = "Substring" and fieldDecl.getName() = "base" ) and diff --git a/swift/ql/lib/codeql/swift/generated/ParentChild.qll b/swift/ql/lib/codeql/swift/generated/ParentChild.qll index 868d2d6b350b..8f2d6fb53572 100644 --- a/swift/ql/lib/codeql/swift/generated/ParentChild.qll +++ b/swift/ql/lib/codeql/swift/generated/ParentChild.qll @@ -3873,14 +3873,15 @@ private module Impl { ForEachStmt e, int index, string partialPredicateCall ) { exists( - int b, int bLabeledStmt, int n, int nPattern, int nWhere, int nIteratorVar, int nNextCall, - int nBody + int b, int bLabeledStmt, int n, int nVariable, int nPattern, int nWhere, int nIteratorVar, + int nNextCall, int nBody | b = 0 and bLabeledStmt = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfLabeledStmt(e, i, _)) | i) and n = bLabeledStmt and - nPattern = n + 1 and + nVariable = n + 1 + max(int i | i = -1 or exists(e.getVariable(i)) | i) and + nPattern = nVariable + 1 and nWhere = nPattern + 1 and nIteratorVar = nWhere + 1 and nNextCall = nIteratorVar + 1 and @@ -3890,7 +3891,12 @@ private module Impl { or result = getImmediateChildOfLabeledStmt(e, index - b, partialPredicateCall) or - index = n and result = e.getImmediatePattern() and partialPredicateCall = "Pattern()" + result = e.getVariable(index - n) and + partialPredicateCall = "Variable(" + (index - n).toString() + ")" + or + index = nVariable and + result = e.getImmediatePattern() and + partialPredicateCall = "Pattern()" or index = nPattern and result = e.getImmediateWhere() and partialPredicateCall = "Where()" or diff --git a/swift/ql/lib/codeql/swift/generated/Raw.qll b/swift/ql/lib/codeql/swift/generated/Raw.qll index 69b72a2b06b7..820dd7e3a888 100644 --- a/swift/ql/lib/codeql/swift/generated/Raw.qll +++ b/swift/ql/lib/codeql/swift/generated/Raw.qll @@ -3003,6 +3003,11 @@ module Raw { class ForEachStmt extends @for_each_stmt, LabeledStmt { override string toString() { result = "ForEachStmt" } + /** + * Gets the `index`th variable of this for each statement (0-based). + */ + VarDecl getVariable(int index) { for_each_stmt_variables(this, index, result) } + /** * Gets the pattern of this for each statement. */ diff --git a/swift/ql/lib/codeql/swift/generated/stmt/ForEachStmt.qll b/swift/ql/lib/codeql/swift/generated/stmt/ForEachStmt.qll index 9adc411cf6ab..4b156f582f92 100644 --- a/swift/ql/lib/codeql/swift/generated/stmt/ForEachStmt.qll +++ b/swift/ql/lib/codeql/swift/generated/stmt/ForEachStmt.qll @@ -11,6 +11,7 @@ import codeql.swift.elements.expr.Expr import codeql.swift.elements.stmt.internal.LabeledStmtImpl::Impl as LabeledStmtImpl import codeql.swift.elements.pattern.Pattern import codeql.swift.elements.decl.PatternBindingDecl +import codeql.swift.elements.decl.VarDecl /** * INTERNAL: This module contains the fully generated definition of `ForEachStmt` and should not @@ -24,6 +25,26 @@ module Generated { class ForEachStmt extends Synth::TForEachStmt, LabeledStmtImpl::LabeledStmt { override string getAPrimaryQlClass() { result = "ForEachStmt" } + /** + * Gets the `index`th variable of this for each statement (0-based). + */ + VarDecl getVariable(int index) { + result = + Synth::convertVarDeclFromRaw(Synth::convertForEachStmtToRaw(this) + .(Raw::ForEachStmt) + .getVariable(index)) + } + + /** + * Gets any of the variables of this for each statement. + */ + final VarDecl getAVariable() { result = this.getVariable(_) } + + /** + * Gets the number of variables of this for each statement. + */ + final int getNumberOfVariables() { result = count(int i | exists(this.getVariable(i))) } + /** * Gets the pattern of this for each statement. * diff --git a/swift/ql/lib/codeql/swift/security/CommandInjectionExtensions.qll b/swift/ql/lib/codeql/swift/security/CommandInjectionExtensions.qll index b1fd734440b5..426fc7a664fb 100644 --- a/swift/ql/lib/codeql/swift/security/CommandInjectionExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/CommandInjectionExtensions.qll @@ -63,6 +63,7 @@ private class CommandInjectionSinks extends SinkModelCsv { private class CommandInjectionDefaultBarrier extends CommandInjectionBarrier { CommandInjectionDefaultBarrier() { // any numeric type - this.asExpr().getType().getUnderlyingType().getABaseType*().getName() = "Numeric" + this.asExpr().getType().getUnderlyingType().getABaseType*().getName() = + ["Numeric", "SignedInteger", "UnsignedInteger"] } } diff --git a/swift/ql/lib/codeql/swift/security/PredicateInjectionExtensions.qll b/swift/ql/lib/codeql/swift/security/PredicateInjectionExtensions.qll index 9e5a8a8e57b8..2beb37c88d20 100644 --- a/swift/ql/lib/codeql/swift/security/PredicateInjectionExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/PredicateInjectionExtensions.qll @@ -46,6 +46,7 @@ private class PredicateInjectionSinkCsv extends SinkModelCsv { private class PredicateInjectionDefaultBarrier extends PredicateInjectionBarrier { PredicateInjectionDefaultBarrier() { // any numeric type - this.asExpr().getType().getUnderlyingType().getABaseType*().getName() = "Numeric" + this.asExpr().getType().getUnderlyingType().getABaseType*().getName() = + ["Numeric", "SignedInteger", "UnsignedInteger"] } } diff --git a/swift/ql/lib/codeql/swift/security/SqlInjectionExtensions.qll b/swift/ql/lib/codeql/swift/security/SqlInjectionExtensions.qll index 1437e67dc21e..4a8714967950 100644 --- a/swift/ql/lib/codeql/swift/security/SqlInjectionExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/SqlInjectionExtensions.qll @@ -190,6 +190,7 @@ private class DefaultSqlInjectionSink extends SqlInjectionSink { private class SqlInjectionDefaultBarrier extends SqlInjectionBarrier { SqlInjectionDefaultBarrier() { // any numeric type - this.asExpr().getType().getUnderlyingType().getABaseType*().getName() = "Numeric" + this.asExpr().getType().getUnderlyingType().getABaseType*().getName() = + ["Numeric", "SignedInteger", "UnsignedInteger"] } } diff --git a/swift/ql/lib/codeql/swift/security/UncontrolledFormatStringExtensions.qll b/swift/ql/lib/codeql/swift/security/UncontrolledFormatStringExtensions.qll index b114f72f215f..97c987c51b0b 100644 --- a/swift/ql/lib/codeql/swift/security/UncontrolledFormatStringExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/UncontrolledFormatStringExtensions.qll @@ -94,6 +94,7 @@ class HeuristicUncontrolledFormatStringSink extends UncontrolledFormatStringSink private class UncontrolledFormatStringDefaultBarrier extends UncontrolledFormatStringBarrier { UncontrolledFormatStringDefaultBarrier() { // any numeric type - this.asExpr().getType().getUnderlyingType().getABaseType*().getName() = "Numeric" + this.asExpr().getType().getUnderlyingType().getABaseType*().getName() = + ["Numeric", "SignedInteger", "UnsignedInteger"] } } diff --git a/swift/ql/lib/codeql/swift/security/UnsafeJsEvalExtensions.qll b/swift/ql/lib/codeql/swift/security/UnsafeJsEvalExtensions.qll index 3eb65e6460f4..9129d033409c 100644 --- a/swift/ql/lib/codeql/swift/security/UnsafeJsEvalExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/UnsafeJsEvalExtensions.qll @@ -127,6 +127,7 @@ private class DefaultUnsafeJsEvalSink extends UnsafeJsEvalSink { private class UnsafeJsEvalDefaultBarrier extends UnsafeJsEvalBarrier { UnsafeJsEvalDefaultBarrier() { // any numeric type - this.asExpr().getType().getUnderlyingType().getABaseType*().getName() = "Numeric" + this.asExpr().getType().getUnderlyingType().getABaseType*().getName() = + ["Numeric", "SignedInteger", "UnsignedInteger"] } } diff --git a/swift/ql/lib/codeql/swift/security/UnsafeUnpackExtensions.qll b/swift/ql/lib/codeql/swift/security/UnsafeUnpackExtensions.qll index c102aa40a1ef..114ba813d210 100644 --- a/swift/ql/lib/codeql/swift/security/UnsafeUnpackExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/UnsafeUnpackExtensions.qll @@ -73,6 +73,7 @@ private class UnsafeUnpackAdditionalDataFlowStep extends UnsafeUnpackAdditionalF private class UnsafeUnpackDefaultBarrier extends UnsafeUnpackBarrier { UnsafeUnpackDefaultBarrier() { // any numeric type - this.asExpr().getType().getUnderlyingType().getABaseType*().getName() = "Numeric" + this.asExpr().getType().getUnderlyingType().getABaseType*().getName() = + ["Numeric", "SignedInteger", "UnsignedInteger"] } } diff --git a/swift/ql/lib/codeql/swift/security/regex/RegexInjectionExtensions.qll b/swift/ql/lib/codeql/swift/security/regex/RegexInjectionExtensions.qll index d95bcc212bf5..eb2f3ed564b0 100644 --- a/swift/ql/lib/codeql/swift/security/regex/RegexInjectionExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/regex/RegexInjectionExtensions.qll @@ -64,6 +64,7 @@ private class RegexInjectionSinks extends SinkModelCsv { private class RegexInjectionDefaultBarrier extends RegexInjectionBarrier { RegexInjectionDefaultBarrier() { // any numeric type - this.asExpr().getType().getUnderlyingType().getABaseType*().getName() = "Numeric" + this.asExpr().getType().getUnderlyingType().getABaseType*().getName() = + ["Numeric", "SignedInteger", "UnsignedInteger"] } } diff --git a/swift/ql/lib/swift.dbscheme b/swift/ql/lib/swift.dbscheme index 44c4818a8987..33db81ad4b60 100644 --- a/swift/ql/lib/swift.dbscheme +++ b/swift/ql/lib/swift.dbscheme @@ -2019,6 +2019,13 @@ for_each_stmts( //dir=stmt int body: @brace_stmt_or_none ref ); +#keyset[id, index] +for_each_stmt_variables( //dir=stmt + int id: @for_each_stmt ref, + int index: int ref, + int variable: @var_decl_or_none ref +); + #keyset[id] for_each_stmt_wheres( //dir=stmt int id: @for_each_stmt ref, diff --git a/swift/ql/lib/upgrades/44c4818a8987b5e1b3cd11e553e41045e1262451/old.dbscheme b/swift/ql/lib/upgrades/44c4818a8987b5e1b3cd11e553e41045e1262451/old.dbscheme new file mode 100644 index 000000000000..44c4818a8987 --- /dev/null +++ b/swift/ql/lib/upgrades/44c4818a8987b5e1b3cd11e553e41045e1262451/old.dbscheme @@ -0,0 +1,2786 @@ +// generated by codegen/codegen.py, do not edit + +// from prefix.dbscheme +/** + * The source location of the snapshot. + */ +sourceLocationPrefix( + string prefix: string ref +); + + +// from schema.py + +@element = + @file +| @generic_context +| @locatable +| @location +| @type +; + +#keyset[id] +element_is_unknown( + int id: @element ref +); + +@file = + @db_file +; + +#keyset[id] +files( + int id: @file ref, + string name: string ref +); + +#keyset[id] +file_is_successfully_extracted( + int id: @file ref +); + +@locatable = + @argument +| @ast_node +| @comment +| @diagnostics +| @error_element +; + +#keyset[id] +locatable_locations( + int id: @locatable ref, + int location: @location_or_none ref +); + +@location = + @db_location +; + +#keyset[id] +locations( + int id: @location ref, + int file: @file_or_none ref, + int start_line: int ref, + int start_column: int ref, + int end_line: int ref, + int end_column: int ref +); + +@ast_node = + @availability_info +| @availability_spec +| @callable +| @case_label_item +| @condition_element +| @decl +| @expr +| @key_path_component +| @macro_role +| @pattern +| @stmt +| @stmt_condition +| @type_repr +; + +comments( + unique int id: @comment, + string text: string ref +); + +db_files( + unique int id: @db_file +); + +db_locations( + unique int id: @db_location +); + +diagnostics( + unique int id: @diagnostics, + string text: string ref, + int kind: int ref +); + +@error_element = + @error_expr +| @error_type +| @overloaded_decl_ref_expr +| @unresolved_decl_ref_expr +| @unresolved_dot_expr +| @unresolved_member_chain_result_expr +| @unresolved_member_expr +| @unresolved_pattern_expr +| @unresolved_specialize_expr +| @unresolved_type +| @unresolved_type_conversion_expr +| @unspecified_element +; + +availability_infos( + unique int id: @availability_info +); + +#keyset[id] +availability_info_is_unavailable( + int id: @availability_info ref +); + +#keyset[id, index] +availability_info_specs( + int id: @availability_info ref, + int index: int ref, + int spec: @availability_spec_or_none ref +); + +@availability_spec = + @other_availability_spec +| @platform_version_availability_spec +; + +@callable = + @closure_expr +| @function +; + +#keyset[id] +callable_names( + int id: @callable ref, + string name: string ref +); + +#keyset[id] +callable_self_params( + int id: @callable ref, + int self_param: @param_decl_or_none ref +); + +#keyset[id, index] +callable_params( + int id: @callable ref, + int index: int ref, + int param: @param_decl_or_none ref +); + +#keyset[id] +callable_bodies( + int id: @callable ref, + int body: @brace_stmt_or_none ref +); + +#keyset[id, index] +callable_captures( + int id: @callable ref, + int index: int ref, + int capture: @captured_decl_or_none ref +); + +key_path_components( + unique int id: @key_path_component, + int kind: int ref, + int component_type: @type_or_none ref +); + +#keyset[id, index] +key_path_component_subscript_arguments( + int id: @key_path_component ref, + int index: int ref, + int subscript_argument: @argument_or_none ref +); + +#keyset[id] +key_path_component_tuple_indices( + int id: @key_path_component ref, + int tuple_index: int ref +); + +#keyset[id] +key_path_component_decl_refs( + int id: @key_path_component ref, + int decl_ref: @value_decl_or_none ref +); + +macro_roles( + unique int id: @macro_role, + int kind: int ref, + int macro_syntax: int ref +); + +#keyset[id, index] +macro_role_conformances( + int id: @macro_role ref, + int index: int ref, + int conformance: @type_expr_or_none ref +); + +#keyset[id, index] +macro_role_names( + int id: @macro_role ref, + int index: int ref, + string name: string ref +); + +unspecified_elements( + unique int id: @unspecified_element, + string property: string ref, + string error: string ref +); + +#keyset[id] +unspecified_element_parents( + int id: @unspecified_element ref, + int parent: @element ref +); + +#keyset[id] +unspecified_element_indices( + int id: @unspecified_element ref, + int index: int ref +); + +#keyset[id, index] +unspecified_element_children( + int id: @unspecified_element ref, + int index: int ref, + int child: @ast_node_or_none ref +); + +other_availability_specs( + unique int id: @other_availability_spec +); + +platform_version_availability_specs( + unique int id: @platform_version_availability_spec, + string platform: string ref, + string version: string ref +); + +@decl = + @captured_decl +| @enum_case_decl +| @extension_decl +| @if_config_decl +| @import_decl +| @missing_member_decl +| @operator_decl +| @pattern_binding_decl +| @pound_diagnostic_decl +| @precedence_group_decl +| @top_level_code_decl +| @value_decl +; + +#keyset[id] +decls( //dir=decl + int id: @decl ref, + int module: @module_decl_or_none ref +); + +#keyset[id, index] +decl_members( //dir=decl + int id: @decl ref, + int index: int ref, + int member: @decl_or_none ref +); + +@generic_context = + @extension_decl +| @function +| @generic_type_decl +| @macro_decl +| @subscript_decl +; + +#keyset[id, index] +generic_context_generic_type_params( //dir=decl + int id: @generic_context ref, + int index: int ref, + int generic_type_param: @generic_type_param_decl_or_none ref +); + +captured_decls( //dir=decl + unique int id: @captured_decl, + int decl: @value_decl_or_none ref +); + +#keyset[id] +captured_decl_is_direct( //dir=decl + int id: @captured_decl ref +); + +#keyset[id] +captured_decl_is_escaping( //dir=decl + int id: @captured_decl ref +); + +enum_case_decls( //dir=decl + unique int id: @enum_case_decl +); + +#keyset[id, index] +enum_case_decl_elements( //dir=decl + int id: @enum_case_decl ref, + int index: int ref, + int element: @enum_element_decl_or_none ref +); + +extension_decls( //dir=decl + unique int id: @extension_decl, + int extended_type_decl: @nominal_type_decl_or_none ref +); + +#keyset[id, index] +extension_decl_protocols( //dir=decl + int id: @extension_decl ref, + int index: int ref, + int protocol: @protocol_decl_or_none ref +); + +if_config_decls( //dir=decl + unique int id: @if_config_decl +); + +#keyset[id, index] +if_config_decl_active_elements( //dir=decl + int id: @if_config_decl ref, + int index: int ref, + int active_element: @ast_node_or_none ref +); + +import_decls( //dir=decl + unique int id: @import_decl +); + +#keyset[id] +import_decl_is_exported( //dir=decl + int id: @import_decl ref +); + +#keyset[id] +import_decl_imported_modules( //dir=decl + int id: @import_decl ref, + int imported_module: @module_decl_or_none ref +); + +#keyset[id, index] +import_decl_declarations( //dir=decl + int id: @import_decl ref, + int index: int ref, + int declaration: @value_decl_or_none ref +); + +missing_member_decls( //dir=decl + unique int id: @missing_member_decl, + string name: string ref +); + +@operator_decl = + @infix_operator_decl +| @postfix_operator_decl +| @prefix_operator_decl +; + +#keyset[id] +operator_decls( //dir=decl + int id: @operator_decl ref, + string name: string ref +); + +pattern_binding_decls( //dir=decl + unique int id: @pattern_binding_decl +); + +#keyset[id, index] +pattern_binding_decl_inits( //dir=decl + int id: @pattern_binding_decl ref, + int index: int ref, + int init: @expr_or_none ref +); + +#keyset[id, index] +pattern_binding_decl_patterns( //dir=decl + int id: @pattern_binding_decl ref, + int index: int ref, + int pattern: @pattern_or_none ref +); + +pound_diagnostic_decls( //dir=decl + unique int id: @pound_diagnostic_decl, + int kind: int ref, + int message: @string_literal_expr_or_none ref +); + +precedence_group_decls( //dir=decl + unique int id: @precedence_group_decl +); + +top_level_code_decls( //dir=decl + unique int id: @top_level_code_decl, + int body: @brace_stmt_or_none ref +); + +@value_decl = + @abstract_storage_decl +| @enum_element_decl +| @function +| @macro_decl +| @type_decl +; + +#keyset[id] +value_decls( //dir=decl + int id: @value_decl ref, + int interface_type: @type_or_none ref +); + +@abstract_storage_decl = + @subscript_decl +| @var_decl +; + +#keyset[id, index] +abstract_storage_decl_accessors( //dir=decl + int id: @abstract_storage_decl ref, + int index: int ref, + int accessor: @accessor_or_none ref +); + +enum_element_decls( //dir=decl + unique int id: @enum_element_decl, + string name: string ref +); + +#keyset[id, index] +enum_element_decl_params( //dir=decl + int id: @enum_element_decl ref, + int index: int ref, + int param: @param_decl_or_none ref +); + +@function = + @accessor_or_named_function +| @deinitializer +| @initializer +; + +infix_operator_decls( //dir=decl + unique int id: @infix_operator_decl +); + +#keyset[id] +infix_operator_decl_precedence_groups( //dir=decl + int id: @infix_operator_decl ref, + int precedence_group: @precedence_group_decl_or_none ref +); + +macro_decls( //dir=decl + unique int id: @macro_decl, + string name: string ref +); + +#keyset[id, index] +macro_decl_parameters( //dir=decl + int id: @macro_decl ref, + int index: int ref, + int parameter: @param_decl_or_none ref +); + +#keyset[id, index] +macro_decl_roles( //dir=decl + int id: @macro_decl ref, + int index: int ref, + int role: @macro_role_or_none ref +); + +postfix_operator_decls( //dir=decl + unique int id: @postfix_operator_decl +); + +prefix_operator_decls( //dir=decl + unique int id: @prefix_operator_decl +); + +@type_decl = + @abstract_type_param_decl +| @generic_type_decl +| @module_decl +; + +#keyset[id] +type_decls( //dir=decl + int id: @type_decl ref, + string name: string ref +); + +#keyset[id, index] +type_decl_inherited_types( //dir=decl + int id: @type_decl ref, + int index: int ref, + int inherited_type: @type_or_none ref +); + +@abstract_type_param_decl = + @associated_type_decl +| @generic_type_param_decl +; + +@accessor_or_named_function = + @accessor +| @named_function +; + +deinitializers( //dir=decl + unique int id: @deinitializer +); + +@generic_type_decl = + @nominal_type_decl +| @opaque_type_decl +| @type_alias_decl +; + +initializers( //dir=decl + unique int id: @initializer +); + +module_decls( //dir=decl + unique int id: @module_decl +); + +#keyset[id] +module_decl_is_builtin_module( //dir=decl + int id: @module_decl ref +); + +#keyset[id] +module_decl_is_system_module( //dir=decl + int id: @module_decl ref +); + +module_decl_imported_modules( //dir=decl + int id: @module_decl ref, + int imported_module: @module_decl_or_none ref +); + +module_decl_exported_modules( //dir=decl + int id: @module_decl ref, + int exported_module: @module_decl_or_none ref +); + +subscript_decls( //dir=decl + unique int id: @subscript_decl, + int element_type: @type_or_none ref +); + +#keyset[id, index] +subscript_decl_params( //dir=decl + int id: @subscript_decl ref, + int index: int ref, + int param: @param_decl_or_none ref +); + +@var_decl = + @concrete_var_decl +| @param_decl +; + +#keyset[id] +var_decls( //dir=decl + int id: @var_decl ref, + string name: string ref, + int type_: @type_or_none ref +); + +#keyset[id] +var_decl_attached_property_wrapper_types( //dir=decl + int id: @var_decl ref, + int attached_property_wrapper_type: @type_or_none ref +); + +#keyset[id] +var_decl_parent_patterns( //dir=decl + int id: @var_decl ref, + int parent_pattern: @pattern_or_none ref +); + +#keyset[id] +var_decl_parent_initializers( //dir=decl + int id: @var_decl ref, + int parent_initializer: @expr_or_none ref +); + +#keyset[id] +var_decl_property_wrapper_backing_var_bindings( //dir=decl + int id: @var_decl ref, + int property_wrapper_backing_var_binding: @pattern_binding_decl_or_none ref +); + +#keyset[id] +var_decl_property_wrapper_backing_vars( //dir=decl + int id: @var_decl ref, + int property_wrapper_backing_var: @var_decl_or_none ref +); + +#keyset[id] +var_decl_property_wrapper_projection_var_bindings( //dir=decl + int id: @var_decl ref, + int property_wrapper_projection_var_binding: @pattern_binding_decl_or_none ref +); + +#keyset[id] +var_decl_property_wrapper_projection_vars( //dir=decl + int id: @var_decl ref, + int property_wrapper_projection_var: @var_decl_or_none ref +); + +accessors( //dir=decl + unique int id: @accessor +); + +#keyset[id] +accessor_is_getter( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_setter( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_will_set( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_did_set( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_read( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_modify( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_unsafe_address( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_unsafe_mutable_address( //dir=decl + int id: @accessor ref +); + +associated_type_decls( //dir=decl + unique int id: @associated_type_decl +); + +concrete_var_decls( //dir=decl + unique int id: @concrete_var_decl, + int introducer_int: int ref +); + +generic_type_param_decls( //dir=decl + unique int id: @generic_type_param_decl +); + +named_functions( //dir=decl + unique int id: @named_function +); + +@nominal_type_decl = + @class_decl +| @enum_decl +| @protocol_decl +| @struct_decl +; + +#keyset[id] +nominal_type_decls( //dir=decl + int id: @nominal_type_decl ref, + int type_: @type_or_none ref +); + +opaque_type_decls( //dir=decl + unique int id: @opaque_type_decl, + int naming_declaration: @value_decl_or_none ref +); + +#keyset[id, index] +opaque_type_decl_opaque_generic_params( //dir=decl + int id: @opaque_type_decl ref, + int index: int ref, + int opaque_generic_param: @generic_type_param_type_or_none ref +); + +param_decls( //dir=decl + unique int id: @param_decl +); + +#keyset[id] +param_decl_is_inout( //dir=decl + int id: @param_decl ref +); + +#keyset[id] +param_decl_property_wrapper_local_wrapped_var_bindings( //dir=decl + int id: @param_decl ref, + int property_wrapper_local_wrapped_var_binding: @pattern_binding_decl_or_none ref +); + +#keyset[id] +param_decl_property_wrapper_local_wrapped_vars( //dir=decl + int id: @param_decl ref, + int property_wrapper_local_wrapped_var: @var_decl_or_none ref +); + +type_alias_decls( //dir=decl + unique int id: @type_alias_decl, + int aliased_type: @type_or_none ref +); + +class_decls( //dir=decl + unique int id: @class_decl +); + +enum_decls( //dir=decl + unique int id: @enum_decl +); + +protocol_decls( //dir=decl + unique int id: @protocol_decl +); + +struct_decls( //dir=decl + unique int id: @struct_decl +); + +arguments( //dir=expr + unique int id: @argument, + string label: string ref, + int expr: @expr_or_none ref +); + +@expr = + @any_try_expr +| @applied_property_wrapper_expr +| @apply_expr +| @assign_expr +| @bind_optional_expr +| @capture_list_expr +| @closure_expr +| @collection_expr +| @consume_expr +| @copy_expr +| @decl_ref_expr +| @default_argument_expr +| @discard_assignment_expr +| @dot_syntax_base_ignored_expr +| @dynamic_type_expr +| @enum_is_case_expr +| @error_expr +| @explicit_cast_expr +| @force_value_expr +| @identity_expr +| @if_expr +| @implicit_conversion_expr +| @in_out_expr +| @key_path_application_expr +| @key_path_dot_expr +| @key_path_expr +| @lazy_initialization_expr +| @literal_expr +| @lookup_expr +| @make_temporarily_escapable_expr +| @materialize_pack_expr +| @obj_c_selector_expr +| @one_way_expr +| @opaque_value_expr +| @open_existential_expr +| @optional_evaluation_expr +| @other_initializer_ref_expr +| @overloaded_decl_ref_expr +| @pack_element_expr +| @pack_expansion_expr +| @property_wrapper_value_placeholder_expr +| @rebind_self_in_initializer_expr +| @sequence_expr +| @single_value_stmt_expr +| @super_ref_expr +| @tap_expr +| @tuple_element_expr +| @tuple_expr +| @type_expr +| @unresolved_decl_ref_expr +| @unresolved_dot_expr +| @unresolved_member_expr +| @unresolved_pattern_expr +| @unresolved_specialize_expr +| @vararg_expansion_expr +; + +#keyset[id] +expr_types( //dir=expr + int id: @expr ref, + int type_: @type_or_none ref +); + +@any_try_expr = + @force_try_expr +| @optional_try_expr +| @try_expr +; + +#keyset[id] +any_try_exprs( //dir=expr + int id: @any_try_expr ref, + int sub_expr: @expr_or_none ref +); + +applied_property_wrapper_exprs( //dir=expr + unique int id: @applied_property_wrapper_expr, + int kind: int ref, + int value: @expr_or_none ref, + int param: @param_decl_or_none ref +); + +@apply_expr = + @binary_expr +| @call_expr +| @postfix_unary_expr +| @prefix_unary_expr +| @self_apply_expr +; + +#keyset[id] +apply_exprs( //dir=expr + int id: @apply_expr ref, + int function: @expr_or_none ref +); + +#keyset[id, index] +apply_expr_arguments( //dir=expr + int id: @apply_expr ref, + int index: int ref, + int argument: @argument_or_none ref +); + +assign_exprs( //dir=expr + unique int id: @assign_expr, + int dest: @expr_or_none ref, + int source: @expr_or_none ref +); + +bind_optional_exprs( //dir=expr + unique int id: @bind_optional_expr, + int sub_expr: @expr_or_none ref +); + +capture_list_exprs( //dir=expr + unique int id: @capture_list_expr, + int closure_body: @closure_expr_or_none ref +); + +#keyset[id, index] +capture_list_expr_binding_decls( //dir=expr + int id: @capture_list_expr ref, + int index: int ref, + int binding_decl: @pattern_binding_decl_or_none ref +); + +@closure_expr = + @auto_closure_expr +| @explicit_closure_expr +; + +@collection_expr = + @array_expr +| @dictionary_expr +; + +consume_exprs( //dir=expr + unique int id: @consume_expr, + int sub_expr: @expr_or_none ref +); + +copy_exprs( //dir=expr + unique int id: @copy_expr, + int sub_expr: @expr_or_none ref +); + +decl_ref_exprs( //dir=expr + unique int id: @decl_ref_expr, + int decl: @decl_or_none ref +); + +#keyset[id, index] +decl_ref_expr_replacement_types( //dir=expr + int id: @decl_ref_expr ref, + int index: int ref, + int replacement_type: @type_or_none ref +); + +#keyset[id] +decl_ref_expr_has_direct_to_storage_semantics( //dir=expr + int id: @decl_ref_expr ref +); + +#keyset[id] +decl_ref_expr_has_direct_to_implementation_semantics( //dir=expr + int id: @decl_ref_expr ref +); + +#keyset[id] +decl_ref_expr_has_ordinary_semantics( //dir=expr + int id: @decl_ref_expr ref +); + +#keyset[id] +decl_ref_expr_has_distributed_thunk_semantics( //dir=expr + int id: @decl_ref_expr ref +); + +default_argument_exprs( //dir=expr + unique int id: @default_argument_expr, + int param_decl: @param_decl_or_none ref, + int param_index: int ref +); + +#keyset[id] +default_argument_expr_caller_side_defaults( //dir=expr + int id: @default_argument_expr ref, + int caller_side_default: @expr_or_none ref +); + +discard_assignment_exprs( //dir=expr + unique int id: @discard_assignment_expr +); + +dot_syntax_base_ignored_exprs( //dir=expr + unique int id: @dot_syntax_base_ignored_expr, + int qualifier: @expr_or_none ref, + int sub_expr: @expr_or_none ref +); + +dynamic_type_exprs( //dir=expr + unique int id: @dynamic_type_expr, + int base: @expr_or_none ref +); + +enum_is_case_exprs( //dir=expr + unique int id: @enum_is_case_expr, + int sub_expr: @expr_or_none ref, + int element: @enum_element_decl_or_none ref +); + +error_exprs( //dir=expr + unique int id: @error_expr +); + +@explicit_cast_expr = + @checked_cast_expr +| @coerce_expr +; + +#keyset[id] +explicit_cast_exprs( //dir=expr + int id: @explicit_cast_expr ref, + int sub_expr: @expr_or_none ref +); + +force_value_exprs( //dir=expr + unique int id: @force_value_expr, + int sub_expr: @expr_or_none ref +); + +@identity_expr = + @await_expr +| @borrow_expr +| @dot_self_expr +| @paren_expr +| @unresolved_member_chain_result_expr +; + +#keyset[id] +identity_exprs( //dir=expr + int id: @identity_expr ref, + int sub_expr: @expr_or_none ref +); + +if_exprs( //dir=expr + unique int id: @if_expr, + int condition: @expr_or_none ref, + int then_expr: @expr_or_none ref, + int else_expr: @expr_or_none ref +); + +@implicit_conversion_expr = + @abi_safe_conversion_expr +| @any_hashable_erasure_expr +| @archetype_to_super_expr +| @array_to_pointer_expr +| @bridge_from_obj_c_expr +| @bridge_to_obj_c_expr +| @class_metatype_to_object_expr +| @collection_upcast_conversion_expr +| @conditional_bridge_from_obj_c_expr +| @covariant_function_conversion_expr +| @covariant_return_conversion_expr +| @derived_to_base_expr +| @destructure_tuple_expr +| @differentiable_function_expr +| @differentiable_function_extract_original_expr +| @erasure_expr +| @existential_metatype_to_object_expr +| @foreign_object_conversion_expr +| @function_conversion_expr +| @in_out_to_pointer_expr +| @inject_into_optional_expr +| @linear_function_expr +| @linear_function_extract_original_expr +| @linear_to_differentiable_function_expr +| @load_expr +| @metatype_conversion_expr +| @pointer_to_pointer_expr +| @protocol_metatype_to_object_expr +| @string_to_pointer_expr +| @underlying_to_opaque_expr +| @unevaluated_instance_expr +| @unresolved_type_conversion_expr +; + +#keyset[id] +implicit_conversion_exprs( //dir=expr + int id: @implicit_conversion_expr ref, + int sub_expr: @expr_or_none ref +); + +in_out_exprs( //dir=expr + unique int id: @in_out_expr, + int sub_expr: @expr_or_none ref +); + +key_path_application_exprs( //dir=expr + unique int id: @key_path_application_expr, + int base: @expr_or_none ref, + int key_path: @expr_or_none ref +); + +key_path_dot_exprs( //dir=expr + unique int id: @key_path_dot_expr +); + +key_path_exprs( //dir=expr + unique int id: @key_path_expr +); + +#keyset[id] +key_path_expr_roots( //dir=expr + int id: @key_path_expr ref, + int root: @type_repr_or_none ref +); + +#keyset[id, index] +key_path_expr_components( //dir=expr + int id: @key_path_expr ref, + int index: int ref, + int component: @key_path_component_or_none ref +); + +lazy_initialization_exprs( //dir=expr + unique int id: @lazy_initialization_expr, + int sub_expr: @expr_or_none ref +); + +@literal_expr = + @builtin_literal_expr +| @interpolated_string_literal_expr +| @nil_literal_expr +| @object_literal_expr +| @regex_literal_expr +; + +@lookup_expr = + @dynamic_lookup_expr +| @member_ref_expr +| @subscript_expr +; + +#keyset[id] +lookup_exprs( //dir=expr + int id: @lookup_expr ref, + int base: @expr_or_none ref +); + +#keyset[id] +lookup_expr_members( //dir=expr + int id: @lookup_expr ref, + int member: @decl_or_none ref +); + +make_temporarily_escapable_exprs( //dir=expr + unique int id: @make_temporarily_escapable_expr, + int escaping_closure: @opaque_value_expr_or_none ref, + int nonescaping_closure: @expr_or_none ref, + int sub_expr: @expr_or_none ref +); + +materialize_pack_exprs( //dir=expr + unique int id: @materialize_pack_expr, + int sub_expr: @expr_or_none ref +); + +obj_c_selector_exprs( //dir=expr + unique int id: @obj_c_selector_expr, + int sub_expr: @expr_or_none ref, + int method: @function_or_none ref +); + +one_way_exprs( //dir=expr + unique int id: @one_way_expr, + int sub_expr: @expr_or_none ref +); + +opaque_value_exprs( //dir=expr + unique int id: @opaque_value_expr +); + +open_existential_exprs( //dir=expr + unique int id: @open_existential_expr, + int sub_expr: @expr_or_none ref, + int existential: @expr_or_none ref, + int opaque_expr: @opaque_value_expr_or_none ref +); + +optional_evaluation_exprs( //dir=expr + unique int id: @optional_evaluation_expr, + int sub_expr: @expr_or_none ref +); + +other_initializer_ref_exprs( //dir=expr + unique int id: @other_initializer_ref_expr, + int initializer: @initializer_or_none ref +); + +overloaded_decl_ref_exprs( //dir=expr + unique int id: @overloaded_decl_ref_expr +); + +#keyset[id, index] +overloaded_decl_ref_expr_possible_declarations( //dir=expr + int id: @overloaded_decl_ref_expr ref, + int index: int ref, + int possible_declaration: @value_decl_or_none ref +); + +pack_element_exprs( //dir=expr + unique int id: @pack_element_expr, + int sub_expr: @expr_or_none ref +); + +pack_expansion_exprs( //dir=expr + unique int id: @pack_expansion_expr, + int pattern_expr: @expr_or_none ref +); + +property_wrapper_value_placeholder_exprs( //dir=expr + unique int id: @property_wrapper_value_placeholder_expr, + int placeholder: @opaque_value_expr_or_none ref +); + +#keyset[id] +property_wrapper_value_placeholder_expr_wrapped_values( //dir=expr + int id: @property_wrapper_value_placeholder_expr ref, + int wrapped_value: @expr_or_none ref +); + +rebind_self_in_initializer_exprs( //dir=expr + unique int id: @rebind_self_in_initializer_expr, + int sub_expr: @expr_or_none ref, + int self: @var_decl_or_none ref +); + +sequence_exprs( //dir=expr + unique int id: @sequence_expr +); + +#keyset[id, index] +sequence_expr_elements( //dir=expr + int id: @sequence_expr ref, + int index: int ref, + int element: @expr_or_none ref +); + +single_value_stmt_exprs( //dir=expr + unique int id: @single_value_stmt_expr, + int stmt: @stmt_or_none ref +); + +super_ref_exprs( //dir=expr + unique int id: @super_ref_expr, + int self: @var_decl_or_none ref +); + +tap_exprs( //dir=expr + unique int id: @tap_expr, + int body: @brace_stmt_or_none ref, + int var: @var_decl_or_none ref +); + +#keyset[id] +tap_expr_sub_exprs( //dir=expr + int id: @tap_expr ref, + int sub_expr: @expr_or_none ref +); + +tuple_element_exprs( //dir=expr + unique int id: @tuple_element_expr, + int sub_expr: @expr_or_none ref, + int index: int ref +); + +tuple_exprs( //dir=expr + unique int id: @tuple_expr +); + +#keyset[id, index] +tuple_expr_elements( //dir=expr + int id: @tuple_expr ref, + int index: int ref, + int element: @expr_or_none ref +); + +type_exprs( //dir=expr + unique int id: @type_expr +); + +#keyset[id] +type_expr_type_reprs( //dir=expr + int id: @type_expr ref, + int type_repr: @type_repr_or_none ref +); + +unresolved_decl_ref_exprs( //dir=expr + unique int id: @unresolved_decl_ref_expr +); + +#keyset[id] +unresolved_decl_ref_expr_names( //dir=expr + int id: @unresolved_decl_ref_expr ref, + string name: string ref +); + +unresolved_dot_exprs( //dir=expr + unique int id: @unresolved_dot_expr, + int base: @expr_or_none ref, + string name: string ref +); + +unresolved_member_exprs( //dir=expr + unique int id: @unresolved_member_expr, + string name: string ref +); + +unresolved_pattern_exprs( //dir=expr + unique int id: @unresolved_pattern_expr, + int sub_pattern: @pattern_or_none ref +); + +unresolved_specialize_exprs( //dir=expr + unique int id: @unresolved_specialize_expr, + int sub_expr: @expr_or_none ref +); + +vararg_expansion_exprs( //dir=expr + unique int id: @vararg_expansion_expr, + int sub_expr: @expr_or_none ref +); + +abi_safe_conversion_exprs( //dir=expr + unique int id: @abi_safe_conversion_expr +); + +any_hashable_erasure_exprs( //dir=expr + unique int id: @any_hashable_erasure_expr +); + +archetype_to_super_exprs( //dir=expr + unique int id: @archetype_to_super_expr +); + +array_exprs( //dir=expr + unique int id: @array_expr +); + +#keyset[id, index] +array_expr_elements( //dir=expr + int id: @array_expr ref, + int index: int ref, + int element: @expr_or_none ref +); + +array_to_pointer_exprs( //dir=expr + unique int id: @array_to_pointer_expr +); + +auto_closure_exprs( //dir=expr + unique int id: @auto_closure_expr +); + +await_exprs( //dir=expr + unique int id: @await_expr +); + +binary_exprs( //dir=expr + unique int id: @binary_expr +); + +borrow_exprs( //dir=expr + unique int id: @borrow_expr +); + +bridge_from_obj_c_exprs( //dir=expr + unique int id: @bridge_from_obj_c_expr +); + +bridge_to_obj_c_exprs( //dir=expr + unique int id: @bridge_to_obj_c_expr +); + +@builtin_literal_expr = + @boolean_literal_expr +| @magic_identifier_literal_expr +| @number_literal_expr +| @string_literal_expr +; + +call_exprs( //dir=expr + unique int id: @call_expr +); + +@checked_cast_expr = + @conditional_checked_cast_expr +| @forced_checked_cast_expr +| @is_expr +; + +class_metatype_to_object_exprs( //dir=expr + unique int id: @class_metatype_to_object_expr +); + +coerce_exprs( //dir=expr + unique int id: @coerce_expr +); + +collection_upcast_conversion_exprs( //dir=expr + unique int id: @collection_upcast_conversion_expr +); + +conditional_bridge_from_obj_c_exprs( //dir=expr + unique int id: @conditional_bridge_from_obj_c_expr +); + +covariant_function_conversion_exprs( //dir=expr + unique int id: @covariant_function_conversion_expr +); + +covariant_return_conversion_exprs( //dir=expr + unique int id: @covariant_return_conversion_expr +); + +derived_to_base_exprs( //dir=expr + unique int id: @derived_to_base_expr +); + +destructure_tuple_exprs( //dir=expr + unique int id: @destructure_tuple_expr +); + +dictionary_exprs( //dir=expr + unique int id: @dictionary_expr +); + +#keyset[id, index] +dictionary_expr_elements( //dir=expr + int id: @dictionary_expr ref, + int index: int ref, + int element: @expr_or_none ref +); + +differentiable_function_exprs( //dir=expr + unique int id: @differentiable_function_expr +); + +differentiable_function_extract_original_exprs( //dir=expr + unique int id: @differentiable_function_extract_original_expr +); + +dot_self_exprs( //dir=expr + unique int id: @dot_self_expr +); + +@dynamic_lookup_expr = + @dynamic_member_ref_expr +| @dynamic_subscript_expr +; + +erasure_exprs( //dir=expr + unique int id: @erasure_expr +); + +existential_metatype_to_object_exprs( //dir=expr + unique int id: @existential_metatype_to_object_expr +); + +explicit_closure_exprs( //dir=expr + unique int id: @explicit_closure_expr +); + +force_try_exprs( //dir=expr + unique int id: @force_try_expr +); + +foreign_object_conversion_exprs( //dir=expr + unique int id: @foreign_object_conversion_expr +); + +function_conversion_exprs( //dir=expr + unique int id: @function_conversion_expr +); + +in_out_to_pointer_exprs( //dir=expr + unique int id: @in_out_to_pointer_expr +); + +inject_into_optional_exprs( //dir=expr + unique int id: @inject_into_optional_expr +); + +interpolated_string_literal_exprs( //dir=expr + unique int id: @interpolated_string_literal_expr +); + +#keyset[id] +interpolated_string_literal_expr_interpolation_exprs( //dir=expr + int id: @interpolated_string_literal_expr ref, + int interpolation_expr: @opaque_value_expr_or_none ref +); + +#keyset[id] +interpolated_string_literal_expr_appending_exprs( //dir=expr + int id: @interpolated_string_literal_expr ref, + int appending_expr: @tap_expr_or_none ref +); + +linear_function_exprs( //dir=expr + unique int id: @linear_function_expr +); + +linear_function_extract_original_exprs( //dir=expr + unique int id: @linear_function_extract_original_expr +); + +linear_to_differentiable_function_exprs( //dir=expr + unique int id: @linear_to_differentiable_function_expr +); + +load_exprs( //dir=expr + unique int id: @load_expr +); + +member_ref_exprs( //dir=expr + unique int id: @member_ref_expr +); + +#keyset[id] +member_ref_expr_has_direct_to_storage_semantics( //dir=expr + int id: @member_ref_expr ref +); + +#keyset[id] +member_ref_expr_has_direct_to_implementation_semantics( //dir=expr + int id: @member_ref_expr ref +); + +#keyset[id] +member_ref_expr_has_ordinary_semantics( //dir=expr + int id: @member_ref_expr ref +); + +#keyset[id] +member_ref_expr_has_distributed_thunk_semantics( //dir=expr + int id: @member_ref_expr ref +); + +metatype_conversion_exprs( //dir=expr + unique int id: @metatype_conversion_expr +); + +nil_literal_exprs( //dir=expr + unique int id: @nil_literal_expr +); + +object_literal_exprs( //dir=expr + unique int id: @object_literal_expr, + int kind: int ref +); + +#keyset[id, index] +object_literal_expr_arguments( //dir=expr + int id: @object_literal_expr ref, + int index: int ref, + int argument: @argument_or_none ref +); + +optional_try_exprs( //dir=expr + unique int id: @optional_try_expr +); + +paren_exprs( //dir=expr + unique int id: @paren_expr +); + +pointer_to_pointer_exprs( //dir=expr + unique int id: @pointer_to_pointer_expr +); + +postfix_unary_exprs( //dir=expr + unique int id: @postfix_unary_expr +); + +prefix_unary_exprs( //dir=expr + unique int id: @prefix_unary_expr +); + +protocol_metatype_to_object_exprs( //dir=expr + unique int id: @protocol_metatype_to_object_expr +); + +regex_literal_exprs( //dir=expr + unique int id: @regex_literal_expr, + string pattern: string ref, + int version: int ref +); + +@self_apply_expr = + @dot_syntax_call_expr +| @initializer_ref_call_expr +; + +#keyset[id] +self_apply_exprs( //dir=expr + int id: @self_apply_expr ref, + int base: @expr_or_none ref +); + +string_to_pointer_exprs( //dir=expr + unique int id: @string_to_pointer_expr +); + +subscript_exprs( //dir=expr + unique int id: @subscript_expr +); + +#keyset[id, index] +subscript_expr_arguments( //dir=expr + int id: @subscript_expr ref, + int index: int ref, + int argument: @argument_or_none ref +); + +#keyset[id] +subscript_expr_has_direct_to_storage_semantics( //dir=expr + int id: @subscript_expr ref +); + +#keyset[id] +subscript_expr_has_direct_to_implementation_semantics( //dir=expr + int id: @subscript_expr ref +); + +#keyset[id] +subscript_expr_has_ordinary_semantics( //dir=expr + int id: @subscript_expr ref +); + +#keyset[id] +subscript_expr_has_distributed_thunk_semantics( //dir=expr + int id: @subscript_expr ref +); + +try_exprs( //dir=expr + unique int id: @try_expr +); + +underlying_to_opaque_exprs( //dir=expr + unique int id: @underlying_to_opaque_expr +); + +unevaluated_instance_exprs( //dir=expr + unique int id: @unevaluated_instance_expr +); + +unresolved_member_chain_result_exprs( //dir=expr + unique int id: @unresolved_member_chain_result_expr +); + +unresolved_type_conversion_exprs( //dir=expr + unique int id: @unresolved_type_conversion_expr +); + +boolean_literal_exprs( //dir=expr + unique int id: @boolean_literal_expr, + boolean value: boolean ref +); + +conditional_checked_cast_exprs( //dir=expr + unique int id: @conditional_checked_cast_expr +); + +dot_syntax_call_exprs( //dir=expr + unique int id: @dot_syntax_call_expr +); + +dynamic_member_ref_exprs( //dir=expr + unique int id: @dynamic_member_ref_expr +); + +dynamic_subscript_exprs( //dir=expr + unique int id: @dynamic_subscript_expr +); + +forced_checked_cast_exprs( //dir=expr + unique int id: @forced_checked_cast_expr +); + +initializer_ref_call_exprs( //dir=expr + unique int id: @initializer_ref_call_expr +); + +is_exprs( //dir=expr + unique int id: @is_expr +); + +magic_identifier_literal_exprs( //dir=expr + unique int id: @magic_identifier_literal_expr, + string kind: string ref +); + +@number_literal_expr = + @float_literal_expr +| @integer_literal_expr +; + +string_literal_exprs( //dir=expr + unique int id: @string_literal_expr, + string value: string ref +); + +float_literal_exprs( //dir=expr + unique int id: @float_literal_expr, + string string_value: string ref +); + +integer_literal_exprs( //dir=expr + unique int id: @integer_literal_expr, + string string_value: string ref +); + +@pattern = + @any_pattern +| @binding_pattern +| @bool_pattern +| @enum_element_pattern +| @expr_pattern +| @is_pattern +| @named_pattern +| @optional_some_pattern +| @paren_pattern +| @tuple_pattern +| @typed_pattern +; + +#keyset[id] +pattern_types( //dir=pattern + int id: @pattern ref, + int type_: @type_or_none ref +); + +any_patterns( //dir=pattern + unique int id: @any_pattern +); + +binding_patterns( //dir=pattern + unique int id: @binding_pattern, + int sub_pattern: @pattern_or_none ref +); + +bool_patterns( //dir=pattern + unique int id: @bool_pattern, + boolean value: boolean ref +); + +enum_element_patterns( //dir=pattern + unique int id: @enum_element_pattern, + int element: @enum_element_decl_or_none ref +); + +#keyset[id] +enum_element_pattern_sub_patterns( //dir=pattern + int id: @enum_element_pattern ref, + int sub_pattern: @pattern_or_none ref +); + +expr_patterns( //dir=pattern + unique int id: @expr_pattern, + int sub_expr: @expr_or_none ref +); + +is_patterns( //dir=pattern + unique int id: @is_pattern +); + +#keyset[id] +is_pattern_cast_type_reprs( //dir=pattern + int id: @is_pattern ref, + int cast_type_repr: @type_repr_or_none ref +); + +#keyset[id] +is_pattern_sub_patterns( //dir=pattern + int id: @is_pattern ref, + int sub_pattern: @pattern_or_none ref +); + +named_patterns( //dir=pattern + unique int id: @named_pattern, + int var_decl: @var_decl_or_none ref +); + +optional_some_patterns( //dir=pattern + unique int id: @optional_some_pattern, + int sub_pattern: @pattern_or_none ref +); + +paren_patterns( //dir=pattern + unique int id: @paren_pattern, + int sub_pattern: @pattern_or_none ref +); + +tuple_patterns( //dir=pattern + unique int id: @tuple_pattern +); + +#keyset[id, index] +tuple_pattern_elements( //dir=pattern + int id: @tuple_pattern ref, + int index: int ref, + int element: @pattern_or_none ref +); + +typed_patterns( //dir=pattern + unique int id: @typed_pattern, + int sub_pattern: @pattern_or_none ref +); + +#keyset[id] +typed_pattern_type_reprs( //dir=pattern + int id: @typed_pattern ref, + int type_repr: @type_repr_or_none ref +); + +case_label_items( //dir=stmt + unique int id: @case_label_item, + int pattern: @pattern_or_none ref +); + +#keyset[id] +case_label_item_guards( //dir=stmt + int id: @case_label_item ref, + int guard: @expr_or_none ref +); + +condition_elements( //dir=stmt + unique int id: @condition_element +); + +#keyset[id] +condition_element_booleans( //dir=stmt + int id: @condition_element ref, + int boolean_: @expr_or_none ref +); + +#keyset[id] +condition_element_patterns( //dir=stmt + int id: @condition_element ref, + int pattern: @pattern_or_none ref +); + +#keyset[id] +condition_element_initializers( //dir=stmt + int id: @condition_element ref, + int initializer: @expr_or_none ref +); + +#keyset[id] +condition_element_availabilities( //dir=stmt + int id: @condition_element ref, + int availability: @availability_info_or_none ref +); + +@stmt = + @brace_stmt +| @break_stmt +| @case_stmt +| @continue_stmt +| @defer_stmt +| @discard_stmt +| @fail_stmt +| @fallthrough_stmt +| @labeled_stmt +| @pound_assert_stmt +| @return_stmt +| @then_stmt +| @throw_stmt +| @yield_stmt +; + +stmt_conditions( //dir=stmt + unique int id: @stmt_condition +); + +#keyset[id, index] +stmt_condition_elements( //dir=stmt + int id: @stmt_condition ref, + int index: int ref, + int element: @condition_element_or_none ref +); + +brace_stmts( //dir=stmt + unique int id: @brace_stmt +); + +#keyset[id, index] +brace_stmt_elements( //dir=stmt + int id: @brace_stmt ref, + int index: int ref, + int element: @ast_node_or_none ref +); + +break_stmts( //dir=stmt + unique int id: @break_stmt +); + +#keyset[id] +break_stmt_target_names( //dir=stmt + int id: @break_stmt ref, + string target_name: string ref +); + +#keyset[id] +break_stmt_targets( //dir=stmt + int id: @break_stmt ref, + int target: @stmt_or_none ref +); + +case_stmts( //dir=stmt + unique int id: @case_stmt, + int body: @stmt_or_none ref +); + +#keyset[id, index] +case_stmt_labels( //dir=stmt + int id: @case_stmt ref, + int index: int ref, + int label: @case_label_item_or_none ref +); + +#keyset[id, index] +case_stmt_variables( //dir=stmt + int id: @case_stmt ref, + int index: int ref, + int variable: @var_decl_or_none ref +); + +continue_stmts( //dir=stmt + unique int id: @continue_stmt +); + +#keyset[id] +continue_stmt_target_names( //dir=stmt + int id: @continue_stmt ref, + string target_name: string ref +); + +#keyset[id] +continue_stmt_targets( //dir=stmt + int id: @continue_stmt ref, + int target: @stmt_or_none ref +); + +defer_stmts( //dir=stmt + unique int id: @defer_stmt, + int body: @brace_stmt_or_none ref +); + +discard_stmts( //dir=stmt + unique int id: @discard_stmt, + int sub_expr: @expr_or_none ref +); + +fail_stmts( //dir=stmt + unique int id: @fail_stmt +); + +fallthrough_stmts( //dir=stmt + unique int id: @fallthrough_stmt, + int fallthrough_source: @case_stmt_or_none ref, + int fallthrough_dest: @case_stmt_or_none ref +); + +@labeled_stmt = + @do_catch_stmt +| @do_stmt +| @for_each_stmt +| @labeled_conditional_stmt +| @repeat_while_stmt +| @switch_stmt +; + +#keyset[id] +labeled_stmt_labels( //dir=stmt + int id: @labeled_stmt ref, + string label: string ref +); + +pound_assert_stmts( //dir=stmt + unique int id: @pound_assert_stmt, + int condition: @expr_or_none ref, + string message: string ref +); + +return_stmts( //dir=stmt + unique int id: @return_stmt +); + +#keyset[id] +return_stmt_results( //dir=stmt + int id: @return_stmt ref, + int result: @expr_or_none ref +); + +then_stmts( //dir=stmt + unique int id: @then_stmt, + int result: @expr_or_none ref +); + +throw_stmts( //dir=stmt + unique int id: @throw_stmt, + int sub_expr: @expr_or_none ref +); + +yield_stmts( //dir=stmt + unique int id: @yield_stmt +); + +#keyset[id, index] +yield_stmt_results( //dir=stmt + int id: @yield_stmt ref, + int index: int ref, + int result: @expr_or_none ref +); + +do_catch_stmts( //dir=stmt + unique int id: @do_catch_stmt, + int body: @stmt_or_none ref +); + +#keyset[id, index] +do_catch_stmt_catches( //dir=stmt + int id: @do_catch_stmt ref, + int index: int ref, + int catch: @case_stmt_or_none ref +); + +do_stmts( //dir=stmt + unique int id: @do_stmt, + int body: @brace_stmt_or_none ref +); + +for_each_stmts( //dir=stmt + unique int id: @for_each_stmt, + int pattern: @pattern_or_none ref, + int body: @brace_stmt_or_none ref +); + +#keyset[id] +for_each_stmt_wheres( //dir=stmt + int id: @for_each_stmt ref, + int where: @expr_or_none ref +); + +#keyset[id] +for_each_stmt_iterator_vars( //dir=stmt + int id: @for_each_stmt ref, + int iteratorVar: @pattern_binding_decl_or_none ref +); + +#keyset[id] +for_each_stmt_next_calls( //dir=stmt + int id: @for_each_stmt ref, + int nextCall: @expr_or_none ref +); + +@labeled_conditional_stmt = + @guard_stmt +| @if_stmt +| @while_stmt +; + +#keyset[id] +labeled_conditional_stmts( //dir=stmt + int id: @labeled_conditional_stmt ref, + int condition: @stmt_condition_or_none ref +); + +repeat_while_stmts( //dir=stmt + unique int id: @repeat_while_stmt, + int condition: @expr_or_none ref, + int body: @stmt_or_none ref +); + +switch_stmts( //dir=stmt + unique int id: @switch_stmt, + int expr: @expr_or_none ref +); + +#keyset[id, index] +switch_stmt_cases( //dir=stmt + int id: @switch_stmt ref, + int index: int ref, + int case_: @case_stmt_or_none ref +); + +guard_stmts( //dir=stmt + unique int id: @guard_stmt, + int body: @brace_stmt_or_none ref +); + +if_stmts( //dir=stmt + unique int id: @if_stmt, + int then: @stmt_or_none ref +); + +#keyset[id] +if_stmt_elses( //dir=stmt + int id: @if_stmt ref, + int else: @stmt_or_none ref +); + +while_stmts( //dir=stmt + unique int id: @while_stmt, + int body: @stmt_or_none ref +); + +@type = + @any_function_type +| @any_generic_type +| @any_metatype_type +| @builtin_type +| @dependent_member_type +| @dynamic_self_type +| @error_type +| @existential_type +| @in_out_type +| @l_value_type +| @module_type +| @pack_element_type +| @pack_expansion_type +| @pack_type +| @parameterized_protocol_type +| @protocol_composition_type +| @reference_storage_type +| @substitutable_type +| @sugar_type +| @tuple_type +| @unresolved_type +; + +#keyset[id] +types( //dir=type + int id: @type ref, + string name: string ref, + int canonical_type: @type_or_none ref +); + +type_reprs( //dir=type + unique int id: @type_repr, + int type_: @type_or_none ref +); + +@any_function_type = + @function_type +| @generic_function_type +; + +#keyset[id] +any_function_types( //dir=type + int id: @any_function_type ref, + int result: @type_or_none ref +); + +#keyset[id, index] +any_function_type_param_types( //dir=type + int id: @any_function_type ref, + int index: int ref, + int param_type: @type_or_none ref +); + +#keyset[id] +any_function_type_is_throwing( //dir=type + int id: @any_function_type ref +); + +#keyset[id] +any_function_type_is_async( //dir=type + int id: @any_function_type ref +); + +@any_generic_type = + @nominal_or_bound_generic_nominal_type +| @unbound_generic_type +; + +#keyset[id] +any_generic_types( //dir=type + int id: @any_generic_type ref, + int declaration: @generic_type_decl_or_none ref +); + +#keyset[id] +any_generic_type_parents( //dir=type + int id: @any_generic_type ref, + int parent: @type_or_none ref +); + +@any_metatype_type = + @existential_metatype_type +| @metatype_type +; + +@builtin_type = + @any_builtin_integer_type +| @builtin_bridge_object_type +| @builtin_default_actor_storage_type +| @builtin_executor_type +| @builtin_float_type +| @builtin_job_type +| @builtin_native_object_type +| @builtin_raw_pointer_type +| @builtin_raw_unsafe_continuation_type +| @builtin_unsafe_value_buffer_type +| @builtin_vector_type +; + +dependent_member_types( //dir=type + unique int id: @dependent_member_type, + int base_type: @type_or_none ref, + int associated_type_decl: @associated_type_decl_or_none ref +); + +dynamic_self_types( //dir=type + unique int id: @dynamic_self_type, + int static_self_type: @type_or_none ref +); + +error_types( //dir=type + unique int id: @error_type +); + +existential_types( //dir=type + unique int id: @existential_type, + int constraint: @type_or_none ref +); + +in_out_types( //dir=type + unique int id: @in_out_type, + int object_type: @type_or_none ref +); + +l_value_types( //dir=type + unique int id: @l_value_type, + int object_type: @type_or_none ref +); + +module_types( //dir=type + unique int id: @module_type, + int module: @module_decl_or_none ref +); + +pack_element_types( //dir=type + unique int id: @pack_element_type, + int pack_type: @type_or_none ref +); + +pack_expansion_types( //dir=type + unique int id: @pack_expansion_type, + int pattern_type: @type_or_none ref, + int count_type: @type_or_none ref +); + +pack_types( //dir=type + unique int id: @pack_type +); + +#keyset[id, index] +pack_type_elements( //dir=type + int id: @pack_type ref, + int index: int ref, + int element: @type_or_none ref +); + +parameterized_protocol_types( //dir=type + unique int id: @parameterized_protocol_type, + int base: @protocol_type_or_none ref +); + +#keyset[id, index] +parameterized_protocol_type_args( //dir=type + int id: @parameterized_protocol_type ref, + int index: int ref, + int arg: @type_or_none ref +); + +protocol_composition_types( //dir=type + unique int id: @protocol_composition_type +); + +#keyset[id, index] +protocol_composition_type_members( //dir=type + int id: @protocol_composition_type ref, + int index: int ref, + int member: @type_or_none ref +); + +@reference_storage_type = + @unmanaged_storage_type +| @unowned_storage_type +| @weak_storage_type +; + +#keyset[id] +reference_storage_types( //dir=type + int id: @reference_storage_type ref, + int referent_type: @type_or_none ref +); + +@substitutable_type = + @archetype_type +| @generic_type_param_type +; + +@sugar_type = + @paren_type +| @syntax_sugar_type +| @type_alias_type +; + +tuple_types( //dir=type + unique int id: @tuple_type +); + +#keyset[id, index] +tuple_type_types( //dir=type + int id: @tuple_type ref, + int index: int ref, + int type_: @type_or_none ref +); + +#keyset[id, index] +tuple_type_names( //dir=type + int id: @tuple_type ref, + int index: int ref, + string name: string ref +); + +unresolved_types( //dir=type + unique int id: @unresolved_type +); + +@any_builtin_integer_type = + @builtin_integer_literal_type +| @builtin_integer_type +; + +@archetype_type = + @local_archetype_type +| @opaque_type_archetype_type +| @pack_archetype_type +| @primary_archetype_type +; + +#keyset[id] +archetype_types( //dir=type + int id: @archetype_type ref, + int interface_type: @type_or_none ref +); + +#keyset[id] +archetype_type_superclasses( //dir=type + int id: @archetype_type ref, + int superclass: @type_or_none ref +); + +#keyset[id, index] +archetype_type_protocols( //dir=type + int id: @archetype_type ref, + int index: int ref, + int protocol: @protocol_decl_or_none ref +); + +builtin_bridge_object_types( //dir=type + unique int id: @builtin_bridge_object_type +); + +builtin_default_actor_storage_types( //dir=type + unique int id: @builtin_default_actor_storage_type +); + +builtin_executor_types( //dir=type + unique int id: @builtin_executor_type +); + +builtin_float_types( //dir=type + unique int id: @builtin_float_type +); + +builtin_job_types( //dir=type + unique int id: @builtin_job_type +); + +builtin_native_object_types( //dir=type + unique int id: @builtin_native_object_type +); + +builtin_raw_pointer_types( //dir=type + unique int id: @builtin_raw_pointer_type +); + +builtin_raw_unsafe_continuation_types( //dir=type + unique int id: @builtin_raw_unsafe_continuation_type +); + +builtin_unsafe_value_buffer_types( //dir=type + unique int id: @builtin_unsafe_value_buffer_type +); + +builtin_vector_types( //dir=type + unique int id: @builtin_vector_type +); + +existential_metatype_types( //dir=type + unique int id: @existential_metatype_type +); + +function_types( //dir=type + unique int id: @function_type +); + +generic_function_types( //dir=type + unique int id: @generic_function_type +); + +#keyset[id, index] +generic_function_type_generic_params( //dir=type + int id: @generic_function_type ref, + int index: int ref, + int generic_param: @generic_type_param_type_or_none ref +); + +generic_type_param_types( //dir=type + unique int id: @generic_type_param_type +); + +metatype_types( //dir=type + unique int id: @metatype_type +); + +@nominal_or_bound_generic_nominal_type = + @bound_generic_type +| @nominal_type +; + +paren_types( //dir=type + unique int id: @paren_type, + int type_: @type_or_none ref +); + +@syntax_sugar_type = + @dictionary_type +| @unary_syntax_sugar_type +; + +type_alias_types( //dir=type + unique int id: @type_alias_type, + int decl: @type_alias_decl_or_none ref +); + +unbound_generic_types( //dir=type + unique int id: @unbound_generic_type +); + +unmanaged_storage_types( //dir=type + unique int id: @unmanaged_storage_type +); + +unowned_storage_types( //dir=type + unique int id: @unowned_storage_type +); + +weak_storage_types( //dir=type + unique int id: @weak_storage_type +); + +@bound_generic_type = + @bound_generic_class_type +| @bound_generic_enum_type +| @bound_generic_struct_type +; + +#keyset[id, index] +bound_generic_type_arg_types( //dir=type + int id: @bound_generic_type ref, + int index: int ref, + int arg_type: @type_or_none ref +); + +builtin_integer_literal_types( //dir=type + unique int id: @builtin_integer_literal_type +); + +builtin_integer_types( //dir=type + unique int id: @builtin_integer_type +); + +#keyset[id] +builtin_integer_type_widths( //dir=type + int id: @builtin_integer_type ref, + int width: int ref +); + +dictionary_types( //dir=type + unique int id: @dictionary_type, + int key_type: @type_or_none ref, + int value_type: @type_or_none ref +); + +@local_archetype_type = + @element_archetype_type +| @opened_archetype_type +; + +@nominal_type = + @class_type +| @enum_type +| @protocol_type +| @struct_type +; + +opaque_type_archetype_types( //dir=type + unique int id: @opaque_type_archetype_type, + int declaration: @opaque_type_decl_or_none ref +); + +pack_archetype_types( //dir=type + unique int id: @pack_archetype_type +); + +primary_archetype_types( //dir=type + unique int id: @primary_archetype_type +); + +@unary_syntax_sugar_type = + @array_slice_type +| @optional_type +| @variadic_sequence_type +; + +#keyset[id] +unary_syntax_sugar_types( //dir=type + int id: @unary_syntax_sugar_type ref, + int base_type: @type_or_none ref +); + +array_slice_types( //dir=type + unique int id: @array_slice_type +); + +bound_generic_class_types( //dir=type + unique int id: @bound_generic_class_type +); + +bound_generic_enum_types( //dir=type + unique int id: @bound_generic_enum_type +); + +bound_generic_struct_types( //dir=type + unique int id: @bound_generic_struct_type +); + +class_types( //dir=type + unique int id: @class_type +); + +element_archetype_types( //dir=type + unique int id: @element_archetype_type +); + +enum_types( //dir=type + unique int id: @enum_type +); + +opened_archetype_types( //dir=type + unique int id: @opened_archetype_type +); + +optional_types( //dir=type + unique int id: @optional_type +); + +protocol_types( //dir=type + unique int id: @protocol_type +); + +struct_types( //dir=type + unique int id: @struct_type +); + +variadic_sequence_types( //dir=type + unique int id: @variadic_sequence_type +); + +@accessor_or_none = + @accessor +| @unspecified_element +; + +@argument_or_none = + @argument +| @unspecified_element +; + +@associated_type_decl_or_none = + @associated_type_decl +| @unspecified_element +; + +@ast_node_or_none = + @ast_node +| @unspecified_element +; + +@availability_info_or_none = + @availability_info +| @unspecified_element +; + +@availability_spec_or_none = + @availability_spec +| @unspecified_element +; + +@brace_stmt_or_none = + @brace_stmt +| @unspecified_element +; + +@captured_decl_or_none = + @captured_decl +| @unspecified_element +; + +@case_label_item_or_none = + @case_label_item +| @unspecified_element +; + +@case_stmt_or_none = + @case_stmt +| @unspecified_element +; + +@closure_expr_or_none = + @closure_expr +| @unspecified_element +; + +@condition_element_or_none = + @condition_element +| @unspecified_element +; + +@decl_or_none = + @decl +| @unspecified_element +; + +@enum_element_decl_or_none = + @enum_element_decl +| @unspecified_element +; + +@expr_or_none = + @expr +| @unspecified_element +; + +@file_or_none = + @file +| @unspecified_element +; + +@function_or_none = + @function +| @unspecified_element +; + +@generic_type_decl_or_none = + @generic_type_decl +| @unspecified_element +; + +@generic_type_param_decl_or_none = + @generic_type_param_decl +| @unspecified_element +; + +@generic_type_param_type_or_none = + @generic_type_param_type +| @unspecified_element +; + +@initializer_or_none = + @initializer +| @unspecified_element +; + +@key_path_component_or_none = + @key_path_component +| @unspecified_element +; + +@location_or_none = + @location +| @unspecified_element +; + +@macro_role_or_none = + @macro_role +| @unspecified_element +; + +@module_decl_or_none = + @module_decl +| @unspecified_element +; + +@nominal_type_decl_or_none = + @nominal_type_decl +| @unspecified_element +; + +@opaque_type_decl_or_none = + @opaque_type_decl +| @unspecified_element +; + +@opaque_value_expr_or_none = + @opaque_value_expr +| @unspecified_element +; + +@param_decl_or_none = + @param_decl +| @unspecified_element +; + +@pattern_or_none = + @pattern +| @unspecified_element +; + +@pattern_binding_decl_or_none = + @pattern_binding_decl +| @unspecified_element +; + +@precedence_group_decl_or_none = + @precedence_group_decl +| @unspecified_element +; + +@protocol_decl_or_none = + @protocol_decl +| @unspecified_element +; + +@protocol_type_or_none = + @protocol_type +| @unspecified_element +; + +@stmt_or_none = + @stmt +| @unspecified_element +; + +@stmt_condition_or_none = + @stmt_condition +| @unspecified_element +; + +@string_literal_expr_or_none = + @string_literal_expr +| @unspecified_element +; + +@tap_expr_or_none = + @tap_expr +| @unspecified_element +; + +@type_or_none = + @type +| @unspecified_element +; + +@type_alias_decl_or_none = + @type_alias_decl +| @unspecified_element +; + +@type_expr_or_none = + @type_expr +| @unspecified_element +; + +@type_repr_or_none = + @type_repr +| @unspecified_element +; + +@value_decl_or_none = + @unspecified_element +| @value_decl +; + +@var_decl_or_none = + @unspecified_element +| @var_decl +; diff --git a/swift/ql/lib/upgrades/44c4818a8987b5e1b3cd11e553e41045e1262451/swift.dbscheme b/swift/ql/lib/upgrades/44c4818a8987b5e1b3cd11e553e41045e1262451/swift.dbscheme new file mode 100644 index 000000000000..33db81ad4b60 --- /dev/null +++ b/swift/ql/lib/upgrades/44c4818a8987b5e1b3cd11e553e41045e1262451/swift.dbscheme @@ -0,0 +1,2793 @@ +// generated by codegen/codegen.py, do not edit + +// from prefix.dbscheme +/** + * The source location of the snapshot. + */ +sourceLocationPrefix( + string prefix: string ref +); + + +// from schema.py + +@element = + @file +| @generic_context +| @locatable +| @location +| @type +; + +#keyset[id] +element_is_unknown( + int id: @element ref +); + +@file = + @db_file +; + +#keyset[id] +files( + int id: @file ref, + string name: string ref +); + +#keyset[id] +file_is_successfully_extracted( + int id: @file ref +); + +@locatable = + @argument +| @ast_node +| @comment +| @diagnostics +| @error_element +; + +#keyset[id] +locatable_locations( + int id: @locatable ref, + int location: @location_or_none ref +); + +@location = + @db_location +; + +#keyset[id] +locations( + int id: @location ref, + int file: @file_or_none ref, + int start_line: int ref, + int start_column: int ref, + int end_line: int ref, + int end_column: int ref +); + +@ast_node = + @availability_info +| @availability_spec +| @callable +| @case_label_item +| @condition_element +| @decl +| @expr +| @key_path_component +| @macro_role +| @pattern +| @stmt +| @stmt_condition +| @type_repr +; + +comments( + unique int id: @comment, + string text: string ref +); + +db_files( + unique int id: @db_file +); + +db_locations( + unique int id: @db_location +); + +diagnostics( + unique int id: @diagnostics, + string text: string ref, + int kind: int ref +); + +@error_element = + @error_expr +| @error_type +| @overloaded_decl_ref_expr +| @unresolved_decl_ref_expr +| @unresolved_dot_expr +| @unresolved_member_chain_result_expr +| @unresolved_member_expr +| @unresolved_pattern_expr +| @unresolved_specialize_expr +| @unresolved_type +| @unresolved_type_conversion_expr +| @unspecified_element +; + +availability_infos( + unique int id: @availability_info +); + +#keyset[id] +availability_info_is_unavailable( + int id: @availability_info ref +); + +#keyset[id, index] +availability_info_specs( + int id: @availability_info ref, + int index: int ref, + int spec: @availability_spec_or_none ref +); + +@availability_spec = + @other_availability_spec +| @platform_version_availability_spec +; + +@callable = + @closure_expr +| @function +; + +#keyset[id] +callable_names( + int id: @callable ref, + string name: string ref +); + +#keyset[id] +callable_self_params( + int id: @callable ref, + int self_param: @param_decl_or_none ref +); + +#keyset[id, index] +callable_params( + int id: @callable ref, + int index: int ref, + int param: @param_decl_or_none ref +); + +#keyset[id] +callable_bodies( + int id: @callable ref, + int body: @brace_stmt_or_none ref +); + +#keyset[id, index] +callable_captures( + int id: @callable ref, + int index: int ref, + int capture: @captured_decl_or_none ref +); + +key_path_components( + unique int id: @key_path_component, + int kind: int ref, + int component_type: @type_or_none ref +); + +#keyset[id, index] +key_path_component_subscript_arguments( + int id: @key_path_component ref, + int index: int ref, + int subscript_argument: @argument_or_none ref +); + +#keyset[id] +key_path_component_tuple_indices( + int id: @key_path_component ref, + int tuple_index: int ref +); + +#keyset[id] +key_path_component_decl_refs( + int id: @key_path_component ref, + int decl_ref: @value_decl_or_none ref +); + +macro_roles( + unique int id: @macro_role, + int kind: int ref, + int macro_syntax: int ref +); + +#keyset[id, index] +macro_role_conformances( + int id: @macro_role ref, + int index: int ref, + int conformance: @type_expr_or_none ref +); + +#keyset[id, index] +macro_role_names( + int id: @macro_role ref, + int index: int ref, + string name: string ref +); + +unspecified_elements( + unique int id: @unspecified_element, + string property: string ref, + string error: string ref +); + +#keyset[id] +unspecified_element_parents( + int id: @unspecified_element ref, + int parent: @element ref +); + +#keyset[id] +unspecified_element_indices( + int id: @unspecified_element ref, + int index: int ref +); + +#keyset[id, index] +unspecified_element_children( + int id: @unspecified_element ref, + int index: int ref, + int child: @ast_node_or_none ref +); + +other_availability_specs( + unique int id: @other_availability_spec +); + +platform_version_availability_specs( + unique int id: @platform_version_availability_spec, + string platform: string ref, + string version: string ref +); + +@decl = + @captured_decl +| @enum_case_decl +| @extension_decl +| @if_config_decl +| @import_decl +| @missing_member_decl +| @operator_decl +| @pattern_binding_decl +| @pound_diagnostic_decl +| @precedence_group_decl +| @top_level_code_decl +| @value_decl +; + +#keyset[id] +decls( //dir=decl + int id: @decl ref, + int module: @module_decl_or_none ref +); + +#keyset[id, index] +decl_members( //dir=decl + int id: @decl ref, + int index: int ref, + int member: @decl_or_none ref +); + +@generic_context = + @extension_decl +| @function +| @generic_type_decl +| @macro_decl +| @subscript_decl +; + +#keyset[id, index] +generic_context_generic_type_params( //dir=decl + int id: @generic_context ref, + int index: int ref, + int generic_type_param: @generic_type_param_decl_or_none ref +); + +captured_decls( //dir=decl + unique int id: @captured_decl, + int decl: @value_decl_or_none ref +); + +#keyset[id] +captured_decl_is_direct( //dir=decl + int id: @captured_decl ref +); + +#keyset[id] +captured_decl_is_escaping( //dir=decl + int id: @captured_decl ref +); + +enum_case_decls( //dir=decl + unique int id: @enum_case_decl +); + +#keyset[id, index] +enum_case_decl_elements( //dir=decl + int id: @enum_case_decl ref, + int index: int ref, + int element: @enum_element_decl_or_none ref +); + +extension_decls( //dir=decl + unique int id: @extension_decl, + int extended_type_decl: @nominal_type_decl_or_none ref +); + +#keyset[id, index] +extension_decl_protocols( //dir=decl + int id: @extension_decl ref, + int index: int ref, + int protocol: @protocol_decl_or_none ref +); + +if_config_decls( //dir=decl + unique int id: @if_config_decl +); + +#keyset[id, index] +if_config_decl_active_elements( //dir=decl + int id: @if_config_decl ref, + int index: int ref, + int active_element: @ast_node_or_none ref +); + +import_decls( //dir=decl + unique int id: @import_decl +); + +#keyset[id] +import_decl_is_exported( //dir=decl + int id: @import_decl ref +); + +#keyset[id] +import_decl_imported_modules( //dir=decl + int id: @import_decl ref, + int imported_module: @module_decl_or_none ref +); + +#keyset[id, index] +import_decl_declarations( //dir=decl + int id: @import_decl ref, + int index: int ref, + int declaration: @value_decl_or_none ref +); + +missing_member_decls( //dir=decl + unique int id: @missing_member_decl, + string name: string ref +); + +@operator_decl = + @infix_operator_decl +| @postfix_operator_decl +| @prefix_operator_decl +; + +#keyset[id] +operator_decls( //dir=decl + int id: @operator_decl ref, + string name: string ref +); + +pattern_binding_decls( //dir=decl + unique int id: @pattern_binding_decl +); + +#keyset[id, index] +pattern_binding_decl_inits( //dir=decl + int id: @pattern_binding_decl ref, + int index: int ref, + int init: @expr_or_none ref +); + +#keyset[id, index] +pattern_binding_decl_patterns( //dir=decl + int id: @pattern_binding_decl ref, + int index: int ref, + int pattern: @pattern_or_none ref +); + +pound_diagnostic_decls( //dir=decl + unique int id: @pound_diagnostic_decl, + int kind: int ref, + int message: @string_literal_expr_or_none ref +); + +precedence_group_decls( //dir=decl + unique int id: @precedence_group_decl +); + +top_level_code_decls( //dir=decl + unique int id: @top_level_code_decl, + int body: @brace_stmt_or_none ref +); + +@value_decl = + @abstract_storage_decl +| @enum_element_decl +| @function +| @macro_decl +| @type_decl +; + +#keyset[id] +value_decls( //dir=decl + int id: @value_decl ref, + int interface_type: @type_or_none ref +); + +@abstract_storage_decl = + @subscript_decl +| @var_decl +; + +#keyset[id, index] +abstract_storage_decl_accessors( //dir=decl + int id: @abstract_storage_decl ref, + int index: int ref, + int accessor: @accessor_or_none ref +); + +enum_element_decls( //dir=decl + unique int id: @enum_element_decl, + string name: string ref +); + +#keyset[id, index] +enum_element_decl_params( //dir=decl + int id: @enum_element_decl ref, + int index: int ref, + int param: @param_decl_or_none ref +); + +@function = + @accessor_or_named_function +| @deinitializer +| @initializer +; + +infix_operator_decls( //dir=decl + unique int id: @infix_operator_decl +); + +#keyset[id] +infix_operator_decl_precedence_groups( //dir=decl + int id: @infix_operator_decl ref, + int precedence_group: @precedence_group_decl_or_none ref +); + +macro_decls( //dir=decl + unique int id: @macro_decl, + string name: string ref +); + +#keyset[id, index] +macro_decl_parameters( //dir=decl + int id: @macro_decl ref, + int index: int ref, + int parameter: @param_decl_or_none ref +); + +#keyset[id, index] +macro_decl_roles( //dir=decl + int id: @macro_decl ref, + int index: int ref, + int role: @macro_role_or_none ref +); + +postfix_operator_decls( //dir=decl + unique int id: @postfix_operator_decl +); + +prefix_operator_decls( //dir=decl + unique int id: @prefix_operator_decl +); + +@type_decl = + @abstract_type_param_decl +| @generic_type_decl +| @module_decl +; + +#keyset[id] +type_decls( //dir=decl + int id: @type_decl ref, + string name: string ref +); + +#keyset[id, index] +type_decl_inherited_types( //dir=decl + int id: @type_decl ref, + int index: int ref, + int inherited_type: @type_or_none ref +); + +@abstract_type_param_decl = + @associated_type_decl +| @generic_type_param_decl +; + +@accessor_or_named_function = + @accessor +| @named_function +; + +deinitializers( //dir=decl + unique int id: @deinitializer +); + +@generic_type_decl = + @nominal_type_decl +| @opaque_type_decl +| @type_alias_decl +; + +initializers( //dir=decl + unique int id: @initializer +); + +module_decls( //dir=decl + unique int id: @module_decl +); + +#keyset[id] +module_decl_is_builtin_module( //dir=decl + int id: @module_decl ref +); + +#keyset[id] +module_decl_is_system_module( //dir=decl + int id: @module_decl ref +); + +module_decl_imported_modules( //dir=decl + int id: @module_decl ref, + int imported_module: @module_decl_or_none ref +); + +module_decl_exported_modules( //dir=decl + int id: @module_decl ref, + int exported_module: @module_decl_or_none ref +); + +subscript_decls( //dir=decl + unique int id: @subscript_decl, + int element_type: @type_or_none ref +); + +#keyset[id, index] +subscript_decl_params( //dir=decl + int id: @subscript_decl ref, + int index: int ref, + int param: @param_decl_or_none ref +); + +@var_decl = + @concrete_var_decl +| @param_decl +; + +#keyset[id] +var_decls( //dir=decl + int id: @var_decl ref, + string name: string ref, + int type_: @type_or_none ref +); + +#keyset[id] +var_decl_attached_property_wrapper_types( //dir=decl + int id: @var_decl ref, + int attached_property_wrapper_type: @type_or_none ref +); + +#keyset[id] +var_decl_parent_patterns( //dir=decl + int id: @var_decl ref, + int parent_pattern: @pattern_or_none ref +); + +#keyset[id] +var_decl_parent_initializers( //dir=decl + int id: @var_decl ref, + int parent_initializer: @expr_or_none ref +); + +#keyset[id] +var_decl_property_wrapper_backing_var_bindings( //dir=decl + int id: @var_decl ref, + int property_wrapper_backing_var_binding: @pattern_binding_decl_or_none ref +); + +#keyset[id] +var_decl_property_wrapper_backing_vars( //dir=decl + int id: @var_decl ref, + int property_wrapper_backing_var: @var_decl_or_none ref +); + +#keyset[id] +var_decl_property_wrapper_projection_var_bindings( //dir=decl + int id: @var_decl ref, + int property_wrapper_projection_var_binding: @pattern_binding_decl_or_none ref +); + +#keyset[id] +var_decl_property_wrapper_projection_vars( //dir=decl + int id: @var_decl ref, + int property_wrapper_projection_var: @var_decl_or_none ref +); + +accessors( //dir=decl + unique int id: @accessor +); + +#keyset[id] +accessor_is_getter( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_setter( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_will_set( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_did_set( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_read( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_modify( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_unsafe_address( //dir=decl + int id: @accessor ref +); + +#keyset[id] +accessor_is_unsafe_mutable_address( //dir=decl + int id: @accessor ref +); + +associated_type_decls( //dir=decl + unique int id: @associated_type_decl +); + +concrete_var_decls( //dir=decl + unique int id: @concrete_var_decl, + int introducer_int: int ref +); + +generic_type_param_decls( //dir=decl + unique int id: @generic_type_param_decl +); + +named_functions( //dir=decl + unique int id: @named_function +); + +@nominal_type_decl = + @class_decl +| @enum_decl +| @protocol_decl +| @struct_decl +; + +#keyset[id] +nominal_type_decls( //dir=decl + int id: @nominal_type_decl ref, + int type_: @type_or_none ref +); + +opaque_type_decls( //dir=decl + unique int id: @opaque_type_decl, + int naming_declaration: @value_decl_or_none ref +); + +#keyset[id, index] +opaque_type_decl_opaque_generic_params( //dir=decl + int id: @opaque_type_decl ref, + int index: int ref, + int opaque_generic_param: @generic_type_param_type_or_none ref +); + +param_decls( //dir=decl + unique int id: @param_decl +); + +#keyset[id] +param_decl_is_inout( //dir=decl + int id: @param_decl ref +); + +#keyset[id] +param_decl_property_wrapper_local_wrapped_var_bindings( //dir=decl + int id: @param_decl ref, + int property_wrapper_local_wrapped_var_binding: @pattern_binding_decl_or_none ref +); + +#keyset[id] +param_decl_property_wrapper_local_wrapped_vars( //dir=decl + int id: @param_decl ref, + int property_wrapper_local_wrapped_var: @var_decl_or_none ref +); + +type_alias_decls( //dir=decl + unique int id: @type_alias_decl, + int aliased_type: @type_or_none ref +); + +class_decls( //dir=decl + unique int id: @class_decl +); + +enum_decls( //dir=decl + unique int id: @enum_decl +); + +protocol_decls( //dir=decl + unique int id: @protocol_decl +); + +struct_decls( //dir=decl + unique int id: @struct_decl +); + +arguments( //dir=expr + unique int id: @argument, + string label: string ref, + int expr: @expr_or_none ref +); + +@expr = + @any_try_expr +| @applied_property_wrapper_expr +| @apply_expr +| @assign_expr +| @bind_optional_expr +| @capture_list_expr +| @closure_expr +| @collection_expr +| @consume_expr +| @copy_expr +| @decl_ref_expr +| @default_argument_expr +| @discard_assignment_expr +| @dot_syntax_base_ignored_expr +| @dynamic_type_expr +| @enum_is_case_expr +| @error_expr +| @explicit_cast_expr +| @force_value_expr +| @identity_expr +| @if_expr +| @implicit_conversion_expr +| @in_out_expr +| @key_path_application_expr +| @key_path_dot_expr +| @key_path_expr +| @lazy_initialization_expr +| @literal_expr +| @lookup_expr +| @make_temporarily_escapable_expr +| @materialize_pack_expr +| @obj_c_selector_expr +| @one_way_expr +| @opaque_value_expr +| @open_existential_expr +| @optional_evaluation_expr +| @other_initializer_ref_expr +| @overloaded_decl_ref_expr +| @pack_element_expr +| @pack_expansion_expr +| @property_wrapper_value_placeholder_expr +| @rebind_self_in_initializer_expr +| @sequence_expr +| @single_value_stmt_expr +| @super_ref_expr +| @tap_expr +| @tuple_element_expr +| @tuple_expr +| @type_expr +| @unresolved_decl_ref_expr +| @unresolved_dot_expr +| @unresolved_member_expr +| @unresolved_pattern_expr +| @unresolved_specialize_expr +| @vararg_expansion_expr +; + +#keyset[id] +expr_types( //dir=expr + int id: @expr ref, + int type_: @type_or_none ref +); + +@any_try_expr = + @force_try_expr +| @optional_try_expr +| @try_expr +; + +#keyset[id] +any_try_exprs( //dir=expr + int id: @any_try_expr ref, + int sub_expr: @expr_or_none ref +); + +applied_property_wrapper_exprs( //dir=expr + unique int id: @applied_property_wrapper_expr, + int kind: int ref, + int value: @expr_or_none ref, + int param: @param_decl_or_none ref +); + +@apply_expr = + @binary_expr +| @call_expr +| @postfix_unary_expr +| @prefix_unary_expr +| @self_apply_expr +; + +#keyset[id] +apply_exprs( //dir=expr + int id: @apply_expr ref, + int function: @expr_or_none ref +); + +#keyset[id, index] +apply_expr_arguments( //dir=expr + int id: @apply_expr ref, + int index: int ref, + int argument: @argument_or_none ref +); + +assign_exprs( //dir=expr + unique int id: @assign_expr, + int dest: @expr_or_none ref, + int source: @expr_or_none ref +); + +bind_optional_exprs( //dir=expr + unique int id: @bind_optional_expr, + int sub_expr: @expr_or_none ref +); + +capture_list_exprs( //dir=expr + unique int id: @capture_list_expr, + int closure_body: @closure_expr_or_none ref +); + +#keyset[id, index] +capture_list_expr_binding_decls( //dir=expr + int id: @capture_list_expr ref, + int index: int ref, + int binding_decl: @pattern_binding_decl_or_none ref +); + +@closure_expr = + @auto_closure_expr +| @explicit_closure_expr +; + +@collection_expr = + @array_expr +| @dictionary_expr +; + +consume_exprs( //dir=expr + unique int id: @consume_expr, + int sub_expr: @expr_or_none ref +); + +copy_exprs( //dir=expr + unique int id: @copy_expr, + int sub_expr: @expr_or_none ref +); + +decl_ref_exprs( //dir=expr + unique int id: @decl_ref_expr, + int decl: @decl_or_none ref +); + +#keyset[id, index] +decl_ref_expr_replacement_types( //dir=expr + int id: @decl_ref_expr ref, + int index: int ref, + int replacement_type: @type_or_none ref +); + +#keyset[id] +decl_ref_expr_has_direct_to_storage_semantics( //dir=expr + int id: @decl_ref_expr ref +); + +#keyset[id] +decl_ref_expr_has_direct_to_implementation_semantics( //dir=expr + int id: @decl_ref_expr ref +); + +#keyset[id] +decl_ref_expr_has_ordinary_semantics( //dir=expr + int id: @decl_ref_expr ref +); + +#keyset[id] +decl_ref_expr_has_distributed_thunk_semantics( //dir=expr + int id: @decl_ref_expr ref +); + +default_argument_exprs( //dir=expr + unique int id: @default_argument_expr, + int param_decl: @param_decl_or_none ref, + int param_index: int ref +); + +#keyset[id] +default_argument_expr_caller_side_defaults( //dir=expr + int id: @default_argument_expr ref, + int caller_side_default: @expr_or_none ref +); + +discard_assignment_exprs( //dir=expr + unique int id: @discard_assignment_expr +); + +dot_syntax_base_ignored_exprs( //dir=expr + unique int id: @dot_syntax_base_ignored_expr, + int qualifier: @expr_or_none ref, + int sub_expr: @expr_or_none ref +); + +dynamic_type_exprs( //dir=expr + unique int id: @dynamic_type_expr, + int base: @expr_or_none ref +); + +enum_is_case_exprs( //dir=expr + unique int id: @enum_is_case_expr, + int sub_expr: @expr_or_none ref, + int element: @enum_element_decl_or_none ref +); + +error_exprs( //dir=expr + unique int id: @error_expr +); + +@explicit_cast_expr = + @checked_cast_expr +| @coerce_expr +; + +#keyset[id] +explicit_cast_exprs( //dir=expr + int id: @explicit_cast_expr ref, + int sub_expr: @expr_or_none ref +); + +force_value_exprs( //dir=expr + unique int id: @force_value_expr, + int sub_expr: @expr_or_none ref +); + +@identity_expr = + @await_expr +| @borrow_expr +| @dot_self_expr +| @paren_expr +| @unresolved_member_chain_result_expr +; + +#keyset[id] +identity_exprs( //dir=expr + int id: @identity_expr ref, + int sub_expr: @expr_or_none ref +); + +if_exprs( //dir=expr + unique int id: @if_expr, + int condition: @expr_or_none ref, + int then_expr: @expr_or_none ref, + int else_expr: @expr_or_none ref +); + +@implicit_conversion_expr = + @abi_safe_conversion_expr +| @any_hashable_erasure_expr +| @archetype_to_super_expr +| @array_to_pointer_expr +| @bridge_from_obj_c_expr +| @bridge_to_obj_c_expr +| @class_metatype_to_object_expr +| @collection_upcast_conversion_expr +| @conditional_bridge_from_obj_c_expr +| @covariant_function_conversion_expr +| @covariant_return_conversion_expr +| @derived_to_base_expr +| @destructure_tuple_expr +| @differentiable_function_expr +| @differentiable_function_extract_original_expr +| @erasure_expr +| @existential_metatype_to_object_expr +| @foreign_object_conversion_expr +| @function_conversion_expr +| @in_out_to_pointer_expr +| @inject_into_optional_expr +| @linear_function_expr +| @linear_function_extract_original_expr +| @linear_to_differentiable_function_expr +| @load_expr +| @metatype_conversion_expr +| @pointer_to_pointer_expr +| @protocol_metatype_to_object_expr +| @string_to_pointer_expr +| @underlying_to_opaque_expr +| @unevaluated_instance_expr +| @unresolved_type_conversion_expr +; + +#keyset[id] +implicit_conversion_exprs( //dir=expr + int id: @implicit_conversion_expr ref, + int sub_expr: @expr_or_none ref +); + +in_out_exprs( //dir=expr + unique int id: @in_out_expr, + int sub_expr: @expr_or_none ref +); + +key_path_application_exprs( //dir=expr + unique int id: @key_path_application_expr, + int base: @expr_or_none ref, + int key_path: @expr_or_none ref +); + +key_path_dot_exprs( //dir=expr + unique int id: @key_path_dot_expr +); + +key_path_exprs( //dir=expr + unique int id: @key_path_expr +); + +#keyset[id] +key_path_expr_roots( //dir=expr + int id: @key_path_expr ref, + int root: @type_repr_or_none ref +); + +#keyset[id, index] +key_path_expr_components( //dir=expr + int id: @key_path_expr ref, + int index: int ref, + int component: @key_path_component_or_none ref +); + +lazy_initialization_exprs( //dir=expr + unique int id: @lazy_initialization_expr, + int sub_expr: @expr_or_none ref +); + +@literal_expr = + @builtin_literal_expr +| @interpolated_string_literal_expr +| @nil_literal_expr +| @object_literal_expr +| @regex_literal_expr +; + +@lookup_expr = + @dynamic_lookup_expr +| @member_ref_expr +| @subscript_expr +; + +#keyset[id] +lookup_exprs( //dir=expr + int id: @lookup_expr ref, + int base: @expr_or_none ref +); + +#keyset[id] +lookup_expr_members( //dir=expr + int id: @lookup_expr ref, + int member: @decl_or_none ref +); + +make_temporarily_escapable_exprs( //dir=expr + unique int id: @make_temporarily_escapable_expr, + int escaping_closure: @opaque_value_expr_or_none ref, + int nonescaping_closure: @expr_or_none ref, + int sub_expr: @expr_or_none ref +); + +materialize_pack_exprs( //dir=expr + unique int id: @materialize_pack_expr, + int sub_expr: @expr_or_none ref +); + +obj_c_selector_exprs( //dir=expr + unique int id: @obj_c_selector_expr, + int sub_expr: @expr_or_none ref, + int method: @function_or_none ref +); + +one_way_exprs( //dir=expr + unique int id: @one_way_expr, + int sub_expr: @expr_or_none ref +); + +opaque_value_exprs( //dir=expr + unique int id: @opaque_value_expr +); + +open_existential_exprs( //dir=expr + unique int id: @open_existential_expr, + int sub_expr: @expr_or_none ref, + int existential: @expr_or_none ref, + int opaque_expr: @opaque_value_expr_or_none ref +); + +optional_evaluation_exprs( //dir=expr + unique int id: @optional_evaluation_expr, + int sub_expr: @expr_or_none ref +); + +other_initializer_ref_exprs( //dir=expr + unique int id: @other_initializer_ref_expr, + int initializer: @initializer_or_none ref +); + +overloaded_decl_ref_exprs( //dir=expr + unique int id: @overloaded_decl_ref_expr +); + +#keyset[id, index] +overloaded_decl_ref_expr_possible_declarations( //dir=expr + int id: @overloaded_decl_ref_expr ref, + int index: int ref, + int possible_declaration: @value_decl_or_none ref +); + +pack_element_exprs( //dir=expr + unique int id: @pack_element_expr, + int sub_expr: @expr_or_none ref +); + +pack_expansion_exprs( //dir=expr + unique int id: @pack_expansion_expr, + int pattern_expr: @expr_or_none ref +); + +property_wrapper_value_placeholder_exprs( //dir=expr + unique int id: @property_wrapper_value_placeholder_expr, + int placeholder: @opaque_value_expr_or_none ref +); + +#keyset[id] +property_wrapper_value_placeholder_expr_wrapped_values( //dir=expr + int id: @property_wrapper_value_placeholder_expr ref, + int wrapped_value: @expr_or_none ref +); + +rebind_self_in_initializer_exprs( //dir=expr + unique int id: @rebind_self_in_initializer_expr, + int sub_expr: @expr_or_none ref, + int self: @var_decl_or_none ref +); + +sequence_exprs( //dir=expr + unique int id: @sequence_expr +); + +#keyset[id, index] +sequence_expr_elements( //dir=expr + int id: @sequence_expr ref, + int index: int ref, + int element: @expr_or_none ref +); + +single_value_stmt_exprs( //dir=expr + unique int id: @single_value_stmt_expr, + int stmt: @stmt_or_none ref +); + +super_ref_exprs( //dir=expr + unique int id: @super_ref_expr, + int self: @var_decl_or_none ref +); + +tap_exprs( //dir=expr + unique int id: @tap_expr, + int body: @brace_stmt_or_none ref, + int var: @var_decl_or_none ref +); + +#keyset[id] +tap_expr_sub_exprs( //dir=expr + int id: @tap_expr ref, + int sub_expr: @expr_or_none ref +); + +tuple_element_exprs( //dir=expr + unique int id: @tuple_element_expr, + int sub_expr: @expr_or_none ref, + int index: int ref +); + +tuple_exprs( //dir=expr + unique int id: @tuple_expr +); + +#keyset[id, index] +tuple_expr_elements( //dir=expr + int id: @tuple_expr ref, + int index: int ref, + int element: @expr_or_none ref +); + +type_exprs( //dir=expr + unique int id: @type_expr +); + +#keyset[id] +type_expr_type_reprs( //dir=expr + int id: @type_expr ref, + int type_repr: @type_repr_or_none ref +); + +unresolved_decl_ref_exprs( //dir=expr + unique int id: @unresolved_decl_ref_expr +); + +#keyset[id] +unresolved_decl_ref_expr_names( //dir=expr + int id: @unresolved_decl_ref_expr ref, + string name: string ref +); + +unresolved_dot_exprs( //dir=expr + unique int id: @unresolved_dot_expr, + int base: @expr_or_none ref, + string name: string ref +); + +unresolved_member_exprs( //dir=expr + unique int id: @unresolved_member_expr, + string name: string ref +); + +unresolved_pattern_exprs( //dir=expr + unique int id: @unresolved_pattern_expr, + int sub_pattern: @pattern_or_none ref +); + +unresolved_specialize_exprs( //dir=expr + unique int id: @unresolved_specialize_expr, + int sub_expr: @expr_or_none ref +); + +vararg_expansion_exprs( //dir=expr + unique int id: @vararg_expansion_expr, + int sub_expr: @expr_or_none ref +); + +abi_safe_conversion_exprs( //dir=expr + unique int id: @abi_safe_conversion_expr +); + +any_hashable_erasure_exprs( //dir=expr + unique int id: @any_hashable_erasure_expr +); + +archetype_to_super_exprs( //dir=expr + unique int id: @archetype_to_super_expr +); + +array_exprs( //dir=expr + unique int id: @array_expr +); + +#keyset[id, index] +array_expr_elements( //dir=expr + int id: @array_expr ref, + int index: int ref, + int element: @expr_or_none ref +); + +array_to_pointer_exprs( //dir=expr + unique int id: @array_to_pointer_expr +); + +auto_closure_exprs( //dir=expr + unique int id: @auto_closure_expr +); + +await_exprs( //dir=expr + unique int id: @await_expr +); + +binary_exprs( //dir=expr + unique int id: @binary_expr +); + +borrow_exprs( //dir=expr + unique int id: @borrow_expr +); + +bridge_from_obj_c_exprs( //dir=expr + unique int id: @bridge_from_obj_c_expr +); + +bridge_to_obj_c_exprs( //dir=expr + unique int id: @bridge_to_obj_c_expr +); + +@builtin_literal_expr = + @boolean_literal_expr +| @magic_identifier_literal_expr +| @number_literal_expr +| @string_literal_expr +; + +call_exprs( //dir=expr + unique int id: @call_expr +); + +@checked_cast_expr = + @conditional_checked_cast_expr +| @forced_checked_cast_expr +| @is_expr +; + +class_metatype_to_object_exprs( //dir=expr + unique int id: @class_metatype_to_object_expr +); + +coerce_exprs( //dir=expr + unique int id: @coerce_expr +); + +collection_upcast_conversion_exprs( //dir=expr + unique int id: @collection_upcast_conversion_expr +); + +conditional_bridge_from_obj_c_exprs( //dir=expr + unique int id: @conditional_bridge_from_obj_c_expr +); + +covariant_function_conversion_exprs( //dir=expr + unique int id: @covariant_function_conversion_expr +); + +covariant_return_conversion_exprs( //dir=expr + unique int id: @covariant_return_conversion_expr +); + +derived_to_base_exprs( //dir=expr + unique int id: @derived_to_base_expr +); + +destructure_tuple_exprs( //dir=expr + unique int id: @destructure_tuple_expr +); + +dictionary_exprs( //dir=expr + unique int id: @dictionary_expr +); + +#keyset[id, index] +dictionary_expr_elements( //dir=expr + int id: @dictionary_expr ref, + int index: int ref, + int element: @expr_or_none ref +); + +differentiable_function_exprs( //dir=expr + unique int id: @differentiable_function_expr +); + +differentiable_function_extract_original_exprs( //dir=expr + unique int id: @differentiable_function_extract_original_expr +); + +dot_self_exprs( //dir=expr + unique int id: @dot_self_expr +); + +@dynamic_lookup_expr = + @dynamic_member_ref_expr +| @dynamic_subscript_expr +; + +erasure_exprs( //dir=expr + unique int id: @erasure_expr +); + +existential_metatype_to_object_exprs( //dir=expr + unique int id: @existential_metatype_to_object_expr +); + +explicit_closure_exprs( //dir=expr + unique int id: @explicit_closure_expr +); + +force_try_exprs( //dir=expr + unique int id: @force_try_expr +); + +foreign_object_conversion_exprs( //dir=expr + unique int id: @foreign_object_conversion_expr +); + +function_conversion_exprs( //dir=expr + unique int id: @function_conversion_expr +); + +in_out_to_pointer_exprs( //dir=expr + unique int id: @in_out_to_pointer_expr +); + +inject_into_optional_exprs( //dir=expr + unique int id: @inject_into_optional_expr +); + +interpolated_string_literal_exprs( //dir=expr + unique int id: @interpolated_string_literal_expr +); + +#keyset[id] +interpolated_string_literal_expr_interpolation_exprs( //dir=expr + int id: @interpolated_string_literal_expr ref, + int interpolation_expr: @opaque_value_expr_or_none ref +); + +#keyset[id] +interpolated_string_literal_expr_appending_exprs( //dir=expr + int id: @interpolated_string_literal_expr ref, + int appending_expr: @tap_expr_or_none ref +); + +linear_function_exprs( //dir=expr + unique int id: @linear_function_expr +); + +linear_function_extract_original_exprs( //dir=expr + unique int id: @linear_function_extract_original_expr +); + +linear_to_differentiable_function_exprs( //dir=expr + unique int id: @linear_to_differentiable_function_expr +); + +load_exprs( //dir=expr + unique int id: @load_expr +); + +member_ref_exprs( //dir=expr + unique int id: @member_ref_expr +); + +#keyset[id] +member_ref_expr_has_direct_to_storage_semantics( //dir=expr + int id: @member_ref_expr ref +); + +#keyset[id] +member_ref_expr_has_direct_to_implementation_semantics( //dir=expr + int id: @member_ref_expr ref +); + +#keyset[id] +member_ref_expr_has_ordinary_semantics( //dir=expr + int id: @member_ref_expr ref +); + +#keyset[id] +member_ref_expr_has_distributed_thunk_semantics( //dir=expr + int id: @member_ref_expr ref +); + +metatype_conversion_exprs( //dir=expr + unique int id: @metatype_conversion_expr +); + +nil_literal_exprs( //dir=expr + unique int id: @nil_literal_expr +); + +object_literal_exprs( //dir=expr + unique int id: @object_literal_expr, + int kind: int ref +); + +#keyset[id, index] +object_literal_expr_arguments( //dir=expr + int id: @object_literal_expr ref, + int index: int ref, + int argument: @argument_or_none ref +); + +optional_try_exprs( //dir=expr + unique int id: @optional_try_expr +); + +paren_exprs( //dir=expr + unique int id: @paren_expr +); + +pointer_to_pointer_exprs( //dir=expr + unique int id: @pointer_to_pointer_expr +); + +postfix_unary_exprs( //dir=expr + unique int id: @postfix_unary_expr +); + +prefix_unary_exprs( //dir=expr + unique int id: @prefix_unary_expr +); + +protocol_metatype_to_object_exprs( //dir=expr + unique int id: @protocol_metatype_to_object_expr +); + +regex_literal_exprs( //dir=expr + unique int id: @regex_literal_expr, + string pattern: string ref, + int version: int ref +); + +@self_apply_expr = + @dot_syntax_call_expr +| @initializer_ref_call_expr +; + +#keyset[id] +self_apply_exprs( //dir=expr + int id: @self_apply_expr ref, + int base: @expr_or_none ref +); + +string_to_pointer_exprs( //dir=expr + unique int id: @string_to_pointer_expr +); + +subscript_exprs( //dir=expr + unique int id: @subscript_expr +); + +#keyset[id, index] +subscript_expr_arguments( //dir=expr + int id: @subscript_expr ref, + int index: int ref, + int argument: @argument_or_none ref +); + +#keyset[id] +subscript_expr_has_direct_to_storage_semantics( //dir=expr + int id: @subscript_expr ref +); + +#keyset[id] +subscript_expr_has_direct_to_implementation_semantics( //dir=expr + int id: @subscript_expr ref +); + +#keyset[id] +subscript_expr_has_ordinary_semantics( //dir=expr + int id: @subscript_expr ref +); + +#keyset[id] +subscript_expr_has_distributed_thunk_semantics( //dir=expr + int id: @subscript_expr ref +); + +try_exprs( //dir=expr + unique int id: @try_expr +); + +underlying_to_opaque_exprs( //dir=expr + unique int id: @underlying_to_opaque_expr +); + +unevaluated_instance_exprs( //dir=expr + unique int id: @unevaluated_instance_expr +); + +unresolved_member_chain_result_exprs( //dir=expr + unique int id: @unresolved_member_chain_result_expr +); + +unresolved_type_conversion_exprs( //dir=expr + unique int id: @unresolved_type_conversion_expr +); + +boolean_literal_exprs( //dir=expr + unique int id: @boolean_literal_expr, + boolean value: boolean ref +); + +conditional_checked_cast_exprs( //dir=expr + unique int id: @conditional_checked_cast_expr +); + +dot_syntax_call_exprs( //dir=expr + unique int id: @dot_syntax_call_expr +); + +dynamic_member_ref_exprs( //dir=expr + unique int id: @dynamic_member_ref_expr +); + +dynamic_subscript_exprs( //dir=expr + unique int id: @dynamic_subscript_expr +); + +forced_checked_cast_exprs( //dir=expr + unique int id: @forced_checked_cast_expr +); + +initializer_ref_call_exprs( //dir=expr + unique int id: @initializer_ref_call_expr +); + +is_exprs( //dir=expr + unique int id: @is_expr +); + +magic_identifier_literal_exprs( //dir=expr + unique int id: @magic_identifier_literal_expr, + string kind: string ref +); + +@number_literal_expr = + @float_literal_expr +| @integer_literal_expr +; + +string_literal_exprs( //dir=expr + unique int id: @string_literal_expr, + string value: string ref +); + +float_literal_exprs( //dir=expr + unique int id: @float_literal_expr, + string string_value: string ref +); + +integer_literal_exprs( //dir=expr + unique int id: @integer_literal_expr, + string string_value: string ref +); + +@pattern = + @any_pattern +| @binding_pattern +| @bool_pattern +| @enum_element_pattern +| @expr_pattern +| @is_pattern +| @named_pattern +| @optional_some_pattern +| @paren_pattern +| @tuple_pattern +| @typed_pattern +; + +#keyset[id] +pattern_types( //dir=pattern + int id: @pattern ref, + int type_: @type_or_none ref +); + +any_patterns( //dir=pattern + unique int id: @any_pattern +); + +binding_patterns( //dir=pattern + unique int id: @binding_pattern, + int sub_pattern: @pattern_or_none ref +); + +bool_patterns( //dir=pattern + unique int id: @bool_pattern, + boolean value: boolean ref +); + +enum_element_patterns( //dir=pattern + unique int id: @enum_element_pattern, + int element: @enum_element_decl_or_none ref +); + +#keyset[id] +enum_element_pattern_sub_patterns( //dir=pattern + int id: @enum_element_pattern ref, + int sub_pattern: @pattern_or_none ref +); + +expr_patterns( //dir=pattern + unique int id: @expr_pattern, + int sub_expr: @expr_or_none ref +); + +is_patterns( //dir=pattern + unique int id: @is_pattern +); + +#keyset[id] +is_pattern_cast_type_reprs( //dir=pattern + int id: @is_pattern ref, + int cast_type_repr: @type_repr_or_none ref +); + +#keyset[id] +is_pattern_sub_patterns( //dir=pattern + int id: @is_pattern ref, + int sub_pattern: @pattern_or_none ref +); + +named_patterns( //dir=pattern + unique int id: @named_pattern, + int var_decl: @var_decl_or_none ref +); + +optional_some_patterns( //dir=pattern + unique int id: @optional_some_pattern, + int sub_pattern: @pattern_or_none ref +); + +paren_patterns( //dir=pattern + unique int id: @paren_pattern, + int sub_pattern: @pattern_or_none ref +); + +tuple_patterns( //dir=pattern + unique int id: @tuple_pattern +); + +#keyset[id, index] +tuple_pattern_elements( //dir=pattern + int id: @tuple_pattern ref, + int index: int ref, + int element: @pattern_or_none ref +); + +typed_patterns( //dir=pattern + unique int id: @typed_pattern, + int sub_pattern: @pattern_or_none ref +); + +#keyset[id] +typed_pattern_type_reprs( //dir=pattern + int id: @typed_pattern ref, + int type_repr: @type_repr_or_none ref +); + +case_label_items( //dir=stmt + unique int id: @case_label_item, + int pattern: @pattern_or_none ref +); + +#keyset[id] +case_label_item_guards( //dir=stmt + int id: @case_label_item ref, + int guard: @expr_or_none ref +); + +condition_elements( //dir=stmt + unique int id: @condition_element +); + +#keyset[id] +condition_element_booleans( //dir=stmt + int id: @condition_element ref, + int boolean_: @expr_or_none ref +); + +#keyset[id] +condition_element_patterns( //dir=stmt + int id: @condition_element ref, + int pattern: @pattern_or_none ref +); + +#keyset[id] +condition_element_initializers( //dir=stmt + int id: @condition_element ref, + int initializer: @expr_or_none ref +); + +#keyset[id] +condition_element_availabilities( //dir=stmt + int id: @condition_element ref, + int availability: @availability_info_or_none ref +); + +@stmt = + @brace_stmt +| @break_stmt +| @case_stmt +| @continue_stmt +| @defer_stmt +| @discard_stmt +| @fail_stmt +| @fallthrough_stmt +| @labeled_stmt +| @pound_assert_stmt +| @return_stmt +| @then_stmt +| @throw_stmt +| @yield_stmt +; + +stmt_conditions( //dir=stmt + unique int id: @stmt_condition +); + +#keyset[id, index] +stmt_condition_elements( //dir=stmt + int id: @stmt_condition ref, + int index: int ref, + int element: @condition_element_or_none ref +); + +brace_stmts( //dir=stmt + unique int id: @brace_stmt +); + +#keyset[id, index] +brace_stmt_elements( //dir=stmt + int id: @brace_stmt ref, + int index: int ref, + int element: @ast_node_or_none ref +); + +break_stmts( //dir=stmt + unique int id: @break_stmt +); + +#keyset[id] +break_stmt_target_names( //dir=stmt + int id: @break_stmt ref, + string target_name: string ref +); + +#keyset[id] +break_stmt_targets( //dir=stmt + int id: @break_stmt ref, + int target: @stmt_or_none ref +); + +case_stmts( //dir=stmt + unique int id: @case_stmt, + int body: @stmt_or_none ref +); + +#keyset[id, index] +case_stmt_labels( //dir=stmt + int id: @case_stmt ref, + int index: int ref, + int label: @case_label_item_or_none ref +); + +#keyset[id, index] +case_stmt_variables( //dir=stmt + int id: @case_stmt ref, + int index: int ref, + int variable: @var_decl_or_none ref +); + +continue_stmts( //dir=stmt + unique int id: @continue_stmt +); + +#keyset[id] +continue_stmt_target_names( //dir=stmt + int id: @continue_stmt ref, + string target_name: string ref +); + +#keyset[id] +continue_stmt_targets( //dir=stmt + int id: @continue_stmt ref, + int target: @stmt_or_none ref +); + +defer_stmts( //dir=stmt + unique int id: @defer_stmt, + int body: @brace_stmt_or_none ref +); + +discard_stmts( //dir=stmt + unique int id: @discard_stmt, + int sub_expr: @expr_or_none ref +); + +fail_stmts( //dir=stmt + unique int id: @fail_stmt +); + +fallthrough_stmts( //dir=stmt + unique int id: @fallthrough_stmt, + int fallthrough_source: @case_stmt_or_none ref, + int fallthrough_dest: @case_stmt_or_none ref +); + +@labeled_stmt = + @do_catch_stmt +| @do_stmt +| @for_each_stmt +| @labeled_conditional_stmt +| @repeat_while_stmt +| @switch_stmt +; + +#keyset[id] +labeled_stmt_labels( //dir=stmt + int id: @labeled_stmt ref, + string label: string ref +); + +pound_assert_stmts( //dir=stmt + unique int id: @pound_assert_stmt, + int condition: @expr_or_none ref, + string message: string ref +); + +return_stmts( //dir=stmt + unique int id: @return_stmt +); + +#keyset[id] +return_stmt_results( //dir=stmt + int id: @return_stmt ref, + int result: @expr_or_none ref +); + +then_stmts( //dir=stmt + unique int id: @then_stmt, + int result: @expr_or_none ref +); + +throw_stmts( //dir=stmt + unique int id: @throw_stmt, + int sub_expr: @expr_or_none ref +); + +yield_stmts( //dir=stmt + unique int id: @yield_stmt +); + +#keyset[id, index] +yield_stmt_results( //dir=stmt + int id: @yield_stmt ref, + int index: int ref, + int result: @expr_or_none ref +); + +do_catch_stmts( //dir=stmt + unique int id: @do_catch_stmt, + int body: @stmt_or_none ref +); + +#keyset[id, index] +do_catch_stmt_catches( //dir=stmt + int id: @do_catch_stmt ref, + int index: int ref, + int catch: @case_stmt_or_none ref +); + +do_stmts( //dir=stmt + unique int id: @do_stmt, + int body: @brace_stmt_or_none ref +); + +for_each_stmts( //dir=stmt + unique int id: @for_each_stmt, + int pattern: @pattern_or_none ref, + int body: @brace_stmt_or_none ref +); + +#keyset[id, index] +for_each_stmt_variables( //dir=stmt + int id: @for_each_stmt ref, + int index: int ref, + int variable: @var_decl_or_none ref +); + +#keyset[id] +for_each_stmt_wheres( //dir=stmt + int id: @for_each_stmt ref, + int where: @expr_or_none ref +); + +#keyset[id] +for_each_stmt_iterator_vars( //dir=stmt + int id: @for_each_stmt ref, + int iteratorVar: @pattern_binding_decl_or_none ref +); + +#keyset[id] +for_each_stmt_next_calls( //dir=stmt + int id: @for_each_stmt ref, + int nextCall: @expr_or_none ref +); + +@labeled_conditional_stmt = + @guard_stmt +| @if_stmt +| @while_stmt +; + +#keyset[id] +labeled_conditional_stmts( //dir=stmt + int id: @labeled_conditional_stmt ref, + int condition: @stmt_condition_or_none ref +); + +repeat_while_stmts( //dir=stmt + unique int id: @repeat_while_stmt, + int condition: @expr_or_none ref, + int body: @stmt_or_none ref +); + +switch_stmts( //dir=stmt + unique int id: @switch_stmt, + int expr: @expr_or_none ref +); + +#keyset[id, index] +switch_stmt_cases( //dir=stmt + int id: @switch_stmt ref, + int index: int ref, + int case_: @case_stmt_or_none ref +); + +guard_stmts( //dir=stmt + unique int id: @guard_stmt, + int body: @brace_stmt_or_none ref +); + +if_stmts( //dir=stmt + unique int id: @if_stmt, + int then: @stmt_or_none ref +); + +#keyset[id] +if_stmt_elses( //dir=stmt + int id: @if_stmt ref, + int else: @stmt_or_none ref +); + +while_stmts( //dir=stmt + unique int id: @while_stmt, + int body: @stmt_or_none ref +); + +@type = + @any_function_type +| @any_generic_type +| @any_metatype_type +| @builtin_type +| @dependent_member_type +| @dynamic_self_type +| @error_type +| @existential_type +| @in_out_type +| @l_value_type +| @module_type +| @pack_element_type +| @pack_expansion_type +| @pack_type +| @parameterized_protocol_type +| @protocol_composition_type +| @reference_storage_type +| @substitutable_type +| @sugar_type +| @tuple_type +| @unresolved_type +; + +#keyset[id] +types( //dir=type + int id: @type ref, + string name: string ref, + int canonical_type: @type_or_none ref +); + +type_reprs( //dir=type + unique int id: @type_repr, + int type_: @type_or_none ref +); + +@any_function_type = + @function_type +| @generic_function_type +; + +#keyset[id] +any_function_types( //dir=type + int id: @any_function_type ref, + int result: @type_or_none ref +); + +#keyset[id, index] +any_function_type_param_types( //dir=type + int id: @any_function_type ref, + int index: int ref, + int param_type: @type_or_none ref +); + +#keyset[id] +any_function_type_is_throwing( //dir=type + int id: @any_function_type ref +); + +#keyset[id] +any_function_type_is_async( //dir=type + int id: @any_function_type ref +); + +@any_generic_type = + @nominal_or_bound_generic_nominal_type +| @unbound_generic_type +; + +#keyset[id] +any_generic_types( //dir=type + int id: @any_generic_type ref, + int declaration: @generic_type_decl_or_none ref +); + +#keyset[id] +any_generic_type_parents( //dir=type + int id: @any_generic_type ref, + int parent: @type_or_none ref +); + +@any_metatype_type = + @existential_metatype_type +| @metatype_type +; + +@builtin_type = + @any_builtin_integer_type +| @builtin_bridge_object_type +| @builtin_default_actor_storage_type +| @builtin_executor_type +| @builtin_float_type +| @builtin_job_type +| @builtin_native_object_type +| @builtin_raw_pointer_type +| @builtin_raw_unsafe_continuation_type +| @builtin_unsafe_value_buffer_type +| @builtin_vector_type +; + +dependent_member_types( //dir=type + unique int id: @dependent_member_type, + int base_type: @type_or_none ref, + int associated_type_decl: @associated_type_decl_or_none ref +); + +dynamic_self_types( //dir=type + unique int id: @dynamic_self_type, + int static_self_type: @type_or_none ref +); + +error_types( //dir=type + unique int id: @error_type +); + +existential_types( //dir=type + unique int id: @existential_type, + int constraint: @type_or_none ref +); + +in_out_types( //dir=type + unique int id: @in_out_type, + int object_type: @type_or_none ref +); + +l_value_types( //dir=type + unique int id: @l_value_type, + int object_type: @type_or_none ref +); + +module_types( //dir=type + unique int id: @module_type, + int module: @module_decl_or_none ref +); + +pack_element_types( //dir=type + unique int id: @pack_element_type, + int pack_type: @type_or_none ref +); + +pack_expansion_types( //dir=type + unique int id: @pack_expansion_type, + int pattern_type: @type_or_none ref, + int count_type: @type_or_none ref +); + +pack_types( //dir=type + unique int id: @pack_type +); + +#keyset[id, index] +pack_type_elements( //dir=type + int id: @pack_type ref, + int index: int ref, + int element: @type_or_none ref +); + +parameterized_protocol_types( //dir=type + unique int id: @parameterized_protocol_type, + int base: @protocol_type_or_none ref +); + +#keyset[id, index] +parameterized_protocol_type_args( //dir=type + int id: @parameterized_protocol_type ref, + int index: int ref, + int arg: @type_or_none ref +); + +protocol_composition_types( //dir=type + unique int id: @protocol_composition_type +); + +#keyset[id, index] +protocol_composition_type_members( //dir=type + int id: @protocol_composition_type ref, + int index: int ref, + int member: @type_or_none ref +); + +@reference_storage_type = + @unmanaged_storage_type +| @unowned_storage_type +| @weak_storage_type +; + +#keyset[id] +reference_storage_types( //dir=type + int id: @reference_storage_type ref, + int referent_type: @type_or_none ref +); + +@substitutable_type = + @archetype_type +| @generic_type_param_type +; + +@sugar_type = + @paren_type +| @syntax_sugar_type +| @type_alias_type +; + +tuple_types( //dir=type + unique int id: @tuple_type +); + +#keyset[id, index] +tuple_type_types( //dir=type + int id: @tuple_type ref, + int index: int ref, + int type_: @type_or_none ref +); + +#keyset[id, index] +tuple_type_names( //dir=type + int id: @tuple_type ref, + int index: int ref, + string name: string ref +); + +unresolved_types( //dir=type + unique int id: @unresolved_type +); + +@any_builtin_integer_type = + @builtin_integer_literal_type +| @builtin_integer_type +; + +@archetype_type = + @local_archetype_type +| @opaque_type_archetype_type +| @pack_archetype_type +| @primary_archetype_type +; + +#keyset[id] +archetype_types( //dir=type + int id: @archetype_type ref, + int interface_type: @type_or_none ref +); + +#keyset[id] +archetype_type_superclasses( //dir=type + int id: @archetype_type ref, + int superclass: @type_or_none ref +); + +#keyset[id, index] +archetype_type_protocols( //dir=type + int id: @archetype_type ref, + int index: int ref, + int protocol: @protocol_decl_or_none ref +); + +builtin_bridge_object_types( //dir=type + unique int id: @builtin_bridge_object_type +); + +builtin_default_actor_storage_types( //dir=type + unique int id: @builtin_default_actor_storage_type +); + +builtin_executor_types( //dir=type + unique int id: @builtin_executor_type +); + +builtin_float_types( //dir=type + unique int id: @builtin_float_type +); + +builtin_job_types( //dir=type + unique int id: @builtin_job_type +); + +builtin_native_object_types( //dir=type + unique int id: @builtin_native_object_type +); + +builtin_raw_pointer_types( //dir=type + unique int id: @builtin_raw_pointer_type +); + +builtin_raw_unsafe_continuation_types( //dir=type + unique int id: @builtin_raw_unsafe_continuation_type +); + +builtin_unsafe_value_buffer_types( //dir=type + unique int id: @builtin_unsafe_value_buffer_type +); + +builtin_vector_types( //dir=type + unique int id: @builtin_vector_type +); + +existential_metatype_types( //dir=type + unique int id: @existential_metatype_type +); + +function_types( //dir=type + unique int id: @function_type +); + +generic_function_types( //dir=type + unique int id: @generic_function_type +); + +#keyset[id, index] +generic_function_type_generic_params( //dir=type + int id: @generic_function_type ref, + int index: int ref, + int generic_param: @generic_type_param_type_or_none ref +); + +generic_type_param_types( //dir=type + unique int id: @generic_type_param_type +); + +metatype_types( //dir=type + unique int id: @metatype_type +); + +@nominal_or_bound_generic_nominal_type = + @bound_generic_type +| @nominal_type +; + +paren_types( //dir=type + unique int id: @paren_type, + int type_: @type_or_none ref +); + +@syntax_sugar_type = + @dictionary_type +| @unary_syntax_sugar_type +; + +type_alias_types( //dir=type + unique int id: @type_alias_type, + int decl: @type_alias_decl_or_none ref +); + +unbound_generic_types( //dir=type + unique int id: @unbound_generic_type +); + +unmanaged_storage_types( //dir=type + unique int id: @unmanaged_storage_type +); + +unowned_storage_types( //dir=type + unique int id: @unowned_storage_type +); + +weak_storage_types( //dir=type + unique int id: @weak_storage_type +); + +@bound_generic_type = + @bound_generic_class_type +| @bound_generic_enum_type +| @bound_generic_struct_type +; + +#keyset[id, index] +bound_generic_type_arg_types( //dir=type + int id: @bound_generic_type ref, + int index: int ref, + int arg_type: @type_or_none ref +); + +builtin_integer_literal_types( //dir=type + unique int id: @builtin_integer_literal_type +); + +builtin_integer_types( //dir=type + unique int id: @builtin_integer_type +); + +#keyset[id] +builtin_integer_type_widths( //dir=type + int id: @builtin_integer_type ref, + int width: int ref +); + +dictionary_types( //dir=type + unique int id: @dictionary_type, + int key_type: @type_or_none ref, + int value_type: @type_or_none ref +); + +@local_archetype_type = + @element_archetype_type +| @opened_archetype_type +; + +@nominal_type = + @class_type +| @enum_type +| @protocol_type +| @struct_type +; + +opaque_type_archetype_types( //dir=type + unique int id: @opaque_type_archetype_type, + int declaration: @opaque_type_decl_or_none ref +); + +pack_archetype_types( //dir=type + unique int id: @pack_archetype_type +); + +primary_archetype_types( //dir=type + unique int id: @primary_archetype_type +); + +@unary_syntax_sugar_type = + @array_slice_type +| @optional_type +| @variadic_sequence_type +; + +#keyset[id] +unary_syntax_sugar_types( //dir=type + int id: @unary_syntax_sugar_type ref, + int base_type: @type_or_none ref +); + +array_slice_types( //dir=type + unique int id: @array_slice_type +); + +bound_generic_class_types( //dir=type + unique int id: @bound_generic_class_type +); + +bound_generic_enum_types( //dir=type + unique int id: @bound_generic_enum_type +); + +bound_generic_struct_types( //dir=type + unique int id: @bound_generic_struct_type +); + +class_types( //dir=type + unique int id: @class_type +); + +element_archetype_types( //dir=type + unique int id: @element_archetype_type +); + +enum_types( //dir=type + unique int id: @enum_type +); + +opened_archetype_types( //dir=type + unique int id: @opened_archetype_type +); + +optional_types( //dir=type + unique int id: @optional_type +); + +protocol_types( //dir=type + unique int id: @protocol_type +); + +struct_types( //dir=type + unique int id: @struct_type +); + +variadic_sequence_types( //dir=type + unique int id: @variadic_sequence_type +); + +@accessor_or_none = + @accessor +| @unspecified_element +; + +@argument_or_none = + @argument +| @unspecified_element +; + +@associated_type_decl_or_none = + @associated_type_decl +| @unspecified_element +; + +@ast_node_or_none = + @ast_node +| @unspecified_element +; + +@availability_info_or_none = + @availability_info +| @unspecified_element +; + +@availability_spec_or_none = + @availability_spec +| @unspecified_element +; + +@brace_stmt_or_none = + @brace_stmt +| @unspecified_element +; + +@captured_decl_or_none = + @captured_decl +| @unspecified_element +; + +@case_label_item_or_none = + @case_label_item +| @unspecified_element +; + +@case_stmt_or_none = + @case_stmt +| @unspecified_element +; + +@closure_expr_or_none = + @closure_expr +| @unspecified_element +; + +@condition_element_or_none = + @condition_element +| @unspecified_element +; + +@decl_or_none = + @decl +| @unspecified_element +; + +@enum_element_decl_or_none = + @enum_element_decl +| @unspecified_element +; + +@expr_or_none = + @expr +| @unspecified_element +; + +@file_or_none = + @file +| @unspecified_element +; + +@function_or_none = + @function +| @unspecified_element +; + +@generic_type_decl_or_none = + @generic_type_decl +| @unspecified_element +; + +@generic_type_param_decl_or_none = + @generic_type_param_decl +| @unspecified_element +; + +@generic_type_param_type_or_none = + @generic_type_param_type +| @unspecified_element +; + +@initializer_or_none = + @initializer +| @unspecified_element +; + +@key_path_component_or_none = + @key_path_component +| @unspecified_element +; + +@location_or_none = + @location +| @unspecified_element +; + +@macro_role_or_none = + @macro_role +| @unspecified_element +; + +@module_decl_or_none = + @module_decl +| @unspecified_element +; + +@nominal_type_decl_or_none = + @nominal_type_decl +| @unspecified_element +; + +@opaque_type_decl_or_none = + @opaque_type_decl +| @unspecified_element +; + +@opaque_value_expr_or_none = + @opaque_value_expr +| @unspecified_element +; + +@param_decl_or_none = + @param_decl +| @unspecified_element +; + +@pattern_or_none = + @pattern +| @unspecified_element +; + +@pattern_binding_decl_or_none = + @pattern_binding_decl +| @unspecified_element +; + +@precedence_group_decl_or_none = + @precedence_group_decl +| @unspecified_element +; + +@protocol_decl_or_none = + @protocol_decl +| @unspecified_element +; + +@protocol_type_or_none = + @protocol_type +| @unspecified_element +; + +@stmt_or_none = + @stmt +| @unspecified_element +; + +@stmt_condition_or_none = + @stmt_condition +| @unspecified_element +; + +@string_literal_expr_or_none = + @string_literal_expr +| @unspecified_element +; + +@tap_expr_or_none = + @tap_expr +| @unspecified_element +; + +@type_or_none = + @type +| @unspecified_element +; + +@type_alias_decl_or_none = + @type_alias_decl +| @unspecified_element +; + +@type_expr_or_none = + @type_expr +| @unspecified_element +; + +@type_repr_or_none = + @type_repr +| @unspecified_element +; + +@value_decl_or_none = + @unspecified_element +| @value_decl +; + +@var_decl_or_none = + @unspecified_element +| @var_decl +; diff --git a/swift/ql/lib/upgrades/44c4818a8987b5e1b3cd11e553e41045e1262451/upgrade.properties b/swift/ql/lib/upgrades/44c4818a8987b5e1b3cd11e553e41045e1262451/upgrade.properties new file mode 100644 index 000000000000..38e20de39fce --- /dev/null +++ b/swift/ql/lib/upgrades/44c4818a8987b5e1b3cd11e553e41045e1262451/upgrade.properties @@ -0,0 +1,2 @@ +description: Add variables to `ForEachStmt` +compatibility: backwards diff --git a/swift/ql/test/extractor-tests/errors/CONSISTENCY/UnresolvedAstNodes.expected b/swift/ql/test/extractor-tests/errors/CONSISTENCY/UnresolvedAstNodes.expected index c88a81e5fc79..c777fe0ebb55 100644 --- a/swift/ql/test/extractor-tests/errors/CONSISTENCY/UnresolvedAstNodes.expected +++ b/swift/ql/test/extractor-tests/errors/CONSISTENCY/UnresolvedAstNodes.expected @@ -1,2 +1 @@ -| file://:0:0:0:0 | ... .combine(_:) | -| unresolved.swift:5:1:5:14 | UnresolvedSpecializeExpr | +| unresolved.swift:5:1:5:14 | UnresolvedSpecializeExpr | UnresolvedSpecializeExpr | diff --git a/swift/ql/test/extractor-tests/expressions/all.expected b/swift/ql/test/extractor-tests/expressions/all.expected index bc8fae6529ba..0dd7091c1f97 100644 --- a/swift/ql/test/extractor-tests/expressions/all.expected +++ b/swift/ql/test/extractor-tests/expressions/all.expected @@ -6,8 +6,8 @@ | expressions.swift:6:9:6:9 | hello world | StringLiteralExpr | | expressions.swift:7:10:7:10 | "..." | InterpolatedStringLiteralExpr | | expressions.swift:7:10:7:10 | OpaqueValueExpr | OpaqueValueExpr | -| expressions.swift:7:10:7:10 | TapExpr | TapExpr | | expressions.swift:7:10:7:10 | hello | StringLiteralExpr | +| expressions.swift:7:10:7:21 | TapExpr | TapExpr | | expressions.swift:7:11:7:10 | call to appendLiteral(_:) | CallExpr | | expressions.swift:7:11:7:11 | $interpolation | DeclRefExpr | | expressions.swift:7:11:7:11 | &... | InOutExpr | @@ -133,7 +133,6 @@ | expressions.swift:60:1:60:63 | call to withUnsafePointer(to:_:) | CallExpr | | expressions.swift:60:23:60:23 | (Int) ... | LoadExpr | | expressions.swift:60:23:60:23 | myNumber | DeclRefExpr | -| expressions.swift:60:33:60:63 | ((UnsafePointer) throws -> ()) ... | FunctionConversionExpr | | expressions.swift:60:33:60:63 | { ... } | ExplicitClosureExpr | | expressions.swift:60:35:60:35 | unsafeFunction(pointer:) | DeclRefExpr | | expressions.swift:60:35:60:61 | call to unsafeFunction(pointer:) | CallExpr | diff --git a/swift/ql/test/extractor-tests/generated/decl/CapturedDecl/PrintAst.expected b/swift/ql/test/extractor-tests/generated/decl/CapturedDecl/PrintAst.expected index d7f64e2a81a0..c3ae0bba4c0d 100644 --- a/swift/ql/test/extractor-tests/generated/decl/CapturedDecl/PrintAst.expected +++ b/swift/ql/test/extractor-tests/generated/decl/CapturedDecl/PrintAst.expected @@ -251,6 +251,7 @@ closures.swift: # 42| getArgument(2): [Argument] terminator: default terminator # 42| getExpr(): [DefaultArgumentExpr] default terminator # 42| getCapture(0): [CapturedDecl] wrapper(_:) +# 41| getExpr().getFullyConverted(): [FunctionConversionExpr] (@isolated(any) () async -> ()) ... # 45| getElement(1): [CallExpr] call to withCallback(_:) # 45| getFunction(): [DeclRefExpr] withCallback(_:) # 45| getArgument(0): [Argument] : { ... } diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getRole.expected b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getRole.expected index 0cc8daaa5b8d..faa0a6256a60 100644 --- a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getRole.expected +++ b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getRole.expected @@ -1,4 +1,4 @@ -| test.swift:2:1:2:50 | MacroDecl | 0 | test.swift:1:14:1:26 | #freestanding(declaration) | -| test.swift:4:1:4:15 | MacroDecl | 0 | test.swift:3:14:3:25 | #freestanding(expression) | -| test.swift:7:1:7:15 | MacroDecl | 0 | test.swift:6:10:6:20 | @attached(extension) | -| test.swift:7:1:7:15 | MacroDecl | 1 | test.swift:5:10:5:17 | @attached(member) | +| test.swift:2:1:2:50 | MacroDecl | 0 | test.swift:1:2:1:26 | #freestanding(declaration) | +| test.swift:4:1:4:15 | MacroDecl | 0 | test.swift:3:2:3:25 | #freestanding(expression) | +| test.swift:7:1:7:15 | MacroDecl | 0 | test.swift:6:2:6:20 | @attached(extension) | +| test.swift:7:1:7:15 | MacroDecl | 1 | test.swift:5:2:5:17 | @attached(member) | diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole.expected b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole.expected index c83b5e455902..036d4f7ff6e6 100644 --- a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole.expected +++ b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole.expected @@ -8,7 +8,13 @@ | file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | | file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | | file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| test.swift:1:14:1:26 | #freestanding(declaration) | getKind: | 2 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| test.swift:3:14:3:25 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| test.swift:5:10:5:17 | @attached(member) | getKind: | 16 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| test.swift:6:10:6:20 | @attached(extension) | getKind: | 256 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | +| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | +| file://:0:0:0:0 | @attached(accessor) | getKind: | 4 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | +| file://:0:0:0:0 | @attached(member) | getKind: | 16 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | +| file://:0:0:0:0 | @attached(memberAttribute) | getKind: | 8 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | +| file://:0:0:0:0 | @attached(peer) | getKind: | 32 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 1 | +| file://:0:0:0:0 | @attached(peer) | getKind: | 32 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 1 | +| test.swift:1:2:1:26 | #freestanding(declaration) | getKind: | 2 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | +| test.swift:3:2:3:25 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | +| test.swift:5:2:5:17 | @attached(member) | getKind: | 16 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | +| test.swift:6:2:6:20 | @attached(extension) | getKind: | 256 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole_getName.expected b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole_getName.expected index e69de29bb2d1..0c42bfc46014 100644 --- a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole_getName.expected +++ b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole_getName.expected @@ -0,0 +1,2 @@ +| file://:0:0:0:0 | @attached(peer) | 0 | $() | +| file://:0:0:0:0 | @attached(peer) | 0 | _lldb_summary() | diff --git a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getRoot.expected b/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getRoot.expected index 5e391528d7c9..4106b8b42fad 100644 --- a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getRoot.expected +++ b/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getRoot.expected @@ -1,7 +1,7 @@ | key_path_expr.swift:11:12:11:17 | #keyPath(...) | key_path_expr.swift:11:13:11:13 | Foo | | key_path_expr.swift:12:18:12:26 | #keyPath(...) | key_path_expr.swift:12:19:12:23 | [Int] | | key_path_expr.swift:13:19:13:38 | #keyPath(...) | key_path_expr.swift:13:20:13:33 | [String : Int] | -| key_path_expr.swift:14:16:14:35 | #keyPath(...) | key_path_expr.swift:14:17:14:29 | Int? | +| key_path_expr.swift:14:16:14:35 | #keyPath(...) | key_path_expr.swift:14:17:14:29 | Optional | | key_path_expr.swift:15:16:15:26 | #keyPath(...) | key_path_expr.swift:15:17:15:17 | Foo | | key_path_expr.swift:16:20:16:30 | #keyPath(...) | key_path_expr.swift:16:21:16:21 | Foo | | key_path_expr.swift:17:11:17:16 | #keyPath(...) | key_path_expr.swift:17:12:17:12 | Int | diff --git a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getType.expected index cdf1ac3d9f8b..de0945572cf2 100644 --- a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getType.expected +++ b/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getType.expected @@ -1,7 +1,7 @@ | key_path_expr.swift:11:12:11:17 | #keyPath(...) | WritableKeyPath | | key_path_expr.swift:12:18:12:26 | #keyPath(...) | WritableKeyPath<[Int], Int> | | key_path_expr.swift:13:19:13:38 | #keyPath(...) | WritableKeyPath<[String : Int], Int?> | -| key_path_expr.swift:14:16:14:35 | #keyPath(...) | WritableKeyPath | +| key_path_expr.swift:14:16:14:35 | #keyPath(...) | WritableKeyPath, Int> | | key_path_expr.swift:15:16:15:26 | #keyPath(...) | KeyPath | | key_path_expr.swift:16:20:16:30 | #keyPath(...) | KeyPath | | key_path_expr.swift:17:11:17:16 | #keyPath(...) | WritableKeyPath | diff --git a/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getType.expected index 61f37a4b9a9e..7ea638a186ca 100644 --- a/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getType.expected +++ b/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getType.expected @@ -13,12 +13,12 @@ | method_lookups.swift:37:11:37:11 | X.init() | () -> X | | method_lookups.swift:37:11:37:15 | (no string representation) | (Int) -> () | | method_lookups.swift:37:15:37:15 | .baz(_:) | (Int) -> () | -| method_lookups.swift:40:1:40:1 | Task.init(priority:operation:) | (TaskPriority?, __owned @escaping @Sendable () async -> ()) -> Task<(), Never> | +| method_lookups.swift:40:1:40:1 | Task.init(priority:operation:) | (TaskPriority?, sending @escaping @isolated(any) () async -> ()) -> Task<(), Never> | | method_lookups.swift:41:3:41:5 | .foo(_:_:) | (Int, Int) -> () | | method_lookups.swift:42:9:42:9 | Y.init() | () -> Y | | method_lookups.swift:42:9:42:13 | .baz(_:) | (Int) -> () | | method_lookups.swift:44:11:44:13 | .foo(_:_:) | (Int, Int) -> () | -| method_lookups.swift:47:1:47:1 | Task.init(priority:operation:) | (TaskPriority?, __owned @escaping @Sendable () async -> ()) -> Task<(), Never> | +| method_lookups.swift:47:1:47:1 | Task.init(priority:operation:) | (TaskPriority?, sending @escaping @isolated(any) () async -> ()) -> Task<(), Never> | | method_lookups.swift:48:9:48:11 | .foo(_:_:) | @MainActor (Int, Int) -> () | | method_lookups.swift:49:9:49:11 | .bar() | () -> () | | method_lookups.swift:50:9:50:9 | Z.init() | @MainActor () -> Z | diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/CONSISTENCY/CfgConsistency.expected b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/CONSISTENCY/CfgConsistency.expected new file mode 100644 index 000000000000..d238c6b5a405 --- /dev/null +++ b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/CONSISTENCY/CfgConsistency.expected @@ -0,0 +1,2 @@ +deadEnd +| for.swift:12:33:12:56 | array | diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.expected b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.expected new file mode 100644 index 000000000000..2fd2e5d318e6 --- /dev/null +++ b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.expected @@ -0,0 +1,3 @@ +| for.swift:4:5:6:5 | for ... in ... where ... { ... } | hasLabel: | no | getNumberOfVariables: | 2 | getPattern: | for.swift:4:9:4:9 | x | hasWhere: | yes | hasIteratorVar: | yes | hasNextCall: | yes | getBody: | for.swift:4:32:6:5 | { ... } | +| for.swift:7:5:9:5 | for ... in ... { ... } | hasLabel: | no | getNumberOfVariables: | 2 | getPattern: | for.swift:7:9:7:9 | s | hasWhere: | no | hasIteratorVar: | yes | hasNextCall: | yes | getBody: | for.swift:7:23:9:5 | { ... } | +| for.swift:13:5:17:5 | for ... in ... { ... } | hasLabel: | no | getNumberOfVariables: | 1 | getPattern: | for.swift:13:9:13:9 | x | hasWhere: | no | hasIteratorVar: | no | hasNextCall: | no | getBody: | for.swift:13:32:17:5 | { ... } | diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.ql b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.ql new file mode 100644 index 000000000000..bb659c7855ae --- /dev/null +++ b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.ql @@ -0,0 +1,20 @@ +// generated by codegen/codegen.py, do not edit +import codeql.swift.elements +import TestUtils + +from + ForEachStmt x, string hasLabel, int getNumberOfVariables, Pattern getPattern, string hasWhere, + string hasIteratorVar, string hasNextCall, BraceStmt getBody +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasLabel() then hasLabel = "yes" else hasLabel = "no") and + getNumberOfVariables = x.getNumberOfVariables() and + getPattern = x.getPattern() and + (if x.hasWhere() then hasWhere = "yes" else hasWhere = "no") and + (if x.hasIteratorVar() then hasIteratorVar = "yes" else hasIteratorVar = "no") and + (if x.hasNextCall() then hasNextCall = "yes" else hasNextCall = "no") and + getBody = x.getBody() +select x, "hasLabel:", hasLabel, "getNumberOfVariables:", getNumberOfVariables, "getPattern:", + getPattern, "hasWhere:", hasWhere, "hasIteratorVar:", hasIteratorVar, "hasNextCall:", hasNextCall, + "getBody:", getBody diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getIteratorVar.expected b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getIteratorVar.expected new file mode 100644 index 000000000000..72e969cbaa41 --- /dev/null +++ b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getIteratorVar.expected @@ -0,0 +1,2 @@ +| for.swift:4:5:6:5 | for ... in ... where ... { ... } | file://:0:0:0:0 | var ... = ... | +| for.swift:7:5:9:5 | for ... in ... { ... } | file://:0:0:0:0 | var ... = ... | diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getIteratorVar.ql b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getIteratorVar.ql new file mode 100644 index 000000000000..76c004d4e562 --- /dev/null +++ b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getIteratorVar.ql @@ -0,0 +1,7 @@ +// generated by codegen/codegen.py, do not edit +import codeql.swift.elements +import TestUtils + +from ForEachStmt x +where toBeTested(x) and not x.isUnknown() +select x, x.getIteratorVar() diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getLabel.expected b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getLabel.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getLabel.ql b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getLabel.ql new file mode 100644 index 000000000000..218668c2e280 --- /dev/null +++ b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getLabel.ql @@ -0,0 +1,7 @@ +// generated by codegen/codegen.py, do not edit +import codeql.swift.elements +import TestUtils + +from ForEachStmt x +where toBeTested(x) and not x.isUnknown() +select x, x.getLabel() diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getNextCall.expected b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getNextCall.expected new file mode 100644 index 000000000000..191a8f2196b4 --- /dev/null +++ b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getNextCall.expected @@ -0,0 +1,2 @@ +| for.swift:4:5:6:5 | for ... in ... where ... { ... } | for.swift:4:5:4:5 | call to next() | +| for.swift:7:5:9:5 | for ... in ... { ... } | for.swift:7:5:7:5 | call to next() | diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getNextCall.ql b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getNextCall.ql new file mode 100644 index 000000000000..1b52342b92cd --- /dev/null +++ b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getNextCall.ql @@ -0,0 +1,7 @@ +// generated by codegen/codegen.py, do not edit +import codeql.swift.elements +import TestUtils + +from ForEachStmt x +where toBeTested(x) and not x.isUnknown() +select x, x.getNextCall() diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getVariable.expected b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getVariable.expected new file mode 100644 index 000000000000..9762122d43dd --- /dev/null +++ b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getVariable.expected @@ -0,0 +1,5 @@ +| for.swift:4:5:6:5 | for ... in ... where ... { ... } | 0 | for.swift:4:9:4:9 | x | +| for.swift:4:5:6:5 | for ... in ... where ... { ... } | 1 | for.swift:4:14:4:14 | $x$generator | +| for.swift:7:5:9:5 | for ... in ... { ... } | 0 | for.swift:7:9:7:9 | s | +| for.swift:7:5:9:5 | for ... in ... { ... } | 1 | for.swift:7:14:7:14 | $s$generator | +| for.swift:13:5:17:5 | for ... in ... { ... } | 0 | for.swift:13:9:13:9 | x | diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getVariable.ql b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getVariable.ql new file mode 100644 index 000000000000..9981a03570ad --- /dev/null +++ b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getVariable.ql @@ -0,0 +1,7 @@ +// generated by codegen/codegen.py, do not edit +import codeql.swift.elements +import TestUtils + +from ForEachStmt x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getVariable(index) diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getWhere.expected b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getWhere.expected new file mode 100644 index 000000000000..991ace80dd34 --- /dev/null +++ b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getWhere.expected @@ -0,0 +1 @@ +| for.swift:4:5:6:5 | for ... in ... where ... { ... } | for.swift:4:25:4:30 | ... .!=(_:_:) ... | diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getWhere.ql b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getWhere.ql new file mode 100644 index 000000000000..176846c278c4 --- /dev/null +++ b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getWhere.ql @@ -0,0 +1,7 @@ +// generated by codegen/codegen.py, do not edit +import codeql.swift.elements +import TestUtils + +from ForEachStmt x +where toBeTested(x) and not x.isUnknown() +select x, x.getWhere() diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/MISSING_SOURCE.txt b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/MISSING_SOURCE.txt deleted file mode 100644 index bdba87873f26..000000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen/codegen.py, do not edit - -After a source file is added in this directory and codegen/codegen.py is run again, test queries -will appear and this file will be deleted diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/for.swift b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/for.swift new file mode 100644 index 000000000000..fbe80e3ae63d --- /dev/null +++ b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/for.swift @@ -0,0 +1,19 @@ +struct S {} + +func test_sequence(_ ints: [Int], _ elements: [S]) { + for x in ints where x != 0 { + print(x) + } + for s in elements { + print(s) + } +} + +func test_variadic_pack(_ array: repeat [each T]) -> Bool { + for x in repeat each array { + if !x.isEmpty { + return false + } + } + return true +} diff --git a/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType.expected b/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType.expected index 37921db705da..2b14e261f28d 100644 --- a/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType.expected +++ b/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType.expected @@ -1,4 +1,4 @@ | some Base | getName: | some Base | getCanonicalType: | some Base | getInterfaceType: | \u03c4_1_0 | hasSuperclass: | yes | getNumberOfProtocols: | 0 | getDeclaration: | file://:0:0:0:0 | _ | | some P | getName: | some P | getCanonicalType: | some P | getInterfaceType: | \u03c4_1_0 | hasSuperclass: | no | getNumberOfProtocols: | 1 | getDeclaration: | file://:0:0:0:0 | _ | | some P | getName: | some P | getCanonicalType: | some P | getInterfaceType: | \u03c4_1_0 | hasSuperclass: | no | getNumberOfProtocols: | 1 | getDeclaration: | file://:0:0:0:0 | _ | -| some SignedInteger | getName: | some SignedInteger | getCanonicalType: | some SignedInteger | getInterfaceType: | \u03c4_0_0 | hasSuperclass: | no | getNumberOfProtocols: | 11 | getDeclaration: | file://:0:0:0:0 | _ | +| some SignedInteger | getName: | some SignedInteger | getCanonicalType: | some SignedInteger | getInterfaceType: | \u03c4_0_0 | hasSuperclass: | no | getNumberOfProtocols: | 1 | getDeclaration: | file://:0:0:0:0 | _ | diff --git a/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getProtocol.expected b/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getProtocol.expected index 5909813f43d6..1ca3b350aeb9 100644 --- a/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getProtocol.expected +++ b/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getProtocol.expected @@ -1,13 +1,3 @@ | some P | 0 | opaque_types.swift:3:1:3:13 | P | | some P | 0 | opaque_types.swift:3:1:3:13 | P | | some SignedInteger | 0 | file://:0:0:0:0 | SignedInteger | -| some SignedInteger | 1 | file://:0:0:0:0 | BinaryInteger | -| some SignedInteger | 2 | file://:0:0:0:0 | SignedNumeric | -| some SignedInteger | 3 | file://:0:0:0:0 | CustomStringConvertible | -| some SignedInteger | 4 | file://:0:0:0:0 | Hashable | -| some SignedInteger | 5 | file://:0:0:0:0 | Numeric | -| some SignedInteger | 6 | file://:0:0:0:0 | Strideable | -| some SignedInteger | 7 | file://:0:0:0:0 | Equatable | -| some SignedInteger | 8 | file://:0:0:0:0 | AdditiveArithmetic | -| some SignedInteger | 9 | file://:0:0:0:0 | ExpressibleByIntegerLiteral | -| some SignedInteger | 10 | file://:0:0:0:0 | Comparable | diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType.expected b/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType.expected index aa96f769618f..5bfa71a34816 100644 --- a/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType.expected +++ b/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType.expected @@ -1 +1 @@ -| \u03c4_1_0 | getName: | \u03c4_1_0 | getCanonicalType: | \u03c4_1_0 | getInterfaceType: | \u03c4_1_0 | hasSuperclass: | no | getNumberOfProtocols: | 0 | +| \u03c4_1_0 | getName: | \u03c4_1_0 | getCanonicalType: | \u03c4_1_0 | getInterfaceType: | \u03c4_1_0 | hasSuperclass: | no | getNumberOfProtocols: | 2 | diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType_getProtocol.expected b/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType_getProtocol.expected index e69de29bb2d1..f6d6dae2dc59 100644 --- a/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType_getProtocol.expected +++ b/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType_getProtocol.expected @@ -0,0 +1,2 @@ +| \u03c4_1_0 | 0 | file://:0:0:0:0 | Copyable | +| \u03c4_1_0 | 1 | file://:0:0:0:0 | Escapable | diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType.expected b/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType.expected index 2c6bd59936c7..c53f468dc52f 100644 --- a/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType.expected +++ b/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType.expected @@ -1 +1,2 @@ -| each T | getName: | each T | getCanonicalType: | each T | getInterfaceType: | each T | hasSuperclass: | no | getNumberOfProtocols: | 0 | +| each Arg | getName: | each Arg | getCanonicalType: | each Arg | getInterfaceType: | each Arg | hasSuperclass: | no | getNumberOfProtocols: | 2 | +| each T | getName: | each T | getCanonicalType: | each T | getInterfaceType: | each T | hasSuperclass: | no | getNumberOfProtocols: | 2 | diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType_getProtocol.expected b/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType_getProtocol.expected index e69de29bb2d1..7ba05a259c88 100644 --- a/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType_getProtocol.expected +++ b/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType_getProtocol.expected @@ -0,0 +1,4 @@ +| each Arg | 0 | file://:0:0:0:0 | Copyable | +| each Arg | 1 | file://:0:0:0:0 | Escapable | +| each T | 0 | file://:0:0:0:0 | Copyable | +| each T | 1 | file://:0:0:0:0 | Escapable | diff --git a/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType.expected b/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType.expected index 85c426e9c28b..309665f809f6 100644 --- a/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType.expected +++ b/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType.expected @@ -1 +1,17 @@ | P | getName: | P | getCanonicalType: | P | getBase: | P | getNumberOfArgs: | 2 | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | diff --git a/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType_getArg.expected b/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType_getArg.expected index 957992286582..2762281ade28 100644 --- a/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType_getArg.expected +++ b/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType_getArg.expected @@ -1,2 +1,18 @@ | P | 0 | Int | | P | 1 | String | +| RawRepresentable | 0 | Bool | +| RawRepresentable | 0 | Double | +| RawRepresentable | 0 | Float | +| RawRepresentable | 0 | Int8 | +| RawRepresentable | 0 | Int16 | +| RawRepresentable | 0 | Int32 | +| RawRepresentable | 0 | Int64 | +| RawRepresentable | 0 | Int128 | +| RawRepresentable | 0 | Int | +| RawRepresentable | 0 | String | +| RawRepresentable | 0 | UInt8 | +| RawRepresentable | 0 | UInt16 | +| RawRepresentable | 0 | UInt32 | +| RawRepresentable | 0 | UInt64 | +| RawRepresentable | 0 | UInt128 | +| RawRepresentable | 0 | UInt | diff --git a/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType.expected b/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType.expected index 6bd7bc898e93..2ea99b1e2277 100644 --- a/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType.expected +++ b/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType.expected @@ -2,7 +2,7 @@ | Base | getName: | Base | getCanonicalType: | Base | getInterfaceType: | Base | hasSuperclass: | no | getNumberOfProtocols: | 1 | | Base | getName: | Base | getCanonicalType: | Base | getInterfaceType: | Base | hasSuperclass: | yes | getNumberOfProtocols: | 0 | | Base | getName: | Base | getCanonicalType: | Base | getInterfaceType: | Base | hasSuperclass: | yes | getNumberOfProtocols: | 0 | -| Param | getName: | Param | getCanonicalType: | Param | getInterfaceType: | Param | hasSuperclass: | no | getNumberOfProtocols: | 0 | +| Param | getName: | Param | getCanonicalType: | Param | getInterfaceType: | Param | hasSuperclass: | no | getNumberOfProtocols: | 2 | | ParamWithProtocols | getName: | ParamWithProtocols | getCanonicalType: | ParamWithProtocols | getInterfaceType: | ParamWithProtocols | hasSuperclass: | no | getNumberOfProtocols: | 2 | | ParamWithSuperclass | getName: | ParamWithSuperclass | getCanonicalType: | ParamWithSuperclass | getInterfaceType: | ParamWithSuperclass | hasSuperclass: | yes | getNumberOfProtocols: | 0 | | ParamWithSuperclassAndProtocols | getName: | ParamWithSuperclassAndProtocols | getCanonicalType: | ParamWithSuperclassAndProtocols | getInterfaceType: | ParamWithSuperclassAndProtocols | hasSuperclass: | yes | getNumberOfProtocols: | 2 | diff --git a/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getProtocol.expected b/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getProtocol.expected index 361f54b556e3..3c0810fd7c27 100644 --- a/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getProtocol.expected +++ b/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getProtocol.expected @@ -1,5 +1,7 @@ | Base | 0 | primary_archetypes.swift:4:1:4:13 | P | | Base | 0 | primary_archetypes.swift:5:1:5:14 | P2 | +| Param | 0 | file://:0:0:0:0 | Copyable | +| Param | 1 | file://:0:0:0:0 | Escapable | | ParamWithProtocols | 0 | file://:0:0:0:0 | Equatable | | ParamWithProtocols | 1 | primary_archetypes.swift:4:1:4:13 | P | | ParamWithSuperclassAndProtocols | 0 | file://:0:0:0:0 | Equatable | diff --git a/swift/ql/test/library-tests/ast/PrintAst.expected b/swift/ql/test/library-tests/ast/PrintAst.expected index 4d12907d3a5f..879de94c833c 100644 --- a/swift/ql/test/library-tests/ast/PrintAst.expected +++ b/swift/ql/test/library-tests/ast/PrintAst.expected @@ -702,6 +702,8 @@ cfg.swift: # 155| getVariable(1): [ConcreteVarDecl] xOptional # 155| Type = Int? # 138| getElement(0): [ForEachStmt] for ... in ... { ... } +# 138| getVariable(0): [ConcreteVarDecl] $generator +# 138| Type = IndexingIterator> # 138| getPattern(): [AnyPattern] _ #-----| getIteratorVar(): [PatternBindingDecl] var ... = ... # 138| getInit(0): [CallExpr] call to makeIterator() @@ -844,8 +846,6 @@ cfg.swift: # 158| getElse(): [BraceStmt] { ... } # 159| getElement(0): [ReturnStmt] return ... # 159| getResult(): [BooleanLiteralExpr] false -# 138| [ConcreteVarDecl] $generator -# 138| Type = IndexingIterator> # 141| [ConcreteVarDecl] $match # 141| Type = Int # 141| [ConcreteVarDecl] $match @@ -3259,6 +3259,10 @@ cfg.swift: # 525| getExpr(): [ExplicitClosureExpr] { ... } # 525| getBody(): [BraceStmt] { ... } # 526| getElement(0): [ForEachStmt] for ... in ... { ... } +# 526| getVariable(0): [ConcreteVarDecl] i +# 526| Type = Int +# 526| getVariable(1): [ConcreteVarDecl] $i$generator +# 526| Type = IndexingIterator> # 526| getPattern(): [NamedPattern] i #-----| getIteratorVar(): [PatternBindingDecl] var ... = ... # 526| getInit(0): [CallExpr] call to makeIterator() @@ -3291,8 +3295,13 @@ cfg.swift: # 529| getBase(): [DeclRefExpr] continuation # 529| getMethodRef(): [DeclRefExpr] finish() # 527| getCapture(0): [CapturedDecl] continuation +# 525| getExpr().getFullyConverted(): [FunctionConversionExpr] (@isolated(any) () async -> ()) ... # 523| getPattern(0): [NamedPattern] stream # 533| getElement(1): [ForEachStmt] for ... in ... { ... } +# 533| getVariable(0): [ConcreteVarDecl] i +# 533| Type = Int +# 533| getVariable(1): [ConcreteVarDecl] $i$generator +# 533| Type = AsyncStream.Iterator # 533| getPattern(): [NamedPattern] i #-----| getIteratorVar(): [PatternBindingDecl] var ... = ... # 533| getInit(0): [CallExpr] call to makeAsyncIterator() @@ -3306,7 +3315,7 @@ cfg.swift: # 533| getBase(): [DeclRefExpr] $i$generator # 533| getBase().getFullyConverted(): [InOutExpr] &... #-----| getMethodRef(): [DeclRefExpr] next() -#-----| getNextCall().getFullyConverted(): [AwaitExpr] await ... +# 533| getNextCall().getFullyConverted(): [AwaitExpr] await ... # 533| getBody(): [BraceStmt] { ... } # 534| getElement(0): [CallExpr] call to print(_:separator:terminator:) # 534| getFunction(): [DeclRefExpr] print(_:separator:terminator:) @@ -3320,14 +3329,6 @@ cfg.swift: # 534| getArgument(2): [Argument] terminator: default terminator # 534| getExpr(): [DefaultArgumentExpr] default terminator # 525| [NilLiteralExpr] nil -# 526| [ConcreteVarDecl] i -# 526| Type = Int -# 526| [ConcreteVarDecl] $i$generator -# 526| Type = IndexingIterator> -# 533| [ConcreteVarDecl] i -# 533| Type = Int -# 533| [ConcreteVarDecl] $i$generator -# 533| Type = AsyncStream.Iterator # 538| [NamedFunction] testNilCoalescing(x:) # 538| InterfaceType = (Int?) -> Int # 538| getParam(0): [ParamDecl] x @@ -5137,7 +5138,6 @@ expressions.swift: # 60| getFunction(): [DeclRefExpr] unsafeFunction(pointer:) # 60| getArgument(0): [Argument] pointer: $0 # 60| getExpr(): [DeclRefExpr] $0 -# 60| getExpr().getFullyConverted(): [FunctionConversionExpr] ((UnsafePointer) throws -> ()) ... # 62| [ClassDecl] FailingToInit # 63| getMember(0): [Initializer] FailingToInit.init(x:) # 63| InterfaceType = (FailingToInit.Type) -> (Int) -> FailingToInit? @@ -5972,12 +5972,12 @@ expressions.swift: # 179| getBody(): [BraceStmt] { ... } # 179| getElement(0): [PatternBindingDecl] var ... = ... # 179| getInit(0): [KeyPathExpr] #keyPath(...) -# 179| getRoot(): [TypeRepr] Int? +# 179| getRoot(): [TypeRepr] Optional # 179| getComponent(0): [KeyPathComponent] KeyPathComponent # 179| getComponent(1): [KeyPathComponent] KeyPathComponent # 179| getPattern(0): [NamedPattern] optForce # 179| [ConcreteVarDecl] optForce -# 179| Type = WritableKeyPath +# 179| Type = WritableKeyPath, Int> # 180| [TopLevelCodeDecl] { ... } # 180| getBody(): [BraceStmt] { ... } # 180| getElement(0): [PatternBindingDecl] var ... = ... @@ -6936,6 +6936,10 @@ statements.swift: # 9| getVariable(0): [ConcreteVarDecl] i # 9| Type = Int # 2| getElement(0): [ForEachStmt] for ... in ... { ... } +# 2| getVariable(0): [ConcreteVarDecl] i +# 2| Type = Int +# 2| getVariable(1): [ConcreteVarDecl] $i$generator +# 2| Type = IndexingIterator> # 2| getPattern(): [NamedPattern] i #-----| getIteratorVar(): [PatternBindingDecl] var ... = ... # 2| getInit(0): [CallExpr] call to makeIterator() @@ -7097,10 +7101,6 @@ statements.swift: # 30| getExpr(): [DefaultArgumentExpr] default separator # 30| getArgument(2): [Argument] terminator: default terminator # 30| getExpr(): [DefaultArgumentExpr] default terminator -# 2| [ConcreteVarDecl] i -# 2| Type = Int -# 2| [ConcreteVarDecl] $i$generator -# 2| Type = IndexingIterator> # 34| [EnumDecl] AnError # 35| getMember(0): [EnumCaseDecl] case ... # 35| getMember(1): [EnumElementDecl] failed @@ -7371,6 +7371,10 @@ statements.swift: # 71| [TopLevelCodeDecl] { ... } # 71| getBody(): [BraceStmt] { ... } # 71| getElement(0): [ForEachStmt] for ... in ... where ... { ... } +# 71| getVariable(0): [ConcreteVarDecl] number +# 71| Type = Int +# 71| getVariable(1): [ConcreteVarDecl] $number$generator +# 71| Type = IndexingIterator<[Int]> # 71| getPattern(): [NamedPattern] number # 71| getWhere(): [BinaryExpr] ... .==(_:_:) ... # 71| getFunction(): [MethodLookupExpr] .==(_:_:) @@ -7401,10 +7405,6 @@ statements.swift: # 71| getBase().getFullyConverted(): [InOutExpr] &... #-----| getMethodRef(): [DeclRefExpr] next() # 71| getBody(): [BraceStmt] { ... } -# 71| [ConcreteVarDecl] number -# 71| Type = Int -# 71| [ConcreteVarDecl] $number$generator -# 71| Type = IndexingIterator<[Int]> # 74| [StructDecl] HasModifyAccessorDecl # 75| getMember(0): [PatternBindingDecl] var ... = ... # 75| getPattern(0): [TypedPattern] ... as ... diff --git a/swift/ql/test/library-tests/controlflow/graph/Cfg.expected b/swift/ql/test/library-tests/controlflow/graph/Cfg.expected index a1c28db69a1e..d2d700b9d5c8 100644 --- a/swift/ql/test/library-tests/controlflow/graph/Cfg.expected +++ b/swift/ql/test/library-tests/controlflow/graph/Cfg.expected @@ -124,10 +124,10 @@ | cfg.swift:40:11:40:11 | "..." | cfg.swift:40:11:40:11 | (Any) ... | | | cfg.swift:40:11:40:11 | (Any) ... | cfg.swift:40:11:40:11 | [...] | | | cfg.swift:40:11:40:11 | OpaqueValueExpr | cfg.swift:40:12:40:12 | .appendLiteral(_:) | | -| cfg.swift:40:11:40:11 | TapExpr | cfg.swift:40:11:40:11 | "..." | | | cfg.swift:40:11:40:11 | Unknown error | cfg.swift:40:12:40:11 | call to appendLiteral(_:) | | | cfg.swift:40:11:40:11 | [...] | cfg.swift:40:10:40:10 | default separator | | | cfg.swift:40:11:40:11 | [...] | cfg.swift:40:11:40:11 | [...] | | +| cfg.swift:40:11:40:34 | TapExpr | cfg.swift:40:11:40:11 | "..." | | | cfg.swift:40:12:40:11 | call to appendLiteral(_:) | cfg.swift:40:27:40:27 | .appendInterpolation(_:) | | | cfg.swift:40:12:40:12 | $interpolation | cfg.swift:40:12:40:12 | &... | | | cfg.swift:40:12:40:12 | &... | cfg.swift:40:11:40:11 | Unknown error | | @@ -141,7 +141,7 @@ | cfg.swift:40:34:40:34 | $interpolation | cfg.swift:40:34:40:34 | &... | | | cfg.swift:40:34:40:34 | &... | cfg.swift:40:34:40:34 | | | | cfg.swift:40:34:40:34 | .appendLiteral(_:) | cfg.swift:40:34:40:34 | $interpolation | | -| cfg.swift:40:34:40:34 | call to appendLiteral(_:) | cfg.swift:40:11:40:11 | TapExpr | | +| cfg.swift:40:34:40:34 | call to appendLiteral(_:) | cfg.swift:40:11:40:34 | TapExpr | | | cfg.swift:42:3:42:10 | return ... | cfg.swift:26:1:43:1 | exit tryCatch(x:) (normal) | return | | cfg.swift:42:10:42:10 | 0 | cfg.swift:42:3:42:10 | return ... | | | cfg.swift:45:1:49:1 | createClosure1(s:) | cfg.swift:45:21:45:25 | s | | @@ -899,7 +899,7 @@ | cfg.swift:263:10:263:10 | | cfg.swift:263:11:263:10 | call to appendLiteral(_:) | | | cfg.swift:263:10:263:10 | "..." | cfg.swift:263:3:263:10 | return ... | | | cfg.swift:263:10:263:10 | OpaqueValueExpr | cfg.swift:263:11:263:11 | .appendLiteral(_:) | | -| cfg.swift:263:10:263:10 | TapExpr | cfg.swift:263:10:263:10 | "..." | | +| cfg.swift:263:10:263:79 | TapExpr | cfg.swift:263:10:263:10 | "..." | | | cfg.swift:263:11:263:10 | call to appendLiteral(_:) | cfg.swift:263:12:263:12 | .appendInterpolation(_:) | | | cfg.swift:263:11:263:11 | $interpolation | cfg.swift:263:11:263:11 | &... | | | cfg.swift:263:11:263:11 | &... | cfg.swift:263:10:263:10 | | | @@ -948,7 +948,7 @@ | cfg.swift:263:79:263:79 | $interpolation | cfg.swift:263:79:263:79 | &... | | | cfg.swift:263:79:263:79 | &... | cfg.swift:263:79:263:79 | | | | cfg.swift:263:79:263:79 | .appendLiteral(_:) | cfg.swift:263:79:263:79 | $interpolation | | -| cfg.swift:263:79:263:79 | call to appendLiteral(_:) | cfg.swift:263:10:263:10 | TapExpr | | +| cfg.swift:263:79:263:79 | call to appendLiteral(_:) | cfg.swift:263:10:263:79 | TapExpr | | | cfg.swift:266:1:297:1 | enter testSubscriptExpr() | cfg.swift:266:1:297:1 | testSubscriptExpr() | | | cfg.swift:266:1:297:1 | exit testSubscriptExpr() (normal) | cfg.swift:266:1:297:1 | exit testSubscriptExpr() | | | cfg.swift:266:1:297:1 | testSubscriptExpr() | cfg.swift:267:7:267:7 | a | | @@ -2010,9 +2010,10 @@ | cfg.swift:525:13:525:18 | .detached(priority:operation:) | cfg.swift:525:13:525:13 | Task<(), Never>.Type | | | cfg.swift:525:13:530:13 | call to detached(priority:operation:) | cfg.swift:523:78:531:5 | exit { ... } (normal) | | | cfg.swift:525:27:525:27 | default priority | cfg.swift:525:27:530:13 | { ... } | | +| cfg.swift:525:27:530:13 | (@isolated(any) () async -> ()) ... | cfg.swift:525:13:530:13 | call to detached(priority:operation:) | | | cfg.swift:525:27:530:13 | enter { ... } | cfg.swift:525:27:530:13 | { ... } | | | cfg.swift:525:27:530:13 | exit { ... } (normal) | cfg.swift:525:27:530:13 | exit { ... } | | -| cfg.swift:525:27:530:13 | { ... } | cfg.swift:525:13:530:13 | call to detached(priority:operation:) | | +| cfg.swift:525:27:530:13 | { ... } | cfg.swift:525:27:530:13 | (@isolated(any) () async -> ()) ... | | | cfg.swift:525:27:530:13 | { ... } | cfg.swift:526:26:526:26 | $i$generator | | | cfg.swift:526:17:526:17 | $i$generator | cfg.swift:526:17:526:17 | &... | | | cfg.swift:526:17:526:17 | &... | cfg.swift:526:17:526:17 | call to next() | | @@ -2039,7 +2040,8 @@ | cfg.swift:533:5:533:5 | $i$generator | cfg.swift:533:5:533:5 | &... | | | cfg.swift:533:5:533:5 | &... | cfg.swift:533:5:533:5 | call to next() | | | cfg.swift:533:5:533:5 | .next() | cfg.swift:533:5:533:5 | $i$generator | | -| cfg.swift:533:5:533:5 | call to next() | file://:0:0:0:0 | await ... | | +| cfg.swift:533:5:533:5 | await ... | cfg.swift:533:5:535:5 | for ... in ... { ... } | | +| cfg.swift:533:5:533:5 | call to next() | cfg.swift:533:5:533:5 | await ... | | | cfg.swift:533:5:535:5 | for ... in ... { ... } | cfg.swift:522:1:536:1 | exit testAsyncFor() (normal) | empty | | cfg.swift:533:5:535:5 | for ... in ... { ... } | cfg.swift:533:19:533:19 | i | non-empty | | cfg.swift:533:19:533:19 | i | cfg.swift:534:9:534:9 | print(_:separator:terminator:) | match | @@ -2252,7 +2254,6 @@ | file://:0:0:0:0 | .x | file://:0:0:0:0 | value | | | file://:0:0:0:0 | .x | file://:0:0:0:0 | value | | | file://:0:0:0:0 | KeyPathComponent | cfg.swift:459:22:459:31 | #keyPath(...) | | -| file://:0:0:0:0 | await ... | cfg.swift:533:5:535:5 | for ... in ... { ... } | | | file://:0:0:0:0 | getter for .b | file://:0:0:0:0 | &... | | | file://:0:0:0:0 | getter for .bs | file://:0:0:0:0 | &... | | | file://:0:0:0:0 | getter for .field | file://:0:0:0:0 | &... | | diff --git a/swift/ql/test/library-tests/dataflow/dataflow/DataFlow.expected b/swift/ql/test/library-tests/dataflow/dataflow/DataFlow.expected index 9bf79af11d9c..bf6376bb0a1f 100644 --- a/swift/ql/test/library-tests/dataflow/dataflow/DataFlow.expected +++ b/swift/ql/test/library-tests/dataflow/dataflow/DataFlow.expected @@ -135,6 +135,40 @@ edges | test2.swift:69:10:69:10 | key | test2.swift:70:19:70:19 | key | provenance | | | test2.swift:69:25:69:25 | call to makeIterator() [Collection element, Tuple element at index 0] | test2.swift:69:5:69:5 | $generator [Collection element, Tuple element at index 0] | provenance | | | test2.swift:69:25:69:25 | d4 [Collection element, Tuple element at index 0] | test2.swift:69:25:69:25 | call to makeIterator() [Collection element, Tuple element at index 0] | provenance | | +| test2.swift:76:14:76:47 | [...] [Collection element] | test2.swift:78:14:78:14 | a1 [Collection element] | provenance | | +| test2.swift:76:14:76:47 | [...] [Collection element] | test2.swift:82:19:82:19 | a1 [Collection element] | provenance | | +| test2.swift:76:14:76:47 | [...] [Collection element] | test2.swift:84:20:84:20 | a1 [Collection element] | provenance | | +| test2.swift:76:30:76:46 | call to source(_:) | test2.swift:76:14:76:47 | [...] [Collection element] | provenance | | +| test2.swift:78:5:78:5 | $v$generator [Collection element] | test2.swift:78:5:78:5 | call to next() [some:0] | provenance | | +| test2.swift:78:5:78:5 | call to next() [some:0] | test2.swift:78:9:78:9 | v | provenance | | +| test2.swift:78:9:78:9 | v | test2.swift:79:19:79:19 | v | provenance | | +| test2.swift:78:14:78:14 | a1 [Collection element] | test2.swift:78:14:78:14 | call to makeIterator() [Collection element] | provenance | | +| test2.swift:78:14:78:14 | call to makeIterator() [Collection element] | test2.swift:78:5:78:5 | $v$generator [Collection element] | provenance | | +| test2.swift:82:19:82:19 | a1 [Collection element] | test2.swift:82:19:82:24 | ...[...] | provenance | | +| test2.swift:84:5:84:5 | $generator [Collection element, Tuple element at index 1] | test2.swift:84:5:84:5 | call to next() [some:0, Tuple element at index 1] | provenance | | +| test2.swift:84:5:84:5 | call to next() [some:0, Tuple element at index 1] | test2.swift:84:9:84:15 | (...) [Tuple element at index 1] | provenance | | +| test2.swift:84:9:84:15 | (...) [Tuple element at index 1] | test2.swift:84:14:84:14 | v | provenance | | +| test2.swift:84:14:84:14 | v | test2.swift:86:19:86:19 | v | provenance | | +| test2.swift:84:20:84:20 | a1 [Collection element] | test2.swift:84:20:84:34 | call to enumerated() [Collection element, Tuple element at index 1] | provenance | | +| test2.swift:84:20:84:34 | call to enumerated() [Collection element, Tuple element at index 1] | test2.swift:84:20:84:34 | call to makeIterator() [Collection element, Tuple element at index 1] | provenance | | +| test2.swift:84:20:84:34 | call to makeIterator() [Collection element, Tuple element at index 1] | test2.swift:84:5:84:5 | $generator [Collection element, Tuple element at index 1] | provenance | | +| test2.swift:93:5:93:5 | [post] a2 [Collection element] | test2.swift:95:14:95:14 | a2 [Collection element] | provenance | | +| test2.swift:93:5:93:5 | [post] a2 [Collection element] | test2.swift:99:19:99:19 | a2 [Collection element] | provenance | | +| test2.swift:93:5:93:5 | [post] a2 [Collection element] | test2.swift:101:20:101:20 | a2 [Collection element] | provenance | | +| test2.swift:93:13:93:29 | call to source(_:) | test2.swift:93:5:93:5 | [post] a2 [Collection element] | provenance | | +| test2.swift:95:5:95:5 | $v$generator [Collection element] | test2.swift:95:5:95:5 | call to next() [some:0] | provenance | | +| test2.swift:95:5:95:5 | call to next() [some:0] | test2.swift:95:9:95:9 | v | provenance | | +| test2.swift:95:9:95:9 | v | test2.swift:96:19:96:19 | v | provenance | | +| test2.swift:95:14:95:14 | a2 [Collection element] | test2.swift:95:14:95:14 | call to makeIterator() [Collection element] | provenance | | +| test2.swift:95:14:95:14 | call to makeIterator() [Collection element] | test2.swift:95:5:95:5 | $v$generator [Collection element] | provenance | | +| test2.swift:99:19:99:19 | a2 [Collection element] | test2.swift:99:19:99:24 | ...[...] | provenance | | +| test2.swift:101:5:101:5 | $generator [Collection element, Tuple element at index 1] | test2.swift:101:5:101:5 | call to next() [some:0, Tuple element at index 1] | provenance | | +| test2.swift:101:5:101:5 | call to next() [some:0, Tuple element at index 1] | test2.swift:101:9:101:15 | (...) [Tuple element at index 1] | provenance | | +| test2.swift:101:9:101:15 | (...) [Tuple element at index 1] | test2.swift:101:14:101:14 | v | provenance | | +| test2.swift:101:14:101:14 | v | test2.swift:103:19:103:19 | v | provenance | | +| test2.swift:101:20:101:20 | a2 [Collection element] | test2.swift:101:20:101:34 | call to enumerated() [Collection element, Tuple element at index 1] | provenance | | +| test2.swift:101:20:101:34 | call to enumerated() [Collection element, Tuple element at index 1] | test2.swift:101:20:101:34 | call to makeIterator() [Collection element, Tuple element at index 1] | provenance | | +| test2.swift:101:20:101:34 | call to makeIterator() [Collection element, Tuple element at index 1] | test2.swift:101:5:101:5 | $generator [Collection element, Tuple element at index 1] | provenance | | | test.swift:6:19:6:26 | call to source() | test.swift:7:15:7:15 | t1 | provenance | | | test.swift:6:19:6:26 | call to source() | test.swift:9:15:9:15 | t1 | provenance | | | test.swift:6:19:6:26 | call to source() | test.swift:10:15:10:15 | t2 | provenance | | @@ -890,6 +924,42 @@ nodes | test2.swift:69:25:69:25 | call to makeIterator() [Collection element, Tuple element at index 0] | semmle.label | call to makeIterator() [Collection element, Tuple element at index 0] | | test2.swift:69:25:69:25 | d4 [Collection element, Tuple element at index 0] | semmle.label | d4 [Collection element, Tuple element at index 0] | | test2.swift:70:19:70:19 | key | semmle.label | key | +| test2.swift:76:14:76:47 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| test2.swift:76:30:76:46 | call to source(_:) | semmle.label | call to source(_:) | +| test2.swift:78:5:78:5 | $v$generator [Collection element] | semmle.label | $v$generator [Collection element] | +| test2.swift:78:5:78:5 | call to next() [some:0] | semmle.label | call to next() [some:0] | +| test2.swift:78:9:78:9 | v | semmle.label | v | +| test2.swift:78:14:78:14 | a1 [Collection element] | semmle.label | a1 [Collection element] | +| test2.swift:78:14:78:14 | call to makeIterator() [Collection element] | semmle.label | call to makeIterator() [Collection element] | +| test2.swift:79:19:79:19 | v | semmle.label | v | +| test2.swift:82:19:82:19 | a1 [Collection element] | semmle.label | a1 [Collection element] | +| test2.swift:82:19:82:24 | ...[...] | semmle.label | ...[...] | +| test2.swift:84:5:84:5 | $generator [Collection element, Tuple element at index 1] | semmle.label | $generator [Collection element, Tuple element at index 1] | +| test2.swift:84:5:84:5 | call to next() [some:0, Tuple element at index 1] | semmle.label | call to next() [some:0, Tuple element at index 1] | +| test2.swift:84:9:84:15 | (...) [Tuple element at index 1] | semmle.label | (...) [Tuple element at index 1] | +| test2.swift:84:14:84:14 | v | semmle.label | v | +| test2.swift:84:20:84:20 | a1 [Collection element] | semmle.label | a1 [Collection element] | +| test2.swift:84:20:84:34 | call to enumerated() [Collection element, Tuple element at index 1] | semmle.label | call to enumerated() [Collection element, Tuple element at index 1] | +| test2.swift:84:20:84:34 | call to makeIterator() [Collection element, Tuple element at index 1] | semmle.label | call to makeIterator() [Collection element, Tuple element at index 1] | +| test2.swift:86:19:86:19 | v | semmle.label | v | +| test2.swift:93:5:93:5 | [post] a2 [Collection element] | semmle.label | [post] a2 [Collection element] | +| test2.swift:93:13:93:29 | call to source(_:) | semmle.label | call to source(_:) | +| test2.swift:95:5:95:5 | $v$generator [Collection element] | semmle.label | $v$generator [Collection element] | +| test2.swift:95:5:95:5 | call to next() [some:0] | semmle.label | call to next() [some:0] | +| test2.swift:95:9:95:9 | v | semmle.label | v | +| test2.swift:95:14:95:14 | a2 [Collection element] | semmle.label | a2 [Collection element] | +| test2.swift:95:14:95:14 | call to makeIterator() [Collection element] | semmle.label | call to makeIterator() [Collection element] | +| test2.swift:96:19:96:19 | v | semmle.label | v | +| test2.swift:99:19:99:19 | a2 [Collection element] | semmle.label | a2 [Collection element] | +| test2.swift:99:19:99:24 | ...[...] | semmle.label | ...[...] | +| test2.swift:101:5:101:5 | $generator [Collection element, Tuple element at index 1] | semmle.label | $generator [Collection element, Tuple element at index 1] | +| test2.swift:101:5:101:5 | call to next() [some:0, Tuple element at index 1] | semmle.label | call to next() [some:0, Tuple element at index 1] | +| test2.swift:101:9:101:15 | (...) [Tuple element at index 1] | semmle.label | (...) [Tuple element at index 1] | +| test2.swift:101:14:101:14 | v | semmle.label | v | +| test2.swift:101:20:101:20 | a2 [Collection element] | semmle.label | a2 [Collection element] | +| test2.swift:101:20:101:34 | call to enumerated() [Collection element, Tuple element at index 1] | semmle.label | call to enumerated() [Collection element, Tuple element at index 1] | +| test2.swift:101:20:101:34 | call to makeIterator() [Collection element, Tuple element at index 1] | semmle.label | call to makeIterator() [Collection element, Tuple element at index 1] | +| test2.swift:103:19:103:19 | v | semmle.label | v | | test.swift:6:19:6:26 | call to source() | semmle.label | call to source() | | test.swift:7:15:7:15 | t1 | semmle.label | t1 | | test.swift:9:15:9:15 | t1 | semmle.label | t1 | @@ -1627,6 +1697,12 @@ subpaths | test2.swift:53:15:53:28 | ... ??(_:_:) ... | test2.swift:46:17:46:33 | call to source(_:) | test2.swift:53:15:53:28 | ... ??(_:_:) ... | result | | test2.swift:54:15:54:24 | ...! | test2.swift:46:17:46:33 | call to source(_:) | test2.swift:54:15:54:24 | ...! | result | | test2.swift:70:19:70:19 | key | test2.swift:60:8:60:24 | call to source(_:) | test2.swift:70:19:70:19 | key | result | +| test2.swift:79:19:79:19 | v | test2.swift:76:30:76:46 | call to source(_:) | test2.swift:79:19:79:19 | v | result | +| test2.swift:82:19:82:24 | ...[...] | test2.swift:76:30:76:46 | call to source(_:) | test2.swift:82:19:82:24 | ...[...] | result | +| test2.swift:86:19:86:19 | v | test2.swift:76:30:76:46 | call to source(_:) | test2.swift:86:19:86:19 | v | result | +| test2.swift:96:19:96:19 | v | test2.swift:93:13:93:29 | call to source(_:) | test2.swift:96:19:96:19 | v | result | +| test2.swift:99:19:99:24 | ...[...] | test2.swift:93:13:93:29 | call to source(_:) | test2.swift:99:19:99:24 | ...[...] | result | +| test2.swift:103:19:103:19 | v | test2.swift:93:13:93:29 | call to source(_:) | test2.swift:103:19:103:19 | v | result | | test.swift:7:15:7:15 | t1 | test.swift:6:19:6:26 | call to source() | test.swift:7:15:7:15 | t1 | result | | test.swift:9:15:9:15 | t1 | test.swift:6:19:6:26 | call to source() | test.swift:9:15:9:15 | t1 | result | | test.swift:10:15:10:15 | t2 | test.swift:6:19:6:26 | call to source() | test.swift:10:15:10:15 | t2 | result | diff --git a/swift/ql/test/library-tests/dataflow/dataflow/LocalFlow.expected b/swift/ql/test/library-tests/dataflow/dataflow/LocalFlow.expected index de168973ec84..7ec3f1a5aa48 100644 --- a/swift/ql/test/library-tests/dataflow/dataflow/LocalFlow.expected +++ b/swift/ql/test/library-tests/dataflow/dataflow/LocalFlow.expected @@ -161,6 +161,87 @@ | test2.swift:69:25:69:25 | $generator | test2.swift:69:25:69:25 | SSA def($generator) | | test2.swift:69:25:69:25 | SSA def($generator) | test2.swift:69:5:69:5 | $generator | | test2.swift:69:25:69:25 | call to makeIterator() | test2.swift:69:25:69:25 | $generator | +| test2.swift:76:9:76:9 | SSA def(a1) | test2.swift:78:14:78:14 | a1 | +| test2.swift:76:9:76:9 | a1 | test2.swift:76:9:76:9 | SSA def(a1) | +| test2.swift:76:14:76:47 | [...] | test2.swift:76:9:76:9 | a1 | +| test2.swift:78:5:78:5 | $v$generator | test2.swift:78:5:78:5 | &... | +| test2.swift:78:5:78:5 | &... | test2.swift:78:5:78:5 | $v$generator | +| test2.swift:78:5:78:5 | [post] $v$generator | test2.swift:78:5:78:5 | &... | +| test2.swift:78:9:78:9 | SSA def(v) | test2.swift:79:19:79:19 | v | +| test2.swift:78:9:78:9 | v | test2.swift:78:9:78:9 | SSA def(v) | +| test2.swift:78:14:78:14 | $v$generator | test2.swift:78:14:78:14 | SSA def($v$generator) | +| test2.swift:78:14:78:14 | SSA def($v$generator) | test2.swift:78:5:78:5 | $v$generator | +| test2.swift:78:14:78:14 | [post] a1 | test2.swift:81:21:81:21 | a1 | +| test2.swift:78:14:78:14 | a1 | test2.swift:81:21:81:21 | a1 | +| test2.swift:78:14:78:14 | call to makeIterator() | test2.swift:78:14:78:14 | $v$generator | +| test2.swift:81:5:81:5 | $ix$generator | test2.swift:81:5:81:5 | &... | +| test2.swift:81:5:81:5 | &... | test2.swift:81:5:81:5 | $ix$generator | +| test2.swift:81:5:81:5 | [post] $ix$generator | test2.swift:81:5:81:5 | &... | +| test2.swift:81:9:81:9 | SSA def(ix) | test2.swift:82:22:82:22 | ix | +| test2.swift:81:9:81:9 | ix | test2.swift:81:9:81:9 | SSA def(ix) | +| test2.swift:81:15:81:15 | $ix$generator | test2.swift:81:15:81:15 | SSA def($ix$generator) | +| test2.swift:81:15:81:15 | SSA def($ix$generator) | test2.swift:81:5:81:5 | $ix$generator | +| test2.swift:81:15:81:24 | call to makeIterator() | test2.swift:81:15:81:15 | $ix$generator | +| test2.swift:81:21:81:21 | [post] a1 | test2.swift:82:19:82:19 | a1 | +| test2.swift:81:21:81:21 | [post] a1 | test2.swift:84:20:84:20 | a1 | +| test2.swift:81:21:81:21 | a1 | test2.swift:82:19:82:19 | a1 | +| test2.swift:81:21:81:21 | a1 | test2.swift:84:20:84:20 | a1 | +| test2.swift:82:19:82:19 | &... | test2.swift:82:19:82:19 | a1 | +| test2.swift:82:19:82:19 | &... | test2.swift:84:20:84:20 | a1 | +| test2.swift:82:19:82:19 | [post] a1 | test2.swift:82:19:82:19 | &... | +| test2.swift:82:19:82:19 | a1 | test2.swift:82:19:82:19 | &... | +| test2.swift:84:5:84:5 | $generator | test2.swift:84:5:84:5 | &... | +| test2.swift:84:5:84:5 | &... | test2.swift:84:5:84:5 | $generator | +| test2.swift:84:5:84:5 | [post] $generator | test2.swift:84:5:84:5 | &... | +| test2.swift:84:10:84:10 | SSA def(ix) | test2.swift:85:19:85:19 | ix | +| test2.swift:84:10:84:10 | ix | test2.swift:84:10:84:10 | SSA def(ix) | +| test2.swift:84:14:84:14 | SSA def(v) | test2.swift:86:19:86:19 | v | +| test2.swift:84:14:84:14 | v | test2.swift:84:14:84:14 | SSA def(v) | +| test2.swift:84:20:84:20 | $generator | test2.swift:84:20:84:20 | SSA def($generator) | +| test2.swift:84:20:84:20 | SSA def($generator) | test2.swift:84:5:84:5 | $generator | +| test2.swift:84:20:84:34 | call to makeIterator() | test2.swift:84:20:84:20 | $generator | +| test2.swift:91:9:91:9 | SSA def(a2) | test2.swift:93:5:93:5 | a2 | +| test2.swift:91:9:91:9 | a2 | test2.swift:91:9:91:9 | SSA def(a2) | +| test2.swift:91:14:91:33 | [...] | test2.swift:91:9:91:9 | a2 | +| test2.swift:93:5:93:5 | &... | test2.swift:95:14:95:14 | a2 | +| test2.swift:93:5:93:5 | [post] a2 | test2.swift:93:5:93:5 | &... | +| test2.swift:93:5:93:5 | a2 | test2.swift:93:5:93:5 | &... | +| test2.swift:95:5:95:5 | $v$generator | test2.swift:95:5:95:5 | &... | +| test2.swift:95:5:95:5 | &... | test2.swift:95:5:95:5 | $v$generator | +| test2.swift:95:5:95:5 | [post] $v$generator | test2.swift:95:5:95:5 | &... | +| test2.swift:95:9:95:9 | SSA def(v) | test2.swift:96:19:96:19 | v | +| test2.swift:95:9:95:9 | v | test2.swift:95:9:95:9 | SSA def(v) | +| test2.swift:95:14:95:14 | $v$generator | test2.swift:95:14:95:14 | SSA def($v$generator) | +| test2.swift:95:14:95:14 | SSA def($v$generator) | test2.swift:95:5:95:5 | $v$generator | +| test2.swift:95:14:95:14 | [post] a2 | test2.swift:98:21:98:21 | a2 | +| test2.swift:95:14:95:14 | a2 | test2.swift:98:21:98:21 | a2 | +| test2.swift:95:14:95:14 | call to makeIterator() | test2.swift:95:14:95:14 | $v$generator | +| test2.swift:98:5:98:5 | $ix$generator | test2.swift:98:5:98:5 | &... | +| test2.swift:98:5:98:5 | &... | test2.swift:98:5:98:5 | $ix$generator | +| test2.swift:98:5:98:5 | [post] $ix$generator | test2.swift:98:5:98:5 | &... | +| test2.swift:98:9:98:9 | SSA def(ix) | test2.swift:99:22:99:22 | ix | +| test2.swift:98:9:98:9 | ix | test2.swift:98:9:98:9 | SSA def(ix) | +| test2.swift:98:15:98:15 | $ix$generator | test2.swift:98:15:98:15 | SSA def($ix$generator) | +| test2.swift:98:15:98:15 | SSA def($ix$generator) | test2.swift:98:5:98:5 | $ix$generator | +| test2.swift:98:15:98:24 | call to makeIterator() | test2.swift:98:15:98:15 | $ix$generator | +| test2.swift:98:21:98:21 | [post] a2 | test2.swift:99:19:99:19 | a2 | +| test2.swift:98:21:98:21 | [post] a2 | test2.swift:101:20:101:20 | a2 | +| test2.swift:98:21:98:21 | a2 | test2.swift:99:19:99:19 | a2 | +| test2.swift:98:21:98:21 | a2 | test2.swift:101:20:101:20 | a2 | +| test2.swift:99:19:99:19 | &... | test2.swift:99:19:99:19 | a2 | +| test2.swift:99:19:99:19 | &... | test2.swift:101:20:101:20 | a2 | +| test2.swift:99:19:99:19 | [post] a2 | test2.swift:99:19:99:19 | &... | +| test2.swift:99:19:99:19 | a2 | test2.swift:99:19:99:19 | &... | +| test2.swift:101:5:101:5 | $generator | test2.swift:101:5:101:5 | &... | +| test2.swift:101:5:101:5 | &... | test2.swift:101:5:101:5 | $generator | +| test2.swift:101:5:101:5 | [post] $generator | test2.swift:101:5:101:5 | &... | +| test2.swift:101:10:101:10 | SSA def(ix) | test2.swift:102:19:102:19 | ix | +| test2.swift:101:10:101:10 | ix | test2.swift:101:10:101:10 | SSA def(ix) | +| test2.swift:101:14:101:14 | SSA def(v) | test2.swift:103:19:103:19 | v | +| test2.swift:101:14:101:14 | v | test2.swift:101:14:101:14 | SSA def(v) | +| test2.swift:101:20:101:20 | $generator | test2.swift:101:20:101:20 | SSA def($generator) | +| test2.swift:101:20:101:20 | SSA def($generator) | test2.swift:101:5:101:5 | $generator | +| test2.swift:101:20:101:34 | call to makeIterator() | test2.swift:101:20:101:20 | $generator | | test.swift:5:9:5:13 | ... as ... | test.swift:5:9:5:9 | t2 | | test.swift:6:9:6:9 | SSA def(t1) | test.swift:7:15:7:15 | t1 | | test.swift:6:9:6:9 | t1 | test.swift:6:9:6:9 | SSA def(t1) | diff --git a/swift/ql/test/library-tests/dataflow/dataflow/test2.swift b/swift/ql/test/library-tests/dataflow/dataflow/test2.swift index cb8bdf164287..f0356f4dd227 100644 --- a/swift/ql/test/library-tests/dataflow/dataflow/test2.swift +++ b/swift/ql/test/library-tests/dataflow/dataflow/test2.swift @@ -1,5 +1,5 @@ func source(_ label: String) -> String { return ""; } -func sink(arg: String) {} +func sink(arg: T) {} func testDicts() { let d1 = ["a": "apple", "b": "banana", "c": source("source1")] @@ -71,3 +71,35 @@ func testDicts4() { sink(arg: value) } } + +func testArrays1() { + var a1 = ["a", "b", "c", source("source5")] + + for v in a1 { + sink(arg: v) // $ flow=source5 + } + for ix in 0 ..< a1.count { + sink(arg: a1[ix]) // $ flow=source5 + } + for (ix, v) in a1.enumerated() { + sink(arg: ix) + sink(arg: v) // $ flow=source5 + } +} + +func testArrays2() { + var a2 = ["a", "b", "c", "d"] + + a2[1] = source("source6") + + for v in a2 { + sink(arg: v) // $ flow=source6 + } + for ix in 0 ..< a2.count { + sink(arg: a2[ix]) // $ flow=source6 + } + for (ix, v) in a2.enumerated() { + sink(arg: ix) + sink(arg: v) // $ flow=source6 + } +} diff --git a/swift/ql/test/library-tests/dataflow/taint/core/LocalTaint.expected b/swift/ql/test/library-tests/dataflow/taint/core/LocalTaint.expected index 965e47b2d786..f73a66fa761b 100644 --- a/swift/ql/test/library-tests/dataflow/taint/core/LocalTaint.expected +++ b/swift/ql/test/library-tests/dataflow/taint/core/LocalTaint.expected @@ -17,259 +17,295 @@ | conversions.swift:25:33:25:33 | self | conversions.swift:25:33:25:33 | SSA def(self) | | conversions.swift:26:22:26:22 | SSA def(self) | conversions.swift:26:22:26:38 | self[return] | | conversions.swift:26:22:26:22 | self | conversions.swift:26:22:26:22 | SSA def(self) | -| conversions.swift:33:16:33:26 | call to sourceInt() | conversions.swift:33:12:33:27 | call to Self.init(_:) | -| conversions.swift:34:18:34:28 | call to sourceInt() | conversions.swift:34:12:34:29 | call to Self.init(_:) | -| conversions.swift:35:18:35:28 | call to sourceInt() | conversions.swift:35:12:35:29 | call to Float.init(_:) | -| conversions.swift:36:19:36:29 | call to sourceInt() | conversions.swift:36:12:36:30 | call to String.init(_:) | -| conversions.swift:37:12:37:30 | call to String.init(_:) | conversions.swift:37:12:37:32 | .utf8 | -| conversions.swift:37:19:37:29 | call to sourceInt() | conversions.swift:37:12:37:30 | call to String.init(_:) | -| conversions.swift:39:6:39:6 | SSA def(arr) | conversions.swift:40:12:40:12 | arr | -| conversions.swift:39:6:39:6 | arr | conversions.swift:39:6:39:6 | SSA def(arr) | -| conversions.swift:39:12:39:30 | [...] | conversions.swift:39:6:39:6 | arr | -| conversions.swift:40:12:40:12 | arr | conversions.swift:41:12:41:12 | arr | -| conversions.swift:41:12:41:12 | [post] arr | conversions.swift:42:20:42:20 | arr | -| conversions.swift:41:12:41:12 | arr | conversions.swift:41:12:41:17 | ...[...] | -| conversions.swift:41:12:41:12 | arr | conversions.swift:42:20:42:20 | arr | -| conversions.swift:42:20:42:20 | arr | conversions.swift:43:20:43:20 | arr | -| conversions.swift:43:12:43:23 | call to Array.init(_:) | conversions.swift:43:12:43:26 | ...[...] | -| conversions.swift:44:20:44:33 | call to sourceString() | conversions.swift:44:20:44:35 | .utf8 | -| conversions.swift:45:12:45:39 | call to Array.init(_:) | conversions.swift:45:12:45:42 | ...[...] | -| conversions.swift:45:20:45:33 | call to sourceString() | conversions.swift:45:20:45:35 | .utf8 | -| conversions.swift:47:5:47:9 | let ...? | conversions.swift:47:9:47:9 | v | -| conversions.swift:47:9:47:9 | SSA def(v) | conversions.swift:48:13:48:13 | v | -| conversions.swift:47:9:47:9 | v | conversions.swift:47:9:47:9 | SSA def(v) | -| conversions.swift:47:13:47:23 | call to sourceInt() | conversions.swift:47:5:47:9 | let ...? | -| conversions.swift:51:6:51:6 | SSA def(v2) | conversions.swift:52:12:52:12 | v2 | -| conversions.swift:51:6:51:6 | v2 | conversions.swift:51:6:51:6 | SSA def(v2) | -| conversions.swift:51:6:51:10 | ... as ... | conversions.swift:51:6:51:6 | v2 | -| conversions.swift:51:18:51:41 | call to numericCast(_:) | conversions.swift:51:6:51:10 | ... as ... | -| conversions.swift:51:30:51:40 | call to sourceInt() | conversions.swift:51:18:51:41 | call to numericCast(_:) | -| conversions.swift:54:6:54:6 | SSA def(v4) | conversions.swift:55:12:55:12 | v4 | -| conversions.swift:54:6:54:6 | v4 | conversions.swift:54:6:54:6 | SSA def(v4) | -| conversions.swift:54:6:54:10 | ... as ... | conversions.swift:54:6:54:6 | v4 | -| conversions.swift:54:17:54:57 | call to unsafeBitCast(_:to:) | conversions.swift:54:6:54:10 | ... as ... | -| conversions.swift:54:31:54:41 | call to sourceInt() | conversions.swift:54:17:54:57 | call to unsafeBitCast(_:to:) | -| conversions.swift:57:6:57:6 | SSA def(v5) | conversions.swift:58:12:58:12 | v5 | -| conversions.swift:57:6:57:6 | v5 | conversions.swift:57:6:57:6 | SSA def(v5) | -| conversions.swift:57:11:57:47 | call to Self.init(truncatingIfNeeded:) | conversions.swift:57:6:57:6 | v5 | -| conversions.swift:57:36:57:46 | call to sourceInt() | conversions.swift:57:11:57:47 | call to Self.init(truncatingIfNeeded:) | -| conversions.swift:60:6:60:6 | SSA def(v6) | conversions.swift:61:12:61:12 | v6 | -| conversions.swift:60:6:60:6 | v6 | conversions.swift:60:6:60:6 | SSA def(v6) | -| conversions.swift:60:11:60:39 | call to UInt.init(bitPattern:) | conversions.swift:60:6:60:6 | v6 | -| conversions.swift:60:28:60:38 | call to sourceInt() | conversions.swift:60:11:60:39 | call to UInt.init(bitPattern:) | -| conversions.swift:63:6:63:6 | SSA def(v7) | conversions.swift:64:12:64:12 | v7 | -| conversions.swift:63:6:63:6 | v7 | conversions.swift:63:6:63:6 | SSA def(v7) | -| conversions.swift:63:11:63:26 | call to abs(_:) | conversions.swift:63:6:63:6 | v7 | -| conversions.swift:63:15:63:25 | call to sourceInt() | conversions.swift:63:11:63:26 | call to abs(_:) | -| conversions.swift:66:6:66:6 | SSA def(v8) | conversions.swift:67:12:67:12 | v8 | -| conversions.swift:66:6:66:6 | v8 | conversions.swift:66:6:66:6 | SSA def(v8) | -| conversions.swift:66:18:66:18 | 0 | conversions.swift:66:6:66:6 | v8 | -| conversions.swift:67:12:67:12 | [post] v8 | conversions.swift:68:12:68:12 | v8 | -| conversions.swift:67:12:67:12 | v8 | conversions.swift:68:12:68:12 | v8 | -| conversions.swift:68:12:68:12 | [post] v8 | conversions.swift:69:12:69:12 | v8 | -| conversions.swift:68:12:68:12 | v8 | conversions.swift:68:12:68:29 | call to advanced(by:) | -| conversions.swift:68:12:68:12 | v8 | conversions.swift:69:12:69:12 | v8 | -| conversions.swift:68:28:68:28 | 1 | conversions.swift:68:12:68:29 | call to advanced(by:) | -| conversions.swift:69:12:69:12 | v8 | conversions.swift:69:12:69:39 | call to advanced(by:) | -| conversions.swift:69:28:69:38 | call to sourceInt() | conversions.swift:69:12:69:39 | call to advanced(by:) | -| conversions.swift:71:12:71:36 | call to Self.init(exactly:) | conversions.swift:71:12:71:37 | ...! | -| conversions.swift:72:12:72:39 | call to Self.init(exactly:) | conversions.swift:72:12:72:40 | ...! | -| conversions.swift:73:26:73:36 | call to sourceInt() | conversions.swift:73:12:73:37 | call to Self.init(clamping:) | -| conversions.swift:74:36:74:46 | call to sourceInt() | conversions.swift:74:12:74:47 | call to Self.init(truncatingIfNeeded:) | -| conversions.swift:75:12:75:41 | call to Self.init(_:radix:) | conversions.swift:75:12:75:42 | ...! | -| conversions.swift:77:30:77:40 | call to sourceInt() | conversions.swift:77:12:77:41 | call to Self.init(littleEndian:) | -| conversions.swift:78:27:78:37 | call to sourceInt() | conversions.swift:78:12:78:38 | call to Self.init(bigEndian:) | -| conversions.swift:79:12:79:22 | call to sourceInt() | conversions.swift:79:12:79:24 | .littleEndian | -| conversions.swift:80:12:80:22 | call to sourceInt() | conversions.swift:80:12:80:24 | .bigEndian | -| conversions.swift:82:7:82:7 | SSA def(q1) | conversions.swift:83:12:83:12 | q1 | -| conversions.swift:82:7:82:7 | q1 | conversions.swift:82:7:82:7 | SSA def(q1) | -| conversions.swift:82:11:82:11 | SSA def(r1) | conversions.swift:84:12:84:12 | r1 | -| conversions.swift:82:11:82:11 | r1 | conversions.swift:82:11:82:11 | SSA def(r1) | -| conversions.swift:82:17:82:56 | call to quotientAndRemainder(dividingBy:) | conversions.swift:82:6:82:13 | (...) | -| conversions.swift:86:7:86:7 | SSA def(q2) | conversions.swift:87:12:87:12 | q2 | -| conversions.swift:86:7:86:7 | q2 | conversions.swift:86:7:86:7 | SSA def(q2) | -| conversions.swift:86:11:86:11 | SSA def(r2) | conversions.swift:88:12:88:12 | r2 | -| conversions.swift:86:11:86:11 | r2 | conversions.swift:86:11:86:11 | SSA def(r2) | -| conversions.swift:86:17:86:63 | call to quotientAndRemainder(dividingBy:) | conversions.swift:86:6:86:13 | (...) | -| conversions.swift:90:7:90:7 | SSA def(q3) | conversions.swift:91:12:91:12 | q3 | -| conversions.swift:90:7:90:7 | q3 | conversions.swift:90:7:90:7 | SSA def(q3) | -| conversions.swift:90:11:90:11 | SSA def(r3) | conversions.swift:92:12:92:12 | r3 | -| conversions.swift:90:11:90:11 | r3 | conversions.swift:90:11:90:11 | SSA def(r3) | -| conversions.swift:90:17:90:66 | call to quotientAndRemainder(dividingBy:) | conversions.swift:90:6:90:13 | (...) | -| conversions.swift:94:6:94:6 | SSA def(pair1) | conversions.swift:95:12:95:12 | pair1 | -| conversions.swift:94:6:94:6 | pair1 | conversions.swift:94:6:94:6 | SSA def(pair1) | -| conversions.swift:94:14:94:44 | call to addingReportingOverflow(_:) | conversions.swift:94:6:94:6 | pair1 | -| conversions.swift:95:12:95:12 | [post] pair1 | conversions.swift:96:12:96:12 | pair1 | -| conversions.swift:95:12:95:12 | pair1 | conversions.swift:96:12:96:12 | pair1 | -| conversions.swift:98:6:98:6 | SSA def(pair2) | conversions.swift:99:12:99:12 | pair2 | -| conversions.swift:98:6:98:6 | pair2 | conversions.swift:98:6:98:6 | SSA def(pair2) | -| conversions.swift:98:14:98:51 | call to addingReportingOverflow(_:) | conversions.swift:98:6:98:6 | pair2 | -| conversions.swift:99:12:99:12 | [post] pair2 | conversions.swift:100:12:100:12 | pair2 | -| conversions.swift:99:12:99:12 | pair2 | conversions.swift:100:12:100:12 | pair2 | -| conversions.swift:102:6:102:6 | SSA def(pair3) | conversions.swift:103:12:103:12 | pair3 | -| conversions.swift:102:6:102:6 | pair3 | conversions.swift:102:6:102:6 | SSA def(pair3) | -| conversions.swift:102:14:102:54 | call to addingReportingOverflow(_:) | conversions.swift:102:6:102:6 | pair3 | -| conversions.swift:103:12:103:12 | [post] pair3 | conversions.swift:104:12:104:12 | pair3 | -| conversions.swift:103:12:103:12 | pair3 | conversions.swift:104:12:104:12 | pair3 | -| conversions.swift:109:18:109:30 | call to sourceFloat() | conversions.swift:109:12:109:31 | call to Float.init(_:) | -| conversions.swift:110:18:110:30 | call to sourceFloat() | conversions.swift:110:12:110:31 | call to UInt8.init(_:) | -| conversions.swift:111:19:111:31 | call to sourceFloat() | conversions.swift:111:12:111:32 | call to String.init(_:) | -| conversions.swift:112:12:112:32 | call to String.init(_:) | conversions.swift:112:12:112:34 | .utf8 | -| conversions.swift:112:19:112:31 | call to sourceFloat() | conversions.swift:112:12:112:32 | call to String.init(_:) | -| conversions.swift:113:19:113:33 | call to sourceFloat80() | conversions.swift:113:12:113:34 | call to String.init(_:) | -| conversions.swift:114:12:114:34 | call to String.init(_:) | conversions.swift:114:12:114:36 | .utf8 | -| conversions.swift:114:19:114:33 | call to sourceFloat80() | conversions.swift:114:12:114:34 | call to String.init(_:) | -| conversions.swift:115:19:115:32 | call to sourceDouble() | conversions.swift:115:12:115:33 | call to String.init(_:) | -| conversions.swift:116:12:116:33 | call to String.init(_:) | conversions.swift:116:12:116:35 | .utf8 | -| conversions.swift:116:19:116:32 | call to sourceDouble() | conversions.swift:116:12:116:33 | call to String.init(_:) | -| conversions.swift:118:18:118:30 | call to sourceFloat() | conversions.swift:118:12:118:31 | call to Float.init(_:) | -| conversions.swift:119:41:119:51 | call to sourceInt() | conversions.swift:119:12:119:70 | call to Float.init(sign:exponent:significand:) | -| conversions.swift:119:67:119:67 | 0.0 | conversions.swift:119:12:119:70 | call to Float.init(sign:exponent:significand:) | -| conversions.swift:120:41:120:41 | 0 | conversions.swift:120:12:120:70 | call to Float.init(sign:exponent:significand:) | -| conversions.swift:120:57:120:69 | call to sourceFloat() | conversions.swift:120:12:120:70 | call to Float.init(sign:exponent:significand:) | -| conversions.swift:121:54:121:54 | 0.0 | conversions.swift:121:12:121:57 | call to Float.init(signOf:magnitudeOf:) | -| conversions.swift:122:44:122:56 | call to sourceFloat() | conversions.swift:122:12:122:57 | call to Float.init(signOf:magnitudeOf:) | -| conversions.swift:124:12:124:24 | call to sourceFloat() | conversions.swift:124:12:124:26 | .exponent | -| conversions.swift:125:12:125:24 | call to sourceFloat() | conversions.swift:125:12:125:26 | .significand | -| conversions.swift:126:12:126:26 | call to sourceFloat80() | conversions.swift:126:12:126:28 | .exponent | -| conversions.swift:127:12:127:26 | call to sourceFloat80() | conversions.swift:127:12:127:28 | .significand | -| conversions.swift:128:12:128:25 | call to sourceDouble() | conversions.swift:128:12:128:27 | .exponent | -| conversions.swift:129:12:129:25 | call to sourceDouble() | conversions.swift:129:12:129:27 | .significand | -| conversions.swift:130:12:130:23 | call to sourceUInt() | conversions.swift:130:12:130:25 | .byteSwapped | -| conversions.swift:131:12:131:25 | call to sourceUInt64() | conversions.swift:131:12:131:27 | .byteSwapped | -| conversions.swift:136:19:136:32 | call to sourceString() | conversions.swift:136:12:136:33 | call to String.init(_:) | -| conversions.swift:138:6:138:6 | SSA def(ms1) | conversions.swift:139:12:139:12 | ms1 | -| conversions.swift:138:6:138:6 | ms1 | conversions.swift:138:6:138:6 | SSA def(ms1) | -| conversions.swift:138:12:138:26 | call to MyString.init(_:) | conversions.swift:138:12:138:27 | ...! | -| conversions.swift:138:12:138:27 | ...! | conversions.swift:138:6:138:6 | ms1 | -| conversions.swift:138:21:138:21 | abc | conversions.swift:138:12:138:26 | call to MyString.init(_:) | -| conversions.swift:139:12:139:12 | [post] ms1 | conversions.swift:140:12:140:12 | ms1 | -| conversions.swift:139:12:139:12 | ms1 | conversions.swift:140:12:140:12 | ms1 | -| conversions.swift:140:12:140:12 | [post] ms1 | conversions.swift:141:12:141:12 | ms1 | -| conversions.swift:140:12:140:12 | ms1 | conversions.swift:140:12:140:16 | .description | -| conversions.swift:140:12:140:12 | ms1 | conversions.swift:141:12:141:12 | ms1 | -| conversions.swift:141:12:141:12 | [post] ms1 | conversions.swift:142:12:142:12 | ms1 | -| conversions.swift:141:12:141:12 | ms1 | conversions.swift:141:12:141:16 | .debugDescription | -| conversions.swift:141:12:141:12 | ms1 | conversions.swift:142:12:142:12 | ms1 | -| conversions.swift:144:6:144:6 | SSA def(ms2) | conversions.swift:145:12:145:12 | ms2 | -| conversions.swift:144:6:144:6 | ms2 | conversions.swift:144:6:144:6 | SSA def(ms2) | -| conversions.swift:144:12:144:35 | call to MyString.init(_:) | conversions.swift:144:12:144:36 | ...! | -| conversions.swift:144:12:144:36 | ...! | conversions.swift:144:6:144:6 | ms2 | -| conversions.swift:144:21:144:34 | call to sourceString() | conversions.swift:144:12:144:35 | call to MyString.init(_:) | -| conversions.swift:145:12:145:12 | [post] ms2 | conversions.swift:146:12:146:12 | ms2 | -| conversions.swift:145:12:145:12 | ms2 | conversions.swift:146:12:146:12 | ms2 | -| conversions.swift:146:12:146:12 | [post] ms2 | conversions.swift:147:12:147:12 | ms2 | -| conversions.swift:146:12:146:12 | ms2 | conversions.swift:146:12:146:16 | .description | -| conversions.swift:146:12:146:12 | ms2 | conversions.swift:147:12:147:12 | ms2 | -| conversions.swift:147:12:147:12 | [post] ms2 | conversions.swift:148:12:148:12 | ms2 | -| conversions.swift:147:12:147:12 | ms2 | conversions.swift:147:12:147:16 | .debugDescription | -| conversions.swift:147:12:147:12 | ms2 | conversions.swift:148:12:148:12 | ms2 | -| conversions.swift:152:6:152:6 | SSA def(parent) | conversions.swift:153:12:153:12 | parent | -| conversions.swift:152:6:152:6 | parent | conversions.swift:152:6:152:6 | SSA def(parent) | -| conversions.swift:152:6:152:15 | ... as ... | conversions.swift:152:6:152:6 | parent | -| conversions.swift:152:31:152:44 | call to sourceString() | conversions.swift:152:6:152:15 | ... as ... | -| conversions.swift:153:12:153:12 | [post] parent | conversions.swift:154:12:154:12 | parent | -| conversions.swift:153:12:153:12 | parent | conversions.swift:154:12:154:12 | parent | -| conversions.swift:154:12:154:12 | [post] parent | conversions.swift:156:40:156:40 | parent | -| conversions.swift:154:12:154:12 | parent | conversions.swift:156:40:156:40 | parent | -| conversions.swift:156:6:156:6 | SSA def(v3) | conversions.swift:157:12:157:12 | v3 | -| conversions.swift:156:6:156:6 | v3 | conversions.swift:156:6:156:6 | SSA def(v3) | -| conversions.swift:156:6:156:10 | ... as ... | conversions.swift:156:6:156:6 | v3 | -| conversions.swift:156:25:156:69 | call to unsafeDowncast(_:to:) | conversions.swift:156:6:156:10 | ... as ... | -| conversions.swift:156:40:156:40 | parent | conversions.swift:156:25:156:69 | call to unsafeDowncast(_:to:) | -| conversions.swift:157:12:157:12 | [post] v3 | conversions.swift:158:12:158:12 | v3 | -| conversions.swift:157:12:157:12 | v3 | conversions.swift:158:12:158:12 | v3 | -| conversions.swift:165:24:165:24 | myCEnumConst | conversions.swift:165:12:165:36 | call to Self.init(_:) | -| conversions.swift:166:24:166:34 | call to sourceInt() | conversions.swift:166:12:166:35 | call to Self.init(_:) | -| conversions.swift:169:7:169:7 | SSA def(self) | conversions.swift:169:7:169:7 | self[return] | -| conversions.swift:169:7:169:7 | self | conversions.swift:169:7:169:7 | SSA def(self) | -| conversions.swift:170:2:170:2 | SSA def(self) | conversions.swift:170:2:191:2 | self[return] | -| conversions.swift:170:2:170:2 | self | conversions.swift:170:2:170:2 | SSA def(self) | -| conversions.swift:171:7:171:7 | SSA def(arr1) | conversions.swift:173:13:173:13 | arr1 | -| conversions.swift:171:7:171:7 | arr1 | conversions.swift:171:7:171:7 | SSA def(arr1) | -| conversions.swift:171:14:171:33 | call to sourceArray(_:) | conversions.swift:171:7:171:7 | arr1 | -| conversions.swift:172:7:172:7 | SSA def(arr2) | conversions.swift:174:13:174:13 | arr2 | -| conversions.swift:172:7:172:7 | arr2 | conversions.swift:172:7:172:7 | SSA def(arr2) | -| conversions.swift:172:14:172:26 | [...] | conversions.swift:172:7:172:7 | arr2 | -| conversions.swift:173:13:173:13 | arr1 | conversions.swift:175:13:175:13 | arr1 | -| conversions.swift:174:13:174:13 | arr2 | conversions.swift:176:13:176:13 | arr2 | -| conversions.swift:175:13:175:13 | [post] arr1 | conversions.swift:178:25:178:25 | arr1 | -| conversions.swift:175:13:175:13 | arr1 | conversions.swift:175:13:175:19 | ...[...] | -| conversions.swift:175:13:175:13 | arr1 | conversions.swift:178:25:178:25 | arr1 | -| conversions.swift:176:13:176:13 | [post] arr2 | conversions.swift:179:25:179:25 | arr2 | -| conversions.swift:176:13:176:13 | arr2 | conversions.swift:176:13:176:19 | ...[...] | -| conversions.swift:176:13:176:13 | arr2 | conversions.swift:179:25:179:25 | arr2 | -| conversions.swift:178:7:178:7 | SSA def(arr1b) | conversions.swift:180:13:180:13 | arr1b | -| conversions.swift:178:7:178:7 | arr1b | conversions.swift:178:7:178:7 | SSA def(arr1b) | -| conversions.swift:178:15:178:29 | try ... | conversions.swift:178:7:178:7 | arr1b | -| conversions.swift:178:19:178:29 | call to Array.init(_:) | conversions.swift:178:15:178:29 | try ... | -| conversions.swift:178:25:178:25 | arr1 | conversions.swift:185:31:185:31 | arr1 | -| conversions.swift:179:7:179:7 | SSA def(arr2b) | conversions.swift:181:13:181:13 | arr2b | -| conversions.swift:179:7:179:7 | arr2b | conversions.swift:179:7:179:7 | SSA def(arr2b) | -| conversions.swift:179:15:179:29 | try ... | conversions.swift:179:7:179:7 | arr2b | -| conversions.swift:179:19:179:29 | call to Array.init(_:) | conversions.swift:179:15:179:29 | try ... | -| conversions.swift:179:25:179:25 | arr2 | conversions.swift:186:31:186:31 | arr2 | -| conversions.swift:180:13:180:13 | arr1b | conversions.swift:182:13:182:13 | arr1b | -| conversions.swift:181:13:181:13 | arr2b | conversions.swift:183:13:183:13 | arr2b | -| conversions.swift:182:13:182:13 | arr1b | conversions.swift:182:13:182:20 | ...[...] | -| conversions.swift:183:13:183:13 | arr2b | conversions.swift:183:13:183:20 | ...[...] | -| conversions.swift:185:7:185:7 | SSA def(arr1c) | conversions.swift:187:13:187:13 | arr1c | -| conversions.swift:185:7:185:7 | arr1c | conversions.swift:185:7:185:7 | SSA def(arr1c) | -| conversions.swift:185:15:185:35 | call to ContiguousArray.init(_:) | conversions.swift:185:7:185:7 | arr1c | -| conversions.swift:186:7:186:7 | SSA def(arr2c) | conversions.swift:188:13:188:13 | arr2c | -| conversions.swift:186:7:186:7 | arr2c | conversions.swift:186:7:186:7 | SSA def(arr2c) | -| conversions.swift:186:15:186:35 | call to ContiguousArray.init(_:) | conversions.swift:186:7:186:7 | arr2c | -| conversions.swift:187:13:187:13 | [post] arr1c | conversions.swift:189:13:189:13 | arr1c | -| conversions.swift:187:13:187:13 | arr1c | conversions.swift:189:13:189:13 | arr1c | -| conversions.swift:188:13:188:13 | [post] arr2c | conversions.swift:190:13:190:13 | arr2c | -| conversions.swift:188:13:188:13 | arr2c | conversions.swift:190:13:190:13 | arr2c | -| conversions.swift:189:13:189:13 | arr1c | conversions.swift:189:13:189:20 | ...[...] | -| conversions.swift:190:13:190:13 | arr2c | conversions.swift:190:13:190:20 | ...[...] | -| conversions.swift:196:7:196:7 | SSA def(self) | conversions.swift:196:7:196:7 | self[return] | -| conversions.swift:196:7:196:7 | self | conversions.swift:196:7:196:7 | SSA def(self) | -| conversions.swift:197:6:197:6 | self | conversions.swift:197:6:197:6 | SSA def(self) | -| conversions.swift:197:6:197:6 | self | conversions.swift:197:6:197:6 | SSA def(self) | -| conversions.swift:197:6:197:6 | self | conversions.swift:197:6:197:6 | SSA def(self) | -| conversions.swift:197:6:197:6 | value | conversions.swift:197:6:197:6 | SSA def(value) | -| conversions.swift:199:2:199:2 | SSA def(self) | conversions.swift:200:3:200:3 | self | -| conversions.swift:199:2:199:2 | self | conversions.swift:199:2:199:2 | SSA def(self) | -| conversions.swift:199:7:199:12 | SSA def(v) | conversions.swift:200:12:200:12 | v | -| conversions.swift:199:7:199:12 | v | conversions.swift:199:7:199:12 | SSA def(v) | -| conversions.swift:200:3:200:3 | [post] self | conversions.swift:199:2:201:2 | self[return] | -| conversions.swift:200:3:200:3 | self | conversions.swift:199:2:201:2 | self[return] | -| conversions.swift:205:7:205:17 | SSA def(withUInt) | conversions.swift:206:13:206:13 | withUInt | -| conversions.swift:205:7:205:17 | withUInt | conversions.swift:205:7:205:17 | SSA def(withUInt) | -| conversions.swift:206:13:206:13 | [post] withUInt | conversions.swift:207:14:207:14 | withUInt | -| conversions.swift:206:13:206:13 | withUInt | conversions.swift:207:14:207:14 | withUInt | -| conversions.swift:207:3:207:22 | SSA def(self) | conversions.swift:208:12:208:12 | self | -| conversions.swift:207:10:207:22 | call to Self.init(_:) | conversions.swift:207:3:207:22 | SSA def(self) | -| conversions.swift:207:14:207:14 | withUInt | conversions.swift:207:10:207:22 | call to Self.init(_:) | -| conversions.swift:208:12:208:12 | [post] self | conversions.swift:205:2:209:2 | self[return] | -| conversions.swift:208:12:208:12 | self | conversions.swift:205:2:209:2 | self[return] | -| conversions.swift:211:7:211:20 | SSA def(withMyValue) | conversions.swift:212:13:212:13 | withMyValue | -| conversions.swift:211:7:211:20 | withMyValue | conversions.swift:211:7:211:20 | SSA def(withMyValue) | -| conversions.swift:212:13:212:13 | [post] withMyValue | conversions.swift:213:10:213:10 | withMyValue | -| conversions.swift:212:13:212:13 | withMyValue | conversions.swift:213:10:213:10 | withMyValue | -| conversions.swift:213:3:213:22 | SSA def(self) | conversions.swift:214:12:214:12 | self | -| conversions.swift:214:12:214:12 | [post] self | conversions.swift:211:2:215:2 | self[return] | -| conversions.swift:214:12:214:12 | self | conversions.swift:211:2:215:2 | self[return] | -| conversions.swift:217:7:217:21 | SSA def(withMyValue2) | conversions.swift:218:13:218:13 | withMyValue2 | -| conversions.swift:217:7:217:21 | withMyValue2 | conversions.swift:217:7:217:21 | SSA def(withMyValue2) | -| conversions.swift:218:13:218:13 | [post] withMyValue2 | conversions.swift:219:11:219:11 | withMyValue2 | -| conversions.swift:218:13:218:13 | withMyValue2 | conversions.swift:219:11:219:11 | withMyValue2 | -| conversions.swift:219:7:219:7 | SSA def(x) | conversions.swift:220:10:220:10 | x | -| conversions.swift:219:7:219:7 | x | conversions.swift:219:7:219:7 | SSA def(x) | -| conversions.swift:219:11:219:24 | .v | conversions.swift:219:7:219:7 | x | -| conversions.swift:220:3:220:10 | SSA def(self) | conversions.swift:221:12:221:12 | self | -| conversions.swift:220:10:220:10 | x | conversions.swift:220:3:220:10 | SSA def(self) | -| conversions.swift:221:12:221:12 | [post] self | conversions.swift:217:2:222:2 | self[return] | -| conversions.swift:221:12:221:12 | self | conversions.swift:217:2:222:2 | self[return] | -| conversions.swift:224:14:224:14 | SSA def(self) | conversions.swift:224:2:227:2 | self[return] | -| conversions.swift:224:14:224:14 | self | conversions.swift:224:14:224:14 | SSA def(self) | -| conversions.swift:224:20:224:33 | SSA def(withMyValue) | conversions.swift:225:13:225:13 | withMyValue | -| conversions.swift:224:20:224:33 | withMyValue | conversions.swift:224:20:224:33 | SSA def(withMyValue) | -| conversions.swift:225:13:225:13 | [post] withMyValue | conversions.swift:226:10:226:10 | withMyValue | -| conversions.swift:225:13:225:13 | withMyValue | conversions.swift:226:10:226:10 | withMyValue | +| conversions.swift:33:16:33:35 | call to sourceInt(_:) | conversions.swift:33:12:33:36 | call to Self.init(_:) | +| conversions.swift:34:17:34:36 | call to sourceInt(_:) | conversions.swift:34:12:34:37 | call to Self.init(_:) | +| conversions.swift:35:18:35:37 | call to sourceInt(_:) | conversions.swift:35:12:35:38 | call to Self.init(_:) | +| conversions.swift:36:18:36:37 | call to sourceInt(_:) | conversions.swift:36:12:36:38 | call to Self.init(_:) | +| conversions.swift:37:18:37:37 | call to sourceInt(_:) | conversions.swift:37:12:37:38 | call to Self.init(_:) | +| conversions.swift:39:17:39:36 | call to sourceInt(_:) | conversions.swift:39:12:39:37 | call to Self.init(_:) | +| conversions.swift:40:18:40:37 | call to sourceInt(_:) | conversions.swift:40:12:40:38 | call to Self.init(_:) | +| conversions.swift:41:19:41:39 | call to sourceInt(_:) | conversions.swift:41:12:41:40 | call to Self.init(_:) | +| conversions.swift:42:19:42:39 | call to sourceInt(_:) | conversions.swift:42:12:42:40 | call to Self.init(_:) | +| conversions.swift:43:19:43:39 | call to sourceInt(_:) | conversions.swift:43:12:43:40 | call to Self.init(_:) | +| conversions.swift:45:18:45:38 | call to sourceInt(_:) | conversions.swift:45:12:45:39 | call to Float.init(_:) | +| conversions.swift:46:19:46:39 | call to sourceInt(_:) | conversions.swift:46:12:46:40 | call to Double.init(_:) | +| conversions.swift:47:19:47:39 | call to sourceInt(_:) | conversions.swift:47:12:47:40 | call to String.init(_:) | +| conversions.swift:48:12:48:40 | call to String.init(_:) | conversions.swift:48:12:48:42 | .utf8 | +| conversions.swift:48:19:48:39 | call to sourceInt(_:) | conversions.swift:48:12:48:40 | call to String.init(_:) | +| conversions.swift:50:6:50:6 | SSA def(arr) | conversions.swift:51:12:51:12 | arr | +| conversions.swift:50:6:50:6 | arr | conversions.swift:50:6:50:6 | SSA def(arr) | +| conversions.swift:50:12:50:39 | [...] | conversions.swift:50:6:50:6 | arr | +| conversions.swift:51:12:51:12 | arr | conversions.swift:52:12:52:12 | arr | +| conversions.swift:52:12:52:12 | [post] arr | conversions.swift:53:20:53:20 | arr | +| conversions.swift:52:12:52:12 | arr | conversions.swift:52:12:52:17 | ...[...] | +| conversions.swift:52:12:52:12 | arr | conversions.swift:53:20:53:20 | arr | +| conversions.swift:53:20:53:20 | arr | conversions.swift:54:20:54:20 | arr | +| conversions.swift:54:12:54:23 | call to Array.init(_:) | conversions.swift:54:12:54:26 | ...[...] | +| conversions.swift:55:20:55:42 | call to sourceString(_:) | conversions.swift:55:20:55:44 | .utf8 | +| conversions.swift:56:12:56:48 | call to Array.init(_:) | conversions.swift:56:12:56:51 | ...[...] | +| conversions.swift:56:20:56:42 | call to sourceString(_:) | conversions.swift:56:20:56:44 | .utf8 | +| conversions.swift:58:5:58:9 | let ...? | conversions.swift:58:9:58:9 | v | +| conversions.swift:58:9:58:9 | SSA def(v) | conversions.swift:59:13:59:13 | v | +| conversions.swift:58:9:58:9 | v | conversions.swift:58:9:58:9 | SSA def(v) | +| conversions.swift:58:13:58:32 | call to sourceInt(_:) | conversions.swift:58:5:58:9 | let ...? | +| conversions.swift:62:6:62:6 | SSA def(v2) | conversions.swift:63:12:63:12 | v2 | +| conversions.swift:62:6:62:6 | v2 | conversions.swift:62:6:62:6 | SSA def(v2) | +| conversions.swift:62:6:62:10 | ... as ... | conversions.swift:62:6:62:6 | v2 | +| conversions.swift:62:18:62:50 | call to numericCast(_:) | conversions.swift:62:6:62:10 | ... as ... | +| conversions.swift:62:30:62:49 | call to sourceInt(_:) | conversions.swift:62:18:62:50 | call to numericCast(_:) | +| conversions.swift:65:6:65:6 | SSA def(v4) | conversions.swift:66:12:66:12 | v4 | +| conversions.swift:65:6:65:6 | v4 | conversions.swift:65:6:65:6 | SSA def(v4) | +| conversions.swift:65:6:65:10 | ... as ... | conversions.swift:65:6:65:6 | v4 | +| conversions.swift:65:17:65:66 | call to unsafeBitCast(_:to:) | conversions.swift:65:6:65:10 | ... as ... | +| conversions.swift:65:31:65:50 | call to sourceInt(_:) | conversions.swift:65:17:65:66 | call to unsafeBitCast(_:to:) | +| conversions.swift:68:6:68:6 | SSA def(v5) | conversions.swift:69:12:69:12 | v5 | +| conversions.swift:68:6:68:6 | v5 | conversions.swift:68:6:68:6 | SSA def(v5) | +| conversions.swift:68:11:68:56 | call to Self.init(truncatingIfNeeded:) | conversions.swift:68:6:68:6 | v5 | +| conversions.swift:68:36:68:55 | call to sourceInt(_:) | conversions.swift:68:11:68:56 | call to Self.init(truncatingIfNeeded:) | +| conversions.swift:71:6:71:6 | SSA def(v6) | conversions.swift:72:12:72:12 | v6 | +| conversions.swift:71:6:71:6 | v6 | conversions.swift:71:6:71:6 | SSA def(v6) | +| conversions.swift:71:11:71:48 | call to UInt.init(bitPattern:) | conversions.swift:71:6:71:6 | v6 | +| conversions.swift:71:28:71:47 | call to sourceInt(_:) | conversions.swift:71:11:71:48 | call to UInt.init(bitPattern:) | +| conversions.swift:74:6:74:6 | SSA def(v7) | conversions.swift:75:12:75:12 | v7 | +| conversions.swift:74:6:74:6 | v7 | conversions.swift:74:6:74:6 | SSA def(v7) | +| conversions.swift:74:11:74:35 | call to abs(_:) | conversions.swift:74:6:74:6 | v7 | +| conversions.swift:74:15:74:34 | call to sourceInt(_:) | conversions.swift:74:11:74:35 | call to abs(_:) | +| conversions.swift:77:6:77:6 | SSA def(v8) | conversions.swift:78:12:78:12 | v8 | +| conversions.swift:77:6:77:6 | v8 | conversions.swift:77:6:77:6 | SSA def(v8) | +| conversions.swift:77:18:77:18 | 0 | conversions.swift:77:6:77:6 | v8 | +| conversions.swift:78:12:78:12 | [post] v8 | conversions.swift:79:12:79:12 | v8 | +| conversions.swift:78:12:78:12 | v8 | conversions.swift:79:12:79:12 | v8 | +| conversions.swift:79:12:79:12 | [post] v8 | conversions.swift:80:12:80:12 | v8 | +| conversions.swift:79:12:79:12 | v8 | conversions.swift:79:12:79:29 | call to advanced(by:) | +| conversions.swift:79:12:79:12 | v8 | conversions.swift:80:12:80:12 | v8 | +| conversions.swift:79:28:79:28 | 1 | conversions.swift:79:12:79:29 | call to advanced(by:) | +| conversions.swift:80:12:80:12 | [post] v8 | conversions.swift:81:12:81:12 | v8 | +| conversions.swift:80:12:80:12 | v8 | conversions.swift:80:12:80:48 | call to advanced(by:) | +| conversions.swift:80:12:80:12 | v8 | conversions.swift:81:12:81:12 | v8 | +| conversions.swift:80:28:80:47 | call to sourceInt(_:) | conversions.swift:80:12:80:48 | call to advanced(by:) | +| conversions.swift:81:12:81:12 | [post] v8 | conversions.swift:82:12:82:12 | v8 | +| conversions.swift:81:12:81:12 | v8 | conversions.swift:81:12:81:29 | call to distance(to:) | +| conversions.swift:81:12:81:12 | v8 | conversions.swift:82:12:82:12 | v8 | +| conversions.swift:81:28:81:28 | 1 | conversions.swift:81:12:81:29 | call to distance(to:) | +| conversions.swift:82:12:82:12 | v8 | conversions.swift:82:12:82:51 | call to distance(to:) | +| conversions.swift:82:28:82:50 | call to sourceUInt64(_:) | conversions.swift:82:12:82:51 | call to distance(to:) | +| conversions.swift:84:12:84:45 | call to Self.init(exactly:) | conversions.swift:84:12:84:46 | ...! | +| conversions.swift:85:12:85:48 | call to Self.init(exactly:) | conversions.swift:85:12:85:49 | ...! | +| conversions.swift:86:26:86:45 | call to sourceInt(_:) | conversions.swift:86:12:86:46 | call to Self.init(clamping:) | +| conversions.swift:87:29:87:48 | call to sourceInt(_:) | conversions.swift:87:12:87:49 | call to Self.init(clamping:) | +| conversions.swift:88:36:88:55 | call to sourceInt(_:) | conversions.swift:88:12:88:56 | call to Self.init(truncatingIfNeeded:) | +| conversions.swift:89:39:89:58 | call to sourceInt(_:) | conversions.swift:89:12:89:59 | call to Self.init(truncatingIfNeeded:) | +| conversions.swift:90:12:90:50 | call to Self.init(_:radix:) | conversions.swift:90:12:90:51 | ...! | +| conversions.swift:91:12:91:53 | call to Self.init(_:radix:) | conversions.swift:91:12:91:54 | ...! | +| conversions.swift:93:30:93:49 | call to sourceInt(_:) | conversions.swift:93:12:93:50 | call to Self.init(littleEndian:) | +| conversions.swift:94:33:94:55 | call to sourceUInt64(_:) | conversions.swift:94:12:94:56 | call to Self.init(littleEndian:) | +| conversions.swift:95:27:95:46 | call to sourceInt(_:) | conversions.swift:95:12:95:47 | call to Self.init(bigEndian:) | +| conversions.swift:96:30:96:52 | call to sourceUInt64(_:) | conversions.swift:96:12:96:53 | call to Self.init(bigEndian:) | +| conversions.swift:97:12:97:31 | call to sourceInt(_:) | conversions.swift:97:12:97:33 | .littleEndian | +| conversions.swift:98:12:98:34 | call to sourceUInt64(_:) | conversions.swift:98:12:98:36 | .littleEndian | +| conversions.swift:99:12:99:31 | call to sourceInt(_:) | conversions.swift:99:12:99:33 | .bigEndian | +| conversions.swift:100:12:100:34 | call to sourceUInt64(_:) | conversions.swift:100:12:100:36 | .bigEndian | +| conversions.swift:102:7:102:7 | SSA def(q1) | conversions.swift:103:12:103:12 | q1 | +| conversions.swift:102:7:102:7 | q1 | conversions.swift:102:7:102:7 | SSA def(q1) | +| conversions.swift:102:11:102:11 | SSA def(r1) | conversions.swift:104:12:104:12 | r1 | +| conversions.swift:102:11:102:11 | r1 | conversions.swift:102:11:102:11 | SSA def(r1) | +| conversions.swift:102:17:102:56 | call to quotientAndRemainder(dividingBy:) | conversions.swift:102:6:102:13 | (...) | +| conversions.swift:106:7:106:7 | SSA def(q2) | conversions.swift:107:12:107:12 | q2 | +| conversions.swift:106:7:106:7 | q2 | conversions.swift:106:7:106:7 | SSA def(q2) | +| conversions.swift:106:11:106:11 | SSA def(r2) | conversions.swift:108:12:108:12 | r2 | +| conversions.swift:106:11:106:11 | r2 | conversions.swift:106:11:106:11 | SSA def(r2) | +| conversions.swift:106:17:106:72 | call to quotientAndRemainder(dividingBy:) | conversions.swift:106:6:106:13 | (...) | +| conversions.swift:110:7:110:7 | SSA def(q3) | conversions.swift:111:12:111:12 | q3 | +| conversions.swift:110:7:110:7 | q3 | conversions.swift:110:7:110:7 | SSA def(q3) | +| conversions.swift:110:11:110:11 | SSA def(r3) | conversions.swift:112:12:112:12 | r3 | +| conversions.swift:110:11:110:11 | r3 | conversions.swift:110:11:110:11 | SSA def(r3) | +| conversions.swift:110:17:110:75 | call to quotientAndRemainder(dividingBy:) | conversions.swift:110:6:110:13 | (...) | +| conversions.swift:114:7:114:7 | SSA def(q4) | conversions.swift:115:12:115:12 | q4 | +| conversions.swift:114:7:114:7 | q4 | conversions.swift:114:7:114:7 | SSA def(q4) | +| conversions.swift:114:11:114:11 | SSA def(r4) | conversions.swift:116:12:116:12 | r4 | +| conversions.swift:114:11:114:11 | r4 | conversions.swift:114:11:114:11 | SSA def(r4) | +| conversions.swift:114:17:114:86 | call to quotientAndRemainder(dividingBy:) | conversions.swift:114:6:114:13 | (...) | +| conversions.swift:118:6:118:6 | SSA def(pair1) | conversions.swift:119:12:119:12 | pair1 | +| conversions.swift:118:6:118:6 | pair1 | conversions.swift:118:6:118:6 | SSA def(pair1) | +| conversions.swift:118:14:118:44 | call to addingReportingOverflow(_:) | conversions.swift:118:6:118:6 | pair1 | +| conversions.swift:119:12:119:12 | [post] pair1 | conversions.swift:120:12:120:12 | pair1 | +| conversions.swift:119:12:119:12 | pair1 | conversions.swift:120:12:120:12 | pair1 | +| conversions.swift:122:6:122:6 | SSA def(pair2) | conversions.swift:123:12:123:12 | pair2 | +| conversions.swift:122:6:122:6 | pair2 | conversions.swift:122:6:122:6 | SSA def(pair2) | +| conversions.swift:122:14:122:60 | call to addingReportingOverflow(_:) | conversions.swift:122:6:122:6 | pair2 | +| conversions.swift:123:12:123:12 | [post] pair2 | conversions.swift:124:12:124:12 | pair2 | +| conversions.swift:123:12:123:12 | pair2 | conversions.swift:124:12:124:12 | pair2 | +| conversions.swift:126:6:126:6 | SSA def(pair3) | conversions.swift:127:12:127:12 | pair3 | +| conversions.swift:126:6:126:6 | pair3 | conversions.swift:126:6:126:6 | SSA def(pair3) | +| conversions.swift:126:14:126:63 | call to addingReportingOverflow(_:) | conversions.swift:126:6:126:6 | pair3 | +| conversions.swift:127:12:127:12 | [post] pair3 | conversions.swift:128:12:128:12 | pair3 | +| conversions.swift:127:12:127:12 | pair3 | conversions.swift:128:12:128:12 | pair3 | +| conversions.swift:130:6:130:6 | SSA def(pair4) | conversions.swift:131:12:131:12 | pair4 | +| conversions.swift:130:6:130:6 | pair4 | conversions.swift:130:6:130:6 | SSA def(pair4) | +| conversions.swift:130:14:130:74 | call to addingReportingOverflow(_:) | conversions.swift:130:6:130:6 | pair4 | +| conversions.swift:131:12:131:12 | [post] pair4 | conversions.swift:132:12:132:12 | pair4 | +| conversions.swift:131:12:131:12 | pair4 | conversions.swift:132:12:132:12 | pair4 | +| conversions.swift:137:18:137:39 | call to sourceFloat(_:) | conversions.swift:137:12:137:40 | call to Float.init(_:) | +| conversions.swift:138:18:138:39 | call to sourceFloat(_:) | conversions.swift:138:12:138:40 | call to UInt8.init(_:) | +| conversions.swift:139:19:139:40 | call to sourceFloat(_:) | conversions.swift:139:12:139:41 | call to String.init(_:) | +| conversions.swift:140:12:140:41 | call to String.init(_:) | conversions.swift:140:12:140:43 | .utf8 | +| conversions.swift:140:19:140:40 | call to sourceFloat(_:) | conversions.swift:140:12:140:41 | call to String.init(_:) | +| conversions.swift:141:19:141:42 | call to sourceFloat80(_:) | conversions.swift:141:12:141:43 | call to String.init(_:) | +| conversions.swift:142:12:142:43 | call to String.init(_:) | conversions.swift:142:12:142:45 | .utf8 | +| conversions.swift:142:19:142:42 | call to sourceFloat80(_:) | conversions.swift:142:12:142:43 | call to String.init(_:) | +| conversions.swift:143:19:143:41 | call to sourceDouble(_:) | conversions.swift:143:12:143:42 | call to String.init(_:) | +| conversions.swift:144:12:144:42 | call to String.init(_:) | conversions.swift:144:12:144:44 | .utf8 | +| conversions.swift:144:19:144:41 | call to sourceDouble(_:) | conversions.swift:144:12:144:42 | call to String.init(_:) | +| conversions.swift:146:18:146:39 | call to sourceFloat(_:) | conversions.swift:146:12:146:40 | call to Float.init(_:) | +| conversions.swift:147:41:147:60 | call to sourceInt(_:) | conversions.swift:147:12:147:79 | call to Float.init(sign:exponent:significand:) | +| conversions.swift:147:76:147:76 | 0.0 | conversions.swift:147:12:147:79 | call to Float.init(sign:exponent:significand:) | +| conversions.swift:148:41:148:41 | 0 | conversions.swift:148:12:148:79 | call to Float.init(sign:exponent:significand:) | +| conversions.swift:148:57:148:78 | call to sourceFloat(_:) | conversions.swift:148:12:148:79 | call to Float.init(sign:exponent:significand:) | +| conversions.swift:149:63:149:63 | 0.0 | conversions.swift:149:12:149:66 | call to Float.init(signOf:magnitudeOf:) | +| conversions.swift:150:44:150:65 | call to sourceFloat(_:) | conversions.swift:150:12:150:66 | call to Float.init(signOf:magnitudeOf:) | +| conversions.swift:152:12:152:33 | call to sourceFloat(_:) | conversions.swift:152:12:152:35 | .exponent | +| conversions.swift:153:12:153:33 | call to sourceFloat(_:) | conversions.swift:153:12:153:35 | .significand | +| conversions.swift:154:12:154:35 | call to sourceFloat80(_:) | conversions.swift:154:12:154:37 | .exponent | +| conversions.swift:155:12:155:35 | call to sourceFloat80(_:) | conversions.swift:155:12:155:37 | .significand | +| conversions.swift:156:12:156:34 | call to sourceDouble(_:) | conversions.swift:156:12:156:36 | .exponent | +| conversions.swift:157:12:157:34 | call to sourceDouble(_:) | conversions.swift:157:12:157:36 | .significand | +| conversions.swift:158:12:158:32 | call to sourceUInt(_:) | conversions.swift:158:12:158:34 | .byteSwapped | +| conversions.swift:159:12:159:34 | call to sourceUInt64(_:) | conversions.swift:159:12:159:36 | .byteSwapped | +| conversions.swift:160:12:160:31 | call to sourceInt(_:) | conversions.swift:160:12:160:33 | .magnitude | +| conversions.swift:161:12:161:35 | call to sourceUInt64(_:) | conversions.swift:161:12:161:37 | .magnitude | +| conversions.swift:166:19:166:42 | call to sourceString(_:) | conversions.swift:166:12:166:43 | call to String.init(_:) | +| conversions.swift:168:6:168:6 | SSA def(ms1) | conversions.swift:169:12:169:12 | ms1 | +| conversions.swift:168:6:168:6 | ms1 | conversions.swift:168:6:168:6 | SSA def(ms1) | +| conversions.swift:168:12:168:26 | call to MyString.init(_:) | conversions.swift:168:12:168:27 | ...! | +| conversions.swift:168:12:168:27 | ...! | conversions.swift:168:6:168:6 | ms1 | +| conversions.swift:168:21:168:21 | abc | conversions.swift:168:12:168:26 | call to MyString.init(_:) | +| conversions.swift:169:12:169:12 | [post] ms1 | conversions.swift:170:12:170:12 | ms1 | +| conversions.swift:169:12:169:12 | ms1 | conversions.swift:170:12:170:12 | ms1 | +| conversions.swift:170:12:170:12 | [post] ms1 | conversions.swift:171:12:171:12 | ms1 | +| conversions.swift:170:12:170:12 | ms1 | conversions.swift:170:12:170:16 | .description | +| conversions.swift:170:12:170:12 | ms1 | conversions.swift:171:12:171:12 | ms1 | +| conversions.swift:171:12:171:12 | [post] ms1 | conversions.swift:172:12:172:12 | ms1 | +| conversions.swift:171:12:171:12 | ms1 | conversions.swift:171:12:171:16 | .debugDescription | +| conversions.swift:171:12:171:12 | ms1 | conversions.swift:172:12:172:12 | ms1 | +| conversions.swift:174:6:174:6 | SSA def(ms2) | conversions.swift:175:12:175:12 | ms2 | +| conversions.swift:174:6:174:6 | ms2 | conversions.swift:174:6:174:6 | SSA def(ms2) | +| conversions.swift:174:12:174:45 | call to MyString.init(_:) | conversions.swift:174:12:174:46 | ...! | +| conversions.swift:174:12:174:46 | ...! | conversions.swift:174:6:174:6 | ms2 | +| conversions.swift:174:21:174:44 | call to sourceString(_:) | conversions.swift:174:12:174:45 | call to MyString.init(_:) | +| conversions.swift:175:12:175:12 | [post] ms2 | conversions.swift:176:12:176:12 | ms2 | +| conversions.swift:175:12:175:12 | ms2 | conversions.swift:176:12:176:12 | ms2 | +| conversions.swift:176:12:176:12 | [post] ms2 | conversions.swift:177:12:177:12 | ms2 | +| conversions.swift:176:12:176:12 | ms2 | conversions.swift:176:12:176:16 | .description | +| conversions.swift:176:12:176:12 | ms2 | conversions.swift:177:12:177:12 | ms2 | +| conversions.swift:177:12:177:12 | [post] ms2 | conversions.swift:178:12:178:12 | ms2 | +| conversions.swift:177:12:177:12 | ms2 | conversions.swift:177:12:177:16 | .debugDescription | +| conversions.swift:177:12:177:12 | ms2 | conversions.swift:178:12:178:12 | ms2 | +| conversions.swift:182:6:182:6 | SSA def(parent) | conversions.swift:183:12:183:12 | parent | +| conversions.swift:182:6:182:6 | parent | conversions.swift:182:6:182:6 | SSA def(parent) | +| conversions.swift:182:6:182:15 | ... as ... | conversions.swift:182:6:182:6 | parent | +| conversions.swift:182:31:182:54 | call to sourceString(_:) | conversions.swift:182:6:182:15 | ... as ... | +| conversions.swift:183:12:183:12 | [post] parent | conversions.swift:184:12:184:12 | parent | +| conversions.swift:183:12:183:12 | parent | conversions.swift:184:12:184:12 | parent | +| conversions.swift:184:12:184:12 | [post] parent | conversions.swift:186:40:186:40 | parent | +| conversions.swift:184:12:184:12 | parent | conversions.swift:186:40:186:40 | parent | +| conversions.swift:186:6:186:6 | SSA def(v3) | conversions.swift:187:12:187:12 | v3 | +| conversions.swift:186:6:186:6 | v3 | conversions.swift:186:6:186:6 | SSA def(v3) | +| conversions.swift:186:6:186:10 | ... as ... | conversions.swift:186:6:186:6 | v3 | +| conversions.swift:186:25:186:69 | call to unsafeDowncast(_:to:) | conversions.swift:186:6:186:10 | ... as ... | +| conversions.swift:186:40:186:40 | parent | conversions.swift:186:25:186:69 | call to unsafeDowncast(_:to:) | +| conversions.swift:187:12:187:12 | [post] v3 | conversions.swift:188:12:188:12 | v3 | +| conversions.swift:187:12:187:12 | v3 | conversions.swift:188:12:188:12 | v3 | +| conversions.swift:195:24:195:24 | myCEnumConst | conversions.swift:195:12:195:36 | call to Self.init(_:) | +| conversions.swift:196:24:196:41 | call to sourceInt(_:) | conversions.swift:196:12:196:42 | call to Self.init(_:) | +| conversions.swift:199:7:199:7 | SSA def(self) | conversions.swift:199:7:199:7 | self[return] | +| conversions.swift:199:7:199:7 | self | conversions.swift:199:7:199:7 | SSA def(self) | +| conversions.swift:200:2:200:2 | SSA def(self) | conversions.swift:200:2:221:2 | self[return] | +| conversions.swift:200:2:200:2 | self | conversions.swift:200:2:200:2 | SSA def(self) | +| conversions.swift:201:7:201:7 | SSA def(arr1) | conversions.swift:203:13:203:13 | arr1 | +| conversions.swift:201:7:201:7 | arr1 | conversions.swift:201:7:201:7 | SSA def(arr1) | +| conversions.swift:201:14:201:33 | call to sourceArray(_:) | conversions.swift:201:7:201:7 | arr1 | +| conversions.swift:202:7:202:7 | SSA def(arr2) | conversions.swift:204:13:204:13 | arr2 | +| conversions.swift:202:7:202:7 | arr2 | conversions.swift:202:7:202:7 | SSA def(arr2) | +| conversions.swift:202:14:202:33 | [...] | conversions.swift:202:7:202:7 | arr2 | +| conversions.swift:203:13:203:13 | arr1 | conversions.swift:205:13:205:13 | arr1 | +| conversions.swift:204:13:204:13 | arr2 | conversions.swift:206:13:206:13 | arr2 | +| conversions.swift:205:13:205:13 | [post] arr1 | conversions.swift:208:25:208:25 | arr1 | +| conversions.swift:205:13:205:13 | arr1 | conversions.swift:205:13:205:19 | ...[...] | +| conversions.swift:205:13:205:13 | arr1 | conversions.swift:208:25:208:25 | arr1 | +| conversions.swift:206:13:206:13 | [post] arr2 | conversions.swift:209:25:209:25 | arr2 | +| conversions.swift:206:13:206:13 | arr2 | conversions.swift:206:13:206:19 | ...[...] | +| conversions.swift:206:13:206:13 | arr2 | conversions.swift:209:25:209:25 | arr2 | +| conversions.swift:208:7:208:7 | SSA def(arr1b) | conversions.swift:210:13:210:13 | arr1b | +| conversions.swift:208:7:208:7 | arr1b | conversions.swift:208:7:208:7 | SSA def(arr1b) | +| conversions.swift:208:15:208:29 | try ... | conversions.swift:208:7:208:7 | arr1b | +| conversions.swift:208:19:208:29 | call to Array.init(_:) | conversions.swift:208:15:208:29 | try ... | +| conversions.swift:208:25:208:25 | arr1 | conversions.swift:215:31:215:31 | arr1 | +| conversions.swift:209:7:209:7 | SSA def(arr2b) | conversions.swift:211:13:211:13 | arr2b | +| conversions.swift:209:7:209:7 | arr2b | conversions.swift:209:7:209:7 | SSA def(arr2b) | +| conversions.swift:209:15:209:29 | try ... | conversions.swift:209:7:209:7 | arr2b | +| conversions.swift:209:19:209:29 | call to Array.init(_:) | conversions.swift:209:15:209:29 | try ... | +| conversions.swift:209:25:209:25 | arr2 | conversions.swift:216:31:216:31 | arr2 | +| conversions.swift:210:13:210:13 | arr1b | conversions.swift:212:13:212:13 | arr1b | +| conversions.swift:211:13:211:13 | arr2b | conversions.swift:213:13:213:13 | arr2b | +| conversions.swift:212:13:212:13 | arr1b | conversions.swift:212:13:212:20 | ...[...] | +| conversions.swift:213:13:213:13 | arr2b | conversions.swift:213:13:213:20 | ...[...] | +| conversions.swift:215:7:215:7 | SSA def(arr1c) | conversions.swift:217:13:217:13 | arr1c | +| conversions.swift:215:7:215:7 | arr1c | conversions.swift:215:7:215:7 | SSA def(arr1c) | +| conversions.swift:215:15:215:35 | call to ContiguousArray.init(_:) | conversions.swift:215:7:215:7 | arr1c | +| conversions.swift:216:7:216:7 | SSA def(arr2c) | conversions.swift:218:13:218:13 | arr2c | +| conversions.swift:216:7:216:7 | arr2c | conversions.swift:216:7:216:7 | SSA def(arr2c) | +| conversions.swift:216:15:216:35 | call to ContiguousArray.init(_:) | conversions.swift:216:7:216:7 | arr2c | +| conversions.swift:217:13:217:13 | [post] arr1c | conversions.swift:219:13:219:13 | arr1c | +| conversions.swift:217:13:217:13 | arr1c | conversions.swift:219:13:219:13 | arr1c | +| conversions.swift:218:13:218:13 | [post] arr2c | conversions.swift:220:13:220:13 | arr2c | +| conversions.swift:218:13:218:13 | arr2c | conversions.swift:220:13:220:13 | arr2c | +| conversions.swift:219:13:219:13 | arr1c | conversions.swift:219:13:219:20 | ...[...] | +| conversions.swift:220:13:220:13 | arr2c | conversions.swift:220:13:220:20 | ...[...] | +| conversions.swift:226:7:226:7 | SSA def(self) | conversions.swift:226:7:226:7 | self[return] | +| conversions.swift:226:7:226:7 | self | conversions.swift:226:7:226:7 | SSA def(self) | +| conversions.swift:227:6:227:6 | self | conversions.swift:227:6:227:6 | SSA def(self) | +| conversions.swift:227:6:227:6 | self | conversions.swift:227:6:227:6 | SSA def(self) | +| conversions.swift:227:6:227:6 | self | conversions.swift:227:6:227:6 | SSA def(self) | +| conversions.swift:227:6:227:6 | value | conversions.swift:227:6:227:6 | SSA def(value) | +| conversions.swift:229:2:229:2 | SSA def(self) | conversions.swift:230:3:230:3 | self | +| conversions.swift:229:2:229:2 | self | conversions.swift:229:2:229:2 | SSA def(self) | +| conversions.swift:229:7:229:12 | SSA def(v) | conversions.swift:230:12:230:12 | v | +| conversions.swift:229:7:229:12 | v | conversions.swift:229:7:229:12 | SSA def(v) | +| conversions.swift:230:3:230:3 | [post] self | conversions.swift:229:2:231:2 | self[return] | +| conversions.swift:230:3:230:3 | self | conversions.swift:229:2:231:2 | self[return] | +| conversions.swift:235:7:235:17 | SSA def(withUInt) | conversions.swift:236:13:236:13 | withUInt | +| conversions.swift:235:7:235:17 | withUInt | conversions.swift:235:7:235:17 | SSA def(withUInt) | +| conversions.swift:236:13:236:13 | [post] withUInt | conversions.swift:237:14:237:14 | withUInt | +| conversions.swift:236:13:236:13 | withUInt | conversions.swift:237:14:237:14 | withUInt | +| conversions.swift:237:3:237:22 | SSA def(self) | conversions.swift:238:12:238:12 | self | +| conversions.swift:237:10:237:22 | call to Self.init(_:) | conversions.swift:237:3:237:22 | SSA def(self) | +| conversions.swift:237:14:237:14 | withUInt | conversions.swift:237:10:237:22 | call to Self.init(_:) | +| conversions.swift:238:12:238:12 | [post] self | conversions.swift:235:2:239:2 | self[return] | +| conversions.swift:238:12:238:12 | self | conversions.swift:235:2:239:2 | self[return] | +| conversions.swift:241:7:241:20 | SSA def(withMyValue) | conversions.swift:242:13:242:13 | withMyValue | +| conversions.swift:241:7:241:20 | withMyValue | conversions.swift:241:7:241:20 | SSA def(withMyValue) | +| conversions.swift:242:13:242:13 | [post] withMyValue | conversions.swift:243:10:243:10 | withMyValue | +| conversions.swift:242:13:242:13 | withMyValue | conversions.swift:243:10:243:10 | withMyValue | +| conversions.swift:243:3:243:22 | SSA def(self) | conversions.swift:244:12:244:12 | self | +| conversions.swift:244:12:244:12 | [post] self | conversions.swift:241:2:245:2 | self[return] | +| conversions.swift:244:12:244:12 | self | conversions.swift:241:2:245:2 | self[return] | +| conversions.swift:247:7:247:21 | SSA def(withMyValue2) | conversions.swift:248:13:248:13 | withMyValue2 | +| conversions.swift:247:7:247:21 | withMyValue2 | conversions.swift:247:7:247:21 | SSA def(withMyValue2) | +| conversions.swift:248:13:248:13 | [post] withMyValue2 | conversions.swift:249:11:249:11 | withMyValue2 | +| conversions.swift:248:13:248:13 | withMyValue2 | conversions.swift:249:11:249:11 | withMyValue2 | +| conversions.swift:249:7:249:7 | SSA def(x) | conversions.swift:250:10:250:10 | x | +| conversions.swift:249:7:249:7 | x | conversions.swift:249:7:249:7 | SSA def(x) | +| conversions.swift:249:11:249:24 | .v | conversions.swift:249:7:249:7 | x | +| conversions.swift:250:3:250:10 | SSA def(self) | conversions.swift:251:12:251:12 | self | +| conversions.swift:250:10:250:10 | x | conversions.swift:250:3:250:10 | SSA def(self) | +| conversions.swift:251:12:251:12 | [post] self | conversions.swift:247:2:252:2 | self[return] | +| conversions.swift:251:12:251:12 | self | conversions.swift:247:2:252:2 | self[return] | +| conversions.swift:254:14:254:14 | SSA def(self) | conversions.swift:254:2:257:2 | self[return] | +| conversions.swift:254:14:254:14 | self | conversions.swift:254:14:254:14 | SSA def(self) | +| conversions.swift:254:20:254:33 | SSA def(withMyValue) | conversions.swift:255:13:255:13 | withMyValue | +| conversions.swift:254:20:254:33 | withMyValue | conversions.swift:254:20:254:33 | SSA def(withMyValue) | +| conversions.swift:255:13:255:13 | [post] withMyValue | conversions.swift:256:10:256:10 | withMyValue | +| conversions.swift:255:13:255:13 | withMyValue | conversions.swift:256:10:256:10 | withMyValue | | simple.swift:12:13:12:13 | 1 | simple.swift:12:13:12:24 | ... .+(_:_:) ... | | simple.swift:12:17:12:24 | call to source() | simple.swift:12:13:12:24 | ... .+(_:_:) ... | | simple.swift:13:13:13:20 | call to source() | simple.swift:13:13:13:24 | ... .+(_:_:) ... | @@ -472,8 +508,8 @@ | stringinterpolation.swift:13:3:13:3 | self | stringinterpolation.swift:13:3:13:3 | [post] self | | stringinterpolation.swift:13:23:13:23 | "..." | stringinterpolation.swift:13:3:13:3 | [post] self | | stringinterpolation.swift:13:23:13:23 | SSA def($interpolation) | stringinterpolation.swift:13:24:13:24 | $interpolation | -| stringinterpolation.swift:13:23:13:23 | TapExpr | stringinterpolation.swift:13:23:13:23 | "..." | | stringinterpolation.swift:13:23:13:23 | first is: | stringinterpolation.swift:13:24:13:24 | [post] $interpolation | +| stringinterpolation.swift:13:23:13:47 | TapExpr | stringinterpolation.swift:13:23:13:23 | "..." | | stringinterpolation.swift:13:24:13:24 | $interpolation | stringinterpolation.swift:13:24:13:24 | &... | | stringinterpolation.swift:13:24:13:24 | $interpolation | stringinterpolation.swift:13:24:13:24 | [post] $interpolation | | stringinterpolation.swift:13:24:13:24 | &... | stringinterpolation.swift:13:35:13:35 | $interpolation | @@ -486,7 +522,7 @@ | stringinterpolation.swift:13:47:13:47 | | stringinterpolation.swift:13:47:13:47 | [post] $interpolation | | stringinterpolation.swift:13:47:13:47 | $interpolation | stringinterpolation.swift:13:47:13:47 | &... | | stringinterpolation.swift:13:47:13:47 | $interpolation | stringinterpolation.swift:13:47:13:47 | [post] $interpolation | -| stringinterpolation.swift:13:47:13:47 | &... | stringinterpolation.swift:13:23:13:23 | TapExpr | +| stringinterpolation.swift:13:47:13:47 | &... | stringinterpolation.swift:13:23:13:47 | TapExpr | | stringinterpolation.swift:13:47:13:47 | [post] $interpolation | stringinterpolation.swift:13:47:13:47 | &... | | stringinterpolation.swift:18:6:18:6 | SSA def(p1) | stringinterpolation.swift:19:2:19:2 | p1 | | stringinterpolation.swift:18:6:18:6 | p1 | stringinterpolation.swift:18:6:18:6 | SSA def(p1) | @@ -496,8 +532,8 @@ | stringinterpolation.swift:20:2:20:2 | [post] p1 | stringinterpolation.swift:22:21:22:21 | p1 | | stringinterpolation.swift:20:2:20:2 | p1 | stringinterpolation.swift:22:21:22:21 | p1 | | stringinterpolation.swift:22:12:22:12 | SSA def($interpolation) | stringinterpolation.swift:22:13:22:13 | $interpolation | -| stringinterpolation.swift:22:12:22:12 | TapExpr | stringinterpolation.swift:22:12:22:12 | "..." | | stringinterpolation.swift:22:12:22:12 | pair: | stringinterpolation.swift:22:13:22:13 | [post] $interpolation | +| stringinterpolation.swift:22:12:22:30 | TapExpr | stringinterpolation.swift:22:12:22:12 | "..." | | stringinterpolation.swift:22:13:22:13 | $interpolation | stringinterpolation.swift:22:13:22:13 | &... | | stringinterpolation.swift:22:13:22:13 | $interpolation | stringinterpolation.swift:22:13:22:13 | [post] $interpolation | | stringinterpolation.swift:22:13:22:13 | &... | stringinterpolation.swift:22:20:22:20 | $interpolation | @@ -512,11 +548,11 @@ | stringinterpolation.swift:22:30:22:30 | | stringinterpolation.swift:22:30:22:30 | [post] $interpolation | | stringinterpolation.swift:22:30:22:30 | $interpolation | stringinterpolation.swift:22:30:22:30 | &... | | stringinterpolation.swift:22:30:22:30 | $interpolation | stringinterpolation.swift:22:30:22:30 | [post] $interpolation | -| stringinterpolation.swift:22:30:22:30 | &... | stringinterpolation.swift:22:12:22:12 | TapExpr | +| stringinterpolation.swift:22:30:22:30 | &... | stringinterpolation.swift:22:12:22:30 | TapExpr | | stringinterpolation.swift:22:30:22:30 | [post] $interpolation | stringinterpolation.swift:22:30:22:30 | &... | | stringinterpolation.swift:23:12:23:12 | SSA def($interpolation) | stringinterpolation.swift:23:13:23:13 | $interpolation | -| stringinterpolation.swift:23:12:23:12 | TapExpr | stringinterpolation.swift:23:12:23:12 | "..." | | stringinterpolation.swift:23:12:23:12 | pair: | stringinterpolation.swift:23:13:23:13 | [post] $interpolation | +| stringinterpolation.swift:23:12:23:31 | TapExpr | stringinterpolation.swift:23:12:23:12 | "..." | | stringinterpolation.swift:23:13:23:13 | $interpolation | stringinterpolation.swift:23:13:23:13 | &... | | stringinterpolation.swift:23:13:23:13 | $interpolation | stringinterpolation.swift:23:13:23:13 | [post] $interpolation | | stringinterpolation.swift:23:13:23:13 | &... | stringinterpolation.swift:23:20:23:20 | $interpolation | @@ -531,11 +567,11 @@ | stringinterpolation.swift:23:31:23:31 | | stringinterpolation.swift:23:31:23:31 | [post] $interpolation | | stringinterpolation.swift:23:31:23:31 | $interpolation | stringinterpolation.swift:23:31:23:31 | &... | | stringinterpolation.swift:23:31:23:31 | $interpolation | stringinterpolation.swift:23:31:23:31 | [post] $interpolation | -| stringinterpolation.swift:23:31:23:31 | &... | stringinterpolation.swift:23:12:23:12 | TapExpr | +| stringinterpolation.swift:23:31:23:31 | &... | stringinterpolation.swift:23:12:23:31 | TapExpr | | stringinterpolation.swift:23:31:23:31 | [post] $interpolation | stringinterpolation.swift:23:31:23:31 | &... | | stringinterpolation.swift:24:12:24:12 | SSA def($interpolation) | stringinterpolation.swift:24:13:24:13 | $interpolation | -| stringinterpolation.swift:24:12:24:12 | TapExpr | stringinterpolation.swift:24:12:24:12 | "..." | | stringinterpolation.swift:24:12:24:12 | pair: | stringinterpolation.swift:24:13:24:13 | [post] $interpolation | +| stringinterpolation.swift:24:12:24:24 | TapExpr | stringinterpolation.swift:24:12:24:12 | "..." | | stringinterpolation.swift:24:13:24:13 | $interpolation | stringinterpolation.swift:24:13:24:13 | &... | | stringinterpolation.swift:24:13:24:13 | $interpolation | stringinterpolation.swift:24:13:24:13 | [post] $interpolation | | stringinterpolation.swift:24:13:24:13 | &... | stringinterpolation.swift:24:20:24:20 | $interpolation | @@ -548,7 +584,7 @@ | stringinterpolation.swift:24:24:24:24 | | stringinterpolation.swift:24:24:24:24 | [post] $interpolation | | stringinterpolation.swift:24:24:24:24 | $interpolation | stringinterpolation.swift:24:24:24:24 | &... | | stringinterpolation.swift:24:24:24:24 | $interpolation | stringinterpolation.swift:24:24:24:24 | [post] $interpolation | -| stringinterpolation.swift:24:24:24:24 | &... | stringinterpolation.swift:24:12:24:12 | TapExpr | +| stringinterpolation.swift:24:24:24:24 | &... | stringinterpolation.swift:24:12:24:24 | TapExpr | | stringinterpolation.swift:24:24:24:24 | [post] $interpolation | stringinterpolation.swift:24:24:24:24 | &... | | stringinterpolation.swift:26:6:26:6 | SSA def(p2) | stringinterpolation.swift:27:2:27:2 | p2 | | stringinterpolation.swift:26:6:26:6 | p2 | stringinterpolation.swift:26:6:26:6 | SSA def(p2) | @@ -558,8 +594,8 @@ | stringinterpolation.swift:28:2:28:2 | [post] p2 | stringinterpolation.swift:30:21:30:21 | p2 | | stringinterpolation.swift:28:2:28:2 | p2 | stringinterpolation.swift:30:21:30:21 | p2 | | stringinterpolation.swift:30:12:30:12 | SSA def($interpolation) | stringinterpolation.swift:30:13:30:13 | $interpolation | -| stringinterpolation.swift:30:12:30:12 | TapExpr | stringinterpolation.swift:30:12:30:12 | "..." | | stringinterpolation.swift:30:12:30:12 | pair: | stringinterpolation.swift:30:13:30:13 | [post] $interpolation | +| stringinterpolation.swift:30:12:30:30 | TapExpr | stringinterpolation.swift:30:12:30:12 | "..." | | stringinterpolation.swift:30:13:30:13 | $interpolation | stringinterpolation.swift:30:13:30:13 | &... | | stringinterpolation.swift:30:13:30:13 | $interpolation | stringinterpolation.swift:30:13:30:13 | [post] $interpolation | | stringinterpolation.swift:30:13:30:13 | &... | stringinterpolation.swift:30:20:30:20 | $interpolation | @@ -574,11 +610,11 @@ | stringinterpolation.swift:30:30:30:30 | | stringinterpolation.swift:30:30:30:30 | [post] $interpolation | | stringinterpolation.swift:30:30:30:30 | $interpolation | stringinterpolation.swift:30:30:30:30 | &... | | stringinterpolation.swift:30:30:30:30 | $interpolation | stringinterpolation.swift:30:30:30:30 | [post] $interpolation | -| stringinterpolation.swift:30:30:30:30 | &... | stringinterpolation.swift:30:12:30:12 | TapExpr | +| stringinterpolation.swift:30:30:30:30 | &... | stringinterpolation.swift:30:12:30:30 | TapExpr | | stringinterpolation.swift:30:30:30:30 | [post] $interpolation | stringinterpolation.swift:30:30:30:30 | &... | | stringinterpolation.swift:31:12:31:12 | SSA def($interpolation) | stringinterpolation.swift:31:13:31:13 | $interpolation | -| stringinterpolation.swift:31:12:31:12 | TapExpr | stringinterpolation.swift:31:12:31:12 | "..." | | stringinterpolation.swift:31:12:31:12 | pair: | stringinterpolation.swift:31:13:31:13 | [post] $interpolation | +| stringinterpolation.swift:31:12:31:31 | TapExpr | stringinterpolation.swift:31:12:31:12 | "..." | | stringinterpolation.swift:31:13:31:13 | $interpolation | stringinterpolation.swift:31:13:31:13 | &... | | stringinterpolation.swift:31:13:31:13 | $interpolation | stringinterpolation.swift:31:13:31:13 | [post] $interpolation | | stringinterpolation.swift:31:13:31:13 | &... | stringinterpolation.swift:31:20:31:20 | $interpolation | @@ -593,11 +629,11 @@ | stringinterpolation.swift:31:31:31:31 | | stringinterpolation.swift:31:31:31:31 | [post] $interpolation | | stringinterpolation.swift:31:31:31:31 | $interpolation | stringinterpolation.swift:31:31:31:31 | &... | | stringinterpolation.swift:31:31:31:31 | $interpolation | stringinterpolation.swift:31:31:31:31 | [post] $interpolation | -| stringinterpolation.swift:31:31:31:31 | &... | stringinterpolation.swift:31:12:31:12 | TapExpr | +| stringinterpolation.swift:31:31:31:31 | &... | stringinterpolation.swift:31:12:31:31 | TapExpr | | stringinterpolation.swift:31:31:31:31 | [post] $interpolation | stringinterpolation.swift:31:31:31:31 | &... | | stringinterpolation.swift:32:12:32:12 | SSA def($interpolation) | stringinterpolation.swift:32:13:32:13 | $interpolation | -| stringinterpolation.swift:32:12:32:12 | TapExpr | stringinterpolation.swift:32:12:32:12 | "..." | | stringinterpolation.swift:32:12:32:12 | pair: | stringinterpolation.swift:32:13:32:13 | [post] $interpolation | +| stringinterpolation.swift:32:12:32:24 | TapExpr | stringinterpolation.swift:32:12:32:12 | "..." | | stringinterpolation.swift:32:13:32:13 | $interpolation | stringinterpolation.swift:32:13:32:13 | &... | | stringinterpolation.swift:32:13:32:13 | $interpolation | stringinterpolation.swift:32:13:32:13 | [post] $interpolation | | stringinterpolation.swift:32:13:32:13 | &... | stringinterpolation.swift:32:20:32:20 | $interpolation | @@ -610,7 +646,7 @@ | stringinterpolation.swift:32:24:32:24 | | stringinterpolation.swift:32:24:32:24 | [post] $interpolation | | stringinterpolation.swift:32:24:32:24 | $interpolation | stringinterpolation.swift:32:24:32:24 | &... | | stringinterpolation.swift:32:24:32:24 | $interpolation | stringinterpolation.swift:32:24:32:24 | [post] $interpolation | -| stringinterpolation.swift:32:24:32:24 | &... | stringinterpolation.swift:32:12:32:12 | TapExpr | +| stringinterpolation.swift:32:24:32:24 | &... | stringinterpolation.swift:32:12:32:24 | TapExpr | | stringinterpolation.swift:32:24:32:24 | [post] $interpolation | stringinterpolation.swift:32:24:32:24 | &... | | stringinterpolation.swift:36:6:36:6 | SSA def(a) | stringinterpolation.swift:40:15:40:15 | a | | stringinterpolation.swift:36:6:36:6 | a | stringinterpolation.swift:36:6:36:6 | SSA def(a) | @@ -623,7 +659,7 @@ | stringinterpolation.swift:38:10:38:16 | call to clean() | stringinterpolation.swift:38:6:38:6 | c | | stringinterpolation.swift:40:12:40:12 | | stringinterpolation.swift:40:13:40:13 | [post] $interpolation | | stringinterpolation.swift:40:12:40:12 | SSA def($interpolation) | stringinterpolation.swift:40:13:40:13 | $interpolation | -| stringinterpolation.swift:40:12:40:12 | TapExpr | stringinterpolation.swift:40:12:40:12 | "..." | +| stringinterpolation.swift:40:12:40:26 | TapExpr | stringinterpolation.swift:40:12:40:12 | "..." | | stringinterpolation.swift:40:13:40:13 | $interpolation | stringinterpolation.swift:40:13:40:13 | &... | | stringinterpolation.swift:40:13:40:13 | $interpolation | stringinterpolation.swift:40:13:40:13 | [post] $interpolation | | stringinterpolation.swift:40:13:40:13 | &... | stringinterpolation.swift:40:14:40:14 | $interpolation | @@ -650,11 +686,11 @@ | stringinterpolation.swift:40:26:40:26 | | stringinterpolation.swift:40:26:40:26 | [post] $interpolation | | stringinterpolation.swift:40:26:40:26 | $interpolation | stringinterpolation.swift:40:26:40:26 | &... | | stringinterpolation.swift:40:26:40:26 | $interpolation | stringinterpolation.swift:40:26:40:26 | [post] $interpolation | -| stringinterpolation.swift:40:26:40:26 | &... | stringinterpolation.swift:40:12:40:12 | TapExpr | +| stringinterpolation.swift:40:26:40:26 | &... | stringinterpolation.swift:40:12:40:26 | TapExpr | | stringinterpolation.swift:40:26:40:26 | [post] $interpolation | stringinterpolation.swift:40:26:40:26 | &... | | stringinterpolation.swift:41:12:41:12 | | stringinterpolation.swift:41:13:41:13 | [post] $interpolation | | stringinterpolation.swift:41:12:41:12 | SSA def($interpolation) | stringinterpolation.swift:41:13:41:13 | $interpolation | -| stringinterpolation.swift:41:12:41:12 | TapExpr | stringinterpolation.swift:41:12:41:12 | "..." | +| stringinterpolation.swift:41:12:41:26 | TapExpr | stringinterpolation.swift:41:12:41:12 | "..." | | stringinterpolation.swift:41:13:41:13 | $interpolation | stringinterpolation.swift:41:13:41:13 | &... | | stringinterpolation.swift:41:13:41:13 | $interpolation | stringinterpolation.swift:41:13:41:13 | [post] $interpolation | | stringinterpolation.swift:41:13:41:13 | &... | stringinterpolation.swift:41:14:41:14 | $interpolation | @@ -681,11 +717,11 @@ | stringinterpolation.swift:41:26:41:26 | | stringinterpolation.swift:41:26:41:26 | [post] $interpolation | | stringinterpolation.swift:41:26:41:26 | $interpolation | stringinterpolation.swift:41:26:41:26 | &... | | stringinterpolation.swift:41:26:41:26 | $interpolation | stringinterpolation.swift:41:26:41:26 | [post] $interpolation | -| stringinterpolation.swift:41:26:41:26 | &... | stringinterpolation.swift:41:12:41:12 | TapExpr | +| stringinterpolation.swift:41:26:41:26 | &... | stringinterpolation.swift:41:12:41:26 | TapExpr | | stringinterpolation.swift:41:26:41:26 | [post] $interpolation | stringinterpolation.swift:41:26:41:26 | &... | | stringinterpolation.swift:42:12:42:12 | | stringinterpolation.swift:42:13:42:13 | [post] $interpolation | | stringinterpolation.swift:42:12:42:12 | SSA def($interpolation) | stringinterpolation.swift:42:13:42:13 | $interpolation | -| stringinterpolation.swift:42:12:42:12 | TapExpr | stringinterpolation.swift:42:12:42:12 | "..." | +| stringinterpolation.swift:42:12:42:26 | TapExpr | stringinterpolation.swift:42:12:42:12 | "..." | | stringinterpolation.swift:42:13:42:13 | $interpolation | stringinterpolation.swift:42:13:42:13 | &... | | stringinterpolation.swift:42:13:42:13 | $interpolation | stringinterpolation.swift:42:13:42:13 | [post] $interpolation | | stringinterpolation.swift:42:13:42:13 | &... | stringinterpolation.swift:42:14:42:14 | $interpolation | @@ -710,11 +746,11 @@ | stringinterpolation.swift:42:26:42:26 | | stringinterpolation.swift:42:26:42:26 | [post] $interpolation | | stringinterpolation.swift:42:26:42:26 | $interpolation | stringinterpolation.swift:42:26:42:26 | &... | | stringinterpolation.swift:42:26:42:26 | $interpolation | stringinterpolation.swift:42:26:42:26 | [post] $interpolation | -| stringinterpolation.swift:42:26:42:26 | &... | stringinterpolation.swift:42:12:42:12 | TapExpr | +| stringinterpolation.swift:42:26:42:26 | &... | stringinterpolation.swift:42:12:42:26 | TapExpr | | stringinterpolation.swift:42:26:42:26 | [post] $interpolation | stringinterpolation.swift:42:26:42:26 | &... | | stringinterpolation.swift:43:12:43:12 | | stringinterpolation.swift:43:13:43:13 | [post] $interpolation | | stringinterpolation.swift:43:12:43:12 | SSA def($interpolation) | stringinterpolation.swift:43:13:43:13 | $interpolation | -| stringinterpolation.swift:43:12:43:12 | TapExpr | stringinterpolation.swift:43:12:43:12 | "..." | +| stringinterpolation.swift:43:12:43:26 | TapExpr | stringinterpolation.swift:43:12:43:12 | "..." | | stringinterpolation.swift:43:13:43:13 | $interpolation | stringinterpolation.swift:43:13:43:13 | &... | | stringinterpolation.swift:43:13:43:13 | $interpolation | stringinterpolation.swift:43:13:43:13 | [post] $interpolation | | stringinterpolation.swift:43:13:43:13 | &... | stringinterpolation.swift:43:14:43:14 | $interpolation | @@ -739,11 +775,11 @@ | stringinterpolation.swift:43:26:43:26 | | stringinterpolation.swift:43:26:43:26 | [post] $interpolation | | stringinterpolation.swift:43:26:43:26 | $interpolation | stringinterpolation.swift:43:26:43:26 | &... | | stringinterpolation.swift:43:26:43:26 | $interpolation | stringinterpolation.swift:43:26:43:26 | [post] $interpolation | -| stringinterpolation.swift:43:26:43:26 | &... | stringinterpolation.swift:43:12:43:12 | TapExpr | +| stringinterpolation.swift:43:26:43:26 | &... | stringinterpolation.swift:43:12:43:26 | TapExpr | | stringinterpolation.swift:43:26:43:26 | [post] $interpolation | stringinterpolation.swift:43:26:43:26 | &... | | stringinterpolation.swift:44:12:44:12 | | stringinterpolation.swift:44:13:44:13 | [post] $interpolation | | stringinterpolation.swift:44:12:44:12 | SSA def($interpolation) | stringinterpolation.swift:44:13:44:13 | $interpolation | -| stringinterpolation.swift:44:12:44:12 | TapExpr | stringinterpolation.swift:44:12:44:12 | "..." | +| stringinterpolation.swift:44:12:44:26 | TapExpr | stringinterpolation.swift:44:12:44:12 | "..." | | stringinterpolation.swift:44:13:44:13 | $interpolation | stringinterpolation.swift:44:13:44:13 | &... | | stringinterpolation.swift:44:13:44:13 | $interpolation | stringinterpolation.swift:44:13:44:13 | [post] $interpolation | | stringinterpolation.swift:44:13:44:13 | &... | stringinterpolation.swift:44:14:44:14 | $interpolation | @@ -768,7 +804,7 @@ | stringinterpolation.swift:44:26:44:26 | | stringinterpolation.swift:44:26:44:26 | [post] $interpolation | | stringinterpolation.swift:44:26:44:26 | $interpolation | stringinterpolation.swift:44:26:44:26 | &... | | stringinterpolation.swift:44:26:44:26 | $interpolation | stringinterpolation.swift:44:26:44:26 | [post] $interpolation | -| stringinterpolation.swift:44:26:44:26 | &... | stringinterpolation.swift:44:12:44:12 | TapExpr | +| stringinterpolation.swift:44:26:44:26 | &... | stringinterpolation.swift:44:12:44:26 | TapExpr | | stringinterpolation.swift:44:26:44:26 | [post] $interpolation | stringinterpolation.swift:44:26:44:26 | &... | | subscript.swift:1:7:1:7 | SSA def(self) | subscript.swift:1:7:1:7 | self[return] | | subscript.swift:1:7:1:7 | SSA def(self) | subscript.swift:1:7:1:7 | self[return] | diff --git a/swift/ql/test/library-tests/dataflow/taint/core/Taint.expected b/swift/ql/test/library-tests/dataflow/taint/core/Taint.expected index 70cf2d3eaf00..7563f2173553 100644 --- a/swift/ql/test/library-tests/dataflow/taint/core/Taint.expected +++ b/swift/ql/test/library-tests/dataflow/taint/core/Taint.expected @@ -1,153 +1,173 @@ edges -| conversions.swift:33:16:33:26 | call to sourceInt() | conversions.swift:33:12:33:27 | call to Self.init(_:) | provenance | | -| conversions.swift:34:18:34:28 | call to sourceInt() | conversions.swift:34:12:34:29 | call to Self.init(_:) | provenance | | -| conversions.swift:35:18:35:28 | call to sourceInt() | conversions.swift:35:12:35:29 | call to Float.init(_:) | provenance | | -| conversions.swift:36:19:36:29 | call to sourceInt() | conversions.swift:36:12:36:30 | call to String.init(_:) | provenance | | -| conversions.swift:37:12:37:30 | call to String.init(_:) | conversions.swift:37:12:37:32 | .utf8 | provenance | | -| conversions.swift:37:19:37:29 | call to sourceInt() | conversions.swift:37:12:37:30 | call to String.init(_:) | provenance | | -| conversions.swift:39:12:39:30 | [...] [Collection element] | conversions.swift:40:12:40:12 | arr | provenance | | -| conversions.swift:39:12:39:30 | [...] [Collection element] | conversions.swift:41:12:41:12 | arr [Collection element] | provenance | | -| conversions.swift:39:12:39:30 | [...] [Collection element] | conversions.swift:42:20:42:20 | arr [Collection element] | provenance | | -| conversions.swift:39:12:39:30 | [...] [Collection element] | conversions.swift:43:20:43:20 | arr [Collection element] | provenance | | -| conversions.swift:39:19:39:29 | call to sourceInt() | conversions.swift:39:12:39:30 | [...] [Collection element] | provenance | | -| conversions.swift:41:12:41:12 | arr [Collection element] | conversions.swift:41:12:41:17 | ...[...] | provenance | | -| conversions.swift:42:20:42:20 | arr [Collection element] | conversions.swift:42:12:42:23 | call to Array.init(_:) | provenance | | -| conversions.swift:43:12:43:23 | call to Array.init(_:) [Collection element] | conversions.swift:43:12:43:26 | ...[...] | provenance | | -| conversions.swift:43:20:43:20 | arr [Collection element] | conversions.swift:43:12:43:23 | call to Array.init(_:) [Collection element] | provenance | | -| conversions.swift:44:20:44:33 | call to sourceString() | conversions.swift:44:20:44:35 | .utf8 | provenance | | -| conversions.swift:44:20:44:35 | .utf8 | conversions.swift:44:12:44:39 | call to Array.init(_:) | provenance | | -| conversions.swift:45:12:45:39 | call to Array.init(_:) [Collection element] | conversions.swift:45:12:45:42 | ...[...] | provenance | | -| conversions.swift:45:20:45:33 | call to sourceString() | conversions.swift:45:20:45:35 | .utf8 | provenance | | -| conversions.swift:45:20:45:35 | .utf8 | conversions.swift:45:12:45:39 | call to Array.init(_:) [Collection element] | provenance | | -| conversions.swift:47:13:47:23 | call to sourceInt() | conversions.swift:48:13:48:13 | v | provenance | | -| conversions.swift:51:18:51:41 | call to numericCast(_:) | conversions.swift:52:12:52:12 | v2 | provenance | | -| conversions.swift:51:30:51:40 | call to sourceInt() | conversions.swift:51:18:51:41 | call to numericCast(_:) | provenance | | -| conversions.swift:54:17:54:57 | call to unsafeBitCast(_:to:) | conversions.swift:55:12:55:12 | v4 | provenance | | -| conversions.swift:54:31:54:41 | call to sourceInt() | conversions.swift:54:17:54:57 | call to unsafeBitCast(_:to:) | provenance | | -| conversions.swift:57:11:57:47 | call to Self.init(truncatingIfNeeded:) | conversions.swift:58:12:58:12 | v5 | provenance | | -| conversions.swift:57:36:57:46 | call to sourceInt() | conversions.swift:57:11:57:47 | call to Self.init(truncatingIfNeeded:) | provenance | | -| conversions.swift:60:11:60:39 | call to UInt.init(bitPattern:) | conversions.swift:61:12:61:12 | v6 | provenance | | -| conversions.swift:60:28:60:38 | call to sourceInt() | conversions.swift:60:11:60:39 | call to UInt.init(bitPattern:) | provenance | | -| conversions.swift:63:11:63:26 | call to abs(_:) | conversions.swift:64:12:64:12 | v7 | provenance | | -| conversions.swift:63:15:63:25 | call to sourceInt() | conversions.swift:63:11:63:26 | call to abs(_:) | provenance | | -| conversions.swift:69:28:69:38 | call to sourceInt() | conversions.swift:69:12:69:39 | call to advanced(by:) | provenance | | -| conversions.swift:71:12:71:36 | call to Self.init(exactly:) [some:0] | conversions.swift:71:12:71:37 | ...! | provenance | | -| conversions.swift:71:25:71:35 | call to sourceInt() | conversions.swift:71:12:71:36 | call to Self.init(exactly:) [some:0] | provenance | | -| conversions.swift:72:12:72:39 | call to Self.init(exactly:) [some:0] | conversions.swift:72:12:72:40 | ...! | provenance | | -| conversions.swift:72:28:72:38 | call to sourceInt() | conversions.swift:72:12:72:39 | call to Self.init(exactly:) [some:0] | provenance | | -| conversions.swift:73:26:73:36 | call to sourceInt() | conversions.swift:73:12:73:37 | call to Self.init(clamping:) | provenance | | -| conversions.swift:74:36:74:46 | call to sourceInt() | conversions.swift:74:12:74:47 | call to Self.init(truncatingIfNeeded:) | provenance | | -| conversions.swift:75:12:75:41 | call to Self.init(_:radix:) [some:0] | conversions.swift:75:12:75:42 | ...! | provenance | | -| conversions.swift:75:16:75:29 | call to sourceString() | conversions.swift:75:12:75:41 | call to Self.init(_:radix:) [some:0] | provenance | | -| conversions.swift:77:30:77:40 | call to sourceInt() | conversions.swift:77:12:77:41 | call to Self.init(littleEndian:) | provenance | | -| conversions.swift:78:27:78:37 | call to sourceInt() | conversions.swift:78:12:78:38 | call to Self.init(bigEndian:) | provenance | | -| conversions.swift:79:12:79:22 | call to sourceInt() | conversions.swift:79:12:79:24 | .littleEndian | provenance | | -| conversions.swift:80:12:80:22 | call to sourceInt() | conversions.swift:80:12:80:24 | .bigEndian | provenance | | -| conversions.swift:109:18:109:30 | call to sourceFloat() | conversions.swift:109:12:109:31 | call to Float.init(_:) | provenance | | -| conversions.swift:110:18:110:30 | call to sourceFloat() | conversions.swift:110:12:110:31 | call to UInt8.init(_:) | provenance | | -| conversions.swift:111:19:111:31 | call to sourceFloat() | conversions.swift:111:12:111:32 | call to String.init(_:) | provenance | | -| conversions.swift:112:12:112:32 | call to String.init(_:) | conversions.swift:112:12:112:34 | .utf8 | provenance | | -| conversions.swift:112:19:112:31 | call to sourceFloat() | conversions.swift:112:12:112:32 | call to String.init(_:) | provenance | | -| conversions.swift:113:19:113:33 | call to sourceFloat80() | conversions.swift:113:12:113:34 | call to String.init(_:) | provenance | | -| conversions.swift:114:12:114:34 | call to String.init(_:) | conversions.swift:114:12:114:36 | .utf8 | provenance | | -| conversions.swift:114:19:114:33 | call to sourceFloat80() | conversions.swift:114:12:114:34 | call to String.init(_:) | provenance | | -| conversions.swift:115:19:115:32 | call to sourceDouble() | conversions.swift:115:12:115:33 | call to String.init(_:) | provenance | | -| conversions.swift:116:12:116:33 | call to String.init(_:) | conversions.swift:116:12:116:35 | .utf8 | provenance | | -| conversions.swift:116:19:116:32 | call to sourceDouble() | conversions.swift:116:12:116:33 | call to String.init(_:) | provenance | | -| conversions.swift:118:18:118:30 | call to sourceFloat() | conversions.swift:118:12:118:31 | call to Float.init(_:) | provenance | | -| conversions.swift:119:41:119:51 | call to sourceInt() | conversions.swift:119:12:119:70 | call to Float.init(sign:exponent:significand:) | provenance | | -| conversions.swift:120:57:120:69 | call to sourceFloat() | conversions.swift:120:12:120:70 | call to Float.init(sign:exponent:significand:) | provenance | | -| conversions.swift:122:44:122:56 | call to sourceFloat() | conversions.swift:122:12:122:57 | call to Float.init(signOf:magnitudeOf:) | provenance | | -| conversions.swift:124:12:124:24 | call to sourceFloat() | conversions.swift:124:12:124:26 | .exponent | provenance | | -| conversions.swift:125:12:125:24 | call to sourceFloat() | conversions.swift:125:12:125:26 | .significand | provenance | | -| conversions.swift:126:12:126:26 | call to sourceFloat80() | conversions.swift:126:12:126:28 | .exponent | provenance | | -| conversions.swift:127:12:127:26 | call to sourceFloat80() | conversions.swift:127:12:127:28 | .significand | provenance | | -| conversions.swift:128:12:128:25 | call to sourceDouble() | conversions.swift:128:12:128:27 | .exponent | provenance | | -| conversions.swift:129:12:129:25 | call to sourceDouble() | conversions.swift:129:12:129:27 | .significand | provenance | | -| conversions.swift:130:12:130:23 | call to sourceUInt() | conversions.swift:130:12:130:25 | .byteSwapped | provenance | | -| conversions.swift:131:12:131:25 | call to sourceUInt64() | conversions.swift:131:12:131:27 | .byteSwapped | provenance | | -| conversions.swift:136:19:136:32 | call to sourceString() | conversions.swift:136:12:136:33 | call to String.init(_:) | provenance | | -| conversions.swift:144:12:144:35 | call to MyString.init(_:) | conversions.swift:144:12:144:35 | call to MyString.init(_:) [some:0] | provenance | | -| conversions.swift:144:12:144:35 | call to MyString.init(_:) | conversions.swift:145:12:145:12 | ms2 | provenance | | -| conversions.swift:144:12:144:35 | call to MyString.init(_:) | conversions.swift:146:12:146:16 | .description | provenance | | -| conversions.swift:144:12:144:35 | call to MyString.init(_:) | conversions.swift:147:12:147:16 | .debugDescription | provenance | | -| conversions.swift:144:12:144:35 | call to MyString.init(_:) [some:0] | conversions.swift:144:12:144:36 | ...! | provenance | | -| conversions.swift:144:12:144:36 | ...! | conversions.swift:145:12:145:12 | ms2 | provenance | | -| conversions.swift:144:12:144:36 | ...! | conversions.swift:146:12:146:16 | .description | provenance | | -| conversions.swift:144:12:144:36 | ...! | conversions.swift:147:12:147:16 | .debugDescription | provenance | | -| conversions.swift:144:21:144:34 | call to sourceString() | conversions.swift:144:12:144:35 | call to MyString.init(_:) | provenance | | -| conversions.swift:152:31:152:44 | call to sourceString() | conversions.swift:153:12:153:12 | parent | provenance | | -| conversions.swift:152:31:152:44 | call to sourceString() | conversions.swift:154:12:154:12 | parent | provenance | | -| conversions.swift:152:31:152:44 | call to sourceString() | conversions.swift:156:40:156:40 | parent | provenance | | -| conversions.swift:156:25:156:69 | call to unsafeDowncast(_:to:) | conversions.swift:157:12:157:12 | v3 | provenance | | -| conversions.swift:156:25:156:69 | call to unsafeDowncast(_:to:) | conversions.swift:158:12:158:12 | v3 | provenance | | -| conversions.swift:156:40:156:40 | parent | conversions.swift:156:25:156:69 | call to unsafeDowncast(_:to:) | provenance | | -| conversions.swift:166:24:166:34 | call to sourceInt() | conversions.swift:166:12:166:35 | call to Self.init(_:) | provenance | | -| conversions.swift:171:14:171:33 | call to sourceArray(_:) | conversions.swift:173:13:173:13 | arr1 | provenance | | -| conversions.swift:171:14:171:33 | call to sourceArray(_:) | conversions.swift:175:13:175:19 | ...[...] | provenance | | -| conversions.swift:171:14:171:33 | call to sourceArray(_:) | conversions.swift:178:25:178:25 | arr1 | provenance | | -| conversions.swift:171:14:171:33 | call to sourceArray(_:) | conversions.swift:185:31:185:31 | arr1 | provenance | | -| conversions.swift:172:14:172:26 | [...] [Collection element] | conversions.swift:174:13:174:13 | arr2 | provenance | | -| conversions.swift:172:14:172:26 | [...] [Collection element] | conversions.swift:176:13:176:13 | arr2 [Collection element] | provenance | | -| conversions.swift:172:14:172:26 | [...] [Collection element] | conversions.swift:179:25:179:25 | arr2 [Collection element] | provenance | | -| conversions.swift:172:14:172:26 | [...] [Collection element] | conversions.swift:186:31:186:31 | arr2 [Collection element] | provenance | | -| conversions.swift:172:15:172:25 | call to sourceInt() | conversions.swift:172:14:172:26 | [...] [Collection element] | provenance | | -| conversions.swift:176:13:176:13 | arr2 [Collection element] | conversions.swift:176:13:176:19 | ...[...] | provenance | | -| conversions.swift:178:19:178:29 | call to Array.init(_:) [Collection element] | conversions.swift:180:13:180:13 | arr1b | provenance | | -| conversions.swift:178:19:178:29 | call to Array.init(_:) [Collection element] | conversions.swift:182:13:182:13 | arr1b [Collection element] | provenance | | -| conversions.swift:178:25:178:25 | arr1 | conversions.swift:178:19:178:29 | call to Array.init(_:) [Collection element] | provenance | | -| conversions.swift:179:19:179:29 | call to Array.init(_:) [Collection element] | conversions.swift:181:13:181:13 | arr2b | provenance | | -| conversions.swift:179:19:179:29 | call to Array.init(_:) [Collection element] | conversions.swift:183:13:183:13 | arr2b [Collection element] | provenance | | -| conversions.swift:179:25:179:25 | arr2 [Collection element] | conversions.swift:179:19:179:29 | call to Array.init(_:) [Collection element] | provenance | | -| conversions.swift:182:13:182:13 | arr1b [Collection element] | conversions.swift:182:13:182:20 | ...[...] | provenance | | -| conversions.swift:183:13:183:13 | arr2b [Collection element] | conversions.swift:183:13:183:20 | ...[...] | provenance | | -| conversions.swift:185:15:185:35 | call to ContiguousArray.init(_:) [Collection element] | conversions.swift:187:13:187:13 | arr1c | provenance | | -| conversions.swift:185:15:185:35 | call to ContiguousArray.init(_:) [Collection element] | conversions.swift:189:13:189:13 | arr1c [Collection element] | provenance | | -| conversions.swift:185:31:185:31 | arr1 | conversions.swift:185:15:185:35 | call to ContiguousArray.init(_:) [Collection element] | provenance | | -| conversions.swift:186:15:186:35 | call to ContiguousArray.init(_:) [Collection element] | conversions.swift:188:13:188:13 | arr2c | provenance | | -| conversions.swift:186:15:186:35 | call to ContiguousArray.init(_:) [Collection element] | conversions.swift:190:13:190:13 | arr2c [Collection element] | provenance | | -| conversions.swift:186:31:186:31 | arr2 [Collection element] | conversions.swift:186:15:186:35 | call to ContiguousArray.init(_:) [Collection element] | provenance | | -| conversions.swift:189:13:189:13 | arr1c [Collection element] | conversions.swift:189:13:189:20 | ...[...] | provenance | | -| conversions.swift:190:13:190:13 | arr2c [Collection element] | conversions.swift:190:13:190:20 | ...[...] | provenance | | -| conversions.swift:197:6:197:6 | self [v] | file://:0:0:0:0 | self [v] | provenance | | -| conversions.swift:199:7:199:12 | v | conversions.swift:200:12:200:12 | v | provenance | | -| conversions.swift:200:3:200:3 | [post] self [v] | conversions.swift:199:2:201:2 | self[return] [v] | provenance | | -| conversions.swift:200:12:200:12 | v | conversions.swift:200:3:200:3 | [post] self [v] | provenance | | -| conversions.swift:205:7:205:17 | withUInt | conversions.swift:206:13:206:13 | withUInt | provenance | | -| conversions.swift:205:7:205:17 | withUInt | conversions.swift:207:14:207:14 | withUInt | provenance | | -| conversions.swift:207:10:207:22 | call to Self.init(_:) | conversions.swift:205:2:209:2 | self[return] | provenance | | -| conversions.swift:207:10:207:22 | call to Self.init(_:) | conversions.swift:208:12:208:12 | self | provenance | | -| conversions.swift:207:14:207:14 | withUInt | conversions.swift:207:10:207:22 | call to Self.init(_:) | provenance | | -| conversions.swift:211:7:211:20 | withMyValue [v] | conversions.swift:212:13:212:13 | withMyValue [v] | provenance | | -| conversions.swift:212:13:212:13 | withMyValue [v] | conversions.swift:197:6:197:6 | self [v] | provenance | | -| conversions.swift:212:13:212:13 | withMyValue [v] | conversions.swift:212:13:212:25 | .v | provenance | | -| conversions.swift:217:7:217:21 | withMyValue2 [v] | conversions.swift:218:13:218:13 | withMyValue2 [v] | provenance | | -| conversions.swift:217:7:217:21 | withMyValue2 [v] | conversions.swift:219:11:219:11 | withMyValue2 [v] | provenance | | -| conversions.swift:218:13:218:13 | withMyValue2 [v] | conversions.swift:197:6:197:6 | self [v] | provenance | | -| conversions.swift:218:13:218:13 | withMyValue2 [v] | conversions.swift:218:13:218:26 | .v | provenance | | -| conversions.swift:219:11:219:11 | withMyValue2 [v] | conversions.swift:197:6:197:6 | self [v] | provenance | | -| conversions.swift:219:11:219:11 | withMyValue2 [v] | conversions.swift:219:11:219:24 | .v | provenance | | -| conversions.swift:219:11:219:24 | .v | conversions.swift:217:2:222:2 | self[return] | provenance | | -| conversions.swift:219:11:219:24 | .v | conversions.swift:221:12:221:12 | self | provenance | | -| conversions.swift:224:20:224:33 | withMyValue [v] | conversions.swift:225:13:225:13 | withMyValue [v] | provenance | | -| conversions.swift:224:20:224:33 | withMyValue [v] | conversions.swift:226:10:226:10 | withMyValue [v] | provenance | | -| conversions.swift:225:13:225:13 | withMyValue [v] | conversions.swift:197:6:197:6 | self [v] | provenance | | -| conversions.swift:225:13:225:13 | withMyValue [v] | conversions.swift:225:13:225:25 | .v | provenance | | -| conversions.swift:226:10:226:10 | withMyValue [v] | conversions.swift:197:6:197:6 | self [v] | provenance | | -| conversions.swift:226:10:226:10 | withMyValue [v] | conversions.swift:226:10:226:22 | .v | provenance | | -| conversions.swift:232:26:232:37 | call to sourceUInt() | conversions.swift:205:7:205:17 | withUInt | provenance | | -| conversions.swift:232:26:232:37 | call to sourceUInt() | conversions.swift:232:12:232:38 | call to Int.init(withUInt:) | provenance | | -| conversions.swift:235:29:235:48 | call to MyValue.init(_:) [v] | conversions.swift:211:7:211:20 | withMyValue [v] | provenance | | -| conversions.swift:235:37:235:47 | call to sourceInt() | conversions.swift:199:7:199:12 | v | provenance | | -| conversions.swift:235:37:235:47 | call to sourceInt() | conversions.swift:235:29:235:48 | call to MyValue.init(_:) [v] | provenance | | -| conversions.swift:238:30:238:49 | call to MyValue.init(_:) [v] | conversions.swift:217:7:217:21 | withMyValue2 [v] | provenance | | -| conversions.swift:238:30:238:49 | call to MyValue.init(_:) [v] | conversions.swift:238:12:238:50 | call to Int.init(withMyValue2:) | provenance | | -| conversions.swift:238:38:238:48 | call to sourceInt() | conversions.swift:199:7:199:12 | v | provenance | | -| conversions.swift:238:38:238:48 | call to sourceInt() | conversions.swift:238:30:238:49 | call to MyValue.init(_:) [v] | provenance | | -| conversions.swift:241:35:241:54 | call to MyValue.init(_:) [v] | conversions.swift:224:20:224:33 | withMyValue [v] | provenance | | -| conversions.swift:241:35:241:54 | call to MyValue.init(_:) [v] | conversions.swift:241:12:241:55 | call to mkInt(withMyValue:) | provenance | | -| conversions.swift:241:43:241:53 | call to sourceInt() | conversions.swift:199:7:199:12 | v | provenance | | -| conversions.swift:241:43:241:53 | call to sourceInt() | conversions.swift:241:35:241:54 | call to MyValue.init(_:) [v] | provenance | | +| conversions.swift:33:16:33:35 | call to sourceInt(_:) | conversions.swift:33:12:33:36 | call to Self.init(_:) | provenance | | +| conversions.swift:34:17:34:36 | call to sourceInt(_:) | conversions.swift:34:12:34:37 | call to Self.init(_:) | provenance | | +| conversions.swift:35:18:35:37 | call to sourceInt(_:) | conversions.swift:35:12:35:38 | call to Self.init(_:) | provenance | | +| conversions.swift:36:18:36:37 | call to sourceInt(_:) | conversions.swift:36:12:36:38 | call to Self.init(_:) | provenance | | +| conversions.swift:37:18:37:37 | call to sourceInt(_:) | conversions.swift:37:12:37:38 | call to Self.init(_:) | provenance | | +| conversions.swift:39:17:39:36 | call to sourceInt(_:) | conversions.swift:39:12:39:37 | call to Self.init(_:) | provenance | | +| conversions.swift:40:18:40:37 | call to sourceInt(_:) | conversions.swift:40:12:40:38 | call to Self.init(_:) | provenance | | +| conversions.swift:41:19:41:39 | call to sourceInt(_:) | conversions.swift:41:12:41:40 | call to Self.init(_:) | provenance | | +| conversions.swift:42:19:42:39 | call to sourceInt(_:) | conversions.swift:42:12:42:40 | call to Self.init(_:) | provenance | | +| conversions.swift:43:19:43:39 | call to sourceInt(_:) | conversions.swift:43:12:43:40 | call to Self.init(_:) | provenance | | +| conversions.swift:45:18:45:38 | call to sourceInt(_:) | conversions.swift:45:12:45:39 | call to Float.init(_:) | provenance | | +| conversions.swift:46:19:46:39 | call to sourceInt(_:) | conversions.swift:46:12:46:40 | call to Double.init(_:) | provenance | | +| conversions.swift:47:19:47:39 | call to sourceInt(_:) | conversions.swift:47:12:47:40 | call to String.init(_:) | provenance | | +| conversions.swift:48:12:48:40 | call to String.init(_:) | conversions.swift:48:12:48:42 | .utf8 | provenance | | +| conversions.swift:48:19:48:39 | call to sourceInt(_:) | conversions.swift:48:12:48:40 | call to String.init(_:) | provenance | | +| conversions.swift:50:12:50:39 | [...] [Collection element] | conversions.swift:51:12:51:12 | arr | provenance | | +| conversions.swift:50:12:50:39 | [...] [Collection element] | conversions.swift:52:12:52:12 | arr [Collection element] | provenance | | +| conversions.swift:50:12:50:39 | [...] [Collection element] | conversions.swift:53:20:53:20 | arr [Collection element] | provenance | | +| conversions.swift:50:12:50:39 | [...] [Collection element] | conversions.swift:54:20:54:20 | arr [Collection element] | provenance | | +| conversions.swift:50:19:50:38 | call to sourceInt(_:) | conversions.swift:50:12:50:39 | [...] [Collection element] | provenance | | +| conversions.swift:52:12:52:12 | arr [Collection element] | conversions.swift:52:12:52:17 | ...[...] | provenance | | +| conversions.swift:53:20:53:20 | arr [Collection element] | conversions.swift:53:12:53:23 | call to Array.init(_:) | provenance | | +| conversions.swift:54:12:54:23 | call to Array.init(_:) [Collection element] | conversions.swift:54:12:54:26 | ...[...] | provenance | | +| conversions.swift:54:20:54:20 | arr [Collection element] | conversions.swift:54:12:54:23 | call to Array.init(_:) [Collection element] | provenance | | +| conversions.swift:55:20:55:42 | call to sourceString(_:) | conversions.swift:55:20:55:44 | .utf8 | provenance | | +| conversions.swift:55:20:55:44 | .utf8 | conversions.swift:55:12:55:48 | call to Array.init(_:) | provenance | | +| conversions.swift:56:12:56:48 | call to Array.init(_:) [Collection element] | conversions.swift:56:12:56:51 | ...[...] | provenance | | +| conversions.swift:56:20:56:42 | call to sourceString(_:) | conversions.swift:56:20:56:44 | .utf8 | provenance | | +| conversions.swift:56:20:56:44 | .utf8 | conversions.swift:56:12:56:48 | call to Array.init(_:) [Collection element] | provenance | | +| conversions.swift:58:13:58:32 | call to sourceInt(_:) | conversions.swift:59:13:59:13 | v | provenance | | +| conversions.swift:62:18:62:50 | call to numericCast(_:) | conversions.swift:63:12:63:12 | v2 | provenance | | +| conversions.swift:62:30:62:49 | call to sourceInt(_:) | conversions.swift:62:18:62:50 | call to numericCast(_:) | provenance | | +| conversions.swift:65:17:65:66 | call to unsafeBitCast(_:to:) | conversions.swift:66:12:66:12 | v4 | provenance | | +| conversions.swift:65:31:65:50 | call to sourceInt(_:) | conversions.swift:65:17:65:66 | call to unsafeBitCast(_:to:) | provenance | | +| conversions.swift:68:11:68:56 | call to Self.init(truncatingIfNeeded:) | conversions.swift:69:12:69:12 | v5 | provenance | | +| conversions.swift:68:36:68:55 | call to sourceInt(_:) | conversions.swift:68:11:68:56 | call to Self.init(truncatingIfNeeded:) | provenance | | +| conversions.swift:71:11:71:48 | call to UInt.init(bitPattern:) | conversions.swift:72:12:72:12 | v6 | provenance | | +| conversions.swift:71:28:71:47 | call to sourceInt(_:) | conversions.swift:71:11:71:48 | call to UInt.init(bitPattern:) | provenance | | +| conversions.swift:74:11:74:35 | call to abs(_:) | conversions.swift:75:12:75:12 | v7 | provenance | | +| conversions.swift:74:15:74:34 | call to sourceInt(_:) | conversions.swift:74:11:74:35 | call to abs(_:) | provenance | | +| conversions.swift:80:28:80:47 | call to sourceInt(_:) | conversions.swift:80:12:80:48 | call to advanced(by:) | provenance | | +| conversions.swift:82:28:82:50 | call to sourceUInt64(_:) | conversions.swift:82:12:82:51 | call to distance(to:) | provenance | | +| conversions.swift:84:12:84:45 | call to Self.init(exactly:) [some:0] | conversions.swift:84:12:84:46 | ...! | provenance | | +| conversions.swift:84:25:84:44 | call to sourceInt(_:) | conversions.swift:84:12:84:45 | call to Self.init(exactly:) [some:0] | provenance | | +| conversions.swift:85:12:85:48 | call to Self.init(exactly:) [some:0] | conversions.swift:85:12:85:49 | ...! | provenance | | +| conversions.swift:85:28:85:47 | call to sourceInt(_:) | conversions.swift:85:12:85:48 | call to Self.init(exactly:) [some:0] | provenance | | +| conversions.swift:86:26:86:45 | call to sourceInt(_:) | conversions.swift:86:12:86:46 | call to Self.init(clamping:) | provenance | | +| conversions.swift:87:29:87:48 | call to sourceInt(_:) | conversions.swift:87:12:87:49 | call to Self.init(clamping:) | provenance | | +| conversions.swift:88:36:88:55 | call to sourceInt(_:) | conversions.swift:88:12:88:56 | call to Self.init(truncatingIfNeeded:) | provenance | | +| conversions.swift:89:39:89:58 | call to sourceInt(_:) | conversions.swift:89:12:89:59 | call to Self.init(truncatingIfNeeded:) | provenance | | +| conversions.swift:90:12:90:50 | call to Self.init(_:radix:) [some:0] | conversions.swift:90:12:90:51 | ...! | provenance | | +| conversions.swift:90:16:90:38 | call to sourceString(_:) | conversions.swift:90:12:90:50 | call to Self.init(_:radix:) [some:0] | provenance | | +| conversions.swift:91:12:91:53 | call to Self.init(_:radix:) [some:0] | conversions.swift:91:12:91:54 | ...! | provenance | | +| conversions.swift:91:19:91:41 | call to sourceString(_:) | conversions.swift:91:12:91:53 | call to Self.init(_:radix:) [some:0] | provenance | | +| conversions.swift:93:30:93:49 | call to sourceInt(_:) | conversions.swift:93:12:93:50 | call to Self.init(littleEndian:) | provenance | | +| conversions.swift:94:33:94:55 | call to sourceUInt64(_:) | conversions.swift:94:12:94:56 | call to Self.init(littleEndian:) | provenance | | +| conversions.swift:95:27:95:46 | call to sourceInt(_:) | conversions.swift:95:12:95:47 | call to Self.init(bigEndian:) | provenance | | +| conversions.swift:96:30:96:52 | call to sourceUInt64(_:) | conversions.swift:96:12:96:53 | call to Self.init(bigEndian:) | provenance | | +| conversions.swift:97:12:97:31 | call to sourceInt(_:) | conversions.swift:97:12:97:33 | .littleEndian | provenance | | +| conversions.swift:98:12:98:34 | call to sourceUInt64(_:) | conversions.swift:98:12:98:36 | .littleEndian | provenance | | +| conversions.swift:99:12:99:31 | call to sourceInt(_:) | conversions.swift:99:12:99:33 | .bigEndian | provenance | | +| conversions.swift:100:12:100:34 | call to sourceUInt64(_:) | conversions.swift:100:12:100:36 | .bigEndian | provenance | | +| conversions.swift:137:18:137:39 | call to sourceFloat(_:) | conversions.swift:137:12:137:40 | call to Float.init(_:) | provenance | | +| conversions.swift:138:18:138:39 | call to sourceFloat(_:) | conversions.swift:138:12:138:40 | call to UInt8.init(_:) | provenance | | +| conversions.swift:139:19:139:40 | call to sourceFloat(_:) | conversions.swift:139:12:139:41 | call to String.init(_:) | provenance | | +| conversions.swift:140:12:140:41 | call to String.init(_:) | conversions.swift:140:12:140:43 | .utf8 | provenance | | +| conversions.swift:140:19:140:40 | call to sourceFloat(_:) | conversions.swift:140:12:140:41 | call to String.init(_:) | provenance | | +| conversions.swift:141:19:141:42 | call to sourceFloat80(_:) | conversions.swift:141:12:141:43 | call to String.init(_:) | provenance | | +| conversions.swift:142:12:142:43 | call to String.init(_:) | conversions.swift:142:12:142:45 | .utf8 | provenance | | +| conversions.swift:142:19:142:42 | call to sourceFloat80(_:) | conversions.swift:142:12:142:43 | call to String.init(_:) | provenance | | +| conversions.swift:143:19:143:41 | call to sourceDouble(_:) | conversions.swift:143:12:143:42 | call to String.init(_:) | provenance | | +| conversions.swift:144:12:144:42 | call to String.init(_:) | conversions.swift:144:12:144:44 | .utf8 | provenance | | +| conversions.swift:144:19:144:41 | call to sourceDouble(_:) | conversions.swift:144:12:144:42 | call to String.init(_:) | provenance | | +| conversions.swift:146:18:146:39 | call to sourceFloat(_:) | conversions.swift:146:12:146:40 | call to Float.init(_:) | provenance | | +| conversions.swift:147:41:147:60 | call to sourceInt(_:) | conversions.swift:147:12:147:79 | call to Float.init(sign:exponent:significand:) | provenance | | +| conversions.swift:148:57:148:78 | call to sourceFloat(_:) | conversions.swift:148:12:148:79 | call to Float.init(sign:exponent:significand:) | provenance | | +| conversions.swift:150:44:150:65 | call to sourceFloat(_:) | conversions.swift:150:12:150:66 | call to Float.init(signOf:magnitudeOf:) | provenance | | +| conversions.swift:152:12:152:33 | call to sourceFloat(_:) | conversions.swift:152:12:152:35 | .exponent | provenance | | +| conversions.swift:153:12:153:33 | call to sourceFloat(_:) | conversions.swift:153:12:153:35 | .significand | provenance | | +| conversions.swift:154:12:154:35 | call to sourceFloat80(_:) | conversions.swift:154:12:154:37 | .exponent | provenance | | +| conversions.swift:155:12:155:35 | call to sourceFloat80(_:) | conversions.swift:155:12:155:37 | .significand | provenance | | +| conversions.swift:156:12:156:34 | call to sourceDouble(_:) | conversions.swift:156:12:156:36 | .exponent | provenance | | +| conversions.swift:157:12:157:34 | call to sourceDouble(_:) | conversions.swift:157:12:157:36 | .significand | provenance | | +| conversions.swift:158:12:158:32 | call to sourceUInt(_:) | conversions.swift:158:12:158:34 | .byteSwapped | provenance | | +| conversions.swift:159:12:159:34 | call to sourceUInt64(_:) | conversions.swift:159:12:159:36 | .byteSwapped | provenance | | +| conversions.swift:160:12:160:31 | call to sourceInt(_:) | conversions.swift:160:12:160:33 | .magnitude | provenance | | +| conversions.swift:161:12:161:35 | call to sourceUInt64(_:) | conversions.swift:161:12:161:37 | .magnitude | provenance | | +| conversions.swift:166:19:166:42 | call to sourceString(_:) | conversions.swift:166:12:166:43 | call to String.init(_:) | provenance | | +| conversions.swift:174:12:174:45 | call to MyString.init(_:) | conversions.swift:174:12:174:45 | call to MyString.init(_:) [some:0] | provenance | | +| conversions.swift:174:12:174:45 | call to MyString.init(_:) | conversions.swift:175:12:175:12 | ms2 | provenance | | +| conversions.swift:174:12:174:45 | call to MyString.init(_:) | conversions.swift:176:12:176:16 | .description | provenance | | +| conversions.swift:174:12:174:45 | call to MyString.init(_:) | conversions.swift:177:12:177:16 | .debugDescription | provenance | | +| conversions.swift:174:12:174:45 | call to MyString.init(_:) [some:0] | conversions.swift:174:12:174:46 | ...! | provenance | | +| conversions.swift:174:12:174:46 | ...! | conversions.swift:175:12:175:12 | ms2 | provenance | | +| conversions.swift:174:12:174:46 | ...! | conversions.swift:176:12:176:16 | .description | provenance | | +| conversions.swift:174:12:174:46 | ...! | conversions.swift:177:12:177:16 | .debugDescription | provenance | | +| conversions.swift:174:21:174:44 | call to sourceString(_:) | conversions.swift:174:12:174:45 | call to MyString.init(_:) | provenance | | +| conversions.swift:182:31:182:54 | call to sourceString(_:) | conversions.swift:183:12:183:12 | parent | provenance | | +| conversions.swift:182:31:182:54 | call to sourceString(_:) | conversions.swift:184:12:184:12 | parent | provenance | | +| conversions.swift:182:31:182:54 | call to sourceString(_:) | conversions.swift:186:40:186:40 | parent | provenance | | +| conversions.swift:186:25:186:69 | call to unsafeDowncast(_:to:) | conversions.swift:187:12:187:12 | v3 | provenance | | +| conversions.swift:186:25:186:69 | call to unsafeDowncast(_:to:) | conversions.swift:188:12:188:12 | v3 | provenance | | +| conversions.swift:186:40:186:40 | parent | conversions.swift:186:25:186:69 | call to unsafeDowncast(_:to:) | provenance | | +| conversions.swift:196:24:196:41 | call to sourceInt(_:) | conversions.swift:196:12:196:42 | call to Self.init(_:) | provenance | | +| conversions.swift:201:14:201:33 | call to sourceArray(_:) | conversions.swift:203:13:203:13 | arr1 | provenance | | +| conversions.swift:201:14:201:33 | call to sourceArray(_:) | conversions.swift:205:13:205:19 | ...[...] | provenance | | +| conversions.swift:201:14:201:33 | call to sourceArray(_:) | conversions.swift:208:25:208:25 | arr1 | provenance | | +| conversions.swift:201:14:201:33 | call to sourceArray(_:) | conversions.swift:215:31:215:31 | arr1 | provenance | | +| conversions.swift:202:14:202:33 | [...] [Collection element] | conversions.swift:204:13:204:13 | arr2 | provenance | | +| conversions.swift:202:14:202:33 | [...] [Collection element] | conversions.swift:206:13:206:13 | arr2 [Collection element] | provenance | | +| conversions.swift:202:14:202:33 | [...] [Collection element] | conversions.swift:209:25:209:25 | arr2 [Collection element] | provenance | | +| conversions.swift:202:14:202:33 | [...] [Collection element] | conversions.swift:216:31:216:31 | arr2 [Collection element] | provenance | | +| conversions.swift:202:15:202:32 | call to sourceInt(_:) | conversions.swift:202:14:202:33 | [...] [Collection element] | provenance | | +| conversions.swift:206:13:206:13 | arr2 [Collection element] | conversions.swift:206:13:206:19 | ...[...] | provenance | | +| conversions.swift:208:19:208:29 | call to Array.init(_:) [Collection element] | conversions.swift:210:13:210:13 | arr1b | provenance | | +| conversions.swift:208:19:208:29 | call to Array.init(_:) [Collection element] | conversions.swift:212:13:212:13 | arr1b [Collection element] | provenance | | +| conversions.swift:208:25:208:25 | arr1 | conversions.swift:208:19:208:29 | call to Array.init(_:) [Collection element] | provenance | | +| conversions.swift:209:19:209:29 | call to Array.init(_:) [Collection element] | conversions.swift:211:13:211:13 | arr2b | provenance | | +| conversions.swift:209:19:209:29 | call to Array.init(_:) [Collection element] | conversions.swift:213:13:213:13 | arr2b [Collection element] | provenance | | +| conversions.swift:209:25:209:25 | arr2 [Collection element] | conversions.swift:209:19:209:29 | call to Array.init(_:) [Collection element] | provenance | | +| conversions.swift:212:13:212:13 | arr1b [Collection element] | conversions.swift:212:13:212:20 | ...[...] | provenance | | +| conversions.swift:213:13:213:13 | arr2b [Collection element] | conversions.swift:213:13:213:20 | ...[...] | provenance | | +| conversions.swift:215:15:215:35 | call to ContiguousArray.init(_:) [Collection element] | conversions.swift:217:13:217:13 | arr1c | provenance | | +| conversions.swift:215:15:215:35 | call to ContiguousArray.init(_:) [Collection element] | conversions.swift:219:13:219:13 | arr1c [Collection element] | provenance | | +| conversions.swift:215:31:215:31 | arr1 | conversions.swift:215:15:215:35 | call to ContiguousArray.init(_:) [Collection element] | provenance | | +| conversions.swift:216:15:216:35 | call to ContiguousArray.init(_:) [Collection element] | conversions.swift:218:13:218:13 | arr2c | provenance | | +| conversions.swift:216:15:216:35 | call to ContiguousArray.init(_:) [Collection element] | conversions.swift:220:13:220:13 | arr2c [Collection element] | provenance | | +| conversions.swift:216:31:216:31 | arr2 [Collection element] | conversions.swift:216:15:216:35 | call to ContiguousArray.init(_:) [Collection element] | provenance | | +| conversions.swift:219:13:219:13 | arr1c [Collection element] | conversions.swift:219:13:219:20 | ...[...] | provenance | | +| conversions.swift:220:13:220:13 | arr2c [Collection element] | conversions.swift:220:13:220:20 | ...[...] | provenance | | +| conversions.swift:227:6:227:6 | self [v] | file://:0:0:0:0 | self [v] | provenance | | +| conversions.swift:229:7:229:12 | v | conversions.swift:230:12:230:12 | v | provenance | | +| conversions.swift:230:3:230:3 | [post] self [v] | conversions.swift:229:2:231:2 | self[return] [v] | provenance | | +| conversions.swift:230:12:230:12 | v | conversions.swift:230:3:230:3 | [post] self [v] | provenance | | +| conversions.swift:235:7:235:17 | withUInt | conversions.swift:236:13:236:13 | withUInt | provenance | | +| conversions.swift:235:7:235:17 | withUInt | conversions.swift:237:14:237:14 | withUInt | provenance | | +| conversions.swift:237:10:237:22 | call to Self.init(_:) | conversions.swift:235:2:239:2 | self[return] | provenance | | +| conversions.swift:237:10:237:22 | call to Self.init(_:) | conversions.swift:238:12:238:12 | self | provenance | | +| conversions.swift:237:14:237:14 | withUInt | conversions.swift:237:10:237:22 | call to Self.init(_:) | provenance | | +| conversions.swift:241:7:241:20 | withMyValue [v] | conversions.swift:242:13:242:13 | withMyValue [v] | provenance | | +| conversions.swift:242:13:242:13 | withMyValue [v] | conversions.swift:227:6:227:6 | self [v] | provenance | | +| conversions.swift:242:13:242:13 | withMyValue [v] | conversions.swift:242:13:242:25 | .v | provenance | | +| conversions.swift:247:7:247:21 | withMyValue2 [v] | conversions.swift:248:13:248:13 | withMyValue2 [v] | provenance | | +| conversions.swift:247:7:247:21 | withMyValue2 [v] | conversions.swift:249:11:249:11 | withMyValue2 [v] | provenance | | +| conversions.swift:248:13:248:13 | withMyValue2 [v] | conversions.swift:227:6:227:6 | self [v] | provenance | | +| conversions.swift:248:13:248:13 | withMyValue2 [v] | conversions.swift:248:13:248:26 | .v | provenance | | +| conversions.swift:249:11:249:11 | withMyValue2 [v] | conversions.swift:227:6:227:6 | self [v] | provenance | | +| conversions.swift:249:11:249:11 | withMyValue2 [v] | conversions.swift:249:11:249:24 | .v | provenance | | +| conversions.swift:249:11:249:24 | .v | conversions.swift:247:2:252:2 | self[return] | provenance | | +| conversions.swift:249:11:249:24 | .v | conversions.swift:251:12:251:12 | self | provenance | | +| conversions.swift:254:20:254:33 | withMyValue [v] | conversions.swift:255:13:255:13 | withMyValue [v] | provenance | | +| conversions.swift:254:20:254:33 | withMyValue [v] | conversions.swift:256:10:256:10 | withMyValue [v] | provenance | | +| conversions.swift:255:13:255:13 | withMyValue [v] | conversions.swift:227:6:227:6 | self [v] | provenance | | +| conversions.swift:255:13:255:13 | withMyValue [v] | conversions.swift:255:13:255:25 | .v | provenance | | +| conversions.swift:256:10:256:10 | withMyValue [v] | conversions.swift:227:6:227:6 | self [v] | provenance | | +| conversions.swift:256:10:256:10 | withMyValue [v] | conversions.swift:256:10:256:22 | .v | provenance | | +| conversions.swift:262:26:262:43 | call to sourceUInt(_:) | conversions.swift:235:7:235:17 | withUInt | provenance | | +| conversions.swift:262:26:262:43 | call to sourceUInt(_:) | conversions.swift:262:12:262:44 | call to Int.init(withUInt:) | provenance | | +| conversions.swift:265:29:265:54 | call to MyValue.init(_:) [v] | conversions.swift:241:7:241:20 | withMyValue [v] | provenance | | +| conversions.swift:265:37:265:53 | call to sourceInt(_:) | conversions.swift:229:7:229:12 | v | provenance | | +| conversions.swift:265:37:265:53 | call to sourceInt(_:) | conversions.swift:265:29:265:54 | call to MyValue.init(_:) [v] | provenance | | +| conversions.swift:268:30:268:55 | call to MyValue.init(_:) [v] | conversions.swift:247:7:247:21 | withMyValue2 [v] | provenance | | +| conversions.swift:268:30:268:55 | call to MyValue.init(_:) [v] | conversions.swift:268:12:268:56 | call to Int.init(withMyValue2:) | provenance | | +| conversions.swift:268:38:268:54 | call to sourceInt(_:) | conversions.swift:229:7:229:12 | v | provenance | | +| conversions.swift:268:38:268:54 | call to sourceInt(_:) | conversions.swift:268:30:268:55 | call to MyValue.init(_:) [v] | provenance | | +| conversions.swift:271:35:271:60 | call to MyValue.init(_:) [v] | conversions.swift:254:20:254:33 | withMyValue [v] | provenance | | +| conversions.swift:271:35:271:60 | call to MyValue.init(_:) [v] | conversions.swift:271:12:271:61 | call to mkInt(withMyValue:) | provenance | | +| conversions.swift:271:43:271:59 | call to sourceInt(_:) | conversions.swift:229:7:229:12 | v | provenance | | +| conversions.swift:271:43:271:59 | call to sourceInt(_:) | conversions.swift:271:35:271:60 | call to MyValue.init(_:) [v] | provenance | | | file://:0:0:0:0 | [post] self [first] | stringinterpolation.swift:6:6:6:6 | self [Return] [first] | provenance | | | file://:0:0:0:0 | [post] self [second] | stringinterpolation.swift:7:6:7:6 | self [Return] [second] | provenance | | | file://:0:0:0:0 | self [first] | file://:0:0:0:0 | .first | provenance | | @@ -231,202 +251,241 @@ edges | try.swift:18:18:18:25 | call to source() | try.swift:18:18:18:25 | call to source() [some:0] | provenance | | | try.swift:18:18:18:25 | call to source() [some:0] | try.swift:18:13:18:25 | try? ... [some:0] | provenance | | nodes -| conversions.swift:32:12:32:22 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:33:12:33:27 | call to Self.init(_:) | semmle.label | call to Self.init(_:) | -| conversions.swift:33:16:33:26 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:34:12:34:29 | call to Self.init(_:) | semmle.label | call to Self.init(_:) | -| conversions.swift:34:18:34:28 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:35:12:35:29 | call to Float.init(_:) | semmle.label | call to Float.init(_:) | -| conversions.swift:35:18:35:28 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:36:12:36:30 | call to String.init(_:) | semmle.label | call to String.init(_:) | -| conversions.swift:36:19:36:29 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:37:12:37:30 | call to String.init(_:) | semmle.label | call to String.init(_:) | -| conversions.swift:37:12:37:32 | .utf8 | semmle.label | .utf8 | -| conversions.swift:37:19:37:29 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:39:12:39:30 | [...] [Collection element] | semmle.label | [...] [Collection element] | -| conversions.swift:39:19:39:29 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:40:12:40:12 | arr | semmle.label | arr | -| conversions.swift:41:12:41:12 | arr [Collection element] | semmle.label | arr [Collection element] | -| conversions.swift:41:12:41:17 | ...[...] | semmle.label | ...[...] | -| conversions.swift:42:12:42:23 | call to Array.init(_:) | semmle.label | call to Array.init(_:) | -| conversions.swift:42:20:42:20 | arr [Collection element] | semmle.label | arr [Collection element] | -| conversions.swift:43:12:43:23 | call to Array.init(_:) [Collection element] | semmle.label | call to Array.init(_:) [Collection element] | -| conversions.swift:43:12:43:26 | ...[...] | semmle.label | ...[...] | -| conversions.swift:43:20:43:20 | arr [Collection element] | semmle.label | arr [Collection element] | -| conversions.swift:44:12:44:39 | call to Array.init(_:) | semmle.label | call to Array.init(_:) | -| conversions.swift:44:20:44:33 | call to sourceString() | semmle.label | call to sourceString() | -| conversions.swift:44:20:44:35 | .utf8 | semmle.label | .utf8 | -| conversions.swift:45:12:45:39 | call to Array.init(_:) [Collection element] | semmle.label | call to Array.init(_:) [Collection element] | -| conversions.swift:45:12:45:42 | ...[...] | semmle.label | ...[...] | -| conversions.swift:45:20:45:33 | call to sourceString() | semmle.label | call to sourceString() | -| conversions.swift:45:20:45:35 | .utf8 | semmle.label | .utf8 | -| conversions.swift:47:13:47:23 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:48:13:48:13 | v | semmle.label | v | -| conversions.swift:51:18:51:41 | call to numericCast(_:) | semmle.label | call to numericCast(_:) | -| conversions.swift:51:30:51:40 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:52:12:52:12 | v2 | semmle.label | v2 | -| conversions.swift:54:17:54:57 | call to unsafeBitCast(_:to:) | semmle.label | call to unsafeBitCast(_:to:) | -| conversions.swift:54:31:54:41 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:55:12:55:12 | v4 | semmle.label | v4 | -| conversions.swift:57:11:57:47 | call to Self.init(truncatingIfNeeded:) | semmle.label | call to Self.init(truncatingIfNeeded:) | -| conversions.swift:57:36:57:46 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:58:12:58:12 | v5 | semmle.label | v5 | -| conversions.swift:60:11:60:39 | call to UInt.init(bitPattern:) | semmle.label | call to UInt.init(bitPattern:) | -| conversions.swift:60:28:60:38 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:61:12:61:12 | v6 | semmle.label | v6 | -| conversions.swift:63:11:63:26 | call to abs(_:) | semmle.label | call to abs(_:) | -| conversions.swift:63:15:63:25 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:64:12:64:12 | v7 | semmle.label | v7 | -| conversions.swift:69:12:69:39 | call to advanced(by:) | semmle.label | call to advanced(by:) | -| conversions.swift:69:28:69:38 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:71:12:71:36 | call to Self.init(exactly:) [some:0] | semmle.label | call to Self.init(exactly:) [some:0] | -| conversions.swift:71:12:71:37 | ...! | semmle.label | ...! | -| conversions.swift:71:25:71:35 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:72:12:72:39 | call to Self.init(exactly:) [some:0] | semmle.label | call to Self.init(exactly:) [some:0] | -| conversions.swift:72:12:72:40 | ...! | semmle.label | ...! | -| conversions.swift:72:28:72:38 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:73:12:73:37 | call to Self.init(clamping:) | semmle.label | call to Self.init(clamping:) | -| conversions.swift:73:26:73:36 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:74:12:74:47 | call to Self.init(truncatingIfNeeded:) | semmle.label | call to Self.init(truncatingIfNeeded:) | -| conversions.swift:74:36:74:46 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:75:12:75:41 | call to Self.init(_:radix:) [some:0] | semmle.label | call to Self.init(_:radix:) [some:0] | -| conversions.swift:75:12:75:42 | ...! | semmle.label | ...! | -| conversions.swift:75:16:75:29 | call to sourceString() | semmle.label | call to sourceString() | -| conversions.swift:77:12:77:41 | call to Self.init(littleEndian:) | semmle.label | call to Self.init(littleEndian:) | -| conversions.swift:77:30:77:40 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:78:12:78:38 | call to Self.init(bigEndian:) | semmle.label | call to Self.init(bigEndian:) | -| conversions.swift:78:27:78:37 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:79:12:79:22 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:79:12:79:24 | .littleEndian | semmle.label | .littleEndian | -| conversions.swift:80:12:80:22 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:80:12:80:24 | .bigEndian | semmle.label | .bigEndian | -| conversions.swift:108:12:108:24 | call to sourceFloat() | semmle.label | call to sourceFloat() | -| conversions.swift:109:12:109:31 | call to Float.init(_:) | semmle.label | call to Float.init(_:) | -| conversions.swift:109:18:109:30 | call to sourceFloat() | semmle.label | call to sourceFloat() | -| conversions.swift:110:12:110:31 | call to UInt8.init(_:) | semmle.label | call to UInt8.init(_:) | -| conversions.swift:110:18:110:30 | call to sourceFloat() | semmle.label | call to sourceFloat() | -| conversions.swift:111:12:111:32 | call to String.init(_:) | semmle.label | call to String.init(_:) | -| conversions.swift:111:19:111:31 | call to sourceFloat() | semmle.label | call to sourceFloat() | -| conversions.swift:112:12:112:32 | call to String.init(_:) | semmle.label | call to String.init(_:) | -| conversions.swift:112:12:112:34 | .utf8 | semmle.label | .utf8 | -| conversions.swift:112:19:112:31 | call to sourceFloat() | semmle.label | call to sourceFloat() | -| conversions.swift:113:12:113:34 | call to String.init(_:) | semmle.label | call to String.init(_:) | -| conversions.swift:113:19:113:33 | call to sourceFloat80() | semmle.label | call to sourceFloat80() | -| conversions.swift:114:12:114:34 | call to String.init(_:) | semmle.label | call to String.init(_:) | -| conversions.swift:114:12:114:36 | .utf8 | semmle.label | .utf8 | -| conversions.swift:114:19:114:33 | call to sourceFloat80() | semmle.label | call to sourceFloat80() | -| conversions.swift:115:12:115:33 | call to String.init(_:) | semmle.label | call to String.init(_:) | -| conversions.swift:115:19:115:32 | call to sourceDouble() | semmle.label | call to sourceDouble() | -| conversions.swift:116:12:116:33 | call to String.init(_:) | semmle.label | call to String.init(_:) | -| conversions.swift:116:12:116:35 | .utf8 | semmle.label | .utf8 | -| conversions.swift:116:19:116:32 | call to sourceDouble() | semmle.label | call to sourceDouble() | -| conversions.swift:118:12:118:31 | call to Float.init(_:) | semmle.label | call to Float.init(_:) | -| conversions.swift:118:18:118:30 | call to sourceFloat() | semmle.label | call to sourceFloat() | -| conversions.swift:119:12:119:70 | call to Float.init(sign:exponent:significand:) | semmle.label | call to Float.init(sign:exponent:significand:) | -| conversions.swift:119:41:119:51 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:120:12:120:70 | call to Float.init(sign:exponent:significand:) | semmle.label | call to Float.init(sign:exponent:significand:) | -| conversions.swift:120:57:120:69 | call to sourceFloat() | semmle.label | call to sourceFloat() | -| conversions.swift:122:12:122:57 | call to Float.init(signOf:magnitudeOf:) | semmle.label | call to Float.init(signOf:magnitudeOf:) | -| conversions.swift:122:44:122:56 | call to sourceFloat() | semmle.label | call to sourceFloat() | -| conversions.swift:124:12:124:24 | call to sourceFloat() | semmle.label | call to sourceFloat() | -| conversions.swift:124:12:124:26 | .exponent | semmle.label | .exponent | -| conversions.swift:125:12:125:24 | call to sourceFloat() | semmle.label | call to sourceFloat() | -| conversions.swift:125:12:125:26 | .significand | semmle.label | .significand | -| conversions.swift:126:12:126:26 | call to sourceFloat80() | semmle.label | call to sourceFloat80() | -| conversions.swift:126:12:126:28 | .exponent | semmle.label | .exponent | -| conversions.swift:127:12:127:26 | call to sourceFloat80() | semmle.label | call to sourceFloat80() | -| conversions.swift:127:12:127:28 | .significand | semmle.label | .significand | -| conversions.swift:128:12:128:25 | call to sourceDouble() | semmle.label | call to sourceDouble() | -| conversions.swift:128:12:128:27 | .exponent | semmle.label | .exponent | -| conversions.swift:129:12:129:25 | call to sourceDouble() | semmle.label | call to sourceDouble() | -| conversions.swift:129:12:129:27 | .significand | semmle.label | .significand | -| conversions.swift:130:12:130:23 | call to sourceUInt() | semmle.label | call to sourceUInt() | -| conversions.swift:130:12:130:25 | .byteSwapped | semmle.label | .byteSwapped | -| conversions.swift:131:12:131:25 | call to sourceUInt64() | semmle.label | call to sourceUInt64() | -| conversions.swift:131:12:131:27 | .byteSwapped | semmle.label | .byteSwapped | -| conversions.swift:135:12:135:25 | call to sourceString() | semmle.label | call to sourceString() | -| conversions.swift:136:12:136:33 | call to String.init(_:) | semmle.label | call to String.init(_:) | -| conversions.swift:136:19:136:32 | call to sourceString() | semmle.label | call to sourceString() | -| conversions.swift:144:12:144:35 | call to MyString.init(_:) | semmle.label | call to MyString.init(_:) | -| conversions.swift:144:12:144:35 | call to MyString.init(_:) [some:0] | semmle.label | call to MyString.init(_:) [some:0] | -| conversions.swift:144:12:144:36 | ...! | semmle.label | ...! | -| conversions.swift:144:21:144:34 | call to sourceString() | semmle.label | call to sourceString() | -| conversions.swift:145:12:145:12 | ms2 | semmle.label | ms2 | -| conversions.swift:146:12:146:16 | .description | semmle.label | .description | -| conversions.swift:147:12:147:16 | .debugDescription | semmle.label | .debugDescription | -| conversions.swift:152:31:152:44 | call to sourceString() | semmle.label | call to sourceString() | -| conversions.swift:153:12:153:12 | parent | semmle.label | parent | -| conversions.swift:154:12:154:12 | parent | semmle.label | parent | -| conversions.swift:156:25:156:69 | call to unsafeDowncast(_:to:) | semmle.label | call to unsafeDowncast(_:to:) | -| conversions.swift:156:40:156:40 | parent | semmle.label | parent | -| conversions.swift:157:12:157:12 | v3 | semmle.label | v3 | -| conversions.swift:158:12:158:12 | v3 | semmle.label | v3 | -| conversions.swift:166:12:166:35 | call to Self.init(_:) | semmle.label | call to Self.init(_:) | -| conversions.swift:166:24:166:34 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:171:14:171:33 | call to sourceArray(_:) | semmle.label | call to sourceArray(_:) | -| conversions.swift:172:14:172:26 | [...] [Collection element] | semmle.label | [...] [Collection element] | -| conversions.swift:172:15:172:25 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:173:13:173:13 | arr1 | semmle.label | arr1 | -| conversions.swift:174:13:174:13 | arr2 | semmle.label | arr2 | -| conversions.swift:175:13:175:19 | ...[...] | semmle.label | ...[...] | -| conversions.swift:176:13:176:13 | arr2 [Collection element] | semmle.label | arr2 [Collection element] | -| conversions.swift:176:13:176:19 | ...[...] | semmle.label | ...[...] | -| conversions.swift:178:19:178:29 | call to Array.init(_:) [Collection element] | semmle.label | call to Array.init(_:) [Collection element] | -| conversions.swift:178:25:178:25 | arr1 | semmle.label | arr1 | -| conversions.swift:179:19:179:29 | call to Array.init(_:) [Collection element] | semmle.label | call to Array.init(_:) [Collection element] | -| conversions.swift:179:25:179:25 | arr2 [Collection element] | semmle.label | arr2 [Collection element] | -| conversions.swift:180:13:180:13 | arr1b | semmle.label | arr1b | -| conversions.swift:181:13:181:13 | arr2b | semmle.label | arr2b | -| conversions.swift:182:13:182:13 | arr1b [Collection element] | semmle.label | arr1b [Collection element] | -| conversions.swift:182:13:182:20 | ...[...] | semmle.label | ...[...] | -| conversions.swift:183:13:183:13 | arr2b [Collection element] | semmle.label | arr2b [Collection element] | -| conversions.swift:183:13:183:20 | ...[...] | semmle.label | ...[...] | -| conversions.swift:185:15:185:35 | call to ContiguousArray.init(_:) [Collection element] | semmle.label | call to ContiguousArray.init(_:) [Collection element] | -| conversions.swift:185:31:185:31 | arr1 | semmle.label | arr1 | -| conversions.swift:186:15:186:35 | call to ContiguousArray.init(_:) [Collection element] | semmle.label | call to ContiguousArray.init(_:) [Collection element] | -| conversions.swift:186:31:186:31 | arr2 [Collection element] | semmle.label | arr2 [Collection element] | -| conversions.swift:187:13:187:13 | arr1c | semmle.label | arr1c | -| conversions.swift:188:13:188:13 | arr2c | semmle.label | arr2c | -| conversions.swift:189:13:189:13 | arr1c [Collection element] | semmle.label | arr1c [Collection element] | -| conversions.swift:189:13:189:20 | ...[...] | semmle.label | ...[...] | -| conversions.swift:190:13:190:13 | arr2c [Collection element] | semmle.label | arr2c [Collection element] | -| conversions.swift:190:13:190:20 | ...[...] | semmle.label | ...[...] | -| conversions.swift:197:6:197:6 | self [v] | semmle.label | self [v] | -| conversions.swift:199:2:201:2 | self[return] [v] | semmle.label | self[return] [v] | -| conversions.swift:199:7:199:12 | v | semmle.label | v | -| conversions.swift:200:3:200:3 | [post] self [v] | semmle.label | [post] self [v] | -| conversions.swift:200:12:200:12 | v | semmle.label | v | -| conversions.swift:205:2:209:2 | self[return] | semmle.label | self[return] | -| conversions.swift:205:7:205:17 | withUInt | semmle.label | withUInt | -| conversions.swift:206:13:206:13 | withUInt | semmle.label | withUInt | -| conversions.swift:207:10:207:22 | call to Self.init(_:) | semmle.label | call to Self.init(_:) | -| conversions.swift:207:14:207:14 | withUInt | semmle.label | withUInt | -| conversions.swift:208:12:208:12 | self | semmle.label | self | -| conversions.swift:211:7:211:20 | withMyValue [v] | semmle.label | withMyValue [v] | -| conversions.swift:212:13:212:13 | withMyValue [v] | semmle.label | withMyValue [v] | -| conversions.swift:212:13:212:25 | .v | semmle.label | .v | -| conversions.swift:217:2:222:2 | self[return] | semmle.label | self[return] | -| conversions.swift:217:7:217:21 | withMyValue2 [v] | semmle.label | withMyValue2 [v] | -| conversions.swift:218:13:218:13 | withMyValue2 [v] | semmle.label | withMyValue2 [v] | -| conversions.swift:218:13:218:26 | .v | semmle.label | .v | -| conversions.swift:219:11:219:11 | withMyValue2 [v] | semmle.label | withMyValue2 [v] | -| conversions.swift:219:11:219:24 | .v | semmle.label | .v | -| conversions.swift:221:12:221:12 | self | semmle.label | self | -| conversions.swift:224:20:224:33 | withMyValue [v] | semmle.label | withMyValue [v] | -| conversions.swift:225:13:225:13 | withMyValue [v] | semmle.label | withMyValue [v] | -| conversions.swift:225:13:225:25 | .v | semmle.label | .v | -| conversions.swift:226:10:226:10 | withMyValue [v] | semmle.label | withMyValue [v] | -| conversions.swift:226:10:226:22 | .v | semmle.label | .v | -| conversions.swift:232:12:232:38 | call to Int.init(withUInt:) | semmle.label | call to Int.init(withUInt:) | -| conversions.swift:232:26:232:37 | call to sourceUInt() | semmle.label | call to sourceUInt() | -| conversions.swift:235:29:235:48 | call to MyValue.init(_:) [v] | semmle.label | call to MyValue.init(_:) [v] | -| conversions.swift:235:37:235:47 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:238:12:238:50 | call to Int.init(withMyValue2:) | semmle.label | call to Int.init(withMyValue2:) | -| conversions.swift:238:30:238:49 | call to MyValue.init(_:) [v] | semmle.label | call to MyValue.init(_:) [v] | -| conversions.swift:238:38:238:48 | call to sourceInt() | semmle.label | call to sourceInt() | -| conversions.swift:241:12:241:55 | call to mkInt(withMyValue:) | semmle.label | call to mkInt(withMyValue:) | -| conversions.swift:241:35:241:54 | call to MyValue.init(_:) [v] | semmle.label | call to MyValue.init(_:) [v] | -| conversions.swift:241:43:241:53 | call to sourceInt() | semmle.label | call to sourceInt() | +| conversions.swift:32:12:32:31 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:33:12:33:36 | call to Self.init(_:) | semmle.label | call to Self.init(_:) | +| conversions.swift:33:16:33:35 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:34:12:34:37 | call to Self.init(_:) | semmle.label | call to Self.init(_:) | +| conversions.swift:34:17:34:36 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:35:12:35:38 | call to Self.init(_:) | semmle.label | call to Self.init(_:) | +| conversions.swift:35:18:35:37 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:36:12:36:38 | call to Self.init(_:) | semmle.label | call to Self.init(_:) | +| conversions.swift:36:18:36:37 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:37:12:37:38 | call to Self.init(_:) | semmle.label | call to Self.init(_:) | +| conversions.swift:37:18:37:37 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:39:12:39:37 | call to Self.init(_:) | semmle.label | call to Self.init(_:) | +| conversions.swift:39:17:39:36 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:40:12:40:38 | call to Self.init(_:) | semmle.label | call to Self.init(_:) | +| conversions.swift:40:18:40:37 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:41:12:41:40 | call to Self.init(_:) | semmle.label | call to Self.init(_:) | +| conversions.swift:41:19:41:39 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:42:12:42:40 | call to Self.init(_:) | semmle.label | call to Self.init(_:) | +| conversions.swift:42:19:42:39 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:43:12:43:40 | call to Self.init(_:) | semmle.label | call to Self.init(_:) | +| conversions.swift:43:19:43:39 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:45:12:45:39 | call to Float.init(_:) | semmle.label | call to Float.init(_:) | +| conversions.swift:45:18:45:38 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:46:12:46:40 | call to Double.init(_:) | semmle.label | call to Double.init(_:) | +| conversions.swift:46:19:46:39 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:47:12:47:40 | call to String.init(_:) | semmle.label | call to String.init(_:) | +| conversions.swift:47:19:47:39 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:48:12:48:40 | call to String.init(_:) | semmle.label | call to String.init(_:) | +| conversions.swift:48:12:48:42 | .utf8 | semmle.label | .utf8 | +| conversions.swift:48:19:48:39 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:50:12:50:39 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| conversions.swift:50:19:50:38 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:51:12:51:12 | arr | semmle.label | arr | +| conversions.swift:52:12:52:12 | arr [Collection element] | semmle.label | arr [Collection element] | +| conversions.swift:52:12:52:17 | ...[...] | semmle.label | ...[...] | +| conversions.swift:53:12:53:23 | call to Array.init(_:) | semmle.label | call to Array.init(_:) | +| conversions.swift:53:20:53:20 | arr [Collection element] | semmle.label | arr [Collection element] | +| conversions.swift:54:12:54:23 | call to Array.init(_:) [Collection element] | semmle.label | call to Array.init(_:) [Collection element] | +| conversions.swift:54:12:54:26 | ...[...] | semmle.label | ...[...] | +| conversions.swift:54:20:54:20 | arr [Collection element] | semmle.label | arr [Collection element] | +| conversions.swift:55:12:55:48 | call to Array.init(_:) | semmle.label | call to Array.init(_:) | +| conversions.swift:55:20:55:42 | call to sourceString(_:) | semmle.label | call to sourceString(_:) | +| conversions.swift:55:20:55:44 | .utf8 | semmle.label | .utf8 | +| conversions.swift:56:12:56:48 | call to Array.init(_:) [Collection element] | semmle.label | call to Array.init(_:) [Collection element] | +| conversions.swift:56:12:56:51 | ...[...] | semmle.label | ...[...] | +| conversions.swift:56:20:56:42 | call to sourceString(_:) | semmle.label | call to sourceString(_:) | +| conversions.swift:56:20:56:44 | .utf8 | semmle.label | .utf8 | +| conversions.swift:58:13:58:32 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:59:13:59:13 | v | semmle.label | v | +| conversions.swift:62:18:62:50 | call to numericCast(_:) | semmle.label | call to numericCast(_:) | +| conversions.swift:62:30:62:49 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:63:12:63:12 | v2 | semmle.label | v2 | +| conversions.swift:65:17:65:66 | call to unsafeBitCast(_:to:) | semmle.label | call to unsafeBitCast(_:to:) | +| conversions.swift:65:31:65:50 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:66:12:66:12 | v4 | semmle.label | v4 | +| conversions.swift:68:11:68:56 | call to Self.init(truncatingIfNeeded:) | semmle.label | call to Self.init(truncatingIfNeeded:) | +| conversions.swift:68:36:68:55 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:69:12:69:12 | v5 | semmle.label | v5 | +| conversions.swift:71:11:71:48 | call to UInt.init(bitPattern:) | semmle.label | call to UInt.init(bitPattern:) | +| conversions.swift:71:28:71:47 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:72:12:72:12 | v6 | semmle.label | v6 | +| conversions.swift:74:11:74:35 | call to abs(_:) | semmle.label | call to abs(_:) | +| conversions.swift:74:15:74:34 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:75:12:75:12 | v7 | semmle.label | v7 | +| conversions.swift:80:12:80:48 | call to advanced(by:) | semmle.label | call to advanced(by:) | +| conversions.swift:80:28:80:47 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:82:12:82:51 | call to distance(to:) | semmle.label | call to distance(to:) | +| conversions.swift:82:28:82:50 | call to sourceUInt64(_:) | semmle.label | call to sourceUInt64(_:) | +| conversions.swift:84:12:84:45 | call to Self.init(exactly:) [some:0] | semmle.label | call to Self.init(exactly:) [some:0] | +| conversions.swift:84:12:84:46 | ...! | semmle.label | ...! | +| conversions.swift:84:25:84:44 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:85:12:85:48 | call to Self.init(exactly:) [some:0] | semmle.label | call to Self.init(exactly:) [some:0] | +| conversions.swift:85:12:85:49 | ...! | semmle.label | ...! | +| conversions.swift:85:28:85:47 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:86:12:86:46 | call to Self.init(clamping:) | semmle.label | call to Self.init(clamping:) | +| conversions.swift:86:26:86:45 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:87:12:87:49 | call to Self.init(clamping:) | semmle.label | call to Self.init(clamping:) | +| conversions.swift:87:29:87:48 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:88:12:88:56 | call to Self.init(truncatingIfNeeded:) | semmle.label | call to Self.init(truncatingIfNeeded:) | +| conversions.swift:88:36:88:55 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:89:12:89:59 | call to Self.init(truncatingIfNeeded:) | semmle.label | call to Self.init(truncatingIfNeeded:) | +| conversions.swift:89:39:89:58 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:90:12:90:50 | call to Self.init(_:radix:) [some:0] | semmle.label | call to Self.init(_:radix:) [some:0] | +| conversions.swift:90:12:90:51 | ...! | semmle.label | ...! | +| conversions.swift:90:16:90:38 | call to sourceString(_:) | semmle.label | call to sourceString(_:) | +| conversions.swift:91:12:91:53 | call to Self.init(_:radix:) [some:0] | semmle.label | call to Self.init(_:radix:) [some:0] | +| conversions.swift:91:12:91:54 | ...! | semmle.label | ...! | +| conversions.swift:91:19:91:41 | call to sourceString(_:) | semmle.label | call to sourceString(_:) | +| conversions.swift:93:12:93:50 | call to Self.init(littleEndian:) | semmle.label | call to Self.init(littleEndian:) | +| conversions.swift:93:30:93:49 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:94:12:94:56 | call to Self.init(littleEndian:) | semmle.label | call to Self.init(littleEndian:) | +| conversions.swift:94:33:94:55 | call to sourceUInt64(_:) | semmle.label | call to sourceUInt64(_:) | +| conversions.swift:95:12:95:47 | call to Self.init(bigEndian:) | semmle.label | call to Self.init(bigEndian:) | +| conversions.swift:95:27:95:46 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:96:12:96:53 | call to Self.init(bigEndian:) | semmle.label | call to Self.init(bigEndian:) | +| conversions.swift:96:30:96:52 | call to sourceUInt64(_:) | semmle.label | call to sourceUInt64(_:) | +| conversions.swift:97:12:97:31 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:97:12:97:33 | .littleEndian | semmle.label | .littleEndian | +| conversions.swift:98:12:98:34 | call to sourceUInt64(_:) | semmle.label | call to sourceUInt64(_:) | +| conversions.swift:98:12:98:36 | .littleEndian | semmle.label | .littleEndian | +| conversions.swift:99:12:99:31 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:99:12:99:33 | .bigEndian | semmle.label | .bigEndian | +| conversions.swift:100:12:100:34 | call to sourceUInt64(_:) | semmle.label | call to sourceUInt64(_:) | +| conversions.swift:100:12:100:36 | .bigEndian | semmle.label | .bigEndian | +| conversions.swift:136:12:136:33 | call to sourceFloat(_:) | semmle.label | call to sourceFloat(_:) | +| conversions.swift:137:12:137:40 | call to Float.init(_:) | semmle.label | call to Float.init(_:) | +| conversions.swift:137:18:137:39 | call to sourceFloat(_:) | semmle.label | call to sourceFloat(_:) | +| conversions.swift:138:12:138:40 | call to UInt8.init(_:) | semmle.label | call to UInt8.init(_:) | +| conversions.swift:138:18:138:39 | call to sourceFloat(_:) | semmle.label | call to sourceFloat(_:) | +| conversions.swift:139:12:139:41 | call to String.init(_:) | semmle.label | call to String.init(_:) | +| conversions.swift:139:19:139:40 | call to sourceFloat(_:) | semmle.label | call to sourceFloat(_:) | +| conversions.swift:140:12:140:41 | call to String.init(_:) | semmle.label | call to String.init(_:) | +| conversions.swift:140:12:140:43 | .utf8 | semmle.label | .utf8 | +| conversions.swift:140:19:140:40 | call to sourceFloat(_:) | semmle.label | call to sourceFloat(_:) | +| conversions.swift:141:12:141:43 | call to String.init(_:) | semmle.label | call to String.init(_:) | +| conversions.swift:141:19:141:42 | call to sourceFloat80(_:) | semmle.label | call to sourceFloat80(_:) | +| conversions.swift:142:12:142:43 | call to String.init(_:) | semmle.label | call to String.init(_:) | +| conversions.swift:142:12:142:45 | .utf8 | semmle.label | .utf8 | +| conversions.swift:142:19:142:42 | call to sourceFloat80(_:) | semmle.label | call to sourceFloat80(_:) | +| conversions.swift:143:12:143:42 | call to String.init(_:) | semmle.label | call to String.init(_:) | +| conversions.swift:143:19:143:41 | call to sourceDouble(_:) | semmle.label | call to sourceDouble(_:) | +| conversions.swift:144:12:144:42 | call to String.init(_:) | semmle.label | call to String.init(_:) | +| conversions.swift:144:12:144:44 | .utf8 | semmle.label | .utf8 | +| conversions.swift:144:19:144:41 | call to sourceDouble(_:) | semmle.label | call to sourceDouble(_:) | +| conversions.swift:146:12:146:40 | call to Float.init(_:) | semmle.label | call to Float.init(_:) | +| conversions.swift:146:18:146:39 | call to sourceFloat(_:) | semmle.label | call to sourceFloat(_:) | +| conversions.swift:147:12:147:79 | call to Float.init(sign:exponent:significand:) | semmle.label | call to Float.init(sign:exponent:significand:) | +| conversions.swift:147:41:147:60 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:148:12:148:79 | call to Float.init(sign:exponent:significand:) | semmle.label | call to Float.init(sign:exponent:significand:) | +| conversions.swift:148:57:148:78 | call to sourceFloat(_:) | semmle.label | call to sourceFloat(_:) | +| conversions.swift:150:12:150:66 | call to Float.init(signOf:magnitudeOf:) | semmle.label | call to Float.init(signOf:magnitudeOf:) | +| conversions.swift:150:44:150:65 | call to sourceFloat(_:) | semmle.label | call to sourceFloat(_:) | +| conversions.swift:152:12:152:33 | call to sourceFloat(_:) | semmle.label | call to sourceFloat(_:) | +| conversions.swift:152:12:152:35 | .exponent | semmle.label | .exponent | +| conversions.swift:153:12:153:33 | call to sourceFloat(_:) | semmle.label | call to sourceFloat(_:) | +| conversions.swift:153:12:153:35 | .significand | semmle.label | .significand | +| conversions.swift:154:12:154:35 | call to sourceFloat80(_:) | semmle.label | call to sourceFloat80(_:) | +| conversions.swift:154:12:154:37 | .exponent | semmle.label | .exponent | +| conversions.swift:155:12:155:35 | call to sourceFloat80(_:) | semmle.label | call to sourceFloat80(_:) | +| conversions.swift:155:12:155:37 | .significand | semmle.label | .significand | +| conversions.swift:156:12:156:34 | call to sourceDouble(_:) | semmle.label | call to sourceDouble(_:) | +| conversions.swift:156:12:156:36 | .exponent | semmle.label | .exponent | +| conversions.swift:157:12:157:34 | call to sourceDouble(_:) | semmle.label | call to sourceDouble(_:) | +| conversions.swift:157:12:157:36 | .significand | semmle.label | .significand | +| conversions.swift:158:12:158:32 | call to sourceUInt(_:) | semmle.label | call to sourceUInt(_:) | +| conversions.swift:158:12:158:34 | .byteSwapped | semmle.label | .byteSwapped | +| conversions.swift:159:12:159:34 | call to sourceUInt64(_:) | semmle.label | call to sourceUInt64(_:) | +| conversions.swift:159:12:159:36 | .byteSwapped | semmle.label | .byteSwapped | +| conversions.swift:160:12:160:31 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:160:12:160:33 | .magnitude | semmle.label | .magnitude | +| conversions.swift:161:12:161:35 | call to sourceUInt64(_:) | semmle.label | call to sourceUInt64(_:) | +| conversions.swift:161:12:161:37 | .magnitude | semmle.label | .magnitude | +| conversions.swift:165:12:165:35 | call to sourceString(_:) | semmle.label | call to sourceString(_:) | +| conversions.swift:166:12:166:43 | call to String.init(_:) | semmle.label | call to String.init(_:) | +| conversions.swift:166:19:166:42 | call to sourceString(_:) | semmle.label | call to sourceString(_:) | +| conversions.swift:174:12:174:45 | call to MyString.init(_:) | semmle.label | call to MyString.init(_:) | +| conversions.swift:174:12:174:45 | call to MyString.init(_:) [some:0] | semmle.label | call to MyString.init(_:) [some:0] | +| conversions.swift:174:12:174:46 | ...! | semmle.label | ...! | +| conversions.swift:174:21:174:44 | call to sourceString(_:) | semmle.label | call to sourceString(_:) | +| conversions.swift:175:12:175:12 | ms2 | semmle.label | ms2 | +| conversions.swift:176:12:176:16 | .description | semmle.label | .description | +| conversions.swift:177:12:177:16 | .debugDescription | semmle.label | .debugDescription | +| conversions.swift:182:31:182:54 | call to sourceString(_:) | semmle.label | call to sourceString(_:) | +| conversions.swift:183:12:183:12 | parent | semmle.label | parent | +| conversions.swift:184:12:184:12 | parent | semmle.label | parent | +| conversions.swift:186:25:186:69 | call to unsafeDowncast(_:to:) | semmle.label | call to unsafeDowncast(_:to:) | +| conversions.swift:186:40:186:40 | parent | semmle.label | parent | +| conversions.swift:187:12:187:12 | v3 | semmle.label | v3 | +| conversions.swift:188:12:188:12 | v3 | semmle.label | v3 | +| conversions.swift:196:12:196:42 | call to Self.init(_:) | semmle.label | call to Self.init(_:) | +| conversions.swift:196:24:196:41 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:201:14:201:33 | call to sourceArray(_:) | semmle.label | call to sourceArray(_:) | +| conversions.swift:202:14:202:33 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| conversions.swift:202:15:202:32 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:203:13:203:13 | arr1 | semmle.label | arr1 | +| conversions.swift:204:13:204:13 | arr2 | semmle.label | arr2 | +| conversions.swift:205:13:205:19 | ...[...] | semmle.label | ...[...] | +| conversions.swift:206:13:206:13 | arr2 [Collection element] | semmle.label | arr2 [Collection element] | +| conversions.swift:206:13:206:19 | ...[...] | semmle.label | ...[...] | +| conversions.swift:208:19:208:29 | call to Array.init(_:) [Collection element] | semmle.label | call to Array.init(_:) [Collection element] | +| conversions.swift:208:25:208:25 | arr1 | semmle.label | arr1 | +| conversions.swift:209:19:209:29 | call to Array.init(_:) [Collection element] | semmle.label | call to Array.init(_:) [Collection element] | +| conversions.swift:209:25:209:25 | arr2 [Collection element] | semmle.label | arr2 [Collection element] | +| conversions.swift:210:13:210:13 | arr1b | semmle.label | arr1b | +| conversions.swift:211:13:211:13 | arr2b | semmle.label | arr2b | +| conversions.swift:212:13:212:13 | arr1b [Collection element] | semmle.label | arr1b [Collection element] | +| conversions.swift:212:13:212:20 | ...[...] | semmle.label | ...[...] | +| conversions.swift:213:13:213:13 | arr2b [Collection element] | semmle.label | arr2b [Collection element] | +| conversions.swift:213:13:213:20 | ...[...] | semmle.label | ...[...] | +| conversions.swift:215:15:215:35 | call to ContiguousArray.init(_:) [Collection element] | semmle.label | call to ContiguousArray.init(_:) [Collection element] | +| conversions.swift:215:31:215:31 | arr1 | semmle.label | arr1 | +| conversions.swift:216:15:216:35 | call to ContiguousArray.init(_:) [Collection element] | semmle.label | call to ContiguousArray.init(_:) [Collection element] | +| conversions.swift:216:31:216:31 | arr2 [Collection element] | semmle.label | arr2 [Collection element] | +| conversions.swift:217:13:217:13 | arr1c | semmle.label | arr1c | +| conversions.swift:218:13:218:13 | arr2c | semmle.label | arr2c | +| conversions.swift:219:13:219:13 | arr1c [Collection element] | semmle.label | arr1c [Collection element] | +| conversions.swift:219:13:219:20 | ...[...] | semmle.label | ...[...] | +| conversions.swift:220:13:220:13 | arr2c [Collection element] | semmle.label | arr2c [Collection element] | +| conversions.swift:220:13:220:20 | ...[...] | semmle.label | ...[...] | +| conversions.swift:227:6:227:6 | self [v] | semmle.label | self [v] | +| conversions.swift:229:2:231:2 | self[return] [v] | semmle.label | self[return] [v] | +| conversions.swift:229:7:229:12 | v | semmle.label | v | +| conversions.swift:230:3:230:3 | [post] self [v] | semmle.label | [post] self [v] | +| conversions.swift:230:12:230:12 | v | semmle.label | v | +| conversions.swift:235:2:239:2 | self[return] | semmle.label | self[return] | +| conversions.swift:235:7:235:17 | withUInt | semmle.label | withUInt | +| conversions.swift:236:13:236:13 | withUInt | semmle.label | withUInt | +| conversions.swift:237:10:237:22 | call to Self.init(_:) | semmle.label | call to Self.init(_:) | +| conversions.swift:237:14:237:14 | withUInt | semmle.label | withUInt | +| conversions.swift:238:12:238:12 | self | semmle.label | self | +| conversions.swift:241:7:241:20 | withMyValue [v] | semmle.label | withMyValue [v] | +| conversions.swift:242:13:242:13 | withMyValue [v] | semmle.label | withMyValue [v] | +| conversions.swift:242:13:242:25 | .v | semmle.label | .v | +| conversions.swift:247:2:252:2 | self[return] | semmle.label | self[return] | +| conversions.swift:247:7:247:21 | withMyValue2 [v] | semmle.label | withMyValue2 [v] | +| conversions.swift:248:13:248:13 | withMyValue2 [v] | semmle.label | withMyValue2 [v] | +| conversions.swift:248:13:248:26 | .v | semmle.label | .v | +| conversions.swift:249:11:249:11 | withMyValue2 [v] | semmle.label | withMyValue2 [v] | +| conversions.swift:249:11:249:24 | .v | semmle.label | .v | +| conversions.swift:251:12:251:12 | self | semmle.label | self | +| conversions.swift:254:20:254:33 | withMyValue [v] | semmle.label | withMyValue [v] | +| conversions.swift:255:13:255:13 | withMyValue [v] | semmle.label | withMyValue [v] | +| conversions.swift:255:13:255:25 | .v | semmle.label | .v | +| conversions.swift:256:10:256:10 | withMyValue [v] | semmle.label | withMyValue [v] | +| conversions.swift:256:10:256:22 | .v | semmle.label | .v | +| conversions.swift:262:12:262:44 | call to Int.init(withUInt:) | semmle.label | call to Int.init(withUInt:) | +| conversions.swift:262:26:262:43 | call to sourceUInt(_:) | semmle.label | call to sourceUInt(_:) | +| conversions.swift:265:29:265:54 | call to MyValue.init(_:) [v] | semmle.label | call to MyValue.init(_:) [v] | +| conversions.swift:265:37:265:53 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:268:12:268:56 | call to Int.init(withMyValue2:) | semmle.label | call to Int.init(withMyValue2:) | +| conversions.swift:268:30:268:55 | call to MyValue.init(_:) [v] | semmle.label | call to MyValue.init(_:) [v] | +| conversions.swift:268:38:268:54 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | +| conversions.swift:271:12:271:61 | call to mkInt(withMyValue:) | semmle.label | call to mkInt(withMyValue:) | +| conversions.swift:271:35:271:60 | call to MyValue.init(_:) [v] | semmle.label | call to MyValue.init(_:) [v] | +| conversions.swift:271:43:271:59 | call to sourceInt(_:) | semmle.label | call to sourceInt(_:) | | file://:0:0:0:0 | .first | semmle.label | .first | | file://:0:0:0:0 | .second | semmle.label | .second | | file://:0:0:0:0 | .v | semmle.label | .v | @@ -552,17 +611,17 @@ nodes | try.swift:18:18:18:25 | call to source() | semmle.label | call to source() | | try.swift:18:18:18:25 | call to source() [some:0] | semmle.label | call to source() [some:0] | subpaths -| conversions.swift:212:13:212:13 | withMyValue [v] | conversions.swift:197:6:197:6 | self [v] | file://:0:0:0:0 | .v | conversions.swift:212:13:212:25 | .v | -| conversions.swift:218:13:218:13 | withMyValue2 [v] | conversions.swift:197:6:197:6 | self [v] | file://:0:0:0:0 | .v | conversions.swift:218:13:218:26 | .v | -| conversions.swift:219:11:219:11 | withMyValue2 [v] | conversions.swift:197:6:197:6 | self [v] | file://:0:0:0:0 | .v | conversions.swift:219:11:219:24 | .v | -| conversions.swift:225:13:225:13 | withMyValue [v] | conversions.swift:197:6:197:6 | self [v] | file://:0:0:0:0 | .v | conversions.swift:225:13:225:25 | .v | -| conversions.swift:226:10:226:10 | withMyValue [v] | conversions.swift:197:6:197:6 | self [v] | file://:0:0:0:0 | .v | conversions.swift:226:10:226:22 | .v | -| conversions.swift:232:26:232:37 | call to sourceUInt() | conversions.swift:205:7:205:17 | withUInt | conversions.swift:205:2:209:2 | self[return] | conversions.swift:232:12:232:38 | call to Int.init(withUInt:) | -| conversions.swift:235:37:235:47 | call to sourceInt() | conversions.swift:199:7:199:12 | v | conversions.swift:199:2:201:2 | self[return] [v] | conversions.swift:235:29:235:48 | call to MyValue.init(_:) [v] | -| conversions.swift:238:30:238:49 | call to MyValue.init(_:) [v] | conversions.swift:217:7:217:21 | withMyValue2 [v] | conversions.swift:217:2:222:2 | self[return] | conversions.swift:238:12:238:50 | call to Int.init(withMyValue2:) | -| conversions.swift:238:38:238:48 | call to sourceInt() | conversions.swift:199:7:199:12 | v | conversions.swift:199:2:201:2 | self[return] [v] | conversions.swift:238:30:238:49 | call to MyValue.init(_:) [v] | -| conversions.swift:241:35:241:54 | call to MyValue.init(_:) [v] | conversions.swift:224:20:224:33 | withMyValue [v] | conversions.swift:226:10:226:22 | .v | conversions.swift:241:12:241:55 | call to mkInt(withMyValue:) | -| conversions.swift:241:43:241:53 | call to sourceInt() | conversions.swift:199:7:199:12 | v | conversions.swift:199:2:201:2 | self[return] [v] | conversions.swift:241:35:241:54 | call to MyValue.init(_:) [v] | +| conversions.swift:242:13:242:13 | withMyValue [v] | conversions.swift:227:6:227:6 | self [v] | file://:0:0:0:0 | .v | conversions.swift:242:13:242:25 | .v | +| conversions.swift:248:13:248:13 | withMyValue2 [v] | conversions.swift:227:6:227:6 | self [v] | file://:0:0:0:0 | .v | conversions.swift:248:13:248:26 | .v | +| conversions.swift:249:11:249:11 | withMyValue2 [v] | conversions.swift:227:6:227:6 | self [v] | file://:0:0:0:0 | .v | conversions.swift:249:11:249:24 | .v | +| conversions.swift:255:13:255:13 | withMyValue [v] | conversions.swift:227:6:227:6 | self [v] | file://:0:0:0:0 | .v | conversions.swift:255:13:255:25 | .v | +| conversions.swift:256:10:256:10 | withMyValue [v] | conversions.swift:227:6:227:6 | self [v] | file://:0:0:0:0 | .v | conversions.swift:256:10:256:22 | .v | +| conversions.swift:262:26:262:43 | call to sourceUInt(_:) | conversions.swift:235:7:235:17 | withUInt | conversions.swift:235:2:239:2 | self[return] | conversions.swift:262:12:262:44 | call to Int.init(withUInt:) | +| conversions.swift:265:37:265:53 | call to sourceInt(_:) | conversions.swift:229:7:229:12 | v | conversions.swift:229:2:231:2 | self[return] [v] | conversions.swift:265:29:265:54 | call to MyValue.init(_:) [v] | +| conversions.swift:268:30:268:55 | call to MyValue.init(_:) [v] | conversions.swift:247:7:247:21 | withMyValue2 [v] | conversions.swift:247:2:252:2 | self[return] | conversions.swift:268:12:268:56 | call to Int.init(withMyValue2:) | +| conversions.swift:268:38:268:54 | call to sourceInt(_:) | conversions.swift:229:7:229:12 | v | conversions.swift:229:2:231:2 | self[return] [v] | conversions.swift:268:30:268:55 | call to MyValue.init(_:) [v] | +| conversions.swift:271:35:271:60 | call to MyValue.init(_:) [v] | conversions.swift:254:20:254:33 | withMyValue [v] | conversions.swift:256:10:256:22 | .v | conversions.swift:271:12:271:61 | call to mkInt(withMyValue:) | +| conversions.swift:271:43:271:59 | call to sourceInt(_:) | conversions.swift:229:7:229:12 | v | conversions.swift:229:2:231:2 | self[return] [v] | conversions.swift:271:35:271:60 | call to MyValue.init(_:) [v] | | stringinterpolation.swift:13:36:13:36 | pair [first] | stringinterpolation.swift:6:6:6:6 | self [first] | file://:0:0:0:0 | .first | stringinterpolation.swift:13:36:13:41 | .first | | stringinterpolation.swift:19:13:19:20 | call to source() | stringinterpolation.swift:6:6:6:6 | value | stringinterpolation.swift:6:6:6:6 | self [Return] [first] | stringinterpolation.swift:19:2:19:2 | [post] p1 [first] | | stringinterpolation.swift:22:21:22:21 | p1 [first] | stringinterpolation.swift:6:6:6:6 | self [first] | file://:0:0:0:0 | .first | stringinterpolation.swift:22:21:22:24 | .first | @@ -571,86 +630,105 @@ subpaths | stringinterpolation.swift:28:14:28:21 | call to source() | stringinterpolation.swift:7:6:7:6 | value | stringinterpolation.swift:7:6:7:6 | self [Return] [second] | stringinterpolation.swift:28:2:28:2 | [post] p2 [second] | | stringinterpolation.swift:31:21:31:21 | p2 [second] | stringinterpolation.swift:7:6:7:6 | self [second] | file://:0:0:0:0 | .second | stringinterpolation.swift:31:21:31:24 | .second | #select -| conversions.swift:32:12:32:22 | call to sourceInt() | conversions.swift:32:12:32:22 | call to sourceInt() | conversions.swift:32:12:32:22 | call to sourceInt() | result | -| conversions.swift:33:12:33:27 | call to Self.init(_:) | conversions.swift:33:16:33:26 | call to sourceInt() | conversions.swift:33:12:33:27 | call to Self.init(_:) | result | -| conversions.swift:34:12:34:29 | call to Self.init(_:) | conversions.swift:34:18:34:28 | call to sourceInt() | conversions.swift:34:12:34:29 | call to Self.init(_:) | result | -| conversions.swift:35:12:35:29 | call to Float.init(_:) | conversions.swift:35:18:35:28 | call to sourceInt() | conversions.swift:35:12:35:29 | call to Float.init(_:) | result | -| conversions.swift:36:12:36:30 | call to String.init(_:) | conversions.swift:36:19:36:29 | call to sourceInt() | conversions.swift:36:12:36:30 | call to String.init(_:) | result | -| conversions.swift:37:12:37:32 | .utf8 | conversions.swift:37:19:37:29 | call to sourceInt() | conversions.swift:37:12:37:32 | .utf8 | result | -| conversions.swift:40:12:40:12 | arr | conversions.swift:39:19:39:29 | call to sourceInt() | conversions.swift:40:12:40:12 | arr | result | -| conversions.swift:41:12:41:17 | ...[...] | conversions.swift:39:19:39:29 | call to sourceInt() | conversions.swift:41:12:41:17 | ...[...] | result | -| conversions.swift:42:12:42:23 | call to Array.init(_:) | conversions.swift:39:19:39:29 | call to sourceInt() | conversions.swift:42:12:42:23 | call to Array.init(_:) | result | -| conversions.swift:43:12:43:26 | ...[...] | conversions.swift:39:19:39:29 | call to sourceInt() | conversions.swift:43:12:43:26 | ...[...] | result | -| conversions.swift:44:12:44:39 | call to Array.init(_:) | conversions.swift:44:20:44:33 | call to sourceString() | conversions.swift:44:12:44:39 | call to Array.init(_:) | result | -| conversions.swift:45:12:45:42 | ...[...] | conversions.swift:45:20:45:33 | call to sourceString() | conversions.swift:45:12:45:42 | ...[...] | result | -| conversions.swift:48:13:48:13 | v | conversions.swift:47:13:47:23 | call to sourceInt() | conversions.swift:48:13:48:13 | v | result | -| conversions.swift:52:12:52:12 | v2 | conversions.swift:51:30:51:40 | call to sourceInt() | conversions.swift:52:12:52:12 | v2 | result | -| conversions.swift:55:12:55:12 | v4 | conversions.swift:54:31:54:41 | call to sourceInt() | conversions.swift:55:12:55:12 | v4 | result | -| conversions.swift:58:12:58:12 | v5 | conversions.swift:57:36:57:46 | call to sourceInt() | conversions.swift:58:12:58:12 | v5 | result | -| conversions.swift:61:12:61:12 | v6 | conversions.swift:60:28:60:38 | call to sourceInt() | conversions.swift:61:12:61:12 | v6 | result | -| conversions.swift:64:12:64:12 | v7 | conversions.swift:63:15:63:25 | call to sourceInt() | conversions.swift:64:12:64:12 | v7 | result | -| conversions.swift:69:12:69:39 | call to advanced(by:) | conversions.swift:69:28:69:38 | call to sourceInt() | conversions.swift:69:12:69:39 | call to advanced(by:) | result | -| conversions.swift:71:12:71:37 | ...! | conversions.swift:71:25:71:35 | call to sourceInt() | conversions.swift:71:12:71:37 | ...! | result | -| conversions.swift:72:12:72:40 | ...! | conversions.swift:72:28:72:38 | call to sourceInt() | conversions.swift:72:12:72:40 | ...! | result | -| conversions.swift:73:12:73:37 | call to Self.init(clamping:) | conversions.swift:73:26:73:36 | call to sourceInt() | conversions.swift:73:12:73:37 | call to Self.init(clamping:) | result | -| conversions.swift:74:12:74:47 | call to Self.init(truncatingIfNeeded:) | conversions.swift:74:36:74:46 | call to sourceInt() | conversions.swift:74:12:74:47 | call to Self.init(truncatingIfNeeded:) | result | -| conversions.swift:75:12:75:42 | ...! | conversions.swift:75:16:75:29 | call to sourceString() | conversions.swift:75:12:75:42 | ...! | result | -| conversions.swift:77:12:77:41 | call to Self.init(littleEndian:) | conversions.swift:77:30:77:40 | call to sourceInt() | conversions.swift:77:12:77:41 | call to Self.init(littleEndian:) | result | -| conversions.swift:78:12:78:38 | call to Self.init(bigEndian:) | conversions.swift:78:27:78:37 | call to sourceInt() | conversions.swift:78:12:78:38 | call to Self.init(bigEndian:) | result | -| conversions.swift:79:12:79:24 | .littleEndian | conversions.swift:79:12:79:22 | call to sourceInt() | conversions.swift:79:12:79:24 | .littleEndian | result | -| conversions.swift:80:12:80:24 | .bigEndian | conversions.swift:80:12:80:22 | call to sourceInt() | conversions.swift:80:12:80:24 | .bigEndian | result | -| conversions.swift:108:12:108:24 | call to sourceFloat() | conversions.swift:108:12:108:24 | call to sourceFloat() | conversions.swift:108:12:108:24 | call to sourceFloat() | result | -| conversions.swift:109:12:109:31 | call to Float.init(_:) | conversions.swift:109:18:109:30 | call to sourceFloat() | conversions.swift:109:12:109:31 | call to Float.init(_:) | result | -| conversions.swift:110:12:110:31 | call to UInt8.init(_:) | conversions.swift:110:18:110:30 | call to sourceFloat() | conversions.swift:110:12:110:31 | call to UInt8.init(_:) | result | -| conversions.swift:111:12:111:32 | call to String.init(_:) | conversions.swift:111:19:111:31 | call to sourceFloat() | conversions.swift:111:12:111:32 | call to String.init(_:) | result | -| conversions.swift:112:12:112:34 | .utf8 | conversions.swift:112:19:112:31 | call to sourceFloat() | conversions.swift:112:12:112:34 | .utf8 | result | -| conversions.swift:113:12:113:34 | call to String.init(_:) | conversions.swift:113:19:113:33 | call to sourceFloat80() | conversions.swift:113:12:113:34 | call to String.init(_:) | result | -| conversions.swift:114:12:114:36 | .utf8 | conversions.swift:114:19:114:33 | call to sourceFloat80() | conversions.swift:114:12:114:36 | .utf8 | result | -| conversions.swift:115:12:115:33 | call to String.init(_:) | conversions.swift:115:19:115:32 | call to sourceDouble() | conversions.swift:115:12:115:33 | call to String.init(_:) | result | -| conversions.swift:116:12:116:35 | .utf8 | conversions.swift:116:19:116:32 | call to sourceDouble() | conversions.swift:116:12:116:35 | .utf8 | result | -| conversions.swift:118:12:118:31 | call to Float.init(_:) | conversions.swift:118:18:118:30 | call to sourceFloat() | conversions.swift:118:12:118:31 | call to Float.init(_:) | result | -| conversions.swift:119:12:119:70 | call to Float.init(sign:exponent:significand:) | conversions.swift:119:41:119:51 | call to sourceInt() | conversions.swift:119:12:119:70 | call to Float.init(sign:exponent:significand:) | result | -| conversions.swift:120:12:120:70 | call to Float.init(sign:exponent:significand:) | conversions.swift:120:57:120:69 | call to sourceFloat() | conversions.swift:120:12:120:70 | call to Float.init(sign:exponent:significand:) | result | -| conversions.swift:122:12:122:57 | call to Float.init(signOf:magnitudeOf:) | conversions.swift:122:44:122:56 | call to sourceFloat() | conversions.swift:122:12:122:57 | call to Float.init(signOf:magnitudeOf:) | result | -| conversions.swift:124:12:124:26 | .exponent | conversions.swift:124:12:124:24 | call to sourceFloat() | conversions.swift:124:12:124:26 | .exponent | result | -| conversions.swift:125:12:125:26 | .significand | conversions.swift:125:12:125:24 | call to sourceFloat() | conversions.swift:125:12:125:26 | .significand | result | -| conversions.swift:126:12:126:28 | .exponent | conversions.swift:126:12:126:26 | call to sourceFloat80() | conversions.swift:126:12:126:28 | .exponent | result | -| conversions.swift:127:12:127:28 | .significand | conversions.swift:127:12:127:26 | call to sourceFloat80() | conversions.swift:127:12:127:28 | .significand | result | -| conversions.swift:128:12:128:27 | .exponent | conversions.swift:128:12:128:25 | call to sourceDouble() | conversions.swift:128:12:128:27 | .exponent | result | -| conversions.swift:129:12:129:27 | .significand | conversions.swift:129:12:129:25 | call to sourceDouble() | conversions.swift:129:12:129:27 | .significand | result | -| conversions.swift:130:12:130:25 | .byteSwapped | conversions.swift:130:12:130:23 | call to sourceUInt() | conversions.swift:130:12:130:25 | .byteSwapped | result | -| conversions.swift:131:12:131:27 | .byteSwapped | conversions.swift:131:12:131:25 | call to sourceUInt64() | conversions.swift:131:12:131:27 | .byteSwapped | result | -| conversions.swift:135:12:135:25 | call to sourceString() | conversions.swift:135:12:135:25 | call to sourceString() | conversions.swift:135:12:135:25 | call to sourceString() | result | -| conversions.swift:136:12:136:33 | call to String.init(_:) | conversions.swift:136:19:136:32 | call to sourceString() | conversions.swift:136:12:136:33 | call to String.init(_:) | result | -| conversions.swift:145:12:145:12 | ms2 | conversions.swift:144:21:144:34 | call to sourceString() | conversions.swift:145:12:145:12 | ms2 | result | -| conversions.swift:146:12:146:16 | .description | conversions.swift:144:21:144:34 | call to sourceString() | conversions.swift:146:12:146:16 | .description | result | -| conversions.swift:147:12:147:16 | .debugDescription | conversions.swift:144:21:144:34 | call to sourceString() | conversions.swift:147:12:147:16 | .debugDescription | result | -| conversions.swift:153:12:153:12 | parent | conversions.swift:152:31:152:44 | call to sourceString() | conversions.swift:153:12:153:12 | parent | result | -| conversions.swift:154:12:154:12 | parent | conversions.swift:152:31:152:44 | call to sourceString() | conversions.swift:154:12:154:12 | parent | result | -| conversions.swift:157:12:157:12 | v3 | conversions.swift:152:31:152:44 | call to sourceString() | conversions.swift:157:12:157:12 | v3 | result | -| conversions.swift:158:12:158:12 | v3 | conversions.swift:152:31:152:44 | call to sourceString() | conversions.swift:158:12:158:12 | v3 | result | -| conversions.swift:166:12:166:35 | call to Self.init(_:) | conversions.swift:166:24:166:34 | call to sourceInt() | conversions.swift:166:12:166:35 | call to Self.init(_:) | result | -| conversions.swift:173:13:173:13 | arr1 | conversions.swift:171:14:171:33 | call to sourceArray(_:) | conversions.swift:173:13:173:13 | arr1 | result | -| conversions.swift:174:13:174:13 | arr2 | conversions.swift:172:15:172:25 | call to sourceInt() | conversions.swift:174:13:174:13 | arr2 | result | -| conversions.swift:175:13:175:19 | ...[...] | conversions.swift:171:14:171:33 | call to sourceArray(_:) | conversions.swift:175:13:175:19 | ...[...] | result | -| conversions.swift:176:13:176:19 | ...[...] | conversions.swift:172:15:172:25 | call to sourceInt() | conversions.swift:176:13:176:19 | ...[...] | result | -| conversions.swift:180:13:180:13 | arr1b | conversions.swift:171:14:171:33 | call to sourceArray(_:) | conversions.swift:180:13:180:13 | arr1b | result | -| conversions.swift:181:13:181:13 | arr2b | conversions.swift:172:15:172:25 | call to sourceInt() | conversions.swift:181:13:181:13 | arr2b | result | -| conversions.swift:182:13:182:20 | ...[...] | conversions.swift:171:14:171:33 | call to sourceArray(_:) | conversions.swift:182:13:182:20 | ...[...] | result | -| conversions.swift:183:13:183:20 | ...[...] | conversions.swift:172:15:172:25 | call to sourceInt() | conversions.swift:183:13:183:20 | ...[...] | result | -| conversions.swift:187:13:187:13 | arr1c | conversions.swift:171:14:171:33 | call to sourceArray(_:) | conversions.swift:187:13:187:13 | arr1c | result | -| conversions.swift:188:13:188:13 | arr2c | conversions.swift:172:15:172:25 | call to sourceInt() | conversions.swift:188:13:188:13 | arr2c | result | -| conversions.swift:189:13:189:20 | ...[...] | conversions.swift:171:14:171:33 | call to sourceArray(_:) | conversions.swift:189:13:189:20 | ...[...] | result | -| conversions.swift:190:13:190:20 | ...[...] | conversions.swift:172:15:172:25 | call to sourceInt() | conversions.swift:190:13:190:20 | ...[...] | result | -| conversions.swift:206:13:206:13 | withUInt | conversions.swift:232:26:232:37 | call to sourceUInt() | conversions.swift:206:13:206:13 | withUInt | result | -| conversions.swift:208:12:208:12 | self | conversions.swift:232:26:232:37 | call to sourceUInt() | conversions.swift:208:12:208:12 | self | result | -| conversions.swift:212:13:212:25 | .v | conversions.swift:235:37:235:47 | call to sourceInt() | conversions.swift:212:13:212:25 | .v | result | -| conversions.swift:218:13:218:26 | .v | conversions.swift:238:38:238:48 | call to sourceInt() | conversions.swift:218:13:218:26 | .v | result | -| conversions.swift:221:12:221:12 | self | conversions.swift:238:38:238:48 | call to sourceInt() | conversions.swift:221:12:221:12 | self | result | -| conversions.swift:225:13:225:25 | .v | conversions.swift:241:43:241:53 | call to sourceInt() | conversions.swift:225:13:225:25 | .v | result | -| conversions.swift:232:12:232:38 | call to Int.init(withUInt:) | conversions.swift:232:26:232:37 | call to sourceUInt() | conversions.swift:232:12:232:38 | call to Int.init(withUInt:) | result | -| conversions.swift:238:12:238:50 | call to Int.init(withMyValue2:) | conversions.swift:238:38:238:48 | call to sourceInt() | conversions.swift:238:12:238:50 | call to Int.init(withMyValue2:) | result | -| conversions.swift:241:12:241:55 | call to mkInt(withMyValue:) | conversions.swift:241:43:241:53 | call to sourceInt() | conversions.swift:241:12:241:55 | call to mkInt(withMyValue:) | result | +| conversions.swift:32:12:32:31 | call to sourceInt(_:) | conversions.swift:32:12:32:31 | call to sourceInt(_:) | conversions.swift:32:12:32:31 | call to sourceInt(_:) | result | +| conversions.swift:33:12:33:36 | call to Self.init(_:) | conversions.swift:33:16:33:35 | call to sourceInt(_:) | conversions.swift:33:12:33:36 | call to Self.init(_:) | result | +| conversions.swift:34:12:34:37 | call to Self.init(_:) | conversions.swift:34:17:34:36 | call to sourceInt(_:) | conversions.swift:34:12:34:37 | call to Self.init(_:) | result | +| conversions.swift:35:12:35:38 | call to Self.init(_:) | conversions.swift:35:18:35:37 | call to sourceInt(_:) | conversions.swift:35:12:35:38 | call to Self.init(_:) | result | +| conversions.swift:36:12:36:38 | call to Self.init(_:) | conversions.swift:36:18:36:37 | call to sourceInt(_:) | conversions.swift:36:12:36:38 | call to Self.init(_:) | result | +| conversions.swift:37:12:37:38 | call to Self.init(_:) | conversions.swift:37:18:37:37 | call to sourceInt(_:) | conversions.swift:37:12:37:38 | call to Self.init(_:) | result | +| conversions.swift:39:12:39:37 | call to Self.init(_:) | conversions.swift:39:17:39:36 | call to sourceInt(_:) | conversions.swift:39:12:39:37 | call to Self.init(_:) | result | +| conversions.swift:40:12:40:38 | call to Self.init(_:) | conversions.swift:40:18:40:37 | call to sourceInt(_:) | conversions.swift:40:12:40:38 | call to Self.init(_:) | result | +| conversions.swift:41:12:41:40 | call to Self.init(_:) | conversions.swift:41:19:41:39 | call to sourceInt(_:) | conversions.swift:41:12:41:40 | call to Self.init(_:) | result | +| conversions.swift:42:12:42:40 | call to Self.init(_:) | conversions.swift:42:19:42:39 | call to sourceInt(_:) | conversions.swift:42:12:42:40 | call to Self.init(_:) | result | +| conversions.swift:43:12:43:40 | call to Self.init(_:) | conversions.swift:43:19:43:39 | call to sourceInt(_:) | conversions.swift:43:12:43:40 | call to Self.init(_:) | result | +| conversions.swift:45:12:45:39 | call to Float.init(_:) | conversions.swift:45:18:45:38 | call to sourceInt(_:) | conversions.swift:45:12:45:39 | call to Float.init(_:) | result | +| conversions.swift:46:12:46:40 | call to Double.init(_:) | conversions.swift:46:19:46:39 | call to sourceInt(_:) | conversions.swift:46:12:46:40 | call to Double.init(_:) | result | +| conversions.swift:47:12:47:40 | call to String.init(_:) | conversions.swift:47:19:47:39 | call to sourceInt(_:) | conversions.swift:47:12:47:40 | call to String.init(_:) | result | +| conversions.swift:48:12:48:42 | .utf8 | conversions.swift:48:19:48:39 | call to sourceInt(_:) | conversions.swift:48:12:48:42 | .utf8 | result | +| conversions.swift:51:12:51:12 | arr | conversions.swift:50:19:50:38 | call to sourceInt(_:) | conversions.swift:51:12:51:12 | arr | result | +| conversions.swift:52:12:52:17 | ...[...] | conversions.swift:50:19:50:38 | call to sourceInt(_:) | conversions.swift:52:12:52:17 | ...[...] | result | +| conversions.swift:53:12:53:23 | call to Array.init(_:) | conversions.swift:50:19:50:38 | call to sourceInt(_:) | conversions.swift:53:12:53:23 | call to Array.init(_:) | result | +| conversions.swift:54:12:54:26 | ...[...] | conversions.swift:50:19:50:38 | call to sourceInt(_:) | conversions.swift:54:12:54:26 | ...[...] | result | +| conversions.swift:55:12:55:48 | call to Array.init(_:) | conversions.swift:55:20:55:42 | call to sourceString(_:) | conversions.swift:55:12:55:48 | call to Array.init(_:) | result | +| conversions.swift:56:12:56:51 | ...[...] | conversions.swift:56:20:56:42 | call to sourceString(_:) | conversions.swift:56:12:56:51 | ...[...] | result | +| conversions.swift:59:13:59:13 | v | conversions.swift:58:13:58:32 | call to sourceInt(_:) | conversions.swift:59:13:59:13 | v | result | +| conversions.swift:63:12:63:12 | v2 | conversions.swift:62:30:62:49 | call to sourceInt(_:) | conversions.swift:63:12:63:12 | v2 | result | +| conversions.swift:66:12:66:12 | v4 | conversions.swift:65:31:65:50 | call to sourceInt(_:) | conversions.swift:66:12:66:12 | v4 | result | +| conversions.swift:69:12:69:12 | v5 | conversions.swift:68:36:68:55 | call to sourceInt(_:) | conversions.swift:69:12:69:12 | v5 | result | +| conversions.swift:72:12:72:12 | v6 | conversions.swift:71:28:71:47 | call to sourceInt(_:) | conversions.swift:72:12:72:12 | v6 | result | +| conversions.swift:75:12:75:12 | v7 | conversions.swift:74:15:74:34 | call to sourceInt(_:) | conversions.swift:75:12:75:12 | v7 | result | +| conversions.swift:80:12:80:48 | call to advanced(by:) | conversions.swift:80:28:80:47 | call to sourceInt(_:) | conversions.swift:80:12:80:48 | call to advanced(by:) | result | +| conversions.swift:82:12:82:51 | call to distance(to:) | conversions.swift:82:28:82:50 | call to sourceUInt64(_:) | conversions.swift:82:12:82:51 | call to distance(to:) | result | +| conversions.swift:84:12:84:46 | ...! | conversions.swift:84:25:84:44 | call to sourceInt(_:) | conversions.swift:84:12:84:46 | ...! | result | +| conversions.swift:85:12:85:49 | ...! | conversions.swift:85:28:85:47 | call to sourceInt(_:) | conversions.swift:85:12:85:49 | ...! | result | +| conversions.swift:86:12:86:46 | call to Self.init(clamping:) | conversions.swift:86:26:86:45 | call to sourceInt(_:) | conversions.swift:86:12:86:46 | call to Self.init(clamping:) | result | +| conversions.swift:87:12:87:49 | call to Self.init(clamping:) | conversions.swift:87:29:87:48 | call to sourceInt(_:) | conversions.swift:87:12:87:49 | call to Self.init(clamping:) | result | +| conversions.swift:88:12:88:56 | call to Self.init(truncatingIfNeeded:) | conversions.swift:88:36:88:55 | call to sourceInt(_:) | conversions.swift:88:12:88:56 | call to Self.init(truncatingIfNeeded:) | result | +| conversions.swift:89:12:89:59 | call to Self.init(truncatingIfNeeded:) | conversions.swift:89:39:89:58 | call to sourceInt(_:) | conversions.swift:89:12:89:59 | call to Self.init(truncatingIfNeeded:) | result | +| conversions.swift:90:12:90:51 | ...! | conversions.swift:90:16:90:38 | call to sourceString(_:) | conversions.swift:90:12:90:51 | ...! | result | +| conversions.swift:91:12:91:54 | ...! | conversions.swift:91:19:91:41 | call to sourceString(_:) | conversions.swift:91:12:91:54 | ...! | result | +| conversions.swift:93:12:93:50 | call to Self.init(littleEndian:) | conversions.swift:93:30:93:49 | call to sourceInt(_:) | conversions.swift:93:12:93:50 | call to Self.init(littleEndian:) | result | +| conversions.swift:94:12:94:56 | call to Self.init(littleEndian:) | conversions.swift:94:33:94:55 | call to sourceUInt64(_:) | conversions.swift:94:12:94:56 | call to Self.init(littleEndian:) | result | +| conversions.swift:95:12:95:47 | call to Self.init(bigEndian:) | conversions.swift:95:27:95:46 | call to sourceInt(_:) | conversions.swift:95:12:95:47 | call to Self.init(bigEndian:) | result | +| conversions.swift:96:12:96:53 | call to Self.init(bigEndian:) | conversions.swift:96:30:96:52 | call to sourceUInt64(_:) | conversions.swift:96:12:96:53 | call to Self.init(bigEndian:) | result | +| conversions.swift:97:12:97:33 | .littleEndian | conversions.swift:97:12:97:31 | call to sourceInt(_:) | conversions.swift:97:12:97:33 | .littleEndian | result | +| conversions.swift:98:12:98:36 | .littleEndian | conversions.swift:98:12:98:34 | call to sourceUInt64(_:) | conversions.swift:98:12:98:36 | .littleEndian | result | +| conversions.swift:99:12:99:33 | .bigEndian | conversions.swift:99:12:99:31 | call to sourceInt(_:) | conversions.swift:99:12:99:33 | .bigEndian | result | +| conversions.swift:100:12:100:36 | .bigEndian | conversions.swift:100:12:100:34 | call to sourceUInt64(_:) | conversions.swift:100:12:100:36 | .bigEndian | result | +| conversions.swift:136:12:136:33 | call to sourceFloat(_:) | conversions.swift:136:12:136:33 | call to sourceFloat(_:) | conversions.swift:136:12:136:33 | call to sourceFloat(_:) | result | +| conversions.swift:137:12:137:40 | call to Float.init(_:) | conversions.swift:137:18:137:39 | call to sourceFloat(_:) | conversions.swift:137:12:137:40 | call to Float.init(_:) | result | +| conversions.swift:138:12:138:40 | call to UInt8.init(_:) | conversions.swift:138:18:138:39 | call to sourceFloat(_:) | conversions.swift:138:12:138:40 | call to UInt8.init(_:) | result | +| conversions.swift:139:12:139:41 | call to String.init(_:) | conversions.swift:139:19:139:40 | call to sourceFloat(_:) | conversions.swift:139:12:139:41 | call to String.init(_:) | result | +| conversions.swift:140:12:140:43 | .utf8 | conversions.swift:140:19:140:40 | call to sourceFloat(_:) | conversions.swift:140:12:140:43 | .utf8 | result | +| conversions.swift:141:12:141:43 | call to String.init(_:) | conversions.swift:141:19:141:42 | call to sourceFloat80(_:) | conversions.swift:141:12:141:43 | call to String.init(_:) | result | +| conversions.swift:142:12:142:45 | .utf8 | conversions.swift:142:19:142:42 | call to sourceFloat80(_:) | conversions.swift:142:12:142:45 | .utf8 | result | +| conversions.swift:143:12:143:42 | call to String.init(_:) | conversions.swift:143:19:143:41 | call to sourceDouble(_:) | conversions.swift:143:12:143:42 | call to String.init(_:) | result | +| conversions.swift:144:12:144:44 | .utf8 | conversions.swift:144:19:144:41 | call to sourceDouble(_:) | conversions.swift:144:12:144:44 | .utf8 | result | +| conversions.swift:146:12:146:40 | call to Float.init(_:) | conversions.swift:146:18:146:39 | call to sourceFloat(_:) | conversions.swift:146:12:146:40 | call to Float.init(_:) | result | +| conversions.swift:147:12:147:79 | call to Float.init(sign:exponent:significand:) | conversions.swift:147:41:147:60 | call to sourceInt(_:) | conversions.swift:147:12:147:79 | call to Float.init(sign:exponent:significand:) | result | +| conversions.swift:148:12:148:79 | call to Float.init(sign:exponent:significand:) | conversions.swift:148:57:148:78 | call to sourceFloat(_:) | conversions.swift:148:12:148:79 | call to Float.init(sign:exponent:significand:) | result | +| conversions.swift:150:12:150:66 | call to Float.init(signOf:magnitudeOf:) | conversions.swift:150:44:150:65 | call to sourceFloat(_:) | conversions.swift:150:12:150:66 | call to Float.init(signOf:magnitudeOf:) | result | +| conversions.swift:152:12:152:35 | .exponent | conversions.swift:152:12:152:33 | call to sourceFloat(_:) | conversions.swift:152:12:152:35 | .exponent | result | +| conversions.swift:153:12:153:35 | .significand | conversions.swift:153:12:153:33 | call to sourceFloat(_:) | conversions.swift:153:12:153:35 | .significand | result | +| conversions.swift:154:12:154:37 | .exponent | conversions.swift:154:12:154:35 | call to sourceFloat80(_:) | conversions.swift:154:12:154:37 | .exponent | result | +| conversions.swift:155:12:155:37 | .significand | conversions.swift:155:12:155:35 | call to sourceFloat80(_:) | conversions.swift:155:12:155:37 | .significand | result | +| conversions.swift:156:12:156:36 | .exponent | conversions.swift:156:12:156:34 | call to sourceDouble(_:) | conversions.swift:156:12:156:36 | .exponent | result | +| conversions.swift:157:12:157:36 | .significand | conversions.swift:157:12:157:34 | call to sourceDouble(_:) | conversions.swift:157:12:157:36 | .significand | result | +| conversions.swift:158:12:158:34 | .byteSwapped | conversions.swift:158:12:158:32 | call to sourceUInt(_:) | conversions.swift:158:12:158:34 | .byteSwapped | result | +| conversions.swift:159:12:159:36 | .byteSwapped | conversions.swift:159:12:159:34 | call to sourceUInt64(_:) | conversions.swift:159:12:159:36 | .byteSwapped | result | +| conversions.swift:160:12:160:33 | .magnitude | conversions.swift:160:12:160:31 | call to sourceInt(_:) | conversions.swift:160:12:160:33 | .magnitude | result | +| conversions.swift:161:12:161:37 | .magnitude | conversions.swift:161:12:161:35 | call to sourceUInt64(_:) | conversions.swift:161:12:161:37 | .magnitude | result | +| conversions.swift:165:12:165:35 | call to sourceString(_:) | conversions.swift:165:12:165:35 | call to sourceString(_:) | conversions.swift:165:12:165:35 | call to sourceString(_:) | result | +| conversions.swift:166:12:166:43 | call to String.init(_:) | conversions.swift:166:19:166:42 | call to sourceString(_:) | conversions.swift:166:12:166:43 | call to String.init(_:) | result | +| conversions.swift:175:12:175:12 | ms2 | conversions.swift:174:21:174:44 | call to sourceString(_:) | conversions.swift:175:12:175:12 | ms2 | result | +| conversions.swift:176:12:176:16 | .description | conversions.swift:174:21:174:44 | call to sourceString(_:) | conversions.swift:176:12:176:16 | .description | result | +| conversions.swift:177:12:177:16 | .debugDescription | conversions.swift:174:21:174:44 | call to sourceString(_:) | conversions.swift:177:12:177:16 | .debugDescription | result | +| conversions.swift:183:12:183:12 | parent | conversions.swift:182:31:182:54 | call to sourceString(_:) | conversions.swift:183:12:183:12 | parent | result | +| conversions.swift:184:12:184:12 | parent | conversions.swift:182:31:182:54 | call to sourceString(_:) | conversions.swift:184:12:184:12 | parent | result | +| conversions.swift:187:12:187:12 | v3 | conversions.swift:182:31:182:54 | call to sourceString(_:) | conversions.swift:187:12:187:12 | v3 | result | +| conversions.swift:188:12:188:12 | v3 | conversions.swift:182:31:182:54 | call to sourceString(_:) | conversions.swift:188:12:188:12 | v3 | result | +| conversions.swift:196:12:196:42 | call to Self.init(_:) | conversions.swift:196:24:196:41 | call to sourceInt(_:) | conversions.swift:196:12:196:42 | call to Self.init(_:) | result | +| conversions.swift:203:13:203:13 | arr1 | conversions.swift:201:14:201:33 | call to sourceArray(_:) | conversions.swift:203:13:203:13 | arr1 | result | +| conversions.swift:204:13:204:13 | arr2 | conversions.swift:202:15:202:32 | call to sourceInt(_:) | conversions.swift:204:13:204:13 | arr2 | result | +| conversions.swift:205:13:205:19 | ...[...] | conversions.swift:201:14:201:33 | call to sourceArray(_:) | conversions.swift:205:13:205:19 | ...[...] | result | +| conversions.swift:206:13:206:19 | ...[...] | conversions.swift:202:15:202:32 | call to sourceInt(_:) | conversions.swift:206:13:206:19 | ...[...] | result | +| conversions.swift:210:13:210:13 | arr1b | conversions.swift:201:14:201:33 | call to sourceArray(_:) | conversions.swift:210:13:210:13 | arr1b | result | +| conversions.swift:211:13:211:13 | arr2b | conversions.swift:202:15:202:32 | call to sourceInt(_:) | conversions.swift:211:13:211:13 | arr2b | result | +| conversions.swift:212:13:212:20 | ...[...] | conversions.swift:201:14:201:33 | call to sourceArray(_:) | conversions.swift:212:13:212:20 | ...[...] | result | +| conversions.swift:213:13:213:20 | ...[...] | conversions.swift:202:15:202:32 | call to sourceInt(_:) | conversions.swift:213:13:213:20 | ...[...] | result | +| conversions.swift:217:13:217:13 | arr1c | conversions.swift:201:14:201:33 | call to sourceArray(_:) | conversions.swift:217:13:217:13 | arr1c | result | +| conversions.swift:218:13:218:13 | arr2c | conversions.swift:202:15:202:32 | call to sourceInt(_:) | conversions.swift:218:13:218:13 | arr2c | result | +| conversions.swift:219:13:219:20 | ...[...] | conversions.swift:201:14:201:33 | call to sourceArray(_:) | conversions.swift:219:13:219:20 | ...[...] | result | +| conversions.swift:220:13:220:20 | ...[...] | conversions.swift:202:15:202:32 | call to sourceInt(_:) | conversions.swift:220:13:220:20 | ...[...] | result | +| conversions.swift:236:13:236:13 | withUInt | conversions.swift:262:26:262:43 | call to sourceUInt(_:) | conversions.swift:236:13:236:13 | withUInt | result | +| conversions.swift:238:12:238:12 | self | conversions.swift:262:26:262:43 | call to sourceUInt(_:) | conversions.swift:238:12:238:12 | self | result | +| conversions.swift:242:13:242:25 | .v | conversions.swift:265:37:265:53 | call to sourceInt(_:) | conversions.swift:242:13:242:25 | .v | result | +| conversions.swift:248:13:248:26 | .v | conversions.swift:268:38:268:54 | call to sourceInt(_:) | conversions.swift:248:13:248:26 | .v | result | +| conversions.swift:251:12:251:12 | self | conversions.swift:268:38:268:54 | call to sourceInt(_:) | conversions.swift:251:12:251:12 | self | result | +| conversions.swift:255:13:255:25 | .v | conversions.swift:271:43:271:59 | call to sourceInt(_:) | conversions.swift:255:13:255:25 | .v | result | +| conversions.swift:262:12:262:44 | call to Int.init(withUInt:) | conversions.swift:262:26:262:43 | call to sourceUInt(_:) | conversions.swift:262:12:262:44 | call to Int.init(withUInt:) | result | +| conversions.swift:268:12:268:56 | call to Int.init(withMyValue2:) | conversions.swift:268:38:268:54 | call to sourceInt(_:) | conversions.swift:268:12:268:56 | call to Int.init(withMyValue2:) | result | +| conversions.swift:271:12:271:61 | call to mkInt(withMyValue:) | conversions.swift:271:43:271:59 | call to sourceInt(_:) | conversions.swift:271:12:271:61 | call to mkInt(withMyValue:) | result | | simple.swift:12:13:12:24 | ... .+(_:_:) ... | simple.swift:12:17:12:24 | call to source() | simple.swift:12:13:12:24 | ... .+(_:_:) ... | result | | simple.swift:13:13:13:24 | ... .+(_:_:) ... | simple.swift:13:13:13:20 | call to source() | simple.swift:13:13:13:24 | ... .+(_:_:) ... | result | | simple.swift:14:13:14:24 | ... .-(_:_:) ... | simple.swift:14:17:14:24 | call to source() | simple.swift:14:13:14:24 | ... .-(_:_:) ... | result | diff --git a/swift/ql/test/library-tests/dataflow/taint/core/conversions.swift b/swift/ql/test/library-tests/dataflow/taint/core/conversions.swift index dc4b59ef0624..e545c9562203 100644 --- a/swift/ql/test/library-tests/dataflow/taint/core/conversions.swift +++ b/swift/ql/test/library-tests/dataflow/taint/core/conversions.swift @@ -1,11 +1,11 @@ -func sourceInt() -> Int { 0 } -func sourceUInt() -> UInt { 0 } -func sourceUInt64() -> UInt64 { 0 } -func sourceFloat() -> Float { 0.0 } -func sourceFloat80() -> Float80 { 0.0 } -func sourceDouble() -> Double { 0.0 } -func sourceString() -> String { "" } +func sourceInt(_ label: String) -> Int { 0 } +func sourceUInt(_ label: String) -> UInt { 0 } +func sourceUInt64(_ label: String) -> UInt64 { 0 } +func sourceFloat(_ label: String) -> Float { 0.0 } +func sourceFloat80(_ label: String) -> Float80 { 0.0 } +func sourceDouble(_ label: String) -> Double { 0.0 } +func sourceString(_ label: String) -> String { "" } func sourceArray(_ label: String) -> [Int] { [] } func sink(arg: Any) { } @@ -29,111 +29,141 @@ class MyString : LosslessStringConvertible, CustomStringConvertible, CustomDebug typealias MyInt = Int func testConversions() { - sink(arg: sourceInt()) // $ tainted=32 - sink(arg: Int(sourceInt())) // $ tainted=33 - sink(arg: UInt8(sourceInt())) // $ tainted=34 - sink(arg: Float(sourceInt())) // $ tainted=35 - sink(arg: String(sourceInt())) // $ tainted=36 - sink(arg: String(sourceInt()).utf8) // $ tainted=37 - - let arr = [1, 2, sourceInt()] - sink(arg: arr) // $ tainted=39 - sink(arg: arr[0]) // $ tainted=39 - sink(arg: [MyInt](arr)) // $ tainted=39 - sink(arg: [MyInt](arr)[0]) // $ tainted=39 - sink(arg: [UInt8](sourceString().utf8)) // $ tainted=44 - sink(arg: [UInt8](sourceString().utf8)[0]) // $ tainted=45 - - if let v = sourceInt() as? UInt { - sink(arg: v) // $ tainted=47 + sink(arg: sourceInt("conv1-1")) // $ tainted=conv1-1 + sink(arg: Int(sourceInt("conv1-2"))) // $ tainted=conv1-2 + sink(arg: Int8(sourceInt("conv1-3"))) // $ tainted=conv1-3 + sink(arg: Int16(sourceInt("conv1-4"))) // $ tainted=conv1-4 + sink(arg: Int32(sourceInt("conv1-5"))) // $ tainted=conv1-5 + sink(arg: Int64(sourceInt("conv1-6"))) // $ tainted=conv1-6 + //sink(arg: Int128(sourceInt("conv1-7"))) --- doesn't build in test (yet) + sink(arg: UInt(sourceInt("conv1-8"))) // $ tainted=conv1-8 + sink(arg: UInt8(sourceInt("conv1-9"))) // $ tainted=conv1-9 + sink(arg: UInt16(sourceInt("conv1-10"))) // $ tainted=conv1-10 + sink(arg: UInt32(sourceInt("conv1-11"))) // $ tainted=conv1-11 + sink(arg: UInt64(sourceInt("conv1-12"))) // $ tainted=conv1-12 + //sink(arg: UInt128(sourceInt("conv1-13"))) --- doesn't build in test (yet) + sink(arg: Float(sourceInt("conv1-14"))) // $ tainted=conv1-14 + sink(arg: Double(sourceInt("conv1-15"))) // $ tainted=conv1-15 + sink(arg: String(sourceInt("conv1-16"))) // $ tainted=conv1-16 + sink(arg: String(sourceInt("conv1-17")).utf8) // $ tainted=conv1-17 + + let arr = [1, 2, sourceInt("conv2-1")] + sink(arg: arr) // $ tainted=conv2-1 + sink(arg: arr[0]) // $ tainted=conv2-1 + sink(arg: [MyInt](arr)) // $ tainted=conv2-1 + sink(arg: [MyInt](arr)[0]) // $ tainted=conv2-1 + sink(arg: [UInt8](sourceString("conv2-2").utf8)) // $ tainted=conv2-2 + sink(arg: [UInt8](sourceString("conv2-3").utf8)[0]) // $ tainted=conv2-3 + + if let v = sourceInt("conv3-1") as? UInt { + sink(arg: v) // $ tainted=conv3-1 } - let v2: UInt8 = numericCast(sourceInt()) - sink(arg: v2) // $ tainted=51 + let v2: UInt8 = numericCast(sourceInt("conv3-2")) + sink(arg: v2) // $ tainted=conv3-2 - let v4: UInt = unsafeBitCast(sourceInt(), to: UInt.self) - sink(arg: v4) // $ tainted=54 + let v4: UInt = unsafeBitCast(sourceInt("conv3-3"), to: UInt.self) + sink(arg: v4) // $ tainted=conv3-3 - let v5 = UInt(truncatingIfNeeded: sourceInt()) - sink(arg: v5) // $ tainted=57 + let v5 = UInt(truncatingIfNeeded: sourceInt("conv3-4")) + sink(arg: v5) // $ tainted=conv3-4 - let v6 = UInt(bitPattern: sourceInt()) - sink(arg: v6) // $ tainted=60 + let v6 = UInt(bitPattern: sourceInt("conv3-5")) + sink(arg: v6) // $ tainted=conv3-5 - let v7 = abs(sourceInt()) - sink(arg: v7) // $ tainted=63 + let v7 = abs(sourceInt("conv3-6")) + sink(arg: v7) // $ tainted=conv3-6 let v8 = UInt64(0) sink(arg: v8) sink(arg: v8.advanced(by: 1)) - sink(arg: v8.advanced(by: sourceInt())) // $ tainted=69 - - sink(arg: Int(exactly: sourceInt())!) // $ tainted=71 - sink(arg: UInt32(exactly: sourceInt())!) // $ tainted=72 - sink(arg: Int(clamping: sourceInt())) // $ tainted=73 - sink(arg: Int(truncatingIfNeeded: sourceInt())) // $ tainted=74 - sink(arg: Int(sourceString(), radix: 10)!) // $ tainted=75 - - sink(arg: Int(littleEndian: sourceInt())) // $ tainted=77 - sink(arg: Int(bigEndian: sourceInt())) // $ tainted=78 - sink(arg: sourceInt().littleEndian) // $ tainted=79 - sink(arg: sourceInt().bigEndian) // $ tainted=80 + sink(arg: v8.advanced(by: sourceInt("conv3-7"))) // $ tainted=conv3-7 + sink(arg: v8.distance(to: 1)) + sink(arg: v8.distance(to: sourceUInt64("conv3-8"))) // $ tainted=conv3-8 + + sink(arg: Int(exactly: sourceInt("conv4-1"))!) // $ tainted=conv4-1 + sink(arg: UInt32(exactly: sourceInt("conv4-2"))!) // $ tainted=conv4-2 + sink(arg: Int(clamping: sourceInt("conv4-3"))) // $ tainted=conv4-3 + sink(arg: UInt32(clamping: sourceInt("conv4-4"))) // $ tainted=conv4-4 + sink(arg: Int(truncatingIfNeeded: sourceInt("conv4-5"))) // $ tainted=conv4-5 + sink(arg: UInt32(truncatingIfNeeded: sourceInt("conv4-6"))) // $ tainted=conv4-6 + sink(arg: Int(sourceString("conv4-7"), radix: 10)!) // $ tainted=conv4-7 + sink(arg: UInt32(sourceString("conv4-8"), radix: 10)!) // $ tainted=conv4-8 + + sink(arg: Int(littleEndian: sourceInt("conv5-1"))) // $ tainted=conv5-1 + sink(arg: UInt64(littleEndian: sourceUInt64("conv5-2"))) // $ tainted=conv5-2 + sink(arg: Int(bigEndian: sourceInt("conv5-3"))) // $ tainted=conv5-3 + sink(arg: UInt64(bigEndian: sourceUInt64("conv5-4"))) // $ tainted=conv5-4 + sink(arg: sourceInt("conv5-5").littleEndian) // $ tainted=conv5-5 + sink(arg: sourceUInt64("conv5-6").littleEndian) // $ tainted=conv5-6 + sink(arg: sourceInt("conv5-7").bigEndian) // $ tainted=conv5-7 + sink(arg: sourceUInt64("conv5-8").bigEndian) // $ tainted=conv5-8 let (q1, r1) = 1000.quotientAndRemainder(dividingBy: 2) sink(arg: q1) sink(arg: r1) - let (q2, r2) = sourceInt().quotientAndRemainder(dividingBy: 2) - sink(arg: q2) // $ MISSING: tainted=86 - sink(arg: r2) // $ MISSING: tainted=86 + let (q2, r2) = sourceInt("conv6-1").quotientAndRemainder(dividingBy: 2) + sink(arg: q2) // $ MISSING: tainted=conv6-1 + sink(arg: r2) // $ MISSING: tainted=conv6-1 - let (q3, r3) = 1000.quotientAndRemainder(dividingBy: sourceInt()) - sink(arg: q3) // $ MISSING: tainted=90 - sink(arg: r3) // $ MISSING: tainted=90 + let (q3, r3) = 1000.quotientAndRemainder(dividingBy: sourceInt("conv6-2")) + sink(arg: q3) // $ MISSING: tainted=conv6-2 + sink(arg: r3) // $ MISSING: tainted=conv6-2 + + let (q4, r4) = UInt64(1000).quotientAndRemainder(dividingBy: sourceUInt64("conv6-3")) + sink(arg: q4) // $ MISSING: tainted=conv6-3 + sink(arg: r4) // $ MISSING: tainted=conv6-3 let pair1 = 1000.addingReportingOverflow(2) sink(arg: pair1.0) // part sink(arg: pair1.1) // overflow - let pair2 = sourceInt().addingReportingOverflow(2) - sink(arg: pair2.0) // $ MISSING: tainted=98 + let pair2 = sourceInt("conv6-4").addingReportingOverflow(2) + sink(arg: pair2.0) // $ MISSING: tainted=conv6-4 sink(arg: pair2.1) - let pair3 = 1000.addingReportingOverflow(sourceInt()) - sink(arg: pair3.0) // $ MISSING: tainted=102 + let pair3 = 1000.addingReportingOverflow(sourceInt("conv6-5")) + sink(arg: pair3.0) // $ MISSING: tainted=conv6-5 sink(arg: pair3.1) + let pair4 = UInt64(1000).addingReportingOverflow(sourceUInt64("conv6-6")) + sink(arg: pair4.0) // $ MISSING: tainted=conv6-6 + sink(arg: pair4.1) + // --- - sink(arg: sourceFloat()) // $ tainted=108 - sink(arg: Float(sourceFloat())) // $ tainted=109 - sink(arg: UInt8(sourceFloat())) // $ tainted=110 - sink(arg: String(sourceFloat())) // $ tainted=111 - sink(arg: String(sourceFloat()).utf8) // $ tainted=112 - sink(arg: String(sourceFloat80())) // $ tainted=113 - sink(arg: String(sourceFloat80()).utf8) // $ tainted=114 - sink(arg: String(sourceDouble())) // $ tainted=115 - sink(arg: String(sourceDouble()).utf8) // $ tainted=116 - - sink(arg: Float(sourceFloat())) // $ tainted=118 - sink(arg: Float(sign: .plus, exponent: sourceInt(), significand: 0.0)) // $ tainted=119 - sink(arg: Float(sign: .plus, exponent: 0, significand: sourceFloat())) // $ tainted=120 - sink(arg: Float(signOf: sourceFloat(), magnitudeOf: 0.0)) // (good) - sink(arg: Float(signOf: 0.0, magnitudeOf: sourceFloat())) // $ tainted=122 - - sink(arg: sourceFloat().exponent) // $ tainted=124 - sink(arg: sourceFloat().significand) // $ tainted=125 - sink(arg: sourceFloat80().exponent) // $ tainted=126 - sink(arg: sourceFloat80().significand) // $ tainted=127 - sink(arg: sourceDouble().exponent) // $ tainted=128 - sink(arg: sourceDouble().significand) // $ tainted=129 - sink(arg: sourceUInt().byteSwapped) // $ tainted=130 - sink(arg: sourceUInt64().byteSwapped) // $ tainted=131 + sink(arg: sourceFloat("conv7-1")) // $ tainted=conv7-1 + sink(arg: Float(sourceFloat("conv7-2"))) // $ tainted=conv7-2 + sink(arg: UInt8(sourceFloat("conv7-3"))) // $ tainted=conv7-3 + sink(arg: String(sourceFloat("conv7-4"))) // $ tainted=conv7-4 + sink(arg: String(sourceFloat("conv7-5")).utf8) // $ tainted=conv7-5 + sink(arg: String(sourceFloat80("conv7-6"))) // $ tainted=conv7-6 + sink(arg: String(sourceFloat80("conv7-7")).utf8) // $ tainted=conv7-7 + sink(arg: String(sourceDouble("conv7-8"))) // $ tainted=conv7-8 + sink(arg: String(sourceDouble("conv7-9")).utf8) // $ tainted=conv7-9 + + sink(arg: Float(sourceFloat("conv8-1"))) // $ tainted=conv8-1 + sink(arg: Float(sign: .plus, exponent: sourceInt("conv8-2"), significand: 0.0)) // $ tainted=conv8-2 + sink(arg: Float(sign: .plus, exponent: 0, significand: sourceFloat("conv8-3"))) // $ tainted=conv8-3 + sink(arg: Float(signOf: sourceFloat("conv8-4"), magnitudeOf: 0.0)) // (good) + sink(arg: Float(signOf: 0.0, magnitudeOf: sourceFloat("conv8-5"))) // $ tainted=conv8-5 + + sink(arg: sourceFloat("conv9-1").exponent) // $ tainted=conv9-1 + sink(arg: sourceFloat("conv9-2").significand) // $ tainted=conv9-2 + sink(arg: sourceFloat80("conv9-3").exponent) // $ tainted=conv9-3 + sink(arg: sourceFloat80("conv9-4").significand) // $ tainted=conv9-4 + sink(arg: sourceDouble("conv9-5").exponent) // $ tainted=conv9-5 + sink(arg: sourceDouble("conv9-6").significand) // $ tainted=conv9-6 + sink(arg: sourceUInt("conv9-7").byteSwapped) // $ tainted=conv9-7 + sink(arg: sourceUInt64("conv9-8").byteSwapped) // $ tainted=conv9-8 + sink(arg: sourceInt("conv9-9").magnitude) // $ tainted=conv9-9 + sink(arg: sourceUInt64("conv9-10").magnitude) // $ tainted=conv9-10 // --- - sink(arg: sourceString()) // $ tainted=135 - sink(arg: String(sourceString())) // $ tainted=136 + sink(arg: sourceString("conv10-1")) // $ tainted=conv10-1 + sink(arg: String(sourceString("conv10-2"))) // $ tainted=conv10-2 let ms1 = MyString("abc")! sink(arg: ms1) @@ -141,21 +171,21 @@ func testConversions() { sink(arg: ms1.debugDescription) sink(arg: ms1.clean) - let ms2 = MyString(sourceString())! - sink(arg: ms2) // $ tainted=144 - sink(arg: ms2.description) // $ tainted=144 - sink(arg: ms2.debugDescription) // $ tainted=144 + let ms2 = MyString(sourceString("conv11-1"))! + sink(arg: ms2) // $ tainted=conv11-1 + sink(arg: ms2.description) // $ tainted=conv11-1 + sink(arg: ms2.debugDescription) // $ tainted=conv11-1 sink(arg: ms2.clean) // --- - let parent : MyParentClass = sourceString() as! MyChildClass - sink(arg: parent) // $ tainted=152 - sink(arg: parent as! MyChildClass) // $ tainted=152 + let parent : MyParentClass = sourceString("conv12-1") as! MyChildClass + sink(arg: parent) // $ tainted=conv12-1 + sink(arg: parent as! MyChildClass) // $ tainted=conv12-1 let v3: MyChildClass = unsafeDowncast(parent, to: MyChildClass.self) - sink(arg: v3) // $ tainted=152 - sink(arg: v3 as! MyParentClass) // $ tainted=152 + sink(arg: v3) // $ tainted=conv12-1 + sink(arg: v3 as! MyParentClass) // $ tainted=conv12-1 } var myCEnumConst : Int = 0 @@ -163,31 +193,31 @@ typealias MyCEnumType = UInt32 func testCEnum() { sink(arg: MyCEnumType(myCEnumConst)) - sink(arg: MyCEnumType(sourceInt())) // $ tainted=166 + sink(arg: MyCEnumType(sourceInt("cenum"))) // $ tainted=cenum } class TestArrayConversion { init() { let arr1 = sourceArray("init1") - let arr2 = [sourceInt()] + let arr2 = [sourceInt("init2")] sink(arg: arr1) // $ tainted=init1 - sink(arg: arr2) // $ tainted=172 + sink(arg: arr2) // $ tainted=init2 sink(arg: arr1[0]) // $ tainted=init1 - sink(arg: arr2[0]) // $ tainted=172 + sink(arg: arr2[0]) // $ tainted=init2 let arr1b = try Array(arr1) let arr2b = try Array(arr2) sink(arg: arr1b) // $ tainted=init1 - sink(arg: arr2b) // $ tainted=172 + sink(arg: arr2b) // $ tainted=init2 sink(arg: arr1b[0]) // $ tainted=init1 - sink(arg: arr2b[0]) // $ tainted=172 + sink(arg: arr2b[0]) // $ tainted=init2 let arr1c = ContiguousArray(arr1) let arr2c = ContiguousArray(arr2) sink(arg: arr1c) // $ tainted=init1 - sink(arg: arr2c) // $ tainted=172 + sink(arg: arr2c) // $ tainted=init2 sink(arg: arr1c[0]) // $ tainted=init1 - sink(arg: arr2c[0]) // $ tainted=172 + sink(arg: arr2c[0]) // $ tainted=init2 } } @@ -203,40 +233,40 @@ class MyValue { extension Int { init(withUInt: UInt) { - sink(arg: withUInt) // $ tainted=232 + sink(arg: withUInt) // $ tainted=ext1 self = Int(withUInt) - sink(arg:self) // $ tainted=232 + sink(arg:self) // $ tainted=ext1 } init(withMyValue: MyValue) { - sink(arg: withMyValue.v) // $ tainted=235 + sink(arg: withMyValue.v) // $ tainted=ext2 self = withMyValue.v - sink(arg:self) // $ MISSING: tainted=235 + sink(arg:self) // $ MISSING: tainted=ext2 } init(withMyValue2: MyValue) { - sink(arg: withMyValue2.v) // $ tainted=238 + sink(arg: withMyValue2.v) // $ tainted=ext3 let x = withMyValue2.v self = x - sink(arg:self) // $ tainted=238 + sink(arg:self) // $ tainted=ext3 } static func mkInt(withMyValue: MyValue) -> Int { - sink(arg: withMyValue.v) // $ tainted=241 + sink(arg: withMyValue.v) // $ tainted=ext4 return withMyValue.v } } func testIntExtensions() { sink(arg: Int(withUInt: 0)) - sink(arg: Int(withUInt: sourceUInt())) // $ tainted=232 + sink(arg: Int(withUInt: sourceUInt("ext1"))) // $ tainted=ext1 sink(arg: Int(withMyValue: MyValue(0))) - sink(arg: Int(withMyValue: MyValue(sourceInt()))) // $ MISSING: tainted=235 + sink(arg: Int(withMyValue: MyValue(sourceInt("ext2")))) // $ MISSING: tainted=ext2 sink(arg: Int(withMyValue2: MyValue(0))) - sink(arg: Int(withMyValue2: MyValue(sourceInt()))) // $ tainted=238 + sink(arg: Int(withMyValue2: MyValue(sourceInt("ext3")))) // $ tainted=ext3 sink(arg: Int.mkInt(withMyValue: MyValue(0))) - sink(arg: Int.mkInt(withMyValue: MyValue(sourceInt()))) // $ tainted=241 + sink(arg: Int.mkInt(withMyValue: MyValue(sourceInt("ext4")))) // $ tainted=ext4 } diff --git a/swift/ql/test/library-tests/elements/expr/methodlookup/PrintAst.expected b/swift/ql/test/library-tests/elements/expr/methodlookup/PrintAst.expected index d511a390341c..f0d85be52b68 100644 --- a/swift/ql/test/library-tests/elements/expr/methodlookup/PrintAst.expected +++ b/swift/ql/test/library-tests/elements/expr/methodlookup/PrintAst.expected @@ -187,6 +187,7 @@ methodlookup.swift: # 40| getBase(): [TypeExpr] Bar.Type # 40| getTypeRepr(): [TypeRepr] Bar # 40| getMethodRef(): [DeclRefExpr] staticMethod() +# 33| getExpr().getFullyConverted(): [FunctionConversionExpr] (@isolated(any) () async -> ()) ... # 33| [NilLiteralExpr] nil # 38| [Comment] // Bar.instanceMethod(bar2)() // error: actor-isolated instance method 'instanceMethod()' can not be referenced from a non-isolated context # 38| @@ -262,6 +263,7 @@ methodlookup.swift: # 51| getMethodRef(): [DeclRefExpr] staticMethod() # 51| getMethodRef().getFullyConverted(): [FunctionConversionExpr] ((Baz.Type) -> @MainActor () -> ()) ... # 51| getElement(5).getFullyConverted(): [AwaitExpr] await ... +# 43| getExpr().getFullyConverted(): [FunctionConversionExpr] (@isolated(any) () async -> ()) ... # 43| [NilLiteralExpr] nil # 47| [Comment] // DotSyntaxCallExpr # 47| diff --git a/swift/ql/test/library-tests/elements/type/nominaltype/nominaltype.expected b/swift/ql/test/library-tests/elements/type/nominaltype/nominaltype.expected index 8aa6c1b2d02c..a52075ab00ef 100644 --- a/swift/ql/test/library-tests/elements/type/nominaltype/nominaltype.expected +++ b/swift/ql/test/library-tests/elements/type/nominaltype/nominaltype.expected @@ -1,4 +1,4 @@ -| nominaltype.swift:84:6:84:6 | i | Int | getABaseType:CVarArg, getABaseType:CodingKeyRepresentable, getABaseType:CustomReflectable, getABaseType:Decodable, getABaseType:Encodable, getABaseType:Equatable, getABaseType:FixedWidthInteger, getABaseType:Hashable, getABaseType:MirrorPath, getABaseType:SIMDScalar, getABaseType:Sendable, getABaseType:SignedInteger, getABaseType:_CustomPlaygroundQuickLookable, getABaseType:_ExpressibleByBuiltinIntegerLiteral, getABaseType:_HasCustomAnyHashableRepresentation, getCanonicalType:Int, getFullName:Int, getName:Int, getUnderlyingType:Int | +| nominaltype.swift:84:6:84:6 | i | Int | getABaseType:BitwiseCopyable, getABaseType:CVarArg, getABaseType:CodingKeyRepresentable, getABaseType:CustomReflectable, getABaseType:Decodable, getABaseType:Encodable, getABaseType:Equatable, getABaseType:FixedWidthInteger, getABaseType:Hashable, getABaseType:MirrorPath, getABaseType:SIMDScalar, getABaseType:Sendable, getABaseType:SignedInteger, getABaseType:_CustomPlaygroundQuickLookable, getABaseType:_ExpressibleByBuiltinIntegerLiteral, getABaseType:_HasCustomAnyHashableRepresentation, getCanonicalType:Int, getFullName:Int, getName:Int, getUnderlyingType:Int | | nominaltype.swift:85:6:85:6 | j | Any? | getCanonicalType:Optional, getFullName:Any?, getName:Any?, getUnderlyingType:Any? | | nominaltype.swift:86:6:86:6 | a | A | getCanonicalType:A, getFullName:A, getName:A, getUnderlyingType:A | | nominaltype.swift:87:6:87:6 | a_alias | A_alias | getAliasedType:A, getCanonicalType:A, getFullName:A_alias, getName:A_alias, getUnderlyingType:A | diff --git a/swift/ql/test/library-tests/elements/type/nominaltype/nominaltypedecl.expected b/swift/ql/test/library-tests/elements/type/nominaltype/nominaltypedecl.expected index e4bdf96ab7f4..d9c0b1a0994f 100644 --- a/swift/ql/test/library-tests/elements/type/nominaltype/nominaltypedecl.expected +++ b/swift/ql/test/library-tests/elements/type/nominaltype/nominaltypedecl.expected @@ -1,4 +1,4 @@ -| nominaltype.swift:84:6:84:6 | i | Int | getABaseType:CVarArg, getABaseType:CodingKeyRepresentable, getABaseType:CustomReflectable, getABaseType:Decodable, getABaseType:Encodable, getABaseType:Equatable, getABaseType:FixedWidthInteger, getABaseType:Hashable, getABaseType:MirrorPath, getABaseType:SIMDScalar, getABaseType:Sendable, getABaseType:SignedInteger, getABaseType:_CustomPlaygroundQuickLookable, getABaseType:_ExpressibleByBuiltinIntegerLiteral, getABaseType:_HasCustomAnyHashableRepresentation, getABaseTypeDecl:CVarArg, getABaseTypeDecl:CodingKeyRepresentable, getABaseTypeDecl:CustomReflectable, getABaseTypeDecl:Decodable, getABaseTypeDecl:Encodable, getABaseTypeDecl:Equatable, getABaseTypeDecl:FixedWidthInteger, getABaseTypeDecl:Hashable, getABaseTypeDecl:MirrorPath, getABaseTypeDecl:SIMDScalar, getABaseTypeDecl:Sendable, getABaseTypeDecl:SignedInteger, getABaseTypeDecl:_CustomPlaygroundQuickLookable, getABaseTypeDecl:_ExpressibleByBuiltinIntegerLiteral, getABaseTypeDecl:_HasCustomAnyHashableRepresentation, getFullName:Int, getName:Int | +| nominaltype.swift:84:6:84:6 | i | Int | getABaseType:BitwiseCopyable, getABaseType:CVarArg, getABaseType:CodingKeyRepresentable, getABaseType:CustomReflectable, getABaseType:Decodable, getABaseType:Encodable, getABaseType:Equatable, getABaseType:FixedWidthInteger, getABaseType:Hashable, getABaseType:MirrorPath, getABaseType:SIMDScalar, getABaseType:Sendable, getABaseType:SignedInteger, getABaseType:_CustomPlaygroundQuickLookable, getABaseType:_ExpressibleByBuiltinIntegerLiteral, getABaseType:_HasCustomAnyHashableRepresentation, getABaseTypeDecl:BitwiseCopyable, getABaseTypeDecl:CVarArg, getABaseTypeDecl:CodingKeyRepresentable, getABaseTypeDecl:CustomReflectable, getABaseTypeDecl:Decodable, getABaseTypeDecl:Encodable, getABaseTypeDecl:Equatable, getABaseTypeDecl:FixedWidthInteger, getABaseTypeDecl:Hashable, getABaseTypeDecl:MirrorPath, getABaseTypeDecl:SIMDScalar, getABaseTypeDecl:Sendable, getABaseTypeDecl:SignedInteger, getABaseTypeDecl:_CustomPlaygroundQuickLookable, getABaseTypeDecl:_ExpressibleByBuiltinIntegerLiteral, getABaseTypeDecl:_HasCustomAnyHashableRepresentation, getFullName:Int, getName:Int | | nominaltype.swift:86:6:86:6 | a | A | getFullName:A, getName:A | | nominaltype.swift:87:6:87:6 | a_alias | A_alias | getAliasedType:A, getFullName:A_alias, getName:A_alias | | nominaltype.swift:88:6:88:6 | a_optional_alias | A_optional_alias | getAliasedType:A?, getFullName:A_optional_alias, getName:A_optional_alias | diff --git a/swift/ql/test/query-tests/Security/CWE-020/MissingRegexAnchor.expected b/swift/ql/test/query-tests/Security/CWE-020/MissingRegexAnchor.expected index 553d53846e6c..6296a5ec04eb 100644 --- a/swift/ql/test/query-tests/Security/CWE-020/MissingRegexAnchor.expected +++ b/swift/ql/test/query-tests/Security/CWE-020/MissingRegexAnchor.expected @@ -49,8 +49,9 @@ | UnanchoredUrlRegex.swift:82:3:82:3 | https?://good.com | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | | UnanchoredUrlRegex.swift:83:3:83:3 | https?:\\/\\/good.com | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | | UnanchoredUrlRegex.swift:84:3:84:3 | ^https?://good.com | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | -| UnanchoredUrlRegex.swift:95:39:95:39 | https?:\\/\\/good.com\\/([0-9]+) | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | -| UnanchoredUrlRegex.swift:101:39:101:39 | example\\.com\|whatever | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | +| UnanchoredUrlRegex.swift:91:3:91:3 | https?://good.com | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | +| UnanchoredUrlRegex.swift:101:39:101:39 | https?:\\/\\/good.com\\/([0-9]+) | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | +| UnanchoredUrlRegex.swift:107:39:107:39 | example\\.com\|whatever | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | | test.swift:56:16:56:16 | ^http://example.com | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | | test.swift:59:16:59:16 | ^http://test\\.example.com | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | | test.swift:69:16:69:16 | ^(.+\\.(?:example-a\|example-b)\\.com)/ | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | diff --git a/swift/ql/test/query-tests/Security/CWE-020/UnanchoredUrlRegex.swift b/swift/ql/test/query-tests/Security/CWE-020/UnanchoredUrlRegex.swift index 94d211ea0ba4..b2e8810e7b75 100644 --- a/swift/ql/test/query-tests/Security/CWE-020/UnanchoredUrlRegex.swift +++ b/swift/ql/test/query-tests/Security/CWE-020/UnanchoredUrlRegex.swift @@ -86,6 +86,12 @@ func tests(url: String, secure: Bool) throws { for trustedUrlRegex in trustedUrlRegexs { if let _ = try NSRegularExpression(pattern: trustedUrlRegex).firstMatch(in: input, range: inputRange) { } } + + let trustedUrlRegexs2 = [ + "https?://good.com", // BAD (missing anchor), referenced below + ] + if let _ = try NSRegularExpression(pattern: trustedUrlRegexs2[0]).firstMatch(in: input, range: inputRange) { } + let notUsedUrlRegexs = [ "https?://good.com" // OK (not referenced) ] diff --git a/swift/schema.py b/swift/schema.py index e1deb0a2778a..7c2cebb594da 100644 --- a/swift/schema.py +++ b/swift/schema.py @@ -1016,6 +1016,7 @@ class DoStmt(LabeledStmt): body: BraceStmt | child class ForEachStmt(LabeledStmt): + variables: list[VarDecl] | child pattern: Pattern | child where: optional[Expr] | child iteratorVar: optional[PatternBindingDecl] | child diff --git a/swift/third_party/BUILD.bazel b/swift/third_party/BUILD.bazel index e69de29bb2d1..b9982c37e8dd 100644 --- a/swift/third_party/BUILD.bazel +++ b/swift/third_party/BUILD.bazel @@ -0,0 +1,3 @@ +load(":load.bzl", "test_no_override") + +test_no_override() diff --git a/swift/third_party/BUILD.swift-llvm-support.bazel b/swift/third_party/BUILD.swift-llvm-support.bazel index af98184b6736..231500b35abb 100644 --- a/swift/third_party/BUILD.swift-llvm-support.bazel +++ b/swift/third_party/BUILD.swift-llvm-support.bazel @@ -1,12 +1,9 @@ cc_library( - name = "swift-llvm-support", + name = "swift-llvm-support-static", srcs = glob( [ "*.a", - "*.so", - "*.dylib", ], - allow_empty = True, # Either *.so or *.dylib will be empty ), hdrs = glob([ "include/**/*", @@ -16,6 +13,20 @@ cc_library( "include", "stdlib/public/SwiftShims", ], + deps = [ + "@zstd", + ], +) + +cc_library( + name = "swift-llvm-support", + srcs = glob( + [ + "*.so", + "*.dylib", + ], + allow_empty = True, # Either *.so or *.dylib will be empty + ), linkopts = [ "-lm", "-lz", @@ -32,4 +43,5 @@ cc_library( "//conditions:default": [], }), visibility = ["//visibility:public"], + deps = [":swift-llvm-support-static"], ) diff --git a/swift/third_party/load.bzl b/swift/third_party/load.bzl index f9f46e5f4102..d19345a18803 100644 --- a/swift/third_party/load.bzl +++ b/swift/third_party/load.bzl @@ -1,102 +1,66 @@ -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@bazel_skylib//rules:write_file.bzl", "write_file") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") +load("//misc/bazel:lfs.bzl", "lfs_archive", "lfs_files") -_swift_prebuilt_version = "swift-5.10.1-RELEASE.323" -_swift_sha_map = { - "Linux-X64": "29c7c53ab2f438e85daecdb4567173c78ac32afc45753d7277d744aed515229d", - "macOS-ARM64": "e697f423c8abcb8a942246489fd4f8ce71472119510b64b2073eaeaec86b771e", - "macOS-X64": "faef29334e8615e8a71263c7453ebc7e566d6f2928d827675f6faae233c544a6", +_override = { + # these are used to test new artifacts. Must be empty before merging to main } -_swift_arch_map = { - "Linux-X64": "linux", - "macOS-X64": "darwin_x86_64", -} - -_swift_version = _swift_prebuilt_version.rpartition(".")[0] - -_toolchain_info = { - "linux": struct( - platform = "ubuntu2004", - suffix = "ubuntu20.04", - extension = "tar.gz", - sha = "935d0b68757d9b1aceb6410fe0b126a28a07e362553ebba0c4bcd1c9a55d0bc5", - ), - "macos": struct( - platform = "xcode", - suffix = "osx", - extension = "pkg", - sha = "ef9bb6b38711324e1b1c89de44a27d9519d0711924c57f4df541734b04aaf6cc", - ), -} - -def _get_toolchain_url(info): - return "https://download.swift.org/%s/%s/%s/%s-%s.%s" % ( - _swift_version.lower(), - info.platform, - _swift_version, - _swift_version, - info.suffix, - info.extension, - ) - -def _toolchains(): - rules = { - "tar.gz": http_archive, - "pkg": _pkg_archive, - } - for arch, info in _toolchain_info.items(): - rule = rules[info.extension] - rule( - name = "swift_toolchain_%s" % arch, - url = _get_toolchain_url(info), - sha256 = info.sha, - build_file = _build % "swift-toolchain-%s" % arch, - strip_prefix = "%s-%s" % (_swift_version, info.suffix), +_staging_url = "https://github.com/dsp-testing/codeql-swift-artifacts/releases/download/staging-{}/{}" + +def _get_override(file): + prefix, _, _ = file.partition(".") + for key, value in _override.items(): + if key.startswith(prefix): + return {"url": _staging_url.format(prefix, key), "sha256": value} + return None + +def _load_resource_dir(plat): + name = "swift-resource-dir-%s" % plat.lower() + file = "resource-dir-%s.zip" % plat + override = _get_override(file) + if override: + http_file( + name = name, + downloaded_file_path = file.lower(), + **override + ) + else: + lfs_files( + name = name, + srcs = ["//swift/third_party/resources:%s" % file.lower()], ) -def _run(repository_ctx, message, cmd, working_directory = "."): - repository_ctx.report_progress(message) - res = repository_ctx.execute( - ["bash", "-c", cmd], - working_directory = working_directory, - ) - if res.return_code != 0: - fail(message) +def _load_prebuilt(plat): + name = "swift-prebuilt-%s" % plat.lower() + file = "swift-prebuilt-%s.tar.zst" % plat + override = _get_override(file) + build = _build % "swift-llvm-support" + if override: + http_archive( + name = name, + build_file = build, + **override + ) -def _pkg_archive_impl(repository_ctx): - archive = "file.pkg" - url = repository_ctx.attr.url - dir = "%s-package.pkg" % repository_ctx.attr.strip_prefix - repository_ctx.report_progress("downloading %s" % url) - res = repository_ctx.download( - url, - output = archive, - sha256 = repository_ctx.attr.sha256, - ) - if not repository_ctx.attr.sha256: - print("Rule '%s' indicated that a canonical reproducible form " % repository_ctx.name + - "can be obtained by modifying arguments sha256 = \"%s\"" % res.sha256) - _run(repository_ctx, "extracting %s" % dir, "xar -xf %s" % archive) - repository_ctx.delete(archive) - _run( - repository_ctx, - "extracting Payload from %s" % dir, - "cat %s/Payload | gunzip -dc | cpio -i" % dir, - ) - repository_ctx.delete(dir) - repository_ctx.symlink(repository_ctx.attr.build_file, "BUILD") - repository_ctx.file("WORKSPACE") + # this is for `//swift/third_party/resources:update-prebuilt-*` support + http_file( + name = name + "-download-only", + **override + ) + else: + lfs_archive( + name = name, + src = "//swift/third_party/resources:%s" % file.lower(), + build_file = build, + ) -_pkg_archive = repository_rule( - implementation = _pkg_archive_impl, - attrs = { - "url": attr.string(mandatory = True), - "sha256": attr.string(), - "strip_prefix": attr.string(), - "build_file": attr.label(mandatory = True), - }, -) + # unused, but saves us some bazel mod tidy dance when in override mode + lfs_files( + name = name + "-download-only", + srcs = ["//swift/third_party/resources:%s" % file.lower()], + ) def _github_archive(*, name, repository, commit, build_file = None, sha256 = None): github_name = repository[repository.index("/") + 1:] @@ -112,20 +76,9 @@ def _github_archive(*, name, repository, commit, build_file = None, sha256 = Non _build = "//swift/third_party:BUILD.%s.bazel" def load_dependencies(module_ctx): - for repo_arch, arch in _swift_arch_map.items(): - sha256 = _swift_sha_map[repo_arch] - - http_archive( - name = "swift_prebuilt_%s" % arch, - url = "https://github.com/dsp-testing/codeql-swift-artifacts/releases/download/%s/swift-prebuilt-%s.zip" % ( - _swift_prebuilt_version, - repo_arch, - ), - build_file = _build % "swift-llvm-support", - sha256 = sha256, - ) - - _toolchains() + for plat in ("macOS", "Linux"): + _load_prebuilt(plat) + _load_resource_dir(plat) _github_archive( name = "picosha2", @@ -149,3 +102,23 @@ def load_dependencies(module_ctx): ) swift_deps = module_extension(load_dependencies) + +def test_no_override(): + test_body = ["#!/bin/bash", ""] + test_body += [ + 'echo \\"%s\\" override in swift/third/party/load.bzl' % key + for key in _override + ] + if _override: + test_body.append("exit 1") + write_file( + name = "test-no-override-gen", + out = "test-no-override.sh", + content = test_body, + is_executable = True, + ) + native.sh_test( + name = "test-no-override", + srcs = [":test-no-override-gen"], + tags = ["override"], + ) diff --git a/swift/third_party/resource-dir/BUILD.bazel b/swift/third_party/resource-dir/BUILD.bazel deleted file mode 100644 index b48be643b698..000000000000 --- a/swift/third_party/resource-dir/BUILD.bazel +++ /dev/null @@ -1,29 +0,0 @@ -load("@rules_shell//shell:sh_binary.bzl", "sh_binary") - -alias( - name = "resource-dir", - actual = select({"@platforms//os:" + os: "@swift-resource-dir-" + os for os in ("linux", "macos")}), - target_compatible_with = select({ - "@platforms//os:windows": ["@platforms//:incompatible"], - "//conditions:default": [], - }), - visibility = ["//visibility:public"], -) - -[ - sh_binary( - name = "update-" + os, - srcs = ["update.sh"], - args = [ - "$(rlocationpath @swift_toolchain_%s)" % os, - "$(rlocationpath resource-dir-%s.zip)" % os, - ], - data = [ - "resource-dir-%s.zip" % os, - "@swift_toolchain_" + os, - ], - target_compatible_with = ["@platforms//os:" + os], - deps = ["//misc/bazel:sh_runfiles"], - ) - for os in ("linux", "macos") -] diff --git a/swift/third_party/resource-dir/README.md b/swift/third_party/resource-dir/README.md deleted file mode 100644 index 38873b4a54ff..000000000000 --- a/swift/third_party/resource-dir/README.md +++ /dev/null @@ -1,2 +0,0 @@ -These LFS files are redistributed parts of the [Swift toolchains](https://www.swift.org/download/). -A [copy](./LICENSE.txt) of the [swift](https://github.com/apple/swift) license is included. diff --git a/swift/third_party/resource-dir/resource-dir-linux.zip b/swift/third_party/resource-dir/resource-dir-linux.zip deleted file mode 100644 index dc52894ec90a..000000000000 --- a/swift/third_party/resource-dir/resource-dir-linux.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:02bf1b93c60917b09e5de24f7a3a96e109337fedb7ee1cc0c2409d829866dbfe -size 190645227 diff --git a/swift/third_party/resource-dir/resource-dir-macos.zip b/swift/third_party/resource-dir/resource-dir-macos.zip deleted file mode 100644 index cfc595532191..000000000000 --- a/swift/third_party/resource-dir/resource-dir-macos.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8e29feb39124731510535f8d98be80bc68b10ff0e791c909c9ff96a9b97391fa -size 483440694 diff --git a/swift/third_party/resources/BUILD.bazel b/swift/third_party/resources/BUILD.bazel new file mode 100644 index 000000000000..0ceca995b94f --- /dev/null +++ b/swift/third_party/resources/BUILD.bazel @@ -0,0 +1,52 @@ +load("@rules_shell//shell:sh_binary.bzl", "sh_binary") + +_oses = ("linux", "macos") + +alias( + name = "dir", + actual = select({"@platforms//os:" + os: "@swift-resource-dir-%s//file" % os for os in _oses}), + target_compatible_with = select({ + "@platforms//os:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), + visibility = ["//visibility:public"], +) + +alias( + name = "prebuilt", + actual = select({"@platforms//os:" + os: "@swift-prebuilt-%s//:swift-llvm-support" % os for os in _oses}), + target_compatible_with = select({ + "@platforms//os:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), + visibility = ["//visibility:public"], +) + +[ + sh_binary( + name = "update-%s-%s" % (what, os), + srcs = ["update.sh"], + args = [ + "$(rlocationpath %s)" % source, + "$(rlocationpath %s)" % target, + ], + data = [ + source, + target, + ], + deps = ["//misc/bazel:sh_runfiles"], + ) + for os in _oses + for what, source, target in ( + ( + "prebuilt", + "@swift-prebuilt-%s-download-only//file" % os, + "swift-prebuilt-%s.tar.zst" % os, + ), + ( + "dir", + "@swift-resource-dir-%s//file" % os, + "resource-dir-%s.zip" % os, + ), + ) +] diff --git a/swift/third_party/resource-dir/LICENSE.txt b/swift/third_party/resources/LICENSE.txt similarity index 100% rename from swift/third_party/resource-dir/LICENSE.txt rename to swift/third_party/resources/LICENSE.txt diff --git a/swift/third_party/resources/README.md b/swift/third_party/resources/README.md new file mode 100644 index 000000000000..99b48964e19f --- /dev/null +++ b/swift/third_party/resources/README.md @@ -0,0 +1,7 @@ +The `resource-dir-*.zip` LFS files are redistributed parts of the [Swift toolchains](https://www.swift.org/download/). + +The `swift-prebuilt-*.tar.zst` LFS files are precompiled binaries of the [swift code][swift]. + +A [copy](./LICENSE.txt) of the [swift][] license is included. + +[swift]: https://github.com/apple/swift diff --git a/swift/third_party/resources/resource-dir-linux.zip b/swift/third_party/resources/resource-dir-linux.zip new file mode 100644 index 000000000000..2c45df3aa031 --- /dev/null +++ b/swift/third_party/resources/resource-dir-linux.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:403374c72e20299951c2c37185404500d15340baaa52bb2d06f8815b03f8071e +size 318874108 diff --git a/swift/third_party/resources/resource-dir-macos.zip b/swift/third_party/resources/resource-dir-macos.zip new file mode 100644 index 000000000000..c358585ea656 --- /dev/null +++ b/swift/third_party/resources/resource-dir-macos.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38f48790fea144b7cf5918b885f32a0f68e21aa5f3c2f0a5722573cc9e950639 +size 653096176 diff --git a/swift/third_party/resources/swift-prebuilt-linux.tar.zst b/swift/third_party/resources/swift-prebuilt-linux.tar.zst new file mode 100644 index 000000000000..0a1fe2b3f4de --- /dev/null +++ b/swift/third_party/resources/swift-prebuilt-linux.tar.zst @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af1e3355fb476538449424a74f15ce21a0f877c7f85a568e736f0bd6c0239a8f +size 118694583 diff --git a/swift/third_party/resources/swift-prebuilt-macos.tar.zst b/swift/third_party/resources/swift-prebuilt-macos.tar.zst new file mode 100644 index 000000000000..f69024bd10d2 --- /dev/null +++ b/swift/third_party/resources/swift-prebuilt-macos.tar.zst @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c81917da67ff2bb642ef2e34e005466b06f756c958702ec070bcacdb83c2f76 +size 101405609 diff --git a/swift/third_party/resource-dir/update.sh b/swift/third_party/resources/update.sh old mode 100644 new mode 100755 similarity index 100% rename from swift/third_party/resource-dir/update.sh rename to swift/third_party/resources/update.sh diff --git a/swift/third_party/resources/updating.md b/swift/third_party/resources/updating.md new file mode 100644 index 000000000000..472e74a8b3e5 --- /dev/null +++ b/swift/third_party/resources/updating.md @@ -0,0 +1,25 @@ +These files can only be updated having access for the internal repository at the moment. + +In order to perform a Swift update: + +1. Dispatch the [internal `swift-prebuild` workflow](https://github.com/github/semmle-code/actions/workflows/__swift-prebuild.yml) with the appropriate swift + tag. +2. Dispatch [internal `swift-prepare-resource-dir` workflow](https://github.com/github/semmle-code/actions/workflows/__swift-prepare-resource-dir.yml) with the + appropriate swift tag. +3. Once the jobs finish, staged artifacts are available + at https://github.com/dsp-testing/codeql-swift-artifacts/releases. Copy and paste the sha256 within the `_override` + definition in [`load.bzl`](../load.bzl). +4. Compile and run test locally. Adjust the code if needed. New AST entities have to be dealt with in [ + `SwiftTagTraits.h`](../../extractor/infra/SwiftTagTraits.h). +5. Open a draft PR with the overridden artifacts. Make sure CI passes, go back to 4. otherwise. +6. Run DCA, got back to 4. in case of problems. +7. Once you are happy, do + ```bash + bazel run //swift/third_party/resources:update-dir-macos + bazel run //swift/third_party/resources:update-dir-linux + bazel run //swift/third_party/resources:update-prebuilt-macos + bazel run //swift/third_party/resources:update-prebuilt-linux + ``` + (or whatever you have overridden). This will pull the staged archives in the repository for git LFS. +8. Clear `_override` in [`load.bzl`](../load.bzl). +9. Push and your PR will be ready for `main`. diff --git a/swift/third_party/swift-llvm-support/BUILD.bazel b/swift/third_party/swift-llvm-support/BUILD.bazel deleted file mode 100644 index 4bc1fffba949..000000000000 --- a/swift/third_party/swift-llvm-support/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -package(default_visibility = ["//swift:__subpackages__"]) - -alias( - name = "swift-llvm-support", - actual = select({ - "@bazel_tools//src/conditions:linux": "@swift_prebuilt_linux//:swift-llvm-support", - "@bazel_tools//src/conditions:darwin": "@swift_prebuilt_darwin_x86_64//:swift-llvm-support", - }), -)